@or-sdk/bots 1.7.6-beta.4273.0 → 1.7.6-beta.4276.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 CHANGED
@@ -1,9 +1,23 @@
1
- ## Installation:
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/`.
@@ -1,9 +1,24 @@
1
1
  import { Token } from '@or-sdk/base';
2
2
  export type BotsConfig = {
3
+ /**
4
+ * token
5
+ */
3
6
  token: Token;
7
+ /**
8
+ * Url of OneReach service discovery api
9
+ */
4
10
  discoveryUrl?: string;
11
+ /**
12
+ * Account ID for cross-account requests (super admin only)
13
+ */
5
14
  accountId?: string;
15
+ /**
16
+ * Url of OneReach DataHubSvc api
17
+ */
6
18
  dataHubSvcUrl?: string;
19
+ /**
20
+ * Api feature
21
+ */
7
22
  feature?: string;
8
23
  };
9
24
  export type Bot = {
@@ -73,10 +88,19 @@ export type BotUploadIcon = {
73
88
  cacheControl: string;
74
89
  fileModel: File;
75
90
  };
91
+ /**
92
+ * Single parameter for the Bot Configuration settings.
93
+ */
76
94
  export type BotConfigParam = {
95
+ /**
96
+ * UUID identifier. For the new records must be created on a client.
97
+ */
77
98
  id: string;
78
99
  key: string;
79
100
  type: 'string' | 'number' | 'boolean' | 'json' | 'null';
101
+ /**
102
+ * Parameter value corresponding to the `type`. JSON is stores as a serialized string.
103
+ */
80
104
  value: string | number | boolean | null;
81
105
  };
82
106
  export type DeleteBotProgress = {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,MAAM,MAAM,UAAU,GAAG;IAIvB,KAAK,EAAE,KAAK,CAAC;IAKb,YAAY,CAAC,EAAE,MAAM,CAAC;IAKtB,SAAS,CAAC,EAAE,MAAM,CAAC;IAKnB,aAAa,CAAC,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K,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAGF,MAAM,MAAM,qBAAqB,GAAG;IAClC,UAAU,EAAE;QACV,IAAI,EAAE,MAAM,CAAC;KACd,EAAE,CAAA;CACJ,CAAC"}
package/package.json CHANGED
@@ -1,25 +1,19 @@
1
1
  {
2
2
  "name": "@or-sdk/bots",
3
- "version": "1.7.6-beta.4273.0",
3
+ "version": "1.7.6-beta.4276.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
- "dependencies": {
9
- "browser-or-node": "3.0.0",
10
- "@or-sdk/data-hub-svc": "^2.3.9-beta.4273.0",
11
- "@or-sdk/tags": "^1.1.10-beta.4273.0",
12
- "@or-sdk/base": "^0.44.8-beta.4273.0"
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.4276.0",
30
+ "@or-sdk/tags": "^1.1.10-beta.4276.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
@@ -1,8 +0,0 @@
1
- {
2
- "extends": "./tsconfig.esm.json",
3
- "compilerOptions": {
4
- "declarationDir": "./dist/types",
5
- "rootDir": "./src",
6
- "declaration": true
7
- }
8
- }
package/tsconfig.esm.json DELETED
@@ -1,12 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "./dist/esm",
5
- "declarationDir": "./dist/types",
6
- "module": "ES6",
7
- "target": "es6",
8
- "rootDir": "./src",
9
- "declaration": true,
10
- "declarationMap": true
11
- }
12
- }
package/tsconfig.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "./dist/cjs/",
5
- "rootDir": "./src"
6
- }
7
- }
@@ -1,11 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "./dist/types",
5
- "rootDir": "./src",
6
- "declaration": true,
7
- "declarationMap": true,
8
- "emitDeclarationOnly": true,
9
- "removeComments": false
10
- }
11
- }