@accelbyte/sdk 0.2.0-beta.2 → 0.2.0-beta.4
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 +8 -0
- package/README.md +5 -2
- package/dist/index.browser.es.js +400 -313
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.d.ts +398 -312
- package/dist/index.node.es.js +400 -313
- package/dist/index.node.es.js.map +1 -1
- package/dist/index.node.js +400 -313
- package/dist/index.node.js.map +1 -1
- package/examples/next/package.json +1 -1
- package/examples/next/yarn.lock +4 -4
- package/examples/node/package.json +1 -1
- package/examples/node/yarn.lock +4 -4
- package/examples/vite/package.json +1 -1
- package/examples/vite/yarn.lock +4 -4
- package/package.json +1 -1
package/dist/index.node.js
CHANGED
|
@@ -9543,7 +9543,8 @@ class FileUploadApi {
|
|
|
9543
9543
|
this.conf = conf;
|
|
9544
9544
|
this.namespace = namespace;
|
|
9545
9545
|
/**
|
|
9546
|
-
* Generate an upload URL. It's valid for 10 minutes
|
|
9546
|
+
* Generate an upload URL. It's valid for 10 minutes.
|
|
9547
|
+
* Returns: URL data
|
|
9547
9548
|
*/
|
|
9548
9549
|
this.generateFolderUploadFileUrl = ({ folder, queryParams }) => {
|
|
9549
9550
|
return this.newInstance().postV1NsFoldersByFolderFiles(folder, queryParams);
|
|
@@ -9664,7 +9665,8 @@ class MiscApi {
|
|
|
9664
9665
|
this.namespace = namespace;
|
|
9665
9666
|
this.cache = cache;
|
|
9666
9667
|
/**
|
|
9667
|
-
* List countries
|
|
9668
|
+
* List countries.
|
|
9669
|
+
* - _Returns_: country code list
|
|
9668
9670
|
*/
|
|
9669
9671
|
this.getCountries = (lang) => {
|
|
9670
9672
|
return this.newInstance().fetchV1NsMiscCountries({ lang });
|
|
@@ -9758,7 +9760,12 @@ class NamespaceApi {
|
|
|
9758
9760
|
this.namespace = namespace;
|
|
9759
9761
|
this.cache = cache;
|
|
9760
9762
|
/**
|
|
9761
|
-
* Get all namespaces
|
|
9763
|
+
* Get all namespaces.
|
|
9764
|
+
*
|
|
9765
|
+
* Other detail info:
|
|
9766
|
+
* - _Required permission_: login user
|
|
9767
|
+
* - _Action code_: 11303
|
|
9768
|
+
* - _Returns_: list of namespaces
|
|
9762
9769
|
*/
|
|
9763
9770
|
this.getNamespaces = (activeOnly) => {
|
|
9764
9771
|
return this.newInstance().fetchV1PublicNamespaces({ activeOnly });
|
|
@@ -10065,25 +10072,31 @@ class UserProfileApi {
|
|
|
10065
10072
|
this.namespace = namespace;
|
|
10066
10073
|
this.cache = cache;
|
|
10067
10074
|
/**
|
|
10068
|
-
* Get my profile
|
|
10075
|
+
* Get my profile
|
|
10076
|
+
*
|
|
10077
|
+
* __Client with user token can get user profile in target namespace__
|
|
10069
10078
|
*/
|
|
10070
10079
|
this.getUsersMeProfiles = () => {
|
|
10071
10080
|
return this.newInstance().fetchV1NsUsersMeProfiles();
|
|
10072
10081
|
};
|
|
10073
10082
|
/**
|
|
10074
|
-
* Create my profile
|
|
10083
|
+
* Create my profile.
|
|
10084
|
+
*
|
|
10085
|
+
* __Client with user token can create user profile in target namespace__
|
|
10075
10086
|
*/
|
|
10076
10087
|
this.createUserMeProfile = (data) => {
|
|
10077
10088
|
return this.newInstance().postV1NsUsersMeProfiles(data);
|
|
10078
10089
|
};
|
|
10079
10090
|
/**
|
|
10080
|
-
* Update my profile
|
|
10091
|
+
* Update my profile.
|
|
10092
|
+
* 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.
|
|
10081
10093
|
*/
|
|
10082
10094
|
this.updateUserMeProfile = (data) => {
|
|
10083
10095
|
return this.newInstance().putV1NsUsersMeProfiles(data);
|
|
10084
10096
|
};
|
|
10085
10097
|
/**
|
|
10086
|
-
* Update partially custom attributes tied to user id
|
|
10098
|
+
* Update partially custom attributes tied to user id.
|
|
10099
|
+
* _Returns_: Updated custom attributes
|
|
10087
10100
|
*/
|
|
10088
10101
|
this.updateUserCustomAttributes = (userId, data) => {
|
|
10089
10102
|
return this.newInstance().putV1NsUsersByUseridProfilesCustomAttributes(userId, data);
|
|
@@ -10152,7 +10165,11 @@ class CachingApi {
|
|
|
10152
10165
|
this.namespace = namespace;
|
|
10153
10166
|
}
|
|
10154
10167
|
/**
|
|
10155
|
-
* This API is used to retrieve detailed diff cache
|
|
10168
|
+
* This API is used to retrieve detailed diff cache.
|
|
10169
|
+
* The response will contains list of diff cache files along with its download url.
|
|
10170
|
+
*
|
|
10171
|
+
* Other detail info:
|
|
10172
|
+
* - _Required permission_: login user
|
|
10156
10173
|
*/
|
|
10157
10174
|
getDiffCache(sourceBuildId, destinationBuildId) {
|
|
10158
10175
|
return this.newInstance().fetchNsDiffCacheSourceBySourcebuildidDestByDestinationbuildid(sourceBuildId, destinationBuildId);
|
|
@@ -10331,13 +10348,16 @@ class DlcApi {
|
|
|
10331
10348
|
this.namespace = namespace;
|
|
10332
10349
|
}
|
|
10333
10350
|
/**
|
|
10334
|
-
* Retrieve the list of DLC available on specific game. Use game's appId to query
|
|
10351
|
+
* Retrieve the list of DLC available on specific game. Use game's appId to query.
|
|
10352
|
+
*
|
|
10353
|
+
* - _Returns_: list of DLC
|
|
10335
10354
|
*/
|
|
10336
10355
|
getLatestDLCByGameAppId(appId) {
|
|
10337
10356
|
return this.newInstance().fetchNsDlcsLatestByGameAppIdByAppid(appId);
|
|
10338
10357
|
}
|
|
10339
10358
|
/**
|
|
10340
|
-
* Retrieve the list of DLC available on specific game. Use DLC's appId to query
|
|
10359
|
+
* Retrieve the list of DLC available on specific game. Use DLC's appId to query.
|
|
10360
|
+
* - _Returns_: appId of game and list of its builds by platformId
|
|
10341
10361
|
*/
|
|
10342
10362
|
getBaseGamesByDlcAppId(dlcAppId) {
|
|
10343
10363
|
return this.newInstance().fetchNsAppsLatestByDlcAppIdByDlcappid(dlcAppId);
|
|
@@ -10709,20 +10729,30 @@ class DownloaderApi {
|
|
|
10709
10729
|
this.namespace = namespace;
|
|
10710
10730
|
}
|
|
10711
10731
|
/**
|
|
10712
|
-
* This API is used to get simple build manifest that contains list of current build in various platform
|
|
10732
|
+
* This API is used to get simple build manifest that contains list of current build in various platform.
|
|
10733
|
+
* Other detail info:
|
|
10734
|
+
* - _Required permission_: login user
|
|
10735
|
+
* - _Returns_: build manifest
|
|
10713
10736
|
*/
|
|
10714
10737
|
getAvailableBuilds(appId) {
|
|
10715
10738
|
return this.newInstance().fetchNsAvailablebuildsByAppid(appId);
|
|
10716
10739
|
}
|
|
10717
10740
|
/**
|
|
10718
|
-
* This API is used to get build manifest of release version of the application
|
|
10741
|
+
* This API is used to get build manifest of release version of the application.
|
|
10742
|
+
*
|
|
10743
|
+
* Other detail info:
|
|
10744
|
+
* - _Required permission_: login user
|
|
10745
|
+
* - _Returns_: build manifest
|
|
10719
10746
|
*/
|
|
10720
10747
|
getBuildManifest(appId, platformId) {
|
|
10721
10748
|
const axios = Network.create({ ...this.conf, timeout: 1800000 });
|
|
10722
10749
|
return new Downloader$(axios, this.namespace, false).fetchNsV2UpdategameByAppidByPlatformid(appId, platformId);
|
|
10723
10750
|
}
|
|
10724
10751
|
/**
|
|
10725
|
-
* This API is used to retrieve detailed diff cache
|
|
10752
|
+
* This API is used to retrieve detailed diff cache.
|
|
10753
|
+
* The response will contains list of diff cache files along with its download url.
|
|
10754
|
+
*
|
|
10755
|
+
* - _Required permission_: login user
|
|
10726
10756
|
*/
|
|
10727
10757
|
getDiffCache(sourceBuildId, destinationBuildId) {
|
|
10728
10758
|
return new Caching$(Network.create(this.conf), this.namespace, false).fetchNsDiffCacheSourceBySourcebuildidDestByDestinationbuildid(sourceBuildId, destinationBuildId);
|
|
@@ -10860,16 +10890,15 @@ class EventApi {
|
|
|
10860
10890
|
this.namespace = namespace;
|
|
10861
10891
|
this.cache = cache;
|
|
10862
10892
|
/**
|
|
10863
|
-
*
|
|
10864
|
-
*
|
|
10865
|
-
*
|
|
10866
|
-
*
|
|
10867
|
-
*
|
|
10868
|
-
*
|
|
10869
|
-
*
|
|
10870
|
-
*
|
|
10871
|
-
*
|
|
10872
|
-
* <p>Requires a valid user access token</p>
|
|
10893
|
+
* Available Type:
|
|
10894
|
+
* - email
|
|
10895
|
+
* - password
|
|
10896
|
+
* - displayname
|
|
10897
|
+
* - dateofbirth
|
|
10898
|
+
* - country
|
|
10899
|
+
* - language
|
|
10900
|
+
*
|
|
10901
|
+
* Requires a valid user access token
|
|
10873
10902
|
*/
|
|
10874
10903
|
this.getAccountHistoryByUserId = ({ userId, queryParams }) => {
|
|
10875
10904
|
return this.newInstance().fetchEventV2NsUsersByUseridEdithistory(userId, queryParams);
|
|
@@ -10965,22 +10994,22 @@ class DataDeletionApi {
|
|
|
10965
10994
|
this.cache = cache;
|
|
10966
10995
|
}
|
|
10967
10996
|
/**
|
|
10968
|
-
*
|
|
10969
|
-
*
|
|
10997
|
+
* Fetch the status to check whether or not a user's account is on a deletion status
|
|
10998
|
+
* Requires valid user access token
|
|
10970
10999
|
*/
|
|
10971
11000
|
getGdprDeletionStatus(userId) {
|
|
10972
11001
|
return this.newInstance().fetchGdprNsUsersByUseridDeletionsStatus(userId);
|
|
10973
11002
|
}
|
|
10974
11003
|
/**
|
|
10975
|
-
*
|
|
10976
|
-
*
|
|
11004
|
+
* Request an account's deletion
|
|
11005
|
+
* Requires valid user access token and password
|
|
10977
11006
|
*/
|
|
10978
11007
|
requestAccountDeletion({ userId, data }) {
|
|
10979
11008
|
return this.newInstance().postGdprNsUsersByUseridDeletions(userId, data);
|
|
10980
11009
|
}
|
|
10981
11010
|
/**
|
|
10982
|
-
*
|
|
10983
|
-
*
|
|
11011
|
+
* Cancel a deletion request
|
|
11012
|
+
* Requires valid user access token
|
|
10984
11013
|
*/
|
|
10985
11014
|
cancelAccountDeletion(userId) {
|
|
10986
11015
|
return this.newInstance().deleteGdprNsUsersByUseridDeletions(userId);
|
|
@@ -11106,29 +11135,29 @@ class DataRetrievalApi {
|
|
|
11106
11135
|
this.cache = cache;
|
|
11107
11136
|
}
|
|
11108
11137
|
/**
|
|
11109
|
-
*
|
|
11110
|
-
*
|
|
11138
|
+
* Fetch personal data request list
|
|
11139
|
+
* Requires valid user access token
|
|
11111
11140
|
*/
|
|
11112
11141
|
getGdprDataRequestList({ userId, queryParams }) {
|
|
11113
11142
|
return this.newInstance().fetchGdprNsUsersByUseridRequests(userId, queryParams);
|
|
11114
11143
|
}
|
|
11115
11144
|
/**
|
|
11116
|
-
*
|
|
11117
|
-
*
|
|
11145
|
+
* Create a request for personal data download
|
|
11146
|
+
* Requires valid user access token
|
|
11118
11147
|
*/
|
|
11119
11148
|
requestGdprData({ userId, data }) {
|
|
11120
11149
|
return this.newInstance().postGdprNsUsersByUseridRequests(userId, data);
|
|
11121
11150
|
}
|
|
11122
11151
|
/**
|
|
11123
|
-
*
|
|
11124
|
-
*
|
|
11152
|
+
* Cancel the request for personal data dowwnload
|
|
11153
|
+
* Requires valid user access token
|
|
11125
11154
|
*/
|
|
11126
11155
|
cancelGdprDataRequest({ userId, requestDate }) {
|
|
11127
11156
|
return this.newInstance().deleteGdprNsUsersByUseridRequestsByRequestdate(userId, requestDate);
|
|
11128
11157
|
}
|
|
11129
11158
|
/**
|
|
11130
|
-
*
|
|
11131
|
-
*
|
|
11159
|
+
* Create a download URL for personal data request
|
|
11160
|
+
* Requires valid user access token
|
|
11132
11161
|
*/
|
|
11133
11162
|
requestGdprDataDownloadUrl({ userId, requestDate, data }) {
|
|
11134
11163
|
return this.newInstance().postGdprNsUsersByUseridRequestsByRequestdateGenerate(userId, requestDate, data);
|
|
@@ -11224,9 +11253,9 @@ class InputValidationsApi {
|
|
|
11224
11253
|
this.namespace = namespace;
|
|
11225
11254
|
this.cache = cache;
|
|
11226
11255
|
/**
|
|
11227
|
-
*
|
|
11228
|
-
*
|
|
11229
|
-
*
|
|
11256
|
+
* No role required
|
|
11257
|
+
* This method is to get list of input validation configuration.
|
|
11258
|
+
* `regex` parameter will be returned if `isCustomRegex` is true. Otherwise, it will be empty.
|
|
11230
11259
|
*
|
|
11231
11260
|
*/
|
|
11232
11261
|
this.getValidations = (languageCode, defaultOnEmpty) => {
|
|
@@ -20193,7 +20222,7 @@ class LoginErrorUnknown extends Error {
|
|
|
20193
20222
|
}
|
|
20194
20223
|
class LoginErrorUnmatchedState extends Error {
|
|
20195
20224
|
}
|
|
20196
|
-
class
|
|
20225
|
+
class UserAuthorizationApi {
|
|
20197
20226
|
/**
|
|
20198
20227
|
* @internal
|
|
20199
20228
|
*/
|
|
@@ -20203,81 +20232,81 @@ class UserAuthorization {
|
|
|
20203
20232
|
this.cache = cache;
|
|
20204
20233
|
this.options = options;
|
|
20205
20234
|
/**
|
|
20206
|
-
*
|
|
20207
|
-
*
|
|
20235
|
+
* This method supports grant type:
|
|
20236
|
+
* - Grant Type == `authorization_code`:
|
|
20208
20237
|
* It generates the user token by given the authorization
|
|
20209
20238
|
* code which generated in "/iam/v3/authenticate" API response. It should also pass
|
|
20210
20239
|
* in the redirect_uri, which should be the same as generating the
|
|
20211
20240
|
* authorization code request.
|
|
20212
|
-
*
|
|
20213
|
-
*
|
|
20241
|
+
*
|
|
20242
|
+
* - Grant Type == `password`:
|
|
20214
20243
|
* The grant type to use for authenticating a user, whether it's by email / username and password combination
|
|
20215
20244
|
* or through platform.
|
|
20216
|
-
*
|
|
20217
|
-
*
|
|
20245
|
+
*
|
|
20246
|
+
* - Grant Type == `refresh_token`:
|
|
20218
20247
|
* Used to get a new access token for a valid refresh token.
|
|
20219
|
-
*
|
|
20220
|
-
*
|
|
20248
|
+
*
|
|
20249
|
+
* - Grant Type == `client_credentials`:
|
|
20221
20250
|
* It generates a token by checking the client credentials provided through Authorization header.
|
|
20222
|
-
*
|
|
20223
|
-
*
|
|
20224
|
-
*
|
|
20225
|
-
*
|
|
20226
|
-
*
|
|
20227
|
-
*
|
|
20228
|
-
*
|
|
20229
|
-
*
|
|
20230
|
-
*
|
|
20231
|
-
*
|
|
20232
|
-
*
|
|
20233
|
-
*
|
|
20234
|
-
*
|
|
20235
|
-
*
|
|
20236
|
-
*
|
|
20237
|
-
*
|
|
20238
|
-
*
|
|
20239
|
-
*
|
|
20240
|
-
*
|
|
20241
|
-
*
|
|
20242
|
-
*
|
|
20243
|
-
*
|
|
20244
|
-
*
|
|
20245
|
-
*
|
|
20246
|
-
*
|
|
20247
|
-
*
|
|
20248
|
-
*
|
|
20249
|
-
*
|
|
20250
|
-
*
|
|
20251
|
-
*
|
|
20252
|
-
*
|
|
20253
|
-
*
|
|
20254
|
-
*
|
|
20255
|
-
*
|
|
20256
|
-
*
|
|
20257
|
-
*
|
|
20258
|
-
*
|
|
20259
|
-
*
|
|
20260
|
-
*
|
|
20261
|
-
*
|
|
20262
|
-
*
|
|
20263
|
-
*
|
|
20264
|
-
*
|
|
20265
|
-
*
|
|
20266
|
-
*
|
|
20267
|
-
*
|
|
20268
|
-
*
|
|
20269
|
-
*
|
|
20270
|
-
*
|
|
20271
|
-
*
|
|
20272
|
-
*
|
|
20273
|
-
*
|
|
20274
|
-
*
|
|
20275
|
-
*
|
|
20276
|
-
*
|
|
20277
|
-
*
|
|
20278
|
-
*
|
|
20279
|
-
*
|
|
20280
|
-
*
|
|
20251
|
+
* ##Access Token Content
|
|
20252
|
+
* Following is the access token’s content:
|
|
20253
|
+
*
|
|
20254
|
+
* -
|
|
20255
|
+
* __namespace__. It is the namespace the token was generated from.
|
|
20256
|
+
*
|
|
20257
|
+
* -
|
|
20258
|
+
* __display_name__. The display name of the sub. It is empty if the token is generated from the client credential
|
|
20259
|
+
*
|
|
20260
|
+
* -
|
|
20261
|
+
* __roles__. The sub’s roles. It is empty if the token is generated from the client credential
|
|
20262
|
+
*
|
|
20263
|
+
* -
|
|
20264
|
+
* __namespace_roles__. The sub’s roles scoped to namespace. Improvement from roles, which make the role scoped to specific namespace instead of global to publisher namespace
|
|
20265
|
+
*
|
|
20266
|
+
* -
|
|
20267
|
+
* __permissions__. The sub or aud’ permissions
|
|
20268
|
+
*
|
|
20269
|
+
* -
|
|
20270
|
+
* __bans__. The sub’s list of bans. It is used by the IAM client for validating the token.
|
|
20271
|
+
*
|
|
20272
|
+
* -
|
|
20273
|
+
* __jflgs__. It stands for Justice Flags. It is a special flag used for storing additional status information regarding the sub. It is implemented as a bit mask. Following explains what each bit represents:
|
|
20274
|
+
*
|
|
20275
|
+
* - 1: Email Address Verified
|
|
20276
|
+
* - 2: Phone Number Verified
|
|
20277
|
+
* - 4: Anonymous
|
|
20278
|
+
* - 8: Suspicious Login
|
|
20279
|
+
*
|
|
20280
|
+
*
|
|
20281
|
+
* -
|
|
20282
|
+
* __aud__. The aud is the targeted resource server.
|
|
20283
|
+
*
|
|
20284
|
+
* -
|
|
20285
|
+
* __iat__. The time the token issues at. It is in Epoch time format
|
|
20286
|
+
*
|
|
20287
|
+
* -
|
|
20288
|
+
* __exp__. The time the token expires. It is in Epoch time format
|
|
20289
|
+
*
|
|
20290
|
+
* -
|
|
20291
|
+
* __client_id__. The UserID. The sub is omitted if the token is generated from client credential
|
|
20292
|
+
*
|
|
20293
|
+
* -
|
|
20294
|
+
* __scope__. The scope of the access request, expressed as a list of space-delimited, case-sensitive strings
|
|
20295
|
+
*
|
|
20296
|
+
*
|
|
20297
|
+
* ##Bans
|
|
20298
|
+
* The JWT contains user's active bans with its expiry date. List of ban types can be obtained from /bans.
|
|
20299
|
+
* ##Device Cookie Validation
|
|
20300
|
+
* __For grant type "password" only__
|
|
20301
|
+
* Device Cookie is used to protect the user account from brute force login attack,
|
|
20302
|
+
* [more detail from OWASP](https://owasp.org/www-community/Slow_Down_Online_Guessing_Attacks_with_Device_Cookies)
|
|
20303
|
+
* This method will read device cookie from request header __Auth-Trust-Id__. If device cookie not found, it will generate a new one and set it into response body __auth_trust_id__ when successfully login.
|
|
20304
|
+
* ##Track Login History
|
|
20305
|
+
* This method will track login history to detect suspicious login activity, please provide __Device-Id__ (alphanumeric) in request header parameter otherwise it will set to "unknown".
|
|
20306
|
+
* Align with General Data Protection Regulation in Europe, user login history will be kept within 28 days by default"
|
|
20307
|
+
* ##2FA remember device
|
|
20308
|
+
* To remember device for 2FA, should provide cookie: device_token or header: Device-Token
|
|
20309
|
+
* action code: 10703
|
|
20281
20310
|
*/
|
|
20282
20311
|
this.loginWithAuthorizationCode = async ({ code, codeVerifier }) => {
|
|
20283
20312
|
const deviceId = SdkDevice.getDeviceId();
|
|
@@ -20857,12 +20886,10 @@ class OAuthApi {
|
|
|
20857
20886
|
this.cache = cache;
|
|
20858
20887
|
this.options = options;
|
|
20859
20888
|
/**
|
|
20860
|
-
*
|
|
20861
|
-
*
|
|
20862
|
-
*
|
|
20863
|
-
*
|
|
20864
|
-
* <li>AddTokenToRevocationList to revoke token with TTL</li>
|
|
20865
|
-
* </ul>
|
|
20889
|
+
* This method is used to remove __access_token__, __refresh_token__ from cookie and revoke token from usage.
|
|
20890
|
+
* Supported methods:
|
|
20891
|
+
* - VerifyToken to verify token from header
|
|
20892
|
+
* - AddTokenToRevocationList to revoke token with TTL
|
|
20866
20893
|
*/
|
|
20867
20894
|
this.logout = () => {
|
|
20868
20895
|
const axios = Network.create({
|
|
@@ -20874,8 +20901,8 @@ class OAuthApi {
|
|
|
20874
20901
|
return new OAuth20Extension$(axios, this.namespace, this.cache).postIamV3Logout();
|
|
20875
20902
|
};
|
|
20876
20903
|
/**
|
|
20877
|
-
*
|
|
20878
|
-
*
|
|
20904
|
+
* This method revokes a token.
|
|
20905
|
+
* This method requires authorized requests header with Basic Authentication from client that establish the token.action code: 10706
|
|
20879
20906
|
*/
|
|
20880
20907
|
this.revoke = ({ token }) => {
|
|
20881
20908
|
const axios = Network.create({
|
|
@@ -20889,10 +20916,10 @@ class OAuthApi {
|
|
|
20889
20916
|
return new OAuth20$(axios, this.namespace, this.cache).postIamV3OauthRevoke({ token });
|
|
20890
20917
|
};
|
|
20891
20918
|
/**
|
|
20892
|
-
* Verify 2FA code
|
|
20893
|
-
*
|
|
20894
|
-
*
|
|
20895
|
-
*
|
|
20919
|
+
* Verify 2FA code
|
|
20920
|
+
* This method is used for verifying 2FA code.
|
|
20921
|
+
* ##2FA remember device
|
|
20922
|
+
* To remember device for 2FA, should provide cookie: device_token or header: Device-Token
|
|
20896
20923
|
*
|
|
20897
20924
|
*/
|
|
20898
20925
|
this.verify2FA = async ({ factor, code, mfaToken = null, rememberDevice }) => {
|
|
@@ -20911,27 +20938,26 @@ class OAuthApi {
|
|
|
20911
20938
|
return result.response;
|
|
20912
20939
|
};
|
|
20913
20940
|
/**
|
|
20914
|
-
*
|
|
20941
|
+
* This method get country location based on the request.
|
|
20915
20942
|
*/
|
|
20916
20943
|
this.getCurrentLocationCountry = () => {
|
|
20917
20944
|
return this.newOAuth20Extension().fetchIamV3LocationCountry();
|
|
20918
20945
|
};
|
|
20919
20946
|
/**
|
|
20920
|
-
* Retrieve User Third Party Platform Token
|
|
20921
|
-
*
|
|
20947
|
+
* Retrieve User Third Party Platform Token
|
|
20948
|
+
*
|
|
20922
20949
|
* This method used for retrieving third party platform token for user that login using third party,
|
|
20923
20950
|
* if user have not link requested platform in game namespace, will try to retrieving third party platform token from publisher namespace.
|
|
20924
20951
|
* Passing platform group name or it's member will return same access token that can be used across the platform members.
|
|
20925
|
-
*
|
|
20926
|
-
*
|
|
20927
|
-
*
|
|
20928
|
-
*
|
|
20929
|
-
*
|
|
20930
|
-
*
|
|
20931
|
-
*
|
|
20932
|
-
*
|
|
20933
|
-
*
|
|
20934
|
-
* </ul>
|
|
20952
|
+
*
|
|
20953
|
+
* The third party platform and platform group covered for this is:
|
|
20954
|
+
* - (psn) ps4web
|
|
20955
|
+
* - (psn) ps4
|
|
20956
|
+
* - (psn) ps5
|
|
20957
|
+
* - epicgames
|
|
20958
|
+
* - twitch
|
|
20959
|
+
* - awscognito
|
|
20960
|
+
*
|
|
20935
20961
|
*/
|
|
20936
20962
|
this.getThirdPartyPlatformToken = (userId, platformId) => {
|
|
20937
20963
|
return this.newInstance().fetchV3OauthUsersByUseridPlatformsByPlatformidPlatformToken(userId, platformId);
|
|
@@ -20939,12 +20965,13 @@ class OAuthApi {
|
|
|
20939
20965
|
/**
|
|
20940
20966
|
* This method is being used to authenticate a user account and perform platform link.
|
|
20941
20967
|
* It validates user's email / username and password.
|
|
20942
|
-
* If user already enable 2FA, then invoke
|
|
20968
|
+
* If user already enable 2FA, then invoke _/mfa/verify_ using __mfa_token__ from this method response.
|
|
20943
20969
|
*
|
|
20944
|
-
*
|
|
20970
|
+
* ##Device Cookie Validation
|
|
20945
20971
|
*
|
|
20946
|
-
* Device Cookie is used to protect the user account from brute force login attack,
|
|
20947
|
-
*
|
|
20972
|
+
* Device Cookie is used to protect the user account from brute force login attack,
|
|
20973
|
+
* [more detail from OWASP](https://owasp.org/www-community/Slow_Down_Online_Guessing_Attacks_with_Device_Cookies).
|
|
20974
|
+
* This method will read device cookie from cookie __auth-trust-id__. If device cookie not found, it will generate a new one and set it into cookie when successfully authenticate.
|
|
20948
20975
|
*
|
|
20949
20976
|
*/
|
|
20950
20977
|
this.authenticateWithLink = (data) => {
|
|
@@ -20970,7 +20997,7 @@ class OAuthApi {
|
|
|
20970
20997
|
/**
|
|
20971
20998
|
* This method is being used to generate user's token by one time link code.
|
|
20972
20999
|
* It require publisher ClientID
|
|
20973
|
-
* It required a code which can be generated from
|
|
21000
|
+
* It required a code which can be generated from __/iam/v3/link/code/request__.
|
|
20974
21001
|
*
|
|
20975
21002
|
*/
|
|
20976
21003
|
exchangeTokenByOneTimeLinkCode(data) {
|
|
@@ -21554,74 +21581,74 @@ class TwoFA {
|
|
|
21554
21581
|
this.namespace = namespace;
|
|
21555
21582
|
this.cache = cache;
|
|
21556
21583
|
/**
|
|
21557
|
-
*
|
|
21558
|
-
* Each code is a one-time code and will be deleted once used
|
|
21559
|
-
*
|
|
21584
|
+
* This method is used to get 8-digits backup codes.
|
|
21585
|
+
* Each code is a one-time code and will be deleted once used.
|
|
21586
|
+
* This method Requires valid user access token
|
|
21560
21587
|
*
|
|
21561
21588
|
*/
|
|
21562
21589
|
this.getBackupCode = () => {
|
|
21563
21590
|
return this.newInstance().fetchV4NsUsersMeMfaBackupCode();
|
|
21564
21591
|
};
|
|
21565
21592
|
/**
|
|
21566
|
-
*
|
|
21567
|
-
*
|
|
21593
|
+
* This method is used to enable 2FA backup codes.
|
|
21594
|
+
* This method Requires valid user access token
|
|
21568
21595
|
*
|
|
21569
21596
|
*/
|
|
21570
21597
|
this.enable2FABackupCodes = () => {
|
|
21571
21598
|
return this.newInstance().postV4NsUsersMeMfaBackupCodeEnable();
|
|
21572
21599
|
};
|
|
21573
21600
|
/**
|
|
21574
|
-
*
|
|
21575
|
-
*
|
|
21601
|
+
* This method is used to enable 2FA backup codes.
|
|
21602
|
+
* This method Requires valid user access token
|
|
21576
21603
|
*
|
|
21577
21604
|
*/
|
|
21578
21605
|
this.generateBackupCodes = () => {
|
|
21579
21606
|
return this.newInstance().postV4NsUsersMeMfaBackupCode();
|
|
21580
21607
|
};
|
|
21581
21608
|
/**
|
|
21582
|
-
*
|
|
21583
|
-
*
|
|
21609
|
+
* This method is used to enable 2FA backup codes.
|
|
21610
|
+
* This method Requires valid user access token
|
|
21584
21611
|
*
|
|
21585
21612
|
*/
|
|
21586
21613
|
this.disableBackupCodes = () => {
|
|
21587
21614
|
return this.newInstance().deleteV4NsUsersMeMfaBackupCodeDisable();
|
|
21588
21615
|
};
|
|
21589
21616
|
/**
|
|
21590
|
-
*
|
|
21591
|
-
*
|
|
21617
|
+
* This method is used to disable 2FA authenticator.
|
|
21618
|
+
* This method Requires valid user access token
|
|
21592
21619
|
*
|
|
21593
21620
|
*/
|
|
21594
21621
|
this.disableAuthenticator = () => {
|
|
21595
21622
|
return this.newInstance().deleteV4NsUsersMeMfaAuthenticatorDisable();
|
|
21596
21623
|
};
|
|
21597
21624
|
/**
|
|
21598
|
-
*
|
|
21599
|
-
*
|
|
21625
|
+
* This method is used to get user enabled factors.
|
|
21626
|
+
* This method Requires valid user access token
|
|
21600
21627
|
*
|
|
21601
21628
|
*/
|
|
21602
21629
|
this.getEnabledMethods = () => {
|
|
21603
21630
|
return this.newInstance().fetchV4NsUsersMeMfaFactor();
|
|
21604
21631
|
};
|
|
21605
21632
|
/**
|
|
21606
|
-
*
|
|
21607
|
-
*
|
|
21633
|
+
* This method is used to make 2FA factor default.
|
|
21634
|
+
* This method Requires valid user access token
|
|
21608
21635
|
*
|
|
21609
21636
|
*/
|
|
21610
21637
|
this.set2FAAsDefault = (factor) => {
|
|
21611
21638
|
return this.newInstance().postV4NsUsersMeMfaFactor({ factor });
|
|
21612
21639
|
};
|
|
21613
21640
|
/**
|
|
21614
|
-
*
|
|
21615
|
-
*
|
|
21641
|
+
* This method is used to enable 2FA authenticator.
|
|
21642
|
+
* This method Requires valid user access token
|
|
21616
21643
|
*
|
|
21617
21644
|
*/
|
|
21618
21645
|
this.enable2FAAuthenticator = (code) => {
|
|
21619
21646
|
return this.newInstance().postV4NsUsersMeMfaAuthenticatorEnable({ code });
|
|
21620
21647
|
};
|
|
21621
21648
|
/**
|
|
21622
|
-
*
|
|
21623
|
-
* A QR code URI is also returned so that frontend can generate QR code image
|
|
21624
|
-
*
|
|
21649
|
+
* This method is used to generate a secret key for 3rd-party authenticator app.
|
|
21650
|
+
* A QR code URI is also returned so that frontend can generate QR code image.
|
|
21651
|
+
* This method Requires valid user access token
|
|
21625
21652
|
*
|
|
21626
21653
|
*/
|
|
21627
21654
|
this.generateSecretKey = () => {
|
|
@@ -22871,55 +22898,52 @@ class UserApi {
|
|
|
22871
22898
|
};
|
|
22872
22899
|
/**
|
|
22873
22900
|
* Required valid user authorization
|
|
22874
|
-
*
|
|
22875
|
-
*
|
|
22876
|
-
*
|
|
22877
|
-
*
|
|
22878
|
-
*
|
|
22879
|
-
*
|
|
22880
|
-
*
|
|
22881
|
-
*
|
|
22882
|
-
*
|
|
22883
|
-
*
|
|
22884
|
-
*
|
|
22885
|
-
*
|
|
22886
|
-
*
|
|
22887
|
-
*
|
|
22888
|
-
*
|
|
22889
|
-
* </li>
|
|
22890
|
-
* </ol>
|
|
22891
|
-
* <p>action code: 10116</p>
|
|
22901
|
+
* The verification code is sent to email address
|
|
22902
|
+
* Available contexts for use :
|
|
22903
|
+
* -
|
|
22904
|
+
* __UserAccountRegistration__
|
|
22905
|
+
* a context type used for verifying email address in user account registration. It returns 409 if the email address already verified.
|
|
22906
|
+
* __It is the default context if the Context field is empty__
|
|
22907
|
+
*
|
|
22908
|
+
* -
|
|
22909
|
+
* __UpdateEmailAddress__
|
|
22910
|
+
* a context type used for verify user before updating email address.(Without email address verified checking)
|
|
22911
|
+
*
|
|
22912
|
+
* - __upgradeHeadlessAccount__
|
|
22913
|
+
* The context is intended to be used whenever the email address wanted to be automatically verified on upgrading a headless account.
|
|
22914
|
+
* If this context used, IAM rejects the request if the email address is already used by others by returning HTTP Status Code 409.
|
|
22915
|
+
* action code: 10116
|
|
22892
22916
|
*
|
|
22893
22917
|
*/
|
|
22894
22918
|
this.requestVerificationCode = (data) => {
|
|
22895
22919
|
return this.newInstance().postV3NsUsersMeCodeRequest(data);
|
|
22896
22920
|
};
|
|
22897
22921
|
/**
|
|
22898
|
-
*
|
|
22899
|
-
*
|
|
22900
|
-
*
|
|
22901
|
-
*
|
|
22902
|
-
*
|
|
22922
|
+
* Will consume code if validateOnly is set false
|
|
22923
|
+
* Required valid user authorization
|
|
22924
|
+
* Redeems a verification code sent to a user to verify the user's contact address is correct
|
|
22925
|
+
* Available ContactType : __email__
|
|
22926
|
+
* action code: 10107
|
|
22903
22927
|
*
|
|
22904
22928
|
*/
|
|
22905
22929
|
this.verifyCode = (data) => {
|
|
22906
22930
|
return this.newInstance().postV3NsUsersMeCodeVerify(data);
|
|
22907
22931
|
};
|
|
22908
22932
|
/**
|
|
22909
|
-
*
|
|
22933
|
+
* If validateOnly is set false, consume code and upgrade headless account and automatically verified the email address if it is succeeded
|
|
22910
22934
|
* Require valid user access token.
|
|
22911
|
-
*
|
|
22912
|
-
* By upgrading the headless account into a full account, the user could use the email address and password for using Justice IAM.
|
|
22913
|
-
*
|
|
22914
|
-
* In order to get a verification code for the method, please check the send verification code method
|
|
22915
|
-
*
|
|
22935
|
+
* The method upgrades a headless account by linking the headless account with the email address and the password.
|
|
22936
|
+
* By upgrading the headless account into a full account, the user could use the email address and password for using Justice IAM.
|
|
22937
|
+
* The method is a shortcut for upgrading a headless account and verifying the email address in one call.
|
|
22938
|
+
* In order to get a verification code for the method, please check the send verification code method.
|
|
22939
|
+
* This method also have an ability to update user data (if the user data field is specified) right after the upgrade account process is done.
|
|
22916
22940
|
* Supported user data fields :
|
|
22917
|
-
*
|
|
22918
|
-
*
|
|
22919
|
-
*
|
|
22920
|
-
*
|
|
22921
|
-
*
|
|
22922
|
-
*
|
|
22941
|
+
*
|
|
22942
|
+
* - displayName
|
|
22943
|
+
* - dateOfBirth : format YYYY-MM-DD, e.g. 2019-04-29
|
|
22944
|
+
* - country : format ISO3166-1 alpha-2 two letter, e.g. US
|
|
22945
|
+
*
|
|
22946
|
+
* action code : 10124
|
|
22923
22947
|
*/
|
|
22924
22948
|
this.upgradeHeadlessAccount = (data) => {
|
|
22925
22949
|
return this.newInstance().postV3NsUsersMeHeadlessCodeVerify(data);
|
|
@@ -22928,54 +22952,53 @@ class UserApi {
|
|
|
22928
22952
|
* Require valid user access token.
|
|
22929
22953
|
* The method upgrades a headless account by linking the headless account with the email address, username, and password.
|
|
22930
22954
|
* By upgrading the headless account into a full account, the user could use the email address, username, and password for using Justice IAM.
|
|
22931
|
-
*
|
|
22955
|
+
*
|
|
22932
22956
|
* The method is a shortcut for upgrading a headless account and verifying the email address in one call.
|
|
22933
|
-
*
|
|
22934
|
-
* <br>
|
|
22957
|
+
*
|
|
22935
22958
|
* This method also have an ability to update user data (if the user data field is specified) right after the upgrade account process is done.
|
|
22936
22959
|
* Supported user data fields:
|
|
22937
|
-
*
|
|
22938
|
-
*
|
|
22939
|
-
*
|
|
22940
|
-
*
|
|
22941
|
-
*
|
|
22960
|
+
*
|
|
22961
|
+
* - displayName
|
|
22962
|
+
* - dateOfBirth : format YYYY-MM-DD, e.g. 2019-04-29
|
|
22963
|
+
* - country : format ISO3166-1 alpha-2 two letter, e.g. US
|
|
22964
|
+
*
|
|
22942
22965
|
* action code : 10124
|
|
22943
22966
|
*/
|
|
22944
22967
|
this.upgradeHeadlessAccountV4 = (data) => {
|
|
22945
22968
|
return this.newInstance4().postV4NsUsersMeHeadlessCodeVerify(data);
|
|
22946
22969
|
};
|
|
22947
22970
|
/**
|
|
22948
|
-
*
|
|
22949
|
-
*
|
|
22971
|
+
* This method retrieves platform accounts linked to user. Required valid user authorization.
|
|
22972
|
+
* action code: 10128
|
|
22950
22973
|
*/
|
|
22951
22974
|
this.getUserLinkedPlatform = (userId) => {
|
|
22952
22975
|
return this.newInstance().fetchV3NsUsersByUseridPlatforms(userId);
|
|
22953
22976
|
};
|
|
22954
22977
|
/**
|
|
22955
22978
|
* Required valid user authorization.
|
|
22956
|
-
*
|
|
22979
|
+
* __Prerequisite:__
|
|
22957
22980
|
* Platform client configuration need to be added to database for specific platformId. Namespace service URL need to be specified (refer to required environment variables).
|
|
22958
|
-
*
|
|
22959
|
-
*
|
|
22960
|
-
*
|
|
22961
|
-
*
|
|
22962
|
-
*
|
|
22963
|
-
*
|
|
22964
|
-
*
|
|
22965
|
-
*
|
|
22966
|
-
*
|
|
22967
|
-
*
|
|
22968
|
-
*
|
|
22969
|
-
*
|
|
22970
|
-
*
|
|
22971
|
-
*
|
|
22972
|
-
*
|
|
22973
|
-
*
|
|
22974
|
-
*
|
|
22975
|
-
*
|
|
22976
|
-
*
|
|
22977
|
-
*
|
|
22978
|
-
*
|
|
22981
|
+
* ##Supported platforms:
|
|
22982
|
+
*
|
|
22983
|
+
* - __steam__: The ticket’s value is the authentication code returned by Steam.
|
|
22984
|
+
* - __steamopenid__: Steam's user authentication method using OpenID 2.0. The ticket's value is URL generated by Steam on web authentication
|
|
22985
|
+
* - __facebook__: The ticket’s value is the authorization code returned by Facebook OAuth
|
|
22986
|
+
* - __google__: The ticket’s value is the authorization code returned by Google OAuth
|
|
22987
|
+
* - __oculus__: The ticket’s value is a string composed of Oculus's user ID and the nonce separated by a colon (:).
|
|
22988
|
+
* - __twitch__: The ticket’s value is the authorization code returned by Twitch OAuth.
|
|
22989
|
+
* - __android__: The ticket's value is the Android’s device ID
|
|
22990
|
+
* - __ios__: The ticket's value is the iOS’s device ID.
|
|
22991
|
+
* - __apple__: The ticket’s value is the authorization code returned by Apple OAuth.
|
|
22992
|
+
* - __device__: Every device that doesn't run Android and iOS is categorized as a device platform. The ticket's value is the device’s ID.
|
|
22993
|
+
* - __discord__: The ticket’s value is the authorization code returned by Discord OAuth.
|
|
22994
|
+
* - __ps4web__: The ticket’s value is the authorization code returned by PSN OAuth.
|
|
22995
|
+
* - __xblweb__: The ticket’s value is the authorization code returned by XBox Live OAuth.
|
|
22996
|
+
* - __awscognito__: The ticket’s value is the aws cognito access token (JWT).
|
|
22997
|
+
* - __epicgames__: The ticket’s value is an access-token obtained from Epicgames EOS Account Service.
|
|
22998
|
+
* - __nintendo__: The ticket’s value is the authorization code(id_token) returned by Nintendo OAuth.
|
|
22999
|
+
* - __stadia__: The ticket’s value is a JWT Token, which can be obtained after calling the Stadia SDK's function.
|
|
23000
|
+
*
|
|
23001
|
+
* action code : 10144
|
|
22979
23002
|
*/
|
|
22980
23003
|
this.linkAccountToPlatform = ({ platformId, data }) => {
|
|
22981
23004
|
return this.newInstance().postV3NsUsersMePlatformsByPlatformid(platformId, data);
|
|
@@ -22987,7 +23010,7 @@ class UserApi {
|
|
|
22987
23010
|
return this.newInstance().fetchV3NsRequestsByRequestidAsyncStatus(requestId);
|
|
22988
23011
|
};
|
|
22989
23012
|
/**
|
|
22990
|
-
* It is going to be
|
|
23013
|
+
* It is going to be __DEPRECATED__.
|
|
22991
23014
|
* Update Platform Account relation to current User Account.
|
|
22992
23015
|
* Note: Game progression data (statistics, reward, etc) associated with previous User Account will not be
|
|
22993
23016
|
* transferred. If the data is tight to game user ID, the user will have the game progression data.
|
|
@@ -22998,32 +23021,32 @@ class UserApi {
|
|
|
22998
23021
|
};
|
|
22999
23022
|
/**
|
|
23000
23023
|
* Required valid user authorization.
|
|
23001
|
-
*
|
|
23002
|
-
*
|
|
23003
|
-
*
|
|
23004
|
-
*
|
|
23005
|
-
*
|
|
23006
|
-
*
|
|
23007
|
-
*
|
|
23008
|
-
*
|
|
23009
|
-
*
|
|
23010
|
-
*
|
|
23011
|
-
*
|
|
23012
|
-
*
|
|
23013
|
-
*
|
|
23014
|
-
*
|
|
23015
|
-
*
|
|
23016
|
-
*
|
|
23017
|
-
*
|
|
23018
|
-
*
|
|
23019
|
-
*
|
|
23020
|
-
*
|
|
23021
|
-
*
|
|
23022
|
-
*
|
|
23023
|
-
*
|
|
23024
|
-
*
|
|
23025
|
-
*
|
|
23026
|
-
*
|
|
23024
|
+
* ##Supported platforms:
|
|
23025
|
+
*
|
|
23026
|
+
* - __steam__
|
|
23027
|
+
* - __steamopenid__
|
|
23028
|
+
* - __facebook__
|
|
23029
|
+
* - __google__
|
|
23030
|
+
* - __oculus__
|
|
23031
|
+
* - __twitch__
|
|
23032
|
+
* - __android__
|
|
23033
|
+
* - __ios__
|
|
23034
|
+
* - __apple__
|
|
23035
|
+
* - __device__
|
|
23036
|
+
* - __discord__
|
|
23037
|
+
* - __awscognito__
|
|
23038
|
+
* - __epicgames__
|
|
23039
|
+
* - __nintendo__
|
|
23040
|
+
* - __stadia__
|
|
23041
|
+
*
|
|
23042
|
+
* Unlink user's account from a specific platform. 'justice' platform might have multiple accounts from different namespaces linked.
|
|
23043
|
+
* _platformNamespace_ need to be specified when the platform ID is 'justice'.
|
|
23044
|
+
*
|
|
23045
|
+
* Unlink user's account from justice platform will enable password token grant and password update.
|
|
23046
|
+
*
|
|
23047
|
+
* If you want to unlink user's account in a game namespace, you have to specify _platformNamespace_ to that game namespace.
|
|
23048
|
+
*
|
|
23049
|
+
* action code : 10121
|
|
23027
23050
|
*/
|
|
23028
23051
|
this.unLinkAccountFromPlatform = ({ platformId, data }) => {
|
|
23029
23052
|
return this.newInstance().deleteV3NsUsersMePlatformsByPlatformid(platformId, data);
|
|
@@ -23063,65 +23086,63 @@ class UserApi {
|
|
|
23063
23086
|
* If it already been used, will response 409.
|
|
23064
23087
|
*
|
|
23065
23088
|
* If it is available, we will send a verification code to this email address.
|
|
23066
|
-
* This code can be verified by this <a href="#operations-Users-PublicVerifyRegistrationCode">method</a>.
|
|
23067
|
-
*
|
|
23068
23089
|
*/
|
|
23069
23090
|
requestNewUserVerificationCode(data) {
|
|
23070
23091
|
return this.newInstance().postV3NsUsersCodeRequest(data);
|
|
23071
23092
|
}
|
|
23072
23093
|
/**
|
|
23073
23094
|
* Create a new user with unique email address and username.
|
|
23074
|
-
*
|
|
23075
|
-
*
|
|
23095
|
+
*
|
|
23096
|
+
* __Required attributes:__
|
|
23076
23097
|
* - authType: possible value is EMAILPASSWD
|
|
23077
23098
|
* - emailAddress: Please refer to the rule from /v3/public/inputValidations API.
|
|
23078
23099
|
* - username: Please refer to the rule from /v3/public/inputValidations API.
|
|
23079
23100
|
* - password: Please refer to the rule from /v3/public/inputValidations API.
|
|
23080
23101
|
* - country: ISO3166-1 alpha-2 two letter, e.g. US.
|
|
23081
23102
|
* - dateOfBirth: YYYY-MM-DD, e.g. 1990-01-01. valid values are between 1905-01-01 until current date.
|
|
23082
|
-
*
|
|
23083
|
-
*
|
|
23103
|
+
*
|
|
23104
|
+
* __Not required attributes:__
|
|
23084
23105
|
* - displayName: Please refer to the rule from /v3/public/inputValidations API.
|
|
23085
|
-
*
|
|
23086
|
-
*
|
|
23106
|
+
*
|
|
23107
|
+
* This method support accepting agreements for the created user. Supply the accepted agreements in acceptedPolicies attribute.
|
|
23087
23108
|
*
|
|
23088
23109
|
*/
|
|
23089
23110
|
createUser(data) {
|
|
23090
23111
|
return this.newInstance4().postV4NsUsers(data);
|
|
23091
23112
|
}
|
|
23092
23113
|
/**
|
|
23093
|
-
*
|
|
23094
|
-
*
|
|
23095
|
-
*
|
|
23114
|
+
* This method retrieves platform accounts linked to user.
|
|
23115
|
+
* It will query all linked platform accounts and result will be distinct & grouped, same platform we will pick oldest linked one.
|
|
23116
|
+
* Required valid user authorization.
|
|
23096
23117
|
*/
|
|
23097
23118
|
getUserDistinctLinkedPlatform(userId) {
|
|
23098
23119
|
return this.newInstance().fetchV3NsUsersByUseridDistinctPlatforms(userId);
|
|
23099
23120
|
}
|
|
23100
23121
|
/**
|
|
23101
23122
|
* Required valid user authorization.
|
|
23102
|
-
*
|
|
23123
|
+
* Unlink user's account from for all third platforms.
|
|
23103
23124
|
*/
|
|
23104
23125
|
unLinkAccountFromPlatformDistinct(platformId) {
|
|
23105
23126
|
return this.newInstance().deleteV3NsUsersMePlatformsByPlatformidAll(platformId);
|
|
23106
23127
|
}
|
|
23107
23128
|
/**
|
|
23108
23129
|
* Required valid user authorization
|
|
23109
|
-
*
|
|
23110
|
-
*
|
|
23130
|
+
* The verification link is sent to email address
|
|
23131
|
+
* It will not send request if user email is already verified
|
|
23111
23132
|
*
|
|
23112
23133
|
*/
|
|
23113
23134
|
sendVerificationLink(languageTag) {
|
|
23114
23135
|
return this.newInstance().postIamV3PublicUsersMeVerifyLinkRequest({ languageTag });
|
|
23115
23136
|
}
|
|
23116
23137
|
/**
|
|
23117
|
-
*
|
|
23118
|
-
*
|
|
23138
|
+
* This method retrieves platform accounts linked to user. Required valid user authorization.
|
|
23139
|
+
* action code: 10128
|
|
23119
23140
|
*/
|
|
23120
23141
|
getLinkedAccount(userId) {
|
|
23121
23142
|
return this.newInstance().fetchV3NsUsersByUseridPlatforms(userId);
|
|
23122
23143
|
}
|
|
23123
23144
|
/**
|
|
23124
|
-
* Note
|
|
23145
|
+
* Note:
|
|
23125
23146
|
* 1. My account should be full account
|
|
23126
23147
|
* 2. My account not linked to request headless account's third platform.
|
|
23127
23148
|
*/
|
|
@@ -23129,7 +23150,7 @@ class UserApi {
|
|
|
23129
23150
|
return this.newInstance().fetchIamV3PublicUsersMeHeadlessLinkConflict(params);
|
|
23130
23151
|
}
|
|
23131
23152
|
/**
|
|
23132
|
-
* Note
|
|
23153
|
+
* Note:
|
|
23133
23154
|
* 1. My account should be full account
|
|
23134
23155
|
* 2. My account not linked to headless account's third platform.
|
|
23135
23156
|
*/
|
|
@@ -23293,19 +23314,22 @@ class AgreementApi {
|
|
|
23293
23314
|
this.cache = cache;
|
|
23294
23315
|
}
|
|
23295
23316
|
/**
|
|
23296
|
-
* Accepts many legal policy versions all at once. Supply with localized version policy id to accept an agreement
|
|
23317
|
+
* Accepts many legal policy versions all at once. Supply with localized version policy id to accept an agreement.
|
|
23318
|
+
* - _Required permission_: login user
|
|
23297
23319
|
*/
|
|
23298
23320
|
acceptLegalPolicies(acceptAgreements) {
|
|
23299
23321
|
return this.newInstance().postPublicAgreementsPolicies(acceptAgreements);
|
|
23300
23322
|
}
|
|
23301
23323
|
/**
|
|
23302
|
-
* Retrieve accepted Legal Agreements
|
|
23324
|
+
* Retrieve accepted Legal Agreements.
|
|
23325
|
+
* - _Required permission_: login user
|
|
23303
23326
|
*/
|
|
23304
23327
|
getAgreements() {
|
|
23305
23328
|
return this.newInstance().fetchPublicAgreementsPolicies();
|
|
23306
23329
|
}
|
|
23307
23330
|
/**
|
|
23308
|
-
* Change marketing preference consent
|
|
23331
|
+
* Change marketing preference consent.
|
|
23332
|
+
* - _Required permission_: login user
|
|
23309
23333
|
*/
|
|
23310
23334
|
updateMarketingPreferences(acceptAgreements) {
|
|
23311
23335
|
return this.newInstance().patchPublicAgreementsLocalizedPolicyVersionsPreferences(acceptAgreements);
|
|
@@ -23423,7 +23447,8 @@ class EligibilitiesApi {
|
|
|
23423
23447
|
this.cache = cache;
|
|
23424
23448
|
}
|
|
23425
23449
|
/**
|
|
23426
|
-
* Retrieve the active policies and its conformance status by user
|
|
23450
|
+
* 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.Other detail info:
|
|
23451
|
+
* - _Required permission_: login user
|
|
23427
23452
|
*/
|
|
23428
23453
|
getUserEligibilities() {
|
|
23429
23454
|
return this.newInstance().fetchPublicEligibilitiesNamespacesByNamespace();
|
|
@@ -23531,7 +23556,7 @@ class LocalizedPolicyVersionsApi {
|
|
|
23531
23556
|
this.cache = cache;
|
|
23532
23557
|
}
|
|
23533
23558
|
/**
|
|
23534
|
-
* Retrieve specific localized policy version including the policy version and base policy version where the localized policy version located
|
|
23559
|
+
* Retrieve specific localized policy version including the policy version and base policy version where the localized policy version located.Other detail info:
|
|
23535
23560
|
*/
|
|
23536
23561
|
fetchLocalizedPolicyVersionById(localizedPolicyVersionId) {
|
|
23537
23562
|
return this.newInstance().fetchPublicLocalizedPolicyVersionsByLocalizedpolicyversionid(localizedPolicyVersionId);
|
|
@@ -23642,13 +23667,31 @@ class PoliciesApi {
|
|
|
23642
23667
|
this.cache = cache;
|
|
23643
23668
|
}
|
|
23644
23669
|
/**
|
|
23645
|
-
* Retrieve all active latest policies based on a namespace and country
|
|
23646
|
-
|
|
23670
|
+
* Retrieve all active latest policies based on a namespace and country.Other detail info:
|
|
23671
|
+
*
|
|
23672
|
+
* - _Leave the policyType empty if you want to be responded with all policy type_
|
|
23673
|
+
* - _Fill the tags if you want to filter the responded policy by tags_
|
|
23674
|
+
* - _Fill the defaultOnEmpty with true if you want to be responded with default country-specific policy if your requested country is not exist_
|
|
23675
|
+
* - _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:_
|
|
23676
|
+
*
|
|
23677
|
+
* - Document 1 (default): Region US (default), UA
|
|
23678
|
+
* - Document 2 (default): Region US (default)
|
|
23679
|
+
* - Document 3 (default): Region US (default)
|
|
23680
|
+
* - User: Region UA
|
|
23681
|
+
* - Query: alwaysIncludeDefault: true
|
|
23682
|
+
* - Response: Document 1 (UA), Document 2 (US), Document 3 (US)
|
|
23683
|
+
*/
|
|
23684
|
+
// TODO cpmmented -> docgen fix above to valid HTML
|
|
23647
23685
|
fetchPoliciesByCountry({ countryCode, queryParams }) {
|
|
23648
23686
|
return this.newInstance().fetchPublicPoliciesNamespacesByNamespaceCountriesByCountrycode(countryCode, queryParams);
|
|
23649
23687
|
}
|
|
23650
23688
|
/**
|
|
23651
|
-
* Retrieve all active latest policies based on country from all namespaces
|
|
23689
|
+
* Retrieve all active latest policies based on country from all namespaces.
|
|
23690
|
+
* Other detail info:
|
|
23691
|
+
*
|
|
23692
|
+
* - _Leave the policyType empty if you want to be responded with all policy type_
|
|
23693
|
+
* - _Fill the tags if you want to filter the responded policy by tags_
|
|
23694
|
+
* - _Fill the defaultOnEmpty with true if you want to be responded with default country-specific policy if your requested country is not exist_
|
|
23652
23695
|
*/
|
|
23653
23696
|
fetchAllPoliciesByCountry({ countryCode, queryParams }) {
|
|
23654
23697
|
return this.newInstance().fetchPublicPoliciesCountriesByCountrycode(countryCode, queryParams);
|
|
@@ -23810,7 +23853,8 @@ class CurrencyApi {
|
|
|
23810
23853
|
this.namespace = namespace;
|
|
23811
23854
|
this.cache = cache;
|
|
23812
23855
|
/**
|
|
23813
|
-
* List currencies of a namespace
|
|
23856
|
+
* List currencies of a namespace.
|
|
23857
|
+
* Returns: Currency List
|
|
23814
23858
|
*/
|
|
23815
23859
|
this.getCurrencies = () => {
|
|
23816
23860
|
return this.newInstance().fetchNsCurrencies();
|
|
@@ -24431,7 +24475,7 @@ class EntitlementApi {
|
|
|
24431
24475
|
this.cache = cache;
|
|
24432
24476
|
}
|
|
24433
24477
|
/**
|
|
24434
|
-
* Get user app entitlement by appId
|
|
24478
|
+
* Get user app entitlement by appId.
|
|
24435
24479
|
*/
|
|
24436
24480
|
getEntitlementByAppId({ userId, appId }) {
|
|
24437
24481
|
return this.newInstance().fetchNsUsersByUseridEntitlementsByAppId(userId, {
|
|
@@ -24439,25 +24483,27 @@ class EntitlementApi {
|
|
|
24439
24483
|
});
|
|
24440
24484
|
}
|
|
24441
24485
|
/**
|
|
24442
|
-
* Query user entitlements for a specific user
|
|
24486
|
+
* Query user entitlements for a specific user.
|
|
24487
|
+
* Returns: entitlement list
|
|
24443
24488
|
*/
|
|
24444
24489
|
getEntitlements({ userId, queryParams }) {
|
|
24445
24490
|
return this.newInstance().fetchNsUsersByUseridEntitlements(userId, queryParams);
|
|
24446
24491
|
}
|
|
24447
24492
|
/**
|
|
24448
|
-
* Exists any user active entitlement of specified itemIds, skus and appIds
|
|
24493
|
+
* Exists any user active entitlement of specified itemIds, skus and appIds
|
|
24449
24494
|
*/
|
|
24450
24495
|
getEntitlementOwnerShip({ userId, queryParams }) {
|
|
24451
24496
|
return this.newInstance().fetchNsUsersByUseridEntitlementsOwnershipAny(userId, queryParams);
|
|
24452
24497
|
}
|
|
24453
24498
|
/**
|
|
24454
|
-
* Get user entitlement ownership by itemIds
|
|
24499
|
+
* Get user entitlement ownership by itemIds.
|
|
24455
24500
|
*/
|
|
24456
24501
|
getEntitlementByItemIds({ userId, queryParams }) {
|
|
24457
24502
|
return this.newInstance().fetchNsUsersByUseridEntitlementsOwnershipByItemIds(userId, queryParams);
|
|
24458
24503
|
}
|
|
24459
24504
|
/**
|
|
24460
|
-
* 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
|
|
24505
|
+
* 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
|
|
24506
|
+
* Returns: consumed entitlement
|
|
24461
24507
|
*/
|
|
24462
24508
|
claimEntitlement({ userId, entitlementId, data }) {
|
|
24463
24509
|
return this.newInstance().putNsUsersByUseridEntitlementsByEntitlementidDecrement(userId, entitlementId, data);
|
|
@@ -24560,7 +24606,8 @@ class FulfillmentApi {
|
|
|
24560
24606
|
this.namespace = namespace;
|
|
24561
24607
|
this.cache = cache;
|
|
24562
24608
|
/**
|
|
24563
|
-
* Redeem campaign code
|
|
24609
|
+
* Redeem campaign code.
|
|
24610
|
+
* Returns: fulfillment result
|
|
24564
24611
|
*/
|
|
24565
24612
|
this.redeemCode = ({ userId, data }) => {
|
|
24566
24613
|
return this.newInstance().postNsUsersByUseridFulfillmentCode(userId, data);
|
|
@@ -25115,13 +25162,15 @@ class ItemApi {
|
|
|
25115
25162
|
this.cache = cache;
|
|
25116
25163
|
}
|
|
25117
25164
|
/**
|
|
25118
|
-
* This API is used to get item by appId
|
|
25165
|
+
* This API is used to get item by appId.
|
|
25166
|
+
* Returns: the item with that appId
|
|
25119
25167
|
*/
|
|
25120
25168
|
getItemByAppId({ ...queryParams }) {
|
|
25121
25169
|
return this.newInstance().fetchNsItemsByAppId(queryParams);
|
|
25122
25170
|
}
|
|
25123
25171
|
/**
|
|
25124
|
-
* Get item dynamic data for a published item
|
|
25172
|
+
* Get item dynamic data for a published item.
|
|
25173
|
+
* Returns: item dynamic data
|
|
25125
25174
|
*/
|
|
25126
25175
|
getItemByItemIdDynamic(itemId) {
|
|
25127
25176
|
return this.newInstance().fetchNsItemsByItemidDynamic(itemId);
|
|
@@ -25130,7 +25179,8 @@ class ItemApi {
|
|
|
25130
25179
|
return this.newInstance().fetchNsItemsByCriteria(queryParams);
|
|
25131
25180
|
}
|
|
25132
25181
|
/**
|
|
25133
|
-
* This API is used to query items by criteria within a store. If item not exist in specific region, default region item will return
|
|
25182
|
+
* This API is used to query items by criteria within a store. If item not exist in specific region, default region item will return.
|
|
25183
|
+
* Returns: the list of items
|
|
25134
25184
|
*/
|
|
25135
25185
|
getItemsByItemIds({ queryParams }) {
|
|
25136
25186
|
return this.newInstance().fetchNsItemsLocaleByIds(queryParams);
|
|
@@ -25155,13 +25205,15 @@ class ItemApi {
|
|
|
25155
25205
|
return result;
|
|
25156
25206
|
}
|
|
25157
25207
|
/**
|
|
25158
|
-
* This API is used to get an item in locale. If item not exist in specific region, default region item will return
|
|
25208
|
+
* This API is used to get an item in locale. If item not exist in specific region, default region item will return.
|
|
25209
|
+
* Returns: item data
|
|
25159
25210
|
*/
|
|
25160
25211
|
getItemsByItemIdLocale({ itemId, queryParams }) {
|
|
25161
25212
|
return this.newInstance().fetchNsItemsByItemidLocale(itemId, queryParams);
|
|
25162
25213
|
}
|
|
25163
25214
|
/**
|
|
25164
|
-
* This API is used to get an app in locale. If app not exist in specific region, default region app will return
|
|
25215
|
+
* This API is used to get an app in locale. If app not exist in specific region, default region app will return.
|
|
25216
|
+
* Returns: app data
|
|
25165
25217
|
*/
|
|
25166
25218
|
getAppInfoByItemId({ itemId, queryParams }) {
|
|
25167
25219
|
return this.newInstance().fetchNsItemsByItemidAppLocale(itemId, queryParams);
|
|
@@ -25411,25 +25463,30 @@ class OrderApi {
|
|
|
25411
25463
|
this.namespace = namespace;
|
|
25412
25464
|
this.cache = cache;
|
|
25413
25465
|
/**
|
|
25414
|
-
* Query user orders
|
|
25466
|
+
* Query user orders.
|
|
25467
|
+
* Returns: get order
|
|
25415
25468
|
*/
|
|
25416
25469
|
this.getOrderList = ({ userId, queryParams }) => {
|
|
25417
25470
|
return this.newInstance().fetchNsUsersByUseridOrders(userId, queryParams);
|
|
25418
25471
|
};
|
|
25419
25472
|
/**
|
|
25420
|
-
* Get user order
|
|
25473
|
+
* Get user order.
|
|
25474
|
+
* Returns: get order
|
|
25421
25475
|
*/
|
|
25422
25476
|
this.getOrderByOrderNo = ({ userId, orderNo }) => {
|
|
25423
25477
|
return this.newInstance().fetchNsUsersByUseridOrdersByOrderno(userId, orderNo);
|
|
25424
25478
|
};
|
|
25425
25479
|
/**
|
|
25426
|
-
* Cancel user order
|
|
25480
|
+
* Cancel user order.
|
|
25481
|
+
* Returns: cancelled order
|
|
25427
25482
|
*/
|
|
25428
25483
|
this.cancelOrder = ({ userId, orderNo }) => {
|
|
25429
25484
|
return this.newInstance().putNsUsersByUseridOrdersByOrdernoCancel(userId, orderNo);
|
|
25430
25485
|
};
|
|
25431
25486
|
/**
|
|
25432
|
-
* Create an order. The result contains the checkout link and payment token.
|
|
25487
|
+
* Create an order. The result contains the checkout link and payment token.
|
|
25488
|
+
* User with permission SANDBOX will create sandbox order that not real paid for xsolla/alipay and not validate price for wxpay.
|
|
25489
|
+
* Returns: created order
|
|
25433
25490
|
*/
|
|
25434
25491
|
this.createOrder = ({ userId, data }) => {
|
|
25435
25492
|
return this.newInstance().postNsUsersByUseridOrders(userId, data);
|
|
@@ -25764,31 +25821,37 @@ class PaymentApi {
|
|
|
25764
25821
|
this.namespace = namespace;
|
|
25765
25822
|
this.cache = cache;
|
|
25766
25823
|
/**
|
|
25767
|
-
* Get payment accounts
|
|
25824
|
+
* Get payment accounts.\
|
|
25825
|
+
* Returns: Payment account list
|
|
25768
25826
|
*/
|
|
25769
25827
|
this.getPaymentAccounts = (userId) => {
|
|
25770
25828
|
return this.newInstance().fetchNsUsersByUseridPaymentAccounts(userId);
|
|
25771
25829
|
};
|
|
25772
25830
|
/**
|
|
25773
|
-
* Delete payment account
|
|
25831
|
+
* Delete payment account.
|
|
25832
|
+
*
|
|
25833
|
+
* Other detail info:
|
|
25774
25834
|
*/
|
|
25775
25835
|
this.deletePaymentAccount = ({ userId, type, id }) => {
|
|
25776
25836
|
return this.newInstance().deleteNsUsersByUseridPaymentAccountsByTypeById(userId, type, id);
|
|
25777
25837
|
};
|
|
25778
25838
|
/**
|
|
25779
|
-
* Get payment order info
|
|
25839
|
+
* Get payment order info.
|
|
25840
|
+
* Returns: Payment order details
|
|
25780
25841
|
*/
|
|
25781
25842
|
this.getPaymentInfo = (paymentOrderNo) => {
|
|
25782
25843
|
return new PaymentStation$(Network.create(this.conf), this.namespace, this.cache).fetchNsPaymentOrdersByPaymentordernoInfo(paymentOrderNo);
|
|
25783
25844
|
};
|
|
25784
25845
|
/**
|
|
25785
|
-
* Do payment(For now, this only support checkout.com)
|
|
25846
|
+
* Do payment(For now, this only support checkout.com).
|
|
25847
|
+
* Returns: Payment process result
|
|
25786
25848
|
*/
|
|
25787
25849
|
this.processPaymentOrder = (paymentOrderNo, data, queryParams) => {
|
|
25788
25850
|
return new PaymentStation$(Network.create(this.conf), this.namespace, this.cache).postNsPaymentOrdersByPaymentordernoPay(paymentOrderNo, data, queryParams);
|
|
25789
25851
|
};
|
|
25790
25852
|
/**
|
|
25791
|
-
* Get payment provider public config, at current only Strip provide public config
|
|
25853
|
+
* Get payment provider public config, at current only Strip provide public config.
|
|
25854
|
+
* Returns: Public config
|
|
25792
25855
|
*/
|
|
25793
25856
|
this.getPaymentProviderPublicConfig = (paymentProvider, region, sandbox) => {
|
|
25794
25857
|
return new PaymentStation$(Network.create(this.conf), this.namespace, this.cache).fetchNsPaymentPublicconfig({
|
|
@@ -25798,19 +25861,22 @@ class PaymentApi {
|
|
|
25798
25861
|
});
|
|
25799
25862
|
};
|
|
25800
25863
|
/**
|
|
25801
|
-
* Check payment order paid status
|
|
25864
|
+
* Check payment order paid status.
|
|
25865
|
+
* Returns: Payment order paid result
|
|
25802
25866
|
*/
|
|
25803
25867
|
this.getPaymentOrderStatus = (paymentOrderNo) => {
|
|
25804
25868
|
return new PaymentStation$(Network.create(this.conf), this.namespace, this.cache).fetchNsPaymentOrdersByPaymentordernoStatus(paymentOrderNo);
|
|
25805
25869
|
};
|
|
25806
25870
|
/**
|
|
25807
|
-
* Get payment methods
|
|
25871
|
+
* Get payment methods.
|
|
25872
|
+
* Returns: Payment method list
|
|
25808
25873
|
*/
|
|
25809
25874
|
this.getPaymentMethods = (paymentOrderNo) => {
|
|
25810
25875
|
return new PaymentStation$(Network.create(this.conf), this.namespace, this.cache).fetchNsPaymentMethods({ paymentOrderNo });
|
|
25811
25876
|
};
|
|
25812
25877
|
/**
|
|
25813
|
-
* Check and get a payment order's should pay tax
|
|
25878
|
+
* Check and get a payment order's should pay tax.
|
|
25879
|
+
* Returns: tax result
|
|
25814
25880
|
*/
|
|
25815
25881
|
this.getPaymentTax = (paymentProvider, paymentOrderNo, zipCode) => {
|
|
25816
25882
|
return new PaymentStation$(Network.create(this.conf), this.namespace, this.cache).fetchNsPaymentTax({
|
|
@@ -25820,7 +25886,8 @@ class PaymentApi {
|
|
|
25820
25886
|
});
|
|
25821
25887
|
};
|
|
25822
25888
|
/**
|
|
25823
|
-
* Get payment url
|
|
25889
|
+
* Get payment url.
|
|
25890
|
+
* Returns: Get payment link
|
|
25824
25891
|
*/
|
|
25825
25892
|
this.createPaymentUrl = (data) => {
|
|
25826
25893
|
return new PaymentStation$(Network.create(this.conf), this.namespace, this.cache).postNsPaymentLink(data);
|
|
@@ -26078,37 +26145,51 @@ class SubscriptionApi {
|
|
|
26078
26145
|
this.cache = cache;
|
|
26079
26146
|
}
|
|
26080
26147
|
/**
|
|
26081
|
-
* Query user subscriptions
|
|
26148
|
+
* Query user subscriptions.
|
|
26149
|
+
* Returns: paginated subscription
|
|
26082
26150
|
*/
|
|
26083
26151
|
getUserSubscriptions({ userId, queryParams }) {
|
|
26084
26152
|
return this.newInstance().fetchNsUsersByUseridSubscriptions(userId, queryParams);
|
|
26085
26153
|
}
|
|
26086
26154
|
/**
|
|
26087
|
-
* Get user subscription
|
|
26155
|
+
* Get user subscription.
|
|
26156
|
+
* Returns: subscription
|
|
26088
26157
|
*/
|
|
26089
26158
|
getUserSubscriptionBySubscriptionId({ userId, subscriptionId }) {
|
|
26090
26159
|
return this.newInstance().fetchNsUsersByUseridSubscriptionsBySubscriptionid(userId, subscriptionId);
|
|
26091
26160
|
}
|
|
26092
26161
|
/**
|
|
26093
|
-
* Subscribe a subscription. Support both real and virtual payment. Need go through payment flow using the paymentOrderNo if paymentFlowRequired true
|
|
26162
|
+
* Subscribe a subscription. Support both real and virtual payment. Need go through payment flow using the paymentOrderNo if paymentFlowRequired true.
|
|
26163
|
+
* __ACTIVE USER subscription can't do subscribe again.__
|
|
26164
|
+
* __The next billing date will be X(default 4) hours before the current period ends if correctly subscribed.__
|
|
26165
|
+
* User with permission SANDBOX will create sandbox subscription that not real paid.
|
|
26166
|
+
*
|
|
26167
|
+
* Returns: created subscription
|
|
26094
26168
|
*/
|
|
26095
26169
|
createSubscription({ userId, data }) {
|
|
26096
26170
|
return this.newInstance().postNsUsersByUseridSubscriptions(userId, data);
|
|
26097
26171
|
}
|
|
26098
26172
|
/**
|
|
26099
|
-
* Get user subscription billing histories
|
|
26173
|
+
* Get user subscription billing histories.
|
|
26174
|
+
* Returns: paginated subscription history
|
|
26100
26175
|
*/
|
|
26101
26176
|
getUserSubscriptionBillingHistory({ userId, subscriptionId, queryParams }) {
|
|
26102
26177
|
return this.newInstance().fetchNsUsersByUseridSubscriptionsBySubscriptionidHistory(userId, subscriptionId, queryParams);
|
|
26103
26178
|
}
|
|
26104
26179
|
/**
|
|
26105
|
-
* Request to change a subscription billing account, this will guide user to payment station.
|
|
26180
|
+
* Request to change a subscription billing account, this will guide user to payment station.
|
|
26181
|
+
* The actual change will happen at the 0 payment notification successfully handled.
|
|
26182
|
+
* Only ACTIVE USER subscription with real currency billing account can be changed.
|
|
26183
|
+
* Returns: updated subscription
|
|
26106
26184
|
*/
|
|
26107
26185
|
updateUserSubscriptionPaymentMethod({ userId, subscriptionId }) {
|
|
26108
26186
|
return this.newInstance().putNsUsersByUseridSubscriptionsBySubscriptionidBillingAccount(userId, subscriptionId);
|
|
26109
26187
|
}
|
|
26110
26188
|
/**
|
|
26111
|
-
* Cancel a subscription, only ACTIVE subscription can be cancelled.
|
|
26189
|
+
* Cancel a subscription, only ACTIVE subscription can be cancelled.
|
|
26190
|
+
* __Ensure successfully cancel, recommend at least 1 day before current period ends, otherwise it may be charging or charged.__
|
|
26191
|
+
* Set immediate true, the subscription will be terminated immediately, otherwise till the end of current billing cycle.
|
|
26192
|
+
* Returns: cancelled subscription
|
|
26112
26193
|
*/
|
|
26113
26194
|
cancelUserSubscription({ userId, subscriptionId, data }) {
|
|
26114
26195
|
return this.newInstance().putNsUsersByUseridSubscriptionsBySubscriptionidCancel(userId, subscriptionId, data);
|
|
@@ -26278,13 +26359,19 @@ class WalletApi {
|
|
|
26278
26359
|
this.namespace = namespace;
|
|
26279
26360
|
this.cache = cache;
|
|
26280
26361
|
/**
|
|
26281
|
-
* get my wallet by currency code and namespace
|
|
26362
|
+
* get my wallet by currency code and namespace.
|
|
26363
|
+
*
|
|
26364
|
+
* Returns: wallet info
|
|
26365
|
+
* Path's namespace:
|
|
26366
|
+
* - can be filled with __publisher namespace__ in order to get __publisher user wallet__
|
|
26367
|
+
* - can be filled with __game namespace__ in order to get __game user wallet__
|
|
26282
26368
|
*/
|
|
26283
26369
|
this.getUserMeWallet = (currencyCode) => {
|
|
26284
26370
|
return this.newInstance().fetchNsUsersMeWalletsByCurrencycode(currencyCode);
|
|
26285
26371
|
};
|
|
26286
26372
|
/**
|
|
26287
|
-
*
|
|
26373
|
+
* Get a wallet by currency code.
|
|
26374
|
+
* Returns: wallet info
|
|
26288
26375
|
*/
|
|
26289
26376
|
this.getWalletByUserId = (userId, currencyCode) => {
|
|
26290
26377
|
return this.newInstance().fetchNsUsersByUseridWalletsByCurrencycode(userId, currencyCode);
|
|
@@ -26320,7 +26407,7 @@ class WalletApi {
|
|
|
26320
26407
|
class ApiFactory {
|
|
26321
26408
|
static userAuthorization(config, options, refreshToken, namespace, overrides) {
|
|
26322
26409
|
const conf = ApiFactory.mergedConfigs(config, overrides);
|
|
26323
|
-
return new
|
|
26410
|
+
return new UserAuthorizationApi(conf, namespace, false, {
|
|
26324
26411
|
clientId: options.clientId,
|
|
26325
26412
|
redirectURI: options.redirectURI,
|
|
26326
26413
|
baseURL: options.baseURL,
|
|
@@ -40539,7 +40626,7 @@ exports.UserActiveBanResponse = UserActiveBanResponse;
|
|
|
40539
40626
|
exports.UserActiveBanResponseV3 = UserActiveBanResponseV3;
|
|
40540
40627
|
exports.UserActiveBanResponseV4 = UserActiveBanResponseV4;
|
|
40541
40628
|
exports.UserApi = UserApi;
|
|
40542
|
-
exports.
|
|
40629
|
+
exports.UserAuthorizationApi = UserAuthorizationApi;
|
|
40543
40630
|
exports.UserBan = UserBan;
|
|
40544
40631
|
exports.UserBanRequest = UserBanRequest;
|
|
40545
40632
|
exports.UserBanResponse = UserBanResponse;
|