@accelbyte/sdk 0.2.0-beta.16 → 0.2.0-beta.17

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.
@@ -6,11 +6,11 @@ var axios = require('axios');
6
6
  var qs = require('query-string');
7
7
  var zod = require('zod');
8
8
  var validator = require('@accelbyte/validator');
9
- var isEmpty = require('validator/lib/isEmpty');
9
+ var isEmpty = require('validator/lib/isEmpty.js');
10
10
  var cryptoJs = require('crypto-js');
11
11
  var platform = require('platform');
12
- var isURL = require('validator/lib/isURL');
13
- var isEqual = require('lodash/isEqual');
12
+ var isURL = require('validator/lib/isURL.js');
13
+ var isEqual = require('lodash/isEqual.js');
14
14
  var buffer = require('buffer');
15
15
 
16
16
  function _interopNamespaceDefault(e) {
@@ -1,5 +1,5 @@
1
1
  import { validateLength, validateForbiddenWords, ValidateRegexErrorType, validateRegex } from '@accelbyte/validator';
2
- import isEmpty from 'validator/lib/isEmpty';
2
+ import isEmpty from 'validator/lib/isEmpty.js';
3
3
  import { z } from 'zod';
4
4
 
5
5
  const ValidateableInputField = z.enum(['username', 'displayName', 'password', 'email']);
@@ -1,5 +1,5 @@
1
1
  import { UrlHelper } from '../../utils/UrlHelper.js';
2
- import isURL from 'validator/lib/isURL';
2
+ import isURL from 'validator/lib/isURL.js';
3
3
 
4
4
  class LegalHelper {
5
5
  static convertPoliciesToDisplayedPolicies(policies, namespace) {
@@ -1,4 +1,4 @@
1
- import isEqual from 'lodash/isEqual';
1
+ import isEqual from 'lodash/isEqual.js';
2
2
 
3
3
  var _a;
4
4
  class SdkCache {
@@ -1,5 +1,5 @@
1
1
  import { validateLength, validateForbiddenWords, ValidateRegexErrorType, validateRegex } from '@accelbyte/validator';
2
- import isEmpty from 'validator/lib/isEmpty';
2
+ import isEmpty from 'validator/lib/isEmpty.js';
3
3
  import { z } from 'zod';
4
4
 
5
5
  const ValidateableInputField = z.enum(['username', 'displayName', 'password', 'email']);
@@ -1,5 +1,5 @@
1
1
  import { UrlHelper } from '../../utils/UrlHelper.js';
2
- import isURL from 'validator/lib/isURL';
2
+ import isURL from 'validator/lib/isURL.js';
3
3
 
4
4
  class LegalHelper {
5
5
  static convertPoliciesToDisplayedPolicies(policies, namespace) {
@@ -1,4 +1,4 @@
1
- import isEqual from 'lodash/isEqual';
1
+ import isEqual from 'lodash/isEqual.js';
2
2
 
3
3
  var _a;
4
4
  class SdkCache {
@@ -11,7 +11,7 @@
11
11
  "link:stop": "yarn unlink @accelbyte/sdk && yarn install --force"
12
12
  },
13
13
  "dependencies": {
14
- "@accelbyte/sdk": "0.2.0-beta.5",
14
+ "@accelbyte/sdk": "0.2.0-beta.13",
15
15
  "@next/font": "13.0.7",
16
16
  "@types/node": "18.11.17",
17
17
  "@types/react": "18.0.26",
@@ -2,15 +2,15 @@
2
2
  # yarn lockfile v1
3
3
 
4
4
 
5
- "@accelbyte/sdk@0.2.0-beta.4":
6
- version "0.2.0-beta.4"
7
- resolved "https://registry.yarnpkg.com/@accelbyte/sdk/-/sdk-0.2.0-beta.4.tgz#0c0e3851e0cd27d74b49497f1f587f6e96ad09b9"
8
- integrity sha512-9jm93+ghZY5IjennavAXVUMf62+0dV530J9UThFxQJ2KigtQhD+VKioyf99UvymYlc4MZ9DpRHHit6k0v9cwBg==
5
+ "@accelbyte/sdk@0.2.0-beta.13":
6
+ version "0.2.0-beta.13"
7
+ resolved "https://registry.yarnpkg.com/@accelbyte/sdk/-/sdk-0.2.0-beta.13.tgz#3252713ca151f6609346bafd8134858337b4740e"
8
+ integrity sha512-1knFE+mqXNOpvhsOhx3TqxBGOZ7orxvqspvciBxPGpw4Zs7wGbC0u/dwxKfv72or36fu3sNS/ZwenWSGn6TP3A==
9
9
  dependencies:
10
+ "@accelbyte/validator" "0.2.0-beta.0"
10
11
  axios "0.27.2"
11
12
  buffer "6.0.3"
12
13
  crypto-js "4.1.1"
13
- lodash-core "4.17.19"
14
14
  nanoid "3.1.31"
15
15
  platform "1.3.6"
16
16
  query-string "7.1.1"
@@ -18,6 +18,22 @@
18
18
  validator "13.7.0"
19
19
  zod "3.17.3"
20
20
 
21
+ "@accelbyte/validator@0.2.0-beta.0":
22
+ version "0.2.0-beta.0"
23
+ resolved "https://registry.yarnpkg.com/@accelbyte/validator/-/validator-0.2.0-beta.0.tgz#c1bca175ef0da0139eedc9438182bd88c7112de4"
24
+ integrity sha512-JWADInWpK2dVmERvMpASnCp7cAhIQMrq2YZkqMN8LnSA0w9lAttK3Tkr5QlgvFoPqTZR81hZXgZwbKN10Hdz7w==
25
+ dependencies:
26
+ naughty-words "1.2.0"
27
+ xregexp "5.1.0"
28
+
29
+ "@babel/runtime-corejs3@^7.14.9":
30
+ version "7.21.0"
31
+ resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.21.0.tgz#6e4939d9d9789ff63e2dc58e88f13a3913a24eba"
32
+ integrity sha512-TDD4UJzos3JJtM+tHX+w2Uc+KWj7GV+VKKFdMVd2Rx8sdA19hcc3P3AHFYd5LVOw+pYuSd5lICC3gm52B6Rwxw==
33
+ dependencies:
34
+ core-js-pure "^3.25.1"
35
+ regenerator-runtime "^0.13.11"
36
+
21
37
  "@next/env@13.0.7":
22
38
  version "13.0.7"
23
39
  resolved "https://registry.yarnpkg.com/@next/env/-/env-13.0.7.tgz#7b6ccd9006d3fb57c369e3fb62b28e15324141e9"
@@ -174,6 +190,11 @@ combined-stream@^1.0.8:
174
190
  dependencies:
175
191
  delayed-stream "~1.0.0"
176
192
 
193
+ core-js-pure@^3.25.1:
194
+ version "3.28.0"
195
+ resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.28.0.tgz#4ef2888475b6c856ef6f5aeef8b4f618b76ad048"
196
+ integrity sha512-DSOVleA9/v3LNj/vFxAPfUHttKTzrB2RXhAPvR5TPXn4vrra3Z2ssytvRyt8eruJwAfwAiFADEbrjcRdcvPLQQ==
197
+
177
198
  crypto-js@4.1.1:
178
199
  version "4.1.1"
179
200
  resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.1.1.tgz#9e485bcf03521041bd85844786b83fb7619736cf"
@@ -223,11 +244,6 @@ ieee754@^1.2.1:
223
244
  resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
224
245
  integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
225
246
 
226
- lodash-core@4.17.19:
227
- version "4.17.19"
228
- resolved "https://registry.yarnpkg.com/lodash-core/-/lodash-core-4.17.19.tgz#df745a9469e175af058fd8a4acab3199f0f5b908"
229
- integrity sha512-FpSbOooU9HcASpL7oJ/ZQGxR7oGzeqlVe1M/iAhnUMTk7eMJBkszS5tUPZCnRtNGPWe8ChswdByFTzW58iGQEQ==
230
-
231
247
  loose-envify@^1.1.0:
232
248
  version "1.4.0"
233
249
  resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
@@ -257,6 +273,11 @@ nanoid@^3.3.4:
257
273
  resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab"
258
274
  integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==
259
275
 
276
+ naughty-words@1.2.0:
277
+ version "1.2.0"
278
+ resolved "https://registry.yarnpkg.com/naughty-words/-/naughty-words-1.2.0.tgz#255f60bad94b430fb1216d05a3f4eec3e1061d64"
279
+ integrity sha512-0iadX6fN+3NsfvIRtWmmpEX9VsoIQ6n9FwyIxmew9w5yzFNqMgs/Ky0eAC/z5xXSHtqlVoByiovdROikwH9SXQ==
280
+
260
281
  next@13.0.7:
261
282
  version "13.0.7"
262
283
  resolved "https://registry.yarnpkg.com/next/-/next-13.0.7.tgz#f07a0cc3afefdb86fb6668048e910a2193e3c1e2"
@@ -326,6 +347,11 @@ react@18.2.0:
326
347
  dependencies:
327
348
  loose-envify "^1.1.0"
328
349
 
350
+ regenerator-runtime@^0.13.11:
351
+ version "0.13.11"
352
+ resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9"
353
+ integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==
354
+
329
355
  scheduler@^0.23.0:
330
356
  version "0.23.0"
331
357
  resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe"
@@ -375,6 +401,13 @@ validator@13.7.0:
375
401
  resolved "https://registry.yarnpkg.com/validator/-/validator-13.7.0.tgz#4f9658ba13ba8f3d82ee881d3516489ea85c0857"
376
402
  integrity sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==
377
403
 
404
+ xregexp@5.1.0:
405
+ version "5.1.0"
406
+ resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-5.1.0.tgz#c87e7ae5ffa5fdc520f898a467dcba02b0d391e9"
407
+ integrity sha512-PynwUWtXnSZr8tpQlDPMZfPTyv78EYuA4oI959ukxcQ0a9O/lvndLVKy5wpImzzA26eMxpZmnAXJYiQA13AtWA==
408
+ dependencies:
409
+ "@babel/runtime-corejs3" "^7.14.9"
410
+
378
411
  zod@3.17.3:
379
412
  version "3.17.3"
380
413
  resolved "https://registry.yarnpkg.com/zod/-/zod-3.17.3.tgz#86abbc670ff0063a4588d85a4dcc917d6e4af2ba"
@@ -0,0 +1,58 @@
1
+ /*
2
+ * Copyright (c) 2023 AccelByte Inc. All Rights Reserved
3
+ * This is licensed software from AccelByte Inc, for limitations
4
+ * and restrictions contact your company contract manager.
5
+ */
6
+
7
+ // @ts-check
8
+ const { Accelbyte } = require('@accelbyte/sdk')
9
+ const { config } = require('dotenv')
10
+
11
+ config()
12
+
13
+ const SDK_CONFIG = {
14
+ baseURL: 'https://demo.accelbyte.io',
15
+ clientId: '77f88506b6174c3ea4d925f5b4096ce8',
16
+ namespace: 'accelbyte',
17
+ redirectURI: 'http://localhost:3030'
18
+ }
19
+
20
+ const sdk = Accelbyte.SDK({
21
+ options: SDK_CONFIG
22
+ })
23
+
24
+ // Sample SDK calls:
25
+ main()
26
+
27
+ async function main() {
28
+ console.info(SDK_CONFIG)
29
+
30
+ console.log(sdk.IAM.UserAuthorization().createLoginURL())
31
+
32
+ const listDiscoveryConfigs = await sdk.AccelbyteConfig.PublicTemplate().getDiscoveryTemplateConfigs()
33
+
34
+ console.info('List of discovery configs:')
35
+ console.info(JSON.stringify(listDiscoveryConfigs))
36
+
37
+ const listOfCurrencies = await sdk.Platform.Currency().getCurrencies()
38
+ const listOfItems = await sdk.Platform.Item().fetchItemsByCriteria({})
39
+
40
+ console.info('List of namespaces:')
41
+ console.info(JSON.stringify(listOfCurrencies))
42
+
43
+ console.info('List of items:')
44
+ console.info(JSON.stringify(listOfItems))
45
+
46
+ // These require authentication and we can't use it right away.
47
+ // Ensure that you have logged in (have cookies) or pass the access token to the `Authorization` header.
48
+ const listOfNamespaces = sdk.Basic.Namespace({
49
+ config: {
50
+ headers: {
51
+ Authorization: `Bearer <replace-this-with-access-token>`
52
+ }
53
+ }
54
+ }).getNamespaces()
55
+
56
+ console.info('List of namespaces:')
57
+ console.info(JSON.stringify(listOfNamespaces))
58
+ }
@@ -3,7 +3,8 @@
3
3
  "version": "1.0.0",
4
4
  "license": "MIT",
5
5
  "scripts": {
6
- "test": "node index.mjs",
6
+ "test": "node index.js",
7
+ "test:mjs": "node --es-module-specifier-resolution=node index.mjs",
7
8
  "link:start": "yarn link @accelbyte/sdk",
8
9
  "link:stop": "yarn unlink @accelbyte/sdk && yarn install --force"
9
10
  },
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "sdk-demo-node",
2
+ "name": "sdk-demo-vite",
3
3
  "private": true,
4
4
  "version": "0.0.0",
5
5
  "type": "module",
@@ -11,7 +11,7 @@
11
11
  "link:stop": "yarn unlink @accelbyte/sdk && yarn install --force"
12
12
  },
13
13
  "dependencies": {
14
- "@accelbyte/sdk": "0.2.0-beta.5",
14
+ "@accelbyte/sdk": "0.2.0-beta.13",
15
15
  "dotenv": "16.0.3",
16
16
  "react": "18.2.0",
17
17
  "react-dom": "18.2.0"
@@ -2,15 +2,15 @@
2
2
  # yarn lockfile v1
3
3
 
4
4
 
5
- "@accelbyte/sdk@0.2.0-beta.4":
6
- version "0.2.0-beta.4"
7
- resolved "https://registry.yarnpkg.com/@accelbyte/sdk/-/sdk-0.2.0-beta.4.tgz#0c0e3851e0cd27d74b49497f1f587f6e96ad09b9"
8
- integrity sha512-9jm93+ghZY5IjennavAXVUMf62+0dV530J9UThFxQJ2KigtQhD+VKioyf99UvymYlc4MZ9DpRHHit6k0v9cwBg==
5
+ "@accelbyte/sdk@0.2.0-beta.13":
6
+ version "0.2.0-beta.13"
7
+ resolved "https://registry.yarnpkg.com/@accelbyte/sdk/-/sdk-0.2.0-beta.13.tgz#3252713ca151f6609346bafd8134858337b4740e"
8
+ integrity sha512-1knFE+mqXNOpvhsOhx3TqxBGOZ7orxvqspvciBxPGpw4Zs7wGbC0u/dwxKfv72or36fu3sNS/ZwenWSGn6TP3A==
9
9
  dependencies:
10
+ "@accelbyte/validator" "0.2.0-beta.0"
10
11
  axios "0.27.2"
11
12
  buffer "6.0.3"
12
13
  crypto-js "4.1.1"
13
- lodash-core "4.17.19"
14
14
  nanoid "3.1.31"
15
15
  platform "1.3.6"
16
16
  query-string "7.1.1"
@@ -18,6 +18,14 @@
18
18
  validator "13.7.0"
19
19
  zod "3.17.3"
20
20
 
21
+ "@accelbyte/validator@0.2.0-beta.0":
22
+ version "0.2.0-beta.0"
23
+ resolved "https://registry.yarnpkg.com/@accelbyte/validator/-/validator-0.2.0-beta.0.tgz#c1bca175ef0da0139eedc9438182bd88c7112de4"
24
+ integrity sha512-JWADInWpK2dVmERvMpASnCp7cAhIQMrq2YZkqMN8LnSA0w9lAttK3Tkr5QlgvFoPqTZR81hZXgZwbKN10Hdz7w==
25
+ dependencies:
26
+ naughty-words "1.2.0"
27
+ xregexp "5.1.0"
28
+
21
29
  "@ampproject/remapping@^2.1.0":
22
30
  version "2.2.0"
23
31
  resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d"
@@ -190,6 +198,14 @@
190
198
  dependencies:
191
199
  "@babel/helper-plugin-utils" "^7.19.0"
192
200
 
201
+ "@babel/runtime-corejs3@^7.14.9":
202
+ version "7.21.0"
203
+ resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.21.0.tgz#6e4939d9d9789ff63e2dc58e88f13a3913a24eba"
204
+ integrity sha512-TDD4UJzos3JJtM+tHX+w2Uc+KWj7GV+VKKFdMVd2Rx8sdA19hcc3P3AHFYd5LVOw+pYuSd5lICC3gm52B6Rwxw==
205
+ dependencies:
206
+ core-js-pure "^3.25.1"
207
+ regenerator-runtime "^0.13.11"
208
+
193
209
  "@babel/template@^7.18.10":
194
210
  version "7.18.10"
195
211
  resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71"
@@ -379,14 +395,14 @@
379
395
  resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf"
380
396
  integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==
381
397
 
382
- "@types/react-dom@^18.0.9":
398
+ "@types/react-dom@18.0.9":
383
399
  version "18.0.9"
384
400
  resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.0.9.tgz#ffee5e4bfc2a2f8774b15496474f8e7fe8d0b504"
385
401
  integrity sha512-qnVvHxASt/H7i+XG1U1xMiY5t+IHcPGUK7TDMDzom08xa7e86eCeKOiLZezwCKVxJn6NEiiy2ekgX8aQssjIKg==
386
402
  dependencies:
387
403
  "@types/react" "*"
388
404
 
389
- "@types/react@*", "@types/react@^18.0.26":
405
+ "@types/react@*", "@types/react@18.0.26":
390
406
  version "18.0.26"
391
407
  resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.26.tgz#8ad59fc01fef8eaf5c74f4ea392621749f0b7917"
392
408
  integrity sha512-hCR3PJQsAIXyxhTNSiDFY//LhnMZWpNNr5etoCqx/iUfGc5gXWtQR2Phl908jVR6uPXacojQWTg4qRpkxTuGug==
@@ -400,7 +416,7 @@
400
416
  resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39"
401
417
  integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==
402
418
 
403
- "@vitejs/plugin-react@^3.0.0":
419
+ "@vitejs/plugin-react@3.0.0":
404
420
  version "3.0.0"
405
421
  resolved "https://registry.yarnpkg.com/@vitejs/plugin-react/-/plugin-react-3.0.0.tgz#f36ee1b2ce958dd11ac63fdf746a3b27b0d258ed"
406
422
  integrity sha512-1mvyPc0xYW5G8CHQvJIJXLoMjl5Ct3q2g5Y2s6Ccfgwm45y48LBvsla7az+GkkAtYikWQ4Lxqcsq5RHLcZgtNQ==
@@ -492,6 +508,11 @@ convert-source-map@^1.7.0:
492
508
  resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f"
493
509
  integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==
494
510
 
511
+ core-js-pure@^3.25.1:
512
+ version "3.28.0"
513
+ resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.28.0.tgz#4ef2888475b6c856ef6f5aeef8b4f618b76ad048"
514
+ integrity sha512-DSOVleA9/v3LNj/vFxAPfUHttKTzrB2RXhAPvR5TPXn4vrra3Z2ssytvRyt8eruJwAfwAiFADEbrjcRdcvPLQQ==
515
+
495
516
  crypto-js@4.1.1:
496
517
  version "4.1.1"
497
518
  resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.1.1.tgz#9e485bcf03521041bd85844786b83fb7619736cf"
@@ -645,11 +666,6 @@ json5@^2.2.1:
645
666
  resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.2.tgz#64471c5bdcc564c18f7c1d4df2e2297f2457c5ab"
646
667
  integrity sha512-46Tk9JiOL2z7ytNQWFLpj99RZkVgeHf87yGQKsIkaPz1qSH9UczKH1rO7K3wgRselo0tYMUNfecYpm/p1vC7tQ==
647
668
 
648
- lodash-core@4.17.19:
649
- version "4.17.19"
650
- resolved "https://registry.yarnpkg.com/lodash-core/-/lodash-core-4.17.19.tgz#df745a9469e175af058fd8a4acab3199f0f5b908"
651
- integrity sha512-FpSbOooU9HcASpL7oJ/ZQGxR7oGzeqlVe1M/iAhnUMTk7eMJBkszS5tUPZCnRtNGPWe8ChswdByFTzW58iGQEQ==
652
-
653
669
  loose-envify@^1.1.0:
654
670
  version "1.4.0"
655
671
  resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
@@ -691,6 +707,11 @@ nanoid@^3.3.4:
691
707
  resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab"
692
708
  integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==
693
709
 
710
+ naughty-words@1.2.0:
711
+ version "1.2.0"
712
+ resolved "https://registry.yarnpkg.com/naughty-words/-/naughty-words-1.2.0.tgz#255f60bad94b430fb1216d05a3f4eec3e1061d64"
713
+ integrity sha512-0iadX6fN+3NsfvIRtWmmpEX9VsoIQ6n9FwyIxmew9w5yzFNqMgs/Ky0eAC/z5xXSHtqlVoByiovdROikwH9SXQ==
714
+
694
715
  node-releases@^2.0.6:
695
716
  version "2.0.8"
696
717
  resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.8.tgz#0f349cdc8fcfa39a92ac0be9bc48b7706292b9ae"
@@ -711,10 +732,10 @@ platform@1.3.6:
711
732
  resolved "https://registry.yarnpkg.com/platform/-/platform-1.3.6.tgz#48b4ce983164b209c2d45a107adb31f473a6e7a7"
712
733
  integrity sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==
713
734
 
714
- postcss@^8.4.20:
715
- version "8.4.20"
716
- resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.20.tgz#64c52f509644cecad8567e949f4081d98349dc56"
717
- integrity sha512-6Q04AXR1212bXr5fh03u8aAwbLxAQNGQ/Q1LNa0VfOI06ZAlhPHtQvE4OIdpj4kLThXilalPnmDSOD65DcHt+g==
735
+ postcss@^8.4.19:
736
+ version "8.4.21"
737
+ resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.21.tgz#c639b719a57efc3187b13a1d765675485f4134f4"
738
+ integrity sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==
718
739
  dependencies:
719
740
  nanoid "^3.3.4"
720
741
  picocolors "^1.0.0"
@@ -730,7 +751,7 @@ query-string@7.1.1:
730
751
  split-on-first "^1.0.0"
731
752
  strict-uri-encode "^2.0.0"
732
753
 
733
- react-dom@^18.2.0:
754
+ react-dom@18.2.0:
734
755
  version "18.2.0"
735
756
  resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d"
736
757
  integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==
@@ -743,13 +764,18 @@ react-refresh@^0.14.0:
743
764
  resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.0.tgz#4e02825378a5f227079554d4284889354e5f553e"
744
765
  integrity sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==
745
766
 
746
- react@^18.2.0:
767
+ react@18.2.0:
747
768
  version "18.2.0"
748
769
  resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5"
749
770
  integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==
750
771
  dependencies:
751
772
  loose-envify "^1.1.0"
752
773
 
774
+ regenerator-runtime@^0.13.11:
775
+ version "0.13.11"
776
+ resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9"
777
+ integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==
778
+
753
779
  resolve@^1.22.1:
754
780
  version "1.22.1"
755
781
  resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177"
@@ -810,10 +836,10 @@ to-fast-properties@^2.0.0:
810
836
  resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e"
811
837
  integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==
812
838
 
813
- typescript@^4.9.3:
814
- version "4.9.4"
815
- resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.4.tgz#a2a3d2756c079abda241d75f149df9d561091e78"
816
- integrity sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==
839
+ typescript@4.9.3:
840
+ version "4.9.3"
841
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.3.tgz#3aea307c1746b8c384435d8ac36b8a2e580d85db"
842
+ integrity sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==
817
843
 
818
844
  update-browserslist-db@^1.0.9:
819
845
  version "1.0.10"
@@ -833,18 +859,25 @@ validator@13.7.0:
833
859
  resolved "https://registry.yarnpkg.com/validator/-/validator-13.7.0.tgz#4f9658ba13ba8f3d82ee881d3516489ea85c0857"
834
860
  integrity sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==
835
861
 
836
- vite@^4.0.0:
837
- version "4.0.2"
838
- resolved "https://registry.yarnpkg.com/vite/-/vite-4.0.2.tgz#909beb07995048fe5a83b35b5e827d79627457c4"
839
- integrity sha512-QJaY3R+tFlTagH0exVqbgkkw45B+/bXVBzF2ZD1KB5Z8RiAoiKo60vSUf6/r4c2Vh9jfGBKM4oBI9b4/1ZJYng==
862
+ vite@4.0.0:
863
+ version "4.0.0"
864
+ resolved "https://registry.yarnpkg.com/vite/-/vite-4.0.0.tgz#b81b88349a06b2faaa53ae14cf96c942548e3454"
865
+ integrity sha512-ynad+4kYs8Jcnn8J7SacS9vAbk7eMy0xWg6E7bAhS1s79TK+D7tVFGXVZ55S7RNLRROU1rxoKlvZ/qjaB41DGA==
840
866
  dependencies:
841
867
  esbuild "^0.16.3"
842
- postcss "^8.4.20"
868
+ postcss "^8.4.19"
843
869
  resolve "^1.22.1"
844
870
  rollup "^3.7.0"
845
871
  optionalDependencies:
846
872
  fsevents "~2.3.2"
847
873
 
874
+ xregexp@5.1.0:
875
+ version "5.1.0"
876
+ resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-5.1.0.tgz#c87e7ae5ffa5fdc520f898a467dcba02b0d391e9"
877
+ integrity sha512-PynwUWtXnSZr8tpQlDPMZfPTyv78EYuA4oI959ukxcQ0a9O/lvndLVKy5wpImzzA26eMxpZmnAXJYiQA13AtWA==
878
+ dependencies:
879
+ "@babel/runtime-corejs3" "^7.14.9"
880
+
848
881
  zod@3.17.3:
849
882
  version "3.17.3"
850
883
  resolved "https://registry.yarnpkg.com/zod/-/zod-3.17.3.tgz#86abbc670ff0063a4588d85a4dcc917d6e4af2ba"
package/package.json CHANGED
@@ -1,32 +1,34 @@
1
1
  {
2
2
  "name": "@accelbyte/sdk",
3
- "version": "0.2.0-beta.16",
3
+ "version": "0.2.0-beta.17",
4
4
  "author": "AccelByte Inc",
5
5
  "license": "AccelByte License",
6
- "main": "./dist/cjs/node/index.js",
6
+ "main": "./dist/cjs/node/index.cjs",
7
7
  "types": "./dist/index.d.ts",
8
8
  "type": "module",
9
9
  "exports": {
10
10
  ".": {
11
11
  "types": "./dist/index.d.ts",
12
- "browser": "./dist/es/browser/index.browser.js",
13
- "default": {
12
+ "node": {
14
13
  "import": "./dist/es/node/index.node.js",
15
- "default": "./dist/cjs/node/index.js"
16
- }
14
+ "default": "./dist/cjs/node/index.cjs"
15
+ },
16
+ "default": "./dist/es/browser/index.browser.js"
17
17
  },
18
18
  "./package.json": "./package.json"
19
19
  },
20
20
  "dependencies": {
21
- "@accelbyte/validator": "0.2.0-beta.0",
21
+ "@accelbyte/validator": "0.2.0-beta.2",
22
22
  "axios": "0.27.2",
23
23
  "buffer": "6.0.3",
24
24
  "crypto-js": "4.1.1",
25
+ "lodash": "4.17.21",
25
26
  "nanoid": "3.1.31",
26
27
  "platform": "1.3.6",
27
28
  "query-string": "7.1.1",
28
29
  "uuid": "8.3.2",
29
30
  "validator": "13.7.0",
30
31
  "zod": "3.17.3"
31
- }
32
+ },
33
+ "sideEffects": false
32
34
  }
package/CHANGELOG.md DELETED
@@ -1,307 +0,0 @@
1
- ### 0.2.0-beta.16 - 2023-02-22
2
-
3
- - Add Runtime Checking for Service Versions
4
-
5
- ### 0.2.0-beta.13 - 2023-02-22
6
-
7
- - Enable tree-shaking for @accelbyte/sdk
8
- - Change TwoFA to TwoFAApi and InputValidationApi to InputValidationsApi
9
-
10
- ### 0.2.0-beta.10 - 2023-02-21
11
-
12
- - Fix build to 5a0f0c3
13
-
14
- ### 0.2.0-beta.6 - 2023-02-20
15
-
16
- - Add DesktopChecker to the entry index
17
-
18
- ### 0.2.0-beta.5 - 2023-02-19
19
-
20
- - Updated documentation
21
-
22
- ### 0.2.0-beta.4 - 2023-02-17
23
-
24
- - Updated comments replacing all markups with markdowns
25
-
26
- ### 0.2.0-beta.4 - 2023-02-16
27
-
28
- - Updated Readme
29
-
30
- ### 0.2.0-beta.2 - 2023-02-16
31
-
32
- - Further refactor SDK to use `interface` to prevent auto-expansion of types in Visual Studio Code
33
-
34
- ### 0.2.0-beta.1 - 2023-02-15
35
-
36
- - Release Web SDK as a Beta Version
37
-
38
- ### 0.1.1-alpha.63 - 2023-02-15
39
-
40
- - Update codegen to emit `interface` instead of `type` when inferring Zod type
41
-
42
- ### 0.1.1-alpha.62 - 2023-02-08
43
-
44
- - Allow simplification when passing configs to widgetOptions in SdkWidget
45
-
46
- ### 0.1.1-alpha.61 - 2023-02-07
47
-
48
- - OS-8668 fixing check EligibleUser dateOfBirth is now could be undefined
49
-
50
- ### 0.1.1-alpha.60 - 2023-02-06
51
-
52
- - Fix build for Windows
53
- - Create missing config types and move configs from private package
54
-
55
- ### 0.1.1-alpha.59 - 2023-02-01
56
-
57
- - Move example SDK and Widgets usages to the SDK and Widgets folder
58
- - Expose passing data config from SDK to Widget
59
-
60
- ### 0.1.1-alpha.58 - 2023-01-30
61
-
62
- - Bump dependencies versions for security patches
63
-
64
- ### 0.1.1-alpha.57 - 2023-01-24
65
-
66
- - Don't use ESM-only build yet for validator
67
-
68
- ### 0.1.1-alpha.56 - 2023-01-23
69
-
70
- - Allow building SDK without requiring validator to be built, fix browser bundle, bump dependencies
71
-
72
- ### 0.1.1-alpha.55 - 2023-01-23
73
-
74
- - Fix generateLoginURL not working in Node.js because getRandomValues is not polyfilled
75
-
76
- ### 0.1.1-alpha.54 - 2023-01-12
77
-
78
- - Add `brandName` to DiscoveryConfigData
79
-
80
- ### 0.1.1-alpha.53 - 2023-01-11
81
-
82
- - Fixed od-shared dependency error
83
-
84
- ### 0.1.1-alpha.51 - 2023-01-06
85
-
86
- - Register feature flag for Login Web placed under Player Portal section
87
- - Add 3rd-party login config to hide/show it as the login option
88
- - Deprecate justice-js-common-utils
89
-
90
- ### 0.1.1-alpha.50 - 2023-01-04
91
-
92
- - Fix build error
93
-
94
- ### 0.1.1-alpha.49 - 2023-01-03
95
-
96
- - Update dependency versions
97
-
98
- ### 0.1.1-alpha.48 - 2022-12-27
99
-
100
- - Fix user is unable to activate 2fa with email due to missing `content-type: application/x-www-form-urlencoded`
101
-
102
- ### 0.1.1-alpha.47 - 2022-12-22
103
-
104
- - Fix wrong fields in package.json being deleted
105
-
106
- ### 0.1.1-alpha.46 - 2022-12-22
107
-
108
- - Make dependencies exist in SDK when publishing
109
-
110
- ### 0.1.1-alpha.45 - 2022-12-19
111
-
112
- - Update typings of IResponseError
113
- - Update conditional exports to support both Node and Browser environments
114
-
115
- ### 0.1.1-alpha.44 - 2022-12-09
116
-
117
- - Make CJS to always be built with browser: false and ESM with browser: true
118
-
119
- ### 0.1.1-alpha.43 - 2022-12-09
120
-
121
- - Fix missing types in package.json
122
-
123
- ### 0.1.1-alpha.42 - 2022-12-08
124
-
125
- - Remove peer dependencies
126
- - [Editor] Global Styles are automatically applied to all areas of Player Portal V2, Launcher V2 and other apps
127
-
128
- ### 0.1.1-alpha.40 - 2022-12-01
129
-
130
- - Fix build and publish process (2)
131
-
132
- ### 0.1.1-alpha.39 - 2022-12-01
133
-
134
- - [Dev][PP] Add account linking with one time code page
135
- - Fix build and publish process
136
-
137
- ### 0.1.1-alpha.38 - 2022-11-23
138
-
139
- - Prettify config files
140
- - [Dev][Legal app] Odin legal app not displaying list of game namespace legal document
141
-
142
- ### 0.1.1-alpha-37 - 2022-11-17
143
-
144
- - Fix `currentUserCanOrder` function returning `false` when `user` is `null`
145
-
146
- ### 0.1.1-alpha-36 - 2022-11-16
147
-
148
- - [DEV][STAGE][Login App][Registration] Published legal is not displayed on registration page if selected country doesn't have legal
149
- - Add vitest and tests to some of the API classes and utilities
150
-
151
- ### 0.1.1-alpha-35 - 2022-11-15
152
-
153
- - [Dev][PP][Launcher] App will crash when try to access upgrade headless account or Link to New Account registration form
154
- - Remove duplicate "exchangeAuthorizationCode" and "getFormattedValidation" methods and add `IamHelper.getAuthorizationCodeParams()`
155
-
156
- ### 0.1.1-alpha-34 - 2022-11-10
157
-
158
- - [WebSDK] Adjust cache overrides for certain API that need `cache: false`
159
-
160
- ### 0.1.1-alpha-33 - 2022-11-07
161
-
162
- - [WebSDK] WebSDK accepts cache argument at initialization
163
-
164
- ### 0.1.1-alpha-32 - 2022-11-02
165
-
166
- - Adding 2FA email method at password and security menu
167
- - Adding 2FA email method at 2FA verification page
168
-
169
- ### 0.1.1-alpha-31 - 2022-10-30
170
-
171
- - Removes isDesktopOption
172
- - Renames AccelbyteSDK apis from camelCase to TitleCase
173
- - Removes refreshToken from SDK Options
174
-
175
- ### 0.1.1-alpha-30 - 2022-10-13
176
-
177
- - [Dev][PP][Launcher] Validate IAM inputs using regex returned from backend
178
-
179
- ### 0.1.1-alpha-29 - 2022-10-11
180
-
181
- - [Dev][PP][Launcher] Update `justice-js-common-utils` to improve `generatePattern` logic in `InputValidationHelper`
182
-
183
- ### 0.1.1-alpha-28 - 2022-10-07
184
-
185
- - [Dev][PP][Launcher] Update `justice-js-common-utils` to improve `generatePattern` logic in `InputValidationHelper`
186
-
187
- ### 0.1.1-alpha.27 - 2022-10-05
188
-
189
- - Publish Web SDK
190
-
191
- ### 0.1.1-alpha.26 - 2022-10-05
192
-
193
- - [Dev][PP][Launcher][My Profile] Change email address stay at the same page after input valid verification code & new email address
194
- - [Dev][PP][Launcher] User must click accept button on legal pop up twice for closing it
195
-
196
- ### 0.1.1-alpha.25 - 2022-09-30
197
-
198
- - [Dev][PP][Launcher] Update `justice-js-common-utils` to improve `generatePattern` logic in `InputValidationHelper`
199
-
200
- ### 0.1.1-alpha.24 - 2022-09-29
201
-
202
- - fix list of linked account not changed after unlink account, set the cache false for getUserDistinctLinkedPlatform
203
-
204
- ### 0.1.1-alpha.23 - 2022-09-27
205
-
206
- - Split WebSDK to Admin and Public, Introduce Cache in WebSDK
207
- - [Dev][PP][My Account] Save Changes Button Shown as Reload Upon Finishing Register New Account Through Link New Account
208
-
209
- ### 0.1.1-alpha.22 - 2022-09-22
210
-
211
- - [STG][PP][Upgrade Account] There is no error message while inputting existing email.
212
-
213
- ### 0.1.1-alpha.21 - 2022-09-19
214
-
215
- - remove patches containing language patterns, WalletInfo definition, and OrderInfo definition
216
- - [WebSDK] Add Cache in WebSDK
217
- - [Editor][Improvement] Move the Social Links Configuration to General Settings
218
-
219
- ### 0.1.1-alpha.20 - 2022-09-16
220
-
221
- - Ecommerce AppState Refactor
222
- - Update Web SDK to the latest
223
-
224
- ### 0.1.1-alpha.19 - 2022-09-13
225
-
226
- - [Dev][WebSDK] Address warnings when building od-web-sdk
227
-
228
- ### 0.1.1-alpha.18 - 2022-09-14
229
-
230
- - [Dev][PP] User stuck on legal popup loading screen after successfully upgrade headless account
231
-
232
- ### 0.1.1-alpha.17 - 2022-09-07
233
-
234
- - [Dev][PP][Launcher] Fix always get 409 on upgrading headless account
235
-
236
- ### 0.1.1-alpha.16 - 2022-09-07
237
-
238
- - [Editor][Config Service] Ensure that all featureFlags are migrated to ppFeatureFlags/launcherFeatureFlags, and move experimental flags to discovery
239
-
240
- ### 0.1.1-alpha.15 - 2022-09-01
241
-
242
- - [DEV][PP][Feedback] show owned information of the item contained in option box (add new entitlement api)
243
-
244
- ### 0.1.1-alpha.14 - 2022-08-25
245
-
246
- - [PP][Account Linking] There is no success message when user successfully link their account
247
-
248
- ### 0.1.1-alpha.13 - 2022-08-24
249
-
250
- - [PP][Stores][OPTIONBOX] Implement store list page
251
- - [PP][Stores][OPTIONBOX] Implement detail optionbox page
252
- - [PP][Stores][OPTIONBOX] Claim item inside option
253
-
254
- ### 0.1.1-alpha.12 - 2022-08-22
255
-
256
- - [Dev][PP][Launcher] Add IAM validation for email in upgrade headless
257
- - [Dev][PP][Launcher] Add IAM validation for email in change email and link 3rd party to a new account
258
-
259
- ### 0.1.1-alpha.11 - 2022-08-19
260
-
261
- - Move account business logic to WebSdk
262
-
263
- ### 0.1.1-alpha.10 - 2022-08-15
264
-
265
- - [Dev][PP][Launcher] Legal checklist missing on 3rd party new account registration page
266
-
267
- ### 0.1.1-alpha.9 - 2022-08-12
268
-
269
- - [Dev][PP][Launcher] After purchase game, Buy Now button not changes into Play button or Go to Library button
270
- - [WebSDK] Refactor IAM business logic to the Web SDK
271
-
272
- ### 0.1.1-alpha.8 - 2022-08-09
273
-
274
- - Break getUnsignedPolicies function into multiple methods
275
-
276
- ### 0.1.1-alpha.7 - 2022-08-05
277
-
278
- - Simplify legal service business logic flow and move to Web SDK
279
-
280
- ### 0.1.1-alpha.6 - 2022-08-04
281
-
282
- - [Dev][Player Portal] Add a redirection page for user verification through link
283
- - Move out login flow logic out to Web SDK
284
-
285
- ### 0.1.1-alpha.5 - 2022-07-29
286
-
287
- - [Editor][PP][Launcher] Migrate Editor, PP and Launcher to the latest Config-Service endpoints
288
-
289
- ### 0.1.1-alpha.4 - 2022-07-27
290
-
291
- - Update the typings for `config.data` for Odin Config Web SDK
292
- - [Editor] App Id use dropdown select
293
-
294
- ### 0.1.1-alpha.3 - 2022-07-26
295
-
296
- - [WebSDK] Web SDK is updated with new config-service endpoints
297
-
298
- ### 0.1.1-alpha.2 - 2022-07-21
299
-
300
- - Apply Alternative themes
301
- - [Editor] Handle user access scenario
302
-
303
- ### 0.1.1-alpha.1 - 2022-07-14
304
-
305
- - compare patches with latest swaggers
306
- - [Technical] Audit and Remove unused NPM dependencies
307
- - [Technical] Clean up unused sdk-web-test directory