-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
331 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE | ||
// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. | ||
|
||
import { | ||
// @ts-ignore | ||
Address, | ||
// @ts-ignore | ||
AlgebraicType, | ||
// @ts-ignore | ||
AlgebraicValue, | ||
// @ts-ignore | ||
BinaryReader, | ||
// @ts-ignore | ||
BinaryWriter, | ||
// @ts-ignore | ||
CallReducerFlags, | ||
// @ts-ignore | ||
DBConnectionBuilder, | ||
// @ts-ignore | ||
DBConnectionImpl, | ||
// @ts-ignore | ||
DBContext, | ||
// @ts-ignore | ||
Event, | ||
// @ts-ignore | ||
EventContextInterface, | ||
// @ts-ignore | ||
Identity, | ||
// @ts-ignore | ||
ProductType, | ||
// @ts-ignore | ||
ProductTypeElement, | ||
// @ts-ignore | ||
SumType, | ||
// @ts-ignore | ||
SumTypeVariant, | ||
// @ts-ignore | ||
TableCache, | ||
// @ts-ignore | ||
deepEqual, | ||
} from '..'; | ||
// @ts-ignore | ||
import { IdentityToken as __IdentityToken } from './identity_token_type'; | ||
// @ts-ignore | ||
import { IdsToNames as __IdsToNames } from './ids_to_names_type'; | ||
|
||
export type AfterConnecting = { | ||
identityToken: __IdentityToken; | ||
idsToNames: __IdsToNames; | ||
}; | ||
|
||
/** | ||
* A namespace for generated helper functions. | ||
*/ | ||
export namespace AfterConnecting { | ||
/** | ||
* A function which returns this type represented as an AlgebraicType. | ||
* This function is derived from the AlgebraicType used to generate this type. | ||
*/ | ||
export function getTypeScriptAlgebraicType(): AlgebraicType { | ||
return AlgebraicType.createProductType([ | ||
new ProductTypeElement( | ||
'identityToken', | ||
__IdentityToken.getTypeScriptAlgebraicType() | ||
), | ||
new ProductTypeElement( | ||
'idsToNames', | ||
__IdsToNames.getTypeScriptAlgebraicType() | ||
), | ||
]); | ||
} | ||
|
||
export function serialize( | ||
writer: BinaryWriter, | ||
value: AfterConnecting | ||
): void { | ||
AfterConnecting.getTypeScriptAlgebraicType().serialize(writer, value); | ||
} | ||
|
||
export function deserialize(reader: BinaryReader): AfterConnecting { | ||
return AfterConnecting.getTypeScriptAlgebraicType().deserialize(reader); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE | ||
// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD. | ||
|
||
import { | ||
// @ts-ignore | ||
Address, | ||
// @ts-ignore | ||
AlgebraicType, | ||
// @ts-ignore | ||
AlgebraicValue, | ||
// @ts-ignore | ||
BinaryReader, | ||
// @ts-ignore | ||
BinaryWriter, | ||
// @ts-ignore | ||
CallReducerFlags, | ||
// @ts-ignore | ||
DBConnectionBuilder, | ||
// @ts-ignore | ||
DBConnectionImpl, | ||
// @ts-ignore | ||
DBContext, | ||
// @ts-ignore | ||
Event, | ||
// @ts-ignore | ||
EventContextInterface, | ||
// @ts-ignore | ||
Identity, | ||
// @ts-ignore | ||
ProductType, | ||
// @ts-ignore | ||
ProductTypeElement, | ||
// @ts-ignore | ||
SumType, | ||
// @ts-ignore | ||
SumTypeVariant, | ||
// @ts-ignore | ||
TableCache, | ||
// @ts-ignore | ||
deepEqual, | ||
} from '..'; | ||
export type IdsToNames = { | ||
reducerIds: number[]; | ||
reducerNames: string[]; | ||
tableIds: number[]; | ||
tableNames: string[]; | ||
}; | ||
|
||
/** | ||
* A namespace for generated helper functions. | ||
*/ | ||
export namespace IdsToNames { | ||
/** | ||
* A function which returns this type represented as an AlgebraicType. | ||
* This function is derived from the AlgebraicType used to generate this type. | ||
*/ | ||
export function getTypeScriptAlgebraicType(): AlgebraicType { | ||
return AlgebraicType.createProductType([ | ||
new ProductTypeElement( | ||
'reducerIds', | ||
AlgebraicType.createArrayType(AlgebraicType.createU32Type()) | ||
), | ||
new ProductTypeElement( | ||
'reducerNames', | ||
AlgebraicType.createArrayType(AlgebraicType.createStringType()) | ||
), | ||
new ProductTypeElement( | ||
'tableIds', | ||
AlgebraicType.createArrayType(AlgebraicType.createU32Type()) | ||
), | ||
new ProductTypeElement( | ||
'tableNames', | ||
AlgebraicType.createArrayType(AlgebraicType.createStringType()) | ||
), | ||
]); | ||
} | ||
|
||
export function serialize(writer: BinaryWriter, value: IdsToNames): void { | ||
IdsToNames.getTypeScriptAlgebraicType().serialize(writer, value); | ||
} | ||
|
||
export function deserialize(reader: BinaryReader): IdsToNames { | ||
return IdsToNames.getTypeScriptAlgebraicType().deserialize(reader); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.