connected-spaces-platform.web 5.10.0 → 5.12.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.
@@ -1762,6 +1762,12 @@ export declare class CSPFoundation {
1762
1762
  * @return The EndpointURIs class with current endpoint data
1763
1763
  */
1764
1764
  static getEndpoints(): EndpointURIs;
1765
+ /**
1766
+ * @description Create an EndpointsURIs object containing URIs to the various services needed by CSP.
1767
+ * @param endpointRootURI - URI to the root of the cloud services.
1768
+ * @return EndpointURIs class with deduced endpoint URIs.
1769
+ */
1770
+ static createEndpointsFromRoot(endpointRootURI: string): EndpointURIs;
1765
1771
  /**
1766
1772
  * @description Sets a class containing all relevant Client info currently set for Foundation.
1767
1773
  * Used internally to generate ClientUserAgentString.
@@ -4575,13 +4581,6 @@ export declare namespace Multiplayer {
4575
4581
  * @return The id of the leader.
4576
4582
  */
4577
4583
  getLeaderId(): bigint;
4578
- /**
4579
- * @description Finds a component by the given id.
4580
- * /// Searchs through all components of all entites so should be used sparingly.
4581
- * /// @param Id The id of the component to find.
4582
- * @return A pointer to the found component which can be nullptr if the component is not found.
4583
- */
4584
- findComponentById(id: number): Multiplayer.ComponentBase;
4585
4584
  /**
4586
4585
  * @description Retrieve the state of the patch rate limiter. If true, patches are limited for each individual entity to a fixed rate.
4587
4586
  * @return True if enabled, false otherwise.
@@ -6139,6 +6138,25 @@ export declare namespace Systems {
6139
6138
  set shareScreen(value: boolean);
6140
6139
  }
6141
6140
  }
6141
+ export declare namespace Systems {
6142
+ /**
6143
+ * @description Data structure for a custom service proxy posting, giving service name, operation name, set help and parameters
6144
+ */
6145
+ class TokenInfoParams extends NativeClassWrapper implements INativeResource {
6146
+ /** @internal */
6147
+ constructor(pointer: NativePointer);
6148
+ static create(): TokenInfoParams;
6149
+ delete(): void;
6150
+ get serviceName(): string;
6151
+ set serviceName(value: string);
6152
+ get operationName(): string;
6153
+ set operationName(value: string);
6154
+ get setHelp(): boolean;
6155
+ set setHelp(value: boolean);
6156
+ get parameters(): Common.Map<string, string>;
6157
+ set parameters(value: Common.Map<string, string>);
6158
+ }
6159
+ }
6142
6160
  export declare namespace Systems {
6143
6161
  /**
6144
6162
  * @description A basic class abstraction for a user profile, including User Id and name, a display name, avatar information
@@ -6157,8 +6175,6 @@ export declare namespace Systems {
6157
6175
  set displayName(value: string);
6158
6176
  get avatarId(): string;
6159
6177
  set avatarId(value: string);
6160
- get lastPlatform(): string;
6161
- set lastPlatform(value: string);
6162
6178
  }
6163
6179
  }
6164
6180
  export declare namespace Systems {
@@ -9032,14 +9048,6 @@ export declare namespace Multiplayer {
9032
9048
  * @param value - The type of video source used by this component.
9033
9049
  */
9034
9050
  setVideoPlayerSourceType(value: Multiplayer.VideoPlayerSourceType): void;
9035
- /**
9036
- * @description Gets the Id of the mesh component that the video should be rendered to
9037
- */
9038
- getMeshComponentId(): number;
9039
- /**
9040
- * @description Sets the Id of the mesh component that the video should be rendered to
9041
- */
9042
- setMeshComponentId(id: number): void;
9043
9051
  /**
9044
9052
  * \addtogroup IVisibleComponent
9045
9053
  @{
@@ -11712,6 +11720,8 @@ export declare namespace Systems {
11712
11720
  * @param password - Csp::common::string
11713
11721
  * @param userHasVerifiedAge - An optional bool to specify whether or not the user has verified that they are over 18
11714
11722
  * @param callback - Callback to call when a response is received
11723
+ @pre One of either UserName or Email must not be empty.
11724
+ @pre Password must not be empty.
11715
11725
  */
11716
11726
  login(userName: string, email: string, password: string, userHasVerifiedAge: boolean | null): Promise<Systems.LoginStateResult>;
11717
11727
  /**
@@ -11720,6 +11730,7 @@ export declare namespace Systems {
11720
11730
  * @param userId - User ID for the previous session
11721
11731
  * @param refreshToken - Refresh token to be used for refreshing the authentication token
11722
11732
  * @param callback - Callback when asynchronous task finishes
11733
+ @pre UserId must not be empty.
11723
11734
  */
11724
11735
  loginWithRefreshToken(userId: string, refreshToken: string): Promise<Systems.LoginStateResult>;
11725
11736
  /**
@@ -11845,6 +11856,12 @@ export declare namespace Systems {
11845
11856
  * @param callback - Callback to call when a response is received
11846
11857
  */
11847
11858
  getAgoraUserToken(params: Systems.AgoraUserTokenParams): Promise<Systems.StringResult>;
11859
+ /**
11860
+ * @description Post Service Proxy to perform specified operation of specified service
11861
+ * @param params - Params to specify service, operation, set help and parameters
11862
+ * @param callback - Callback to call when a response is received
11863
+ */
11864
+ postServiceProxy(params: Systems.TokenInfoParams): Promise<Systems.StringResult>;
11848
11865
  /**
11849
11866
  * @description Re-send user verification email
11850
11867
  * @param inEmail - User's email address
@@ -992,6 +992,11 @@ function csp_systems_AgoraUserTokenParamsFactory(nativePointer) {
992
992
  }
993
993
  ProxyClassFactories["csp_systems_AgoraUserTokenParams"] =
994
994
  csp_systems_AgoraUserTokenParamsFactory;
995
+ function csp_systems_TokenInfoParamsFactory(nativePointer) {
996
+ return new Systems.TokenInfoParams(nativePointer);
997
+ }
998
+ ProxyClassFactories["csp_systems_TokenInfoParams"] =
999
+ csp_systems_TokenInfoParamsFactory;
995
1000
  function csp_systems_BasicProfileFactory(nativePointer) {
996
1001
  return new Systems.BasicProfile(nativePointer);
997
1002
  }
@@ -3224,6 +3229,18 @@ export class CSPFoundation {
3224
3229
  Module._free(_ret);
3225
3230
  return _nPtr;
3226
3231
  }
3232
+ /**
3233
+ * @description Create an EndpointsURIs object containing URIs to the various services needed by CSP.
3234
+ * @param endpointRootURI - URI to the root of the cloud services.
3235
+ * @return EndpointURIs class with deduced endpoint URIs.
3236
+ */
3237
+ static createEndpointsFromRoot(endpointRootURI) {
3238
+ var _ret = Module._malloc(8);
3239
+ Module.ccall("csp_CSPFoundation_CreateEndpointsFromRoot_EndpointURIs_StringRC", "void", ["number", "string"], [_ret, endpointRootURI]);
3240
+ var _nPtr = new EndpointURIs(getNativePointer(_ret));
3241
+ Module._free(_ret);
3242
+ return _nPtr;
3243
+ }
3227
3244
  /**
3228
3245
  * @description Sets a class containing all relevant Client info currently set for Foundation.
3229
3246
  * Used internally to generate ClientUserAgentString.
@@ -11096,22 +11113,6 @@ export class CSPFoundation {
11096
11113
  _result = _fixedValue;
11097
11114
  return _result;
11098
11115
  }
11099
- /**
11100
- * @description Finds a component by the given id.
11101
- * /// Searchs through all components of all entites so should be used sparingly.
11102
- * /// @param Id The id of the component to find.
11103
- * @return A pointer to the found component which can be nullptr if the component is not found.
11104
- */
11105
- findComponentById(id) {
11106
- assert(Number.isInteger(id));
11107
- assert(id >= Limits.UINT16_MIN);
11108
- assert(id <= Limits.UINT16_MAX);
11109
- var _ret = Module._malloc(8);
11110
- Module.ccall("csp_multiplayer_SpaceEntitySystem_FindComponentById_ComponentBaseP_uint16_t", "void", ["number", "number", "number"], [_ret, this.pointer, id]);
11111
- var _nPtr = new Multiplayer.ComponentBase(getNativePointer(_ret));
11112
- Module._free(_ret);
11113
- return _nPtr;
11114
- }
11115
11116
  /**
11116
11117
  * @description Retrieve the state of the patch rate limiter. If true, patches are limited for each individual entity to a fixed rate.
11117
11118
  * @return True if enabled, false otherwise.
@@ -14909,6 +14910,60 @@ export class CSPFoundation {
14909
14910
  }
14910
14911
  Systems.AgoraUserTokenParams = AgoraUserTokenParams;
14911
14912
  })(Systems || (Systems = {}));
14913
+ (function (Systems) {
14914
+ /**
14915
+ * @description Data structure for a custom service proxy posting, giving service name, operation name, set help and parameters
14916
+ */
14917
+ class TokenInfoParams extends NativeClassWrapper {
14918
+ /** @internal */
14919
+ constructor(pointer) {
14920
+ super(pointer);
14921
+ }
14922
+ static create() {
14923
+ var _ptr = Module._malloc(8);
14924
+ Module.ccall("csp_systems_TokenInfoParams_Ctor", "void", ["number"], [_ptr]);
14925
+ var _nPtr = getNativePointer(_ptr);
14926
+ return new TokenInfoParams(_nPtr);
14927
+ }
14928
+ delete() {
14929
+ if (this.ownsPointer && !this.disposed) {
14930
+ Module.ccall("csp_systems_TokenInfoParams_Dtor", "void", ["number"], [this.pointer]);
14931
+ this.disposed = true;
14932
+ }
14933
+ }
14934
+ get serviceName() {
14935
+ let _result = Module.ccall("csp_systems_TokenInfoParams__Get_ServiceName", "string", ["number"], [this.pointer]);
14936
+ return _result;
14937
+ }
14938
+ set serviceName(value) {
14939
+ Module.ccall("csp_systems_TokenInfoParams__Set_ServiceName", "void", ["number", "string"], [this.pointer, value]);
14940
+ }
14941
+ get operationName() {
14942
+ let _result = Module.ccall("csp_systems_TokenInfoParams__Get_OperationName", "string", ["number"], [this.pointer]);
14943
+ return _result;
14944
+ }
14945
+ set operationName(value) {
14946
+ Module.ccall("csp_systems_TokenInfoParams__Set_OperationName", "void", ["number", "string"], [this.pointer, value]);
14947
+ }
14948
+ get setHelp() {
14949
+ let _result = Module.ccall("csp_systems_TokenInfoParams__Get_SetHelp", "boolean", ["number"], [this.pointer]);
14950
+ return _result;
14951
+ }
14952
+ set setHelp(value) {
14953
+ Module.ccall("csp_systems_TokenInfoParams__Set_SetHelp", "void", ["number", "boolean"], [this.pointer, value]);
14954
+ }
14955
+ get parameters() {
14956
+ const _ptr = Module._malloc(8);
14957
+ Module.ccall("csp_systems_TokenInfoParams__Get_Parameters", "void", ["number", "number"], [_ptr, this.pointer]);
14958
+ const _nPtr = getNativePointer(_ptr);
14959
+ return new Common.Map(_nPtr, StringFactory, "String", StringFactory, "String");
14960
+ }
14961
+ set parameters(value) {
14962
+ Module.ccall("csp_systems_TokenInfoParams__Set_Parameters", "void", ["number", "number"], [this.pointer, value.pointer]);
14963
+ }
14964
+ }
14965
+ Systems.TokenInfoParams = TokenInfoParams;
14966
+ })(Systems || (Systems = {}));
14912
14967
  (function (Systems) {
14913
14968
  /**
14914
14969
  * @description A basic class abstraction for a user profile, including User Id and name, a display name, avatar information
@@ -14959,13 +15014,6 @@ export class CSPFoundation {
14959
15014
  set avatarId(value) {
14960
15015
  Module.ccall("csp_systems_BasicProfile__Set_AvatarId", "void", ["number", "string"], [this.pointer, value]);
14961
15016
  }
14962
- get lastPlatform() {
14963
- let _result = Module.ccall("csp_systems_BasicProfile__Get_LastPlatform", "string", ["number"], [this.pointer]);
14964
- return _result;
14965
- }
14966
- set lastPlatform(value) {
14967
- Module.ccall("csp_systems_BasicProfile__Set_LastPlatform", "void", ["number", "string"], [this.pointer, value]);
14968
- }
14969
15017
  }
14970
15018
  Systems.BasicProfile = BasicProfile;
14971
15019
  })(Systems || (Systems = {}));
@@ -20033,25 +20081,6 @@ export class CSPFoundation {
20033
20081
  setVideoPlayerSourceType(value) {
20034
20082
  Module.ccall("csp_multiplayer_VideoPlayerSpaceComponent_SetVideoPlayerSourceType_void_VideoPlayerSourceType", "void", ["number", "number"], [this.pointer, value]);
20035
20083
  }
20036
- /**
20037
- * @description Gets the Id of the mesh component that the video should be rendered to
20038
- */
20039
- getMeshComponentId() {
20040
- let _result = Module.ccall("csp_multiplayer_VideoPlayerSpaceComponent_GetMeshComponentIdC_uint16_t", "number", ["number"], [this.pointer]);
20041
- const _unfixedValue = _result;
20042
- let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2 ** 16 : _unfixedValue;
20043
- _result = _fixedValue;
20044
- return _result;
20045
- }
20046
- /**
20047
- * @description Sets the Id of the mesh component that the video should be rendered to
20048
- */
20049
- setMeshComponentId(id) {
20050
- assert(Number.isInteger(id));
20051
- assert(id >= Limits.UINT16_MIN);
20052
- assert(id <= Limits.UINT16_MAX);
20053
- Module.ccall("csp_multiplayer_VideoPlayerSpaceComponent_SetMeshComponentId_void_uint16_t", "void", ["number", "number"], [this.pointer, id]);
20054
- }
20055
20084
  /**
20056
20085
  * \addtogroup IVisibleComponent
20057
20086
  @{
@@ -27628,6 +27657,8 @@ export class CSPFoundation {
27628
27657
  * @param password - Csp::common::string
27629
27658
  * @param userHasVerifiedAge - An optional bool to specify whether or not the user has verified that they are over 18
27630
27659
  * @param callback - Callback to call when a response is received
27660
+ @pre One of either UserName or Email must not be empty.
27661
+ @pre Password must not be empty.
27631
27662
  */
27632
27663
  async login(userName, email, password, userHasVerifiedAge) {
27633
27664
  var _resolve;
@@ -27670,6 +27701,7 @@ export class CSPFoundation {
27670
27701
  * @param userId - User ID for the previous session
27671
27702
  * @param refreshToken - Refresh token to be used for refreshing the authentication token
27672
27703
  * @param callback - Callback when asynchronous task finishes
27704
+ @pre UserId must not be empty.
27673
27705
  */
27674
27706
  async loginWithRefreshToken(userId, refreshToken) {
27675
27707
  var _resolve;
@@ -28162,6 +28194,30 @@ export class CSPFoundation {
28162
28194
  Module.ccall("csp_systems_UserSystem_GetAgoraUserToken_void_AgoraUserTokenParamsRC_StringResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, params.pointer, _callbackPtr, 0]);
28163
28195
  return _promise;
28164
28196
  }
28197
+ /**
28198
+ * @description Post Service Proxy to perform specified operation of specified service
28199
+ * @param params - Params to specify service, operation, set help and parameters
28200
+ * @param callback - Callback to call when a response is received
28201
+ */
28202
+ async postServiceProxy(params) {
28203
+ var _resolve;
28204
+ var _promise = new Promise((_r) => {
28205
+ _resolve = _r;
28206
+ });
28207
+ var _callbackPtr;
28208
+ var _callback = (_stateObject__, result) => {
28209
+ var _resultPtr = getNativePointer(result);
28210
+ var _resultInstance = new Systems.StringResult(_resultPtr);
28211
+ if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
28212
+ return;
28213
+ }
28214
+ _resolve(_resultInstance);
28215
+ Module.removeFunction(_callbackPtr);
28216
+ };
28217
+ _callbackPtr = Module.addFunction(_callback, "vii");
28218
+ Module.ccall("csp_systems_UserSystem_PostServiceProxy_void_TokenInfoParamsRC_StringResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, params.pointer, _callbackPtr, 0]);
28219
+ return _promise;
28220
+ }
28165
28221
  /**
28166
28222
  * @description Re-send user verification email
28167
28223
  * @param inEmail - User's email address