@accelbyte/sdk 0.2.0-beta.4 → 0.2.0-beta.8
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/CHANGELOG.md +16 -0
- package/README.md +1 -4
- package/dist/index.browser.es.js +950 -541
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.d.ts +1499 -1060
- package/dist/index.node.es.js +950 -541
- package/dist/index.node.es.js.map +1 -1
- package/dist/index.node.js +950 -541
- package/dist/index.node.js.map +1 -1
- package/examples/next/package.json +1 -1
- package/examples/node/package.json +1 -1
- package/examples/typescript-node/README.md +13 -0
- package/examples/typescript-node/node-example.ts +60 -0
- package/examples/vite/package.json +1 -1
- package/package.json +1 -1
package/dist/index.node.js
CHANGED
|
@@ -9543,6 +9543,8 @@ class FileUploadApi {
|
|
|
9543
9543
|
this.conf = conf;
|
|
9544
9544
|
this.namespace = namespace;
|
|
9545
9545
|
/**
|
|
9546
|
+
* POST [/basic/v1/public/namespaces/{namespace}/folders/{folder}/files](api)
|
|
9547
|
+
*
|
|
9546
9548
|
* Generate an upload URL. It's valid for 10 minutes.
|
|
9547
9549
|
* Returns: URL data
|
|
9548
9550
|
*/
|
|
@@ -9665,12 +9667,18 @@ class MiscApi {
|
|
|
9665
9667
|
this.namespace = namespace;
|
|
9666
9668
|
this.cache = cache;
|
|
9667
9669
|
/**
|
|
9668
|
-
*
|
|
9669
|
-
*
|
|
9670
|
+
* GET [/basic/v1/public/namespaces/{namespace}/misc/countries](api)
|
|
9671
|
+
*
|
|
9672
|
+
* _Returns_: country code list
|
|
9670
9673
|
*/
|
|
9671
9674
|
this.getCountries = (lang) => {
|
|
9672
9675
|
return this.newInstance().fetchV1NsMiscCountries({ lang });
|
|
9673
9676
|
};
|
|
9677
|
+
/**
|
|
9678
|
+
* GET [/basic/v1/public/namespaces/{namespace}/misc/languages](api)
|
|
9679
|
+
*
|
|
9680
|
+
* _Returns_: language list
|
|
9681
|
+
*/
|
|
9674
9682
|
this.getLanguages = () => {
|
|
9675
9683
|
return this.newInstance().fetchV1NsMiscLanguages();
|
|
9676
9684
|
};
|
|
@@ -9760,9 +9768,10 @@ class NamespaceApi {
|
|
|
9760
9768
|
this.namespace = namespace;
|
|
9761
9769
|
this.cache = cache;
|
|
9762
9770
|
/**
|
|
9771
|
+
* GET [/basic/v1/public/namespaces](api)
|
|
9772
|
+
*
|
|
9763
9773
|
* Get all namespaces.
|
|
9764
9774
|
*
|
|
9765
|
-
* Other detail info:
|
|
9766
9775
|
* - _Required permission_: login user
|
|
9767
9776
|
* - _Action code_: 11303
|
|
9768
9777
|
* - _Returns_: list of namespaces
|
|
@@ -10072,6 +10081,8 @@ class UserProfileApi {
|
|
|
10072
10081
|
this.namespace = namespace;
|
|
10073
10082
|
this.cache = cache;
|
|
10074
10083
|
/**
|
|
10084
|
+
* GET [/basic/v1/public/namespaces/{namespace}/users/me/profiles](api)
|
|
10085
|
+
*
|
|
10075
10086
|
* Get my profile
|
|
10076
10087
|
*
|
|
10077
10088
|
* __Client with user token can get user profile in target namespace__
|
|
@@ -10080,6 +10091,8 @@ class UserProfileApi {
|
|
|
10080
10091
|
return this.newInstance().fetchV1NsUsersMeProfiles();
|
|
10081
10092
|
};
|
|
10082
10093
|
/**
|
|
10094
|
+
* POST [/basic/v1/public/namespaces/{namespace}/users/me/profiles](api)
|
|
10095
|
+
*
|
|
10083
10096
|
* Create my profile.
|
|
10084
10097
|
*
|
|
10085
10098
|
* __Client with user token can create user profile in target namespace__
|
|
@@ -10088,6 +10101,8 @@ class UserProfileApi {
|
|
|
10088
10101
|
return this.newInstance().postV1NsUsersMeProfiles(data);
|
|
10089
10102
|
};
|
|
10090
10103
|
/**
|
|
10104
|
+
* PUT [/basic/v1/public/namespaces/{namespace}/users/me/profiles](api)
|
|
10105
|
+
*
|
|
10091
10106
|
* Update my profile.
|
|
10092
10107
|
* Updates user profile in the target namespace. If token's namespace doesn't match the target namespace, the service automatically maps the token's user ID into the user ID in the target namespace. The method returns the updated user profile on a successful call.
|
|
10093
10108
|
*/
|
|
@@ -10095,6 +10110,8 @@ class UserProfileApi {
|
|
|
10095
10110
|
return this.newInstance().putV1NsUsersMeProfiles(data);
|
|
10096
10111
|
};
|
|
10097
10112
|
/**
|
|
10113
|
+
* PUT [/basic/v1/public/namespaces/{namespace}/users/{userId}/profiles/customAttributes](api)
|
|
10114
|
+
*
|
|
10098
10115
|
* Update partially custom attributes tied to user id.
|
|
10099
10116
|
* _Returns_: Updated custom attributes
|
|
10100
10117
|
*/
|
|
@@ -10163,16 +10180,17 @@ class CachingApi {
|
|
|
10163
10180
|
constructor(conf, namespace) {
|
|
10164
10181
|
this.conf = conf;
|
|
10165
10182
|
this.namespace = namespace;
|
|
10166
|
-
|
|
10167
|
-
|
|
10168
|
-
|
|
10169
|
-
|
|
10170
|
-
|
|
10171
|
-
|
|
10172
|
-
|
|
10173
|
-
|
|
10174
|
-
|
|
10175
|
-
|
|
10183
|
+
/**
|
|
10184
|
+
* GET [/buildinfo/public/namespaces/{namespace}/diff/cache/source/{sourceBuildId}/dest/{destinationBuildId}](api)
|
|
10185
|
+
*
|
|
10186
|
+
* This API is used to retrieve detailed diff cache.
|
|
10187
|
+
* The response will contains list of diff cache files along with its download url.
|
|
10188
|
+
*
|
|
10189
|
+
* _Required permission_: login user
|
|
10190
|
+
*/
|
|
10191
|
+
this.getDiffCache = (sourceBuildId, destinationBuildId) => {
|
|
10192
|
+
return this.newInstance().fetchNsDiffCacheSourceBySourcebuildidDestByDestinationbuildid(sourceBuildId, destinationBuildId);
|
|
10193
|
+
};
|
|
10176
10194
|
}
|
|
10177
10195
|
newInstance() {
|
|
10178
10196
|
// this is expensive to cache, apply "cache: false"
|
|
@@ -10346,21 +10364,26 @@ class DlcApi {
|
|
|
10346
10364
|
constructor(conf, namespace) {
|
|
10347
10365
|
this.conf = conf;
|
|
10348
10366
|
this.namespace = namespace;
|
|
10349
|
-
|
|
10350
|
-
|
|
10351
|
-
|
|
10352
|
-
|
|
10353
|
-
|
|
10354
|
-
|
|
10355
|
-
|
|
10356
|
-
|
|
10357
|
-
|
|
10358
|
-
|
|
10359
|
-
|
|
10360
|
-
|
|
10361
|
-
|
|
10362
|
-
|
|
10363
|
-
|
|
10367
|
+
/**
|
|
10368
|
+
* GET [/buildinfo/public/namespaces/{namespace}/dlcs/latest/byGameAppId/{appId}](api)
|
|
10369
|
+
*
|
|
10370
|
+
* Retrieve the list of DLC available on specific game. Use game's appId to query.
|
|
10371
|
+
*
|
|
10372
|
+
* _Returns_: list of DLC
|
|
10373
|
+
*/
|
|
10374
|
+
this.getLatestDLCByGameAppId = (appId) => {
|
|
10375
|
+
return this.newInstance().fetchNsDlcsLatestByGameAppIdByAppid(appId);
|
|
10376
|
+
};
|
|
10377
|
+
/**
|
|
10378
|
+
* GET [/buildinfo/public/namespaces/{namespace}/apps/latest/byDLCAppId/{dlcAppId}](api)
|
|
10379
|
+
*
|
|
10380
|
+
* Retrieve the list of DLC available on specific game. Use DLC's appId to query.
|
|
10381
|
+
*
|
|
10382
|
+
* _Returns_: appId of game and list of its builds by platformId
|
|
10383
|
+
*/
|
|
10384
|
+
this.getBaseGamesByDlcAppId = (dlcAppId) => {
|
|
10385
|
+
return this.newInstance().fetchNsAppsLatestByDlcAppIdByDlcappid(dlcAppId);
|
|
10386
|
+
};
|
|
10364
10387
|
}
|
|
10365
10388
|
newInstance() {
|
|
10366
10389
|
// this is be expensive to cache, apply "cache: false"
|
|
@@ -10727,66 +10750,76 @@ class DownloaderApi {
|
|
|
10727
10750
|
constructor(conf, namespace) {
|
|
10728
10751
|
this.conf = conf;
|
|
10729
10752
|
this.namespace = namespace;
|
|
10730
|
-
|
|
10731
|
-
|
|
10732
|
-
|
|
10733
|
-
|
|
10734
|
-
|
|
10735
|
-
|
|
10736
|
-
|
|
10737
|
-
|
|
10738
|
-
|
|
10739
|
-
|
|
10740
|
-
|
|
10741
|
-
|
|
10742
|
-
|
|
10743
|
-
|
|
10744
|
-
|
|
10745
|
-
|
|
10746
|
-
|
|
10747
|
-
|
|
10748
|
-
|
|
10749
|
-
|
|
10750
|
-
|
|
10751
|
-
|
|
10752
|
-
|
|
10753
|
-
|
|
10754
|
-
|
|
10755
|
-
|
|
10756
|
-
|
|
10757
|
-
|
|
10758
|
-
|
|
10759
|
-
|
|
10760
|
-
|
|
10761
|
-
|
|
10762
|
-
|
|
10763
|
-
|
|
10764
|
-
|
|
10765
|
-
|
|
10766
|
-
|
|
10767
|
-
|
|
10753
|
+
/**
|
|
10754
|
+
* GET [/buildinfo/public/namespaces/{namespace}/availablebuilds/{appId}](api)
|
|
10755
|
+
*
|
|
10756
|
+
* This API is used to get simple build manifest that contains list of current build in various platform.
|
|
10757
|
+
*
|
|
10758
|
+
* - _Required permission_: login user
|
|
10759
|
+
* - _Returns_: build manifest
|
|
10760
|
+
*/
|
|
10761
|
+
this.getAvailableBuilds = (appId) => {
|
|
10762
|
+
return this.newInstance().fetchNsAvailablebuildsByAppid(appId);
|
|
10763
|
+
};
|
|
10764
|
+
/**
|
|
10765
|
+
* GET [/buildinfo/public/namespaces/{namespace}/v2/updategame/{appId}/{platformId}](api)
|
|
10766
|
+
*
|
|
10767
|
+
* This API is used to get build manifest of release version of the application.
|
|
10768
|
+
*
|
|
10769
|
+
* - _Required permission_: login user
|
|
10770
|
+
* - _Returns_: build manifest
|
|
10771
|
+
*/
|
|
10772
|
+
this.getBuildManifest = (appId, platformId) => {
|
|
10773
|
+
const axios = Network.create({ ...this.conf, timeout: 1800000 });
|
|
10774
|
+
return new Downloader$(axios, this.namespace, false).fetchNsV2UpdategameByAppidByPlatformid(appId, platformId);
|
|
10775
|
+
};
|
|
10776
|
+
/**
|
|
10777
|
+
* GET [/buildinfo/public/namespaces/{namespace}/diff/cache/source/{sourceBuildId}/dest/{destinationBuildId}](api)
|
|
10778
|
+
*
|
|
10779
|
+
* This API is used to retrieve detailed diff cache.
|
|
10780
|
+
* The response will contains list of diff cache files along with its download url.
|
|
10781
|
+
*
|
|
10782
|
+
* - _Required permission_: login user
|
|
10783
|
+
*/
|
|
10784
|
+
this.getDiffCache = (sourceBuildId, destinationBuildId) => {
|
|
10785
|
+
return new Caching$(Network.create(this.conf), this.namespace, false).fetchNsDiffCacheSourceBySourcebuildidDestByDestinationbuildid(sourceBuildId, destinationBuildId);
|
|
10786
|
+
};
|
|
10787
|
+
/**
|
|
10788
|
+
* Check which platform is available for the user to download the game
|
|
10789
|
+
*
|
|
10790
|
+
* @internal
|
|
10791
|
+
*/
|
|
10792
|
+
this.getMatchPlatform = ({ buildsAvailability, userPlatform }) => {
|
|
10793
|
+
const availablePlatformID = new Set();
|
|
10794
|
+
for (const buildAvailability of buildsAvailability) {
|
|
10795
|
+
if (buildAvailability.platformId) {
|
|
10796
|
+
availablePlatformID.add(buildAvailability.platformId);
|
|
10797
|
+
}
|
|
10768
10798
|
}
|
|
10769
|
-
|
|
10770
|
-
|
|
10771
|
-
|
|
10772
|
-
|
|
10773
|
-
|
|
10774
|
-
|
|
10799
|
+
const currentMatchPlatform = this.getCurrentPlatform(userPlatform);
|
|
10800
|
+
if (currentMatchPlatform) {
|
|
10801
|
+
for (const key in currentMatchPlatform.targetPlatform) {
|
|
10802
|
+
if (availablePlatformID.has(currentMatchPlatform.targetPlatform[key])) {
|
|
10803
|
+
return currentMatchPlatform.targetPlatform[key];
|
|
10804
|
+
}
|
|
10775
10805
|
}
|
|
10776
10806
|
}
|
|
10777
|
-
|
|
10778
|
-
|
|
10807
|
+
return null;
|
|
10808
|
+
};
|
|
10809
|
+
/**
|
|
10810
|
+
* @internal
|
|
10811
|
+
*/
|
|
10812
|
+
this.getCurrentPlatform = (userPlatform) => {
|
|
10813
|
+
const devicePlatform = userPlatform.platform;
|
|
10814
|
+
const deviceArch = userPlatform.arch;
|
|
10815
|
+
const currentPlatform = AvailablePlatform.find((platform) => platform.platform === devicePlatform && platform.arch.includes(deviceArch));
|
|
10816
|
+
return currentPlatform;
|
|
10817
|
+
};
|
|
10779
10818
|
}
|
|
10780
10819
|
newInstance() {
|
|
10781
10820
|
// this is be expensive to cache, apply "cache: false"
|
|
10782
10821
|
return new Downloader$(Network.create(this.conf), this.namespace, false);
|
|
10783
10822
|
}
|
|
10784
|
-
getCurrentPlatform(userPlatform) {
|
|
10785
|
-
const devicePlatform = userPlatform.platform;
|
|
10786
|
-
const deviceArch = userPlatform.arch;
|
|
10787
|
-
const currentPlatform = AvailablePlatform.find((platform) => platform.platform === devicePlatform && platform.arch.includes(deviceArch));
|
|
10788
|
-
return currentPlatform;
|
|
10789
|
-
}
|
|
10790
10823
|
}
|
|
10791
10824
|
|
|
10792
10825
|
/*
|
|
@@ -10890,6 +10923,8 @@ class EventApi {
|
|
|
10890
10923
|
this.namespace = namespace;
|
|
10891
10924
|
this.cache = cache;
|
|
10892
10925
|
/**
|
|
10926
|
+
* GET [/event/v2/public/namespaces/{namespace}/users/{userId}/edithistory](api)
|
|
10927
|
+
*
|
|
10893
10928
|
* Available Type:
|
|
10894
10929
|
* - email
|
|
10895
10930
|
* - password
|
|
@@ -10898,7 +10933,7 @@ class EventApi {
|
|
|
10898
10933
|
* - country
|
|
10899
10934
|
* - language
|
|
10900
10935
|
*
|
|
10901
|
-
*
|
|
10936
|
+
* _Requires a valid user access token_
|
|
10902
10937
|
*/
|
|
10903
10938
|
this.getAccountHistoryByUserId = ({ userId, queryParams }) => {
|
|
10904
10939
|
return this.newInstance().fetchEventV2NsUsersByUseridEdithistory(userId, queryParams);
|
|
@@ -10992,27 +11027,36 @@ class DataDeletionApi {
|
|
|
10992
11027
|
this.conf = conf;
|
|
10993
11028
|
this.namespace = namespace;
|
|
10994
11029
|
this.cache = cache;
|
|
10995
|
-
|
|
10996
|
-
|
|
10997
|
-
|
|
10998
|
-
|
|
10999
|
-
|
|
11000
|
-
|
|
11001
|
-
|
|
11002
|
-
|
|
11003
|
-
|
|
11004
|
-
|
|
11005
|
-
|
|
11006
|
-
|
|
11007
|
-
|
|
11008
|
-
|
|
11009
|
-
|
|
11010
|
-
|
|
11011
|
-
|
|
11012
|
-
|
|
11013
|
-
|
|
11014
|
-
|
|
11015
|
-
|
|
11030
|
+
/**
|
|
11031
|
+
* GET [/gdpr/public/namespaces/{namespace}/users/{userId}/deletions/status](api)
|
|
11032
|
+
*
|
|
11033
|
+
* Fetch the status to check whether or not a user's account is on a deletion status
|
|
11034
|
+
*
|
|
11035
|
+
* _Requires a valid user access token_
|
|
11036
|
+
*/
|
|
11037
|
+
this.getGdprDeletionStatus = (userId) => {
|
|
11038
|
+
return this.newInstance().fetchGdprNsUsersByUseridDeletionsStatus(userId);
|
|
11039
|
+
};
|
|
11040
|
+
/**
|
|
11041
|
+
* POST [/gdpr/public/namespaces/{namespace}/users/{userId}/deletions](api)
|
|
11042
|
+
*
|
|
11043
|
+
* Request an account's deletion
|
|
11044
|
+
*
|
|
11045
|
+
* _Requires a valid user access token and password_
|
|
11046
|
+
*/
|
|
11047
|
+
this.requestAccountDeletion = ({ userId, data }) => {
|
|
11048
|
+
return this.newInstance().postGdprNsUsersByUseridDeletions(userId, data);
|
|
11049
|
+
};
|
|
11050
|
+
/**
|
|
11051
|
+
* DELETE [/gdpr/public/namespaces/{namespace}/users/{userId}/deletions](api)
|
|
11052
|
+
*
|
|
11053
|
+
* Cancel a deletion request
|
|
11054
|
+
*
|
|
11055
|
+
* _Requires a valid user access token_
|
|
11056
|
+
*/
|
|
11057
|
+
this.cancelAccountDeletion = (userId) => {
|
|
11058
|
+
return this.newInstance().deleteGdprNsUsersByUseridDeletions(userId);
|
|
11059
|
+
};
|
|
11016
11060
|
}
|
|
11017
11061
|
newInstance() {
|
|
11018
11062
|
return new DataDeletion$(Network.create(this.conf), this.namespace, this.cache);
|
|
@@ -11133,34 +11177,46 @@ class DataRetrievalApi {
|
|
|
11133
11177
|
this.conf = conf;
|
|
11134
11178
|
this.namespace = namespace;
|
|
11135
11179
|
this.cache = cache;
|
|
11136
|
-
|
|
11137
|
-
|
|
11138
|
-
|
|
11139
|
-
|
|
11140
|
-
|
|
11141
|
-
|
|
11142
|
-
|
|
11143
|
-
|
|
11144
|
-
|
|
11145
|
-
|
|
11146
|
-
|
|
11147
|
-
|
|
11148
|
-
|
|
11149
|
-
|
|
11150
|
-
|
|
11151
|
-
|
|
11152
|
-
|
|
11153
|
-
|
|
11154
|
-
|
|
11155
|
-
|
|
11156
|
-
|
|
11157
|
-
|
|
11158
|
-
|
|
11159
|
-
|
|
11160
|
-
|
|
11161
|
-
|
|
11162
|
-
|
|
11163
|
-
|
|
11180
|
+
/**
|
|
11181
|
+
* GET [/gdpr/public/namespaces/{namespace}/users/{userId}/requests](api)
|
|
11182
|
+
*
|
|
11183
|
+
* Fetch personal data request list
|
|
11184
|
+
*
|
|
11185
|
+
* _Requires a valid user access token_
|
|
11186
|
+
*/
|
|
11187
|
+
this.getGdprDataRequestList = ({ userId, queryParams }) => {
|
|
11188
|
+
return this.newInstance().fetchGdprNsUsersByUseridRequests(userId, queryParams);
|
|
11189
|
+
};
|
|
11190
|
+
/**
|
|
11191
|
+
* POST [/gdpr/public/namespaces/{namespace}/users/{userId}/requests](api)
|
|
11192
|
+
*
|
|
11193
|
+
* Create a request for personal data download
|
|
11194
|
+
*
|
|
11195
|
+
* _Requires a valid user access token_
|
|
11196
|
+
*/
|
|
11197
|
+
this.requestGdprData = ({ userId, data }) => {
|
|
11198
|
+
return this.newInstance().postGdprNsUsersByUseridRequests(userId, data);
|
|
11199
|
+
};
|
|
11200
|
+
/**
|
|
11201
|
+
* DELETE [/gdpr/public/namespaces/{namespace}/users/{userId}/requests/{requestDate}](api)
|
|
11202
|
+
*
|
|
11203
|
+
* Cancel the request for personal data download
|
|
11204
|
+
*
|
|
11205
|
+
* _Requires a valid user access token_
|
|
11206
|
+
*/
|
|
11207
|
+
this.cancelGdprDataRequest = ({ userId, requestDate }) => {
|
|
11208
|
+
return this.newInstance().deleteGdprNsUsersByUseridRequestsByRequestdate(userId, requestDate);
|
|
11209
|
+
};
|
|
11210
|
+
/**
|
|
11211
|
+
* POST [/gdpr/public/namespaces/{namespace}/users/{userId}/requests/{requestDate}/generate](api)
|
|
11212
|
+
*
|
|
11213
|
+
* Create a download URL for personal data request
|
|
11214
|
+
*
|
|
11215
|
+
* _Requires a valid user access token_
|
|
11216
|
+
*/
|
|
11217
|
+
this.requestGdprDataDownloadUrl = ({ userId, requestDate, data }) => {
|
|
11218
|
+
return this.newInstance().postGdprNsUsersByUseridRequestsByRequestdateGenerate(userId, requestDate, data);
|
|
11219
|
+
};
|
|
11164
11220
|
}
|
|
11165
11221
|
newInstance() {
|
|
11166
11222
|
return new DataRetrieval$(Network.create(this.conf), this.namespace, this.cache);
|
|
@@ -11253,10 +11309,11 @@ class InputValidationsApi {
|
|
|
11253
11309
|
this.namespace = namespace;
|
|
11254
11310
|
this.cache = cache;
|
|
11255
11311
|
/**
|
|
11312
|
+
* GET [/iam/v3/public/inputValidations](api)
|
|
11313
|
+
*
|
|
11256
11314
|
* No role required
|
|
11257
11315
|
* This method is to get list of input validation configuration.
|
|
11258
11316
|
* `regex` parameter will be returned if `isCustomRegex` is true. Otherwise, it will be empty.
|
|
11259
|
-
*
|
|
11260
11317
|
*/
|
|
11261
11318
|
this.getValidations = (languageCode, defaultOnEmpty) => {
|
|
11262
11319
|
const queryParams = { languageCode, defaultOnEmpty };
|
|
@@ -11936,28 +11993,12 @@ class DesktopChecker {
|
|
|
11936
11993
|
}
|
|
11937
11994
|
DesktopChecker.desktopApp = DesktopChecker.isElectron();
|
|
11938
11995
|
|
|
11939
|
-
/*
|
|
11940
|
-
* Copyright (c) 2022 AccelByte Inc. All Rights Reserved
|
|
11941
|
-
* This is licensed software from AccelByte Inc, for limitations
|
|
11942
|
-
* and restrictions contact your company contract manager.
|
|
11943
|
-
*/
|
|
11944
|
-
class BrowserHelper {
|
|
11945
|
-
}
|
|
11946
|
-
BrowserHelper.isOnBrowser = () => {
|
|
11947
|
-
return typeof window !== 'undefined' && window.document;
|
|
11948
|
-
};
|
|
11949
|
-
|
|
11950
|
-
/*
|
|
11951
|
-
* Copyright (c) 2022 AccelByte Inc. All Rights Reserved
|
|
11952
|
-
* This is licensed software from AccelByte Inc, for limitations
|
|
11953
|
-
* and restrictions contact your company contract manager.
|
|
11954
|
-
*/
|
|
11955
11996
|
class RefreshSession {
|
|
11956
11997
|
}
|
|
11957
11998
|
// --
|
|
11958
11999
|
RefreshSession.KEY = 'RefreshSession.lock';
|
|
11959
12000
|
RefreshSession.isLocked = () => {
|
|
11960
|
-
if (!
|
|
12001
|
+
if (!UrlHelper.isOnBrowser())
|
|
11961
12002
|
return false;
|
|
11962
12003
|
const lockStatus = localStorage.getItem(RefreshSession.KEY);
|
|
11963
12004
|
if (!lockStatus) {
|
|
@@ -11970,12 +12011,12 @@ RefreshSession.isLocked = () => {
|
|
|
11970
12011
|
return lockExpiry > new Date().getTime();
|
|
11971
12012
|
};
|
|
11972
12013
|
RefreshSession.lock = (expiry) => {
|
|
11973
|
-
if (!
|
|
12014
|
+
if (!UrlHelper.isOnBrowser())
|
|
11974
12015
|
return;
|
|
11975
12016
|
localStorage.setItem(RefreshSession.KEY, `${new Date().getTime() + expiry}`);
|
|
11976
12017
|
};
|
|
11977
12018
|
RefreshSession.unlock = () => {
|
|
11978
|
-
if (!
|
|
12019
|
+
if (!UrlHelper.isOnBrowser())
|
|
11979
12020
|
return;
|
|
11980
12021
|
localStorage.removeItem(RefreshSession.KEY);
|
|
11981
12022
|
};
|
|
@@ -18880,12 +18921,12 @@ CodeChallenge.load = () => {
|
|
|
18880
18921
|
return parseStoredState(localStorage.getItem('pp:pkce:cd') || '');
|
|
18881
18922
|
};
|
|
18882
18923
|
CodeChallenge.save = (codeVerifier) => {
|
|
18883
|
-
if (
|
|
18924
|
+
if (UrlHelper.isOnBrowser()) {
|
|
18884
18925
|
localStorage.setItem('pp:pkce:cd', stringifyStoredState(codeVerifier));
|
|
18885
18926
|
}
|
|
18886
18927
|
};
|
|
18887
18928
|
CodeChallenge.clear = () => {
|
|
18888
|
-
if (
|
|
18929
|
+
if (UrlHelper.isOnBrowser()) {
|
|
18889
18930
|
localStorage.removeItem('pp:pkce:cd');
|
|
18890
18931
|
}
|
|
18891
18932
|
};
|
|
@@ -18920,7 +18961,7 @@ const stringifyStoredState = (storedState) => {
|
|
|
18920
18961
|
};
|
|
18921
18962
|
|
|
18922
18963
|
/*
|
|
18923
|
-
* Copyright (c) 2022 AccelByte Inc. All Rights Reserved
|
|
18964
|
+
* Copyright (c) 2022-2023 AccelByte Inc. All Rights Reserved
|
|
18924
18965
|
* This is licensed software from AccelByte Inc, for limitations
|
|
18925
18966
|
* and restrictions contact your company contract manager.
|
|
18926
18967
|
*/
|
|
@@ -18955,6 +18996,9 @@ class UrlHelper {
|
|
|
18955
18996
|
return new URL(pathname, origin).toString();
|
|
18956
18997
|
}
|
|
18957
18998
|
}
|
|
18999
|
+
UrlHelper.isOnBrowser = () => {
|
|
19000
|
+
return typeof window !== 'undefined' && window.document;
|
|
19001
|
+
};
|
|
18958
19002
|
UrlHelper.isCompleteURLString = (urlString) => {
|
|
18959
19003
|
try {
|
|
18960
19004
|
const url = new URL(urlString);
|
|
@@ -20232,6 +20276,8 @@ class UserAuthorizationApi {
|
|
|
20232
20276
|
this.cache = cache;
|
|
20233
20277
|
this.options = options;
|
|
20234
20278
|
/**
|
|
20279
|
+
* POST: [/iam/v3/oauth/token](api)
|
|
20280
|
+
*
|
|
20235
20281
|
* This method supports grant type:
|
|
20236
20282
|
* - Grant Type == `authorization_code`:
|
|
20237
20283
|
* It generates the user token by given the authorization
|
|
@@ -20338,24 +20384,58 @@ class UserAuthorizationApi {
|
|
|
20338
20384
|
CodeChallenge.clear();
|
|
20339
20385
|
return { ...result, mfaData };
|
|
20340
20386
|
};
|
|
20387
|
+
/**
|
|
20388
|
+
* @internal
|
|
20389
|
+
*/
|
|
20341
20390
|
this.getMfaDataFromError = (errorResponse) => {
|
|
20342
20391
|
const doesMFADataExist = Validate.safeParse(errorResponse.data, MFADataResponse);
|
|
20343
20392
|
if (!doesMFADataExist)
|
|
20344
20393
|
return;
|
|
20345
20394
|
const { mfa_token: mfaToken, factors, default_factor: defaultFactor, email } = errorResponse.data;
|
|
20346
20395
|
const result = { mfaToken, factors, defaultFactor, email };
|
|
20347
|
-
if (
|
|
20396
|
+
if (UrlHelper.isOnBrowser()) {
|
|
20348
20397
|
localStorage.setItem(MFA_DATA_STORAGE_KEY, JSON.stringify(result));
|
|
20349
20398
|
}
|
|
20350
20399
|
return result;
|
|
20351
20400
|
};
|
|
20401
|
+
/**
|
|
20402
|
+
* @internal
|
|
20403
|
+
*/
|
|
20352
20404
|
this.getMfaDataFromStorage = () => {
|
|
20353
|
-
const storedMFAData =
|
|
20405
|
+
const storedMFAData = UrlHelper.isOnBrowser() && localStorage.getItem(MFA_DATA_STORAGE_KEY);
|
|
20354
20406
|
return storedMFAData ? JSON.parse(storedMFAData) : null;
|
|
20355
20407
|
};
|
|
20408
|
+
/**
|
|
20409
|
+
* @internal
|
|
20410
|
+
*/
|
|
20356
20411
|
this.removeMfaDataFromStorage = () => {
|
|
20357
20412
|
localStorage.removeItem(MFA_DATA_STORAGE_KEY);
|
|
20358
20413
|
};
|
|
20414
|
+
/**
|
|
20415
|
+
* @internal
|
|
20416
|
+
*/
|
|
20417
|
+
this.matchReceivedState = (maybeSentState) => {
|
|
20418
|
+
const sentStateResult = CodeChallenge.parseSentState(maybeSentState);
|
|
20419
|
+
if (sentStateResult.error)
|
|
20420
|
+
return { error: sentStateResult.error, result: null };
|
|
20421
|
+
const storedStateResult = CodeChallenge.load();
|
|
20422
|
+
if (storedStateResult.error)
|
|
20423
|
+
return { error: storedStateResult.error, result: null };
|
|
20424
|
+
const sentState = sentStateResult.sentState;
|
|
20425
|
+
const storedState = storedStateResult.storedState;
|
|
20426
|
+
if (sentState.csrf !== storedState.csrf)
|
|
20427
|
+
return { error: null, result: null };
|
|
20428
|
+
return {
|
|
20429
|
+
error: null,
|
|
20430
|
+
result: {
|
|
20431
|
+
payload: sentState.payload,
|
|
20432
|
+
codeVerifier: storedState.codeVerifier
|
|
20433
|
+
}
|
|
20434
|
+
};
|
|
20435
|
+
};
|
|
20436
|
+
/**
|
|
20437
|
+
* @internal
|
|
20438
|
+
*/
|
|
20359
20439
|
this.deduceLoginError = (error) => {
|
|
20360
20440
|
switch (error) {
|
|
20361
20441
|
case LoginErrorParam.Enum.login_session_expired:
|
|
@@ -20397,6 +20477,11 @@ class UserAuthorizationApi {
|
|
|
20397
20477
|
returnPath
|
|
20398
20478
|
};
|
|
20399
20479
|
};
|
|
20480
|
+
/**
|
|
20481
|
+
* GET [/iam/v3/oauth/authorize](api)
|
|
20482
|
+
*
|
|
20483
|
+
* Creates a URL to be used for Login, Register, Link to existing account or Twitch Link
|
|
20484
|
+
*/
|
|
20400
20485
|
this.createLoginURL = (returnPath, targetAuthPage, oneTimeLinkCode) => {
|
|
20401
20486
|
const { verifier, challenge } = CodeChallenge.generateChallenge();
|
|
20402
20487
|
const csrf = CodeChallenge.generateCsrf();
|
|
@@ -20420,6 +20505,11 @@ class UserAuthorizationApi {
|
|
|
20420
20505
|
const url = new URL(UrlHelper.combineURLPaths(this.options.baseURL, `${AUTHORIZE_URL}?${searchParams.toString()}`));
|
|
20421
20506
|
return url.toString();
|
|
20422
20507
|
};
|
|
20508
|
+
/**
|
|
20509
|
+
* GET [/iam/v3/oauth/authorize](api)
|
|
20510
|
+
*
|
|
20511
|
+
* Creates a URL to be used for password recovery
|
|
20512
|
+
*/
|
|
20423
20513
|
this.createForgotPasswordURL = () => {
|
|
20424
20514
|
const { verifier, challenge } = CodeChallenge.generateChallenge();
|
|
20425
20515
|
const csrf = CodeChallenge.generateCsrf();
|
|
@@ -20438,9 +20528,15 @@ class UserAuthorizationApi {
|
|
|
20438
20528
|
const url = new URL(UrlHelper.combineURLPaths(this.options.baseURL, `${AUTHORIZE_URL}?${searchParams.toString()}`));
|
|
20439
20529
|
return url.toString();
|
|
20440
20530
|
};
|
|
20531
|
+
/**
|
|
20532
|
+
* @internal
|
|
20533
|
+
*/
|
|
20441
20534
|
this.getCodeChallenge = () => {
|
|
20442
20535
|
return CodeChallenge.generateChallenge();
|
|
20443
20536
|
};
|
|
20537
|
+
/**
|
|
20538
|
+
* @internal
|
|
20539
|
+
*/
|
|
20444
20540
|
this.refreshToken = () => {
|
|
20445
20541
|
const { clientId, refreshToken } = this.options;
|
|
20446
20542
|
if (DesktopChecker.isDesktopApp()) {
|
|
@@ -20448,6 +20544,9 @@ class UserAuthorizationApi {
|
|
|
20448
20544
|
}
|
|
20449
20545
|
return refreshWithLock({ axiosConfig: this.conf, clientId });
|
|
20450
20546
|
};
|
|
20547
|
+
/**
|
|
20548
|
+
* @internal
|
|
20549
|
+
*/
|
|
20451
20550
|
this.getSearchParams = (sentState, challenge) => {
|
|
20452
20551
|
const searchParams = new URLSearchParams();
|
|
20453
20552
|
searchParams.append('response_type', 'code');
|
|
@@ -20459,25 +20558,6 @@ class UserAuthorizationApi {
|
|
|
20459
20558
|
return searchParams;
|
|
20460
20559
|
};
|
|
20461
20560
|
}
|
|
20462
|
-
matchReceivedState(maybeSentState) {
|
|
20463
|
-
const sentStateResult = CodeChallenge.parseSentState(maybeSentState);
|
|
20464
|
-
if (sentStateResult.error)
|
|
20465
|
-
return { error: sentStateResult.error, result: null };
|
|
20466
|
-
const storedStateResult = CodeChallenge.load();
|
|
20467
|
-
if (storedStateResult.error)
|
|
20468
|
-
return { error: storedStateResult.error, result: null };
|
|
20469
|
-
const sentState = sentStateResult.sentState;
|
|
20470
|
-
const storedState = storedStateResult.storedState;
|
|
20471
|
-
if (sentState.csrf !== storedState.csrf)
|
|
20472
|
-
return { error: null, result: null };
|
|
20473
|
-
return {
|
|
20474
|
-
error: null,
|
|
20475
|
-
result: {
|
|
20476
|
-
payload: sentState.payload,
|
|
20477
|
-
codeVerifier: storedState.codeVerifier
|
|
20478
|
-
}
|
|
20479
|
-
};
|
|
20480
|
-
}
|
|
20481
20561
|
}
|
|
20482
20562
|
function isAxiosError(error) {
|
|
20483
20563
|
return !!error && !!error.config;
|
|
@@ -20886,6 +20966,14 @@ class OAuthApi {
|
|
|
20886
20966
|
this.cache = cache;
|
|
20887
20967
|
this.options = options;
|
|
20888
20968
|
/**
|
|
20969
|
+
* @internal
|
|
20970
|
+
*/
|
|
20971
|
+
this.newOAuth20Extension = () => {
|
|
20972
|
+
return new OAuth20Extension$(Network.create(this.conf), this.namespace, this.cache);
|
|
20973
|
+
};
|
|
20974
|
+
/**
|
|
20975
|
+
* POST [/iam/v3/logout](api)
|
|
20976
|
+
*
|
|
20889
20977
|
* This method is used to remove __access_token__, __refresh_token__ from cookie and revoke token from usage.
|
|
20890
20978
|
* Supported methods:
|
|
20891
20979
|
* - VerifyToken to verify token from header
|
|
@@ -20901,6 +20989,8 @@ class OAuthApi {
|
|
|
20901
20989
|
return new OAuth20Extension$(axios, this.namespace, this.cache).postIamV3Logout();
|
|
20902
20990
|
};
|
|
20903
20991
|
/**
|
|
20992
|
+
* POST [/iam/v3/oauth/revoke](api)
|
|
20993
|
+
*
|
|
20904
20994
|
* This method revokes a token.
|
|
20905
20995
|
* This method requires authorized requests header with Basic Authentication from client that establish the token.action code: 10706
|
|
20906
20996
|
*/
|
|
@@ -20916,6 +21006,8 @@ class OAuthApi {
|
|
|
20916
21006
|
return new OAuth20$(axios, this.namespace, this.cache).postIamV3OauthRevoke({ token });
|
|
20917
21007
|
};
|
|
20918
21008
|
/**
|
|
21009
|
+
* POST [/iam/v3/oauth/mfa/verify](api)
|
|
21010
|
+
*
|
|
20919
21011
|
* Verify 2FA code
|
|
20920
21012
|
* This method is used for verifying 2FA code.
|
|
20921
21013
|
* ##2FA remember device
|
|
@@ -20931,6 +21023,9 @@ class OAuthApi {
|
|
|
20931
21023
|
localStorage.removeItem(MFA_DATA_STORAGE_KEY);
|
|
20932
21024
|
return result.response;
|
|
20933
21025
|
};
|
|
21026
|
+
/**
|
|
21027
|
+
* POST [/iam/v3/oauth/mfa/code](api)
|
|
21028
|
+
*/
|
|
20934
21029
|
this.request2FAEmailCode = async ({ mfaToken = null, factor }) => {
|
|
20935
21030
|
const result = await this.newInstance().postIamV3OauthMfaCode({ mfaToken, clientId: this.options.clientId, factor });
|
|
20936
21031
|
if (result.error)
|
|
@@ -20938,12 +21033,16 @@ class OAuthApi {
|
|
|
20938
21033
|
return result.response;
|
|
20939
21034
|
};
|
|
20940
21035
|
/**
|
|
21036
|
+
* GET [/iam/v3/location/country](api)
|
|
21037
|
+
*
|
|
20941
21038
|
* This method get country location based on the request.
|
|
20942
21039
|
*/
|
|
20943
21040
|
this.getCurrentLocationCountry = () => {
|
|
20944
21041
|
return this.newOAuth20Extension().fetchIamV3LocationCountry();
|
|
20945
21042
|
};
|
|
20946
21043
|
/**
|
|
21044
|
+
* GET [/iam/v3/oauth/namespaces/{namespace}/users/{userId}/platforms/{platformId}/platformToken](api)
|
|
21045
|
+
*
|
|
20947
21046
|
* Retrieve User Third Party Platform Token
|
|
20948
21047
|
*
|
|
20949
21048
|
* This method used for retrieving third party platform token for user that login using third party,
|
|
@@ -20963,6 +21062,8 @@ class OAuthApi {
|
|
|
20963
21062
|
return this.newInstance().fetchV3OauthUsersByUseridPlatformsByPlatformidPlatformToken(userId, platformId);
|
|
20964
21063
|
};
|
|
20965
21064
|
/**
|
|
21065
|
+
* POST [/iam/v3/authenticateWithLink](api)
|
|
21066
|
+
*
|
|
20966
21067
|
* This method is being used to authenticate a user account and perform platform link.
|
|
20967
21068
|
* It validates user's email / username and password.
|
|
20968
21069
|
* If user already enable 2FA, then invoke _/mfa/verify_ using __mfa_token__ from this method response.
|
|
@@ -20977,31 +21078,27 @@ class OAuthApi {
|
|
|
20977
21078
|
this.authenticateWithLink = (data) => {
|
|
20978
21079
|
return this.newOAuth20Extension().postIamV3AuthenticateWithLink(data);
|
|
20979
21080
|
};
|
|
20980
|
-
|
|
20981
|
-
|
|
20982
|
-
|
|
20983
|
-
|
|
20984
|
-
|
|
20985
|
-
|
|
20986
|
-
|
|
20987
|
-
|
|
20988
|
-
|
|
20989
|
-
|
|
20990
|
-
|
|
20991
|
-
|
|
20992
|
-
|
|
20993
|
-
|
|
20994
|
-
|
|
20995
|
-
|
|
20996
|
-
|
|
20997
|
-
|
|
20998
|
-
|
|
20999
|
-
|
|
21000
|
-
|
|
21001
|
-
*
|
|
21002
|
-
*/
|
|
21003
|
-
exchangeTokenByOneTimeLinkCode(data) {
|
|
21004
|
-
return this.newOAuth20Extension().postIamV3LinkTokenExchange(data);
|
|
21081
|
+
/**
|
|
21082
|
+
* POST [/iam/v3/link/code/validate](api)
|
|
21083
|
+
*
|
|
21084
|
+
* This method is being used to validate one time link code.
|
|
21085
|
+
* It require a valid user token.
|
|
21086
|
+
* Should specify the target platform id and current user should already linked to this platform.
|
|
21087
|
+
* Current user should be a headless account.
|
|
21088
|
+
*/
|
|
21089
|
+
this.validateOneTimeLinkCode = (data) => {
|
|
21090
|
+
return this.newOAuth20Extension().postIamV3LinkCodeValidate(data);
|
|
21091
|
+
};
|
|
21092
|
+
/**
|
|
21093
|
+
* POST [/iam/v3/link/token/exchange](api)
|
|
21094
|
+
*
|
|
21095
|
+
* This method is being used to generate user's token by one time link code.
|
|
21096
|
+
* It require publisher ClientID
|
|
21097
|
+
* It required a code which can be generated from __/iam/v3/link/code/request__.
|
|
21098
|
+
*/
|
|
21099
|
+
this.exchangeTokenByOneTimeLinkCode = (data) => {
|
|
21100
|
+
return this.newOAuth20Extension().postIamV3LinkTokenExchange(data);
|
|
21101
|
+
};
|
|
21005
21102
|
}
|
|
21006
21103
|
newInstance() {
|
|
21007
21104
|
return new OAuth20$(Network.create(this.conf), this.namespace, this.cache);
|
|
@@ -21080,6 +21177,8 @@ class ThirdPartyCredentialApi {
|
|
|
21080
21177
|
this.namespace = namespace;
|
|
21081
21178
|
this.cache = cache;
|
|
21082
21179
|
/**
|
|
21180
|
+
* GET [/iam/v3/public/namespaces/{namespace}/platforms/clients/active](api)
|
|
21181
|
+
*
|
|
21083
21182
|
* This is the Public API to Get All Active 3rd Platform Credential.
|
|
21084
21183
|
*/
|
|
21085
21184
|
this.getThirdPartyPlatformInfo = () => {
|
|
@@ -21581,85 +21680,112 @@ class TwoFA {
|
|
|
21581
21680
|
this.namespace = namespace;
|
|
21582
21681
|
this.cache = cache;
|
|
21583
21682
|
/**
|
|
21683
|
+
* GET [/iam/v4/public/namespaces/{namespace}/users/me/mfa/backupCode](api)
|
|
21684
|
+
*
|
|
21584
21685
|
* This method is used to get 8-digits backup codes.
|
|
21585
21686
|
* Each code is a one-time code and will be deleted once used.
|
|
21586
|
-
* This method Requires valid user access token
|
|
21587
21687
|
*
|
|
21688
|
+
* _Requires a valid user access token_
|
|
21588
21689
|
*/
|
|
21589
21690
|
this.getBackupCode = () => {
|
|
21590
21691
|
return this.newInstance().fetchV4NsUsersMeMfaBackupCode();
|
|
21591
21692
|
};
|
|
21592
21693
|
/**
|
|
21694
|
+
* POST [/iam/v4/public/namespaces/{namespace}/users/me/mfa/backupCode/enable](api)
|
|
21695
|
+
*
|
|
21593
21696
|
* This method is used to enable 2FA backup codes.
|
|
21594
|
-
* This method Requires valid user access token
|
|
21595
21697
|
*
|
|
21698
|
+
* _Requires a valid user access token_
|
|
21596
21699
|
*/
|
|
21597
21700
|
this.enable2FABackupCodes = () => {
|
|
21598
21701
|
return this.newInstance().postV4NsUsersMeMfaBackupCodeEnable();
|
|
21599
21702
|
};
|
|
21600
21703
|
/**
|
|
21704
|
+
* POST [/iam/v4/public/namespaces/{namespace}/users/me/mfa/backupCode](api)
|
|
21705
|
+
*
|
|
21601
21706
|
* This method is used to enable 2FA backup codes.
|
|
21602
|
-
* This method Requires valid user access token
|
|
21603
21707
|
*
|
|
21708
|
+
* _Requires a valid user access token_
|
|
21604
21709
|
*/
|
|
21605
21710
|
this.generateBackupCodes = () => {
|
|
21606
21711
|
return this.newInstance().postV4NsUsersMeMfaBackupCode();
|
|
21607
21712
|
};
|
|
21608
21713
|
/**
|
|
21714
|
+
* DELETE [/iam/v4/public/namespaces/{namespace}/users/me/mfa/backupCode/disable](api)
|
|
21715
|
+
*
|
|
21609
21716
|
* This method is used to enable 2FA backup codes.
|
|
21610
|
-
* This method Requires valid user access token
|
|
21611
21717
|
*
|
|
21718
|
+
* _Requires a valid user access token_
|
|
21612
21719
|
*/
|
|
21613
21720
|
this.disableBackupCodes = () => {
|
|
21614
21721
|
return this.newInstance().deleteV4NsUsersMeMfaBackupCodeDisable();
|
|
21615
21722
|
};
|
|
21616
21723
|
/**
|
|
21724
|
+
* DELETE [/iam/v4/public/namespaces/{namespace}/users/me/mfa/authenticator/disable](api)
|
|
21725
|
+
* }
|
|
21617
21726
|
* This method is used to disable 2FA authenticator.
|
|
21618
|
-
* This method Requires valid user access token
|
|
21619
21727
|
*
|
|
21728
|
+
* _Requires a valid user access token_
|
|
21620
21729
|
*/
|
|
21621
21730
|
this.disableAuthenticator = () => {
|
|
21622
21731
|
return this.newInstance().deleteV4NsUsersMeMfaAuthenticatorDisable();
|
|
21623
21732
|
};
|
|
21624
21733
|
/**
|
|
21734
|
+
* GET [/iam/v4/public/namespaces/{namespace}/users/me/mfa/factor](api)
|
|
21735
|
+
*
|
|
21625
21736
|
* This method is used to get user enabled factors.
|
|
21626
|
-
* This method Requires valid user access token
|
|
21627
21737
|
*
|
|
21738
|
+
* _Requires a valid user access token_
|
|
21628
21739
|
*/
|
|
21629
21740
|
this.getEnabledMethods = () => {
|
|
21630
21741
|
return this.newInstance().fetchV4NsUsersMeMfaFactor();
|
|
21631
21742
|
};
|
|
21632
21743
|
/**
|
|
21744
|
+
* POST [/iam/v4/public/namespaces/{namespace}/users/me/mfa/factor](api)
|
|
21745
|
+
*
|
|
21633
21746
|
* This method is used to make 2FA factor default.
|
|
21634
|
-
* This method Requires valid user access token
|
|
21635
21747
|
*
|
|
21748
|
+
* _Requires a valid user access token_
|
|
21636
21749
|
*/
|
|
21637
21750
|
this.set2FAAsDefault = (factor) => {
|
|
21638
21751
|
return this.newInstance().postV4NsUsersMeMfaFactor({ factor });
|
|
21639
21752
|
};
|
|
21640
21753
|
/**
|
|
21754
|
+
* POST [/iam/v4/public/namespaces/{namespace}/users/me/mfa/authenticator/enable](api)
|
|
21755
|
+
*
|
|
21641
21756
|
* This method is used to enable 2FA authenticator.
|
|
21642
|
-
* This method Requires valid user access token
|
|
21643
21757
|
*
|
|
21758
|
+
* _Requires a valid user access token_
|
|
21644
21759
|
*/
|
|
21645
21760
|
this.enable2FAAuthenticator = (code) => {
|
|
21646
21761
|
return this.newInstance().postV4NsUsersMeMfaAuthenticatorEnable({ code });
|
|
21647
21762
|
};
|
|
21648
21763
|
/**
|
|
21764
|
+
* POST [/iam/v4/public/namespaces/{namespace}/users/me/mfa/authenticator/key](api)
|
|
21765
|
+
*
|
|
21649
21766
|
* This method is used to generate a secret key for 3rd-party authenticator app.
|
|
21650
21767
|
* A QR code URI is also returned so that frontend can generate QR code image.
|
|
21651
|
-
* This method Requires valid user access token
|
|
21652
21768
|
*
|
|
21769
|
+
* _Requires a valid user access token_
|
|
21653
21770
|
*/
|
|
21654
21771
|
this.generateSecretKey = () => {
|
|
21655
21772
|
return this.newInstance().postV4NsUsersMeMfaAuthenticatorKey();
|
|
21656
21773
|
};
|
|
21774
|
+
/**
|
|
21775
|
+
* POST [/iam/v4/public/namespaces/{namespace}/users/me/mfa/email/code](api)
|
|
21776
|
+
*/
|
|
21657
21777
|
this.requestEmailCode = () => {
|
|
21658
21778
|
return this.newInstance().postV4NsUsersMeMfaEmailCode();
|
|
21659
21779
|
};
|
|
21780
|
+
/**
|
|
21781
|
+
* POST [/iam/v4/public/namespaces/{namespace}/users/me/mfa/email/enable](api)
|
|
21782
|
+
*/
|
|
21660
21783
|
this.enableEmailMethod = (code) => {
|
|
21661
21784
|
return this.newInstance().postV4NsUsersMeMfaEmailEnable({ code });
|
|
21662
21785
|
};
|
|
21786
|
+
/**
|
|
21787
|
+
* POST [/iam/v4/public/namespaces/{namespace}/users/me/mfa/email/disable](api)
|
|
21788
|
+
*/
|
|
21663
21789
|
this.disableEmailMethod = () => {
|
|
21664
21790
|
return this.newInstance().postV4NsUsersMeMfaEmailDisable();
|
|
21665
21791
|
};
|
|
@@ -22873,30 +22999,40 @@ class UserApi {
|
|
|
22873
22999
|
this.namespace = namespace;
|
|
22874
23000
|
this.cache = cache;
|
|
22875
23001
|
/**
|
|
22876
|
-
*
|
|
23002
|
+
* GET [/iam/v3/public/users/me](api)
|
|
23003
|
+
*
|
|
23004
|
+
* get currently logged-in user
|
|
22877
23005
|
*/
|
|
22878
23006
|
this.getCurrentUser = () => {
|
|
22879
23007
|
return this.newInstance().fetchIamV3PublicUsersMe();
|
|
22880
23008
|
};
|
|
22881
23009
|
/**
|
|
22882
|
-
*
|
|
23010
|
+
* PATCH [/iam/v3/public/namespaces/{namespace}/users/me](api)
|
|
23011
|
+
*
|
|
23012
|
+
* Update current user
|
|
22883
23013
|
*/
|
|
22884
23014
|
this.updateUserMe = (data) => {
|
|
22885
23015
|
return this.newInstance().patchV3NsUsersMe(data);
|
|
22886
23016
|
};
|
|
22887
23017
|
/**
|
|
23018
|
+
* PUT [/iam/v4/public/namespaces/{namespace}/users/me/email](api)
|
|
23019
|
+
*
|
|
22888
23020
|
* update current user's email
|
|
22889
23021
|
*/
|
|
22890
23022
|
this.updateEmailMe = (data) => {
|
|
22891
23023
|
return this.newInstance4().putV4NsUsersMeEmail(data);
|
|
22892
23024
|
};
|
|
22893
23025
|
/**
|
|
23026
|
+
* PUT [/iam/v3/public/namespaces/{namespace}/users/me/password](api)
|
|
23027
|
+
*
|
|
22894
23028
|
* update current user's password
|
|
22895
23029
|
*/
|
|
22896
23030
|
this.updatePasswordMe = (data) => {
|
|
22897
23031
|
return this.newInstance().putV3NsUsersMePassword(data);
|
|
22898
23032
|
};
|
|
22899
23033
|
/**
|
|
23034
|
+
* POST [/iam/v3/public/namespaces/{namespace}/users/me/code/request](api)
|
|
23035
|
+
*
|
|
22900
23036
|
* Required valid user authorization
|
|
22901
23037
|
* The verification code is sent to email address
|
|
22902
23038
|
* Available contexts for use :
|
|
@@ -22919,6 +23055,8 @@ class UserApi {
|
|
|
22919
23055
|
return this.newInstance().postV3NsUsersMeCodeRequest(data);
|
|
22920
23056
|
};
|
|
22921
23057
|
/**
|
|
23058
|
+
* POST [/iam/v3/public/namespaces/{namespace}/users/me/code/verify](api)
|
|
23059
|
+
*
|
|
22922
23060
|
* Will consume code if validateOnly is set false
|
|
22923
23061
|
* Required valid user authorization
|
|
22924
23062
|
* Redeems a verification code sent to a user to verify the user's contact address is correct
|
|
@@ -22930,6 +23068,8 @@ class UserApi {
|
|
|
22930
23068
|
return this.newInstance().postV3NsUsersMeCodeVerify(data);
|
|
22931
23069
|
};
|
|
22932
23070
|
/**
|
|
23071
|
+
* POST [/iam/v3/public/namespaces/{namespace}/users/me/headless/code/verify](api)
|
|
23072
|
+
*
|
|
22933
23073
|
* If validateOnly is set false, consume code and upgrade headless account and automatically verified the email address if it is succeeded
|
|
22934
23074
|
* Require valid user access token.
|
|
22935
23075
|
* The method upgrades a headless account by linking the headless account with the email address and the password.
|
|
@@ -22949,6 +23089,8 @@ class UserApi {
|
|
|
22949
23089
|
return this.newInstance().postV3NsUsersMeHeadlessCodeVerify(data);
|
|
22950
23090
|
};
|
|
22951
23091
|
/**
|
|
23092
|
+
* POST [/iam/v4/public/namespaces/{namespace}/users/me/headless/code/verify](api)
|
|
23093
|
+
*
|
|
22952
23094
|
* Require valid user access token.
|
|
22953
23095
|
* The method upgrades a headless account by linking the headless account with the email address, username, and password.
|
|
22954
23096
|
* By upgrading the headless account into a full account, the user could use the email address, username, and password for using Justice IAM.
|
|
@@ -22968,13 +23110,17 @@ class UserApi {
|
|
|
22968
23110
|
return this.newInstance4().postV4NsUsersMeHeadlessCodeVerify(data);
|
|
22969
23111
|
};
|
|
22970
23112
|
/**
|
|
23113
|
+
* GET [/iam/v3/public/namespaces/{namespace}/users/{userId}/platforms](api)
|
|
23114
|
+
*
|
|
22971
23115
|
* This method retrieves platform accounts linked to user. Required valid user authorization.
|
|
22972
|
-
*
|
|
23116
|
+
* action code: 10128
|
|
22973
23117
|
*/
|
|
22974
23118
|
this.getUserLinkedPlatform = (userId) => {
|
|
22975
23119
|
return this.newInstance().fetchV3NsUsersByUseridPlatforms(userId);
|
|
22976
23120
|
};
|
|
22977
23121
|
/**
|
|
23122
|
+
* POST [/iam/v3/public/namespaces/{namespace}/users/me/platforms/{platformId}](api)
|
|
23123
|
+
*
|
|
22978
23124
|
* Required valid user authorization.
|
|
22979
23125
|
* __Prerequisite:__
|
|
22980
23126
|
* Platform client configuration need to be added to database for specific platformId. Namespace service URL need to be specified (refer to required environment variables).
|
|
@@ -23004,22 +23150,26 @@ class UserApi {
|
|
|
23004
23150
|
return this.newInstance().postV3NsUsersMePlatformsByPlatformid(platformId, data);
|
|
23005
23151
|
};
|
|
23006
23152
|
/**
|
|
23153
|
+
* GET [/iam/v3/public/namespaces/{namespace}/requests/{requestId}/async/status](api)
|
|
23154
|
+
*
|
|
23007
23155
|
* Get the linking status between a third-party platform to a user
|
|
23008
23156
|
*/
|
|
23009
23157
|
this.getLinkRequestStatus = (requestId) => {
|
|
23010
23158
|
return this.newInstance().fetchV3NsRequestsByRequestidAsyncStatus(requestId);
|
|
23011
23159
|
};
|
|
23012
23160
|
/**
|
|
23161
|
+
* @internal
|
|
23013
23162
|
* It is going to be __DEPRECATED__.
|
|
23014
23163
|
* Update Platform Account relation to current User Account.
|
|
23015
23164
|
* Note: Game progression data (statistics, reward, etc) associated with previous User Account will not be
|
|
23016
23165
|
* transferred. If the data is tight to game user ID, the user will have the game progression data.
|
|
23017
|
-
*
|
|
23018
23166
|
*/
|
|
23019
23167
|
this.linkPlatformToUserAccount = ({ userId, data }) => {
|
|
23020
23168
|
return this.newInstance().postV3NsUsersByUseridPlatformsLink(userId, data);
|
|
23021
23169
|
};
|
|
23022
23170
|
/**
|
|
23171
|
+
* DELETE [/iam/v3/public/namespaces/{namespace}/users/me/platforms/{platformId}](api)
|
|
23172
|
+
*
|
|
23023
23173
|
* Required valid user authorization.
|
|
23024
23174
|
* ##Supported platforms:
|
|
23025
23175
|
*
|
|
@@ -23052,110 +23202,123 @@ class UserApi {
|
|
|
23052
23202
|
return this.newInstance().deleteV3NsUsersMePlatformsByPlatformid(platformId, data);
|
|
23053
23203
|
};
|
|
23054
23204
|
/**
|
|
23205
|
+
* GET [/iam/v3/public/namespaces/{namespace}/users/me/platforms/{platformId}/web/link](api)
|
|
23206
|
+
*
|
|
23055
23207
|
* This method is used to generate third party login page which will redirected to establish method.
|
|
23056
23208
|
*/
|
|
23057
23209
|
this.getThirdPartyURL = ({ platformId, queryParams }) => {
|
|
23058
23210
|
return this.newInstance().fetchV3NsUsersMePlatformsByPlatformidWebLink(platformId, queryParams);
|
|
23059
23211
|
};
|
|
23060
23212
|
/**
|
|
23213
|
+
* GET [/iam/v3/public/namespaces/{namespace}/agerestrictions/countries/{countryCode}](api)
|
|
23214
|
+
*
|
|
23061
23215
|
* Get age restriction by country code. It will always get by publisher namespace
|
|
23062
23216
|
*/
|
|
23063
23217
|
this.getAgeRestrictionByCountry = (countryCode) => {
|
|
23064
23218
|
return this.newInstance().fetchV3NsAgerestrictionsCountriesByCountrycode(countryCode);
|
|
23065
23219
|
};
|
|
23066
|
-
|
|
23067
|
-
|
|
23068
|
-
|
|
23069
|
-
|
|
23070
|
-
|
|
23071
|
-
|
|
23072
|
-
|
|
23073
|
-
|
|
23074
|
-
|
|
23075
|
-
|
|
23076
|
-
|
|
23077
|
-
|
|
23078
|
-
|
|
23079
|
-
|
|
23080
|
-
|
|
23081
|
-
|
|
23082
|
-
|
|
23083
|
-
|
|
23084
|
-
|
|
23085
|
-
|
|
23086
|
-
|
|
23087
|
-
|
|
23088
|
-
|
|
23089
|
-
|
|
23090
|
-
|
|
23091
|
-
|
|
23092
|
-
|
|
23093
|
-
|
|
23094
|
-
|
|
23095
|
-
|
|
23096
|
-
|
|
23097
|
-
|
|
23098
|
-
|
|
23099
|
-
|
|
23100
|
-
|
|
23101
|
-
|
|
23102
|
-
|
|
23103
|
-
|
|
23104
|
-
|
|
23105
|
-
|
|
23106
|
-
|
|
23107
|
-
|
|
23108
|
-
|
|
23109
|
-
|
|
23110
|
-
|
|
23111
|
-
|
|
23112
|
-
|
|
23113
|
-
|
|
23114
|
-
|
|
23115
|
-
|
|
23116
|
-
|
|
23117
|
-
|
|
23118
|
-
|
|
23119
|
-
|
|
23120
|
-
|
|
23121
|
-
|
|
23122
|
-
|
|
23123
|
-
|
|
23124
|
-
|
|
23125
|
-
|
|
23126
|
-
|
|
23127
|
-
|
|
23128
|
-
|
|
23129
|
-
|
|
23130
|
-
|
|
23131
|
-
|
|
23132
|
-
|
|
23133
|
-
|
|
23134
|
-
|
|
23135
|
-
|
|
23136
|
-
|
|
23137
|
-
|
|
23138
|
-
|
|
23139
|
-
|
|
23140
|
-
|
|
23141
|
-
|
|
23142
|
-
|
|
23143
|
-
|
|
23144
|
-
|
|
23145
|
-
|
|
23146
|
-
|
|
23147
|
-
|
|
23148
|
-
|
|
23149
|
-
|
|
23150
|
-
|
|
23151
|
-
|
|
23152
|
-
|
|
23153
|
-
|
|
23154
|
-
|
|
23155
|
-
|
|
23156
|
-
|
|
23157
|
-
|
|
23158
|
-
|
|
23220
|
+
/**
|
|
23221
|
+
* Render 2D Avatar via readyplayer.me POST [](https://docs.readyplayer.me/ready-player-me/avatars/2d-avatars/render-api)
|
|
23222
|
+
* @internal
|
|
23223
|
+
*/
|
|
23224
|
+
this.renderImageFromGlbModel = (data) => {
|
|
23225
|
+
const axios = Network.create({
|
|
23226
|
+
...this.conf
|
|
23227
|
+
});
|
|
23228
|
+
return Validate.responseType(() => axios.post('https://render.readyplayer.me/render', data), ReadyPlayerMe);
|
|
23229
|
+
};
|
|
23230
|
+
/**
|
|
23231
|
+
* POST [/iam/v3/public/namespaces/{namespace}/users/code/request](api)
|
|
23232
|
+
*
|
|
23233
|
+
* This method will validate the request's email address.
|
|
23234
|
+
*
|
|
23235
|
+
* If it already been used, will response 409.
|
|
23236
|
+
*
|
|
23237
|
+
* If it is available, we will send a verification code to this email address.
|
|
23238
|
+
*/
|
|
23239
|
+
this.requestNewUserVerificationCode = (data) => {
|
|
23240
|
+
return this.newInstance().postV3NsUsersCodeRequest(data);
|
|
23241
|
+
};
|
|
23242
|
+
/**
|
|
23243
|
+
* POST [/iam/v4/public/namespaces/{namespace}/users](api)
|
|
23244
|
+
*
|
|
23245
|
+
* Create a new user with unique email address and username.
|
|
23246
|
+
*
|
|
23247
|
+
* __Required attributes:__
|
|
23248
|
+
* - authType: possible value is EMAILPASSWD
|
|
23249
|
+
* - emailAddress: Please refer to the rule from /v3/public/inputValidations API.
|
|
23250
|
+
* - username: Please refer to the rule from /v3/public/inputValidations API.
|
|
23251
|
+
* - password: Please refer to the rule from /v3/public/inputValidations API.
|
|
23252
|
+
* - country: ISO3166-1 alpha-2 two letter, e.g. US.
|
|
23253
|
+
* - dateOfBirth: YYYY-MM-DD, e.g. 1990-01-01. valid values are between 1905-01-01 until current date.
|
|
23254
|
+
*
|
|
23255
|
+
* __Not required attributes:__
|
|
23256
|
+
* - displayName: Please refer to the rule from /v3/public/inputValidations API.
|
|
23257
|
+
*
|
|
23258
|
+
* This method support accepting agreements for the created user. Supply the accepted agreements in acceptedPolicies attribute.
|
|
23259
|
+
*
|
|
23260
|
+
*/
|
|
23261
|
+
this.createUser = (data) => {
|
|
23262
|
+
return this.newInstance4().postV4NsUsers(data);
|
|
23263
|
+
};
|
|
23264
|
+
/**
|
|
23265
|
+
* GET [/iam/v3/public/namespaces/{namespace}/users/{userId}/distinctPlatforms](api)
|
|
23266
|
+
*
|
|
23267
|
+
* This method retrieves platform accounts linked to user.
|
|
23268
|
+
* It will query all linked platform accounts and result will be distinct & grouped, same platform we will pick oldest linked one.
|
|
23269
|
+
* Required valid user authorization.
|
|
23270
|
+
*/
|
|
23271
|
+
this.getUserDistinctLinkedPlatform = (userId) => {
|
|
23272
|
+
return this.newInstance().fetchV3NsUsersByUseridDistinctPlatforms(userId);
|
|
23273
|
+
};
|
|
23274
|
+
/**
|
|
23275
|
+
* DELETE [/iam/v3/public/namespaces/{namespace}/users/me/platforms/{platformId}/all](api)
|
|
23276
|
+
*
|
|
23277
|
+
* Required valid user authorization.
|
|
23278
|
+
* Unlink user's account from for all third platforms.
|
|
23279
|
+
*/
|
|
23280
|
+
this.unLinkAccountFromPlatformDistinct = (platformId) => {
|
|
23281
|
+
return this.newInstance().deleteV3NsUsersMePlatformsByPlatformidAll(platformId);
|
|
23282
|
+
};
|
|
23283
|
+
/**
|
|
23284
|
+
* POST [/iam/v3/public/users/me/verify_link/request](api)
|
|
23285
|
+
*
|
|
23286
|
+
* Required valid user authorization
|
|
23287
|
+
* The verification link is sent to email address
|
|
23288
|
+
* It will not send request if user email is already verified
|
|
23289
|
+
*/
|
|
23290
|
+
this.sendVerificationLink = (languageTag) => {
|
|
23291
|
+
return this.newInstance().postIamV3PublicUsersMeVerifyLinkRequest({ languageTag });
|
|
23292
|
+
};
|
|
23293
|
+
/**
|
|
23294
|
+
* GET [/iam/v3/public/namespaces/{namespace}/users/{userId}/platforms](api)
|
|
23295
|
+
*
|
|
23296
|
+
* This method retrieves platform accounts linked to user. Required valid user authorization.
|
|
23297
|
+
* action code: 10128
|
|
23298
|
+
*/
|
|
23299
|
+
this.getLinkedAccount = (userId) => {
|
|
23300
|
+
return this.newInstance().fetchV3NsUsersByUseridPlatforms(userId);
|
|
23301
|
+
};
|
|
23302
|
+
/**
|
|
23303
|
+
* GET [/iam/v3/public/users/me/headless/link/conflict](api)
|
|
23304
|
+
*
|
|
23305
|
+
* Note:
|
|
23306
|
+
* 1. My account should be full account
|
|
23307
|
+
* 2. My account not linked to request headless account's third platform.
|
|
23308
|
+
*/
|
|
23309
|
+
this.getLinkAccountByOneTimeCodeConflict = (params) => {
|
|
23310
|
+
return this.newInstance().fetchIamV3PublicUsersMeHeadlessLinkConflict(params);
|
|
23311
|
+
};
|
|
23312
|
+
/**
|
|
23313
|
+
* POST [/iam/v3/public/users/me/headless/linkWithProgression](api)
|
|
23314
|
+
*
|
|
23315
|
+
* Note:
|
|
23316
|
+
* 1. My account should be full account
|
|
23317
|
+
* 2. My account not linked to headless account's third platform.
|
|
23318
|
+
*/
|
|
23319
|
+
this.linkWithProgression = (data) => {
|
|
23320
|
+
return this.newInstance().postIamV3PublicUsersMeHeadlessLinkWithProgression(data);
|
|
23321
|
+
};
|
|
23159
23322
|
}
|
|
23160
23323
|
/**
|
|
23161
23324
|
* @internal
|
|
@@ -23312,27 +23475,36 @@ class AgreementApi {
|
|
|
23312
23475
|
this.conf = conf;
|
|
23313
23476
|
this.namespace = namespace;
|
|
23314
23477
|
this.cache = cache;
|
|
23315
|
-
|
|
23316
|
-
|
|
23317
|
-
|
|
23318
|
-
|
|
23319
|
-
|
|
23320
|
-
|
|
23321
|
-
|
|
23322
|
-
|
|
23323
|
-
|
|
23324
|
-
|
|
23325
|
-
|
|
23326
|
-
|
|
23327
|
-
|
|
23328
|
-
|
|
23329
|
-
|
|
23330
|
-
|
|
23331
|
-
|
|
23332
|
-
|
|
23333
|
-
|
|
23334
|
-
|
|
23335
|
-
|
|
23478
|
+
/**
|
|
23479
|
+
* POST [/agreement/public/agreements/policies](api)
|
|
23480
|
+
*
|
|
23481
|
+
* Accepts many legal policy versions all at once. Supply with localized version policy id to accept an agreement.
|
|
23482
|
+
*
|
|
23483
|
+
* _Required permission_: login user
|
|
23484
|
+
*/
|
|
23485
|
+
this.acceptLegalPolicies = (acceptAgreements) => {
|
|
23486
|
+
return this.newInstance().postPublicAgreementsPolicies(acceptAgreements);
|
|
23487
|
+
};
|
|
23488
|
+
/**
|
|
23489
|
+
* GET [/agreement/public/agreements/policies](api)
|
|
23490
|
+
*
|
|
23491
|
+
* Retrieve accepted Legal Agreements.
|
|
23492
|
+
*
|
|
23493
|
+
* _Required permission_: login user
|
|
23494
|
+
*/
|
|
23495
|
+
this.getAgreements = () => {
|
|
23496
|
+
return this.newInstance().fetchPublicAgreementsPolicies();
|
|
23497
|
+
};
|
|
23498
|
+
/**
|
|
23499
|
+
* PATCH [/agreement/public/agreements/localized-policy-versions/preferences](api)
|
|
23500
|
+
*
|
|
23501
|
+
* Change marketing preference consent
|
|
23502
|
+
*
|
|
23503
|
+
* _Required permission_: login user
|
|
23504
|
+
*/
|
|
23505
|
+
this.updateMarketingPreferences = (acceptAgreements) => {
|
|
23506
|
+
return this.newInstance().patchPublicAgreementsLocalizedPolicyVersionsPreferences(acceptAgreements);
|
|
23507
|
+
};
|
|
23336
23508
|
}
|
|
23337
23509
|
newInstance() {
|
|
23338
23510
|
return new Agreement$(Network.create(this.conf), this.namespace, this.cache);
|
|
@@ -23445,13 +23617,16 @@ class EligibilitiesApi {
|
|
|
23445
23617
|
this.conf = conf;
|
|
23446
23618
|
this.namespace = namespace;
|
|
23447
23619
|
this.cache = cache;
|
|
23448
|
-
|
|
23449
|
-
|
|
23450
|
-
|
|
23451
|
-
|
|
23452
|
-
|
|
23453
|
-
|
|
23454
|
-
|
|
23620
|
+
/**
|
|
23621
|
+
* GET [/agreement/public/eligibilities/namespaces/{namespace}](api)
|
|
23622
|
+
*
|
|
23623
|
+
* Retrieve the active policies and its conformance status by user.This process supports cross-namespace checking, that means if the active policy already accepted by the same user in other namespace, then it will be considered as eligible.
|
|
23624
|
+
*
|
|
23625
|
+
* _Required permission_: login user
|
|
23626
|
+
*/
|
|
23627
|
+
this.getUserEligibilities = () => {
|
|
23628
|
+
return this.newInstance().fetchPublicEligibilitiesNamespacesByNamespace();
|
|
23629
|
+
};
|
|
23455
23630
|
}
|
|
23456
23631
|
newInstance() {
|
|
23457
23632
|
return new Eligibilities$(Network.create(this.conf), this.namespace, this.cache);
|
|
@@ -23554,12 +23729,14 @@ class LocalizedPolicyVersionsApi {
|
|
|
23554
23729
|
this.conf = conf;
|
|
23555
23730
|
this.namespace = namespace;
|
|
23556
23731
|
this.cache = cache;
|
|
23557
|
-
|
|
23558
|
-
|
|
23559
|
-
|
|
23560
|
-
|
|
23561
|
-
|
|
23562
|
-
|
|
23732
|
+
/**
|
|
23733
|
+
* GET [/agreement/public/localized-policy-versions/{localizedPolicyVersionId}](api)
|
|
23734
|
+
*
|
|
23735
|
+
* Retrieve specific localized policy version including the policy version and base policy version where the localized policy version located.
|
|
23736
|
+
*/
|
|
23737
|
+
this.fetchLocalizedPolicyVersionById = (localizedPolicyVersionId) => {
|
|
23738
|
+
return this.newInstance().fetchPublicLocalizedPolicyVersionsByLocalizedpolicyversionid(localizedPolicyVersionId);
|
|
23739
|
+
};
|
|
23563
23740
|
}
|
|
23564
23741
|
newInstance() {
|
|
23565
23742
|
return new LocalizedPolicyVersions$(Network.create(this.conf), this.namespace, this.cache);
|
|
@@ -23665,36 +23842,37 @@ class PoliciesApi {
|
|
|
23665
23842
|
this.conf = conf;
|
|
23666
23843
|
this.namespace = namespace;
|
|
23667
23844
|
this.cache = cache;
|
|
23668
|
-
|
|
23669
|
-
|
|
23670
|
-
|
|
23671
|
-
|
|
23672
|
-
|
|
23673
|
-
|
|
23674
|
-
|
|
23675
|
-
|
|
23676
|
-
|
|
23677
|
-
|
|
23678
|
-
|
|
23679
|
-
|
|
23680
|
-
|
|
23681
|
-
|
|
23682
|
-
|
|
23683
|
-
|
|
23684
|
-
|
|
23685
|
-
|
|
23686
|
-
|
|
23687
|
-
|
|
23688
|
-
|
|
23689
|
-
|
|
23690
|
-
|
|
23691
|
-
|
|
23692
|
-
|
|
23693
|
-
|
|
23694
|
-
|
|
23695
|
-
|
|
23696
|
-
|
|
23697
|
-
|
|
23845
|
+
/**
|
|
23846
|
+
* GET [/agreement/public/policies/namespaces/{namespace}/countries/{countryCode}](api)
|
|
23847
|
+
*
|
|
23848
|
+
* Retrieve all active latest policies based on a namespace and country.
|
|
23849
|
+
*
|
|
23850
|
+
* - _Leave the policyType empty if you want to be responded with all policy type_
|
|
23851
|
+
* - _Fill the tags if you want to filter the responded policy by tags_
|
|
23852
|
+
* - _Fill the defaultOnEmpty with true if you want to be responded with default country-specific policy if your requested country is not exist_
|
|
23853
|
+
* - _Fill the alwaysIncludeDefault with true if you want to be responded with always include default policy. If there are duplicate policies (default policies and country specific policies with same base policy) it'll include policy with same country code, for example:_
|
|
23854
|
+
*
|
|
23855
|
+
* - Document 1 (default): Region US (default), UA
|
|
23856
|
+
* - Document 2 (default): Region US (default)
|
|
23857
|
+
* - Document 3 (default): Region US (default)
|
|
23858
|
+
* - User: Region UA
|
|
23859
|
+
* - Query: alwaysIncludeDefault: true
|
|
23860
|
+
* - Response: Document 1 (UA), Document 2 (US), Document 3 (US)
|
|
23861
|
+
*/
|
|
23862
|
+
this.fetchPoliciesByCountry = ({ countryCode, queryParams }) => {
|
|
23863
|
+
return this.newInstance().fetchPublicPoliciesNamespacesByNamespaceCountriesByCountrycode(countryCode, queryParams);
|
|
23864
|
+
};
|
|
23865
|
+
/**
|
|
23866
|
+
* GET [/agreement/public/policies/countries/{countryCode}](api)
|
|
23867
|
+
*
|
|
23868
|
+
* Retrieve all active latest policies based on country from all namespaces.
|
|
23869
|
+
* - _Leave the policyType empty if you want to be responded with all policy type_
|
|
23870
|
+
* - _Fill the tags if you want to filter the responded policy by tags_
|
|
23871
|
+
* - _Fill the defaultOnEmpty with true if you want to be responded with default country-specific policy if your requested country is not exist_
|
|
23872
|
+
*/
|
|
23873
|
+
this.fetchAllPoliciesByCountry = ({ countryCode, queryParams }) => {
|
|
23874
|
+
return this.newInstance().fetchPublicPoliciesCountriesByCountrycode(countryCode, queryParams);
|
|
23875
|
+
};
|
|
23698
23876
|
}
|
|
23699
23877
|
newInstance() {
|
|
23700
23878
|
return new Policies$(Network.create(this.conf), this.namespace, this.cache);
|
|
@@ -23778,12 +23956,21 @@ class PublicTemplateApi {
|
|
|
23778
23956
|
this.conf = conf;
|
|
23779
23957
|
this.namespace = namespace;
|
|
23780
23958
|
this.cache = cache;
|
|
23959
|
+
/**
|
|
23960
|
+
* @internal
|
|
23961
|
+
*/
|
|
23781
23962
|
this.getTemplateConfigs = (template) => {
|
|
23782
23963
|
return this.newInstance().fetchV1NsTemplatesByTemplateConfigs(template);
|
|
23783
23964
|
};
|
|
23965
|
+
/**
|
|
23966
|
+
* @internal
|
|
23967
|
+
*/
|
|
23784
23968
|
this.getTemplateConfig = (template, configId) => {
|
|
23785
23969
|
return this.newInstance().fetchV1NsTemplatesByTemplateConfigsByConfig(template, configId);
|
|
23786
23970
|
};
|
|
23971
|
+
/**
|
|
23972
|
+
* @internal
|
|
23973
|
+
*/
|
|
23787
23974
|
this.getDiscoveryTemplateConfigs = () => {
|
|
23788
23975
|
return this.newInstance().fetchV1NsTemplatesByTemplateConfigs(DISCOVERY_TEMPLATE_NAME);
|
|
23789
23976
|
};
|
|
@@ -23853,7 +24040,10 @@ class CurrencyApi {
|
|
|
23853
24040
|
this.namespace = namespace;
|
|
23854
24041
|
this.cache = cache;
|
|
23855
24042
|
/**
|
|
24043
|
+
* GET [/platform/public/namespaces/{namespace}/currencies](api)
|
|
24044
|
+
*
|
|
23856
24045
|
* List currencies of a namespace.
|
|
24046
|
+
*
|
|
23857
24047
|
* Returns: Currency List
|
|
23858
24048
|
*/
|
|
23859
24049
|
this.getCurrencies = () => {
|
|
@@ -23861,6 +24051,8 @@ class CurrencyApi {
|
|
|
23861
24051
|
};
|
|
23862
24052
|
/**
|
|
23863
24053
|
* Get the currencies list and convert into a map of currency code and the currency itself
|
|
24054
|
+
*
|
|
24055
|
+
* @internal
|
|
23864
24056
|
*/
|
|
23865
24057
|
this.getCurrencyMap = async () => {
|
|
23866
24058
|
const result = await this.getCurrencies();
|
|
@@ -24473,40 +24665,42 @@ class EntitlementApi {
|
|
|
24473
24665
|
this.conf = conf;
|
|
24474
24666
|
this.namespace = namespace;
|
|
24475
24667
|
this.cache = cache;
|
|
24476
|
-
|
|
24477
|
-
|
|
24478
|
-
|
|
24479
|
-
|
|
24480
|
-
|
|
24481
|
-
|
|
24482
|
-
|
|
24483
|
-
|
|
24484
|
-
|
|
24485
|
-
|
|
24486
|
-
|
|
24487
|
-
|
|
24488
|
-
|
|
24489
|
-
|
|
24490
|
-
|
|
24491
|
-
|
|
24492
|
-
|
|
24493
|
-
|
|
24494
|
-
|
|
24495
|
-
|
|
24496
|
-
|
|
24497
|
-
|
|
24498
|
-
|
|
24499
|
-
|
|
24500
|
-
|
|
24501
|
-
|
|
24502
|
-
|
|
24503
|
-
|
|
24504
|
-
|
|
24505
|
-
|
|
24506
|
-
|
|
24507
|
-
|
|
24508
|
-
|
|
24509
|
-
|
|
24668
|
+
/**
|
|
24669
|
+
* GET [/platform/public/namespaces/{namespace}/users/{userId}/entitlements/byAppId](api)
|
|
24670
|
+
*
|
|
24671
|
+
* Get user app entitlement by appId.
|
|
24672
|
+
*/
|
|
24673
|
+
this.getEntitlementByAppId = ({ userId, appId }) => {
|
|
24674
|
+
return this.newInstance().fetchNsUsersByUseridEntitlementsByAppId(userId, {
|
|
24675
|
+
appId
|
|
24676
|
+
});
|
|
24677
|
+
};
|
|
24678
|
+
/**
|
|
24679
|
+
* Query user entitlements for a specific user.
|
|
24680
|
+
* Returns: entitlement list
|
|
24681
|
+
*/
|
|
24682
|
+
this.getEntitlements = ({ userId, queryParams }) => {
|
|
24683
|
+
return this.newInstance().fetchNsUsersByUseridEntitlements(userId, queryParams);
|
|
24684
|
+
};
|
|
24685
|
+
/**
|
|
24686
|
+
* Exists any user active entitlement of specified itemIds, skus and appIds
|
|
24687
|
+
*/
|
|
24688
|
+
this.getEntitlementOwnerShip = ({ userId, queryParams }) => {
|
|
24689
|
+
return this.newInstance().fetchNsUsersByUseridEntitlementsOwnershipAny(userId, queryParams);
|
|
24690
|
+
};
|
|
24691
|
+
/**
|
|
24692
|
+
* Get user entitlement ownership by itemIds.
|
|
24693
|
+
*/
|
|
24694
|
+
this.getEntitlementByItemIds = ({ userId, queryParams }) => {
|
|
24695
|
+
return this.newInstance().fetchNsUsersByUseridEntitlementsOwnershipByItemIds(userId, queryParams);
|
|
24696
|
+
};
|
|
24697
|
+
/**
|
|
24698
|
+
* Consume user entitlement. If the entitlement useCount is 0, the status will be CONSUMED. Client should pass item id in options if entitlement clazz is OPTIONBOX
|
|
24699
|
+
* Returns: consumed entitlement
|
|
24700
|
+
*/
|
|
24701
|
+
this.claimEntitlement = ({ userId, entitlementId, data }) => {
|
|
24702
|
+
return this.newInstance().putNsUsersByUseridEntitlementsByEntitlementidDecrement(userId, entitlementId, data);
|
|
24703
|
+
};
|
|
24510
24704
|
}
|
|
24511
24705
|
newInstance() {
|
|
24512
24706
|
return new Entitlement$(Network.create(this.conf), this.namespace, this.cache);
|
|
@@ -24518,7 +24712,13 @@ class EntitlementApi {
|
|
|
24518
24712
|
* This is licensed software from AccelByte Inc, for limitations
|
|
24519
24713
|
* and restrictions contact your company contract manager.
|
|
24520
24714
|
*/
|
|
24521
|
-
const CreditSummary = mod.object({
|
|
24715
|
+
const CreditSummary = mod.object({
|
|
24716
|
+
walletId: mod.string(),
|
|
24717
|
+
namespace: mod.string(),
|
|
24718
|
+
userId: mod.string(),
|
|
24719
|
+
amount: mod.number().int(),
|
|
24720
|
+
currencyCode: mod.string().nullish()
|
|
24721
|
+
});
|
|
24522
24722
|
|
|
24523
24723
|
/*
|
|
24524
24724
|
* Copyright (c) 2022-2023 AccelByte Inc. All Rights Reserved
|
|
@@ -24528,6 +24728,7 @@ const CreditSummary = mod.object({ walletId: mod.string(), namespace: mod.string
|
|
|
24528
24728
|
const EntitlementSummary = mod.object({
|
|
24529
24729
|
id: mod.string(),
|
|
24530
24730
|
namespace: mod.string(),
|
|
24731
|
+
name: mod.string().nullish(),
|
|
24531
24732
|
userId: mod.string(),
|
|
24532
24733
|
clazz: mod.enum(['APP', 'ENTITLEMENT', 'CODE', 'SUBSCRIPTION', 'MEDIA', 'OPTIONBOX', 'LOOTBOX']),
|
|
24533
24734
|
type: mod.enum(['DURABLE', 'CONSUMABLE']),
|
|
@@ -24606,7 +24807,10 @@ class FulfillmentApi {
|
|
|
24606
24807
|
this.namespace = namespace;
|
|
24607
24808
|
this.cache = cache;
|
|
24608
24809
|
/**
|
|
24609
|
-
*
|
|
24810
|
+
* POST [/platform/public/namespaces/{namespace}/users/{userId}/fulfillment/code](api)
|
|
24811
|
+
*
|
|
24812
|
+
* Redeem campaign code
|
|
24813
|
+
*
|
|
24610
24814
|
* Returns: fulfillment result
|
|
24611
24815
|
*/
|
|
24612
24816
|
this.redeemCode = ({ userId, data }) => {
|
|
@@ -25160,69 +25364,90 @@ class ItemApi {
|
|
|
25160
25364
|
this.conf = conf;
|
|
25161
25365
|
this.namespace = namespace;
|
|
25162
25366
|
this.cache = cache;
|
|
25163
|
-
|
|
25164
|
-
|
|
25165
|
-
|
|
25166
|
-
|
|
25167
|
-
|
|
25168
|
-
|
|
25169
|
-
|
|
25170
|
-
|
|
25171
|
-
|
|
25172
|
-
|
|
25173
|
-
|
|
25174
|
-
|
|
25175
|
-
|
|
25176
|
-
|
|
25177
|
-
|
|
25178
|
-
|
|
25179
|
-
|
|
25180
|
-
|
|
25181
|
-
|
|
25182
|
-
|
|
25183
|
-
|
|
25184
|
-
|
|
25185
|
-
|
|
25186
|
-
|
|
25187
|
-
|
|
25188
|
-
|
|
25189
|
-
|
|
25190
|
-
|
|
25191
|
-
|
|
25192
|
-
|
|
25193
|
-
|
|
25194
|
-
|
|
25195
|
-
|
|
25196
|
-
|
|
25197
|
-
|
|
25198
|
-
|
|
25199
|
-
|
|
25200
|
-
|
|
25201
|
-
|
|
25202
|
-
|
|
25203
|
-
|
|
25204
|
-
}
|
|
25205
|
-
|
|
25206
|
-
|
|
25207
|
-
|
|
25208
|
-
|
|
25209
|
-
|
|
25210
|
-
|
|
25211
|
-
|
|
25212
|
-
|
|
25213
|
-
|
|
25214
|
-
|
|
25215
|
-
|
|
25216
|
-
|
|
25217
|
-
|
|
25218
|
-
|
|
25219
|
-
|
|
25220
|
-
|
|
25221
|
-
|
|
25222
|
-
|
|
25223
|
-
|
|
25224
|
-
|
|
25225
|
-
|
|
25367
|
+
/**
|
|
25368
|
+
* GET [/platform/public/namespaces/{namespace}/items/byAppId](api)
|
|
25369
|
+
*
|
|
25370
|
+
* This API is used to get item by appId
|
|
25371
|
+
*
|
|
25372
|
+
* Returns: the item with that appId
|
|
25373
|
+
*/
|
|
25374
|
+
this.getItemByAppId = ({ ...queryParams }) => {
|
|
25375
|
+
return this.newInstance().fetchNsItemsByAppId(queryParams);
|
|
25376
|
+
};
|
|
25377
|
+
/**
|
|
25378
|
+
* GET [/platform/public/namespaces/{namespace}/items/{itemId}/dynamic](api)
|
|
25379
|
+
*
|
|
25380
|
+
* Get item dynamic data for a published item
|
|
25381
|
+
*
|
|
25382
|
+
* Returns: item dynamic data
|
|
25383
|
+
*/
|
|
25384
|
+
this.getItemByItemIdDynamic = (itemId) => {
|
|
25385
|
+
return this.newInstance().fetchNsItemsByItemidDynamic(itemId);
|
|
25386
|
+
};
|
|
25387
|
+
/**
|
|
25388
|
+
* GET [/platform/public/namespaces/{namespace}/items/byCriteria](api)
|
|
25389
|
+
*/
|
|
25390
|
+
this.fetchItemsByCriteria = ({ queryParams }) => {
|
|
25391
|
+
return this.newInstance().fetchNsItemsByCriteria(queryParams);
|
|
25392
|
+
};
|
|
25393
|
+
/**
|
|
25394
|
+
* GET [/platform/public/namespaces/{namespace}/items/locale/byIds](api)
|
|
25395
|
+
*
|
|
25396
|
+
* This API is used to query items by criteria within a store. If item not exist in specific region, default region item will return.
|
|
25397
|
+
*
|
|
25398
|
+
* Returns: the list of items
|
|
25399
|
+
*/
|
|
25400
|
+
this.getItemsByItemIds = ({ queryParams }) => {
|
|
25401
|
+
return this.newInstance().fetchNsItemsLocaleByIds(queryParams);
|
|
25402
|
+
};
|
|
25403
|
+
// TODO if not used, delete below
|
|
25404
|
+
// /**
|
|
25405
|
+
// * Fetch the items and convert it into a map of `itemId` and its item info
|
|
25406
|
+
// */
|
|
25407
|
+
// fetchAvailableItemInfoMap = async ({ queryParams }: { queryParams: QueryParamsItemIds }) => {
|
|
25408
|
+
// const result = await this.getItemsByItemIds({ queryParams })
|
|
25409
|
+
// if (result.response) {
|
|
25410
|
+
// return {
|
|
25411
|
+
// error: null,
|
|
25412
|
+
// value: result.response.data.reduce((map: Map<string, ItemInfo>, availableItemInfo) => {
|
|
25413
|
+
// const { itemId } = availableItemInfo
|
|
25414
|
+
// if (itemId) {
|
|
25415
|
+
// map.set(itemId, availableItemInfo)
|
|
25416
|
+
// }
|
|
25417
|
+
// return map
|
|
25418
|
+
// }, new Map())
|
|
25419
|
+
// }
|
|
25420
|
+
// }
|
|
25421
|
+
// return result
|
|
25422
|
+
// }
|
|
25423
|
+
/**
|
|
25424
|
+
* GET [/platform/public/namespaces/{namespace}/items/{itemId}/locale](api)
|
|
25425
|
+
*
|
|
25426
|
+
* This API is used to get an item in locale. If item not exist in specific region, default region item will return.
|
|
25427
|
+
*
|
|
25428
|
+
* Returns: item data
|
|
25429
|
+
*/
|
|
25430
|
+
this.getItemsByItemIdLocale = ({ itemId, queryParams }) => {
|
|
25431
|
+
return this.newInstance().fetchNsItemsByItemidLocale(itemId, queryParams);
|
|
25432
|
+
};
|
|
25433
|
+
/**
|
|
25434
|
+
* GET [/platform/public/namespaces/{namespace}/items/{itemId}/app/locale](api)
|
|
25435
|
+
*
|
|
25436
|
+
* This API is used to get an app in locale. If app not exist in specific region, default region app will return.
|
|
25437
|
+
*
|
|
25438
|
+
* Returns: app data
|
|
25439
|
+
*/
|
|
25440
|
+
this.getAppInfoByItemId = ({ itemId, queryParams }) => {
|
|
25441
|
+
return this.newInstance().fetchNsItemsByItemidAppLocale(itemId, queryParams);
|
|
25442
|
+
};
|
|
25443
|
+
/**
|
|
25444
|
+
* POST [/platform/public/namespaces/{namespace}/items/purchase/conditions/validate](api)
|
|
25445
|
+
*
|
|
25446
|
+
* This API is used to validate user item purchase condition
|
|
25447
|
+
*/
|
|
25448
|
+
this.validatePurchaseCondition = (data) => {
|
|
25449
|
+
return this.newInstance().postNsItemsPurchaseConditionsValidate(data);
|
|
25450
|
+
};
|
|
25226
25451
|
}
|
|
25227
25452
|
newInstance() {
|
|
25228
25453
|
return new Item$(Network.create(this.conf), this.namespace, this.cache);
|
|
@@ -25463,36 +25688,102 @@ class OrderApi {
|
|
|
25463
25688
|
this.namespace = namespace;
|
|
25464
25689
|
this.cache = cache;
|
|
25465
25690
|
/**
|
|
25466
|
-
*
|
|
25467
|
-
*
|
|
25691
|
+
* GET [/platform/public/namespaces/{namespace}/users/{userId}/orders](api)
|
|
25692
|
+
*
|
|
25693
|
+
* Query user orders
|
|
25694
|
+
*
|
|
25695
|
+
* Returns a paginated list of `OrderInfo`:
|
|
25696
|
+
* <pre lang="json">{
|
|
25697
|
+
orderNo,
|
|
25698
|
+
paymentOrderNo,
|
|
25699
|
+
namespace,
|
|
25700
|
+
userId,
|
|
25701
|
+
itemId,
|
|
25702
|
+
sandbox,
|
|
25703
|
+
quantity,
|
|
25704
|
+
price,
|
|
25705
|
+
discountedPrice,
|
|
25706
|
+
creationOptions
|
|
25707
|
+
paymentProvider: ('WALLET', 'XSOLLA', 'ADYEN', 'STRIPE', 'CHECKOUT', 'ALIPAY', 'WXPAY', 'PAYPAL'),
|
|
25708
|
+
paymentMethod,
|
|
25709
|
+
tax,
|
|
25710
|
+
vat,
|
|
25711
|
+
salesTax,
|
|
25712
|
+
paymentProviderFee,
|
|
25713
|
+
paymentMethodFee
|
|
25714
|
+
currency: CurrencySummary,
|
|
25715
|
+
paymentStationUrl,
|
|
25716
|
+
itemSnapshot,
|
|
25717
|
+
region,
|
|
25718
|
+
language,
|
|
25719
|
+
status: (
|
|
25720
|
+
'INIT',
|
|
25721
|
+
'CHARGED',
|
|
25722
|
+
'CHARGEBACK',
|
|
25723
|
+
'CHARGEBACK_REVERSED',
|
|
25724
|
+
'FULFILLED',
|
|
25725
|
+
'FULFILL_FAILED',
|
|
25726
|
+
'REFUNDING',
|
|
25727
|
+
'REFUNDED',
|
|
25728
|
+
'REFUND_FAILED',
|
|
25729
|
+
'CLOSED',
|
|
25730
|
+
'DELETED'
|
|
25731
|
+
),
|
|
25732
|
+
statusReason,
|
|
25733
|
+
createdTime,
|
|
25734
|
+
chargedTime,
|
|
25735
|
+
fulfilledTime,
|
|
25736
|
+
refundedTime,
|
|
25737
|
+
chargebackTime,
|
|
25738
|
+
chargebackReversedTime,
|
|
25739
|
+
expireTime,
|
|
25740
|
+
paymentRemainSeconds,
|
|
25741
|
+
ext,
|
|
25742
|
+
totalTax,
|
|
25743
|
+
totalPrice,
|
|
25744
|
+
subtotalPrice,
|
|
25745
|
+
createdAt,
|
|
25746
|
+
updatedAt
|
|
25747
|
+
}</pre>
|
|
25468
25748
|
*/
|
|
25469
25749
|
this.getOrderList = ({ userId, queryParams }) => {
|
|
25470
25750
|
return this.newInstance().fetchNsUsersByUseridOrders(userId, queryParams);
|
|
25471
25751
|
};
|
|
25472
25752
|
/**
|
|
25753
|
+
* GET [/platform/public/namespaces/{namespace}/users/{userId}/orders/{orderNo}](api)
|
|
25754
|
+
*
|
|
25473
25755
|
* Get user order.
|
|
25474
|
-
*
|
|
25756
|
+
*
|
|
25757
|
+
* Returns: `OrderInfo`
|
|
25475
25758
|
*/
|
|
25476
25759
|
this.getOrderByOrderNo = ({ userId, orderNo }) => {
|
|
25477
25760
|
return this.newInstance().fetchNsUsersByUseridOrdersByOrderno(userId, orderNo);
|
|
25478
25761
|
};
|
|
25479
25762
|
/**
|
|
25763
|
+
* PUT [/platform/public/namespaces/{namespace}/users/{userId}/orders/{orderNo}/cancel](api)
|
|
25764
|
+
*
|
|
25480
25765
|
* Cancel user order.
|
|
25481
|
-
*
|
|
25766
|
+
*
|
|
25767
|
+
* Returns: cancelled `OrderInfo`
|
|
25482
25768
|
*/
|
|
25483
25769
|
this.cancelOrder = ({ userId, orderNo }) => {
|
|
25484
25770
|
return this.newInstance().putNsUsersByUseridOrdersByOrdernoCancel(userId, orderNo);
|
|
25485
25771
|
};
|
|
25486
25772
|
/**
|
|
25773
|
+
* POST [/platform/public/namespaces/{namespace}/users/{userId}/orders](api)
|
|
25774
|
+
*
|
|
25487
25775
|
* Create an order. The result contains the checkout link and payment token.
|
|
25488
25776
|
* User with permission SANDBOX will create sandbox order that not real paid for xsolla/alipay and not validate price for wxpay.
|
|
25489
|
-
*
|
|
25777
|
+
*
|
|
25778
|
+
* Returns: created `OrderInfo`
|
|
25490
25779
|
*/
|
|
25491
25780
|
this.createOrder = ({ userId, data }) => {
|
|
25492
25781
|
return this.newInstance().postNsUsersByUseridOrders(userId, data);
|
|
25493
25782
|
};
|
|
25494
25783
|
/**
|
|
25495
25784
|
* Fetch all information needed for a user to check the user's availability to purchase the item
|
|
25785
|
+
*
|
|
25786
|
+
* @internal
|
|
25496
25787
|
*/
|
|
25497
25788
|
this.fetchPrePurchaseInformation = async ({ userId, item }) => {
|
|
25498
25789
|
const currencyApi = new CurrencyApi(this.conf, this.namespace, this.cache);
|
|
@@ -25821,36 +26112,48 @@ class PaymentApi {
|
|
|
25821
26112
|
this.namespace = namespace;
|
|
25822
26113
|
this.cache = cache;
|
|
25823
26114
|
/**
|
|
25824
|
-
*
|
|
25825
|
-
*
|
|
26115
|
+
* GET [/platform/public/namespaces/{namespace}/users/{userId}/payment/accounts](api)
|
|
26116
|
+
*
|
|
26117
|
+
* Get payment accounts.
|
|
26118
|
+
*
|
|
26119
|
+
* Returns: Payment account list `PaymentAccountArray`
|
|
25826
26120
|
*/
|
|
25827
26121
|
this.getPaymentAccounts = (userId) => {
|
|
25828
26122
|
return this.newInstance().fetchNsUsersByUseridPaymentAccounts(userId);
|
|
25829
26123
|
};
|
|
25830
26124
|
/**
|
|
25831
|
-
*
|
|
26125
|
+
* DELETE [/platform/public/namespaces/{namespace}/users/{userId}/payment/accounts/{type}/{id}](api)
|
|
25832
26126
|
*
|
|
25833
|
-
*
|
|
26127
|
+
* Delete payment account.
|
|
25834
26128
|
*/
|
|
25835
26129
|
this.deletePaymentAccount = ({ userId, type, id }) => {
|
|
25836
26130
|
return this.newInstance().deleteNsUsersByUseridPaymentAccountsByTypeById(userId, type, id);
|
|
25837
26131
|
};
|
|
25838
26132
|
/**
|
|
26133
|
+
* GET [/platform/public/namespaces/{namespace}/payment/orders/{paymentOrderNo}/info](api)
|
|
26134
|
+
*
|
|
25839
26135
|
* Get payment order info.
|
|
25840
|
-
*
|
|
26136
|
+
*
|
|
26137
|
+
* Returns: Payment order details `PaymentOrderDetails`
|
|
25841
26138
|
*/
|
|
25842
26139
|
this.getPaymentInfo = (paymentOrderNo) => {
|
|
25843
26140
|
return new PaymentStation$(Network.create(this.conf), this.namespace, this.cache).fetchNsPaymentOrdersByPaymentordernoInfo(paymentOrderNo);
|
|
25844
26141
|
};
|
|
25845
26142
|
/**
|
|
26143
|
+
* POST [/platform/public/namespaces/{namespace}/payment/orders/{paymentOrderNo}/pay](api)
|
|
26144
|
+
*
|
|
25846
26145
|
* Do payment(For now, this only support checkout.com).
|
|
26146
|
+
*
|
|
25847
26147
|
* Returns: Payment process result
|
|
25848
26148
|
*/
|
|
25849
26149
|
this.processPaymentOrder = (paymentOrderNo, data, queryParams) => {
|
|
25850
26150
|
return new PaymentStation$(Network.create(this.conf), this.namespace, this.cache).postNsPaymentOrdersByPaymentordernoPay(paymentOrderNo, data, queryParams);
|
|
25851
26151
|
};
|
|
25852
26152
|
/**
|
|
26153
|
+
* GET [/platform/public/namespaces/{namespace}/payment/publicconfig](api)
|
|
26154
|
+
*
|
|
25853
26155
|
* Get payment provider public config, at current only Strip provide public config.
|
|
26156
|
+
*
|
|
25854
26157
|
* Returns: Public config
|
|
25855
26158
|
*/
|
|
25856
26159
|
this.getPaymentProviderPublicConfig = (paymentProvider, region, sandbox) => {
|
|
@@ -25861,7 +26164,10 @@ class PaymentApi {
|
|
|
25861
26164
|
});
|
|
25862
26165
|
};
|
|
25863
26166
|
/**
|
|
26167
|
+
* GET [/platform/public/namespaces/{namespace}/payment/orders/{paymentOrderNo}/status](api)
|
|
26168
|
+
*
|
|
25864
26169
|
* Check payment order paid status.
|
|
26170
|
+
*
|
|
25865
26171
|
* Returns: Payment order paid result
|
|
25866
26172
|
*/
|
|
25867
26173
|
this.getPaymentOrderStatus = (paymentOrderNo) => {
|
|
@@ -25875,7 +26181,10 @@ class PaymentApi {
|
|
|
25875
26181
|
return new PaymentStation$(Network.create(this.conf), this.namespace, this.cache).fetchNsPaymentMethods({ paymentOrderNo });
|
|
25876
26182
|
};
|
|
25877
26183
|
/**
|
|
26184
|
+
* GET [/platform/public/namespaces/{namespace}/payment/methods](api)
|
|
26185
|
+
*
|
|
25878
26186
|
* Check and get a payment order's should pay tax.
|
|
26187
|
+
*
|
|
25879
26188
|
* Returns: tax result
|
|
25880
26189
|
*/
|
|
25881
26190
|
this.getPaymentTax = (paymentProvider, paymentOrderNo, zipCode) => {
|
|
@@ -25886,7 +26195,10 @@ class PaymentApi {
|
|
|
25886
26195
|
});
|
|
25887
26196
|
};
|
|
25888
26197
|
/**
|
|
26198
|
+
* POST [/platform/public/namespaces/{namespace}/payment/link](api)
|
|
26199
|
+
*
|
|
25889
26200
|
* Get payment url.
|
|
26201
|
+
*
|
|
25890
26202
|
* Returns: Get payment link
|
|
25891
26203
|
*/
|
|
25892
26204
|
this.createPaymentUrl = (data) => {
|
|
@@ -26143,56 +26455,73 @@ class SubscriptionApi {
|
|
|
26143
26455
|
this.conf = conf;
|
|
26144
26456
|
this.namespace = namespace;
|
|
26145
26457
|
this.cache = cache;
|
|
26146
|
-
|
|
26147
|
-
|
|
26148
|
-
|
|
26149
|
-
|
|
26150
|
-
|
|
26151
|
-
|
|
26152
|
-
|
|
26153
|
-
|
|
26154
|
-
|
|
26155
|
-
|
|
26156
|
-
|
|
26157
|
-
|
|
26158
|
-
|
|
26159
|
-
|
|
26160
|
-
|
|
26161
|
-
|
|
26162
|
-
|
|
26163
|
-
|
|
26164
|
-
|
|
26165
|
-
|
|
26166
|
-
|
|
26167
|
-
|
|
26168
|
-
|
|
26169
|
-
|
|
26170
|
-
|
|
26171
|
-
|
|
26172
|
-
|
|
26173
|
-
|
|
26174
|
-
|
|
26175
|
-
|
|
26176
|
-
|
|
26177
|
-
|
|
26178
|
-
|
|
26179
|
-
|
|
26180
|
-
|
|
26181
|
-
|
|
26182
|
-
|
|
26183
|
-
|
|
26184
|
-
|
|
26185
|
-
|
|
26186
|
-
|
|
26187
|
-
|
|
26188
|
-
|
|
26189
|
-
|
|
26190
|
-
|
|
26191
|
-
|
|
26192
|
-
|
|
26193
|
-
|
|
26194
|
-
|
|
26195
|
-
|
|
26458
|
+
/**
|
|
26459
|
+
* GET [/platform/public/namespaces/{namespace}/users/{userId}/subscriptions](api)
|
|
26460
|
+
*
|
|
26461
|
+
* Query user subscriptions.
|
|
26462
|
+
*
|
|
26463
|
+
* Returns: paginated subscription
|
|
26464
|
+
*/
|
|
26465
|
+
this.getUserSubscriptions = ({ userId, queryParams }) => {
|
|
26466
|
+
return this.newInstance().fetchNsUsersByUseridSubscriptions(userId, queryParams);
|
|
26467
|
+
};
|
|
26468
|
+
/**
|
|
26469
|
+
* GET [/platform/public/namespaces/{namespace}/users/{userId}/subscriptions/{subscriptionId}](api)
|
|
26470
|
+
*
|
|
26471
|
+
* Get user subscription.
|
|
26472
|
+
*
|
|
26473
|
+
* Returns: subscription
|
|
26474
|
+
*/
|
|
26475
|
+
this.getUserSubscriptionBySubscriptionId = ({ userId, subscriptionId }) => {
|
|
26476
|
+
return this.newInstance().fetchNsUsersByUseridSubscriptionsBySubscriptionid(userId, subscriptionId);
|
|
26477
|
+
};
|
|
26478
|
+
/**
|
|
26479
|
+
* POST [/platform/public/namespaces/{namespace}/users/{userId}/subscriptions](api)
|
|
26480
|
+
*
|
|
26481
|
+
* Subscribe a subscription. Support both real and virtual payment. Need go through payment flow using the paymentOrderNo if paymentFlowRequired true.
|
|
26482
|
+
* __ACTIVE USER subscription can't do subscribe again.__
|
|
26483
|
+
* __The next billing date will be X(default 4) hours before the current period ends if correctly subscribed.__
|
|
26484
|
+
* User with permission SANDBOX will create sandbox subscription that not real paid.
|
|
26485
|
+
*
|
|
26486
|
+
* Returns: created subscription
|
|
26487
|
+
*/
|
|
26488
|
+
this.createSubscription = ({ userId, data }) => {
|
|
26489
|
+
return this.newInstance().postNsUsersByUseridSubscriptions(userId, data);
|
|
26490
|
+
};
|
|
26491
|
+
/**
|
|
26492
|
+
* GET [/platform/public/namespaces/{namespace}/users/{userId}/subscriptions/{subscriptionId}/history](api)
|
|
26493
|
+
*
|
|
26494
|
+
* Get user subscription billing histories.
|
|
26495
|
+
*
|
|
26496
|
+
* Returns: paginated subscription history
|
|
26497
|
+
*/
|
|
26498
|
+
this.getUserSubscriptionBillingHistory = ({ userId, subscriptionId, queryParams }) => {
|
|
26499
|
+
return this.newInstance().fetchNsUsersByUseridSubscriptionsBySubscriptionidHistory(userId, subscriptionId, queryParams);
|
|
26500
|
+
};
|
|
26501
|
+
/**
|
|
26502
|
+
* PUT [/platform/public/namespaces/{namespace}/users/{userId}/subscriptions/{subscriptionId}/billingAccount](api)
|
|
26503
|
+
*
|
|
26504
|
+
* Request to change a subscription billing account, this will guide user to payment station.
|
|
26505
|
+
* The actual change will happen at the 0 payment notification successfully handled.
|
|
26506
|
+
* Only ACTIVE USER subscription with real currency billing account can be changed.
|
|
26507
|
+
*
|
|
26508
|
+
* Returns: updated subscription
|
|
26509
|
+
*/
|
|
26510
|
+
this.updateUserSubscriptionPaymentMethod = ({ userId, subscriptionId }) => {
|
|
26511
|
+
return this.newInstance().putNsUsersByUseridSubscriptionsBySubscriptionidBillingAccount(userId, subscriptionId);
|
|
26512
|
+
};
|
|
26513
|
+
/**
|
|
26514
|
+
* PUT [/platform/public/namespaces/{namespace}/users/{userId}/subscriptions/{subscriptionId}/cancel](api)
|
|
26515
|
+
*
|
|
26516
|
+
* Cancel a subscription, only ACTIVE subscription can be cancelled.
|
|
26517
|
+
* __Ensure successfully cancel, recommend at least 1 day before current period ends, otherwise it may be charging or charged.__
|
|
26518
|
+
* Set immediate true, the subscription will be terminated immediately, otherwise till the end of current billing cycle.
|
|
26519
|
+
*
|
|
26520
|
+
* Returns: cancelled subscription
|
|
26521
|
+
*/
|
|
26522
|
+
this.cancelUserSubscription = ({ userId, subscriptionId, data }) => {
|
|
26523
|
+
return this.newInstance().putNsUsersByUseridSubscriptionsBySubscriptionidCancel(userId, subscriptionId, data);
|
|
26524
|
+
};
|
|
26196
26525
|
}
|
|
26197
26526
|
newInstance() {
|
|
26198
26527
|
return new Subscription$(Network.create(this.conf), this.namespace, this.cache);
|
|
@@ -26359,9 +26688,12 @@ class WalletApi {
|
|
|
26359
26688
|
this.namespace = namespace;
|
|
26360
26689
|
this.cache = cache;
|
|
26361
26690
|
/**
|
|
26691
|
+
* GET [/platform/public/namespaces/{namespace}/users/me/wallets/{currencyCode}](api)
|
|
26692
|
+
*
|
|
26362
26693
|
* get my wallet by currency code and namespace.
|
|
26363
26694
|
*
|
|
26364
26695
|
* Returns: wallet info
|
|
26696
|
+
*
|
|
26365
26697
|
* Path's namespace:
|
|
26366
26698
|
* - can be filled with __publisher namespace__ in order to get __publisher user wallet__
|
|
26367
26699
|
* - can be filled with __game namespace__ in order to get __game user wallet__
|
|
@@ -26370,7 +26702,10 @@ class WalletApi {
|
|
|
26370
26702
|
return this.newInstance().fetchNsUsersMeWalletsByCurrencycode(currencyCode);
|
|
26371
26703
|
};
|
|
26372
26704
|
/**
|
|
26705
|
+
* GET [/platform/public/namespaces/{namespace}/users/{userId}/wallets/{currencyCode}](api)
|
|
26706
|
+
*
|
|
26373
26707
|
* Get a wallet by currency code.
|
|
26708
|
+
*
|
|
26374
26709
|
* Returns: wallet info
|
|
26375
26710
|
*/
|
|
26376
26711
|
this.getWalletByUserId = (userId, currencyCode) => {
|
|
@@ -26378,6 +26713,7 @@ class WalletApi {
|
|
|
26378
26713
|
};
|
|
26379
26714
|
/**
|
|
26380
26715
|
* get a map of wallet represented by its currency code
|
|
26716
|
+
* @internal
|
|
26381
26717
|
*/
|
|
26382
26718
|
this.getWalletMap = async ({ userId, currencyCodes }) => {
|
|
26383
26719
|
try {
|
|
@@ -26568,7 +26904,63 @@ const injectErrorInterceptors = (baseUrl, onUserEligibilityChange, onError) => {
|
|
|
26568
26904
|
var version="x.y.z";var build$1="x.y.z";var timestamp="x.y.z";var buildInfo = {version:version,build:build$1,timestamp:timestamp};
|
|
26569
26905
|
|
|
26570
26906
|
/*
|
|
26571
|
-
* Copyright (c)
|
|
26907
|
+
* Copyright (c) 2023 AccelByte Inc. All Rights Reserved
|
|
26908
|
+
* This is licensed software from AccelByte Inc, for limitations
|
|
26909
|
+
* and restrictions contact your company contract manager.
|
|
26910
|
+
*/
|
|
26911
|
+
var BasicVersion = { name: 'justice-basic-service', version: '2.6.0', buildDate: '2023-02-21T19:51:38.655Z' };
|
|
26912
|
+
|
|
26913
|
+
/*
|
|
26914
|
+
* Copyright (c) 2023 AccelByte Inc. All Rights Reserved
|
|
26915
|
+
* This is licensed software from AccelByte Inc, for limitations
|
|
26916
|
+
* and restrictions contact your company contract manager.
|
|
26917
|
+
*/
|
|
26918
|
+
var BuildinfoVersion = { name: 'justice-buildinfo-service', version: '3.28.2', buildDate: '2023-02-21T19:51:38.678Z' };
|
|
26919
|
+
|
|
26920
|
+
/*
|
|
26921
|
+
* Copyright (c) 2023 AccelByte Inc. All Rights Reserved
|
|
26922
|
+
* This is licensed software from AccelByte Inc, for limitations
|
|
26923
|
+
* and restrictions contact your company contract manager.
|
|
26924
|
+
*/
|
|
26925
|
+
var EventVersion = { name: 'justice-event-log-service', version: undefined, buildDate: '2023-02-21T19:51:38.687Z' };
|
|
26926
|
+
|
|
26927
|
+
/*
|
|
26928
|
+
* Copyright (c) 2023 AccelByte Inc. All Rights Reserved
|
|
26929
|
+
* This is licensed software from AccelByte Inc, for limitations
|
|
26930
|
+
* and restrictions contact your company contract manager.
|
|
26931
|
+
*/
|
|
26932
|
+
var GdprVersion = { name: 'justice-gdpr-service', version: '1.19.1', buildDate: '2023-02-21T19:51:38.692Z' };
|
|
26933
|
+
|
|
26934
|
+
/*
|
|
26935
|
+
* Copyright (c) 2023 AccelByte Inc. All Rights Reserved
|
|
26936
|
+
* This is licensed software from AccelByte Inc, for limitations
|
|
26937
|
+
* and restrictions contact your company contract manager.
|
|
26938
|
+
*/
|
|
26939
|
+
var IamVersion = { name: 'justice-iam-service', version: '5.28.0', buildDate: '2023-02-21T19:51:38.699Z' };
|
|
26940
|
+
|
|
26941
|
+
/*
|
|
26942
|
+
* Copyright (c) 2023 AccelByte Inc. All Rights Reserved
|
|
26943
|
+
* This is licensed software from AccelByte Inc, for limitations
|
|
26944
|
+
* and restrictions contact your company contract manager.
|
|
26945
|
+
*/
|
|
26946
|
+
var LegalVersion = { name: 'justice-legal-service', version: '1.27.0', buildDate: '2023-02-21T19:51:38.669Z' };
|
|
26947
|
+
|
|
26948
|
+
/*
|
|
26949
|
+
* Copyright (c) 2023 AccelByte Inc. All Rights Reserved
|
|
26950
|
+
* This is licensed software from AccelByte Inc, for limitations
|
|
26951
|
+
* and restrictions contact your company contract manager.
|
|
26952
|
+
*/
|
|
26953
|
+
var OdinConfigVersion = { name: 'config-service-app', version: 'dev', buildDate: '2023-02-21T19:51:38.691Z' };
|
|
26954
|
+
|
|
26955
|
+
/*
|
|
26956
|
+
* Copyright (c) 2023 AccelByte Inc. All Rights Reserved
|
|
26957
|
+
* This is licensed software from AccelByte Inc, for limitations
|
|
26958
|
+
* and restrictions contact your company contract manager.
|
|
26959
|
+
*/
|
|
26960
|
+
var PlatformVersion = { name: 'justice-platform-service', version: '4.24.0', buildDate: '2023-02-21T19:51:38.742Z' };
|
|
26961
|
+
|
|
26962
|
+
/*
|
|
26963
|
+
* Copyright (c) 2022-2023 AccelByte Inc. All Rights Reserved
|
|
26572
26964
|
* This is licensed software from AccelByte Inc, for limitations
|
|
26573
26965
|
* and restrictions contact your company contract manager.
|
|
26574
26966
|
*/
|
|
@@ -26645,18 +27037,21 @@ class AccelbyteSDKFactory {
|
|
|
26645
27037
|
OAuth: (overrides) => ApiFactory.oauthApi(this.config, this.options, this.options.namespace, this.override(overrides)),
|
|
26646
27038
|
InputValidation: (overrides) => ApiFactory.inputValidationApi(this.config, this.options.namespace, this.override(overrides)),
|
|
26647
27039
|
ThirdPartyCredential: (overrides) => ApiFactory.thirdPartyCredentialApi(this.config, this.options.namespace, this.override(overrides)),
|
|
26648
|
-
TwoFA: (overrides) => ApiFactory.twoFA(this.config, this.options.namespace, this.override(overrides))
|
|
27040
|
+
TwoFA: (overrides) => ApiFactory.twoFA(this.config, this.options.namespace, this.override(overrides)),
|
|
27041
|
+
version: IamVersion
|
|
26649
27042
|
},
|
|
26650
27043
|
BuildInfo: {
|
|
26651
27044
|
Downloader: (overrides) => ApiFactory.downloaderApi(this.config, this.options.namespace, this.override(overrides)),
|
|
26652
27045
|
Caching: (overrides) => ApiFactory.cachingApi(this.config, this.options.namespace, this.override(overrides)),
|
|
26653
|
-
DLC: (overrides) => ApiFactory.dlcApi(this.config, this.options.namespace, this.override(overrides))
|
|
27046
|
+
DLC: (overrides) => ApiFactory.dlcApi(this.config, this.options.namespace, this.override(overrides)),
|
|
27047
|
+
version: BuildinfoVersion
|
|
26654
27048
|
},
|
|
26655
27049
|
Basic: {
|
|
26656
27050
|
Misc: (overrides) => ApiFactory.miscApi(this.config, this.options.namespace, this.override(overrides)),
|
|
26657
27051
|
UserProfile: (overrides) => ApiFactory.userProfileApi(this.config, this.options.namespace, this.override(overrides)),
|
|
26658
27052
|
FileUpload: (overrides) => ApiFactory.fileUploadApi(this.config, this.options.namespace, this.override(overrides)),
|
|
26659
|
-
Namespace: (overrides) => ApiFactory.namespaceApi(this.config, this.options.namespace, this.override(overrides))
|
|
27053
|
+
Namespace: (overrides) => ApiFactory.namespaceApi(this.config, this.options.namespace, this.override(overrides)),
|
|
27054
|
+
version: BasicVersion
|
|
26660
27055
|
},
|
|
26661
27056
|
Platform: {
|
|
26662
27057
|
Currency: (overrides) => ApiFactory.currencyApi(this.config, this.options.namespace, this.override(overrides)),
|
|
@@ -26666,23 +27061,37 @@ class AccelbyteSDKFactory {
|
|
|
26666
27061
|
Order: (overrides) => ApiFactory.orderApi(this.config, this.options.namespace, this.override(overrides)),
|
|
26667
27062
|
Payment: (overrides) => ApiFactory.paymentApi(this.config, this.options.namespace, this.override(overrides)),
|
|
26668
27063
|
Subscription: (overrides) => ApiFactory.subscriptionApi(this.config, this.options.namespace, this.override(overrides)),
|
|
26669
|
-
Wallet: (overrides) => ApiFactory.walletApi(this.config, this.options.namespace, this.override(overrides))
|
|
27064
|
+
Wallet: (overrides) => ApiFactory.walletApi(this.config, this.options.namespace, this.override(overrides)),
|
|
27065
|
+
version: PlatformVersion
|
|
26670
27066
|
},
|
|
26671
27067
|
Legal: {
|
|
26672
27068
|
Eligibilities: (overrides) => ApiFactory.eligibillitiesApi(this.config, this.options.namespace, this.override(overrides)),
|
|
26673
27069
|
Agreement: (overrides) => ApiFactory.agreementApi(this.config, this.options.namespace, this.override(overrides)),
|
|
26674
27070
|
Policies: (overrides) => ApiFactory.policiesApi(this.config, this.options.namespace, this.override(overrides)),
|
|
26675
|
-
LocalizedPolicyVersions: (overrides) => ApiFactory.localizedPolicyVersionsApi(this.config, this.options.namespace, this.override(overrides))
|
|
27071
|
+
LocalizedPolicyVersions: (overrides) => ApiFactory.localizedPolicyVersionsApi(this.config, this.options.namespace, this.override(overrides)),
|
|
27072
|
+
version: LegalVersion
|
|
26676
27073
|
},
|
|
26677
27074
|
GDPR: {
|
|
26678
27075
|
DataDeletion: (overrides) => ApiFactory.dataDeletionApi(this.config, this.options.namespace, this.override(overrides)),
|
|
26679
|
-
DataRetrieval: (overrides) => ApiFactory.dataRetrievalApi(this.config, this.options.namespace, this.override(overrides))
|
|
27076
|
+
DataRetrieval: (overrides) => ApiFactory.dataRetrievalApi(this.config, this.options.namespace, this.override(overrides)),
|
|
27077
|
+
version: GdprVersion
|
|
26680
27078
|
},
|
|
26681
27079
|
Event: {
|
|
26682
|
-
Event: (overrides) => ApiFactory.eventApi(this.config, this.options.namespace, this.override(overrides))
|
|
27080
|
+
Event: (overrides) => ApiFactory.eventApi(this.config, this.options.namespace, this.override(overrides)),
|
|
27081
|
+
version: EventVersion
|
|
26683
27082
|
},
|
|
26684
27083
|
AccelbyteConfig: {
|
|
26685
|
-
PublicTemplate: (overrides) => ApiFactory.publicTemplateApi(this.config, this.options.namespace, this.override(overrides))
|
|
27084
|
+
PublicTemplate: (overrides) => ApiFactory.publicTemplateApi(this.config, this.options.namespace, this.override(overrides)),
|
|
27085
|
+
version: OdinConfigVersion
|
|
27086
|
+
},
|
|
27087
|
+
version: () => {
|
|
27088
|
+
console.log('IamVersion: ', IamVersion.version);
|
|
27089
|
+
console.log('BuildinfoVersion: ', BuildinfoVersion.version);
|
|
27090
|
+
console.log('BasicVersion: ', BasicVersion.version);
|
|
27091
|
+
console.log('PlatformVersion: ', PlatformVersion.version);
|
|
27092
|
+
console.log('LegalVersion: ', LegalVersion.version);
|
|
27093
|
+
console.log('GdprVersion: ', GdprVersion.version);
|
|
27094
|
+
console.log('EventVersion: ', EventVersion.version);
|
|
26686
27095
|
}
|
|
26687
27096
|
};
|
|
26688
27097
|
}
|
|
@@ -27833,7 +28242,7 @@ const InviteUserRequestV4 = mod.object({
|
|
|
27833
28242
|
assignedNamespaces: mod.array(mod.string()),
|
|
27834
28243
|
emailAddresses: mod.array(mod.string()),
|
|
27835
28244
|
isAdmin: mod.boolean(),
|
|
27836
|
-
namespace: mod.string(),
|
|
28245
|
+
namespace: mod.string().nullish(),
|
|
27837
28246
|
roleId: mod.string()
|
|
27838
28247
|
});
|
|
27839
28248
|
|
|
@@ -28361,7 +28770,7 @@ const ThirdPartyLoginPlatformCredentialRequest = mod.object({
|
|
|
28361
28770
|
ACSURL: mod.string(),
|
|
28362
28771
|
AWSCognitoRegion: mod.string(),
|
|
28363
28772
|
AWSCognitoUserPool: mod.string(),
|
|
28364
|
-
AllowedClients: mod.array(mod.string()),
|
|
28773
|
+
AllowedClients: mod.array(mod.string()).nullish(),
|
|
28365
28774
|
AppId: mod.string(),
|
|
28366
28775
|
AuthorizationEndpoint: mod.string(),
|
|
28367
28776
|
ClientId: mod.string(),
|
|
@@ -28380,7 +28789,7 @@ const ThirdPartyLoginPlatformCredentialRequest = mod.object({
|
|
|
28380
28789
|
Secret: mod.string(),
|
|
28381
28790
|
TeamID: mod.string(),
|
|
28382
28791
|
TokenAuthenticationType: mod.string(),
|
|
28383
|
-
TokenClaimsMapping: mod.record(mod.string()),
|
|
28792
|
+
TokenClaimsMapping: mod.record(mod.string()).nullish(),
|
|
28384
28793
|
TokenEndpoint: mod.string(),
|
|
28385
28794
|
UserInfoEndpoint: mod.string(),
|
|
28386
28795
|
UserInfoHTTPMethod: mod.string(),
|
|
@@ -39925,7 +40334,6 @@ exports.BlockDownloadUrls = BlockDownloadUrls;
|
|
|
39925
40334
|
exports.BlockDownloadUrlsRequest = BlockDownloadUrlsRequest;
|
|
39926
40335
|
exports.BlockManifest = BlockManifest;
|
|
39927
40336
|
exports.BoxItem = BoxItem;
|
|
39928
|
-
exports.BrowserHelper = BrowserHelper;
|
|
39929
40337
|
exports.BuildAvailability = BuildAvailability;
|
|
39930
40338
|
exports.BuildAvailabilityArray = BuildAvailabilityArray;
|
|
39931
40339
|
exports.BuildDeletionData = BuildDeletionData;
|
|
@@ -40042,6 +40450,7 @@ exports.DeletionData = DeletionData;
|
|
|
40042
40450
|
exports.DeletionStatus = DeletionStatus;
|
|
40043
40451
|
exports.DependencyObject = DependencyObject;
|
|
40044
40452
|
exports.Description = Description;
|
|
40453
|
+
exports.DesktopChecker = DesktopChecker;
|
|
40045
40454
|
exports.DetailedWalletTransactionInfo = DetailedWalletTransactionInfo;
|
|
40046
40455
|
exports.DetailedWalletTransactionPagingSlicedResult = DetailedWalletTransactionPagingSlicedResult;
|
|
40047
40456
|
exports.DeviceBanRequestV4 = DeviceBanRequestV4;
|