connected-spaces-platform.web 6.9.1 → 6.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -72,6 +72,9 @@ export declare class NativeRef {
72
72
  set value(value: number | bigint);
73
73
  }
74
74
  declare type ProxyClassFactory = (nativePointer: NativePointer) => NativeClassWrapper | number | string;
75
+ export declare enum EFeatureFlag {
76
+ Invalid = 0
77
+ }
75
78
  export declare namespace Common {
76
79
  /**
77
80
  * @description Enum specifying the type of change that occured to an asset.
@@ -1295,7 +1298,8 @@ export declare namespace Systems {
1295
1298
  OpenAI = 6,
1296
1299
  Shopify = 7,
1297
1300
  TicketedSpace = 8,
1298
- Invalid = 9
1301
+ GoogleGenAI = 9,
1302
+ Invalid = 10
1299
1303
  }
1300
1304
  }
1301
1305
  export declare namespace Systems {
@@ -1635,6 +1639,18 @@ export declare namespace Systems {
1635
1639
  setMimeType: (mimeType: string) => void;
1636
1640
  }
1637
1641
  }
1642
+ export declare class FeatureFlag extends NativeClassWrapper implements INativeResource {
1643
+ /** @internal */
1644
+ constructor(pointer: NativePointer);
1645
+ static create(): FeatureFlag;
1646
+ static create_type_isEnabled(type: EFeatureFlag, isEnabled: boolean): FeatureFlag;
1647
+ getDescription(): string;
1648
+ delete(): void;
1649
+ get type(): EFeatureFlag;
1650
+ set type(value: EFeatureFlag);
1651
+ get enabled(): boolean;
1652
+ set enabled(value: boolean);
1653
+ }
1638
1654
  /**
1639
1655
  * @description Represents definition for identifying and versioning an external service endpoint.
1640
1656
  */
@@ -1716,9 +1732,12 @@ export declare class CSPFoundation {
1716
1732
  * @param tenant - Tenant for Magnopus Services. Data is not shared between tenants so clients using separate tenants
1717
1733
  * cannot interact with each other.
1718
1734
  * @param clientUserAgentHeader - The Client Info data
1735
+ * @param featureFlagOverrides - Optional list of feature flags whose default
1736
+ * enabled state is to be overriden. The FeatureFlag.Description property can be ignored when passing in feature flags here as this is defined by
1737
+ * the developer who creates the flag.
1719
1738
  * @return True for successful initialisation.
1720
1739
  */
1721
- static initialise(endpointRootURI: string, tenant: string, clientUserAgentHeader: ClientUserAgent): boolean;
1740
+ static initialise(endpointRootURI: string, tenant: string, clientUserAgentHeader: ClientUserAgent, featureFlagOverrides: Common.Array<FeatureFlag>): boolean;
1722
1741
  /**
1723
1742
  * @description This should be used at the end of the application lifecycle.
1724
1743
  * Clears event queues and destroys foundation systems.
@@ -1786,6 +1805,23 @@ export declare class CSPFoundation {
1786
1805
  * @return Const csp::common::string&
1787
1806
  */
1788
1807
  static getTenant(): string;
1808
+ /**
1809
+ * @description Checks if a given feature flag is enabled.
1810
+ * @param flag - The feature flag to check
1811
+ * @return True if the feature flag is enabled, false otherwise
1812
+ */
1813
+ static isFeatureEnabled(flag: EFeatureFlag): boolean;
1814
+ /**
1815
+ * @description Returns an array of feature flags.
1816
+ * @return An array of the defined feature flags
1817
+ */
1818
+ static getFeatureFlags(): Common.Array<FeatureFlag>;
1819
+ /**
1820
+ * @description Get the description of a feature flag.
1821
+ * @param flag - The feature flag whose description is to be retrieved
1822
+ * @return The description of the feature flag
1823
+ */
1824
+ static getFeatureFlagDescription(flag: EFeatureFlag): string;
1789
1825
  }
1790
1826
  export declare namespace Common {
1791
1827
  /**
@@ -4952,9 +4988,13 @@ export declare namespace Systems {
4952
4988
  }
4953
4989
  export declare namespace Systems {
4954
4990
  /**
4955
- * @description Base class for all Connected Spaces Platform Systems, which enforces passing of a WebClient or NetworkEventBus instance in the constructor
4956
- * of each System.
4957
- */
4991
+ * @description Base class for all Connected Spaces Platform Systems, which enforces passing of a WebClient or NetworkEventBus instance in the constructor
4992
+ * of each System.
4993
+ @invariant EventBusPtr can never be null. The NetworkEventBus is owned by the MultiplayerConnection and persists for it's lifetime. It is passed
4994
+ * to each system (which derive from SystemBase) by reference to their ctor. This ref is dereferenced before being passed to the SystemBase ctor.
4995
+ @invariant LogSystem can never be null. The LogSystem is owned by the SystemsManager and persists for it's lifetime. It is passed to
4996
+ * each system (which derive from SystemBase) by reference to their ctor. This ref is dereferenced before being passed to the SystemBase ctor.
4997
+ */
4958
4998
  class SystemBase extends NativeClassWrapper {
4959
4999
  /** @internal */
4960
5000
  constructor(pointer: NativePointer);
@@ -4965,10 +5005,6 @@ export declare namespace Systems {
4965
5005
  * @description Registers the system to listen for the default event.
4966
5006
  */
4967
5007
  registerSystemCallback(): void;
4968
- /**
4969
- * @description Deregisters the system from listening for the default event.
4970
- */
4971
- deregisterSystemCallback(): void;
4972
5008
  }
4973
5009
  }
4974
5010
  export declare namespace Systems {
@@ -6328,6 +6364,21 @@ export declare namespace Common {
6328
6364
  set hotspotData(value: Common.HotspotSequenceChangedNetworkEventData);
6329
6365
  }
6330
6366
  }
6367
+ export declare namespace Common {
6368
+ class AsyncCallCompletedEventData extends Common.NetworkEventData implements INativeResource {
6369
+ /** @internal */
6370
+ constructor(pointer: NativePointer);
6371
+ static fromNetworkEventData(baseInstance: Common.NetworkEventData): Common.AsyncCallCompletedEventData;
6372
+ static create(): AsyncCallCompletedEventData;
6373
+ delete(): void;
6374
+ get operationName(): string;
6375
+ set operationName(value: string);
6376
+ get referenceId(): string;
6377
+ set referenceId(value: string);
6378
+ get referenceType(): string;
6379
+ set referenceType(value: string);
6380
+ }
6381
+ }
6331
6382
  export declare namespace Multiplayer {
6332
6383
  /**
6333
6384
  * @description Class for creating and managing objects in an offline context.
@@ -10738,10 +10789,6 @@ export declare namespace Systems {
10738
10789
  * @description Registers the system to listen for the named event.
10739
10790
  */
10740
10791
  registerSystemCallback(): void;
10741
- /**
10742
- * @description Deregisters the system from listening for the named event.
10743
- */
10744
- deregisterSystemCallback(): void;
10745
10792
  }
10746
10793
  }
10747
10794
  export declare namespace Systems {
@@ -11495,10 +11542,6 @@ export declare namespace Systems {
11495
11542
  * @description Registers the system to listen for the named event.
11496
11543
  */
11497
11544
  registerSystemCallback(): void;
11498
- /**
11499
- * @description Deregisters the system from listening for the named event.
11500
- */
11501
- deregisterSystemCallback(): void;
11502
11545
  }
11503
11546
  }
11504
11547
  export declare namespace Systems {
@@ -11837,10 +11880,6 @@ export declare namespace Systems {
11837
11880
  * @description Registers the system to listen for the named event.
11838
11881
  */
11839
11882
  registerSystemCallback(): void;
11840
- /**
11841
- * @description Deregisters the system from listening for the named event.
11842
- */
11843
- deregisterSystemCallback(): void;
11844
11883
  }
11845
11884
  }
11846
11885
  export declare namespace Systems {
@@ -12537,16 +12576,44 @@ export declare namespace Systems {
12537
12576
  */
12538
12577
  deleteSpaceGeoLocation(spaceId: string): Promise<Systems.NullResult>;
12539
12578
  /**
12540
- * @description Duplicate an existing space and assign it to the current user
12579
+ * @description Duplicate an existing space and assign it to the current user.
12580
+ * This is a synchronous operation and can have a high execution time for complex spaces. If the user disconnects while waiting for the operation
12581
+ * to complete, the duplicate space request will be cancelled.
12582
+ * \deprecated Use DuplicateSpaceAsync() instead. This method performs a synchronous duplication of a Space which can timeout and fail for
12583
+ * complex Spaces or if the backend services are under excessive load.
12541
12584
  * @param spaceId - Id of the space to duplicate.
12542
12585
  * @param newName - A unique name for the duplicated space.
12543
12586
  * @param newAttributes - Attributes to apply to the duplicated space.
12544
- * @param memberGroupIds - An optional array of group (space) IDs to copy users from.
12587
+ * @param memberGroupIds - An optional array of group (space) IDs. Members of these groups will be added
12588
+ * to the duplicated space with the same roles.
12545
12589
  * @param shallowCopy - If true, the duplicated space will reference the assets of the original space. Otherwise, all assets will be
12546
12590
  * duplicated.
12547
- * @param callback - Callback when asynchronous task finishes
12591
+ * @param callback - Callback when asynchronous task finishes.
12548
12592
  */
12549
12593
  duplicateSpace(spaceId: string, newName: string, newAttributes: Systems.SpaceAttributes, memberGroupIds: Common.Array<string> | null, shallowCopy: boolean): Promise<Systems.SpaceResult>;
12594
+ /**
12595
+ * @description Duplicate an existing space and assign it to the current user.
12596
+ * This is an asynchronous operation. If the user disconnects while waiting for the operation to complete it will continue unaffected. Please
12597
+ * subcribe to the AsyncCallCompletedCallback via @ref SpaceSystem::SetAsyncCallCompletedCallback() to be notified when the duplication operation
12598
+ * is complete. The AsyncCallCompletedEventData returned by the AsyncCallCompletedCallback will contain the following information:
12599
+ * - OperationName: "DuplicateSpaceAsync".
12600
+ * - ReferenceId: Id of the newly duplicated Space.
12601
+ * - ReferenceType: "GroupId".
12602
+ * @param spaceId - Id of the space to duplicate.
12603
+ * @param newName - A unique name for the duplicated space.
12604
+ * @param newAttributes - Attributes to apply to the duplicated space.
12605
+ * @param memberGroupIds - An optional array of group (space) IDs. Members of these groups will be added
12606
+ * to the duplicated space with the same roles.
12607
+ * @param shallowCopy - If true, the duplicated space will reference the assets of the original space. Otherwise, all assets will be
12608
+ * duplicated.
12609
+ * @param callback - Callback when asynchronous task is successfully received by the backend services.
12610
+ */
12611
+ duplicateSpaceAsync(spaceId: string, newName: string, newAttributes: Systems.SpaceAttributes, memberGroupIds: Common.Array<string> | null, shallowCopy: boolean): Promise<Systems.NullResult>;
12612
+ /**
12613
+ * @description Sets a callback for the async call completed event. Triggered when an async call to DuplicateSpace is completed.
12614
+ * @param callback - Callback to receive data concerning the Space duplication.
12615
+ */
12616
+ setAsyncCallCompletedCallback(callback: (arg1: Common.AsyncCallCompletedEventData) => void): void;
12550
12617
  }
12551
12618
  }
12552
12619
  export declare namespace Systems {
@@ -13100,10 +13167,6 @@ export declare namespace Systems {
13100
13167
  * @description Registers the system to listen for the named event.
13101
13168
  */
13102
13169
  registerSystemCallback(): void;
13103
- /**
13104
- * @description Deregisters the system from listening for the named event.
13105
- */
13106
- deregisterSystemCallback(): void;
13107
13170
  }
13108
13171
  }
13109
13172
  export declare namespace Common {
@@ -13113,6 +13176,7 @@ export declare namespace Common {
13113
13176
  private TTypeFactory;
13114
13177
  private TTypeName;
13115
13178
  static ofcsp_multiplayer_ComponentUpdateInfo(): Array<Multiplayer.ComponentUpdateInfo>;
13179
+ static ofcsp_FeatureFlag(): Array<FeatureFlag>;
13116
13180
  static ofcsp_common_ReplicatedValue(): Array<Common.ReplicatedValue>;
13117
13181
  static ofcsp_systems_SpaceUserRole(): Array<Systems.SpaceUserRole>;
13118
13182
  static ofcsp_multiplayer_NetworkEventRegistration(): Array<Multiplayer.NetworkEventRegistration>;
@@ -13157,6 +13221,7 @@ export declare namespace Common {
13157
13221
  static ofcsp_common_Map_String_String(): Array<Common.Map<string, string>>;
13158
13222
  static ofcsp_common_Array_String(): Array<Common.Array<string>>;
13159
13223
  static ofcsp_multiplayer_ComponentUpdateInfo_number(size: number): Array<Multiplayer.ComponentUpdateInfo>;
13224
+ static ofcsp_FeatureFlag_number(size: number): Array<FeatureFlag>;
13160
13225
  static ofcsp_common_ReplicatedValue_number(size: number): Array<Common.ReplicatedValue>;
13161
13226
  static ofcsp_systems_SpaceUserRole_number(size: number): Array<Systems.SpaceUserRole>;
13162
13227
  static ofcsp_multiplayer_NetworkEventRegistration_number(size: number): Array<Multiplayer.NetworkEventRegistration>;
@@ -260,6 +260,10 @@ function NumberFactory(nativePointer) {
260
260
  return nativePointer.pointer;
261
261
  }
262
262
  ProxyClassFactories["Number"] = NumberFactory;
263
+ function csp_EFeatureFlagFactory(nativePointer) {
264
+ return nativePointer.pointer;
265
+ }
266
+ ProxyClassFactories["csp_EFeatureFlag"] = csp_EFeatureFlagFactory;
263
267
  function csp_common_EAssetChangeTypeFactory(nativePointer) {
264
268
  return nativePointer.pointer;
265
269
  }
@@ -682,6 +686,10 @@ function csp_systems_EThirdPartyAuthenticationProvidersFactory(nativePointer) {
682
686
  }
683
687
  ProxyClassFactories["csp_systems_EThirdPartyAuthenticationProviders"] =
684
688
  csp_systems_EThirdPartyAuthenticationProvidersFactory;
689
+ function csp_FeatureFlagFactory(nativePointer) {
690
+ return new FeatureFlag(nativePointer);
691
+ }
692
+ ProxyClassFactories["csp_FeatureFlag"] = csp_FeatureFlagFactory;
685
693
  function csp_ServiceDefinitionFactory(nativePointer) {
686
694
  return new ServiceDefinition(nativePointer);
687
695
  }
@@ -1109,6 +1117,11 @@ function csp_common_SequenceChangedNetworkEventDataFactory(nativePointer) {
1109
1117
  }
1110
1118
  ProxyClassFactories["csp_common_SequenceChangedNetworkEventData"] =
1111
1119
  csp_common_SequenceChangedNetworkEventDataFactory;
1120
+ function csp_common_AsyncCallCompletedEventDataFactory(nativePointer) {
1121
+ return new Common.AsyncCallCompletedEventData(nativePointer);
1122
+ }
1123
+ ProxyClassFactories["csp_common_AsyncCallCompletedEventData"] =
1124
+ csp_common_AsyncCallCompletedEventDataFactory;
1112
1125
  function csp_multiplayer_OfflineRealtimeEngineFactory(nativePointer) {
1113
1126
  return new Multiplayer.OfflineRealtimeEngine(nativePointer);
1114
1127
  }
@@ -1717,6 +1730,11 @@ function csp_common_Array_csp_multiplayer_ComponentUpdateInfoFactory(nativePoint
1717
1730
  }
1718
1731
  ProxyClassFactories["csp_common_Array_csp_multiplayer_ComponentUpdateInfo"] =
1719
1732
  csp_common_Array_csp_multiplayer_ComponentUpdateInfoFactory;
1733
+ function csp_common_Array_csp_FeatureFlagFactory(nativePointer) {
1734
+ return new Common.Array(nativePointer, csp_FeatureFlagFactory, "csp_FeatureFlag");
1735
+ }
1736
+ ProxyClassFactories["csp_common_Array_csp_FeatureFlag"] =
1737
+ csp_common_Array_csp_FeatureFlagFactory;
1720
1738
  function csp_common_Array_csp_common_ReplicatedValueFactory(nativePointer) {
1721
1739
  return new Common.Array(nativePointer, csp_common_ReplicatedValueFactory, "csp_common_ReplicatedValue");
1722
1740
  }
@@ -1986,6 +2004,10 @@ function csp_common_Map_String_csp_common_Array_StringFactory(nativePointer) {
1986
2004
  }
1987
2005
  ProxyClassFactories["csp_common_Map_String_csp_common_Array_String"] =
1988
2006
  csp_common_Map_String_csp_common_Array_StringFactory;
2007
+ export var EFeatureFlag;
2008
+ (function (EFeatureFlag) {
2009
+ EFeatureFlag[EFeatureFlag["Invalid"] = 0] = "Invalid";
2010
+ })(EFeatureFlag || (EFeatureFlag = {}));
1989
2011
  export var Common;
1990
2012
  (function (Common) {
1991
2013
  /**
@@ -3294,7 +3316,8 @@ export var Systems;
3294
3316
  TierFeatures[TierFeatures["OpenAI"] = 6] = "OpenAI";
3295
3317
  TierFeatures[TierFeatures["Shopify"] = 7] = "Shopify";
3296
3318
  TierFeatures[TierFeatures["TicketedSpace"] = 8] = "TicketedSpace";
3297
- TierFeatures[TierFeatures["Invalid"] = 9] = "Invalid";
3319
+ TierFeatures[TierFeatures["GoogleGenAI"] = 9] = "GoogleGenAI";
3320
+ TierFeatures[TierFeatures["Invalid"] = 10] = "Invalid";
3298
3321
  })(TierFeatures = Systems.TierFeatures || (Systems.TierFeatures = {}));
3299
3322
  })(Systems || (Systems = {}));
3300
3323
  (function (Systems) {
@@ -3368,6 +3391,51 @@ export var Systems;
3368
3391
  EThirdPartyAuthenticationProviders[EThirdPartyAuthenticationProviders["Invalid"] = 3] = "Invalid";
3369
3392
  })(EThirdPartyAuthenticationProviders = Systems.EThirdPartyAuthenticationProviders || (Systems.EThirdPartyAuthenticationProviders = {}));
3370
3393
  })(Systems || (Systems = {}));
3394
+ export class FeatureFlag extends NativeClassWrapper {
3395
+ /** @internal */
3396
+ constructor(pointer) {
3397
+ super(pointer);
3398
+ }
3399
+ static create() {
3400
+ var _ptr = Module._malloc(8);
3401
+ Module.ccall("csp_FeatureFlag_Ctor", "void", ["number"], [_ptr]);
3402
+ var _nPtr = getNativePointer(_ptr);
3403
+ return new FeatureFlag(_nPtr);
3404
+ }
3405
+ static create_type_isEnabled(type, isEnabled) {
3406
+ var _ptr = Module._malloc(8);
3407
+ Module.ccall("csp_FeatureFlag_Ctor_EFeatureFlag_bool", "void", ["number", "number", "boolean"], [_ptr, type, isEnabled]);
3408
+ var _nPtr = getNativePointer(_ptr);
3409
+ return new FeatureFlag(_nPtr);
3410
+ }
3411
+ getDescription() {
3412
+ let _result = Module.ccall("csp_FeatureFlag_GetDescription_StringRC", "number", ["number"], [this.pointer]);
3413
+ const _resultString = Module.UTF8ToString(_result);
3414
+ free(_result);
3415
+ _result = _resultString;
3416
+ return _result;
3417
+ }
3418
+ delete() {
3419
+ if (this.ownsPointer && !this.disposed) {
3420
+ Module.ccall("csp_FeatureFlag_Dtor", "void", ["number"], [this.pointer]);
3421
+ this.disposed = true;
3422
+ }
3423
+ }
3424
+ get type() {
3425
+ let _result = Module.ccall("csp_FeatureFlag__Get_Type", "number", ["number"], [this.pointer]);
3426
+ return _result;
3427
+ }
3428
+ set type(value) {
3429
+ Module.ccall("csp_FeatureFlag__Set_Type", "void", ["number", "number"], [this.pointer, value]);
3430
+ }
3431
+ get enabled() {
3432
+ let _result = Module.ccall("csp_FeatureFlag__Get_Enabled", "boolean", ["number"], [this.pointer]);
3433
+ return _result;
3434
+ }
3435
+ set enabled(value) {
3436
+ Module.ccall("csp_FeatureFlag__Set_Enabled", "void", ["number", "boolean"], [this.pointer, value]);
3437
+ }
3438
+ }
3371
3439
  /**
3372
3440
  * @description Represents definition for identifying and versioning an external service endpoint.
3373
3441
  */
@@ -3580,10 +3648,18 @@ export class CSPFoundation {
3580
3648
  * @param tenant - Tenant for Magnopus Services. Data is not shared between tenants so clients using separate tenants
3581
3649
  * cannot interact with each other.
3582
3650
  * @param clientUserAgentHeader - The Client Info data
3651
+ * @param featureFlagOverrides - Optional list of feature flags whose default
3652
+ * enabled state is to be overriden. The FeatureFlag.Description property can be ignored when passing in feature flags here as this is defined by
3653
+ * the developer who creates the flag.
3583
3654
  * @return True for successful initialisation.
3584
3655
  */
3585
- static initialise(endpointRootURI, tenant, clientUserAgentHeader) {
3586
- let _result = Module.ccall("csp_CSPFoundation_Initialise_bool_StringRC_StringRC_ClientUserAgentRC", "boolean", ["string", "string", "number"], [endpointRootURI, tenant, clientUserAgentHeader.pointer]);
3656
+ static initialise(endpointRootURI, tenant, clientUserAgentHeader, featureFlagOverrides) {
3657
+ let _result = Module.ccall("csp_CSPFoundation_Initialise_bool_StringRC_StringRC_ClientUserAgentRC_ArrayRC", "boolean", ["string", "string", "number", "number"], [
3658
+ endpointRootURI,
3659
+ tenant,
3660
+ clientUserAgentHeader.pointer,
3661
+ featureFlagOverrides.pointer,
3662
+ ]);
3587
3663
  return _result;
3588
3664
  }
3589
3665
  /**
@@ -3715,6 +3791,38 @@ export class CSPFoundation {
3715
3791
  _result = _resultString;
3716
3792
  return _result;
3717
3793
  }
3794
+ /**
3795
+ * @description Checks if a given feature flag is enabled.
3796
+ * @param flag - The feature flag to check
3797
+ * @return True if the feature flag is enabled, false otherwise
3798
+ */
3799
+ static isFeatureEnabled(flag) {
3800
+ let _result = Module.ccall("csp_CSPFoundation_IsFeatureEnabled_bool_EFeatureFlag", "boolean", ["number"], [flag]);
3801
+ return _result;
3802
+ }
3803
+ /**
3804
+ * @description Returns an array of feature flags.
3805
+ * @return An array of the defined feature flags
3806
+ */
3807
+ static getFeatureFlags() {
3808
+ var _ret = Module._malloc(8);
3809
+ Module.ccall("csp_CSPFoundation_GetFeatureFlags_ArrayRC", "void", ["number"], [_ret]);
3810
+ var _nPtr = new Common.Array(getNativePointer(_ret), csp_FeatureFlagFactory, "csp_FeatureFlag");
3811
+ Module._free(_ret);
3812
+ return _nPtr;
3813
+ }
3814
+ /**
3815
+ * @description Get the description of a feature flag.
3816
+ * @param flag - The feature flag whose description is to be retrieved
3817
+ * @return The description of the feature flag
3818
+ */
3819
+ static getFeatureFlagDescription(flag) {
3820
+ let _result = Module.ccall("csp_CSPFoundation_GetFeatureFlagDescription_String_EFeatureFlag", "number", ["number"], [flag]);
3821
+ const _resultString = Module.UTF8ToString(_result);
3822
+ free(_result);
3823
+ _result = _resultString;
3824
+ return _result;
3825
+ }
3718
3826
  }
3719
3827
  (function (Common) {
3720
3828
  /**
@@ -12522,9 +12630,13 @@ export class CSPFoundation {
12522
12630
  })(Systems || (Systems = {}));
12523
12631
  (function (Systems) {
12524
12632
  /**
12525
- * @description Base class for all Connected Spaces Platform Systems, which enforces passing of a WebClient or NetworkEventBus instance in the constructor
12526
- * of each System.
12527
- */
12633
+ * @description Base class for all Connected Spaces Platform Systems, which enforces passing of a WebClient or NetworkEventBus instance in the constructor
12634
+ * of each System.
12635
+ @invariant EventBusPtr can never be null. The NetworkEventBus is owned by the MultiplayerConnection and persists for it's lifetime. It is passed
12636
+ * to each system (which derive from SystemBase) by reference to their ctor. This ref is dereferenced before being passed to the SystemBase ctor.
12637
+ @invariant LogSystem can never be null. The LogSystem is owned by the SystemsManager and persists for it's lifetime. It is passed to
12638
+ * each system (which derive from SystemBase) by reference to their ctor. This ref is dereferenced before being passed to the SystemBase ctor.
12639
+ */
12528
12640
  class SystemBase extends NativeClassWrapper {
12529
12641
  /** @internal */
12530
12642
  constructor(pointer) {
@@ -12539,12 +12651,6 @@ export class CSPFoundation {
12539
12651
  registerSystemCallback() {
12540
12652
  Module.ccall("csp_systems_SystemBase_RegisterSystemCallback_void", "void", ["number"], [this.pointer]);
12541
12653
  }
12542
- /**
12543
- * @description Deregisters the system from listening for the default event.
12544
- */
12545
- deregisterSystemCallback() {
12546
- Module.ccall("csp_systems_SystemBase_DeregisterSystemCallback_void", "void", ["number"], [this.pointer]);
12547
- }
12548
12654
  }
12549
12655
  Systems.SystemBase = SystemBase;
12550
12656
  })(Systems || (Systems = {}));
@@ -16052,6 +16158,52 @@ export class CSPFoundation {
16052
16158
  }
16053
16159
  Common.SequenceChangedNetworkEventData = SequenceChangedNetworkEventData;
16054
16160
  })(Common || (Common = {}));
16161
+ (function (Common) {
16162
+ class AsyncCallCompletedEventData extends Common.NetworkEventData {
16163
+ /** @internal */
16164
+ constructor(pointer) {
16165
+ super(pointer);
16166
+ }
16167
+ static fromNetworkEventData(baseInstance) {
16168
+ const nativeClassWrapper = baseInstance;
16169
+ return new Common.AsyncCallCompletedEventData(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
16170
+ }
16171
+ static create() {
16172
+ var _ptr = Module._malloc(8);
16173
+ Module.ccall("csp_common_AsyncCallCompletedEventData_Ctor", "void", ["number"], [_ptr]);
16174
+ var _nPtr = getNativePointer(_ptr);
16175
+ return new AsyncCallCompletedEventData(_nPtr);
16176
+ }
16177
+ delete() {
16178
+ if (this.ownsPointer && !this.disposed) {
16179
+ Module.ccall("csp_common_AsyncCallCompletedEventData_Dtor", "void", ["number"], [this.pointer]);
16180
+ this.disposed = true;
16181
+ }
16182
+ }
16183
+ get operationName() {
16184
+ let _result = Module.ccall("csp_common_AsyncCallCompletedEventData__Get_OperationName", "string", ["number"], [this.pointer]);
16185
+ return _result;
16186
+ }
16187
+ set operationName(value) {
16188
+ Module.ccall("csp_common_AsyncCallCompletedEventData__Set_OperationName", "void", ["number", "string"], [this.pointer, value]);
16189
+ }
16190
+ get referenceId() {
16191
+ let _result = Module.ccall("csp_common_AsyncCallCompletedEventData__Get_ReferenceId", "string", ["number"], [this.pointer]);
16192
+ return _result;
16193
+ }
16194
+ set referenceId(value) {
16195
+ Module.ccall("csp_common_AsyncCallCompletedEventData__Set_ReferenceId", "void", ["number", "string"], [this.pointer, value]);
16196
+ }
16197
+ get referenceType() {
16198
+ let _result = Module.ccall("csp_common_AsyncCallCompletedEventData__Get_ReferenceType", "string", ["number"], [this.pointer]);
16199
+ return _result;
16200
+ }
16201
+ set referenceType(value) {
16202
+ Module.ccall("csp_common_AsyncCallCompletedEventData__Set_ReferenceType", "void", ["number", "string"], [this.pointer, value]);
16203
+ }
16204
+ }
16205
+ Common.AsyncCallCompletedEventData = AsyncCallCompletedEventData;
16206
+ })(Common || (Common = {}));
16055
16207
  (function (Multiplayer) {
16056
16208
  /**
16057
16209
  * @description Class for creating and managing objects in an offline context.
@@ -24725,12 +24877,6 @@ export class CSPFoundation {
24725
24877
  registerSystemCallback() {
24726
24878
  Module.ccall("csp_systems_AssetSystem_RegisterSystemCallback_void", "void", ["number"], [this.pointer]);
24727
24879
  }
24728
- /**
24729
- * @description Deregisters the system from listening for the named event.
24730
- */
24731
- deregisterSystemCallback() {
24732
- Module.ccall("csp_systems_AssetSystem_DeregisterSystemCallback_void", "void", ["number"], [this.pointer]);
24733
- }
24734
24880
  }
24735
24881
  Systems.AssetSystem = AssetSystem;
24736
24882
  })(Systems || (Systems = {}));
@@ -26379,7 +26525,7 @@ export class CSPFoundation {
26379
26525
  }
26380
26526
  static create_sequenceSystem_spaceSystem_eventBus_logSystem(sequenceSystem, spaceSystem, eventBus, logSystem) {
26381
26527
  var _ptr = Module._malloc(8);
26382
- Module.ccall("csp_systems_HotspotSequenceSystem_Ctor_SequenceSystemP_SpaceSystemP_NetworkEventBusP_LogSystemR", "void", ["number", "number", "number", "number", "number"], [
26528
+ Module.ccall("csp_systems_HotspotSequenceSystem_Ctor_SequenceSystemP_SpaceSystemP_NetworkEventBusR_LogSystemR", "void", ["number", "number", "number", "number", "number"], [
26383
26529
  _ptr,
26384
26530
  sequenceSystem.pointer,
26385
26531
  spaceSystem.pointer,
@@ -26585,12 +26731,6 @@ export class CSPFoundation {
26585
26731
  registerSystemCallback() {
26586
26732
  Module.ccall("csp_systems_HotspotSequenceSystem_RegisterSystemCallback_void", "void", ["number"], [this.pointer]);
26587
26733
  }
26588
- /**
26589
- * @description Deregisters the system from listening for the named event.
26590
- */
26591
- deregisterSystemCallback() {
26592
- Module.ccall("csp_systems_HotspotSequenceSystem_DeregisterSystemCallback_void", "void", ["number"], [this.pointer]);
26593
- }
26594
26734
  }
26595
26735
  Systems.HotspotSequenceSystem = HotspotSequenceSystem;
26596
26736
  })(Systems || (Systems = {}));
@@ -27476,12 +27616,6 @@ export class CSPFoundation {
27476
27616
  registerSystemCallback() {
27477
27617
  Module.ccall("csp_systems_SequenceSystem_RegisterSystemCallback_void", "void", ["number"], [this.pointer]);
27478
27618
  }
27479
- /**
27480
- * @description Deregisters the system from listening for the named event.
27481
- */
27482
- deregisterSystemCallback() {
27483
- Module.ccall("csp_systems_SequenceSystem_DeregisterSystemCallback_void", "void", ["number"], [this.pointer]);
27484
- }
27485
27619
  }
27486
27620
  Systems.SequenceSystem = SequenceSystem;
27487
27621
  })(Systems || (Systems = {}));
@@ -29650,14 +29784,19 @@ export class CSPFoundation {
29650
29784
  return _promise;
29651
29785
  }
29652
29786
  /**
29653
- * @description Duplicate an existing space and assign it to the current user
29787
+ * @description Duplicate an existing space and assign it to the current user.
29788
+ * This is a synchronous operation and can have a high execution time for complex spaces. If the user disconnects while waiting for the operation
29789
+ * to complete, the duplicate space request will be cancelled.
29790
+ * \deprecated Use DuplicateSpaceAsync() instead. This method performs a synchronous duplication of a Space which can timeout and fail for
29791
+ * complex Spaces or if the backend services are under excessive load.
29654
29792
  * @param spaceId - Id of the space to duplicate.
29655
29793
  * @param newName - A unique name for the duplicated space.
29656
29794
  * @param newAttributes - Attributes to apply to the duplicated space.
29657
- * @param memberGroupIds - An optional array of group (space) IDs to copy users from.
29795
+ * @param memberGroupIds - An optional array of group (space) IDs. Members of these groups will be added
29796
+ * to the duplicated space with the same roles.
29658
29797
  * @param shallowCopy - If true, the duplicated space will reference the assets of the original space. Otherwise, all assets will be
29659
29798
  * duplicated.
29660
- * @param callback - Callback when asynchronous task finishes
29799
+ * @param callback - Callback when asynchronous task finishes.
29661
29800
  */
29662
29801
  async duplicateSpace(spaceId, newName, newAttributes, memberGroupIds, shallowCopy) {
29663
29802
  var _resolve;
@@ -29696,6 +29835,72 @@ export class CSPFoundation {
29696
29835
  ]);
29697
29836
  return _promise;
29698
29837
  }
29838
+ /**
29839
+ * @description Duplicate an existing space and assign it to the current user.
29840
+ * This is an asynchronous operation. If the user disconnects while waiting for the operation to complete it will continue unaffected. Please
29841
+ * subcribe to the AsyncCallCompletedCallback via @ref SpaceSystem::SetAsyncCallCompletedCallback() to be notified when the duplication operation
29842
+ * is complete. The AsyncCallCompletedEventData returned by the AsyncCallCompletedCallback will contain the following information:
29843
+ * - OperationName: "DuplicateSpaceAsync".
29844
+ * - ReferenceId: Id of the newly duplicated Space.
29845
+ * - ReferenceType: "GroupId".
29846
+ * @param spaceId - Id of the space to duplicate.
29847
+ * @param newName - A unique name for the duplicated space.
29848
+ * @param newAttributes - Attributes to apply to the duplicated space.
29849
+ * @param memberGroupIds - An optional array of group (space) IDs. Members of these groups will be added
29850
+ * to the duplicated space with the same roles.
29851
+ * @param shallowCopy - If true, the duplicated space will reference the assets of the original space. Otherwise, all assets will be
29852
+ * duplicated.
29853
+ * @param callback - Callback when asynchronous task is successfully received by the backend services.
29854
+ */
29855
+ async duplicateSpaceAsync(spaceId, newName, newAttributes, memberGroupIds, shallowCopy) {
29856
+ var _resolve;
29857
+ var _promise = new Promise((_r) => {
29858
+ _resolve = _r;
29859
+ });
29860
+ var _callbackPtr;
29861
+ var _callback = (_stateObject__, result) => {
29862
+ var _resultPtr = getNativePointer(result);
29863
+ var _resultInstance = new Systems.NullResult(_resultPtr);
29864
+ if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
29865
+ return;
29866
+ }
29867
+ _resolve(_resultInstance);
29868
+ Module.removeFunction(_callbackPtr);
29869
+ };
29870
+ _callbackPtr = Module.addFunction(_callback, "vii");
29871
+ Module.ccall("csp_systems_SpaceSystem_DuplicateSpaceAsync_void_StringRC_StringRC_SpaceAttributes_ArrayRC_bool_NullResultCallback", "void", [
29872
+ "number",
29873
+ "string",
29874
+ "string",
29875
+ "number",
29876
+ "number",
29877
+ "boolean",
29878
+ "number",
29879
+ "number",
29880
+ ], [
29881
+ this.pointer,
29882
+ spaceId,
29883
+ newName,
29884
+ newAttributes,
29885
+ memberGroupIds != null ? memberGroupIds.pointer : 0,
29886
+ shallowCopy,
29887
+ _callbackPtr,
29888
+ 0,
29889
+ ]);
29890
+ return _promise;
29891
+ }
29892
+ /**
29893
+ * @description Sets a callback for the async call completed event. Triggered when an async call to DuplicateSpace is completed.
29894
+ * @param callback - Callback to receive data concerning the Space duplication.
29895
+ */
29896
+ setAsyncCallCompletedCallback(callback) {
29897
+ var _callback = (_stateObject__, arg1) => {
29898
+ var _arg1 = new Common.AsyncCallCompletedEventData(getNativePointer(arg1));
29899
+ callback(_arg1);
29900
+ };
29901
+ var _callbackPtr = Module.addFunction(_callback, "vii");
29902
+ Module.ccall("csp_systems_SpaceSystem_SetAsyncCallCompletedCallback_void_AsyncCallCompletedCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
29903
+ }
29699
29904
  }
29700
29905
  Systems.SpaceSystem = SpaceSystem;
29701
29906
  })(Systems || (Systems = {}));
@@ -31440,12 +31645,6 @@ export class CSPFoundation {
31440
31645
  registerSystemCallback() {
31441
31646
  Module.ccall("csp_systems_UserSystem_RegisterSystemCallback_void", "void", ["number"], [this.pointer]);
31442
31647
  }
31443
- /**
31444
- * @description Deregisters the system from listening for the named event.
31445
- */
31446
- deregisterSystemCallback() {
31447
- Module.ccall("csp_systems_UserSystem_DeregisterSystemCallback_void", "void", ["number"], [this.pointer]);
31448
- }
31449
31648
  }
31450
31649
  Systems.UserSystem = UserSystem;
31451
31650
  })(Systems || (Systems = {}));
@@ -31464,6 +31663,13 @@ export class CSPFoundation {
31464
31663
  Module._free(_ret);
31465
31664
  return _inst;
31466
31665
  }
31666
+ static ofcsp_FeatureFlag() {
31667
+ var _ret = Module._malloc(8);
31668
+ Module.ccall("csp_common_Array_Ctor_csp_FeatureFlag", "void", ["number"], [_ret]);
31669
+ var _inst = new Array(getNativePointer(_ret), csp_FeatureFlagFactory, "csp_FeatureFlag");
31670
+ Module._free(_ret);
31671
+ return _inst;
31672
+ }
31467
31673
  static ofcsp_common_ReplicatedValue() {
31468
31674
  var _ret = Module._malloc(8);
31469
31675
  Module.ccall("csp_common_Array_Ctor_csp_common_ReplicatedValue", "void", ["number"], [_ret]);
@@ -31772,6 +31978,13 @@ export class CSPFoundation {
31772
31978
  Module._free(_ret);
31773
31979
  return _inst;
31774
31980
  }
31981
+ static ofcsp_FeatureFlag_number(size) {
31982
+ var _ret = Module._malloc(8);
31983
+ Module.ccall("csp_common_Array_Conv_size_tC_csp_FeatureFlag", "void", ["number", "number"], [_ret, size]);
31984
+ var _inst = new Array(getNativePointer(_ret), csp_FeatureFlagFactory, "csp_FeatureFlag");
31985
+ Module._free(_ret);
31986
+ return _inst;
31987
+ }
31775
31988
  static ofcsp_common_ReplicatedValue_number(size) {
31776
31989
  var _ret = Module._malloc(8);
31777
31990
  Module.ccall("csp_common_Array_Conv_size_tC_csp_common_ReplicatedValue", "void", ["number", "number"], [_ret, size]);