connected-spaces-platform.web 5.19.0 → 5.20.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,16 +72,17 @@ 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 namespace Systems {
75
+ export declare namespace Common {
76
76
  /**
77
- * @description Enum for setting csp::systems::Asset third party platform type.
78
- * NONE indicates that the asset will work on any platform.
79
- * Any other value indicates it will only work with this platform.
77
+ * @description Enum which represents possible login states of a CSP client.
80
78
  */
81
- enum EThirdPartyPlatform {
82
- NONE = 0,
83
- UNREAL = 1,
84
- UNITY = 2
79
+ enum ELoginState {
80
+ LoginThirdPartyProviderDetailsRequested = 0,
81
+ LoginRequested = 1,
82
+ LoggedIn = 2,
83
+ LogoutRequested = 3,
84
+ LoggedOut = 4,
85
+ Error = 5
85
86
  }
86
87
  }
87
88
  export declare namespace Web {
@@ -165,6 +166,17 @@ export declare namespace Multiplayer {
165
166
  SpaceUserLimitExceeded = 4
166
167
  }
167
168
  }
169
+ export declare namespace Systems {
170
+ /**
171
+ * @description Indicates special handling for any thirdparty platform
172
+ * NOTE: We may remove this soon, as it's deceptive implying these are the only platforms we support.
173
+ */
174
+ enum EThirdPartyPlatform {
175
+ NONE = 0,
176
+ UNREAL = 1,
177
+ UNITY = 2
178
+ }
179
+ }
168
180
  export declare namespace Systems {
169
181
  /**
170
182
  * @description Code to indicate the result of a request.
@@ -337,6 +349,27 @@ export declare namespace Multiplayer {
337
349
  Disconnected = 3
338
350
  }
339
351
  }
352
+ export declare namespace Multiplayer {
353
+ /**
354
+ * @description Enum used to specify the SignalR method to invoke in the multiplayer connection.
355
+ */
356
+ enum MultiplayerHubMethod {
357
+ DELETE_OBJECTS = 0,
358
+ GENERATE_OBJECT_IDS = 1,
359
+ GET_CLIENT_ID = 2,
360
+ PAGE_SCOPED_OBJECTS = 3,
361
+ RESET_SCOPES = 4,
362
+ SEND_EVENT_MESSAGE = 5,
363
+ SEND_OBJECT_MESSAGE = 6,
364
+ SEND_OBJECT_NOT_FOUND = 7,
365
+ SEND_OBJECT_PATCH = 8,
366
+ SEND_OBJECT_PATCHES = 9,
367
+ SET_ALLOW_SELF_MESSAGING = 10,
368
+ SET_SCOPES = 11,
369
+ START_LISTENING = 12,
370
+ STOP_LISTENING = 13
371
+ }
372
+ }
340
373
  export declare namespace Multiplayer {
341
374
  /**
342
375
  * @description Enum representing the type of a replicated value.
@@ -1237,16 +1270,6 @@ export declare namespace Systems {
1237
1270
  SPACE = 1
1238
1271
  }
1239
1272
  }
1240
- export declare namespace Systems {
1241
- enum ELoginState {
1242
- LoginThirdPartyProviderDetailsRequested = 0,
1243
- LoginRequested = 1,
1244
- LoggedIn = 2,
1245
- LogoutRequested = 3,
1246
- LoggedOut = 4,
1247
- Error = 5
1248
- }
1249
- }
1250
1273
  export declare namespace Systems {
1251
1274
  /**
1252
1275
  * @description FDN supported Authentication Providers, the ones that can be used are the ones above Num
@@ -1490,6 +1513,31 @@ export declare namespace Systems {
1490
1513
  setMimeType: (mimeType: string) => void;
1491
1514
  }
1492
1515
  }
1516
+ /**
1517
+ * @description Represents definition for identifying and versioning an external service endpoint..
1518
+ */
1519
+ export declare class ServiceDefinition extends NativeClassWrapper implements INativeResource {
1520
+ /** @internal */
1521
+ constructor(pointer: NativePointer);
1522
+ static create(): ServiceDefinition;
1523
+ static create_uRI_version(uRI: string, version: number): ServiceDefinition;
1524
+ /**
1525
+ * @description Gets the URI for the service endpoint.
1526
+ * @return URI of the service endpoint.
1527
+ */
1528
+ getURI(): string;
1529
+ /**
1530
+ * @description Sets the URI for the service endpoint.
1531
+ * @param inURI - URI for service endpoint.
1532
+ */
1533
+ setURI(uRI: string): void;
1534
+ /**
1535
+ * @description Gets the current version of the service endpoint.
1536
+ * @return Representing the current version of the service endpoint.
1537
+ */
1538
+ getVersion(): number;
1539
+ delete(): void;
1540
+ }
1493
1541
  /**
1494
1542
  * @description Holds supported endpoint uris used by Foundation.
1495
1543
  */
@@ -1498,20 +1546,20 @@ export declare class EndpointURIs extends NativeClassWrapper implements INativeR
1498
1546
  constructor(pointer: NativePointer);
1499
1547
  static create(): EndpointURIs;
1500
1548
  delete(): void;
1501
- get userServiceURI(): string;
1502
- set userServiceURI(value: string);
1503
- get prototypeServiceURI(): string;
1504
- set prototypeServiceURI(value: string);
1505
- get spatialDataServiceURI(): string;
1506
- set spatialDataServiceURI(value: string);
1507
- get multiplayerServiceURI(): string;
1508
- set multiplayerServiceURI(value: string);
1509
- get aggregationServiceURI(): string;
1510
- set aggregationServiceURI(value: string);
1511
- get trackingServiceURI(): string;
1512
- set trackingServiceURI(value: string);
1513
- get maintenanceWindowURI(): string;
1514
- set maintenanceWindowURI(value: string);
1549
+ get userService(): ServiceDefinition;
1550
+ set userService(value: ServiceDefinition);
1551
+ get prototypeService(): ServiceDefinition;
1552
+ set prototypeService(value: ServiceDefinition);
1553
+ get spatialDataService(): ServiceDefinition;
1554
+ set spatialDataService(value: ServiceDefinition);
1555
+ get multiplayerService(): ServiceDefinition;
1556
+ set multiplayerService(value: ServiceDefinition);
1557
+ get aggregationService(): ServiceDefinition;
1558
+ set aggregationService(value: ServiceDefinition);
1559
+ get trackingService(): ServiceDefinition;
1560
+ set trackingService(value: ServiceDefinition);
1561
+ get maintenanceWindow(): ServiceDefinition;
1562
+ set maintenanceWindow(value: ServiceDefinition);
1515
1563
  }
1516
1564
  /**
1517
1565
  * @description Holds client data used in requests for all Magnopus Serives.
@@ -1651,6 +1699,33 @@ export declare namespace Common {
1651
1699
  static dummy(): Common.CancellationToken;
1652
1700
  }
1653
1701
  }
1702
+ export declare namespace Common {
1703
+ /**
1704
+ * @description Data structure representing the user login state, including detection of access token expiry
1705
+ */
1706
+ class LoginState extends NativeClassWrapper implements INativeResource {
1707
+ /** @internal */
1708
+ constructor(pointer: NativePointer);
1709
+ static create(): LoginState;
1710
+ delete(): void;
1711
+ static create_otherState(otherState: Common.LoginState): LoginState;
1712
+ /**
1713
+ * @description Check if the access token for the login is expired.
1714
+ * @return Is the token expired.
1715
+ */
1716
+ refreshNeeded(): boolean;
1717
+ get state(): Common.ELoginState;
1718
+ set state(value: Common.ELoginState);
1719
+ get accessToken(): string;
1720
+ set accessToken(value: string);
1721
+ get refreshToken(): string;
1722
+ set refreshToken(value: string);
1723
+ get userId(): string;
1724
+ set userId(value: string);
1725
+ get deviceId(): string;
1726
+ set deviceId(value: string);
1727
+ }
1728
+ }
1654
1729
  export declare namespace Common {
1655
1730
  /**
1656
1731
  * @description Holds all valid mime types.
@@ -3493,6 +3568,27 @@ export declare namespace Common {
3493
3568
  set w(value: number);
3494
3569
  }
3495
3570
  }
3571
+ export declare namespace Common {
3572
+ class InvalidInterfaceUseError extends NativeClassWrapper implements INativeResource {
3573
+ /** @internal */
3574
+ constructor(pointer: NativePointer);
3575
+ static create_msg(msg: string): InvalidInterfaceUseError;
3576
+ delete(): void;
3577
+ get msg(): string;
3578
+ set msg(value: string);
3579
+ }
3580
+ }
3581
+ export declare namespace Common {
3582
+ class IJSScriptRunner extends NativeClassWrapper implements INativeResource {
3583
+ /** @internal */
3584
+ constructor(pointer: NativePointer);
3585
+ /**
3586
+ * @description Virtual destructor.
3587
+ */
3588
+ delete(): void;
3589
+ runScript(contextId: bigint, scriptText: string): boolean;
3590
+ }
3591
+ }
3496
3592
  export declare namespace Common {
3497
3593
  class IRealtimeEngine extends NativeClassWrapper implements INativeResource {
3498
3594
  /** @internal */
@@ -4138,7 +4234,7 @@ export declare namespace Multiplayer {
4138
4234
  /**
4139
4235
  * @description Creates a SpaceEntity instance using the space entity system provided.
4140
4236
  */
4141
- static create_entitySystem_logSystem(entitySystem: Multiplayer.SpaceEntitySystem, logSystem: Common.LogSystem): SpaceEntity;
4237
+ static create_entitySystem_scriptRunner_logSystem(entitySystem: Multiplayer.SpaceEntitySystem, scriptRunner: Common.IJSScriptRunner, logSystem: Common.LogSystem): SpaceEntity;
4142
4238
  /**
4143
4239
  * @description Destroys the SpaceEntity instance.
4144
4240
  */
@@ -4417,7 +4513,7 @@ export declare namespace Multiplayer {
4417
4513
  * @param callback - EntityCreatedCallback A callback that executes when the creation is complete,
4418
4514
  * which contains a pointer to the new SpaceEntity so that it can be used on the local client.
4419
4515
  */
4420
- createAvatar(name: string, spaceTransform: Multiplayer.SpaceTransform, isVisible: boolean, state: Multiplayer.AvatarState, avatarId: string, avatarPlayMode: Multiplayer.AvatarPlayMode): Promise<Multiplayer.SpaceEntity>;
4516
+ createAvatar(name: string, loginState: Common.LoginState, spaceTransform: Multiplayer.SpaceTransform, isVisible: boolean, state: Multiplayer.AvatarState, avatarId: string, avatarPlayMode: Multiplayer.AvatarPlayMode): Promise<Multiplayer.SpaceEntity>;
4421
4517
  /**
4422
4518
  * @description Creates a SpaceEntity of type Object, and relevant default values.
4423
4519
  * @param inName - The name to give the new SpaceEntity.
@@ -5756,37 +5852,6 @@ export declare namespace Systems {
5756
5852
  set period(value: Systems.PeriodEnum);
5757
5853
  }
5758
5854
  }
5759
- export declare namespace Systems {
5760
- /**
5761
- * @description A JavaScript based scripting system that can be used to create advanced behaviours and interactions between entities in spaces.
5762
- */
5763
- class ScriptSystem extends NativeClassWrapper {
5764
- /** @internal */
5765
- constructor(pointer: NativePointer);
5766
- /**
5767
- * @description Starts up the JavaScript runtime context.
5768
- */
5769
- initialise(): void;
5770
- /**
5771
- * @description Shuts down and deletes the JavaScript runtime context.
5772
- */
5773
- shutdown(): void;
5774
- /**
5775
- * @description Attempts to execute a script in a given context.
5776
- * @param contextId - The context in which to run the script. If the provided context does not exist, the script run will fail.
5777
- * @param scriptText - The script to execute.
5778
- * @return A boolean representing success running the script.
5779
- */
5780
- runScript(contextId: bigint, scriptText: string): boolean;
5781
- /**
5782
- * @description Attempts to execute a script from a given file path in the given context.
5783
- * @param contextId - The context in which to run the script. If the provided context does not exist, the script run will fail.
5784
- * @param scriptFilePath - The file path of the script to execute.
5785
- * @return A boolean representing success running the script.
5786
- */
5787
- runScriptFile(contextId: bigint, scriptFilePath: string): boolean;
5788
- }
5789
- }
5790
5855
  export declare namespace Systems {
5791
5856
  /**
5792
5857
  @ingroup Sequence System
@@ -6102,33 +6167,6 @@ export declare namespace Systems {
6102
6167
  set w(value: number);
6103
6168
  }
6104
6169
  }
6105
- export declare namespace Systems {
6106
- /**
6107
- * @description Data structure representing the user login state, including detection of access token expiry
6108
- */
6109
- class LoginState extends NativeClassWrapper implements INativeResource {
6110
- /** @internal */
6111
- constructor(pointer: NativePointer);
6112
- static create(): LoginState;
6113
- delete(): void;
6114
- static create_otherState(otherState: Systems.LoginState): LoginState;
6115
- /**
6116
- * @description Check if the access token for the login is expired.
6117
- * @return Is the token expired.
6118
- */
6119
- refreshNeeded(): boolean;
6120
- get state(): Systems.ELoginState;
6121
- set state(value: Systems.ELoginState);
6122
- get accessToken(): string;
6123
- set accessToken(value: string);
6124
- get refreshToken(): string;
6125
- set refreshToken(value: string);
6126
- get userId(): string;
6127
- set userId(value: string);
6128
- get deviceId(): string;
6129
- set deviceId(value: string);
6130
- }
6131
- }
6132
6170
  export declare namespace Systems {
6133
6171
  /**
6134
6172
  * @description Data for access and refresh tokens, and their expiry times.
@@ -10641,10 +10679,11 @@ export declare namespace Systems {
10641
10679
  /**
10642
10680
  * @description This will delete any groups which only contain this item
10643
10681
  * For any groups which contanin the given item and additional items, it will just update the group by removing the given item.
10644
- * @param itemName - An item to update all sequences containing.
10682
+ * @param itemID - An item to update all sequences containing. Can be retrieved from a HotspotSpaceComponent via
10683
+ * HotspotSpaceComponent::GetUniqueComponentId
10645
10684
  * @param callback - Callback to call when a response is received
10646
10685
  */
10647
- removeItemFromGroups(itemName: string): Promise<Systems.NullResult>;
10686
+ removeItemFromGroups(itemID: string): Promise<Systems.NullResult>;
10648
10687
  /**
10649
10688
  * @description Sets a callback to be fired when a hotspot sequence is changed.
10650
10689
  * @param callback - Callback to receive data for the hotspot sequence that has been changed.
@@ -10855,6 +10894,38 @@ export declare namespace Systems {
10855
10894
  getTierFeaturesQuota(tierName: Systems.TierNames): Promise<Systems.FeaturesQuotaResult>;
10856
10895
  }
10857
10896
  }
10897
+ export declare namespace Systems {
10898
+ /**
10899
+ * @description A JavaScript based scripting system that can be used to create advanced behaviours and interactions between entities in spaces.
10900
+ */
10901
+ class ScriptSystem extends Common.IJSScriptRunner {
10902
+ /** @internal */
10903
+ constructor(pointer: NativePointer);
10904
+ static fromIJSScriptRunner(baseInstance: Common.IJSScriptRunner): Systems.ScriptSystem;
10905
+ /**
10906
+ * @description Starts up the JavaScript runtime context.
10907
+ */
10908
+ initialise(): void;
10909
+ /**
10910
+ * @description Shuts down and deletes the JavaScript runtime context.
10911
+ */
10912
+ shutdown(): void;
10913
+ /**
10914
+ * @description Attempts to execute a script in a given context.
10915
+ * @param contextId - The context in which to run the script. If the provided context does not exist, the script run will fail.
10916
+ * @param scriptText - The script to execute.
10917
+ * @return A boolean representing success running the script.
10918
+ */
10919
+ runScript(contextId: bigint, scriptText: string): boolean;
10920
+ /**
10921
+ * @description Attempts to execute a script from a given file path in the given context.
10922
+ * @param contextId - The context in which to run the script. If the provided context does not exist, the script run will fail.
10923
+ * @param scriptFilePath - The file path of the script to execute.
10924
+ * @return A boolean representing success running the script.
10925
+ */
10926
+ runScriptFile(contextId: bigint, scriptFilePath: string): boolean;
10927
+ }
10928
+ }
10858
10929
  export declare namespace Systems {
10859
10930
  /**
10860
10931
  @ingroup Sequence System
@@ -11861,7 +11932,7 @@ export declare namespace Systems {
11861
11932
  /** @internal */
11862
11933
  constructor(pointer: NativePointer);
11863
11934
  static fromResultBase(baseInstance: Systems.ResultBase): Systems.LoginStateResult;
11864
- getLoginState(): Systems.LoginState;
11935
+ getLoginState(): Common.LoginState;
11865
11936
  delete(): void;
11866
11937
  }
11867
11938
  }
@@ -11958,7 +12029,7 @@ export declare namespace Systems {
11958
12029
  * @description Get the current login state.
11959
12030
  * @return Current login state
11960
12031
  */
11961
- getLoginState(): Systems.LoginState;
12032
+ getLoginState(): Common.LoginState;
11962
12033
  /**
11963
12034
  * @description Sets a callback that will get fired when the login token has changed as a result of logging in with credentials or with a token or
11964
12035
  * after the Connected Spaces Platform internal system has refreshed the session.