@or-sdk/bots 1.7.6-beta.4272.0 → 1.7.6-beta.4275.0
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 +47 -2
- package/package.json +23 -16
- package/tsconfig.dev.json +0 -8
- package/tsconfig.esm.json +0 -12
- package/tsconfig.json +0 -7
- package/tsconfig.types.json +0 -11
package/README.md
CHANGED
|
@@ -1,9 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
# `@or-sdk/bots`
|
|
2
|
+
|
|
3
|
+
OneReach SDK client for Bots.
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
- Use this package when integrating with the Bots capability on the OneReach platform.
|
|
8
|
+
- Use its typed client and exported models instead of hand-writing requests to that service.
|
|
9
|
+
|
|
10
|
+
## When not to use
|
|
11
|
+
|
|
12
|
+
- Do not use it for a different platform capability; choose the dedicated `@or-sdk/*` package instead.
|
|
13
|
+
- Do not use it for generic third-party HTTP calls.
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
2
16
|
```
|
|
3
17
|
$ npm i @or-sdk/bots
|
|
4
18
|
```
|
|
5
19
|
|
|
6
|
-
## Usage
|
|
20
|
+
## Usage
|
|
7
21
|
```typescript
|
|
8
22
|
import { Bots } from '@or-sdk/bots'
|
|
9
23
|
|
|
@@ -19,3 +33,34 @@ const bots = new Bots({
|
|
|
19
33
|
discoveryUrl: 'http://example.discovery/endpoint'
|
|
20
34
|
});
|
|
21
35
|
```
|
|
36
|
+
|
|
37
|
+
## Configuration
|
|
38
|
+
|
|
39
|
+
- Prefer `dataHubSvcUrl` when the service URL is known; it avoids a discovery request.
|
|
40
|
+
- Use `discoveryUrl` only when the service URL is not available.
|
|
41
|
+
- Provide `token` as a bearer-token string or getter where supported.
|
|
42
|
+
|
|
43
|
+
## Common pitfalls
|
|
44
|
+
|
|
45
|
+
- Keep the client token current when it can expire; a token getter is preferable where the constructor accepts one.
|
|
46
|
+
- Treat the generated TypeScript types as the authoritative contract for optional parameters and response shapes.
|
|
47
|
+
|
|
48
|
+
## Method map
|
|
49
|
+
|
|
50
|
+
| Method | Purpose |
|
|
51
|
+
|---|---|
|
|
52
|
+
| `listBots(...)` | See the exported TypeScript signature for parameters and result. |
|
|
53
|
+
| `getBot(...)` | See the exported TypeScript signature for parameters and result. |
|
|
54
|
+
| `saveBot(...)` | See the exported TypeScript signature for parameters and result. |
|
|
55
|
+
| `deleteBot(...)` | See the exported TypeScript signature for parameters and result. |
|
|
56
|
+
| `recoverBot(...)` | See the exported TypeScript signature for parameters and result. |
|
|
57
|
+
| `downloadTemplate(...)` | See the exported TypeScript signature for parameters and result. |
|
|
58
|
+
| `addTags(...)` | See the exported TypeScript signature for parameters and result. |
|
|
59
|
+
| `removeTags(...)` | See the exported TypeScript signature for parameters and result. |
|
|
60
|
+
| `uploaderBotImage(...)` | See the exported TypeScript signature for parameters and result. |
|
|
61
|
+
| `resolve(...)` | See the exported TypeScript signature for parameters and result. |
|
|
62
|
+
| `listBotCategories(...)` | See the exported TypeScript signature for parameters and result. |
|
|
63
|
+
|
|
64
|
+
## More detail
|
|
65
|
+
|
|
66
|
+
Full signatures and exported types are available in `src/` and `dist/types/`.
|
package/package.json
CHANGED
|
@@ -1,25 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@or-sdk/bots",
|
|
3
|
-
"version": "1.7.6-beta.
|
|
3
|
+
"version": "1.7.6-beta.4275.0",
|
|
4
|
+
"description": "OneReach SDK client for Bots",
|
|
4
5
|
"license": "Apache-2.0",
|
|
5
6
|
"main": "dist/cjs/index.js",
|
|
6
7
|
"module": "dist/esm/index.js",
|
|
7
8
|
"types": "dist/types/index.d.ts",
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
"devDependencies": {
|
|
15
|
-
"concurrently": "^9.2.0",
|
|
16
|
-
"typescript": "^5.6.2"
|
|
17
|
-
},
|
|
18
|
-
"publishConfig": {
|
|
19
|
-
"access": "public"
|
|
20
|
-
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"src",
|
|
12
|
+
"README.md",
|
|
13
|
+
"CHANGELOG.md"
|
|
14
|
+
],
|
|
21
15
|
"scripts": {
|
|
22
|
-
"build": "concurrently 'pnpm:build:*(!watch)'",
|
|
16
|
+
"build": "pnpm clean && concurrently 'pnpm:build:*(!watch)'",
|
|
23
17
|
"build:cjs": "tsc --project tsconfig.json",
|
|
24
18
|
"build:esm": "tsc --project tsconfig.esm.json",
|
|
25
19
|
"build:types": "tsc --project tsconfig.types.json",
|
|
@@ -29,5 +23,18 @@
|
|
|
29
23
|
"build:watch:types": "tsc --project tsconfig.types.json -w",
|
|
30
24
|
"clean": "rm -rf ./dist",
|
|
31
25
|
"dev": "pnpm build:watch:esm"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@or-sdk/base": "^0.44.7",
|
|
29
|
+
"@or-sdk/data-hub-svc": "^2.3.9-beta.4275.0",
|
|
30
|
+
"@or-sdk/tags": "^1.1.10-beta.4275.0",
|
|
31
|
+
"browser-or-node": "3.0.0"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"concurrently": "9.0.1",
|
|
35
|
+
"typescript": "5.6.2"
|
|
36
|
+
},
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public"
|
|
32
39
|
}
|
|
33
|
-
}
|
|
40
|
+
}
|
package/tsconfig.dev.json
DELETED
package/tsconfig.esm.json
DELETED
package/tsconfig.json
DELETED
package/tsconfig.types.json
DELETED