@accelbyte/sdk 0.2.0-beta.1 → 0.2.0-beta.12

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.
@@ -9543,7 +9543,10 @@ 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.<br/>Other detail info: <ul><li><i>Required permission</i>: resource = <b>"NAMESPACE:{namespace}:FILEUPLOAD"</b>, action=1 <b>(CREATE)</b></li><li><i>Action code</i>: 11101</li><li><i>Returns</i>: URL data</li></ul>
9546
+ * POST [/basic/v1/public/namespaces/{namespace}/folders/{folder}/files](api)
9547
+ *
9548
+ * Generate an upload URL. It's valid for 10 minutes.
9549
+ * Returns: URL data
9547
9550
  */
9548
9551
  this.generateFolderUploadFileUrl = ({ folder, queryParams }) => {
9549
9552
  return this.newInstance().postV1NsFoldersByFolderFiles(folder, queryParams);
@@ -9664,11 +9667,18 @@ class MiscApi {
9664
9667
  this.namespace = namespace;
9665
9668
  this.cache = cache;
9666
9669
  /**
9667
- * List countries.<br>Other detail info: <ul><li><i>Returns</i>: country code list</li></ul>
9670
+ * GET [/basic/v1/public/namespaces/{namespace}/misc/countries](api)
9671
+ *
9672
+ * _Returns_: country code list
9668
9673
  */
9669
9674
  this.getCountries = (lang) => {
9670
9675
  return this.newInstance().fetchV1NsMiscCountries({ lang });
9671
9676
  };
9677
+ /**
9678
+ * GET [/basic/v1/public/namespaces/{namespace}/misc/languages](api)
9679
+ *
9680
+ * _Returns_: language list
9681
+ */
9672
9682
  this.getLanguages = () => {
9673
9683
  return this.newInstance().fetchV1NsMiscLanguages();
9674
9684
  };
@@ -9758,7 +9768,13 @@ class NamespaceApi {
9758
9768
  this.namespace = namespace;
9759
9769
  this.cache = cache;
9760
9770
  /**
9761
- * Get all namespaces.<br>Other detail info: <ul><li><i>Required permission</i>: login user</li><li><i>Action code</i>: 11303</li><li><i>Returns</i>: list of namespaces</li></ul>
9771
+ * GET [/basic/v1/public/namespaces](api)
9772
+ *
9773
+ * Get all namespaces.
9774
+ *
9775
+ * - _Required permission_: login user
9776
+ * - _Action code_: 11303
9777
+ * - _Returns_: list of namespaces
9762
9778
  */
9763
9779
  this.getNamespaces = (activeOnly) => {
9764
9780
  return this.newInstance().fetchV1PublicNamespaces({ activeOnly });
@@ -10065,25 +10081,39 @@ class UserProfileApi {
10065
10081
  this.namespace = namespace;
10066
10082
  this.cache = cache;
10067
10083
  /**
10068
- * Get my profile<br><b>Client with user token can get user profile in target namespace</b><br>Other detail info: <ul><li><i>Required permission</i>: resource=<b>"NAMESPACE:{namespace}:PROFILE"</b>, action=2 <b>(READ)</b></li><li><i>Action code</i>: 11403</li><li><i>Returns</i>: user profile</li><li><i>Path's namespace</i> : <ul><li>can be filled with <b>publisher namespace</b> in order to get <b>publisher user profile</b></li><li>can be filled with <b>game namespace</b> in order to get <b>game user profile</b></li></ul></li><li><i>Language</i> : allowed format: en, en-US</li><li><i>Timezone</i> : IANA time zone, e.g. Asia/Shanghai</li></ul>
10084
+ * GET [/basic/v1/public/namespaces/{namespace}/users/me/profiles](api)
10085
+ *
10086
+ * Get my profile
10087
+ *
10088
+ * __Client with user token can get user profile in target namespace__
10069
10089
  */
10070
10090
  this.getUsersMeProfiles = () => {
10071
10091
  return this.newInstance().fetchV1NsUsersMeProfiles();
10072
10092
  };
10073
10093
  /**
10074
- * Create my profile.<br><b>Client with user token can create user profile in target namespace</b><br>Other detail info: <ul><li><i>Required permission</i>: resource=<b>"NAMESPACE:{namespace}:PROFILE"</b>, action=1 <b>(CREATE)</b></li><li><i>Action code</i>: 11401</li><li><i>Returns</i>: Created user profile</li><li><i>Path's namespace</i> : <ul><li>can be filled with <b>publisher namespace</b> in order to create <b>publisher user profile</b></li><li>can be filled with <b>game namespace</b> in order to create <b>game user profile</b></li></ul></li><li><i>Language</i> : allowed format: en, en-US</li><li><i>Country</i> : ISO3166-1 alpha-2 two letter, e.g. US </li><li><i>Timezone</i> : IANA time zone, e.g. Asia/Shanghai</li></ul>
10094
+ * POST [/basic/v1/public/namespaces/{namespace}/users/me/profiles](api)
10095
+ *
10096
+ * Create my profile.
10097
+ *
10098
+ * __Client with user token can create user profile in target namespace__
10075
10099
  */
10076
10100
  this.createUserMeProfile = (data) => {
10077
10101
  return this.newInstance().postV1NsUsersMeProfiles(data);
10078
10102
  };
10079
10103
  /**
10080
- * Update my profile.<br>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.<br>Other detail info: <ul><li><i>Required permission</i>: resource=<b>"NAMESPACE:{namespace}:PROFILE"</b>, action=4 <b>(UPDATE)</b></li><li><i>Action code</i>: 11402</li><li><i>Returns</i>: user profile</li><li><i>Path's namespace</i> : <ul><li>can be filled with <b>publisher namespace</b> in order to update <b>publisher user profile</b></li><li>can be filled with <b>game namespace</b> in order to update <b>game user profile</b></li></ul></li><li><i>Language</i> : allowed format: en, en-US</li><li><i>Timezone</i> : IANA time zone, e.g. Asia/Shanghai</li></ul>
10104
+ * PUT [/basic/v1/public/namespaces/{namespace}/users/me/profiles](api)
10105
+ *
10106
+ * Update my profile.
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.
10081
10108
  */
10082
10109
  this.updateUserMeProfile = (data) => {
10083
10110
  return this.newInstance().putV1NsUsersMeProfiles(data);
10084
10111
  };
10085
10112
  /**
10086
- * Update partially custom attributes tied to user id.<br>Other detail info: <ul><li><i>Required permission</i>: resource=<b>"NAMESPACE:{namespace}:USER:{userId}:PROFILE"</b>, action=4 <b>(UPDATE)</b></li><li><i>Action code</i>: 11402</li><li><i>Request body</i> : allowed format: JSON object</li><li><i>Returns</i>: Updated custom attributes</li></ul>
10113
+ * PUT [/basic/v1/public/namespaces/{namespace}/users/{userId}/profiles/customAttributes](api)
10114
+ *
10115
+ * Update partially custom attributes tied to user id.
10116
+ * _Returns_: Updated custom attributes
10087
10117
  */
10088
10118
  this.updateUserCustomAttributes = (userId, data) => {
10089
10119
  return this.newInstance().putV1NsUsersByUseridProfilesCustomAttributes(userId, data);
@@ -10150,12 +10180,17 @@ class CachingApi {
10150
10180
  constructor(conf, namespace) {
10151
10181
  this.conf = conf;
10152
10182
  this.namespace = namespace;
10153
- }
10154
- /**
10155
- * This API is used to retrieve detailed diff cache.<br/>The response will contains list of diff cache files along with its download url.<br/><br/>Other detail info: <ul><li><i>Required permission</i>: login user</li></ul>
10156
- */
10157
- getDiffCache(sourceBuildId, destinationBuildId) {
10158
- return this.newInstance().fetchNsDiffCacheSourceBySourcebuildidDestByDestinationbuildid(sourceBuildId, destinationBuildId);
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
+ };
10159
10194
  }
10160
10195
  newInstance() {
10161
10196
  // this is expensive to cache, apply "cache: false"
@@ -10329,18 +10364,26 @@ class DlcApi {
10329
10364
  constructor(conf, namespace) {
10330
10365
  this.conf = conf;
10331
10366
  this.namespace = namespace;
10332
- }
10333
- /**
10334
- * Retrieve the list of DLC available on specific game. Use game's appId to query.<p>Other detail info: <ul><li><i>Returns</i>: list of DLC</li></ul>
10335
- */
10336
- getLatestDLCByGameAppId(appId) {
10337
- return this.newInstance().fetchNsDlcsLatestByGameAppIdByAppid(appId);
10338
- }
10339
- /**
10340
- * Retrieve the list of DLC available on specific game. Use DLC's appId to query.<p>Other detail info: <ul><li><i>Returns</i>: appId of game and list of its builds by platformId</li></ul>
10341
- */
10342
- getBaseGamesByDlcAppId(dlcAppId) {
10343
- return this.newInstance().fetchNsAppsLatestByDlcAppIdByDlcappid(dlcAppId);
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
+ };
10344
10387
  }
10345
10388
  newInstance() {
10346
10389
  // this is be expensive to cache, apply "cache: false"
@@ -10349,7 +10392,7 @@ class DlcApi {
10349
10392
  }
10350
10393
 
10351
10394
  /*
10352
- * Copyright (c) 2022 AccelByte Inc. All Rights Reserved
10395
+ * Copyright (c) 2022-2023 AccelByte Inc. All Rights Reserved
10353
10396
  * This is licensed software from AccelByte Inc, for limitations
10354
10397
  * and restrictions contact your company contract manager.
10355
10398
  */
@@ -10391,12 +10434,7 @@ const AvailablePlatform = [
10391
10434
  arch: [ARCH.X64],
10392
10435
  targetPlatform: [BUILDINFO_PLATFORM_ID.WIN64, BUILDINFO_PLATFORM_ID.WINDOWS, BUILDINFO_PLATFORM_ID.WIN32]
10393
10436
  }
10394
- ];
10395
- exports.LogLevel = void 0;
10396
- (function (LogLevel) {
10397
- LogLevel["DEBUG"] = "DEBUG";
10398
- LogLevel["INFO"] = "INFO";
10399
- })(exports.LogLevel || (exports.LogLevel = {}));
10437
+ ];
10400
10438
 
10401
10439
  /*
10402
10440
  * Copyright (c) 2022-2023 AccelByte Inc. All Rights Reserved
@@ -10707,56 +10745,76 @@ class DownloaderApi {
10707
10745
  constructor(conf, namespace) {
10708
10746
  this.conf = conf;
10709
10747
  this.namespace = namespace;
10710
- }
10711
- /**
10712
- * This API is used to get simple build manifest that contains list of current build in various platform.<p>Other detail info: <ul><li><i>Required permission</i>: login user</li><li><i>Returns</i>: build manifest</li></ul>
10713
- */
10714
- getAvailableBuilds(appId) {
10715
- return this.newInstance().fetchNsAvailablebuildsByAppid(appId);
10716
- }
10717
- /**
10718
- * This API is used to get build manifest of release version of the application.<p>Other detail info: <ul><li><i>Required permission</i>: login user</li><li><i>Returns</i>: build manifest</li></ul>
10719
- */
10720
- getBuildManifest(appId, platformId) {
10721
- const axios = Network.create({ ...this.conf, timeout: 1800000 });
10722
- return new Downloader$(axios, this.namespace, false).fetchNsV2UpdategameByAppidByPlatformid(appId, platformId);
10723
- }
10724
- /**
10725
- * This API is used to retrieve detailed diff cache.<br/>The response will contains list of diff cache files along with its download url.<br/><br/>Other detail info: <ul><li><i>Required permission</i>: login user</li></ul>
10726
- */
10727
- getDiffCache(sourceBuildId, destinationBuildId) {
10728
- return new Caching$(Network.create(this.conf), this.namespace, false).fetchNsDiffCacheSourceBySourcebuildidDestByDestinationbuildid(sourceBuildId, destinationBuildId);
10729
- }
10730
- /**
10731
- * Check which platform is available for the user to download the game
10732
- */
10733
- getMatchPlatform({ buildsAvailability, userPlatform }) {
10734
- const availablePlatformID = new Set();
10735
- for (const buildAvailability of buildsAvailability) {
10736
- if (buildAvailability.platformId) {
10737
- availablePlatformID.add(buildAvailability.platformId);
10748
+ /**
10749
+ * GET [/buildinfo/public/namespaces/{namespace}/availablebuilds/{appId}](api)
10750
+ *
10751
+ * This API is used to get simple build manifest that contains list of current build in various platform.
10752
+ *
10753
+ * - _Required permission_: login user
10754
+ * - _Returns_: build manifest
10755
+ */
10756
+ this.getAvailableBuilds = (appId) => {
10757
+ return this.newInstance().fetchNsAvailablebuildsByAppid(appId);
10758
+ };
10759
+ /**
10760
+ * GET [/buildinfo/public/namespaces/{namespace}/v2/updategame/{appId}/{platformId}](api)
10761
+ *
10762
+ * This API is used to get build manifest of release version of the application.
10763
+ *
10764
+ * - _Required permission_: login user
10765
+ * - _Returns_: build manifest
10766
+ */
10767
+ this.getBuildManifest = (appId, platformId) => {
10768
+ const axios = Network.create({ ...this.conf, timeout: 1800000 });
10769
+ return new Downloader$(axios, this.namespace, false).fetchNsV2UpdategameByAppidByPlatformid(appId, platformId);
10770
+ };
10771
+ /**
10772
+ * GET [/buildinfo/public/namespaces/{namespace}/diff/cache/source/{sourceBuildId}/dest/{destinationBuildId}](api)
10773
+ *
10774
+ * This API is used to retrieve detailed diff cache.
10775
+ * The response will contains list of diff cache files along with its download url.
10776
+ *
10777
+ * - _Required permission_: login user
10778
+ */
10779
+ this.getDiffCache = (sourceBuildId, destinationBuildId) => {
10780
+ return new Caching$(Network.create(this.conf), this.namespace, false).fetchNsDiffCacheSourceBySourcebuildidDestByDestinationbuildid(sourceBuildId, destinationBuildId);
10781
+ };
10782
+ /**
10783
+ * Check which platform is available for the user to download the game
10784
+ *
10785
+ * @internal
10786
+ */
10787
+ this.getMatchPlatform = ({ buildsAvailability, userPlatform }) => {
10788
+ const availablePlatformID = new Set();
10789
+ for (const buildAvailability of buildsAvailability) {
10790
+ if (buildAvailability.platformId) {
10791
+ availablePlatformID.add(buildAvailability.platformId);
10792
+ }
10738
10793
  }
10739
- }
10740
- const currentMatchPlatform = this.getCurrentPlatform(userPlatform);
10741
- if (currentMatchPlatform) {
10742
- for (const key in currentMatchPlatform.targetPlatform) {
10743
- if (availablePlatformID.has(currentMatchPlatform.targetPlatform[key])) {
10744
- return currentMatchPlatform.targetPlatform[key];
10794
+ const currentMatchPlatform = this.getCurrentPlatform(userPlatform);
10795
+ if (currentMatchPlatform) {
10796
+ for (const key in currentMatchPlatform.targetPlatform) {
10797
+ if (availablePlatformID.has(currentMatchPlatform.targetPlatform[key])) {
10798
+ return currentMatchPlatform.targetPlatform[key];
10799
+ }
10745
10800
  }
10746
10801
  }
10747
- }
10748
- return null;
10802
+ return null;
10803
+ };
10804
+ /**
10805
+ * @internal
10806
+ */
10807
+ this.getCurrentPlatform = (userPlatform) => {
10808
+ const devicePlatform = userPlatform.platform;
10809
+ const deviceArch = userPlatform.arch;
10810
+ const currentPlatform = AvailablePlatform.find((platform) => platform.platform === devicePlatform && platform.arch.includes(deviceArch));
10811
+ return currentPlatform;
10812
+ };
10749
10813
  }
10750
10814
  newInstance() {
10751
10815
  // this is be expensive to cache, apply "cache: false"
10752
10816
  return new Downloader$(Network.create(this.conf), this.namespace, false);
10753
10817
  }
10754
- getCurrentPlatform(userPlatform) {
10755
- const devicePlatform = userPlatform.platform;
10756
- const deviceArch = userPlatform.arch;
10757
- const currentPlatform = AvailablePlatform.find((platform) => platform.platform === devicePlatform && platform.arch.includes(deviceArch));
10758
- return currentPlatform;
10759
- }
10760
10818
  }
10761
10819
 
10762
10820
  /*
@@ -10860,16 +10918,17 @@ class EventApi {
10860
10918
  this.namespace = namespace;
10861
10919
  this.cache = cache;
10862
10920
  /**
10863
- * <p>Available Type: </p>
10864
- * <ul>
10865
- * <li>email</li>
10866
- * <li>password</li>
10867
- * <li>displayname</li>
10868
- * <li>dateofbirth</li>
10869
- * <li>country</li>
10870
- * <li>language</li>
10871
- * </ul>
10872
- * <p>Requires a valid user access token</p>
10921
+ * GET [/event/v2/public/namespaces/{namespace}/users/{userId}/edithistory](api)
10922
+ *
10923
+ * Available Type:
10924
+ * - email
10925
+ * - password
10926
+ * - displayname
10927
+ * - dateofbirth
10928
+ * - country
10929
+ * - language
10930
+ *
10931
+ * _Requires a valid user access token_
10873
10932
  */
10874
10933
  this.getAccountHistoryByUserId = ({ userId, queryParams }) => {
10875
10934
  return this.newInstance().fetchEventV2NsUsersByUseridEdithistory(userId, queryParams);
@@ -10963,27 +11022,36 @@ class DataDeletionApi {
10963
11022
  this.conf = conf;
10964
11023
  this.namespace = namespace;
10965
11024
  this.cache = cache;
10966
- }
10967
- /**
10968
- * <p>Fetch the status to check whether or not a user's account is on a deletion status</p>
10969
- * <p>Requires valid user access token</p>
10970
- */
10971
- getGdprDeletionStatus(userId) {
10972
- return this.newInstance().fetchGdprNsUsersByUseridDeletionsStatus(userId);
10973
- }
10974
- /**
10975
- * <p>Request an account's deletion</p>
10976
- * <p>Requires valid user access token and password
10977
- */
10978
- requestAccountDeletion({ userId, data }) {
10979
- return this.newInstance().postGdprNsUsersByUseridDeletions(userId, data);
10980
- }
10981
- /**
10982
- * <p>Cancel a deletion request</p>
10983
- * <p>Requires valid user access token</p>
10984
- */
10985
- cancelAccountDeletion(userId) {
10986
- return this.newInstance().deleteGdprNsUsersByUseridDeletions(userId);
11025
+ /**
11026
+ * GET [/gdpr/public/namespaces/{namespace}/users/{userId}/deletions/status](api)
11027
+ *
11028
+ * Fetch the status to check whether or not a user's account is on a deletion status
11029
+ *
11030
+ * _Requires a valid user access token_
11031
+ */
11032
+ this.getGdprDeletionStatus = (userId) => {
11033
+ return this.newInstance().fetchGdprNsUsersByUseridDeletionsStatus(userId);
11034
+ };
11035
+ /**
11036
+ * POST [/gdpr/public/namespaces/{namespace}/users/{userId}/deletions](api)
11037
+ *
11038
+ * Request an account's deletion
11039
+ *
11040
+ * _Requires a valid user access token and password_
11041
+ */
11042
+ this.requestAccountDeletion = ({ userId, data }) => {
11043
+ return this.newInstance().postGdprNsUsersByUseridDeletions(userId, data);
11044
+ };
11045
+ /**
11046
+ * DELETE [/gdpr/public/namespaces/{namespace}/users/{userId}/deletions](api)
11047
+ *
11048
+ * Cancel a deletion request
11049
+ *
11050
+ * _Requires a valid user access token_
11051
+ */
11052
+ this.cancelAccountDeletion = (userId) => {
11053
+ return this.newInstance().deleteGdprNsUsersByUseridDeletions(userId);
11054
+ };
10987
11055
  }
10988
11056
  newInstance() {
10989
11057
  return new DataDeletion$(Network.create(this.conf), this.namespace, this.cache);
@@ -11104,34 +11172,46 @@ class DataRetrievalApi {
11104
11172
  this.conf = conf;
11105
11173
  this.namespace = namespace;
11106
11174
  this.cache = cache;
11107
- }
11108
- /**
11109
- * <p>Fetch personal data request list</p>
11110
- * <p>Requires valid user access token</p>
11111
- */
11112
- getGdprDataRequestList({ userId, queryParams }) {
11113
- return this.newInstance().fetchGdprNsUsersByUseridRequests(userId, queryParams);
11114
- }
11115
- /**
11116
- * <p>Create a request for personal data download</p>
11117
- * <p>Requires valid user access token</p>
11118
- */
11119
- requestGdprData({ userId, data }) {
11120
- return this.newInstance().postGdprNsUsersByUseridRequests(userId, data);
11121
- }
11122
- /**
11123
- * <p>Cancel the request for personal data dowwnload</p>
11124
- * <p>Requires valid user access token</p>
11125
- */
11126
- cancelGdprDataRequest({ userId, requestDate }) {
11127
- return this.newInstance().deleteGdprNsUsersByUseridRequestsByRequestdate(userId, requestDate);
11128
- }
11129
- /**
11130
- * <p>Create a download URL for personal data request</p>
11131
- * <p>Requires valid user access token</p>
11132
- */
11133
- requestGdprDataDownloadUrl({ userId, requestDate, data }) {
11134
- return this.newInstance().postGdprNsUsersByUseridRequestsByRequestdateGenerate(userId, requestDate, data);
11175
+ /**
11176
+ * GET [/gdpr/public/namespaces/{namespace}/users/{userId}/requests](api)
11177
+ *
11178
+ * Fetch personal data request list
11179
+ *
11180
+ * _Requires a valid user access token_
11181
+ */
11182
+ this.getGdprDataRequestList = ({ userId, queryParams }) => {
11183
+ return this.newInstance().fetchGdprNsUsersByUseridRequests(userId, queryParams);
11184
+ };
11185
+ /**
11186
+ * POST [/gdpr/public/namespaces/{namespace}/users/{userId}/requests](api)
11187
+ *
11188
+ * Create a request for personal data download
11189
+ *
11190
+ * _Requires a valid user access token_
11191
+ */
11192
+ this.requestGdprData = ({ userId, data }) => {
11193
+ return this.newInstance().postGdprNsUsersByUseridRequests(userId, data);
11194
+ };
11195
+ /**
11196
+ * DELETE [/gdpr/public/namespaces/{namespace}/users/{userId}/requests/{requestDate}](api)
11197
+ *
11198
+ * Cancel the request for personal data download
11199
+ *
11200
+ * _Requires a valid user access token_
11201
+ */
11202
+ this.cancelGdprDataRequest = ({ userId, requestDate }) => {
11203
+ return this.newInstance().deleteGdprNsUsersByUseridRequestsByRequestdate(userId, requestDate);
11204
+ };
11205
+ /**
11206
+ * POST [/gdpr/public/namespaces/{namespace}/users/{userId}/requests/{requestDate}/generate](api)
11207
+ *
11208
+ * Create a download URL for personal data request
11209
+ *
11210
+ * _Requires a valid user access token_
11211
+ */
11212
+ this.requestGdprDataDownloadUrl = ({ userId, requestDate, data }) => {
11213
+ return this.newInstance().postGdprNsUsersByUseridRequestsByRequestdateGenerate(userId, requestDate, data);
11214
+ };
11135
11215
  }
11136
11216
  newInstance() {
11137
11217
  return new DataRetrieval$(Network.create(this.conf), this.namespace, this.cache);
@@ -11224,10 +11304,11 @@ class InputValidationsApi {
11224
11304
  this.namespace = namespace;
11225
11305
  this.cache = cache;
11226
11306
  /**
11227
- * <p>No role required</p>
11228
- * <p>This method is to get list of input validation configuration.</p>
11229
- * <p><code>regex</code> parameter will be returned if <code>isCustomRegex</code> is true. Otherwise, it will be empty.</p>
11307
+ * GET [/iam/v3/public/inputValidations](api)
11230
11308
  *
11309
+ * No role required
11310
+ * This method is to get list of input validation configuration.
11311
+ * `regex` parameter will be returned if `isCustomRegex` is true. Otherwise, it will be empty.
11231
11312
  */
11232
11313
  this.getValidations = (languageCode, defaultOnEmpty) => {
11233
11314
  const queryParams = { languageCode, defaultOnEmpty };
@@ -12102,7 +12183,7 @@ const uponRefreshComplete = (error, tokenResponse, onGetUserSession, onSessionEx
12102
12183
  };
12103
12184
 
12104
12185
  /*
12105
- * Copyright (c) 2022 AccelByte Inc. All Rights Reserved
12186
+ * Copyright (c) 2022-2023 AccelByte Inc. All Rights Reserved
12106
12187
  * This is licensed software from AccelByte Inc, for limitations
12107
12188
  * and restrictions contact your company contract manager.
12108
12189
  */
@@ -18813,7 +18894,7 @@ var rabbitLegacy = {exports: {}};
18813
18894
  var cryptoJs = cryptoJs$1.exports;
18814
18895
 
18815
18896
  /*
18816
- * Copyright (c) 2022 AccelByte Inc. All Rights Reserved
18897
+ * Copyright (c) 2022-2023 AccelByte Inc. All Rights Reserved
18817
18898
  * This is licensed software from AccelByte Inc, for limitations
18818
18899
  * and restrictions contact your company contract manager.
18819
18900
  */
@@ -20193,7 +20274,7 @@ class LoginErrorUnknown extends Error {
20193
20274
  }
20194
20275
  class LoginErrorUnmatchedState extends Error {
20195
20276
  }
20196
- class UserAuthorization {
20277
+ class UserAuthorizationApi {
20197
20278
  /**
20198
20279
  * @internal
20199
20280
  */
@@ -20203,81 +20284,83 @@ class UserAuthorization {
20203
20284
  this.cache = cache;
20204
20285
  this.options = options;
20205
20286
  /**
20206
- * <p>This method supports grant type:</p><ol>
20207
- * <li>Grant Type == <code>authorization_code</code>:<br />
20287
+ * POST: [/iam/v3/oauth/token](api)
20288
+ *
20289
+ * This method supports grant type:
20290
+ * - Grant Type == `authorization_code`:
20208
20291
  * &nbsp;&nbsp;&nbsp; It generates the user token by given the authorization
20209
20292
  * code which generated in "/iam/v3/authenticate" API response. It should also pass
20210
20293
  * in the redirect_uri, which should be the same as generating the
20211
20294
  * authorization code request.
20212
- * </li>
20213
- * <li>Grant Type == <code>password</code>:<br />
20295
+ *
20296
+ * - Grant Type == `password`:
20214
20297
  * &nbsp;&nbsp;&nbsp; The grant type to use for authenticating a user, whether it's by email / username and password combination
20215
20298
  * or through platform.
20216
- * </li>
20217
- * <li>Grant Type == <code>refresh_token</code>:<br />
20299
+ *
20300
+ * - Grant Type == `refresh_token`:
20218
20301
  * &nbsp;&nbsp;&nbsp; Used to get a new access token for a valid refresh token.
20219
- * </li>
20220
- * <li>Grant Type == <code>client_credentials</code>:<br />
20302
+ *
20303
+ * - Grant Type == `client_credentials`:
20221
20304
  * &nbsp;&nbsp;&nbsp; It generates a token by checking the client credentials provided through Authorization header.
20222
- * </li></ol>
20223
- * <h2>Access Token Content</h2>
20224
- * <p>Following is the access token’s content:</p>
20225
- * <ul>
20226
- * <li>
20227
- * <p><strong>namespace</strong>. It is the namespace the token was generated from.</p>
20228
- * </li>
20229
- * <li>
20230
- * <p><strong>display_name</strong>. The display name of the sub. It is empty if the token is generated from the client credential</p>
20231
- * </li>
20232
- * <li>
20233
- * <p><strong>roles</strong>. The sub’s roles. It is empty if the token is generated from the client credential</p>
20234
- * </li>
20235
- * <li>
20236
- * <p><strong>namespace_roles</strong>. The sub’s roles scoped to namespace. Improvement from roles, which make the role scoped to specific namespace instead of global to publisher namespace</p>
20237
- * </li>
20238
- * <li>
20239
- * <p><strong>permissions</strong>. The sub or aud’ permissions</p>
20240
- * </li>
20241
- * <li>
20242
- * <p><strong>bans</strong>. The sub’s list of bans. It is used by the IAM client for validating the token.</p>
20243
- * </li>
20244
- * <li>
20245
- * <p><strong>jflgs</strong>. 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:</p>
20246
- * <ul>
20247
- * <li><p>1: Email Address Verified</p></li>
20248
- * <li><p>2: Phone Number Verified</p></li>
20249
- * <li><p>4: Anonymous</p></li>
20250
- * <li><p>8: Suspicious Login</p></li>
20251
- * </ul>
20252
- * </li>
20253
- * <li>
20254
- * <p><strong>aud</strong>. The aud is the targeted resource server.</p>
20255
- * </li>
20256
- * <li>
20257
- * <p><strong>iat</strong>. The time the token issues at. It is in Epoch time format</p>
20258
- * </li>
20259
- * <li>
20260
- * <p><strong>exp</strong>. The time the token expires. It is in Epoch time format</p>
20261
- * </li>
20262
- * <li>
20263
- * <p><strong>client_id</strong>. The UserID. The sub is omitted if the token is generated from client credential</p>
20264
- * </li>
20265
- * <li>
20266
- * <p><strong>scope</strong>. The scope of the access request, expressed as a list of space-delimited, case-sensitive strings</p>
20267
- * </li>
20268
- * </ul>
20269
- * <h2>Bans</h2>
20270
- * <p>The JWT contains user's active bans with its expiry date. List of ban types can be obtained from /bans.</p>
20271
- * <h2>Device Cookie Validation</h2>
20272
- * <p><i><b>For grant type "password" only</b></i></p>
20273
- * <p>Device Cookie is used to protect the user account from brute force login attack, <a target="_blank" href="https://owasp.org/www-community/Slow_Down_Online_Guessing_Attacks_with_Device_Cookies">more detail from OWASP<a>.</p>
20274
- * <p>This method will read device cookie from request header <b>Auth-Trust-Id</b>. If device cookie not found, it will generate a new one and set it into response body <b>auth_trust_id</b> when successfully login.</p>
20275
- * <h2>Track Login History</h2>
20276
- * <p>This method will track login history to detect suspicious login activity, please provide <b>Device-Id</b> (alphanumeric) in request header parameter otherwise it will set to "unknown".</p>
20277
- * <p>Align with General Data Protection Regulation in Europe, user login history will be kept within 28 days by default"</p>
20278
- * <h2>2FA remember device</h2>
20279
- * <p>To remember device for 2FA, should provide cookie: device_token or header: Device-Token</p>
20280
- * <p>action code: 10703
20305
+ * ##Access Token Content
20306
+ * Following is the access token’s content:
20307
+ *
20308
+ * -
20309
+ * __namespace__. It is the namespace the token was generated from.
20310
+ *
20311
+ * -
20312
+ * __display_name__. The display name of the sub. It is empty if the token is generated from the client credential
20313
+ *
20314
+ * -
20315
+ * __roles__. The sub’s roles. It is empty if the token is generated from the client credential
20316
+ *
20317
+ * -
20318
+ * __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
20319
+ *
20320
+ * -
20321
+ * __permissions__. The sub or aud’ permissions
20322
+ *
20323
+ * -
20324
+ * __bans__. The sub’s list of bans. It is used by the IAM client for validating the token.
20325
+ *
20326
+ * -
20327
+ * __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:
20328
+ *
20329
+ * - 1: Email Address Verified
20330
+ * - 2: Phone Number Verified
20331
+ * - 4: Anonymous
20332
+ * - 8: Suspicious Login
20333
+ *
20334
+ *
20335
+ * -
20336
+ * __aud__. The aud is the targeted resource server.
20337
+ *
20338
+ * -
20339
+ * __iat__. The time the token issues at. It is in Epoch time format
20340
+ *
20341
+ * -
20342
+ * __exp__. The time the token expires. It is in Epoch time format
20343
+ *
20344
+ * -
20345
+ * __client_id__. The UserID. The sub is omitted if the token is generated from client credential
20346
+ *
20347
+ * -
20348
+ * __scope__. The scope of the access request, expressed as a list of space-delimited, case-sensitive strings
20349
+ *
20350
+ *
20351
+ * ##Bans
20352
+ * The JWT contains user's active bans with its expiry date. List of ban types can be obtained from /bans.
20353
+ * ##Device Cookie Validation
20354
+ * __For grant type "password" only__
20355
+ * Device Cookie is used to protect the user account from brute force login attack,
20356
+ * [more detail from OWASP](https://owasp.org/www-community/Slow_Down_Online_Guessing_Attacks_with_Device_Cookies)
20357
+ * 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.
20358
+ * ##Track Login History
20359
+ * 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".
20360
+ * Align with General Data Protection Regulation in Europe, user login history will be kept within 28 days by default"
20361
+ * ##2FA remember device
20362
+ * To remember device for 2FA, should provide cookie: device_token or header: Device-Token
20363
+ * action code: 10703
20281
20364
  */
20282
20365
  this.loginWithAuthorizationCode = async ({ code, codeVerifier }) => {
20283
20366
  const deviceId = SdkDevice.getDeviceId();
@@ -20294,7 +20377,7 @@ class UserAuthorization {
20294
20377
  const axios = Network.create(config);
20295
20378
  const data = {
20296
20379
  grant_type: 'authorization_code',
20297
- code: code,
20380
+ code,
20298
20381
  code_verifier: codeVerifier,
20299
20382
  client_id: this.options.clientId,
20300
20383
  redirect_uri: this.options.redirectURI
@@ -20309,25 +20392,58 @@ class UserAuthorization {
20309
20392
  CodeChallenge.clear();
20310
20393
  return { ...result, mfaData };
20311
20394
  };
20395
+ /**
20396
+ * @internal
20397
+ */
20312
20398
  this.getMfaDataFromError = (errorResponse) => {
20313
20399
  const doesMFADataExist = Validate.safeParse(errorResponse.data, MFADataResponse);
20314
20400
  if (!doesMFADataExist)
20315
20401
  return;
20316
- // eslint-disable-next-line camelcase
20317
- const { mfa_token, factors, default_factor, email } = errorResponse.data;
20318
- const result = { mfaToken: mfa_token, factors, defaultFactor: default_factor, email };
20402
+ const { mfa_token: mfaToken, factors, default_factor: defaultFactor, email } = errorResponse.data;
20403
+ const result = { mfaToken, factors, defaultFactor, email };
20319
20404
  if (BrowserHelper.isOnBrowser()) {
20320
20405
  localStorage.setItem(MFA_DATA_STORAGE_KEY, JSON.stringify(result));
20321
20406
  }
20322
20407
  return result;
20323
20408
  };
20409
+ /**
20410
+ * @internal
20411
+ */
20324
20412
  this.getMfaDataFromStorage = () => {
20325
20413
  const storedMFAData = BrowserHelper.isOnBrowser() && localStorage.getItem(MFA_DATA_STORAGE_KEY);
20326
20414
  return storedMFAData ? JSON.parse(storedMFAData) : null;
20327
20415
  };
20416
+ /**
20417
+ * @internal
20418
+ */
20328
20419
  this.removeMfaDataFromStorage = () => {
20329
20420
  localStorage.removeItem(MFA_DATA_STORAGE_KEY);
20330
20421
  };
20422
+ /**
20423
+ * @internal
20424
+ */
20425
+ this.matchReceivedState = (maybeSentState) => {
20426
+ const sentStateResult = CodeChallenge.parseSentState(maybeSentState);
20427
+ if (sentStateResult.error)
20428
+ return { error: sentStateResult.error, result: null };
20429
+ const storedStateResult = CodeChallenge.load();
20430
+ if (storedStateResult.error)
20431
+ return { error: storedStateResult.error, result: null };
20432
+ const sentState = sentStateResult.sentState;
20433
+ const storedState = storedStateResult.storedState;
20434
+ if (sentState.csrf !== storedState.csrf)
20435
+ return { error: null, result: null };
20436
+ return {
20437
+ error: null,
20438
+ result: {
20439
+ payload: sentState.payload,
20440
+ codeVerifier: storedState.codeVerifier
20441
+ }
20442
+ };
20443
+ };
20444
+ /**
20445
+ * @internal
20446
+ */
20331
20447
  this.deduceLoginError = (error) => {
20332
20448
  switch (error) {
20333
20449
  case LoginErrorParam.Enum.login_session_expired:
@@ -20369,6 +20485,11 @@ class UserAuthorization {
20369
20485
  returnPath
20370
20486
  };
20371
20487
  };
20488
+ /**
20489
+ * GET [/iam/v3/oauth/authorize](api)
20490
+ *
20491
+ * Creates a URL to be used for Login, Register, Link to existing account or Twitch Link
20492
+ */
20372
20493
  this.createLoginURL = (returnPath, targetAuthPage, oneTimeLinkCode) => {
20373
20494
  const { verifier, challenge } = CodeChallenge.generateChallenge();
20374
20495
  const csrf = CodeChallenge.generateCsrf();
@@ -20392,6 +20513,11 @@ class UserAuthorization {
20392
20513
  const url = new URL(UrlHelper.combineURLPaths(this.options.baseURL, `${AUTHORIZE_URL}?${searchParams.toString()}`));
20393
20514
  return url.toString();
20394
20515
  };
20516
+ /**
20517
+ * GET [/iam/v3/oauth/authorize](api)
20518
+ *
20519
+ * Creates a URL to be used for password recovery
20520
+ */
20395
20521
  this.createForgotPasswordURL = () => {
20396
20522
  const { verifier, challenge } = CodeChallenge.generateChallenge();
20397
20523
  const csrf = CodeChallenge.generateCsrf();
@@ -20410,9 +20536,15 @@ class UserAuthorization {
20410
20536
  const url = new URL(UrlHelper.combineURLPaths(this.options.baseURL, `${AUTHORIZE_URL}?${searchParams.toString()}`));
20411
20537
  return url.toString();
20412
20538
  };
20539
+ /**
20540
+ * @internal
20541
+ */
20413
20542
  this.getCodeChallenge = () => {
20414
20543
  return CodeChallenge.generateChallenge();
20415
20544
  };
20545
+ /**
20546
+ * @internal
20547
+ */
20416
20548
  this.refreshToken = () => {
20417
20549
  const { clientId, refreshToken } = this.options;
20418
20550
  if (DesktopChecker.isDesktopApp()) {
@@ -20420,6 +20552,9 @@ class UserAuthorization {
20420
20552
  }
20421
20553
  return refreshWithLock({ axiosConfig: this.conf, clientId });
20422
20554
  };
20555
+ /**
20556
+ * @internal
20557
+ */
20423
20558
  this.getSearchParams = (sentState, challenge) => {
20424
20559
  const searchParams = new URLSearchParams();
20425
20560
  searchParams.append('response_type', 'code');
@@ -20431,25 +20566,6 @@ class UserAuthorization {
20431
20566
  return searchParams;
20432
20567
  };
20433
20568
  }
20434
- matchReceivedState(maybeSentState) {
20435
- const sentStateResult = CodeChallenge.parseSentState(maybeSentState);
20436
- if (sentStateResult.error)
20437
- return { error: sentStateResult.error, result: null };
20438
- const storedStateResult = CodeChallenge.load();
20439
- if (storedStateResult.error)
20440
- return { error: storedStateResult.error, result: null };
20441
- const sentState = sentStateResult.sentState;
20442
- const storedState = storedStateResult.storedState;
20443
- if (sentState.csrf !== storedState.csrf)
20444
- return { error: null, result: null };
20445
- return {
20446
- error: null,
20447
- result: {
20448
- payload: sentState.payload,
20449
- codeVerifier: storedState.codeVerifier
20450
- }
20451
- };
20452
- }
20453
20569
  }
20454
20570
  function isAxiosError(error) {
20455
20571
  return !!error && !!error.config;
@@ -20858,12 +20974,18 @@ class OAuthApi {
20858
20974
  this.cache = cache;
20859
20975
  this.options = options;
20860
20976
  /**
20861
- * <p>This method is used to remove <b>access_token</b>, <b>refresh_token</b> from cookie and revoke token from usage.</p>
20862
- * <p>Supported methods:</p>
20863
- * <ul>
20864
- * <li>VerifyToken to verify token from header</li>
20865
- * <li>AddTokenToRevocationList to revoke token with TTL</li>
20866
- * </ul>
20977
+ * @internal
20978
+ */
20979
+ this.newOAuth20Extension = () => {
20980
+ return new OAuth20Extension$(Network.create(this.conf), this.namespace, this.cache);
20981
+ };
20982
+ /**
20983
+ * POST [/iam/v3/logout](api)
20984
+ *
20985
+ * This method is used to remove __access_token__, __refresh_token__ from cookie and revoke token from usage.
20986
+ * Supported methods:
20987
+ * - VerifyToken to verify token from header
20988
+ * - AddTokenToRevocationList to revoke token with TTL
20867
20989
  */
20868
20990
  this.logout = () => {
20869
20991
  const axios = Network.create({
@@ -20875,8 +20997,10 @@ class OAuthApi {
20875
20997
  return new OAuth20Extension$(axios, this.namespace, this.cache).postIamV3Logout();
20876
20998
  };
20877
20999
  /**
20878
- * <p>This method revokes a token.</p>
20879
- * <p>This method requires authorized requests header with Basic Authentication from client that establish the token.</p><br>action code: 10706
21000
+ * POST [/iam/v3/oauth/revoke](api)
21001
+ *
21002
+ * This method revokes a token.
21003
+ * This method requires authorized requests header with Basic Authentication from client that establish the token.action code: 10706
20880
21004
  */
20881
21005
  this.revoke = ({ token }) => {
20882
21006
  const axios = Network.create({
@@ -20890,10 +21014,12 @@ class OAuthApi {
20890
21014
  return new OAuth20$(axios, this.namespace, this.cache).postIamV3OauthRevoke({ token });
20891
21015
  };
20892
21016
  /**
20893
- * Verify 2FA code<br/>
20894
- * <p>This method is used for verifying 2FA code.</p>
20895
- * <h2>2FA remember device</h2>
20896
- * <p>To remember device for 2FA, should provide cookie: device_token or header: Device-Token</p>
21017
+ * POST [/iam/v3/oauth/mfa/verify](api)
21018
+ *
21019
+ * Verify 2FA code
21020
+ * This method is used for verifying 2FA code.
21021
+ * ##2FA remember device
21022
+ * To remember device for 2FA, should provide cookie: device_token or header: Device-Token
20897
21023
  *
20898
21024
  */
20899
21025
  this.verify2FA = async ({ factor, code, mfaToken = null, rememberDevice }) => {
@@ -20905,6 +21031,9 @@ class OAuthApi {
20905
21031
  localStorage.removeItem(MFA_DATA_STORAGE_KEY);
20906
21032
  return result.response;
20907
21033
  };
21034
+ /**
21035
+ * POST [/iam/v3/oauth/mfa/code](api)
21036
+ */
20908
21037
  this.request2FAEmailCode = async ({ mfaToken = null, factor }) => {
20909
21038
  const result = await this.newInstance().postIamV3OauthMfaCode({ mfaToken, clientId: this.options.clientId, factor });
20910
21039
  if (result.error)
@@ -20912,70 +21041,72 @@ class OAuthApi {
20912
21041
  return result.response;
20913
21042
  };
20914
21043
  /**
20915
- * <p>This method get country location based on the request.</p>
21044
+ * GET [/iam/v3/location/country](api)
21045
+ *
21046
+ * This method get country location based on the request.
20916
21047
  */
20917
21048
  this.getCurrentLocationCountry = () => {
20918
21049
  return this.newOAuth20Extension().fetchIamV3LocationCountry();
20919
21050
  };
20920
21051
  /**
20921
- * Retrieve User Third Party Platform Token<br/>
20922
- * <p>
21052
+ * GET [/iam/v3/oauth/namespaces/{namespace}/users/{userId}/platforms/{platformId}/platformToken](api)
21053
+ *
21054
+ * Retrieve User Third Party Platform Token
21055
+ *
20923
21056
  * This method used for retrieving third party platform token for user that login using third party,
20924
21057
  * if user have not link requested platform in game namespace, will try to retrieving third party platform token from publisher namespace.
20925
21058
  * Passing platform group name or it's member will return same access token that can be used across the platform members.
20926
- * </p>
20927
- * <p>The third party platform and platform group covered for this is:</p>
20928
- * <ul>
20929
- * <li>(psn) ps4web</li>
20930
- * <li>(psn) ps4</li>
20931
- * <li>(psn) ps5</li>
20932
- * <li>epicgames</li>
20933
- * <li>twitch</li>
20934
- * <li>awscognito</li>
20935
- * </ul>
21059
+ *
21060
+ * The third party platform and platform group covered for this is:
21061
+ * - (psn) ps4web
21062
+ * - (psn) ps4
21063
+ * - (psn) ps5
21064
+ * - epicgames
21065
+ * - twitch
21066
+ * - awscognito
21067
+ *
20936
21068
  */
20937
21069
  this.getThirdPartyPlatformToken = (userId, platformId) => {
20938
21070
  return this.newInstance().fetchV3OauthUsersByUseridPlatformsByPlatformidPlatformToken(userId, platformId);
20939
21071
  };
20940
21072
  /**
21073
+ * POST [/iam/v3/authenticateWithLink](api)
21074
+ *
20941
21075
  * This method is being used to authenticate a user account and perform platform link.
20942
21076
  * It validates user's email / username and password.
20943
- * If user already enable 2FA, then invoke <i>/mfa/verify</i> using <b>mfa_token</b> from this method response.
21077
+ * If user already enable 2FA, then invoke _/mfa/verify_ using __mfa_token__ from this method response.
20944
21078
  *
20945
- * <h2>Device Cookie Validation</h2>
21079
+ * ##Device Cookie Validation
20946
21080
  *
20947
- * Device Cookie is used to protect the user account from brute force login attack, <a target="_blank" href="https://owasp.org/www-community/Slow_Down_Online_Guessing_Attacks_with_Device_Cookies">more detail from OWASP<a>.
20948
- * This method will read device cookie from cookie <b>auth-trust-id</b>. If device cookie not found, it will generate a new one and set it into cookie when successfully authenticate.
21081
+ * Device Cookie is used to protect the user account from brute force login attack,
21082
+ * [more detail from OWASP](https://owasp.org/www-community/Slow_Down_Online_Guessing_Attacks_with_Device_Cookies).
21083
+ * 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.
20949
21084
  *
20950
21085
  */
20951
21086
  this.authenticateWithLink = (data) => {
20952
21087
  return this.newOAuth20Extension().postIamV3AuthenticateWithLink(data);
20953
21088
  };
20954
- }
20955
- /**
20956
- * @internal
20957
- */
20958
- newOAuth20Extension() {
20959
- return new OAuth20Extension$(Network.create(this.conf), this.namespace, this.cache);
20960
- }
20961
- /**
20962
- * This method is being used to validate one time link code.
20963
- * It require a valid user token.
20964
- * Should specify the target platform id and current user should already linked to this platform.
20965
- * Current user should be a headless account.
20966
- *
20967
- */
20968
- validateOneTimeLinkCode(data) {
20969
- return this.newOAuth20Extension().postIamV3LinkCodeValidate(data);
20970
- }
20971
- /**
20972
- * This method is being used to generate user's token by one time link code.
20973
- * It require publisher ClientID
20974
- * It required a code which can be generated from <strong>/iam/v3/link/code/request</strong>.<br>
20975
- *
20976
- */
20977
- exchangeTokenByOneTimeLinkCode(data) {
20978
- return this.newOAuth20Extension().postIamV3LinkTokenExchange(data);
21089
+ /**
21090
+ * POST [/iam/v3/link/code/validate](api)
21091
+ *
21092
+ * This method is being used to validate one time link code.
21093
+ * It require a valid user token.
21094
+ * Should specify the target platform id and current user should already linked to this platform.
21095
+ * Current user should be a headless account.
21096
+ */
21097
+ this.validateOneTimeLinkCode = (data) => {
21098
+ return this.newOAuth20Extension().postIamV3LinkCodeValidate(data);
21099
+ };
21100
+ /**
21101
+ * POST [/iam/v3/link/token/exchange](api)
21102
+ *
21103
+ * This method is being used to generate user's token by one time link code.
21104
+ * It require publisher ClientID
21105
+ * It required a code which can be generated from __/iam/v3/link/code/request__.
21106
+ */
21107
+ this.exchangeTokenByOneTimeLinkCode = (data) => {
21108
+ return this.newOAuth20Extension().postIamV3LinkTokenExchange(data);
21109
+ };
20979
21110
  }
20980
21111
  newInstance() {
20981
21112
  return new OAuth20$(Network.create(this.conf), this.namespace, this.cache);
@@ -21054,6 +21185,8 @@ class ThirdPartyCredentialApi {
21054
21185
  this.namespace = namespace;
21055
21186
  this.cache = cache;
21056
21187
  /**
21188
+ * GET [/iam/v3/public/namespaces/{namespace}/platforms/clients/active](api)
21189
+ *
21057
21190
  * This is the Public API to Get All Active 3rd Platform Credential.
21058
21191
  */
21059
21192
  this.getThirdPartyPlatformInfo = () => {
@@ -21555,85 +21688,112 @@ class TwoFA {
21555
21688
  this.namespace = namespace;
21556
21689
  this.cache = cache;
21557
21690
  /**
21558
- * <p>This method is used to get 8-digits backup codes.
21559
- * Each code is a one-time code and will be deleted once used.</p>
21560
- * <p>This method Requires valid user access token</p>
21691
+ * GET [/iam/v4/public/namespaces/{namespace}/users/me/mfa/backupCode](api)
21692
+ *
21693
+ * This method is used to get 8-digits backup codes.
21694
+ * Each code is a one-time code and will be deleted once used.
21561
21695
  *
21696
+ * _Requires a valid user access token_
21562
21697
  */
21563
21698
  this.getBackupCode = () => {
21564
21699
  return this.newInstance().fetchV4NsUsersMeMfaBackupCode();
21565
21700
  };
21566
21701
  /**
21567
- * <p>This method is used to enable 2FA backup codes.</p>
21568
- * <p>This method Requires valid user access token</p>
21702
+ * POST [/iam/v4/public/namespaces/{namespace}/users/me/mfa/backupCode/enable](api)
21703
+ *
21704
+ * This method is used to enable 2FA backup codes.
21569
21705
  *
21706
+ * _Requires a valid user access token_
21570
21707
  */
21571
21708
  this.enable2FABackupCodes = () => {
21572
21709
  return this.newInstance().postV4NsUsersMeMfaBackupCodeEnable();
21573
21710
  };
21574
21711
  /**
21575
- * <p>This method is used to enable 2FA backup codes.</p>
21576
- * <p>This method Requires valid user access token</p>
21712
+ * POST [/iam/v4/public/namespaces/{namespace}/users/me/mfa/backupCode](api)
21577
21713
  *
21714
+ * This method is used to enable 2FA backup codes.
21715
+ *
21716
+ * _Requires a valid user access token_
21578
21717
  */
21579
21718
  this.generateBackupCodes = () => {
21580
21719
  return this.newInstance().postV4NsUsersMeMfaBackupCode();
21581
21720
  };
21582
21721
  /**
21583
- * <p>This method is used to enable 2FA backup codes.</p>
21584
- * <p>This method Requires valid user access token</p>
21722
+ * DELETE [/iam/v4/public/namespaces/{namespace}/users/me/mfa/backupCode/disable](api)
21723
+ *
21724
+ * This method is used to enable 2FA backup codes.
21585
21725
  *
21726
+ * _Requires a valid user access token_
21586
21727
  */
21587
21728
  this.disableBackupCodes = () => {
21588
21729
  return this.newInstance().deleteV4NsUsersMeMfaBackupCodeDisable();
21589
21730
  };
21590
21731
  /**
21591
- * <p>This method is used to disable 2FA authenticator.</p>
21592
- * <p>This method Requires valid user access token</p>
21732
+ * DELETE [/iam/v4/public/namespaces/{namespace}/users/me/mfa/authenticator/disable](api)
21733
+ * }
21734
+ * This method is used to disable 2FA authenticator.
21593
21735
  *
21736
+ * _Requires a valid user access token_
21594
21737
  */
21595
21738
  this.disableAuthenticator = () => {
21596
21739
  return this.newInstance().deleteV4NsUsersMeMfaAuthenticatorDisable();
21597
21740
  };
21598
21741
  /**
21599
- * <p>This method is used to get user enabled factors.</p>
21600
- * <p>This method Requires valid user access token</p>
21742
+ * GET [/iam/v4/public/namespaces/{namespace}/users/me/mfa/factor](api)
21601
21743
  *
21744
+ * This method is used to get user enabled factors.
21745
+ *
21746
+ * _Requires a valid user access token_
21602
21747
  */
21603
21748
  this.getEnabledMethods = () => {
21604
21749
  return this.newInstance().fetchV4NsUsersMeMfaFactor();
21605
21750
  };
21606
21751
  /**
21607
- * <p>This method is used to make 2FA factor default.</p>
21608
- * <p>This method Requires valid user access token</p>
21752
+ * POST [/iam/v4/public/namespaces/{namespace}/users/me/mfa/factor](api)
21753
+ *
21754
+ * This method is used to make 2FA factor default.
21609
21755
  *
21756
+ * _Requires a valid user access token_
21610
21757
  */
21611
21758
  this.set2FAAsDefault = (factor) => {
21612
21759
  return this.newInstance().postV4NsUsersMeMfaFactor({ factor });
21613
21760
  };
21614
21761
  /**
21615
- * <p>This method is used to enable 2FA authenticator.</p>
21616
- * <p>This method Requires valid user access token</p>
21762
+ * POST [/iam/v4/public/namespaces/{namespace}/users/me/mfa/authenticator/enable](api)
21617
21763
  *
21764
+ * This method is used to enable 2FA authenticator.
21765
+ *
21766
+ * _Requires a valid user access token_
21618
21767
  */
21619
21768
  this.enable2FAAuthenticator = (code) => {
21620
21769
  return this.newInstance().postV4NsUsersMeMfaAuthenticatorEnable({ code });
21621
21770
  };
21622
21771
  /**
21623
- * <p>This method is used to generate a secret key for 3rd-party authenticator app.
21624
- * A QR code URI is also returned so that frontend can generate QR code image.</p>
21625
- * <p>This method Requires valid user access token</p>
21772
+ * POST [/iam/v4/public/namespaces/{namespace}/users/me/mfa/authenticator/key](api)
21773
+ *
21774
+ * This method is used to generate a secret key for 3rd-party authenticator app.
21775
+ * A QR code URI is also returned so that frontend can generate QR code image.
21626
21776
  *
21777
+ * _Requires a valid user access token_
21627
21778
  */
21628
21779
  this.generateSecretKey = () => {
21629
21780
  return this.newInstance().postV4NsUsersMeMfaAuthenticatorKey();
21630
21781
  };
21782
+ /**
21783
+ * POST [/iam/v4/public/namespaces/{namespace}/users/me/mfa/email/code](api)
21784
+ */
21631
21785
  this.requestEmailCode = () => {
21632
21786
  return this.newInstance().postV4NsUsersMeMfaEmailCode();
21633
21787
  };
21788
+ /**
21789
+ * POST [/iam/v4/public/namespaces/{namespace}/users/me/mfa/email/enable](api)
21790
+ */
21634
21791
  this.enableEmailMethod = (code) => {
21635
21792
  return this.newInstance().postV4NsUsersMeMfaEmailEnable({ code });
21636
21793
  };
21794
+ /**
21795
+ * POST [/iam/v4/public/namespaces/{namespace}/users/me/mfa/email/disable](api)
21796
+ */
21637
21797
  this.disableEmailMethod = () => {
21638
21798
  return this.newInstance().postV4NsUsersMeMfaEmailDisable();
21639
21799
  };
@@ -22847,295 +23007,326 @@ class UserApi {
22847
23007
  this.namespace = namespace;
22848
23008
  this.cache = cache;
22849
23009
  /**
22850
- * get currently logged in user
23010
+ * GET [/iam/v3/public/users/me](api)
23011
+ *
23012
+ * get currently logged-in user
22851
23013
  */
22852
23014
  this.getCurrentUser = () => {
22853
23015
  return this.newInstance().fetchIamV3PublicUsersMe();
22854
23016
  };
22855
23017
  /**
22856
- * update current user
23018
+ * PATCH [/iam/v3/public/namespaces/{namespace}/users/me](api)
23019
+ *
23020
+ * Update current user
22857
23021
  */
22858
23022
  this.updateUserMe = (data) => {
22859
23023
  return this.newInstance().patchV3NsUsersMe(data);
22860
23024
  };
22861
23025
  /**
23026
+ * PUT [/iam/v4/public/namespaces/{namespace}/users/me/email](api)
23027
+ *
22862
23028
  * update current user's email
22863
23029
  */
22864
23030
  this.updateEmailMe = (data) => {
22865
23031
  return this.newInstance4().putV4NsUsersMeEmail(data);
22866
23032
  };
22867
23033
  /**
23034
+ * PUT [/iam/v3/public/namespaces/{namespace}/users/me/password](api)
23035
+ *
22868
23036
  * update current user's password
22869
23037
  */
22870
23038
  this.updatePasswordMe = (data) => {
22871
23039
  return this.newInstance().putV3NsUsersMePassword(data);
22872
23040
  };
22873
23041
  /**
23042
+ * POST [/iam/v3/public/namespaces/{namespace}/users/me/code/request](api)
23043
+ *
22874
23044
  * Required valid user authorization
22875
- * <p>The verification code is sent to email address</p>
22876
- * <p>Available contexts for use : </p>
22877
- * <ol>
22878
- * <li>
22879
- * <strong>UserAccountRegistration</strong>
22880
- * <p>a context type used for verifying email address in user account registration. It returns 409 if the email address already verified.
22881
- * <strong><em>It is the default context if the Context field is empty</em></strong></p>
22882
- * </li>
22883
- * <li>
22884
- * <strong>UpdateEmailAddress</strong>
22885
- * <p>a context type used for verify user before updating email address.(Without email address verified checking)</p>
22886
- * </li>
22887
- * <li><strong>upgradeHeadlessAccount</strong>
22888
- * <p>The context is intended to be used whenever the email address wanted to be automatically verified on upgrading a headless account.
22889
- * If this context used, IAM rejects the request if the email address is already used by others by returning HTTP Status Code 409.</p>
22890
- * </li>
22891
- * </ol>
22892
- * <p>action code: 10116</p>
23045
+ * The verification code is sent to email address
23046
+ * Available contexts for use :
23047
+ * -
23048
+ * __UserAccountRegistration__
23049
+ * a context type used for verifying email address in user account registration. It returns 409 if the email address already verified.
23050
+ * __It is the default context if the Context field is empty__
23051
+ *
23052
+ * -
23053
+ * __UpdateEmailAddress__
23054
+ * a context type used for verify user before updating email address.(Without email address verified checking)
23055
+ *
23056
+ * - __upgradeHeadlessAccount__
23057
+ * The context is intended to be used whenever the email address wanted to be automatically verified on upgrading a headless account.
23058
+ * If this context used, IAM rejects the request if the email address is already used by others by returning HTTP Status Code 409.
23059
+ * action code: 10116
22893
23060
  *
22894
23061
  */
22895
23062
  this.requestVerificationCode = (data) => {
22896
23063
  return this.newInstance().postV3NsUsersMeCodeRequest(data);
22897
23064
  };
22898
23065
  /**
22899
- * <p>Will consume code if validateOnly is set false</p>
22900
- * <p>Required valid user authorization</p>
22901
- * <p>Redeems a verification code sent to a user to verify the user's contact address is correct</p>
22902
- * <p>Available ContactType : <b>email</b></p>
22903
- * <p>action code: 10107</p>
23066
+ * POST [/iam/v3/public/namespaces/{namespace}/users/me/code/verify](api)
23067
+ *
23068
+ * Will consume code if validateOnly is set false
23069
+ * Required valid user authorization
23070
+ * Redeems a verification code sent to a user to verify the user's contact address is correct
23071
+ * Available ContactType : __email__
23072
+ * action code: 10107
22904
23073
  *
22905
23074
  */
22906
23075
  this.verifyCode = (data) => {
22907
23076
  return this.newInstance().postV3NsUsersMeCodeVerify(data);
22908
23077
  };
22909
23078
  /**
22910
- * <p>If validateOnly is set false, consume code and upgrade headless account and automatically verified the email address if it is succeeded</p>
23079
+ * POST [/iam/v3/public/namespaces/{namespace}/users/me/headless/code/verify](api)
23080
+ *
23081
+ * If validateOnly is set false, consume code and upgrade headless account and automatically verified the email address if it is succeeded
22911
23082
  * Require valid user access token.
22912
- * <p>The method upgrades a headless account by linking the headless account with the email address and the password.
22913
- * By upgrading the headless account into a full account, the user could use the email address and password for using Justice IAM. </p>
22914
- * <p>The method is a shortcut for upgrading a headless account and verifying the email address in one call.
22915
- * In order to get a verification code for the method, please check the send verification code method.</p>
22916
- * <p>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.<br/>
23083
+ * The method upgrades a headless account by linking the headless account with the email address and the password.
23084
+ * By upgrading the headless account into a full account, the user could use the email address and password for using Justice IAM.
23085
+ * The method is a shortcut for upgrading a headless account and verifying the email address in one call.
23086
+ * In order to get a verification code for the method, please check the send verification code method.
23087
+ * 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.
22917
23088
  * Supported user data fields :
22918
- * <ul>
22919
- * <li>displayName</li>
22920
- * <li>dateOfBirth : format YYYY-MM-DD, e.g. 2019-04-29</li>
22921
- * <li>country : format ISO3166-1 alpha-2 two letter, e.g. US</li>
22922
- * </ul>
22923
- * <br>action code : 10124</p>
23089
+ *
23090
+ * - displayName
23091
+ * - dateOfBirth : format YYYY-MM-DD, e.g. 2019-04-29
23092
+ * - country : format ISO3166-1 alpha-2 two letter, e.g. US
23093
+ *
23094
+ * action code : 10124
22924
23095
  */
22925
23096
  this.upgradeHeadlessAccount = (data) => {
22926
23097
  return this.newInstance().postV3NsUsersMeHeadlessCodeVerify(data);
22927
23098
  };
22928
23099
  /**
23100
+ * POST [/iam/v4/public/namespaces/{namespace}/users/me/headless/code/verify](api)
23101
+ *
22929
23102
  * Require valid user access token.
22930
23103
  * The method upgrades a headless account by linking the headless account with the email address, username, and password.
22931
23104
  * By upgrading the headless account into a full account, the user could use the email address, username, and password for using Justice IAM.
22932
- * <br>
23105
+ *
22933
23106
  * The method is a shortcut for upgrading a headless account and verifying the email address in one call.
22934
- * In order to get a verification code for the method, please check the <a href="#operations-Users-PublicSendVerificationCodeV3">send verification code method</a>.
22935
- * <br>
23107
+ *
22936
23108
  * 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.
22937
23109
  * Supported user data fields:
22938
- * <ul>
22939
- * <li>displayName</li>
22940
- * <li>dateOfBirth : format YYYY-MM-DD, e.g. 2019-04-29</li>
22941
- * <li>country : format ISO3166-1 alpha-2 two letter, e.g. US</li>
22942
- * </ul>
23110
+ *
23111
+ * - displayName
23112
+ * - dateOfBirth : format YYYY-MM-DD, e.g. 2019-04-29
23113
+ * - country : format ISO3166-1 alpha-2 two letter, e.g. US
23114
+ *
22943
23115
  * action code : 10124
22944
23116
  */
22945
23117
  this.upgradeHeadlessAccountV4 = (data) => {
22946
23118
  return this.newInstance4().postV4NsUsersMeHeadlessCodeVerify(data);
22947
23119
  };
22948
23120
  /**
22949
- * <p>This method retrieves platform accounts linked to user. Required valid user authorization.
22950
- * <br>action code: 10128 </p>
23121
+ * GET [/iam/v3/public/namespaces/{namespace}/users/{userId}/platforms](api)
23122
+ *
23123
+ * This method retrieves platform accounts linked to user. Required valid user authorization.
23124
+ * action code: 10128
22951
23125
  */
22952
23126
  this.getUserLinkedPlatform = (userId) => {
22953
23127
  return this.newInstance().fetchV3NsUsersByUseridPlatforms(userId);
22954
23128
  };
22955
23129
  /**
23130
+ * POST [/iam/v3/public/namespaces/{namespace}/users/me/platforms/{platformId}](api)
23131
+ *
22956
23132
  * Required valid user authorization.
22957
- * <p><br><b>Prerequisite:</b>
23133
+ * __Prerequisite:__
22958
23134
  * Platform client configuration need to be added to database for specific platformId. Namespace service URL need to be specified (refer to required environment variables).
22959
- * <h2>Supported platforms:</h2>
22960
- * <ul>
22961
- * <li><strong>steam</strong>: The ticket’s value is the authentication code returned by Steam.</li>
22962
- * <li><strong>steamopenid</strong>: Steam's user authentication method using OpenID 2.0. The ticket's value is URL generated by Steam on web authentication</li>
22963
- * <li><strong>facebook</strong>: The ticket’s value is the authorization code returned by Facebook OAuth</li>
22964
- * <li><strong>google</strong>: The ticket’s value is the authorization code returned by Google OAuth</li>
22965
- * <li><strong>oculus</strong>: The ticket’s value is a string composed of Oculus's user ID and the nonce separated by a colon (:).</li>
22966
- * <li><strong>twitch</strong>: The ticket’s value is the authorization code returned by Twitch OAuth.</li>
22967
- * <li><strong>android</strong>: The ticket's value is the Android’s device ID</li>
22968
- * <li><strong>ios</strong>: The ticket's value is the iOS’s device ID.</li>
22969
- * <li><strong>apple</strong>: The ticket’s value is the authorization code returned by Apple OAuth.</li>
22970
- * <li><strong>device</strong>: Every device that doesn't run Android and iOS is categorized as a device platform. The ticket's value is the device’s ID.</li>
22971
- * <li><strong>discord</strong>: The ticket’s value is the authorization code returned by Discord OAuth.</li>
22972
- * <li><strong>ps4web</strong>: The ticket’s value is the authorization code returned by PSN OAuth.</li>
22973
- * <li><strong>xblweb</strong>: The ticket’s value is the authorization code returned by XBox Live OAuth.</li>
22974
- * <li><strong>awscognito</strong>: The ticket’s value is the aws cognito access token (JWT).</li>
22975
- * <li><strong>epicgames</strong>: The ticket’s value is an access-token obtained from Epicgames EOS Account Service.</li>
22976
- * <li><strong>nintendo</strong>: The ticket’s value is the authorization code(id_token) returned by Nintendo OAuth.</li>
22977
- * <li><strong>stadia</strong>: The ticket’s value is a JWT Token, which can be obtained after calling the Stadia SDK's function.</li>
22978
- * </ul>
22979
- * <br>action code : 10144
23135
+ * ##Supported platforms:
23136
+ *
23137
+ * - __steam__: The ticket’s value is the authentication code returned by Steam.
23138
+ * - __steamopenid__: Steam's user authentication method using OpenID 2.0. The ticket's value is URL generated by Steam on web authentication
23139
+ * - __facebook__: The ticket’s value is the authorization code returned by Facebook OAuth
23140
+ * - __google__: The ticket’s value is the authorization code returned by Google OAuth
23141
+ * - __oculus__: The ticket’s value is a string composed of Oculus's user ID and the nonce separated by a colon (:).
23142
+ * - __twitch__: The ticket’s value is the authorization code returned by Twitch OAuth.
23143
+ * - __android__: The ticket's value is the Android’s device ID
23144
+ * - __ios__: The ticket's value is the iOS’s device ID.
23145
+ * - __apple__: The ticket’s value is the authorization code returned by Apple OAuth.
23146
+ * - __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.
23147
+ * - __discord__: The ticket’s value is the authorization code returned by Discord OAuth.
23148
+ * - __ps4web__: The ticket’s value is the authorization code returned by PSN OAuth.
23149
+ * - __xblweb__: The ticket’s value is the authorization code returned by XBox Live OAuth.
23150
+ * - __awscognito__: The ticket’s value is the aws cognito access token (JWT).
23151
+ * - __epicgames__: The ticket’s value is an access-token obtained from Epicgames EOS Account Service.
23152
+ * - __nintendo__: The ticket’s value is the authorization code(id_token) returned by Nintendo OAuth.
23153
+ * - __stadia__: The ticket’s value is a JWT Token, which can be obtained after calling the Stadia SDK's function.
23154
+ *
23155
+ * action code : 10144
22980
23156
  */
22981
23157
  this.linkAccountToPlatform = ({ platformId, data }) => {
22982
23158
  return this.newInstance().postV3NsUsersMePlatformsByPlatformid(platformId, data);
22983
23159
  };
22984
23160
  /**
23161
+ * GET [/iam/v3/public/namespaces/{namespace}/requests/{requestId}/async/status](api)
23162
+ *
22985
23163
  * Get the linking status between a third-party platform to a user
22986
23164
  */
22987
23165
  this.getLinkRequestStatus = (requestId) => {
22988
23166
  return this.newInstance().fetchV3NsRequestsByRequestidAsyncStatus(requestId);
22989
23167
  };
22990
23168
  /**
22991
- * It is going to be <strong>DEPRECATED</strong>.
23169
+ * @internal
23170
+ * It is going to be __DEPRECATED__.
22992
23171
  * Update Platform Account relation to current User Account.
22993
23172
  * Note: Game progression data (statistics, reward, etc) associated with previous User Account will not be
22994
23173
  * transferred. If the data is tight to game user ID, the user will have the game progression data.
22995
- *
22996
23174
  */
22997
23175
  this.linkPlatformToUserAccount = ({ userId, data }) => {
22998
23176
  return this.newInstance().postV3NsUsersByUseridPlatformsLink(userId, data);
22999
23177
  };
23000
23178
  /**
23179
+ * DELETE [/iam/v3/public/namespaces/{namespace}/users/me/platforms/{platformId}](api)
23180
+ *
23001
23181
  * Required valid user authorization.
23002
- * <h2>Supported platforms:</h2>
23003
- * <ul>
23004
- * <li><strong>steam</strong></li>
23005
- * <li><strong>steamopenid</strong></li>
23006
- * <li><strong>facebook</strong></li>
23007
- * <li><strong>google</strong></li>
23008
- * <li><strong>oculus</strong></li>
23009
- * <li><strong>twitch</strong></li>
23010
- * <li><strong>android</strong></li>
23011
- * <li><strong>ios</strong></li>
23012
- * <li><strong>apple</strong></li>
23013
- * <li><strong>device</strong></li>
23014
- * <li><strong>discord</strong></li>
23015
- * <li><strong>awscognito</strong></li>
23016
- * <li><strong>epicgames</strong></li>
23017
- * <li><strong>nintendo</strong></li>
23018
- * <li><strong>stadia</strong></li>
23019
- * </ul>
23020
- * <p>Unlink user's account from a specific platform. 'justice' platform might have multiple accounts from different namespaces linked.
23021
- * <br><i>platformNamespace</i> need to be specified when the platform ID is 'justice'.
23022
- * <br>
23023
- * <br>Unlink user's account from justice platform will enable password token grant and password update.
23024
- * <br>
23025
- * <br>If you want to unlink user's account in a game namespace, you have to specify <i>platformNamespace</i> to that game namespace.
23026
- * <br>
23027
- * <br>action code : 10121 </p>
23182
+ * ##Supported platforms:
23183
+ *
23184
+ * - __steam__
23185
+ * - __steamopenid__
23186
+ * - __facebook__
23187
+ * - __google__
23188
+ * - __oculus__
23189
+ * - __twitch__
23190
+ * - __android__
23191
+ * - __ios__
23192
+ * - __apple__
23193
+ * - __device__
23194
+ * - __discord__
23195
+ * - __awscognito__
23196
+ * - __epicgames__
23197
+ * - __nintendo__
23198
+ * - __stadia__
23199
+ *
23200
+ * Unlink user's account from a specific platform. 'justice' platform might have multiple accounts from different namespaces linked.
23201
+ * _platformNamespace_ need to be specified when the platform ID is 'justice'.
23202
+ *
23203
+ * Unlink user's account from justice platform will enable password token grant and password update.
23204
+ *
23205
+ * If you want to unlink user's account in a game namespace, you have to specify _platformNamespace_ to that game namespace.
23206
+ *
23207
+ * action code : 10121
23028
23208
  */
23029
23209
  this.unLinkAccountFromPlatform = ({ platformId, data }) => {
23030
23210
  return this.newInstance().deleteV3NsUsersMePlatformsByPlatformid(platformId, data);
23031
23211
  };
23032
23212
  /**
23213
+ * GET [/iam/v3/public/namespaces/{namespace}/users/me/platforms/{platformId}/web/link](api)
23214
+ *
23033
23215
  * This method is used to generate third party login page which will redirected to establish method.
23034
23216
  */
23035
23217
  this.getThirdPartyURL = ({ platformId, queryParams }) => {
23036
23218
  return this.newInstance().fetchV3NsUsersMePlatformsByPlatformidWebLink(platformId, queryParams);
23037
23219
  };
23038
23220
  /**
23221
+ * GET [/iam/v3/public/namespaces/{namespace}/agerestrictions/countries/{countryCode}](api)
23222
+ *
23039
23223
  * Get age restriction by country code. It will always get by publisher namespace
23040
23224
  */
23041
23225
  this.getAgeRestrictionByCountry = (countryCode) => {
23042
23226
  return this.newInstance().fetchV3NsAgerestrictionsCountriesByCountrycode(countryCode);
23043
23227
  };
23044
- }
23045
- /**
23046
- * Render 2D Avatar via readyplayer.me (https://docs.readyplayer.me/ready-player-me/avatars/2d-avatars/render-api)
23047
- */
23048
- renderImageFromGlbModel(data) {
23049
- const axios = Network.create({
23050
- ...this.conf
23051
- });
23052
- return Validate.responseType(() => axios.post('https://render.readyplayer.me/render', data), ReadyPlayerMe);
23053
- }
23054
- // TODO: evaluate the use of this method. It looks too generic for a function that should notify game SDK
23055
- notifyGameSDK(url) {
23056
- const axios = Network.create({
23057
- ...this.conf
23058
- });
23059
- return Validate.responseType(() => axios.get(url), mod.string());
23060
- }
23061
- /**
23062
- * This method will validate the request's email address.
23063
- *
23064
- * If it already been used, will response 409.
23065
- *
23066
- * If it is available, we will send a verification code to this email address.
23067
- * This code can be verified by this <a href="#operations-Users-PublicVerifyRegistrationCode">method</a>.
23068
- *
23069
- */
23070
- requestNewUserVerificationCode(data) {
23071
- return this.newInstance().postV3NsUsersCodeRequest(data);
23072
- }
23073
- /**
23074
- * Create a new user with unique email address and username.
23075
- * <p>
23076
- * <b>Required attributes:</b>
23077
- * - authType: possible value is EMAILPASSWD
23078
- * - emailAddress: Please refer to the rule from /v3/public/inputValidations API.
23079
- * - username: Please refer to the rule from /v3/public/inputValidations API.
23080
- * - password: Please refer to the rule from /v3/public/inputValidations API.
23081
- * - country: ISO3166-1 alpha-2 two letter, e.g. US.
23082
- * - dateOfBirth: YYYY-MM-DD, e.g. 1990-01-01. valid values are between 1905-01-01 until current date.
23083
- * <br/>
23084
- * <b>Not required attributes:</b>
23085
- * - displayName: Please refer to the rule from /v3/public/inputValidations API.
23086
- * </p>
23087
- * <p>This method support accepting agreements for the created user. Supply the accepted agreements in acceptedPolicies attribute.</p>
23088
- *
23089
- */
23090
- createUser(data) {
23091
- return this.newInstance4().postV4NsUsers(data);
23092
- }
23093
- /**
23094
- * <p>This method retrieves platform accounts linked to user.
23095
- * <br>It will query all linked platform accounts and result will be distinct & grouped, same platform we will pick oldest linked one.
23096
- * <br>Required valid user authorization.</p>
23097
- */
23098
- getUserDistinctLinkedPlatform(userId) {
23099
- return this.newInstance().fetchV3NsUsersByUseridDistinctPlatforms(userId);
23100
- }
23101
- /**
23102
- * Required valid user authorization.
23103
- * <p>Unlink user's account from for all third platforms. </p>
23104
- */
23105
- unLinkAccountFromPlatformDistinct(platformId) {
23106
- return this.newInstance().deleteV3NsUsersMePlatformsByPlatformidAll(platformId);
23107
- }
23108
- /**
23109
- * Required valid user authorization
23110
- * <p>The verification link is sent to email address</p>
23111
- * <p>It will not send request if user email is already verified</p>
23112
- *
23113
- */
23114
- sendVerificationLink(languageTag) {
23115
- return this.newInstance().postIamV3PublicUsersMeVerifyLinkRequest({ languageTag });
23116
- }
23117
- /**
23118
- * <p>This method retrieves platform accounts linked to user. Required valid user authorization.
23119
- * <br>action code: 10128 </p>
23120
- */
23121
- getLinkedAccount(userId) {
23122
- return this.newInstance().fetchV3NsUsersByUseridPlatforms(userId);
23123
- }
23124
- /**
23125
- * Note:<br>
23126
- * 1. My account should be full account
23127
- * 2. My account not linked to request headless account's third platform.
23128
- */
23129
- getLinkAccountByOneTimeCodeConflict(params) {
23130
- return this.newInstance().fetchIamV3PublicUsersMeHeadlessLinkConflict(params);
23131
- }
23132
- /**
23133
- * Note:<br>
23134
- * 1. My account should be full account
23135
- * 2. My account not linked to headless account's third platform.
23136
- */
23137
- linkWithProgression(data) {
23138
- return this.newInstance().postIamV3PublicUsersMeHeadlessLinkWithProgression(data);
23228
+ /**
23229
+ * Render 2D Avatar via readyplayer.me POST [](https://docs.readyplayer.me/ready-player-me/avatars/2d-avatars/render-api)
23230
+ * @internal
23231
+ */
23232
+ this.renderImageFromGlbModel = (data) => {
23233
+ const axios = Network.create({
23234
+ ...this.conf
23235
+ });
23236
+ return Validate.responseType(() => axios.post('https://render.readyplayer.me/render', data), ReadyPlayerMe);
23237
+ };
23238
+ /**
23239
+ * POST [/iam/v3/public/namespaces/{namespace}/users/code/request](api)
23240
+ *
23241
+ * This method will validate the request's email address.
23242
+ *
23243
+ * If it already been used, will response 409.
23244
+ *
23245
+ * If it is available, we will send a verification code to this email address.
23246
+ */
23247
+ this.requestNewUserVerificationCode = (data) => {
23248
+ return this.newInstance().postV3NsUsersCodeRequest(data);
23249
+ };
23250
+ /**
23251
+ * POST [/iam/v4/public/namespaces/{namespace}/users](api)
23252
+ *
23253
+ * Create a new user with unique email address and username.
23254
+ *
23255
+ * __Required attributes:__
23256
+ * - authType: possible value is EMAILPASSWD
23257
+ * - emailAddress: Please refer to the rule from /v3/public/inputValidations API.
23258
+ * - username: Please refer to the rule from /v3/public/inputValidations API.
23259
+ * - password: Please refer to the rule from /v3/public/inputValidations API.
23260
+ * - country: ISO3166-1 alpha-2 two letter, e.g. US.
23261
+ * - dateOfBirth: YYYY-MM-DD, e.g. 1990-01-01. valid values are between 1905-01-01 until current date.
23262
+ *
23263
+ * __Not required attributes:__
23264
+ * - displayName: Please refer to the rule from /v3/public/inputValidations API.
23265
+ *
23266
+ * This method support accepting agreements for the created user. Supply the accepted agreements in acceptedPolicies attribute.
23267
+ *
23268
+ */
23269
+ this.createUser = (data) => {
23270
+ return this.newInstance4().postV4NsUsers(data);
23271
+ };
23272
+ /**
23273
+ * GET [/iam/v3/public/namespaces/{namespace}/users/{userId}/distinctPlatforms](api)
23274
+ *
23275
+ * This method retrieves platform accounts linked to user.
23276
+ * It will query all linked platform accounts and result will be distinct & grouped, same platform we will pick oldest linked one.
23277
+ * Required valid user authorization.
23278
+ */
23279
+ this.getUserDistinctLinkedPlatform = (userId) => {
23280
+ return this.newInstance().fetchV3NsUsersByUseridDistinctPlatforms(userId);
23281
+ };
23282
+ /**
23283
+ * DELETE [/iam/v3/public/namespaces/{namespace}/users/me/platforms/{platformId}/all](api)
23284
+ *
23285
+ * Required valid user authorization.
23286
+ * Unlink user's account from for all third platforms.
23287
+ */
23288
+ this.unLinkAccountFromPlatformDistinct = (platformId) => {
23289
+ return this.newInstance().deleteV3NsUsersMePlatformsByPlatformidAll(platformId);
23290
+ };
23291
+ /**
23292
+ * POST [/iam/v3/public/users/me/verify_link/request](api)
23293
+ *
23294
+ * Required valid user authorization
23295
+ * The verification link is sent to email address
23296
+ * It will not send request if user email is already verified
23297
+ */
23298
+ this.sendVerificationLink = (languageTag) => {
23299
+ return this.newInstance().postIamV3PublicUsersMeVerifyLinkRequest({ languageTag });
23300
+ };
23301
+ /**
23302
+ * GET [/iam/v3/public/namespaces/{namespace}/users/{userId}/platforms](api)
23303
+ *
23304
+ * This method retrieves platform accounts linked to user. Required valid user authorization.
23305
+ * action code: 10128
23306
+ */
23307
+ this.getLinkedAccount = (userId) => {
23308
+ return this.newInstance().fetchV3NsUsersByUseridPlatforms(userId);
23309
+ };
23310
+ /**
23311
+ * GET [/iam/v3/public/users/me/headless/link/conflict](api)
23312
+ *
23313
+ * Note:
23314
+ * 1. My account should be full account
23315
+ * 2. My account not linked to request headless account's third platform.
23316
+ */
23317
+ this.getLinkAccountByOneTimeCodeConflict = (params) => {
23318
+ return this.newInstance().fetchIamV3PublicUsersMeHeadlessLinkConflict(params);
23319
+ };
23320
+ /**
23321
+ * POST [/iam/v3/public/users/me/headless/linkWithProgression](api)
23322
+ *
23323
+ * Note:
23324
+ * 1. My account should be full account
23325
+ * 2. My account not linked to headless account's third platform.
23326
+ */
23327
+ this.linkWithProgression = (data) => {
23328
+ return this.newInstance().postIamV3PublicUsersMeHeadlessLinkWithProgression(data);
23329
+ };
23139
23330
  }
23140
23331
  /**
23141
23332
  * @internal
@@ -23292,24 +23483,36 @@ class AgreementApi {
23292
23483
  this.conf = conf;
23293
23484
  this.namespace = namespace;
23294
23485
  this.cache = cache;
23295
- }
23296
- /**
23297
- * Accepts many legal policy versions all at once. Supply with localized version policy id to accept an agreement.<br>Other detail info: <ul><li><i>Required permission</i>: login user</li></ul>
23298
- */
23299
- acceptLegalPolicies(acceptAgreements) {
23300
- return this.newInstance().postPublicAgreementsPolicies(acceptAgreements);
23301
- }
23302
- /**
23303
- * Retrieve accepted Legal Agreements.<br>Other detail info: <ul><li><i>Required permission</i>: login user</li></ul>
23304
- */
23305
- getAgreements() {
23306
- return this.newInstance().fetchPublicAgreementsPolicies();
23307
- }
23308
- /**
23309
- * Change marketing preference consent.<br>Other detail info: <ul><li><i>Required permission</i>: login user</li></ul>
23310
- */
23311
- updateMarketingPreferences(acceptAgreements) {
23312
- return this.newInstance().patchPublicAgreementsLocalizedPolicyVersionsPreferences(acceptAgreements);
23486
+ /**
23487
+ * POST [/agreement/public/agreements/policies](api)
23488
+ *
23489
+ * Accepts many legal policy versions all at once. Supply with localized version policy id to accept an agreement.
23490
+ *
23491
+ * _Required permission_: login user
23492
+ */
23493
+ this.acceptLegalPolicies = (acceptAgreements) => {
23494
+ return this.newInstance().postPublicAgreementsPolicies(acceptAgreements);
23495
+ };
23496
+ /**
23497
+ * GET [/agreement/public/agreements/policies](api)
23498
+ *
23499
+ * Retrieve accepted Legal Agreements.
23500
+ *
23501
+ * _Required permission_: login user
23502
+ */
23503
+ this.getAgreements = () => {
23504
+ return this.newInstance().fetchPublicAgreementsPolicies();
23505
+ };
23506
+ /**
23507
+ * PATCH [/agreement/public/agreements/localized-policy-versions/preferences](api)
23508
+ *
23509
+ * Change marketing preference consent
23510
+ *
23511
+ * _Required permission_: login user
23512
+ */
23513
+ this.updateMarketingPreferences = (acceptAgreements) => {
23514
+ return this.newInstance().patchPublicAgreementsLocalizedPolicyVersionsPreferences(acceptAgreements);
23515
+ };
23313
23516
  }
23314
23517
  newInstance() {
23315
23518
  return new Agreement$(Network.create(this.conf), this.namespace, this.cache);
@@ -23422,12 +23625,16 @@ class EligibilitiesApi {
23422
23625
  this.conf = conf;
23423
23626
  this.namespace = namespace;
23424
23627
  this.cache = cache;
23425
- }
23426
- /**
23427
- * Retrieve the active policies and its conformance status by user.<br>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.<br/><br/>Other detail info: <ul><li><i>Required permission</i>: login user</li></ul>
23428
- */
23429
- getUserEligibilities() {
23430
- return this.newInstance().fetchPublicEligibilitiesNamespacesByNamespace();
23628
+ /**
23629
+ * GET [/agreement/public/eligibilities/namespaces/{namespace}](api)
23630
+ *
23631
+ * 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.
23632
+ *
23633
+ * _Required permission_: login user
23634
+ */
23635
+ this.getUserEligibilities = () => {
23636
+ return this.newInstance().fetchPublicEligibilitiesNamespacesByNamespace();
23637
+ };
23431
23638
  }
23432
23639
  newInstance() {
23433
23640
  return new Eligibilities$(Network.create(this.conf), this.namespace, this.cache);
@@ -23530,12 +23737,14 @@ class LocalizedPolicyVersionsApi {
23530
23737
  this.conf = conf;
23531
23738
  this.namespace = namespace;
23532
23739
  this.cache = cache;
23533
- }
23534
- /**
23535
- * Retrieve specific localized policy version including the policy version and base policy version where the localized policy version located.<br>Other detail info: <ul></ul>
23536
- */
23537
- fetchLocalizedPolicyVersionById(localizedPolicyVersionId) {
23538
- return this.newInstance().fetchPublicLocalizedPolicyVersionsByLocalizedpolicyversionid(localizedPolicyVersionId);
23740
+ /**
23741
+ * GET [/agreement/public/localized-policy-versions/{localizedPolicyVersionId}](api)
23742
+ *
23743
+ * Retrieve specific localized policy version including the policy version and base policy version where the localized policy version located.
23744
+ */
23745
+ this.fetchLocalizedPolicyVersionById = (localizedPolicyVersionId) => {
23746
+ return this.newInstance().fetchPublicLocalizedPolicyVersionsByLocalizedpolicyversionid(localizedPolicyVersionId);
23747
+ };
23539
23748
  }
23540
23749
  newInstance() {
23541
23750
  return new LocalizedPolicyVersions$(Network.create(this.conf), this.namespace, this.cache);
@@ -23641,18 +23850,37 @@ class PoliciesApi {
23641
23850
  this.conf = conf;
23642
23851
  this.namespace = namespace;
23643
23852
  this.cache = cache;
23644
- }
23645
- /**
23646
- * Retrieve all active latest policies based on a namespace and country.<br>Other detail info: <ul><li><i>Leave the policyType empty if you want to be responded with all policy type</i></li><li><i>Fill the tags if you want to filter the responded policy by tags</i></li><li><i>Fill the defaultOnEmpty with true if you want to be responded with default country-specific policy if your requested country is not exist</i></li><li><i>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:<ul><li>Document 1 (default): Region US (default), UA</li><li>Document 2 (default): Region US (default)</li><li>Document 3 (default): Region US (default)</li><li>User: Region UA</li><li>Query: alwaysIncludeDefault: true</li><li>Response: Document 1 (UA), Document 2 (US), Document 3 (US)</li></ul>
23647
- */
23648
- fetchPoliciesByCountry({ countryCode, queryParams }) {
23649
- return this.newInstance().fetchPublicPoliciesNamespacesByNamespaceCountriesByCountrycode(countryCode, queryParams);
23650
- }
23651
- /**
23652
- * Retrieve all active latest policies based on country from all namespaces.<br>Other detail info: <ul><li><i>Leave the policyType empty if you want to be responded with all policy type</i></li><li><i>Fill the tags if you want to filter the responded policy by tags</i></li><li><i>Fill the defaultOnEmpty with true if you want to be responded with default country-specific policy if your requested country is not exist</i></li></ul>
23653
- */
23654
- fetchAllPoliciesByCountry({ countryCode, queryParams }) {
23655
- return this.newInstance().fetchPublicPoliciesCountriesByCountrycode(countryCode, queryParams);
23853
+ /**
23854
+ * GET [/agreement/public/policies/namespaces/{namespace}/countries/{countryCode}](api)
23855
+ *
23856
+ * Retrieve all active latest policies based on a namespace and country.
23857
+ *
23858
+ * - _Leave the policyType empty if you want to be responded with all policy type_
23859
+ * - _Fill the tags if you want to filter the responded policy by tags_
23860
+ * - _Fill the defaultOnEmpty with true if you want to be responded with default country-specific policy if your requested country is not exist_
23861
+ * - _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:_
23862
+ *
23863
+ * - Document 1 (default): Region US (default), UA
23864
+ * - Document 2 (default): Region US (default)
23865
+ * - Document 3 (default): Region US (default)
23866
+ * - User: Region UA
23867
+ * - Query: alwaysIncludeDefault: true
23868
+ * - Response: Document 1 (UA), Document 2 (US), Document 3 (US)
23869
+ */
23870
+ this.fetchPoliciesByCountry = ({ countryCode, queryParams }) => {
23871
+ return this.newInstance().fetchPublicPoliciesNamespacesByNamespaceCountriesByCountrycode(countryCode, queryParams);
23872
+ };
23873
+ /**
23874
+ * GET [/agreement/public/policies/countries/{countryCode}](api)
23875
+ *
23876
+ * Retrieve all active latest policies based on country from all namespaces.
23877
+ * - _Leave the policyType empty if you want to be responded with all policy type_
23878
+ * - _Fill the tags if you want to filter the responded policy by tags_
23879
+ * - _Fill the defaultOnEmpty with true if you want to be responded with default country-specific policy if your requested country is not exist_
23880
+ */
23881
+ this.fetchAllPoliciesByCountry = ({ countryCode, queryParams }) => {
23882
+ return this.newInstance().fetchPublicPoliciesCountriesByCountrycode(countryCode, queryParams);
23883
+ };
23656
23884
  }
23657
23885
  newInstance() {
23658
23886
  return new Policies$(Network.create(this.conf), this.namespace, this.cache);
@@ -23736,12 +23964,21 @@ class PublicTemplateApi {
23736
23964
  this.conf = conf;
23737
23965
  this.namespace = namespace;
23738
23966
  this.cache = cache;
23967
+ /**
23968
+ * @internal
23969
+ */
23739
23970
  this.getTemplateConfigs = (template) => {
23740
23971
  return this.newInstance().fetchV1NsTemplatesByTemplateConfigs(template);
23741
23972
  };
23973
+ /**
23974
+ * @internal
23975
+ */
23742
23976
  this.getTemplateConfig = (template, configId) => {
23743
23977
  return this.newInstance().fetchV1NsTemplatesByTemplateConfigsByConfig(template, configId);
23744
23978
  };
23979
+ /**
23980
+ * @internal
23981
+ */
23745
23982
  this.getDiscoveryTemplateConfigs = () => {
23746
23983
  return this.newInstance().fetchV1NsTemplatesByTemplateConfigs(DISCOVERY_TEMPLATE_NAME);
23747
23984
  };
@@ -23811,13 +24048,19 @@ class CurrencyApi {
23811
24048
  this.namespace = namespace;
23812
24049
  this.cache = cache;
23813
24050
  /**
23814
- * List currencies of a namespace.<br>Other detail info: <ul><li><i>Returns</i>: Currency List</li></ul>
24051
+ * GET [/platform/public/namespaces/{namespace}/currencies](api)
24052
+ *
24053
+ * List currencies of a namespace.
24054
+ *
24055
+ * Returns: Currency List
23815
24056
  */
23816
24057
  this.getCurrencies = () => {
23817
24058
  return this.newInstance().fetchNsCurrencies();
23818
24059
  };
23819
24060
  /**
23820
24061
  * Get the currencies list and convert into a map of currency code and the currency itself
24062
+ *
24063
+ * @internal
23821
24064
  */
23822
24065
  this.getCurrencyMap = async () => {
23823
24066
  const result = await this.getCurrencies();
@@ -24430,38 +24673,42 @@ class EntitlementApi {
24430
24673
  this.conf = conf;
24431
24674
  this.namespace = namespace;
24432
24675
  this.cache = cache;
24433
- }
24434
- /**
24435
- * Get user app entitlement by appId.<p>Other detail info: <ul><li><i>Required permission</i>: resource="NAMESPACE:{namespace}:USER:{userId}:ENTITLEMENT", action=2 (READ)</li></ul>
24436
- */
24437
- getEntitlementByAppId({ userId, appId }) {
24438
- return this.newInstance().fetchNsUsersByUseridEntitlementsByAppId(userId, {
24439
- appId
24440
- });
24441
- }
24442
- /**
24443
- * Query user entitlements for a specific user.<p>Other detail info: <ul><li><i>Required permission</i>: resource="NAMESPACE:{namespace}:USER:{userId}:ENTITLEMENT", action=2 (READ)</li><li><i>Returns</i>: entitlement list</li></ul>
24444
- */
24445
- getEntitlements({ userId, queryParams }) {
24446
- return this.newInstance().fetchNsUsersByUseridEntitlements(userId, queryParams);
24447
- }
24448
- /**
24449
- * Exists any user active entitlement of specified itemIds, skus and appIds<p>Other detail info: <ul><li><i>Required permission</i>: resource="NAMESPACE:{namespace}:USER:{userId}:ENTITLEMENT", action=2 (READ)</li></ul>
24450
- */
24451
- getEntitlementOwnerShip({ userId, queryParams }) {
24452
- return this.newInstance().fetchNsUsersByUseridEntitlementsOwnershipAny(userId, queryParams);
24453
- }
24454
- /**
24455
- * Get user entitlement ownership by itemIds.<p>Other detail info: <ul><li><i>Required permission</i>: resource="NAMESPACE:{namespace}:USER:{userId}:ENTITLEMENT", action=2 (READ)</li></ul>
24456
- */
24457
- getEntitlementByItemIds({ userId, queryParams }) {
24458
- return this.newInstance().fetchNsUsersByUseridEntitlementsOwnershipByItemIds(userId, queryParams);
24459
- }
24460
- /**
24461
- * 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<br>Other detail info: <ul><li><i>Required permission</i>: resource="NAMESPACE:{namespace}:USER:{userId}:ENTITLEMENT", action=4 (UPDATE)</li><li><i>Returns</i>: consumed entitlement</li></ul>
24462
- */
24463
- claimEntitlement({ userId, entitlementId, data }) {
24464
- return this.newInstance().putNsUsersByUseridEntitlementsByEntitlementidDecrement(userId, entitlementId, data);
24676
+ /**
24677
+ * GET [/platform/public/namespaces/{namespace}/users/{userId}/entitlements/byAppId](api)
24678
+ *
24679
+ * Get user app entitlement by appId.
24680
+ */
24681
+ this.getEntitlementByAppId = ({ userId, appId }) => {
24682
+ return this.newInstance().fetchNsUsersByUseridEntitlementsByAppId(userId, {
24683
+ appId
24684
+ });
24685
+ };
24686
+ /**
24687
+ * Query user entitlements for a specific user.
24688
+ * Returns: entitlement list
24689
+ */
24690
+ this.getEntitlements = ({ userId, queryParams }) => {
24691
+ return this.newInstance().fetchNsUsersByUseridEntitlements(userId, queryParams);
24692
+ };
24693
+ /**
24694
+ * Exists any user active entitlement of specified itemIds, skus and appIds
24695
+ */
24696
+ this.getEntitlementOwnerShip = ({ userId, queryParams }) => {
24697
+ return this.newInstance().fetchNsUsersByUseridEntitlementsOwnershipAny(userId, queryParams);
24698
+ };
24699
+ /**
24700
+ * Get user entitlement ownership by itemIds.
24701
+ */
24702
+ this.getEntitlementByItemIds = ({ userId, queryParams }) => {
24703
+ return this.newInstance().fetchNsUsersByUseridEntitlementsOwnershipByItemIds(userId, queryParams);
24704
+ };
24705
+ /**
24706
+ * 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
24707
+ * Returns: consumed entitlement
24708
+ */
24709
+ this.claimEntitlement = ({ userId, entitlementId, data }) => {
24710
+ return this.newInstance().putNsUsersByUseridEntitlementsByEntitlementidDecrement(userId, entitlementId, data);
24711
+ };
24465
24712
  }
24466
24713
  newInstance() {
24467
24714
  return new Entitlement$(Network.create(this.conf), this.namespace, this.cache);
@@ -24561,7 +24808,11 @@ class FulfillmentApi {
24561
24808
  this.namespace = namespace;
24562
24809
  this.cache = cache;
24563
24810
  /**
24564
- * Redeem campaign code.<br>Other detail info: <ul><li><i>Required permission</i>: resource="NAMESPACE:{namespace}:USER:{userId}:FULFILLMENT", action=1 (CREATED)</li><li><i>Returns</i>: fulfillment result</li></ul>
24811
+ * POST [/platform/public/namespaces/{namespace}/users/{userId}/fulfillment/code](api)
24812
+ *
24813
+ * Redeem campaign code
24814
+ *
24815
+ * Returns: fulfillment result
24565
24816
  */
24566
24817
  this.redeemCode = ({ userId, data }) => {
24567
24818
  return this.newInstance().postNsUsersByUseridFulfillmentCode(userId, data);
@@ -25114,64 +25365,90 @@ class ItemApi {
25114
25365
  this.conf = conf;
25115
25366
  this.namespace = namespace;
25116
25367
  this.cache = cache;
25117
- }
25118
- /**
25119
- * This API is used to get item by appId.<p>Other detail info: <ul><li><i>Optional permission</i>: resource="PREVIEW", action=1(CREATE) (user with this permission can view draft store item)</li><li><i>Optional permission</i>: resource="SANDBOX", action=1(CREATE) (user with this permission can view draft store item)</li><li><i>Returns</i>: the item with that appId</li></ul>
25120
- */
25121
- getItemByAppId({ ...queryParams }) {
25122
- return this.newInstance().fetchNsItemsByAppId(queryParams);
25123
- }
25124
- /**
25125
- * Get item dynamic data for a published item.<br>Other detail info: <ul><li><i>Returns</i>: item dynamic data</li></ul>
25126
- */
25127
- getItemByItemIdDynamic(itemId) {
25128
- return this.newInstance().fetchNsItemsByItemidDynamic(itemId);
25129
- }
25130
- fetchItemsByCriteria({ queryParams }) {
25131
- return this.newInstance().fetchNsItemsByCriteria(queryParams);
25132
- }
25133
- /**
25134
- * This API is used to query items by criteria within a store. If item not exist in specific region, default region item will return.<p>Other detail info: <ul><li><i>Optional permission</i>: resource="PREVIEW", action=1(CREATE) (user with this permission can view draft store item)</li><li><i>Optional permission</i>: resource="SANDBOX", action=1(CREATE) (user with this permission can view draft store item)</li><li><i>Returns</i>: the list of items</li></ul>
25135
- */
25136
- getItemsByItemIds({ queryParams }) {
25137
- return this.newInstance().fetchNsItemsLocaleByIds(queryParams);
25138
- }
25139
- /**
25140
- * Fetch the items and convert it into a map of `itemId` and its item info
25141
- */
25142
- async fetchAvailableItemInfoMap({ queryParams }) {
25143
- const result = await this.getItemsByItemIds({ queryParams });
25144
- if (result.response) {
25145
- return {
25146
- error: null,
25147
- value: result.response.data.reduce((map, availableItemInfo) => {
25148
- const { itemId } = availableItemInfo;
25149
- if (itemId) {
25150
- map.set(itemId, availableItemInfo);
25151
- }
25152
- return map;
25153
- }, new Map())
25154
- };
25155
- }
25156
- return result;
25157
- }
25158
- /**
25159
- * This API is used to get an item in locale. If item not exist in specific region, default region item will return.<p>Other detail info: <ul><li><i>Optional permission</i>: resource="PREVIEW", action=1(CREATE) (user with this permission can view draft store item)</li><li><i>Optional permission</i>: resource="SANDBOX", action=1(CREATE) (user with this permission can view draft store item)</li><li><i>Returns</i>: item data</li></ul>
25160
- */
25161
- getItemsByItemIdLocale({ itemId, queryParams }) {
25162
- return this.newInstance().fetchNsItemsByItemidLocale(itemId, queryParams);
25163
- }
25164
- /**
25165
- * This API is used to get an app in locale. If app not exist in specific region, default region app will return.<p>Other detail info: <ul><li><i>Optional permission</i>: resource="PREVIEW", action=1(CREATE) (user with this permission can view draft store app)</li><li><i>Optional permission</i>: resource="SANDBOX", action=1(CREATE) (user with this permission can view draft store app)</li><li><i>Returns</i>: app data</li></ul>
25166
- */
25167
- getAppInfoByItemId({ itemId, queryParams }) {
25168
- return this.newInstance().fetchNsItemsByItemidAppLocale(itemId, queryParams);
25169
- }
25170
- /**
25171
- * This API is used to validate user item purchase condition
25172
- */
25173
- validatePurchaseCondition(data) {
25174
- return this.newInstance().postNsItemsPurchaseConditionsValidate(data);
25368
+ /**
25369
+ * GET [/platform/public/namespaces/{namespace}/items/byAppId](api)
25370
+ *
25371
+ * This API is used to get item by appId
25372
+ *
25373
+ * Returns: the item with that appId
25374
+ */
25375
+ this.getItemByAppId = ({ ...queryParams }) => {
25376
+ return this.newInstance().fetchNsItemsByAppId(queryParams);
25377
+ };
25378
+ /**
25379
+ * GET [/platform/public/namespaces/{namespace}/items/{itemId}/dynamic](api)
25380
+ *
25381
+ * Get item dynamic data for a published item
25382
+ *
25383
+ * Returns: item dynamic data
25384
+ */
25385
+ this.getItemByItemIdDynamic = (itemId) => {
25386
+ return this.newInstance().fetchNsItemsByItemidDynamic(itemId);
25387
+ };
25388
+ /**
25389
+ * GET [/platform/public/namespaces/{namespace}/items/byCriteria](api)
25390
+ */
25391
+ this.fetchItemsByCriteria = ({ queryParams }) => {
25392
+ return this.newInstance().fetchNsItemsByCriteria(queryParams);
25393
+ };
25394
+ /**
25395
+ * GET [/platform/public/namespaces/{namespace}/items/locale/byIds](api)
25396
+ *
25397
+ * This API is used to query items by criteria within a store. If item not exist in specific region, default region item will return.
25398
+ *
25399
+ * Returns: the list of items
25400
+ */
25401
+ this.getItemsByItemIds = ({ queryParams }) => {
25402
+ return this.newInstance().fetchNsItemsLocaleByIds(queryParams);
25403
+ };
25404
+ // TODO if not used, delete below
25405
+ // /**
25406
+ // * Fetch the items and convert it into a map of `itemId` and its item info
25407
+ // */
25408
+ // fetchAvailableItemInfoMap = async ({ queryParams }: { queryParams: QueryParamsItemIds }) => {
25409
+ // const result = await this.getItemsByItemIds({ queryParams })
25410
+ // if (result.response) {
25411
+ // return {
25412
+ // error: null,
25413
+ // value: result.response.data.reduce((map: Map<string, ItemInfo>, availableItemInfo) => {
25414
+ // const { itemId } = availableItemInfo
25415
+ // if (itemId) {
25416
+ // map.set(itemId, availableItemInfo)
25417
+ // }
25418
+ // return map
25419
+ // }, new Map())
25420
+ // }
25421
+ // }
25422
+ // return result
25423
+ // }
25424
+ /**
25425
+ * GET [/platform/public/namespaces/{namespace}/items/{itemId}/locale](api)
25426
+ *
25427
+ * This API is used to get an item in locale. If item not exist in specific region, default region item will return.
25428
+ *
25429
+ * Returns: item data
25430
+ */
25431
+ this.getItemsByItemIdLocale = ({ itemId, queryParams }) => {
25432
+ return this.newInstance().fetchNsItemsByItemidLocale(itemId, queryParams);
25433
+ };
25434
+ /**
25435
+ * GET [/platform/public/namespaces/{namespace}/items/{itemId}/app/locale](api)
25436
+ *
25437
+ * This API is used to get an app in locale. If app not exist in specific region, default region app will return.
25438
+ *
25439
+ * Returns: app data
25440
+ */
25441
+ this.getAppInfoByItemId = ({ itemId, queryParams }) => {
25442
+ return this.newInstance().fetchNsItemsByItemidAppLocale(itemId, queryParams);
25443
+ };
25444
+ /**
25445
+ * POST [/platform/public/namespaces/{namespace}/items/purchase/conditions/validate](api)
25446
+ *
25447
+ * This API is used to validate user item purchase condition
25448
+ */
25449
+ this.validatePurchaseCondition = (data) => {
25450
+ return this.newInstance().postNsItemsPurchaseConditionsValidate(data);
25451
+ };
25175
25452
  }
25176
25453
  newInstance() {
25177
25454
  return new Item$(Network.create(this.conf), this.namespace, this.cache);
@@ -25412,31 +25689,102 @@ class OrderApi {
25412
25689
  this.namespace = namespace;
25413
25690
  this.cache = cache;
25414
25691
  /**
25415
- * Query user orders.<br>Other detail info: <ul><li><i>Required permission</i>: resource="NAMESPACE:{namespace}:USER:{userId}:ORDER", action=2 (READ)</li><li><i>Returns</i>: get order</li></ul>
25692
+ * GET [/platform/public/namespaces/{namespace}/users/{userId}/orders](api)
25693
+ *
25694
+ * Query user orders
25695
+ *
25696
+ * Returns a paginated list of `OrderInfo`:
25697
+ * <pre lang="json">{
25698
+ orderNo,
25699
+ paymentOrderNo,
25700
+ namespace,
25701
+ userId,
25702
+ itemId,
25703
+ sandbox,
25704
+ quantity,
25705
+ price,
25706
+ discountedPrice,
25707
+ creationOptions
25708
+ paymentProvider: ('WALLET', 'XSOLLA', 'ADYEN', 'STRIPE', 'CHECKOUT', 'ALIPAY', 'WXPAY', 'PAYPAL'),
25709
+ paymentMethod,
25710
+ tax,
25711
+ vat,
25712
+ salesTax,
25713
+ paymentProviderFee,
25714
+ paymentMethodFee
25715
+ currency: CurrencySummary,
25716
+ paymentStationUrl,
25717
+ itemSnapshot,
25718
+ region,
25719
+ language,
25720
+ status: (
25721
+ 'INIT',
25722
+ 'CHARGED',
25723
+ 'CHARGEBACK',
25724
+ 'CHARGEBACK_REVERSED',
25725
+ 'FULFILLED',
25726
+ 'FULFILL_FAILED',
25727
+ 'REFUNDING',
25728
+ 'REFUNDED',
25729
+ 'REFUND_FAILED',
25730
+ 'CLOSED',
25731
+ 'DELETED'
25732
+ ),
25733
+ statusReason,
25734
+ createdTime,
25735
+ chargedTime,
25736
+ fulfilledTime,
25737
+ refundedTime,
25738
+ chargebackTime,
25739
+ chargebackReversedTime,
25740
+ expireTime,
25741
+ paymentRemainSeconds,
25742
+ ext,
25743
+ totalTax,
25744
+ totalPrice,
25745
+ subtotalPrice,
25746
+ createdAt,
25747
+ updatedAt
25748
+ }</pre>
25416
25749
  */
25417
25750
  this.getOrderList = ({ userId, queryParams }) => {
25418
25751
  return this.newInstance().fetchNsUsersByUseridOrders(userId, queryParams);
25419
25752
  };
25420
25753
  /**
25421
- * Get user order.<br>Other detail info: <ul><li><i>Required permission</i>: resource="NAMESPACE:{namespace}:USER:{userId}:ORDER", action=2 (READ)</li><li><i>Returns</i>: get order</li></ul>
25754
+ * GET [/platform/public/namespaces/{namespace}/users/{userId}/orders/{orderNo}](api)
25755
+ *
25756
+ * Get user order.
25757
+ *
25758
+ * Returns: `OrderInfo`
25422
25759
  */
25423
25760
  this.getOrderByOrderNo = ({ userId, orderNo }) => {
25424
25761
  return this.newInstance().fetchNsUsersByUseridOrdersByOrderno(userId, orderNo);
25425
25762
  };
25426
25763
  /**
25427
- * Cancel user order.<br>Other detail info: <ul><li><i>Required permission</i>: resource="NAMESPACE:{namespace}:USER:{userId}:ORDER", action=4 (UPDATE)</li><li><i>Returns</i>: cancelled order</li></ul>
25764
+ * PUT [/platform/public/namespaces/{namespace}/users/{userId}/orders/{orderNo}/cancel](api)
25765
+ *
25766
+ * Cancel user order.
25767
+ *
25768
+ * Returns: cancelled `OrderInfo`
25428
25769
  */
25429
25770
  this.cancelOrder = ({ userId, orderNo }) => {
25430
25771
  return this.newInstance().putNsUsersByUseridOrdersByOrdernoCancel(userId, orderNo);
25431
25772
  };
25432
25773
  /**
25433
- * Create an order. The result contains the checkout link and payment token. User with permission SANDBOX will create sandbox order that not real paid for xsolla/alipay and not validate price for wxpay.<br>Other detail info: <ul><li><i>Required permission</i>: resource="NAMESPACE:{namespace}:USER:{userId}:ORDER", action=1 (CREATE)</li><li><i>Optional permission(user with this permission will create sandbox order)</i>: resource="SANDBOX", action=1 (CREATE)</li><li>It will be forbidden while the user is banned: ORDER_INITIATE or ORDER_AND_PAYMENT</li><li><i>Returns</i>: created order</li></ul>
25774
+ * POST [/platform/public/namespaces/{namespace}/users/{userId}/orders](api)
25775
+ *
25776
+ * Create an order. The result contains the checkout link and payment token.
25777
+ * User with permission SANDBOX will create sandbox order that not real paid for xsolla/alipay and not validate price for wxpay.
25778
+ *
25779
+ * Returns: created `OrderInfo`
25434
25780
  */
25435
25781
  this.createOrder = ({ userId, data }) => {
25436
25782
  return this.newInstance().postNsUsersByUseridOrders(userId, data);
25437
25783
  };
25438
25784
  /**
25439
25785
  * Fetch all information needed for a user to check the user's availability to purchase the item
25786
+ *
25787
+ * @internal
25440
25788
  */
25441
25789
  this.fetchPrePurchaseInformation = async ({ userId, item }) => {
25442
25790
  const currencyApi = new CurrencyApi(this.conf, this.namespace, this.cache);
@@ -25765,31 +26113,49 @@ class PaymentApi {
25765
26113
  this.namespace = namespace;
25766
26114
  this.cache = cache;
25767
26115
  /**
25768
- * Get payment accounts.<br>Other detail info: <ul><li><i>Required permission</i>: resource="NAMESPACE:{namespace}:USER:{userId}:PAYMENT:ACCOUNT", action=2 (READ)</li><li><i>Returns</i>: Payment account list</li></ul>
26116
+ * GET [/platform/public/namespaces/{namespace}/users/{userId}/payment/accounts](api)
26117
+ *
26118
+ * Get payment accounts.
26119
+ *
26120
+ * Returns: Payment account list `PaymentAccountArray`
25769
26121
  */
25770
26122
  this.getPaymentAccounts = (userId) => {
25771
26123
  return this.newInstance().fetchNsUsersByUseridPaymentAccounts(userId);
25772
26124
  };
25773
26125
  /**
25774
- * Delete payment account.<br>Other detail info: <ul><li><i>Required permission</i>: resource="NAMESPACE:{namespace}:USER:{userId}:PAYMENT:ACCOUNT", action=8 (DELETE)</li><li><i>Returns</i>:</li></ul>
26126
+ * DELETE [/platform/public/namespaces/{namespace}/users/{userId}/payment/accounts/{type}/{id}](api)
26127
+ *
26128
+ * Delete payment account.
25775
26129
  */
25776
26130
  this.deletePaymentAccount = ({ userId, type, id }) => {
25777
26131
  return this.newInstance().deleteNsUsersByUseridPaymentAccountsByTypeById(userId, type, id);
25778
26132
  };
25779
26133
  /**
25780
- * Get payment order info.<br>Other detail info: <ul><li><i>Returns</i>: Payment order details</li></ul>
26134
+ * GET [/platform/public/namespaces/{namespace}/payment/orders/{paymentOrderNo}/info](api)
26135
+ *
26136
+ * Get payment order info.
26137
+ *
26138
+ * Returns: Payment order details `PaymentOrderDetails`
25781
26139
  */
25782
26140
  this.getPaymentInfo = (paymentOrderNo) => {
25783
26141
  return new PaymentStation$(Network.create(this.conf), this.namespace, this.cache).fetchNsPaymentOrdersByPaymentordernoInfo(paymentOrderNo);
25784
26142
  };
25785
26143
  /**
25786
- * Do payment(For now, this only support checkout.com).<br>Other detail info: <ul><li><i>Returns</i>: Payment process result</li></ul>
26144
+ * POST [/platform/public/namespaces/{namespace}/payment/orders/{paymentOrderNo}/pay](api)
26145
+ *
26146
+ * Do payment(For now, this only support checkout.com).
26147
+ *
26148
+ * Returns: Payment process result
25787
26149
  */
25788
26150
  this.processPaymentOrder = (paymentOrderNo, data, queryParams) => {
25789
26151
  return new PaymentStation$(Network.create(this.conf), this.namespace, this.cache).postNsPaymentOrdersByPaymentordernoPay(paymentOrderNo, data, queryParams);
25790
26152
  };
25791
26153
  /**
25792
- * Get payment provider public config, at current only Strip provide public config.<br>Other detail info: <ul><li><i>Returns</i>: Public config</li></ul>
26154
+ * GET [/platform/public/namespaces/{namespace}/payment/publicconfig](api)
26155
+ *
26156
+ * Get payment provider public config, at current only Strip provide public config.
26157
+ *
26158
+ * Returns: Public config
25793
26159
  */
25794
26160
  this.getPaymentProviderPublicConfig = (paymentProvider, region, sandbox) => {
25795
26161
  return new PaymentStation$(Network.create(this.conf), this.namespace, this.cache).fetchNsPaymentPublicconfig({
@@ -25799,19 +26165,28 @@ class PaymentApi {
25799
26165
  });
25800
26166
  };
25801
26167
  /**
25802
- * Check payment order paid status.<br>Other detail info: <ul><li><i>Returns</i>: Payment order paid result</li></ul>
26168
+ * GET [/platform/public/namespaces/{namespace}/payment/orders/{paymentOrderNo}/status](api)
26169
+ *
26170
+ * Check payment order paid status.
26171
+ *
26172
+ * Returns: Payment order paid result
25803
26173
  */
25804
26174
  this.getPaymentOrderStatus = (paymentOrderNo) => {
25805
26175
  return new PaymentStation$(Network.create(this.conf), this.namespace, this.cache).fetchNsPaymentOrdersByPaymentordernoStatus(paymentOrderNo);
25806
26176
  };
25807
26177
  /**
25808
- * Get payment methods.<br>Other detail info: <ul><li><i>Returns</i>: Payment method list</li></ul>
26178
+ * Get payment methods.
26179
+ * Returns: Payment method list
25809
26180
  */
25810
26181
  this.getPaymentMethods = (paymentOrderNo) => {
25811
26182
  return new PaymentStation$(Network.create(this.conf), this.namespace, this.cache).fetchNsPaymentMethods({ paymentOrderNo });
25812
26183
  };
25813
26184
  /**
25814
- * Check and get a payment order's should pay tax.<br>Other detail info: <ul><li><i>Returns</i>: tax result</li></ul>
26185
+ * GET [/platform/public/namespaces/{namespace}/payment/methods](api)
26186
+ *
26187
+ * Check and get a payment order's should pay tax.
26188
+ *
26189
+ * Returns: tax result
25815
26190
  */
25816
26191
  this.getPaymentTax = (paymentProvider, paymentOrderNo, zipCode) => {
25817
26192
  return new PaymentStation$(Network.create(this.conf), this.namespace, this.cache).fetchNsPaymentTax({
@@ -25821,7 +26196,11 @@ class PaymentApi {
25821
26196
  });
25822
26197
  };
25823
26198
  /**
25824
- * Get payment url.<br>Other detail info: <ul><li><i>Returns</i>: Get payment link</li></ul>
26199
+ * POST [/platform/public/namespaces/{namespace}/payment/link](api)
26200
+ *
26201
+ * Get payment url.
26202
+ *
26203
+ * Returns: Get payment link
25825
26204
  */
25826
26205
  this.createPaymentUrl = (data) => {
25827
26206
  return new PaymentStation$(Network.create(this.conf), this.namespace, this.cache).postNsPaymentLink(data);
@@ -26077,42 +26456,73 @@ class SubscriptionApi {
26077
26456
  this.conf = conf;
26078
26457
  this.namespace = namespace;
26079
26458
  this.cache = cache;
26080
- }
26081
- /**
26082
- * Query user subscriptions.<br>Other detail info: <ul><li><i>Required permission</i>: resource="NAMESPACE:{namespace}:USER:{userId}:SUBSCRIPTION", action=2 (READ)</li><li><i>Returns</i>: paginated subscription</li></ul>
26083
- */
26084
- getUserSubscriptions({ userId, queryParams }) {
26085
- return this.newInstance().fetchNsUsersByUseridSubscriptions(userId, queryParams);
26086
- }
26087
- /**
26088
- * Get user subscription.<br>Other detail info: <ul><li><i>Required permission</i>: resource="NAMESPACE:{namespace}:USER:{userId}:SUBSCRIPTION", action=2 (READ)</li><li><i>Returns</i>: subscription</li></ul>
26089
- */
26090
- getUserSubscriptionBySubscriptionId({ userId, subscriptionId }) {
26091
- return this.newInstance().fetchNsUsersByUseridSubscriptionsBySubscriptionid(userId, subscriptionId);
26092
- }
26093
- /**
26094
- * Subscribe a subscription. Support both real and virtual payment. Need go through payment flow using the paymentOrderNo if paymentFlowRequired true.<br><b>ACTIVE USER subscription can't do subscribe again.</b><br><b>The next billing date will be X(default 4) hours before the current period ends if correctly subscribed.</b><br>User with permission SANDBOX will create sandbox subscription that not real paid.<br>Other detail info: <ul><li><i>Required permission</i>: resource="NAMESPACE:{namespace}:USER:{userId}:SUBSCRIPTION", action=1 (CREATE)</li><li><i>Optional permission(user with this permission will create sandbox subscription)</i>: resource="SANDBOX", action=1 (CREATE)</li><li>It will be forbidden while the user is banned: ORDER_INITIATE or ORDER_AND_PAYMENT</li><li><i>Returns</i>: created subscription</li></ul>
26095
- */
26096
- createSubscription({ userId, data }) {
26097
- return this.newInstance().postNsUsersByUseridSubscriptions(userId, data);
26098
- }
26099
- /**
26100
- * Get user subscription billing histories.<br>Other detail info: <ul><li><i>Required permission</i>: resource="NAMESPACE:{namespace}:USER:{userId}:SUBSCRIPTION", action=2 (READ)</li><li><i>Returns</i>: paginated subscription history</li></ul>
26101
- */
26102
- getUserSubscriptionBillingHistory({ userId, subscriptionId, queryParams }) {
26103
- return this.newInstance().fetchNsUsersByUseridSubscriptionsBySubscriptionidHistory(userId, subscriptionId, queryParams);
26104
- }
26105
- /**
26106
- * Request to change a subscription billing account, this will guide user to payment station. The actual change will happen at the 0 payment notification successfully handled.<br>Only ACTIVE USER subscription with real currency billing account can be changed.<br>Other detail info: <ul><li><i>Required permission</i>: resource="NAMESPACE:{namespace}:USER:{userId}:SUBSCRIPTION", action=4 (UPDATE)</li><li><i>Returns</i>: updated subscription</li></ul>
26107
- */
26108
- updateUserSubscriptionPaymentMethod({ userId, subscriptionId }) {
26109
- return this.newInstance().putNsUsersByUseridSubscriptionsBySubscriptionidBillingAccount(userId, subscriptionId);
26110
- }
26111
- /**
26112
- * Cancel a subscription, only ACTIVE subscription can be cancelled. <b>Ensure successfully cancel, recommend at least 1 day before current period ends, otherwise it may be charging or charged.</b><br>Set immediate true, the subscription will be terminated immediately, otherwise till the end of current billing cycle.<br>Other detail info: <ul><li><i>Required permission</i>: resource="NAMESPACE:{namespace}:USER:{userId}:SUBSCRIPTION", action=4 (UPDATE)</li><li><i>Returns</i>: cancelled subscription</li></ul>
26113
- */
26114
- cancelUserSubscription({ userId, subscriptionId, data }) {
26115
- return this.newInstance().putNsUsersByUseridSubscriptionsBySubscriptionidCancel(userId, subscriptionId, data);
26459
+ /**
26460
+ * GET [/platform/public/namespaces/{namespace}/users/{userId}/subscriptions](api)
26461
+ *
26462
+ * Query user subscriptions.
26463
+ *
26464
+ * Returns: paginated subscription
26465
+ */
26466
+ this.getUserSubscriptions = ({ userId, queryParams }) => {
26467
+ return this.newInstance().fetchNsUsersByUseridSubscriptions(userId, queryParams);
26468
+ };
26469
+ /**
26470
+ * GET [/platform/public/namespaces/{namespace}/users/{userId}/subscriptions/{subscriptionId}](api)
26471
+ *
26472
+ * Get user subscription.
26473
+ *
26474
+ * Returns: subscription
26475
+ */
26476
+ this.getUserSubscriptionBySubscriptionId = ({ userId, subscriptionId }) => {
26477
+ return this.newInstance().fetchNsUsersByUseridSubscriptionsBySubscriptionid(userId, subscriptionId);
26478
+ };
26479
+ /**
26480
+ * POST [/platform/public/namespaces/{namespace}/users/{userId}/subscriptions](api)
26481
+ *
26482
+ * Subscribe a subscription. Support both real and virtual payment. Need go through payment flow using the paymentOrderNo if paymentFlowRequired true.
26483
+ * __ACTIVE USER subscription can't do subscribe again.__
26484
+ * __The next billing date will be X(default 4) hours before the current period ends if correctly subscribed.__
26485
+ * User with permission SANDBOX will create sandbox subscription that not real paid.
26486
+ *
26487
+ * Returns: created subscription
26488
+ */
26489
+ this.createSubscription = ({ userId, data }) => {
26490
+ return this.newInstance().postNsUsersByUseridSubscriptions(userId, data);
26491
+ };
26492
+ /**
26493
+ * GET [/platform/public/namespaces/{namespace}/users/{userId}/subscriptions/{subscriptionId}/history](api)
26494
+ *
26495
+ * Get user subscription billing histories.
26496
+ *
26497
+ * Returns: paginated subscription history
26498
+ */
26499
+ this.getUserSubscriptionBillingHistory = ({ userId, subscriptionId, queryParams }) => {
26500
+ return this.newInstance().fetchNsUsersByUseridSubscriptionsBySubscriptionidHistory(userId, subscriptionId, queryParams);
26501
+ };
26502
+ /**
26503
+ * PUT [/platform/public/namespaces/{namespace}/users/{userId}/subscriptions/{subscriptionId}/billingAccount](api)
26504
+ *
26505
+ * Request to change a subscription billing account, this will guide user to payment station.
26506
+ * The actual change will happen at the 0 payment notification successfully handled.
26507
+ * Only ACTIVE USER subscription with real currency billing account can be changed.
26508
+ *
26509
+ * Returns: updated subscription
26510
+ */
26511
+ this.updateUserSubscriptionPaymentMethod = ({ userId, subscriptionId }) => {
26512
+ return this.newInstance().putNsUsersByUseridSubscriptionsBySubscriptionidBillingAccount(userId, subscriptionId);
26513
+ };
26514
+ /**
26515
+ * PUT [/platform/public/namespaces/{namespace}/users/{userId}/subscriptions/{subscriptionId}/cancel](api)
26516
+ *
26517
+ * Cancel a subscription, only ACTIVE subscription can be cancelled.
26518
+ * __Ensure successfully cancel, recommend at least 1 day before current period ends, otherwise it may be charging or charged.__
26519
+ * Set immediate true, the subscription will be terminated immediately, otherwise till the end of current billing cycle.
26520
+ *
26521
+ * Returns: cancelled subscription
26522
+ */
26523
+ this.cancelUserSubscription = ({ userId, subscriptionId, data }) => {
26524
+ return this.newInstance().putNsUsersByUseridSubscriptionsBySubscriptionidCancel(userId, subscriptionId, data);
26525
+ };
26116
26526
  }
26117
26527
  newInstance() {
26118
26528
  return new Subscription$(Network.create(this.conf), this.namespace, this.cache);
@@ -26279,19 +26689,32 @@ class WalletApi {
26279
26689
  this.namespace = namespace;
26280
26690
  this.cache = cache;
26281
26691
  /**
26282
- * get my wallet by currency code and namespace.<br>Other detail info: <ul><li><i>Required permission</i>: resource="NAMESPACE:{namespace}:WALLET", action=2 (READ)</li><li><i>Returns</i>: wallet info</li><li><i>Path's namespace</i> : <ul> <li>can be filled with <b>publisher namespace</b> in order to get <b>publisher user wallet</b></li> <li>can be filled with <b>game namespace</b> in order to get <b>game user wallet</b></li> </ul></li></ul>
26692
+ * GET [/platform/public/namespaces/{namespace}/users/me/wallets/{currencyCode}](api)
26693
+ *
26694
+ * get my wallet by currency code and namespace.
26695
+ *
26696
+ * Returns: wallet info
26697
+ *
26698
+ * Path's namespace:
26699
+ * - can be filled with __publisher namespace__ in order to get __publisher user wallet__
26700
+ * - can be filled with __game namespace__ in order to get __game user wallet__
26283
26701
  */
26284
26702
  this.getUserMeWallet = (currencyCode) => {
26285
26703
  return this.newInstance().fetchNsUsersMeWalletsByCurrencycode(currencyCode);
26286
26704
  };
26287
26705
  /**
26288
- * get a wallet by currency code.<br>Other detail info: <ul><li><i>Required permission</i>: resource="NAMESPACE:{namespace}:USER:{userId}:WALLET", action=2 (READ)</li><li><i>Returns</i>: wallet info</li></ul>
26706
+ * GET [/platform/public/namespaces/{namespace}/users/{userId}/wallets/{currencyCode}](api)
26707
+ *
26708
+ * Get a wallet by currency code.
26709
+ *
26710
+ * Returns: wallet info
26289
26711
  */
26290
26712
  this.getWalletByUserId = (userId, currencyCode) => {
26291
26713
  return this.newInstance().fetchNsUsersByUseridWalletsByCurrencycode(userId, currencyCode);
26292
26714
  };
26293
26715
  /**
26294
26716
  * get a map of wallet represented by its currency code
26717
+ * @internal
26295
26718
  */
26296
26719
  this.getWalletMap = async ({ userId, currencyCodes }) => {
26297
26720
  try {
@@ -26321,7 +26744,7 @@ class WalletApi {
26321
26744
  class ApiFactory {
26322
26745
  static userAuthorization(config, options, refreshToken, namespace, overrides) {
26323
26746
  const conf = ApiFactory.mergedConfigs(config, overrides);
26324
- return new UserAuthorization(conf, namespace, false, {
26747
+ return new UserAuthorizationApi(conf, namespace, false, {
26325
26748
  clientId: options.clientId,
26326
26749
  redirectURI: options.redirectURI,
26327
26750
  baseURL: options.baseURL,
@@ -26479,10 +26902,104 @@ const injectErrorInterceptors = (baseUrl, onUserEligibilityChange, onError) => {
26479
26902
  });
26480
26903
  };
26481
26904
 
26482
- 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};
26905
+ /*
26906
+ * Copyright (c) 2023 AccelByte Inc. All Rights Reserved
26907
+ * This is licensed software from AccelByte Inc, for limitations
26908
+ * and restrictions contact your company contract manager.
26909
+ */
26910
+ var BasicVersion = {
26911
+ title: 'basic',
26912
+ name: 'justice-basic-service',
26913
+ version: '2.6.0',
26914
+ buildDate: '2023-02-22T00:53:23.199Z'
26915
+ };
26483
26916
 
26484
26917
  /*
26485
- * Copyright (c) 2022 AccelByte Inc. All Rights Reserved
26918
+ * Copyright (c) 2023 AccelByte Inc. All Rights Reserved
26919
+ * This is licensed software from AccelByte Inc, for limitations
26920
+ * and restrictions contact your company contract manager.
26921
+ */
26922
+ var BuildinfoVersion = {
26923
+ title: 'buildinfo',
26924
+ name: 'justice-buildinfo-service',
26925
+ version: '3.28.2',
26926
+ buildDate: '2023-02-22T00:53:23.199Z'
26927
+ };
26928
+
26929
+ /*
26930
+ * Copyright (c) 2023 AccelByte Inc. All Rights Reserved
26931
+ * This is licensed software from AccelByte Inc, for limitations
26932
+ * and restrictions contact your company contract manager.
26933
+ */
26934
+ var EventVersion = {
26935
+ title: 'event',
26936
+ name: 'justice-event-log-service',
26937
+ version: undefined,
26938
+ buildDate: '2023-02-22T00:53:23.199Z'
26939
+ };
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 GdprVersion = {
26947
+ title: 'gdpr',
26948
+ name: 'justice-gdpr-service',
26949
+ version: '1.19.1',
26950
+ buildDate: '2023-02-22T00:53:23.199Z'
26951
+ };
26952
+
26953
+ /*
26954
+ * Copyright (c) 2023 AccelByte Inc. All Rights Reserved
26955
+ * This is licensed software from AccelByte Inc, for limitations
26956
+ * and restrictions contact your company contract manager.
26957
+ */
26958
+ var IamVersion = {
26959
+ title: 'iam',
26960
+ name: 'justice-iam-service',
26961
+ version: '5.28.0',
26962
+ buildDate: '2023-02-22T00:53:23.199Z'
26963
+ };
26964
+
26965
+ /*
26966
+ * Copyright (c) 2023 AccelByte Inc. All Rights Reserved
26967
+ * This is licensed software from AccelByte Inc, for limitations
26968
+ * and restrictions contact your company contract manager.
26969
+ */
26970
+ var LegalVersion = {
26971
+ title: 'legal',
26972
+ name: 'justice-legal-service',
26973
+ version: '1.27.0',
26974
+ buildDate: '2023-02-22T00:53:23.199Z'
26975
+ };
26976
+
26977
+ /*
26978
+ * Copyright (c) 2023 AccelByte Inc. All Rights Reserved
26979
+ * This is licensed software from AccelByte Inc, for limitations
26980
+ * and restrictions contact your company contract manager.
26981
+ */
26982
+ var OdinConfigVersion = {
26983
+ title: 'odin-config',
26984
+ name: 'config-service-app',
26985
+ version: 'dev',
26986
+ buildDate: '2023-02-22T00:53:23.199Z'
26987
+ };
26988
+
26989
+ /*
26990
+ * Copyright (c) 2023 AccelByte Inc. All Rights Reserved
26991
+ * This is licensed software from AccelByte Inc, for limitations
26992
+ * and restrictions contact your company contract manager.
26993
+ */
26994
+ var PlatformVersion = {
26995
+ title: 'platform',
26996
+ name: 'justice-platform-service',
26997
+ version: '4.24.0',
26998
+ buildDate: '2023-02-22T00:53:23.199Z'
26999
+ };
27000
+
27001
+ /*
27002
+ * Copyright (c) 2022-2023 AccelByte Inc. All Rights Reserved
26486
27003
  * This is licensed software from AccelByte Inc, for limitations
26487
27004
  * and restrictions contact your company contract manager.
26488
27005
  */
@@ -26528,7 +27045,6 @@ class AccelbyteSDKFactory {
26528
27045
  }
26529
27046
  };
26530
27047
  this.options = {
26531
- loglevel: 'INFO',
26532
27048
  cache: false,
26533
27049
  ...options
26534
27050
  };
@@ -26543,9 +27059,7 @@ class AccelbyteSDKFactory {
26543
27059
  ...config?.headers
26544
27060
  }
26545
27061
  };
26546
- if (options.loglevel === exports.LogLevel.DEBUG) {
26547
- Logger.info('Accelbyte-SDK initialized with config', this.config);
26548
- }
27062
+ // Logger.info('Accelbyte-SDK initialized with config', this.config)
26549
27063
  }
26550
27064
  init() {
26551
27065
  const { baseURL, clientId } = this.options;
@@ -26559,18 +27073,21 @@ class AccelbyteSDKFactory {
26559
27073
  OAuth: (overrides) => ApiFactory.oauthApi(this.config, this.options, this.options.namespace, this.override(overrides)),
26560
27074
  InputValidation: (overrides) => ApiFactory.inputValidationApi(this.config, this.options.namespace, this.override(overrides)),
26561
27075
  ThirdPartyCredential: (overrides) => ApiFactory.thirdPartyCredentialApi(this.config, this.options.namespace, this.override(overrides)),
26562
- TwoFA: (overrides) => ApiFactory.twoFA(this.config, this.options.namespace, this.override(overrides))
27076
+ TwoFA: (overrides) => ApiFactory.twoFA(this.config, this.options.namespace, this.override(overrides)),
27077
+ version: IamVersion
26563
27078
  },
26564
27079
  BuildInfo: {
26565
27080
  Downloader: (overrides) => ApiFactory.downloaderApi(this.config, this.options.namespace, this.override(overrides)),
26566
27081
  Caching: (overrides) => ApiFactory.cachingApi(this.config, this.options.namespace, this.override(overrides)),
26567
- DLC: (overrides) => ApiFactory.dlcApi(this.config, this.options.namespace, this.override(overrides))
27082
+ DLC: (overrides) => ApiFactory.dlcApi(this.config, this.options.namespace, this.override(overrides)),
27083
+ version: BuildinfoVersion
26568
27084
  },
26569
27085
  Basic: {
26570
27086
  Misc: (overrides) => ApiFactory.miscApi(this.config, this.options.namespace, this.override(overrides)),
26571
27087
  UserProfile: (overrides) => ApiFactory.userProfileApi(this.config, this.options.namespace, this.override(overrides)),
26572
27088
  FileUpload: (overrides) => ApiFactory.fileUploadApi(this.config, this.options.namespace, this.override(overrides)),
26573
- Namespace: (overrides) => ApiFactory.namespaceApi(this.config, this.options.namespace, this.override(overrides))
27089
+ Namespace: (overrides) => ApiFactory.namespaceApi(this.config, this.options.namespace, this.override(overrides)),
27090
+ version: BasicVersion
26574
27091
  },
26575
27092
  Platform: {
26576
27093
  Currency: (overrides) => ApiFactory.currencyApi(this.config, this.options.namespace, this.override(overrides)),
@@ -26580,35 +27097,54 @@ class AccelbyteSDKFactory {
26580
27097
  Order: (overrides) => ApiFactory.orderApi(this.config, this.options.namespace, this.override(overrides)),
26581
27098
  Payment: (overrides) => ApiFactory.paymentApi(this.config, this.options.namespace, this.override(overrides)),
26582
27099
  Subscription: (overrides) => ApiFactory.subscriptionApi(this.config, this.options.namespace, this.override(overrides)),
26583
- Wallet: (overrides) => ApiFactory.walletApi(this.config, this.options.namespace, this.override(overrides))
27100
+ Wallet: (overrides) => ApiFactory.walletApi(this.config, this.options.namespace, this.override(overrides)),
27101
+ version: PlatformVersion
26584
27102
  },
26585
27103
  Legal: {
26586
27104
  Eligibilities: (overrides) => ApiFactory.eligibillitiesApi(this.config, this.options.namespace, this.override(overrides)),
26587
27105
  Agreement: (overrides) => ApiFactory.agreementApi(this.config, this.options.namespace, this.override(overrides)),
26588
27106
  Policies: (overrides) => ApiFactory.policiesApi(this.config, this.options.namespace, this.override(overrides)),
26589
- LocalizedPolicyVersions: (overrides) => ApiFactory.localizedPolicyVersionsApi(this.config, this.options.namespace, this.override(overrides))
27107
+ LocalizedPolicyVersions: (overrides) => ApiFactory.localizedPolicyVersionsApi(this.config, this.options.namespace, this.override(overrides)),
27108
+ version: LegalVersion
26590
27109
  },
26591
27110
  GDPR: {
26592
27111
  DataDeletion: (overrides) => ApiFactory.dataDeletionApi(this.config, this.options.namespace, this.override(overrides)),
26593
- DataRetrieval: (overrides) => ApiFactory.dataRetrievalApi(this.config, this.options.namespace, this.override(overrides))
27112
+ DataRetrieval: (overrides) => ApiFactory.dataRetrievalApi(this.config, this.options.namespace, this.override(overrides)),
27113
+ version: GdprVersion
26594
27114
  },
26595
27115
  Event: {
26596
- Event: (overrides) => ApiFactory.eventApi(this.config, this.options.namespace, this.override(overrides))
27116
+ Event: (overrides) => ApiFactory.eventApi(this.config, this.options.namespace, this.override(overrides)),
27117
+ version: EventVersion
26597
27118
  },
26598
27119
  AccelbyteConfig: {
26599
- PublicTemplate: (overrides) => ApiFactory.publicTemplateApi(this.config, this.options.namespace, this.override(overrides))
27120
+ PublicTemplate: (overrides) => ApiFactory.publicTemplateApi(this.config, this.options.namespace, this.override(overrides)),
27121
+ version: OdinConfigVersion
27122
+ },
27123
+ version: () => {
27124
+ console.log('IamVersion: ', IamVersion.version);
27125
+ console.log('BuildinfoVersion: ', BuildinfoVersion.version);
27126
+ console.log('BasicVersion: ', BasicVersion.version);
27127
+ console.log('PlatformVersion: ', PlatformVersion.version);
27128
+ console.log('LegalVersion: ', LegalVersion.version);
27129
+ console.log('GdprVersion: ', GdprVersion.version);
27130
+ console.log('EventVersion: ', EventVersion.version);
27131
+ const axiosInstance = Network.create(this.config);
27132
+ axiosInstance
27133
+ .get('https://development.accelbyte.io/iam/version')
27134
+ .then(res => {
27135
+ console.log('-- axiosInstance res', res.data);
27136
+ console.log('-- current ver', IamVersion);
27137
+ })
27138
+ .catch(err => {
27139
+ console.log('-- axiosInstance err', err);
27140
+ });
26600
27141
  }
26601
27142
  };
26602
27143
  }
26603
27144
  }
26604
27145
  const sdkInit = ({ options, config, onEvents }) => {
26605
- if (options.loglevel === exports.LogLevel.DEBUG) {
26606
- Logger.info('Accelbyte-SDK instantiated:', options);
26607
- }
27146
+ Logger.info('Accelbyte-SDK instantiated:', options);
26608
27147
  const sdkFactory = new AccelbyteSDKFactory(options, config, onEvents);
26609
- if (options.loglevel === exports.LogLevel.DEBUG) {
26610
- Logger.info(`Accelbyte-SDK version: ${buildInfo.version} \nBuild: ${buildInfo.build} \nTimestamp: ${new Date(buildInfo.timestamp)}`);
26611
- }
26612
27148
  return sdkFactory.init();
26613
27149
  };
26614
27150
  // ts-prune-ignore-next
@@ -39408,7 +39944,7 @@ const PageConfig = mod.object({
39408
39944
  });
39409
39945
 
39410
39946
  /*
39411
- * Copyright (c) 2022 AccelByte Inc. All Rights Reserved
39947
+ * Copyright (c) 2022-2023 AccelByte Inc. All Rights Reserved
39412
39948
  * This is licensed software from AccelByte Inc, for limitations
39413
39949
  * and restrictions contact your company contract manager.
39414
39950
  */
@@ -39956,6 +40492,7 @@ exports.DeletionData = DeletionData;
39956
40492
  exports.DeletionStatus = DeletionStatus;
39957
40493
  exports.DependencyObject = DependencyObject;
39958
40494
  exports.Description = Description;
40495
+ exports.DesktopChecker = DesktopChecker;
39959
40496
  exports.DetailedWalletTransactionInfo = DetailedWalletTransactionInfo;
39960
40497
  exports.DetailedWalletTransactionPagingSlicedResult = DetailedWalletTransactionPagingSlicedResult;
39961
40498
  exports.DeviceBanRequestV4 = DeviceBanRequestV4;
@@ -40540,7 +41077,7 @@ exports.UserActiveBanResponse = UserActiveBanResponse;
40540
41077
  exports.UserActiveBanResponseV3 = UserActiveBanResponseV3;
40541
41078
  exports.UserActiveBanResponseV4 = UserActiveBanResponseV4;
40542
41079
  exports.UserApi = UserApi;
40543
- exports.UserAuthorization = UserAuthorization;
41080
+ exports.UserAuthorizationApi = UserAuthorizationApi;
40544
41081
  exports.UserBan = UserBan;
40545
41082
  exports.UserBanRequest = UserBanRequest;
40546
41083
  exports.UserBanResponse = UserBanResponse;