@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.
- package/CHANGELOG.md +24 -0
- package/README.md +5 -5
- package/dist/index.browser.es.js +1239 -703
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.d.ts +51885 -51681
- package/dist/index.node.es.js +1239 -703
- package/dist/index.node.es.js.map +1 -1
- package/dist/index.node.js +1240 -703
- package/dist/index.node.js.map +1 -1
- package/examples/next/README.md +1 -22
- package/examples/next/package.json +1 -1
- package/examples/next/yarn.lock +4 -4
- package/examples/node/index.mjs +30 -26
- package/examples/node/package.json +1 -1
- package/examples/node/yarn.lock +4 -4
- package/examples/vite/README.md +13 -0
- package/examples/vite/package.json +1 -1
- package/examples/vite/yarn.lock +4 -4
- package/package.json +1 -1
package/examples/next/README.md
CHANGED
|
@@ -10,25 +10,4 @@ npm run dev
|
|
|
10
10
|
yarn dev
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
|
|
16
|
-
|
|
17
|
-
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
|
|
18
|
-
|
|
19
|
-
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
|
|
20
|
-
|
|
21
|
-
## Learn More
|
|
22
|
-
|
|
23
|
-
To learn more about Next.js, take a look at the following resources:
|
|
24
|
-
|
|
25
|
-
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
|
26
|
-
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
|
27
|
-
|
|
28
|
-
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
|
|
29
|
-
|
|
30
|
-
## Deploy on Vercel
|
|
31
|
-
|
|
32
|
-
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
|
33
|
-
|
|
34
|
-
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
|
|
13
|
+
And open the url in your browser http://localhost:3000/
|
package/examples/next/yarn.lock
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
# yarn lockfile v1
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
"@accelbyte/sdk@0.
|
|
6
|
-
version "0.
|
|
7
|
-
resolved "https://registry.yarnpkg.com/@accelbyte/sdk/-/sdk-0.
|
|
8
|
-
integrity sha512-
|
|
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==
|
|
9
9
|
dependencies:
|
|
10
10
|
axios "0.27.2"
|
|
11
11
|
buffer "6.0.3"
|
package/examples/node/index.mjs
CHANGED
|
@@ -8,7 +8,8 @@ const SDK_CONFIG = {
|
|
|
8
8
|
baseURL: 'https://demo.accelbyte.io',
|
|
9
9
|
clientId: '77f88506b6174c3ea4d925f5b4096ce8',
|
|
10
10
|
namespace: 'accelbyte',
|
|
11
|
-
redirectURI: 'http://localhost:3030'
|
|
11
|
+
redirectURI: 'http://localhost:3030',
|
|
12
|
+
log: 'DEBUG'
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
const sdk = Accelbyte.SDK({
|
|
@@ -21,32 +22,35 @@ main()
|
|
|
21
22
|
async function main() {
|
|
22
23
|
console.info(SDK_CONFIG)
|
|
23
24
|
|
|
24
|
-
console.log(sdk.
|
|
25
|
-
|
|
26
|
-
const listDiscoveryConfigs = await sdk.AccelbyteConfig.PublicTemplate().getDiscoveryTemplateConfigs()
|
|
27
|
-
|
|
28
|
-
console.info('List of discovery configs:')
|
|
29
|
-
console.info(JSON.stringify(listDiscoveryConfigs))
|
|
25
|
+
console.log('-- sdk', sdk.version())
|
|
30
26
|
|
|
31
|
-
const listOfCurrencies = await sdk.Platform.Currency().getCurrencies()
|
|
32
|
-
const listOfItems = await sdk.Platform.Item().fetchItemsByCriteria({})
|
|
33
27
|
|
|
34
|
-
console.
|
|
35
|
-
console.info(JSON.stringify(listOfCurrencies))
|
|
36
|
-
|
|
37
|
-
console.info('List of items:')
|
|
38
|
-
console.info(JSON.stringify(listOfItems))
|
|
39
|
-
|
|
40
|
-
// These require authentication and we can't use it right away.
|
|
41
|
-
// Ensure that you have logged in (have cookies) or pass the access token to the `Authorization` header.
|
|
42
|
-
const listOfNamespaces = sdk.Basic.Namespace({
|
|
43
|
-
config: {
|
|
44
|
-
headers: {
|
|
45
|
-
Authorization: `Bearer <replace-this-with-access-token>`
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}).getNamespaces()
|
|
28
|
+
console.log(sdk.IAM.UserAuthorization().createLoginURL())
|
|
49
29
|
|
|
50
|
-
|
|
51
|
-
|
|
30
|
+
// const listDiscoveryConfigs = await sdk.AccelbyteConfig.PublicTemplate().getDiscoveryTemplateConfigs()
|
|
31
|
+
//
|
|
32
|
+
// console.info('List of discovery configs:')
|
|
33
|
+
// console.info(JSON.stringify(listDiscoveryConfigs))
|
|
34
|
+
//
|
|
35
|
+
// const listOfCurrencies = await sdk.Platform.Currency().getCurrencies()
|
|
36
|
+
// const listOfItems = await sdk.Platform.Item().fetchItemsByCriteria({})
|
|
37
|
+
//
|
|
38
|
+
// console.info('List of namespaces:')
|
|
39
|
+
// console.info(JSON.stringify(listOfCurrencies))
|
|
40
|
+
//
|
|
41
|
+
// console.info('List of items:')
|
|
42
|
+
// console.info(JSON.stringify(listOfItems))
|
|
43
|
+
//
|
|
44
|
+
// // These require authentication and we can't use it right away.
|
|
45
|
+
// // Ensure that you have logged in (have cookies) or pass the access token to the `Authorization` header.
|
|
46
|
+
// const listOfNamespaces = sdk.Basic.Namespace({
|
|
47
|
+
// config: {
|
|
48
|
+
// headers: {
|
|
49
|
+
// Authorization: `Bearer <replace-this-with-access-token>`
|
|
50
|
+
// }
|
|
51
|
+
// }
|
|
52
|
+
// }).getNamespaces()
|
|
53
|
+
//
|
|
54
|
+
// console.info('List of namespaces:')
|
|
55
|
+
// console.info(JSON.stringify(listOfNamespaces))
|
|
52
56
|
}
|
package/examples/node/yarn.lock
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
# yarn lockfile v1
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
"@accelbyte/sdk@0.
|
|
6
|
-
version "0.
|
|
7
|
-
resolved "https://registry.yarnpkg.com/@accelbyte/sdk/-/sdk-0.
|
|
8
|
-
integrity sha512-
|
|
5
|
+
"@accelbyte/sdk@0.2.0-beta.11":
|
|
6
|
+
version "0.2.0-beta.11"
|
|
7
|
+
resolved "https://registry.yarnpkg.com/@accelbyte/sdk/-/sdk-0.2.0-beta.11.tgz#84e63974c807bd5ba0804b5e64c5afd209d4062b"
|
|
8
|
+
integrity sha512-a8iwlQ7lDMFDowMavqm4CH2gRFiFRffotJ+M3RGID6iAVGojZfGbuVwTc00dcGDfOK+6yWukBmAniUvAlJ1OHg==
|
|
9
9
|
dependencies:
|
|
10
10
|
axios "0.27.2"
|
|
11
11
|
buffer "6.0.3"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
|
|
2
|
+
|
|
3
|
+
## Getting Started
|
|
4
|
+
|
|
5
|
+
Run the command below:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm run dev
|
|
9
|
+
# or
|
|
10
|
+
yarn dev
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
And open the link http://localhost:3030/
|
package/examples/vite/yarn.lock
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
# yarn lockfile v1
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
"@accelbyte/sdk@0.
|
|
6
|
-
version "0.
|
|
7
|
-
resolved "https://registry.yarnpkg.com/@accelbyte/sdk/-/sdk-0.
|
|
8
|
-
integrity sha512-
|
|
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==
|
|
9
9
|
dependencies:
|
|
10
10
|
axios "0.27.2"
|
|
11
11
|
buffer "6.0.3"
|