@smartico/public-api 0.0.47 → 0.0.48
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/README.md +36 -11
- package/dist/IntUtils.d.ts +1 -0
- package/dist/Level/GetLevelMapResponse.d.ts +2 -0
- package/dist/Missions/UserAchievement.d.ts +2 -0
- package/dist/SmarticoAPI.d.ts +10 -1
- package/dist/WSAPI/WSAPI.d.ts +8 -3
- package/dist/WSAPI/WSAPITypes.d.ts +124 -5
- package/dist/index.js +122 -26
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +75 -9
- package/dist/index.modern.mjs.map +1 -1
- package/docs/README.md +12 -0
- package/docs/classes/WSAPI.md +37 -0
- package/docs/interfaces/TLevel.md +74 -0
- package/docs/interfaces/TMissionOrBadge.md +167 -0
- package/docs/interfaces/TMissionOrBadgeTask.md +35 -0
- package/docs/interfaces/TUserProfile.md +81 -0
- package/package.json +1 -1
- package/src/IntUtils.ts +19 -0
- package/src/Level/GetLevelMapResponse.ts +16 -0
- package/src/Missions/UserAchievement.ts +38 -0
- package/src/SmarticoAPI.ts +22 -5
- package/src/WSAPI/WSAPI.ts +24 -8
- package/src/WSAPI/WSAPITypes.ts +126 -16
- package/tsconfig.json +7 -2
- package/docs_test/README_TWO.md +0 -57
- package/docs_test/classes/WSAPI.md +0 -19
- package/docs_test/interfaces/GetLevelMapClearedResponse.md +0 -57
- package/docs_test/modules.md +0 -13
- /package/{docs_test → docs}/.nojekyll +0 -0
package/tsconfig.json
CHANGED
|
@@ -16,11 +16,16 @@
|
|
|
16
16
|
"typedocOptions": {
|
|
17
17
|
"name": "Smartico API documentation",
|
|
18
18
|
"entryPoints": ["src/WSAPI/WSAPI.ts", "src/WSAPI/WSAPITypes.ts"],
|
|
19
|
-
"out": "
|
|
19
|
+
"out": "docs",
|
|
20
20
|
"plugin": ["typedoc-plugin-markdown", "typedoc-plugin-merge-modules"],
|
|
21
|
-
"entryDocument": "
|
|
21
|
+
"entryDocument": "README.md",
|
|
22
22
|
"disableSources": true,
|
|
23
23
|
"excludePrivate": true,
|
|
24
|
+
"readme": "none",
|
|
25
|
+
"cleanOutputDir": true,
|
|
26
|
+
"hideBreadcrumbs": true,
|
|
27
|
+
"hideInPageTOC": true,
|
|
28
|
+
"sort": "source-order"
|
|
24
29
|
}
|
|
25
30
|
}
|
|
26
31
|
|
package/docs_test/README_TWO.md
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
Smartico API documentation / [Modules](modules.md)
|
|
2
|
-
|
|
3
|
-
# Smartico Public API
|
|
4
|
-
API allows you to build and manage Smartico Gamification context on behalf of the user. It can be used in the JS/TS based frontend or in NodeJS backend
|
|
5
|
-
|
|
6
|
-
# Installation
|
|
7
|
-
|
|
8
|
-
```bash
|
|
9
|
-
npm install --save @smartico/public-api
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
## Usage
|
|
13
|
-
|
|
14
|
-
```typescript
|
|
15
|
-
import { SmarticoAPI } from '@smartico/public-api';
|
|
16
|
-
|
|
17
|
-
const SAPI = new SmarticoAPI( 'your-label-api-key', 'your-brand-key', 'your-message-sender', { logger: console });
|
|
18
|
-
|
|
19
|
-
const response = await SAPI.miniGamesGetTemplates(rsUser.user_ext_id);
|
|
20
|
-
|
|
21
|
-
response.templates.forEach( t => {
|
|
22
|
-
console.log(t.saw_template_ui_definition.name)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## API
|
|
28
|
-
### To learn more about the capabilities of our API, go to the [API documentation](docs_test/modules.md)
|
|
29
|
-
|
|
30
|
-
## Development and publishing process
|
|
31
|
-
|
|
32
|
-
### Publishing process
|
|
33
|
-
|
|
34
|
-
```sh
|
|
35
|
-
git commit
|
|
36
|
-
npm run build
|
|
37
|
-
npm version patch
|
|
38
|
-
npm run pub
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### Debug locally
|
|
42
|
-
|
|
43
|
-
In the public-api project console:
|
|
44
|
-
|
|
45
|
-
```sh
|
|
46
|
-
npm link
|
|
47
|
-
# when you are done
|
|
48
|
-
npm unlink
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Consumer project console:
|
|
52
|
-
```bash
|
|
53
|
-
npm link @smartico/public-api --legacy-peer-deps
|
|
54
|
-
|
|
55
|
-
# when you are done
|
|
56
|
-
npm unlink @smartico/public-api --legacy-peer-deps && npm install @smartico/public-api --legacy-peer-deps
|
|
57
|
-
```
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
[Smartico API documentation](../README_TWO.md) / [Modules](../modules.md) / WSAPI
|
|
2
|
-
|
|
3
|
-
# Class: WSAPI
|
|
4
|
-
|
|
5
|
-
## Table of contents
|
|
6
|
-
|
|
7
|
-
### Methods
|
|
8
|
-
|
|
9
|
-
- [getLevelsTransformed](WSAPI.md#getlevelstransformed)
|
|
10
|
-
|
|
11
|
-
## Methods
|
|
12
|
-
|
|
13
|
-
### getLevelsTransformed
|
|
14
|
-
|
|
15
|
-
▸ **getLevelsTransformed**(): `Promise`<[`GetLevelMapClearedResponse`](../interfaces/GetLevelMapClearedResponse.md)[]\>
|
|
16
|
-
|
|
17
|
-
#### Returns
|
|
18
|
-
|
|
19
|
-
`Promise`<[`GetLevelMapClearedResponse`](../interfaces/GetLevelMapClearedResponse.md)[]\>
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
[Smartico API documentation](../README_TWO.md) / [Modules](../modules.md) / GetLevelMapClearedResponse
|
|
2
|
-
|
|
3
|
-
# Interface: GetLevelMapClearedResponse
|
|
4
|
-
|
|
5
|
-
## Table of contents
|
|
6
|
-
|
|
7
|
-
### Properties
|
|
8
|
-
|
|
9
|
-
- [description](GetLevelMapClearedResponse.md#description)
|
|
10
|
-
- [id](GetLevelMapClearedResponse.md#id)
|
|
11
|
-
- [image](GetLevelMapClearedResponse.md#image)
|
|
12
|
-
- [name](GetLevelMapClearedResponse.md#name)
|
|
13
|
-
- [required\_level\_counter\_1](GetLevelMapClearedResponse.md#required_level_counter_1)
|
|
14
|
-
- [required\_level\_counter\_2](GetLevelMapClearedResponse.md#required_level_counter_2)
|
|
15
|
-
- [required\_points](GetLevelMapClearedResponse.md#required_points)
|
|
16
|
-
|
|
17
|
-
## Properties
|
|
18
|
-
|
|
19
|
-
### description
|
|
20
|
-
|
|
21
|
-
• **description**: `string`
|
|
22
|
-
|
|
23
|
-
___
|
|
24
|
-
|
|
25
|
-
### id
|
|
26
|
-
|
|
27
|
-
• **id**: `number`
|
|
28
|
-
|
|
29
|
-
___
|
|
30
|
-
|
|
31
|
-
### image
|
|
32
|
-
|
|
33
|
-
• **image**: `string`
|
|
34
|
-
|
|
35
|
-
___
|
|
36
|
-
|
|
37
|
-
### name
|
|
38
|
-
|
|
39
|
-
• **name**: `string`
|
|
40
|
-
|
|
41
|
-
___
|
|
42
|
-
|
|
43
|
-
### required\_level\_counter\_1
|
|
44
|
-
|
|
45
|
-
• **required\_level\_counter\_1**: `number`
|
|
46
|
-
|
|
47
|
-
___
|
|
48
|
-
|
|
49
|
-
### required\_level\_counter\_2
|
|
50
|
-
|
|
51
|
-
• **required\_level\_counter\_2**: `number`
|
|
52
|
-
|
|
53
|
-
___
|
|
54
|
-
|
|
55
|
-
### required\_points
|
|
56
|
-
|
|
57
|
-
• **required\_points**: `number`
|
package/docs_test/modules.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
[Smartico API documentation](README_TWO.md) / Modules
|
|
2
|
-
|
|
3
|
-
# Smartico API documentation
|
|
4
|
-
|
|
5
|
-
## Table of contents
|
|
6
|
-
|
|
7
|
-
### General API
|
|
8
|
-
|
|
9
|
-
- [WSAPI](classes/WSAPI.md)
|
|
10
|
-
|
|
11
|
-
### Levels response
|
|
12
|
-
|
|
13
|
-
- [GetLevelMapClearedResponse](interfaces/GetLevelMapClearedResponse.md)
|
|
File without changes
|