connected-spaces-platform.web 6.3.0 → 6.4.1
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.
- package/Debug/ConnectedSpacesPlatform_WASM.js +23 -9
- package/Debug/ConnectedSpacesPlatform_WASM.wasm +0 -0
- package/Debug/ConnectedSpacesPlatform_WASM.wasm.debug.wasm +0 -0
- package/README.md +1 -1
- package/Release/ConnectedSpacesPlatform_WASM.js +1 -1
- package/Release/ConnectedSpacesPlatform_WASM.wasm +0 -0
- package/connectedspacesplatform.d.ts +75 -15
- package/connectedspacesplatform.js +166 -19
- package/connectedspacesplatform.js.map +1 -1
- package/connectedspacesplatform.ts +262 -25
- package/package.json +1 -1
|
Binary file
|
|
@@ -4151,9 +4151,12 @@ export declare namespace Multiplayer {
|
|
|
4151
4151
|
constructor(pointer: NativePointer);
|
|
4152
4152
|
/**
|
|
4153
4153
|
* @description Constructor for CSPSceneDescription by deserializing a SceneDescription json file.
|
|
4154
|
-
* @param sceneDescriptionJson - The SceneDescription to
|
|
4154
|
+
* @param sceneDescriptionJson - The SceneDescription to parse.
|
|
4155
|
+
@warning The expression of this interface as a list is a wrapper generator workaround, so
|
|
4156
|
+
* whilst you may split your string into many elements, it is not advisable. You should prefer
|
|
4157
|
+
* inserting your entire string as the first, single, and only element of the list.
|
|
4155
4158
|
*/
|
|
4156
|
-
static create_sceneDescriptionJson(sceneDescriptionJson: string): CSPSceneDescription;
|
|
4159
|
+
static create_sceneDescriptionJson(sceneDescriptionJson: Common.List<string>): CSPSceneDescription;
|
|
4157
4160
|
static create(): CSPSceneDescription;
|
|
4158
4161
|
delete(): void;
|
|
4159
4162
|
}
|
|
@@ -4821,9 +4824,12 @@ export declare namespace Systems {
|
|
|
4821
4824
|
constructor(pointer: NativePointer);
|
|
4822
4825
|
/**
|
|
4823
4826
|
* @description Constructor for CSPSceneData by deserializing a SceneDescription json file.
|
|
4824
|
-
* @param sceneDescriptionJson - The SceneDescription to
|
|
4827
|
+
* @param sceneDescriptionJson - The SceneDescription to parse.
|
|
4828
|
+
@warning The expression of this interface as a list is a wrapper generator workaround, so
|
|
4829
|
+
* whilst you may split your string into many elements, it is not advisable. You should prefer
|
|
4830
|
+
* inserting your entire string as the first, single, and only element of the list.
|
|
4825
4831
|
*/
|
|
4826
|
-
static create_sceneDescriptionJson(sceneDescriptionJson: string): CSPSceneData;
|
|
4832
|
+
static create_sceneDescriptionJson(sceneDescriptionJson: Common.List<string>): CSPSceneData;
|
|
4827
4833
|
delete(): void;
|
|
4828
4834
|
get space(): Systems.Space;
|
|
4829
4835
|
set space(value: Systems.Space);
|
|
@@ -5004,6 +5010,11 @@ export declare namespace Systems {
|
|
|
5004
5010
|
* @return Pointer to the hotspotsequencesystem system class
|
|
5005
5011
|
*/
|
|
5006
5012
|
getHotspotSequenceSystem(): Systems.HotspotSequenceSystem;
|
|
5013
|
+
/**
|
|
5014
|
+
* @description Retrieves the AnalyticsSystem system.
|
|
5015
|
+
* @return Pointer to the analyticssystem system class
|
|
5016
|
+
*/
|
|
5017
|
+
getAnalyticsSystem(): Systems.AnalyticsSystem;
|
|
5007
5018
|
getMultiplayerConnection(): Multiplayer.MultiplayerConnection;
|
|
5008
5019
|
getEventBus(): Multiplayer.NetworkEventBus;
|
|
5009
5020
|
}
|
|
@@ -6146,6 +6157,19 @@ export declare namespace Systems {
|
|
|
6146
6157
|
set parameters(value: Common.Map<string, string>);
|
|
6147
6158
|
}
|
|
6148
6159
|
}
|
|
6160
|
+
export declare namespace Systems {
|
|
6161
|
+
/**
|
|
6162
|
+
* @description Data structure for overrides to the default token options
|
|
6163
|
+
*/
|
|
6164
|
+
class TokenOptions extends NativeClassWrapper implements INativeResource {
|
|
6165
|
+
/** @internal */
|
|
6166
|
+
constructor(pointer: NativePointer);
|
|
6167
|
+
static create(): TokenOptions;
|
|
6168
|
+
delete(): void;
|
|
6169
|
+
get expiryLength(): string;
|
|
6170
|
+
set expiryLength(value: string);
|
|
6171
|
+
}
|
|
6172
|
+
}
|
|
6149
6173
|
export declare namespace Systems {
|
|
6150
6174
|
/**
|
|
6151
6175
|
* @description A basic class abstraction for a user profile, including User Id and name, a display name, avatar information
|
|
@@ -10094,6 +10118,18 @@ export declare namespace Systems {
|
|
|
10094
10118
|
delete(): void;
|
|
10095
10119
|
}
|
|
10096
10120
|
}
|
|
10121
|
+
export declare namespace Systems {
|
|
10122
|
+
/**
|
|
10123
|
+
@ingroup Analytics System
|
|
10124
|
+
* @description Public facing system that allows AnalyticsRecords to be sent to MCS.
|
|
10125
|
+
*/
|
|
10126
|
+
class AnalyticsSystem extends Systems.SystemBase {
|
|
10127
|
+
/** @internal */
|
|
10128
|
+
constructor(pointer: NativePointer);
|
|
10129
|
+
static fromSystemBase(baseInstance: Systems.SystemBase): Systems.AnalyticsSystem;
|
|
10130
|
+
sendAnalyticsEvent(productContextSection: string, category: string, interactionType: string, subCategory: string, metadata: Common.Map<string, string>, callback: (result: Systems.NullResult) => void): void;
|
|
10131
|
+
}
|
|
10132
|
+
}
|
|
10097
10133
|
export declare namespace Systems {
|
|
10098
10134
|
/**
|
|
10099
10135
|
@ingroup Asset System
|
|
@@ -12697,7 +12733,7 @@ export declare namespace Systems {
|
|
|
12697
12733
|
export declare namespace Systems {
|
|
12698
12734
|
/**
|
|
12699
12735
|
@ingroup User System
|
|
12700
|
-
* @description Public facing system that allows interfacing with Magnopus
|
|
12736
|
+
* @description Public facing system that allows interfacing with Magnopus Cloud Services' user service.
|
|
12701
12737
|
* Offers methods for creating accounts, authenticating, and retrieving user profiles.
|
|
12702
12738
|
*/
|
|
12703
12739
|
class UserSystem extends Systems.SystemBase {
|
|
@@ -12719,7 +12755,7 @@ export declare namespace Systems {
|
|
|
12719
12755
|
*/
|
|
12720
12756
|
setNewLoginTokenReceivedCallback(callback: (result: Systems.LoginTokenInfoResult) => void): void;
|
|
12721
12757
|
/**
|
|
12722
|
-
* @description Log in to Magnopus
|
|
12758
|
+
* @description Log in to Magnopus Cloud Services services using a username-password or email-password combination.
|
|
12723
12759
|
* @param userName - Csp::common::string
|
|
12724
12760
|
* @param email - Csp::common::string
|
|
12725
12761
|
* @param password - Csp::common::string
|
|
@@ -12727,11 +12763,14 @@ export declare namespace Systems {
|
|
|
12727
12763
|
* connection to backend services, and thus be unable to receive messages or events. This session will also be unable to enter online spaces via
|
|
12728
12764
|
* a csp::multiplayer::OnlineRealtimeEngine. If true, this session will receive events, and may enter both online and offline spaces.
|
|
12729
12765
|
* @param userHasVerifiedAge - An optional bool to specify whether or not the user has verified that they are over 18
|
|
12766
|
+
* @param tokenOptions - Optional override for default token options.
|
|
12767
|
+
* The default token expiry length is configured by MCS and defaults to 30 minutes. Value must be less than the default expiry length, or it will
|
|
12768
|
+
* be ignored.
|
|
12730
12769
|
* @param callback - Callback to call when a response is received
|
|
12731
12770
|
@pre One of either UserName or Email must not be empty.
|
|
12732
12771
|
@pre Password must not be empty.
|
|
12733
12772
|
*/
|
|
12734
|
-
login(userName: string, email: string, password: string, createMultiplayerConnection: boolean, userHasVerifiedAge: boolean | null): Promise<Systems.LoginStateResult>;
|
|
12773
|
+
login(userName: string, email: string, password: string, createMultiplayerConnection: boolean, userHasVerifiedAge: boolean | null, tokenOptions: Systems.TokenOptions | null): Promise<Systems.LoginStateResult>;
|
|
12735
12774
|
/**
|
|
12736
12775
|
* @description Resume a previous session for the associated user ID using a refresh token
|
|
12737
12776
|
* The refresh token can be obtained after registering a callback with `SetNewLoginTokenReceivedCallback` and logging in regularly.
|
|
@@ -12740,19 +12779,37 @@ export declare namespace Systems {
|
|
|
12740
12779
|
* @param createMultiplayerConnection - Whether to create a multiplayer connection. If false, this session will not establish a SignalR
|
|
12741
12780
|
* connection to backend services, and thus be unable to receive messages or events. This session will also be unable to enter online spaces via
|
|
12742
12781
|
* a csp::multiplayer::OnlineRealtimeEngine. If true, this session will receive events, and may enter both online and offline spaces.
|
|
12782
|
+
* @param tokenOptions - Optional override for default token options.
|
|
12783
|
+
* The default token expiry length is configured by MCS and defaults to 30 minutes. Value must be less than the default expiry length, or it will
|
|
12784
|
+
* be ignored.
|
|
12743
12785
|
* @param callback - Callback when asynchronous task finishes
|
|
12744
12786
|
@pre UserId must not be empty.
|
|
12745
12787
|
*/
|
|
12746
|
-
loginWithRefreshToken(userId: string, refreshToken: string, createMultiplayerConnection: boolean): Promise<Systems.LoginStateResult>;
|
|
12788
|
+
loginWithRefreshToken(userId: string, refreshToken: string, createMultiplayerConnection: boolean, tokenOptions: Systems.TokenOptions | null): Promise<Systems.LoginStateResult>;
|
|
12747
12789
|
/**
|
|
12748
|
-
* @description Log in to Magnopus
|
|
12790
|
+
* @description Log in to Magnopus Cloud Services as a guest.
|
|
12749
12791
|
* @param createMultiplayerConnection - Whether to create a multiplayer connection. If false, this session will not establish a SignalR
|
|
12750
12792
|
* connection to backend services, and thus be unable to receive messages or events. This session will also be unable to enter online spaces via
|
|
12751
12793
|
* a csp::multiplayer::OnlineRealtimeEngine. If true, this session will receive events, and may enter both online and offline spaces.
|
|
12752
12794
|
* @param userHasVerifiedAge - An optional bool to specify whether or not the user has verified that they are over 18
|
|
12795
|
+
* @param tokenOptions - Optional override for default token options.
|
|
12796
|
+
* The default token expiry length is configured by MCS and defaults to 30 minutes. Value must be less than the default expiry length, or it will
|
|
12797
|
+
* be ignored.
|
|
12798
|
+
* @param callback - Callback to call when a response is received
|
|
12799
|
+
*/
|
|
12800
|
+
loginAsGuest(createMultiplayerConnection: boolean, userHasVerifiedAge: boolean | null, tokenOptions: Systems.TokenOptions | null): Promise<Systems.LoginStateResult>;
|
|
12801
|
+
/**
|
|
12802
|
+
* @description Log in to Magnopus Cloud Services as a guest, allowing the backend to defer profile creation and perform other optimizations.
|
|
12803
|
+
* This login method is intended only for use with offline realtime engines, and as such does not start a multiplayer connection.
|
|
12804
|
+
@warning Unless you have a good reason, you should prefer the regular LoginAsGuest function. This method is designed for specific
|
|
12805
|
+
* non-multiplayer cases where the backend services are expecting a huge amount of anonymous profiles and wish to be allowed to buffer profile
|
|
12806
|
+
* creation. For this reason, there is an undefined delay after calling this function until the session can be thought to be conceptually "logged
|
|
12807
|
+
* in". Beware if you are calling user system methods after having logged in using this method. If you find yourself doing that, you may wish to
|
|
12808
|
+
* use the regular LoginAsGuest method instead.
|
|
12809
|
+
* @param userHasVerifiedAge - An optional bool to specify whether or not the user has verified that they are over 18
|
|
12753
12810
|
* @param callback - Callback to call when a response is received
|
|
12754
12811
|
*/
|
|
12755
|
-
|
|
12812
|
+
loginAsGuestWithDeferredProfileCreation(userHasVerifiedAge: boolean | null): Promise<Systems.LoginStateResult>;
|
|
12756
12813
|
/**
|
|
12757
12814
|
@ingroup Third Party Authentication
|
|
12758
12815
|
* @description As a Connected Spaces Platform user the 3rd party authentication flow consists of two steps, first calling
|
|
@@ -12781,11 +12838,14 @@ export declare namespace Systems {
|
|
|
12781
12838
|
* connection to backend services, and thus be unable to receive messages or events. This session will also be unable to enter online spaces via
|
|
12782
12839
|
* a csp::multiplayer::OnlineRealtimeEngine. If true, this session will receive events, and may enter both online and offline spaces.
|
|
12783
12840
|
* @param userHasVerifiedAge - An optional bool to specify whether or not the user has verified that they are over 18
|
|
12784
|
-
* @param
|
|
12841
|
+
* @param tokenOptions - Optional override for default token options.
|
|
12842
|
+
* The default token expiry length is configured by MCS and defaults to 30 minutes. Value must be less than the default expiry length, or it will
|
|
12843
|
+
* be ignored.
|
|
12844
|
+
* @param callback - Callback that contains the result of the magnopus cloud services authentication operation
|
|
12785
12845
|
*/
|
|
12786
|
-
loginToThirdPartyAuthenticationProvider(thirdPartyToken: string, thirdPartyStateId: string, createMultiplayerConnection: boolean, userHasVerifiedAge: boolean | null): Promise<Systems.LoginStateResult>;
|
|
12846
|
+
loginToThirdPartyAuthenticationProvider(thirdPartyToken: string, thirdPartyStateId: string, createMultiplayerConnection: boolean, userHasVerifiedAge: boolean | null, tokenOptions: Systems.TokenOptions | null): Promise<Systems.LoginStateResult>;
|
|
12787
12847
|
/**
|
|
12788
|
-
* @description Logout from Magnopus
|
|
12848
|
+
* @description Logout from Magnopus Cloud Services.
|
|
12789
12849
|
* @param callback - Callback to call when a response is received
|
|
12790
12850
|
*/
|
|
12791
12851
|
logout(): Promise<Systems.NullResult>;
|
|
@@ -12795,7 +12855,7 @@ export declare namespace Systems {
|
|
|
12795
12855
|
* @param displayName - User display name associated with the new profile
|
|
12796
12856
|
* @param email - Email address associated with the new profile
|
|
12797
12857
|
* @param password - Password associated with the new profile
|
|
12798
|
-
* @param receiveNewsletter - `true` if the user wants to receive the Magnopus
|
|
12858
|
+
* @param receiveNewsletter - `true` if the user wants to receive the Magnopus Cloud Services newsletter
|
|
12799
12859
|
* @param userHasVerifiedAge - An optional bool to specify whether or not the user has verified that they are over 18
|
|
12800
12860
|
* @param redirectUrl - The url to redirect the user to after they have registered
|
|
12801
12861
|
* @param inviteToken - A token provided to the user that can be used to auto-confirm their account
|
|
@@ -12863,7 +12923,7 @@ export declare namespace Systems {
|
|
|
12863
12923
|
*/
|
|
12864
12924
|
getBasicProfilesByUserId(userIds: Common.Array<string>): Promise<Systems.BasicProfilesResult>;
|
|
12865
12925
|
/**
|
|
12866
|
-
* @description Ping Magnopus
|
|
12926
|
+
* @description Ping Magnopus Cloud Services
|
|
12867
12927
|
* @param callback - Callback to call when a response is received
|
|
12868
12928
|
*/
|
|
12869
12929
|
ping(): Promise<Systems.NullResult>;
|
|
@@ -1055,6 +1055,11 @@ function csp_systems_TokenInfoParamsFactory(nativePointer) {
|
|
|
1055
1055
|
}
|
|
1056
1056
|
ProxyClassFactories["csp_systems_TokenInfoParams"] =
|
|
1057
1057
|
csp_systems_TokenInfoParamsFactory;
|
|
1058
|
+
function csp_systems_TokenOptionsFactory(nativePointer) {
|
|
1059
|
+
return new Systems.TokenOptions(nativePointer);
|
|
1060
|
+
}
|
|
1061
|
+
ProxyClassFactories["csp_systems_TokenOptions"] =
|
|
1062
|
+
csp_systems_TokenOptionsFactory;
|
|
1058
1063
|
function csp_systems_BasicProfileFactory(nativePointer) {
|
|
1059
1064
|
return new Systems.BasicProfile(nativePointer);
|
|
1060
1065
|
}
|
|
@@ -1283,6 +1288,11 @@ function csp_systems_HTTPHeadersResultFactory(nativePointer) {
|
|
|
1283
1288
|
}
|
|
1284
1289
|
ProxyClassFactories["csp_systems_HTTPHeadersResult"] =
|
|
1285
1290
|
csp_systems_HTTPHeadersResultFactory;
|
|
1291
|
+
function csp_systems_AnalyticsSystemFactory(nativePointer) {
|
|
1292
|
+
return new Systems.AnalyticsSystem(nativePointer);
|
|
1293
|
+
}
|
|
1294
|
+
ProxyClassFactories["csp_systems_AnalyticsSystem"] =
|
|
1295
|
+
csp_systems_AnalyticsSystemFactory;
|
|
1286
1296
|
function csp_systems_AlphaVideoMaterialFactory(nativePointer) {
|
|
1287
1297
|
return new Systems.AlphaVideoMaterial(nativePointer);
|
|
1288
1298
|
}
|
|
@@ -10718,11 +10728,14 @@ export class CSPFoundation {
|
|
|
10718
10728
|
}
|
|
10719
10729
|
/**
|
|
10720
10730
|
* @description Constructor for CSPSceneDescription by deserializing a SceneDescription json file.
|
|
10721
|
-
* @param sceneDescriptionJson - The SceneDescription to
|
|
10731
|
+
* @param sceneDescriptionJson - The SceneDescription to parse.
|
|
10732
|
+
@warning The expression of this interface as a list is a wrapper generator workaround, so
|
|
10733
|
+
* whilst you may split your string into many elements, it is not advisable. You should prefer
|
|
10734
|
+
* inserting your entire string as the first, single, and only element of the list.
|
|
10722
10735
|
*/
|
|
10723
10736
|
static create_sceneDescriptionJson(sceneDescriptionJson) {
|
|
10724
10737
|
var _ptr = Module._malloc(8);
|
|
10725
|
-
Module.ccall("
|
|
10738
|
+
Module.ccall("csp_multiplayer_CSPSceneDescription_Ctor_ListRC", "void", ["number", "number"], [_ptr, sceneDescriptionJson.pointer]);
|
|
10726
10739
|
var _nPtr = getNativePointer(_ptr);
|
|
10727
10740
|
return new CSPSceneDescription(_nPtr);
|
|
10728
10741
|
}
|
|
@@ -12123,11 +12136,14 @@ export class CSPFoundation {
|
|
|
12123
12136
|
}
|
|
12124
12137
|
/**
|
|
12125
12138
|
* @description Constructor for CSPSceneData by deserializing a SceneDescription json file.
|
|
12126
|
-
* @param sceneDescriptionJson - The SceneDescription to
|
|
12139
|
+
* @param sceneDescriptionJson - The SceneDescription to parse.
|
|
12140
|
+
@warning The expression of this interface as a list is a wrapper generator workaround, so
|
|
12141
|
+
* whilst you may split your string into many elements, it is not advisable. You should prefer
|
|
12142
|
+
* inserting your entire string as the first, single, and only element of the list.
|
|
12127
12143
|
*/
|
|
12128
12144
|
static create_sceneDescriptionJson(sceneDescriptionJson) {
|
|
12129
12145
|
var _ptr = Module._malloc(8);
|
|
12130
|
-
Module.ccall("
|
|
12146
|
+
Module.ccall("csp_systems_CSPSceneData_Ctor_ListRC", "void", ["number", "number"], [_ptr, sceneDescriptionJson.pointer]);
|
|
12131
12147
|
var _nPtr = getNativePointer(_ptr);
|
|
12132
12148
|
return new CSPSceneData(_nPtr);
|
|
12133
12149
|
}
|
|
@@ -12552,6 +12568,17 @@ export class CSPFoundation {
|
|
|
12552
12568
|
Module._free(_ret);
|
|
12553
12569
|
return _nPtr;
|
|
12554
12570
|
}
|
|
12571
|
+
/**
|
|
12572
|
+
* @description Retrieves the AnalyticsSystem system.
|
|
12573
|
+
* @return Pointer to the analyticssystem system class
|
|
12574
|
+
*/
|
|
12575
|
+
getAnalyticsSystem() {
|
|
12576
|
+
var _ret = Module._malloc(8);
|
|
12577
|
+
Module.ccall("csp_systems_SystemsManager_GetAnalyticsSystem_AnalyticsSystemP", "void", ["number", "number"], [_ret, this.pointer]);
|
|
12578
|
+
var _nPtr = new Systems.AnalyticsSystem(getNativePointer(_ret));
|
|
12579
|
+
Module._free(_ret);
|
|
12580
|
+
return _nPtr;
|
|
12581
|
+
}
|
|
12555
12582
|
getMultiplayerConnection() {
|
|
12556
12583
|
var _ret = Module._malloc(8);
|
|
12557
12584
|
Module.ccall("csp_systems_SystemsManager_GetMultiplayerConnection_MultiplayerConnectionP", "void", ["number", "number"], [_ret, this.pointer]);
|
|
@@ -15545,6 +15572,37 @@ export class CSPFoundation {
|
|
|
15545
15572
|
}
|
|
15546
15573
|
Systems.TokenInfoParams = TokenInfoParams;
|
|
15547
15574
|
})(Systems || (Systems = {}));
|
|
15575
|
+
(function (Systems) {
|
|
15576
|
+
/**
|
|
15577
|
+
* @description Data structure for overrides to the default token options
|
|
15578
|
+
*/
|
|
15579
|
+
class TokenOptions extends NativeClassWrapper {
|
|
15580
|
+
/** @internal */
|
|
15581
|
+
constructor(pointer) {
|
|
15582
|
+
super(pointer);
|
|
15583
|
+
}
|
|
15584
|
+
static create() {
|
|
15585
|
+
var _ptr = Module._malloc(8);
|
|
15586
|
+
Module.ccall("csp_systems_TokenOptions_Ctor", "void", ["number"], [_ptr]);
|
|
15587
|
+
var _nPtr = getNativePointer(_ptr);
|
|
15588
|
+
return new TokenOptions(_nPtr);
|
|
15589
|
+
}
|
|
15590
|
+
delete() {
|
|
15591
|
+
if (this.ownsPointer && !this.disposed) {
|
|
15592
|
+
Module.ccall("csp_systems_TokenOptions_Dtor", "void", ["number"], [this.pointer]);
|
|
15593
|
+
this.disposed = true;
|
|
15594
|
+
}
|
|
15595
|
+
}
|
|
15596
|
+
get expiryLength() {
|
|
15597
|
+
let _result = Module.ccall("csp_systems_TokenOptions__Get_ExpiryLength", "string", ["number"], [this.pointer]);
|
|
15598
|
+
return _result;
|
|
15599
|
+
}
|
|
15600
|
+
set expiryLength(value) {
|
|
15601
|
+
Module.ccall("csp_systems_TokenOptions__Set_ExpiryLength", "void", ["number", "string"], [this.pointer, value]);
|
|
15602
|
+
}
|
|
15603
|
+
}
|
|
15604
|
+
Systems.TokenOptions = TokenOptions;
|
|
15605
|
+
})(Systems || (Systems = {}));
|
|
15548
15606
|
(function (Systems) {
|
|
15549
15607
|
/**
|
|
15550
15608
|
* @description A basic class abstraction for a user profile, including User Id and name, a display name, avatar information
|
|
@@ -22893,6 +22951,39 @@ export class CSPFoundation {
|
|
|
22893
22951
|
}
|
|
22894
22952
|
Systems.HTTPHeadersResult = HTTPHeadersResult;
|
|
22895
22953
|
})(Systems || (Systems = {}));
|
|
22954
|
+
(function (Systems) {
|
|
22955
|
+
/**
|
|
22956
|
+
@ingroup Analytics System
|
|
22957
|
+
* @description Public facing system that allows AnalyticsRecords to be sent to MCS.
|
|
22958
|
+
*/
|
|
22959
|
+
class AnalyticsSystem extends Systems.SystemBase {
|
|
22960
|
+
/** @internal */
|
|
22961
|
+
constructor(pointer) {
|
|
22962
|
+
super(pointer);
|
|
22963
|
+
}
|
|
22964
|
+
static fromSystemBase(baseInstance) {
|
|
22965
|
+
const nativeClassWrapper = baseInstance;
|
|
22966
|
+
return new Systems.AnalyticsSystem(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
22967
|
+
}
|
|
22968
|
+
sendAnalyticsEvent(productContextSection, category, interactionType, subCategory, metadata, callback) {
|
|
22969
|
+
var _callback = (_stateObject__, result) => {
|
|
22970
|
+
var _result = new Systems.NullResult(getNativePointer(result));
|
|
22971
|
+
callback(_result);
|
|
22972
|
+
};
|
|
22973
|
+
var callbackPtr = Module.addFunction(_callback, "vii");
|
|
22974
|
+
Module.ccall("csp_systems_AnalyticsSystem_SendAnalyticsEvent_void_StringRC_StringRC_StringRC_StringRC_MapRC_NullResultCallback", "void", ["number", "string", "string", "string", "string", "number", "number"], [
|
|
22975
|
+
this.pointer,
|
|
22976
|
+
productContextSection,
|
|
22977
|
+
category,
|
|
22978
|
+
interactionType,
|
|
22979
|
+
subCategory,
|
|
22980
|
+
metadata.pointer,
|
|
22981
|
+
callbackPtr,
|
|
22982
|
+
]);
|
|
22983
|
+
}
|
|
22984
|
+
}
|
|
22985
|
+
Systems.AnalyticsSystem = AnalyticsSystem;
|
|
22986
|
+
})(Systems || (Systems = {}));
|
|
22896
22987
|
(function (Systems) {
|
|
22897
22988
|
/**
|
|
22898
22989
|
@ingroup Asset System
|
|
@@ -30211,7 +30302,7 @@ export class CSPFoundation {
|
|
|
30211
30302
|
(function (Systems) {
|
|
30212
30303
|
/**
|
|
30213
30304
|
@ingroup User System
|
|
30214
|
-
* @description Public facing system that allows interfacing with Magnopus
|
|
30305
|
+
* @description Public facing system that allows interfacing with Magnopus Cloud Services' user service.
|
|
30215
30306
|
* Offers methods for creating accounts, authenticating, and retrieving user profiles.
|
|
30216
30307
|
*/
|
|
30217
30308
|
class UserSystem extends Systems.SystemBase {
|
|
@@ -30251,7 +30342,7 @@ export class CSPFoundation {
|
|
|
30251
30342
|
Module.ccall("csp_systems_UserSystem_SetNewLoginTokenReceivedCallback_void_LoginTokenInfoResultCallback", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
30252
30343
|
}
|
|
30253
30344
|
/**
|
|
30254
|
-
* @description Log in to Magnopus
|
|
30345
|
+
* @description Log in to Magnopus Cloud Services services using a username-password or email-password combination.
|
|
30255
30346
|
* @param userName - Csp::common::string
|
|
30256
30347
|
* @param email - Csp::common::string
|
|
30257
30348
|
* @param password - Csp::common::string
|
|
@@ -30259,11 +30350,14 @@ export class CSPFoundation {
|
|
|
30259
30350
|
* connection to backend services, and thus be unable to receive messages or events. This session will also be unable to enter online spaces via
|
|
30260
30351
|
* a csp::multiplayer::OnlineRealtimeEngine. If true, this session will receive events, and may enter both online and offline spaces.
|
|
30261
30352
|
* @param userHasVerifiedAge - An optional bool to specify whether or not the user has verified that they are over 18
|
|
30353
|
+
* @param tokenOptions - Optional override for default token options.
|
|
30354
|
+
* The default token expiry length is configured by MCS and defaults to 30 minutes. Value must be less than the default expiry length, or it will
|
|
30355
|
+
* be ignored.
|
|
30262
30356
|
* @param callback - Callback to call when a response is received
|
|
30263
30357
|
@pre One of either UserName or Email must not be empty.
|
|
30264
30358
|
@pre Password must not be empty.
|
|
30265
30359
|
*/
|
|
30266
|
-
async login(userName, email, password, createMultiplayerConnection, userHasVerifiedAge) {
|
|
30360
|
+
async login(userName, email, password, createMultiplayerConnection, userHasVerifiedAge, tokenOptions) {
|
|
30267
30361
|
var _resolve;
|
|
30268
30362
|
var _promise = new Promise((_r) => {
|
|
30269
30363
|
_resolve = _r;
|
|
@@ -30284,7 +30378,7 @@ export class CSPFoundation {
|
|
|
30284
30378
|
userHasVerifiedAgePointer = Module._malloc(4);
|
|
30285
30379
|
Module.setValue(userHasVerifiedAgePointer, userHasVerifiedAge ? 1 : 0, "i32");
|
|
30286
30380
|
}
|
|
30287
|
-
Module.ccall("
|
|
30381
|
+
Module.ccall("csp_systems_UserSystem_Login_void_StringRC_StringRC_StringRC_bool_boolRC_TokenOptionsRC_LoginStateResultCallback", "void", [
|
|
30288
30382
|
"number",
|
|
30289
30383
|
"string",
|
|
30290
30384
|
"string",
|
|
@@ -30293,6 +30387,7 @@ export class CSPFoundation {
|
|
|
30293
30387
|
"boolean",
|
|
30294
30388
|
"number",
|
|
30295
30389
|
"number",
|
|
30390
|
+
"number",
|
|
30296
30391
|
], [
|
|
30297
30392
|
this.pointer,
|
|
30298
30393
|
userName,
|
|
@@ -30300,6 +30395,7 @@ export class CSPFoundation {
|
|
|
30300
30395
|
password,
|
|
30301
30396
|
createMultiplayerConnection,
|
|
30302
30397
|
userHasVerifiedAgePointer,
|
|
30398
|
+
tokenOptions != null ? tokenOptions.pointer : 0,
|
|
30303
30399
|
_callbackPtr,
|
|
30304
30400
|
0,
|
|
30305
30401
|
]);
|
|
@@ -30316,10 +30412,13 @@ export class CSPFoundation {
|
|
|
30316
30412
|
* @param createMultiplayerConnection - Whether to create a multiplayer connection. If false, this session will not establish a SignalR
|
|
30317
30413
|
* connection to backend services, and thus be unable to receive messages or events. This session will also be unable to enter online spaces via
|
|
30318
30414
|
* a csp::multiplayer::OnlineRealtimeEngine. If true, this session will receive events, and may enter both online and offline spaces.
|
|
30415
|
+
* @param tokenOptions - Optional override for default token options.
|
|
30416
|
+
* The default token expiry length is configured by MCS and defaults to 30 minutes. Value must be less than the default expiry length, or it will
|
|
30417
|
+
* be ignored.
|
|
30319
30418
|
* @param callback - Callback when asynchronous task finishes
|
|
30320
30419
|
@pre UserId must not be empty.
|
|
30321
30420
|
*/
|
|
30322
|
-
async loginWithRefreshToken(userId, refreshToken, createMultiplayerConnection) {
|
|
30421
|
+
async loginWithRefreshToken(userId, refreshToken, createMultiplayerConnection, tokenOptions) {
|
|
30323
30422
|
var _resolve;
|
|
30324
30423
|
var _promise = new Promise((_r) => {
|
|
30325
30424
|
_resolve = _r;
|
|
@@ -30335,25 +30434,29 @@ export class CSPFoundation {
|
|
|
30335
30434
|
Module.removeFunction(_callbackPtr);
|
|
30336
30435
|
};
|
|
30337
30436
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
30338
|
-
Module.ccall("
|
|
30437
|
+
Module.ccall("csp_systems_UserSystem_LoginWithRefreshToken_void_StringRC_StringRC_bool_TokenOptionsRC_LoginStateResultCallback", "void", ["number", "string", "string", "boolean", "number", "number", "number"], [
|
|
30339
30438
|
this.pointer,
|
|
30340
30439
|
userId,
|
|
30341
30440
|
refreshToken,
|
|
30342
30441
|
createMultiplayerConnection,
|
|
30442
|
+
tokenOptions != null ? tokenOptions.pointer : 0,
|
|
30343
30443
|
_callbackPtr,
|
|
30344
30444
|
0,
|
|
30345
30445
|
]);
|
|
30346
30446
|
return _promise;
|
|
30347
30447
|
}
|
|
30348
30448
|
/**
|
|
30349
|
-
* @description Log in to Magnopus
|
|
30449
|
+
* @description Log in to Magnopus Cloud Services as a guest.
|
|
30350
30450
|
* @param createMultiplayerConnection - Whether to create a multiplayer connection. If false, this session will not establish a SignalR
|
|
30351
30451
|
* connection to backend services, and thus be unable to receive messages or events. This session will also be unable to enter online spaces via
|
|
30352
30452
|
* a csp::multiplayer::OnlineRealtimeEngine. If true, this session will receive events, and may enter both online and offline spaces.
|
|
30353
30453
|
* @param userHasVerifiedAge - An optional bool to specify whether or not the user has verified that they are over 18
|
|
30454
|
+
* @param tokenOptions - Optional override for default token options.
|
|
30455
|
+
* The default token expiry length is configured by MCS and defaults to 30 minutes. Value must be less than the default expiry length, or it will
|
|
30456
|
+
* be ignored.
|
|
30354
30457
|
* @param callback - Callback to call when a response is received
|
|
30355
30458
|
*/
|
|
30356
|
-
async loginAsGuest(createMultiplayerConnection, userHasVerifiedAge) {
|
|
30459
|
+
async loginAsGuest(createMultiplayerConnection, userHasVerifiedAge, tokenOptions) {
|
|
30357
30460
|
var _resolve;
|
|
30358
30461
|
var _promise = new Promise((_r) => {
|
|
30359
30462
|
_resolve = _r;
|
|
@@ -30374,10 +30477,11 @@ export class CSPFoundation {
|
|
|
30374
30477
|
userHasVerifiedAgePointer = Module._malloc(4);
|
|
30375
30478
|
Module.setValue(userHasVerifiedAgePointer, userHasVerifiedAge ? 1 : 0, "i32");
|
|
30376
30479
|
}
|
|
30377
|
-
Module.ccall("
|
|
30480
|
+
Module.ccall("csp_systems_UserSystem_LoginAsGuest_void_bool_boolRC_TokenOptionsRC_LoginStateResultCallback", "void", ["number", "boolean", "boolean", "number", "number", "number"], [
|
|
30378
30481
|
this.pointer,
|
|
30379
30482
|
createMultiplayerConnection,
|
|
30380
30483
|
userHasVerifiedAgePointer,
|
|
30484
|
+
tokenOptions != null ? tokenOptions.pointer : 0,
|
|
30381
30485
|
_callbackPtr,
|
|
30382
30486
|
0,
|
|
30383
30487
|
]);
|
|
@@ -30386,6 +30490,44 @@ export class CSPFoundation {
|
|
|
30386
30490
|
}
|
|
30387
30491
|
return _promise;
|
|
30388
30492
|
}
|
|
30493
|
+
/**
|
|
30494
|
+
* @description Log in to Magnopus Cloud Services as a guest, allowing the backend to defer profile creation and perform other optimizations.
|
|
30495
|
+
* This login method is intended only for use with offline realtime engines, and as such does not start a multiplayer connection.
|
|
30496
|
+
@warning Unless you have a good reason, you should prefer the regular LoginAsGuest function. This method is designed for specific
|
|
30497
|
+
* non-multiplayer cases where the backend services are expecting a huge amount of anonymous profiles and wish to be allowed to buffer profile
|
|
30498
|
+
* creation. For this reason, there is an undefined delay after calling this function until the session can be thought to be conceptually "logged
|
|
30499
|
+
* in". Beware if you are calling user system methods after having logged in using this method. If you find yourself doing that, you may wish to
|
|
30500
|
+
* use the regular LoginAsGuest method instead.
|
|
30501
|
+
* @param userHasVerifiedAge - An optional bool to specify whether or not the user has verified that they are over 18
|
|
30502
|
+
* @param callback - Callback to call when a response is received
|
|
30503
|
+
*/
|
|
30504
|
+
async loginAsGuestWithDeferredProfileCreation(userHasVerifiedAge) {
|
|
30505
|
+
var _resolve;
|
|
30506
|
+
var _promise = new Promise((_r) => {
|
|
30507
|
+
_resolve = _r;
|
|
30508
|
+
});
|
|
30509
|
+
var _callbackPtr;
|
|
30510
|
+
var _callback = (_stateObject__, result) => {
|
|
30511
|
+
var _resultPtr = getNativePointer(result);
|
|
30512
|
+
var _resultInstance = new Systems.LoginStateResult(_resultPtr);
|
|
30513
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
30514
|
+
return;
|
|
30515
|
+
}
|
|
30516
|
+
_resolve(_resultInstance);
|
|
30517
|
+
Module.removeFunction(_callbackPtr);
|
|
30518
|
+
};
|
|
30519
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
30520
|
+
var userHasVerifiedAgePointer = 0;
|
|
30521
|
+
if (userHasVerifiedAge != null) {
|
|
30522
|
+
userHasVerifiedAgePointer = Module._malloc(4);
|
|
30523
|
+
Module.setValue(userHasVerifiedAgePointer, userHasVerifiedAge ? 1 : 0, "i32");
|
|
30524
|
+
}
|
|
30525
|
+
Module.ccall("csp_systems_UserSystem_LoginAsGuestWithDeferredProfileCreation_void_boolRC_LoginStateResultCallback", "void", ["number", "boolean", "number", "number"], [this.pointer, userHasVerifiedAgePointer, _callbackPtr, 0]);
|
|
30526
|
+
if (userHasVerifiedAgePointer) {
|
|
30527
|
+
Module._free(userHasVerifiedAgePointer);
|
|
30528
|
+
}
|
|
30529
|
+
return _promise;
|
|
30530
|
+
}
|
|
30389
30531
|
/**
|
|
30390
30532
|
@ingroup Third Party Authentication
|
|
30391
30533
|
* @description As a Connected Spaces Platform user the 3rd party authentication flow consists of two steps, first calling
|
|
@@ -30438,9 +30580,12 @@ export class CSPFoundation {
|
|
|
30438
30580
|
* connection to backend services, and thus be unable to receive messages or events. This session will also be unable to enter online spaces via
|
|
30439
30581
|
* a csp::multiplayer::OnlineRealtimeEngine. If true, this session will receive events, and may enter both online and offline spaces.
|
|
30440
30582
|
* @param userHasVerifiedAge - An optional bool to specify whether or not the user has verified that they are over 18
|
|
30441
|
-
* @param
|
|
30583
|
+
* @param tokenOptions - Optional override for default token options.
|
|
30584
|
+
* The default token expiry length is configured by MCS and defaults to 30 minutes. Value must be less than the default expiry length, or it will
|
|
30585
|
+
* be ignored.
|
|
30586
|
+
* @param callback - Callback that contains the result of the magnopus cloud services authentication operation
|
|
30442
30587
|
*/
|
|
30443
|
-
async loginToThirdPartyAuthenticationProvider(thirdPartyToken, thirdPartyStateId, createMultiplayerConnection, userHasVerifiedAge) {
|
|
30588
|
+
async loginToThirdPartyAuthenticationProvider(thirdPartyToken, thirdPartyStateId, createMultiplayerConnection, userHasVerifiedAge, tokenOptions) {
|
|
30444
30589
|
var _resolve;
|
|
30445
30590
|
var _promise = new Promise((_r) => {
|
|
30446
30591
|
_resolve = _r;
|
|
@@ -30461,7 +30606,7 @@ export class CSPFoundation {
|
|
|
30461
30606
|
userHasVerifiedAgePointer = Module._malloc(4);
|
|
30462
30607
|
Module.setValue(userHasVerifiedAgePointer, userHasVerifiedAge ? 1 : 0, "i32");
|
|
30463
30608
|
}
|
|
30464
|
-
Module.ccall("
|
|
30609
|
+
Module.ccall("csp_systems_UserSystem_LoginToThirdPartyAuthenticationProvider_void_StringRC_StringRC_bool_boolRC_TokenOptionsRC_LoginStateResultCallback", "void", [
|
|
30465
30610
|
"number",
|
|
30466
30611
|
"string",
|
|
30467
30612
|
"string",
|
|
@@ -30469,12 +30614,14 @@ export class CSPFoundation {
|
|
|
30469
30614
|
"boolean",
|
|
30470
30615
|
"number",
|
|
30471
30616
|
"number",
|
|
30617
|
+
"number",
|
|
30472
30618
|
], [
|
|
30473
30619
|
this.pointer,
|
|
30474
30620
|
thirdPartyToken,
|
|
30475
30621
|
thirdPartyStateId,
|
|
30476
30622
|
createMultiplayerConnection,
|
|
30477
30623
|
userHasVerifiedAgePointer,
|
|
30624
|
+
tokenOptions != null ? tokenOptions.pointer : 0,
|
|
30478
30625
|
_callbackPtr,
|
|
30479
30626
|
0,
|
|
30480
30627
|
]);
|
|
@@ -30484,7 +30631,7 @@ export class CSPFoundation {
|
|
|
30484
30631
|
return _promise;
|
|
30485
30632
|
}
|
|
30486
30633
|
/**
|
|
30487
|
-
* @description Logout from Magnopus
|
|
30634
|
+
* @description Logout from Magnopus Cloud Services.
|
|
30488
30635
|
* @param callback - Callback to call when a response is received
|
|
30489
30636
|
*/
|
|
30490
30637
|
async logout() {
|
|
@@ -30512,7 +30659,7 @@ export class CSPFoundation {
|
|
|
30512
30659
|
* @param displayName - User display name associated with the new profile
|
|
30513
30660
|
* @param email - Email address associated with the new profile
|
|
30514
30661
|
* @param password - Password associated with the new profile
|
|
30515
|
-
* @param receiveNewsletter - `true` if the user wants to receive the Magnopus
|
|
30662
|
+
* @param receiveNewsletter - `true` if the user wants to receive the Magnopus Cloud Services newsletter
|
|
30516
30663
|
* @param userHasVerifiedAge - An optional bool to specify whether or not the user has verified that they are over 18
|
|
30517
30664
|
* @param redirectUrl - The url to redirect the user to after they have registered
|
|
30518
30665
|
* @param inviteToken - A token provided to the user that can be used to auto-confirm their account
|
|
@@ -30792,7 +30939,7 @@ export class CSPFoundation {
|
|
|
30792
30939
|
return _promise;
|
|
30793
30940
|
}
|
|
30794
30941
|
/**
|
|
30795
|
-
* @description Ping Magnopus
|
|
30942
|
+
* @description Ping Magnopus Cloud Services
|
|
30796
30943
|
* @param callback - Callback to call when a response is received
|
|
30797
30944
|
*/
|
|
30798
30945
|
async ping() {
|