diff --git a/crates/cli/tests/snapshots/codegen__codegen_csharp.snap b/crates/cli/tests/snapshots/codegen__codegen_csharp.snap index 1b39d791f9..e9553f2638 100644 --- a/crates/cli/tests/snapshots/codegen__codegen_csharp.snap +++ b/crates/cli/tests/snapshots/codegen__codegen_csharp.snap @@ -1237,16 +1237,16 @@ namespace SpacetimeDB { [DataMember(Name = "identity")] public SpacetimeDB.Identity Identity; - [DataMember(Name = "address")] - public SpacetimeDB.Address Address; + [DataMember(Name = "connection_id")] + public SpacetimeDB.ConnectionId ConnectionId; public HasSpecialStuff( SpacetimeDB.Identity Identity, - SpacetimeDB.Address Address + SpacetimeDB.ConnectionId ConnectionId ) { this.Identity = Identity; - this.Address = Address; + this.ConnectionId = ConnectionId; } public HasSpecialStuff() diff --git a/crates/cli/tests/snapshots/codegen__codegen_rust.snap b/crates/cli/tests/snapshots/codegen__codegen_rust.snap index 64495bc987..9c8bd3cee0 100644 --- a/crates/cli/tests/snapshots/codegen__codegen_rust.snap +++ b/crates/cli/tests/snapshots/codegen__codegen_rust.snap @@ -820,7 +820,7 @@ use spacetimedb_sdk::__codegen::{ #[sats(crate = __lib)] pub struct HasSpecialStuff { pub identity: __sdk::Identity, - pub address: __sdk::Address, + pub connection_id: __sdk::ConnectionId, } @@ -1395,8 +1395,8 @@ impl __sdk::DbContext for DbConnection { fn try_identity(&self) -> Option<__sdk::Identity> { self.imp.try_identity() } - fn address(&self) -> __sdk::Address { - self.imp.address() + fn connection_id(&self) -> __sdk::ConnectionId { + self.imp.connection_id() } } @@ -1608,8 +1608,8 @@ impl __sdk::DbContext for EventContext { fn try_identity(&self) -> Option<__sdk::Identity> { self.imp.try_identity() } - fn address(&self) -> __sdk::Address { - self.imp.address() + fn connection_id(&self) -> __sdk::ConnectionId { + self.imp.connection_id() } } @@ -1684,8 +1684,8 @@ impl __sdk::DbContext for ReducerEventContext { fn try_identity(&self) -> Option<__sdk::Identity> { self.imp.try_identity() } - fn address(&self) -> __sdk::Address { - self.imp.address() + fn connection_id(&self) -> __sdk::ConnectionId { + self.imp.connection_id() } } @@ -1756,8 +1756,8 @@ impl __sdk::DbContext for SubscriptionEventContext { fn try_identity(&self) -> Option<__sdk::Identity> { self.imp.try_identity() } - fn address(&self) -> __sdk::Address { - self.imp.address() + fn connection_id(&self) -> __sdk::ConnectionId { + self.imp.connection_id() } } @@ -1832,8 +1832,8 @@ impl __sdk::DbContext for ErrorContext { fn try_identity(&self) -> Option<__sdk::Identity> { self.imp.try_identity() } - fn address(&self) -> __sdk::Address { - self.imp.address() + fn connection_id(&self) -> __sdk::ConnectionId { + self.imp.connection_id() } } diff --git a/crates/cli/tests/snapshots/codegen__codegen_typescript.snap b/crates/cli/tests/snapshots/codegen__codegen_typescript.snap index 6e74e910b5..e3ee1c1c20 100644 --- a/crates/cli/tests/snapshots/codegen__codegen_typescript.snap +++ b/crates/cli/tests/snapshots/codegen__codegen_typescript.snap @@ -7,8 +7,6 @@ expression: outfiles // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { - // @ts-ignore - Address, // @ts-ignore AlgebraicType, // @ts-ignore @@ -20,6 +18,8 @@ import { // @ts-ignore CallReducerFlags, // @ts-ignore + ConnectionId, + // @ts-ignore DBConnectionBuilder, // @ts-ignore DBConnectionImpl, @@ -79,8 +79,6 @@ export namespace AddPlayer { // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { - // @ts-ignore - Address, // @ts-ignore AlgebraicType, // @ts-ignore @@ -92,6 +90,8 @@ import { // @ts-ignore CallReducerFlags, // @ts-ignore + ConnectionId, + // @ts-ignore DBConnectionBuilder, // @ts-ignore DBConnectionImpl, @@ -151,8 +151,6 @@ export namespace AddPrivate { // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { - // @ts-ignore - Address, // @ts-ignore AlgebraicType, // @ts-ignore @@ -164,6 +162,8 @@ import { // @ts-ignore CallReducerFlags, // @ts-ignore + ConnectionId, + // @ts-ignore DBConnectionBuilder, // @ts-ignore DBConnectionImpl, @@ -220,8 +220,6 @@ export namespace AssertCallerIdentityIsModuleIdentity { // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { - // @ts-ignore - Address, // @ts-ignore AlgebraicType, // @ts-ignore @@ -233,6 +231,8 @@ import { // @ts-ignore CallReducerFlags, // @ts-ignore + ConnectionId, + // @ts-ignore DBConnectionBuilder, // @ts-ignore DBConnectionImpl, @@ -292,8 +292,6 @@ export namespace Baz { // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { - // @ts-ignore - Address, // @ts-ignore AlgebraicType, // @ts-ignore @@ -305,6 +303,8 @@ import { // @ts-ignore CallReducerFlags, // @ts-ignore + ConnectionId, + // @ts-ignore DBConnectionBuilder, // @ts-ignore DBConnectionImpl, @@ -361,8 +361,6 @@ export namespace ClientConnected { // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { - // @ts-ignore - Address, // @ts-ignore AlgebraicType, // @ts-ignore @@ -374,6 +372,8 @@ import { // @ts-ignore CallReducerFlags, // @ts-ignore + ConnectionId, + // @ts-ignore DBConnectionBuilder, // @ts-ignore DBConnectionImpl, @@ -433,8 +433,6 @@ export namespace DeletePlayer { // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { - // @ts-ignore - Address, // @ts-ignore AlgebraicType, // @ts-ignore @@ -446,6 +444,8 @@ import { // @ts-ignore CallReducerFlags, // @ts-ignore + ConnectionId, + // @ts-ignore DBConnectionBuilder, // @ts-ignore DBConnectionImpl, @@ -505,8 +505,6 @@ export namespace DeletePlayersByName { // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { - // @ts-ignore - Address, // @ts-ignore AlgebraicType, // @ts-ignore @@ -518,6 +516,8 @@ import { // @ts-ignore CallReducerFlags, // @ts-ignore + ConnectionId, + // @ts-ignore DBConnectionBuilder, // @ts-ignore DBConnectionImpl, @@ -593,8 +593,6 @@ export default Foobar; // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { - // @ts-ignore - Address, // @ts-ignore AlgebraicType, // @ts-ignore @@ -606,6 +604,8 @@ import { // @ts-ignore CallReducerFlags, // @ts-ignore + ConnectionId, + // @ts-ignore DBConnectionBuilder, // @ts-ignore DBConnectionImpl, @@ -681,8 +681,6 @@ export class HasSpecialStuffTableHandle { // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { - // @ts-ignore - Address, // @ts-ignore AlgebraicType, // @ts-ignore @@ -694,6 +692,8 @@ import { // @ts-ignore CallReducerFlags, // @ts-ignore + ConnectionId, + // @ts-ignore DBConnectionBuilder, // @ts-ignore DBConnectionImpl, @@ -720,7 +720,7 @@ import { } from "@clockworklabs/spacetimedb-sdk"; export type HasSpecialStuff = { identity: Identity, - address: Address, + connectionId: ConnectionId, }; /** @@ -734,7 +734,7 @@ export namespace HasSpecialStuff { export function getTypeScriptAlgebraicType(): AlgebraicType { return AlgebraicType.createProductType([ new ProductTypeElement("identity", AlgebraicType.createIdentityType()), - new ProductTypeElement("address", AlgebraicType.createAddressType()), + new ProductTypeElement("connectionId", AlgebraicType.createConnectionIdType()), ]); } @@ -755,8 +755,6 @@ export namespace HasSpecialStuff { // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. import { - // @ts-ignore - Address, // @ts-ignore AlgebraicType, // @ts-ignore @@ -768,6 +766,8 @@ import { // @ts-ignore CallReducerFlags, // @ts-ignore + ConnectionId, + // @ts-ignore DBConnectionBuilder, // @ts-ignore DBConnectionImpl, @@ -1252,8 +1252,6 @@ export type EventContext = EventContextInterface