@credal/sdk 0.0.23 → 0.0.24

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.
Files changed (122) hide show
  1. package/Client.d.ts +0 -3
  2. package/Client.js +12 -17
  3. package/api/resources/copilots/client/Client.js +18 -18
  4. package/api/resources/documentCatalog/client/Client.js +6 -6
  5. package/api/resources/documentCollections/client/Client.js +12 -12
  6. package/api/resources/index.d.ts +0 -3
  7. package/api/resources/index.js +1 -4
  8. package/api/resources/permissionsService/client/Client.js +6 -6
  9. package/api/resources/search/client/Client.js +2 -2
  10. package/api/resources/users/client/Client.js +2 -2
  11. package/dist/Client.d.ts +0 -3
  12. package/dist/Client.js +12 -17
  13. package/dist/api/resources/copilots/client/Client.js +18 -18
  14. package/dist/api/resources/documentCatalog/client/Client.js +6 -6
  15. package/dist/api/resources/documentCollections/client/Client.js +12 -12
  16. package/dist/api/resources/index.d.ts +0 -3
  17. package/dist/api/resources/index.js +1 -4
  18. package/dist/api/resources/permissionsService/client/Client.js +6 -6
  19. package/dist/api/resources/search/client/Client.js +2 -2
  20. package/dist/api/resources/users/client/Client.js +2 -2
  21. package/dist/serialization/resources/index.d.ts +0 -3
  22. package/dist/serialization/resources/index.js +1 -4
  23. package/dist/version.d.ts +1 -1
  24. package/dist/version.js +1 -1
  25. package/package.json +1 -1
  26. package/reference.md +0 -79
  27. package/serialization/resources/index.d.ts +0 -3
  28. package/serialization/resources/index.js +1 -4
  29. package/version.d.ts +1 -1
  30. package/version.js +1 -1
  31. package/api/resources/actions/client/Client.d.ts +0 -50
  32. package/api/resources/actions/client/Client.js +0 -138
  33. package/api/resources/actions/client/index.d.ts +0 -1
  34. package/api/resources/actions/client/index.js +0 -17
  35. package/api/resources/actions/client/requests/InvokeActionRequest.d.ts +0 -55
  36. package/api/resources/actions/client/requests/InvokeActionRequest.js +0 -5
  37. package/api/resources/actions/client/requests/index.d.ts +0 -1
  38. package/api/resources/actions/client/requests/index.js +0 -2
  39. package/api/resources/actions/index.d.ts +0 -2
  40. package/api/resources/actions/index.js +0 -18
  41. package/api/resources/actions/types/ActionStatus.d.ts +0 -13
  42. package/api/resources/actions/types/ActionStatus.js +0 -15
  43. package/api/resources/actions/types/Conversation.d.ts +0 -6
  44. package/api/resources/actions/types/Conversation.js +0 -5
  45. package/api/resources/actions/types/DirectMessage.d.ts +0 -6
  46. package/api/resources/actions/types/DirectMessage.js +0 -5
  47. package/api/resources/actions/types/HumanConfirmationChannel.d.ts +0 -16
  48. package/api/resources/actions/types/HumanConfirmationChannel.js +0 -5
  49. package/api/resources/actions/types/InvokeActionResponse.d.ts +0 -8
  50. package/api/resources/actions/types/InvokeActionResponse.js +0 -5
  51. package/api/resources/actions/types/SlackThread.d.ts +0 -7
  52. package/api/resources/actions/types/SlackThread.js +0 -5
  53. package/api/resources/actions/types/index.d.ts +0 -6
  54. package/api/resources/actions/types/index.js +0 -22
  55. package/dist/api/resources/actions/client/Client.d.ts +0 -50
  56. package/dist/api/resources/actions/client/Client.js +0 -138
  57. package/dist/api/resources/actions/client/index.d.ts +0 -1
  58. package/dist/api/resources/actions/client/index.js +0 -17
  59. package/dist/api/resources/actions/client/requests/InvokeActionRequest.d.ts +0 -55
  60. package/dist/api/resources/actions/client/requests/InvokeActionRequest.js +0 -5
  61. package/dist/api/resources/actions/client/requests/index.d.ts +0 -1
  62. package/dist/api/resources/actions/client/requests/index.js +0 -2
  63. package/dist/api/resources/actions/index.d.ts +0 -2
  64. package/dist/api/resources/actions/index.js +0 -18
  65. package/dist/api/resources/actions/types/ActionStatus.d.ts +0 -13
  66. package/dist/api/resources/actions/types/ActionStatus.js +0 -15
  67. package/dist/api/resources/actions/types/Conversation.d.ts +0 -6
  68. package/dist/api/resources/actions/types/Conversation.js +0 -5
  69. package/dist/api/resources/actions/types/DirectMessage.d.ts +0 -6
  70. package/dist/api/resources/actions/types/DirectMessage.js +0 -5
  71. package/dist/api/resources/actions/types/HumanConfirmationChannel.d.ts +0 -16
  72. package/dist/api/resources/actions/types/HumanConfirmationChannel.js +0 -5
  73. package/dist/api/resources/actions/types/InvokeActionResponse.d.ts +0 -8
  74. package/dist/api/resources/actions/types/InvokeActionResponse.js +0 -5
  75. package/dist/api/resources/actions/types/SlackThread.d.ts +0 -7
  76. package/dist/api/resources/actions/types/SlackThread.js +0 -5
  77. package/dist/api/resources/actions/types/index.d.ts +0 -6
  78. package/dist/api/resources/actions/types/index.js +0 -22
  79. package/dist/serialization/resources/actions/client/index.d.ts +0 -1
  80. package/dist/serialization/resources/actions/client/index.js +0 -17
  81. package/dist/serialization/resources/actions/client/requests/InvokeActionRequest.d.ts +0 -19
  82. package/dist/serialization/resources/actions/client/requests/InvokeActionRequest.js +0 -40
  83. package/dist/serialization/resources/actions/client/requests/index.d.ts +0 -1
  84. package/dist/serialization/resources/actions/client/requests/index.js +0 -5
  85. package/dist/serialization/resources/actions/index.d.ts +0 -2
  86. package/dist/serialization/resources/actions/index.js +0 -18
  87. package/dist/serialization/resources/actions/types/ActionStatus.d.ts +0 -10
  88. package/dist/serialization/resources/actions/types/ActionStatus.js +0 -39
  89. package/dist/serialization/resources/actions/types/Conversation.d.ts +0 -12
  90. package/dist/serialization/resources/actions/types/Conversation.js +0 -33
  91. package/dist/serialization/resources/actions/types/DirectMessage.d.ts +0 -12
  92. package/dist/serialization/resources/actions/types/DirectMessage.js +0 -33
  93. package/dist/serialization/resources/actions/types/HumanConfirmationChannel.d.ts +0 -22
  94. package/dist/serialization/resources/actions/types/HumanConfirmationChannel.js +0 -43
  95. package/dist/serialization/resources/actions/types/InvokeActionResponse.d.ts +0 -14
  96. package/dist/serialization/resources/actions/types/InvokeActionResponse.js +0 -35
  97. package/dist/serialization/resources/actions/types/SlackThread.d.ts +0 -13
  98. package/dist/serialization/resources/actions/types/SlackThread.js +0 -34
  99. package/dist/serialization/resources/actions/types/index.d.ts +0 -6
  100. package/dist/serialization/resources/actions/types/index.js +0 -22
  101. package/serialization/resources/actions/client/index.d.ts +0 -1
  102. package/serialization/resources/actions/client/index.js +0 -17
  103. package/serialization/resources/actions/client/requests/InvokeActionRequest.d.ts +0 -19
  104. package/serialization/resources/actions/client/requests/InvokeActionRequest.js +0 -40
  105. package/serialization/resources/actions/client/requests/index.d.ts +0 -1
  106. package/serialization/resources/actions/client/requests/index.js +0 -5
  107. package/serialization/resources/actions/index.d.ts +0 -2
  108. package/serialization/resources/actions/index.js +0 -18
  109. package/serialization/resources/actions/types/ActionStatus.d.ts +0 -10
  110. package/serialization/resources/actions/types/ActionStatus.js +0 -39
  111. package/serialization/resources/actions/types/Conversation.d.ts +0 -12
  112. package/serialization/resources/actions/types/Conversation.js +0 -33
  113. package/serialization/resources/actions/types/DirectMessage.d.ts +0 -12
  114. package/serialization/resources/actions/types/DirectMessage.js +0 -33
  115. package/serialization/resources/actions/types/HumanConfirmationChannel.d.ts +0 -22
  116. package/serialization/resources/actions/types/HumanConfirmationChannel.js +0 -43
  117. package/serialization/resources/actions/types/InvokeActionResponse.d.ts +0 -14
  118. package/serialization/resources/actions/types/InvokeActionResponse.js +0 -35
  119. package/serialization/resources/actions/types/SlackThread.d.ts +0 -13
  120. package/serialization/resources/actions/types/SlackThread.js +0 -34
  121. package/serialization/resources/actions/types/index.d.ts +0 -6
  122. package/serialization/resources/actions/types/index.js +0 -22
@@ -78,8 +78,8 @@ class DocumentCollections {
78
78
  Authorization: yield this._getAuthorizationHeader(),
79
79
  "X-Fern-Language": "JavaScript",
80
80
  "X-Fern-SDK-Name": "@credal/sdk",
81
- "X-Fern-SDK-Version": "0.0.23",
82
- "User-Agent": "@credal/sdk/0.0.23",
81
+ "X-Fern-SDK-Version": "0.0.24",
82
+ "User-Agent": "@credal/sdk/0.0.24",
83
83
  "X-Fern-Runtime": core.RUNTIME.type,
84
84
  "X-Fern-Runtime-Version": core.RUNTIME.version,
85
85
  },
@@ -144,8 +144,8 @@ class DocumentCollections {
144
144
  Authorization: yield this._getAuthorizationHeader(),
145
145
  "X-Fern-Language": "JavaScript",
146
146
  "X-Fern-SDK-Name": "@credal/sdk",
147
- "X-Fern-SDK-Version": "0.0.23",
148
- "User-Agent": "@credal/sdk/0.0.23",
147
+ "X-Fern-SDK-Version": "0.0.24",
148
+ "User-Agent": "@credal/sdk/0.0.24",
149
149
  "X-Fern-Runtime": core.RUNTIME.type,
150
150
  "X-Fern-Runtime-Version": core.RUNTIME.version,
151
151
  },
@@ -208,8 +208,8 @@ class DocumentCollections {
208
208
  Authorization: yield this._getAuthorizationHeader(),
209
209
  "X-Fern-Language": "JavaScript",
210
210
  "X-Fern-SDK-Name": "@credal/sdk",
211
- "X-Fern-SDK-Version": "0.0.23",
212
- "User-Agent": "@credal/sdk/0.0.23",
211
+ "X-Fern-SDK-Version": "0.0.24",
212
+ "User-Agent": "@credal/sdk/0.0.24",
213
213
  "X-Fern-Runtime": core.RUNTIME.type,
214
214
  "X-Fern-Runtime-Version": core.RUNTIME.version,
215
215
  },
@@ -270,8 +270,8 @@ class DocumentCollections {
270
270
  Authorization: yield this._getAuthorizationHeader(),
271
271
  "X-Fern-Language": "JavaScript",
272
272
  "X-Fern-SDK-Name": "@credal/sdk",
273
- "X-Fern-SDK-Version": "0.0.23",
274
- "User-Agent": "@credal/sdk/0.0.23",
273
+ "X-Fern-SDK-Version": "0.0.24",
274
+ "User-Agent": "@credal/sdk/0.0.24",
275
275
  "X-Fern-Runtime": core.RUNTIME.type,
276
276
  "X-Fern-Runtime-Version": core.RUNTIME.version,
277
277
  },
@@ -348,8 +348,8 @@ class DocumentCollections {
348
348
  Authorization: yield this._getAuthorizationHeader(),
349
349
  "X-Fern-Language": "JavaScript",
350
350
  "X-Fern-SDK-Name": "@credal/sdk",
351
- "X-Fern-SDK-Version": "0.0.23",
352
- "User-Agent": "@credal/sdk/0.0.23",
351
+ "X-Fern-SDK-Version": "0.0.24",
352
+ "User-Agent": "@credal/sdk/0.0.24",
353
353
  "X-Fern-Runtime": core.RUNTIME.type,
354
354
  "X-Fern-Runtime-Version": core.RUNTIME.version,
355
355
  },
@@ -428,8 +428,8 @@ class DocumentCollections {
428
428
  Authorization: yield this._getAuthorizationHeader(),
429
429
  "X-Fern-Language": "JavaScript",
430
430
  "X-Fern-SDK-Name": "@credal/sdk",
431
- "X-Fern-SDK-Version": "0.0.23",
432
- "User-Agent": "@credal/sdk/0.0.23",
431
+ "X-Fern-SDK-Version": "0.0.24",
432
+ "User-Agent": "@credal/sdk/0.0.24",
433
433
  "X-Fern-Runtime": core.RUNTIME.type,
434
434
  "X-Fern-Runtime-Version": core.RUNTIME.version,
435
435
  },
@@ -1,5 +1,3 @@
1
- export * as actions from "./actions";
2
- export * from "./actions/types";
3
1
  export * as common from "./common";
4
2
  export * from "./common/types";
5
3
  export * as copilots from "./copilots";
@@ -14,7 +12,6 @@ export * as search from "./search";
14
12
  export * from "./search/types";
15
13
  export * as users from "./users";
16
14
  export * from "./users/types";
17
- export * from "./actions/client/requests";
18
15
  export * from "./copilots/client/requests";
19
16
  export * from "./documentCatalog/client/requests";
20
17
  export * from "./documentCollections/client/requests";
@@ -26,9 +26,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
26
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.users = exports.search = exports.permissionsService = exports.documentCollections = exports.documentCatalog = exports.copilots = exports.common = exports.actions = void 0;
30
- exports.actions = __importStar(require("./actions"));
31
- __exportStar(require("./actions/types"), exports);
29
+ exports.users = exports.search = exports.permissionsService = exports.documentCollections = exports.documentCatalog = exports.copilots = exports.common = void 0;
32
30
  exports.common = __importStar(require("./common"));
33
31
  __exportStar(require("./common/types"), exports);
34
32
  exports.copilots = __importStar(require("./copilots"));
@@ -43,7 +41,6 @@ exports.search = __importStar(require("./search"));
43
41
  __exportStar(require("./search/types"), exports);
44
42
  exports.users = __importStar(require("./users"));
45
43
  __exportStar(require("./users/types"), exports);
46
- __exportStar(require("./actions/client/requests"), exports);
47
44
  __exportStar(require("./copilots/client/requests"), exports);
48
45
  __exportStar(require("./documentCatalog/client/requests"), exports);
49
46
  __exportStar(require("./documentCollections/client/requests"), exports);
@@ -74,8 +74,8 @@ class PermissionsService {
74
74
  Authorization: yield this._getAuthorizationHeader(),
75
75
  "X-Fern-Language": "JavaScript",
76
76
  "X-Fern-SDK-Name": "@credal/sdk",
77
- "X-Fern-SDK-Version": "0.0.23",
78
- "User-Agent": "@credal/sdk/0.0.23",
77
+ "X-Fern-SDK-Version": "0.0.24",
78
+ "User-Agent": "@credal/sdk/0.0.24",
79
79
  "X-Fern-Runtime": core.RUNTIME.type,
80
80
  "X-Fern-Runtime-Version": core.RUNTIME.version,
81
81
  },
@@ -146,8 +146,8 @@ class PermissionsService {
146
146
  Authorization: yield this._getAuthorizationHeader(),
147
147
  "X-Fern-Language": "JavaScript",
148
148
  "X-Fern-SDK-Name": "@credal/sdk",
149
- "X-Fern-SDK-Version": "0.0.23",
150
- "User-Agent": "@credal/sdk/0.0.23",
149
+ "X-Fern-SDK-Version": "0.0.24",
150
+ "User-Agent": "@credal/sdk/0.0.24",
151
151
  "X-Fern-Runtime": core.RUNTIME.type,
152
152
  "X-Fern-Runtime-Version": core.RUNTIME.version,
153
153
  },
@@ -210,8 +210,8 @@ class PermissionsService {
210
210
  Authorization: yield this._getAuthorizationHeader(),
211
211
  "X-Fern-Language": "JavaScript",
212
212
  "X-Fern-SDK-Name": "@credal/sdk",
213
- "X-Fern-SDK-Version": "0.0.23",
214
- "User-Agent": "@credal/sdk/0.0.23",
213
+ "X-Fern-SDK-Version": "0.0.24",
214
+ "User-Agent": "@credal/sdk/0.0.24",
215
215
  "X-Fern-Runtime": core.RUNTIME.type,
216
216
  "X-Fern-Runtime-Version": core.RUNTIME.version,
217
217
  },
@@ -84,8 +84,8 @@ class Search {
84
84
  Authorization: yield this._getAuthorizationHeader(),
85
85
  "X-Fern-Language": "JavaScript",
86
86
  "X-Fern-SDK-Name": "@credal/sdk",
87
- "X-Fern-SDK-Version": "0.0.23",
88
- "User-Agent": "@credal/sdk/0.0.23",
87
+ "X-Fern-SDK-Version": "0.0.24",
88
+ "User-Agent": "@credal/sdk/0.0.24",
89
89
  "X-Fern-Runtime": core.RUNTIME.type,
90
90
  "X-Fern-Runtime-Version": core.RUNTIME.version,
91
91
  },
@@ -79,8 +79,8 @@ class Users {
79
79
  Authorization: yield this._getAuthorizationHeader(),
80
80
  "X-Fern-Language": "JavaScript",
81
81
  "X-Fern-SDK-Name": "@credal/sdk",
82
- "X-Fern-SDK-Version": "0.0.23",
83
- "User-Agent": "@credal/sdk/0.0.23",
82
+ "X-Fern-SDK-Version": "0.0.24",
83
+ "User-Agent": "@credal/sdk/0.0.24",
84
84
  "X-Fern-Runtime": core.RUNTIME.type,
85
85
  "X-Fern-Runtime-Version": core.RUNTIME.version,
86
86
  },
@@ -1,5 +1,3 @@
1
- export * as actions from "./actions";
2
- export * from "./actions/types";
3
1
  export * as common from "./common";
4
2
  export * from "./common/types";
5
3
  export * as copilots from "./copilots";
@@ -14,7 +12,6 @@ export * as search from "./search";
14
12
  export * from "./search/types";
15
13
  export * as users from "./users";
16
14
  export * from "./users/types";
17
- export * from "./actions/client/requests";
18
15
  export * from "./copilots/client/requests";
19
16
  export * from "./documentCatalog/client/requests";
20
17
  export * from "./documentCollections/client/requests";
@@ -26,9 +26,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
26
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.users = exports.search = exports.permissionsService = exports.documentCollections = exports.documentCatalog = exports.copilots = exports.common = exports.actions = void 0;
30
- exports.actions = __importStar(require("./actions"));
31
- __exportStar(require("./actions/types"), exports);
29
+ exports.users = exports.search = exports.permissionsService = exports.documentCollections = exports.documentCatalog = exports.copilots = exports.common = void 0;
32
30
  exports.common = __importStar(require("./common"));
33
31
  __exportStar(require("./common/types"), exports);
34
32
  exports.copilots = __importStar(require("./copilots"));
@@ -43,7 +41,6 @@ exports.search = __importStar(require("./search"));
43
41
  __exportStar(require("./search/types"), exports);
44
42
  exports.users = __importStar(require("./users"));
45
43
  __exportStar(require("./users/types"), exports);
46
- __exportStar(require("./actions/client/requests"), exports);
47
44
  __exportStar(require("./copilots/client/requests"), exports);
48
45
  __exportStar(require("./documentCatalog/client/requests"), exports);
49
46
  __exportStar(require("./documentCollections/client/requests"), exports);
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.23";
1
+ export declare const SDK_VERSION = "0.0.24";
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.0.23";
4
+ exports.SDK_VERSION = "0.0.24";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@credal/sdk",
3
- "version": "0.0.23",
3
+ "version": "0.0.24",
4
4
  "private": false,
5
5
  "repository": "https://github.com/credal-ai/credal-typescript-sdk",
6
6
  "main": "./index.js",
package/reference.md CHANGED
@@ -1,84 +1,5 @@
1
1
  # Reference
2
2
 
3
- ## Actions
4
-
5
- <details><summary><code>client.actions.<a href="/src/api/resources/actions/client/Client.ts">invokeAction</a>({ ...params }) -> Credal.InvokeActionResponse</code></summary>
6
- <dl>
7
- <dd>
8
-
9
- #### 📝 Description
10
-
11
- <dl>
12
- <dd>
13
-
14
- <dl>
15
- <dd>
16
-
17
- Invoke an action, asking for human confirmation if necessary
18
-
19
- </dd>
20
- </dl>
21
- </dd>
22
- </dl>
23
-
24
- #### 🔌 Usage
25
-
26
- <dl>
27
- <dd>
28
-
29
- <dl>
30
- <dd>
31
-
32
- ```typescript
33
- await client.actions.invokeAction({
34
- actionId: "2b5cf2b8-3df3-11ef-9a96-332d4470d189",
35
- actionInputs: {
36
- textToAppend: "If you need more help, please contact your direct manager.",
37
- },
38
- userEmail: "ben@credal.ai",
39
- requireHumanConfirmation: true,
40
- humanConfirmationChannel: {
41
- type: "slackThread",
42
- channelId: "ABC123",
43
- threadTimestamp: "123456789",
44
- },
45
- justification: "The user directly asked to update the Relocations Confluence document with this text.",
46
- auditLogId: "3df3f2b8-3df3-11ef-9a96-332d447011ef",
47
- });
48
- ```
49
-
50
- </dd>
51
- </dl>
52
- </dd>
53
- </dl>
54
-
55
- #### ⚙️ Parameters
56
-
57
- <dl>
58
- <dd>
59
-
60
- <dl>
61
- <dd>
62
-
63
- **request:** `Credal.InvokeActionRequest`
64
-
65
- </dd>
66
- </dl>
67
-
68
- <dl>
69
- <dd>
70
-
71
- **requestOptions:** `Actions.RequestOptions`
72
-
73
- </dd>
74
- </dl>
75
- </dd>
76
- </dl>
77
-
78
- </dd>
79
- </dl>
80
- </details>
81
-
82
3
  ## Copilots
83
4
 
84
5
  <details><summary><code>client.copilots.<a href="/src/api/resources/copilots/client/Client.ts">createCopilot</a>({ ...params }) -> Credal.CreateCopilotResponse</code></summary>
@@ -1,5 +1,3 @@
1
- export * as actions from "./actions";
2
- export * from "./actions/types";
3
1
  export * as common from "./common";
4
2
  export * from "./common/types";
5
3
  export * as copilots from "./copilots";
@@ -14,7 +12,6 @@ export * as search from "./search";
14
12
  export * from "./search/types";
15
13
  export * as users from "./users";
16
14
  export * from "./users/types";
17
- export * from "./actions/client/requests";
18
15
  export * from "./copilots/client/requests";
19
16
  export * from "./documentCatalog/client/requests";
20
17
  export * from "./documentCollections/client/requests";
@@ -26,9 +26,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
26
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.users = exports.search = exports.permissionsService = exports.documentCollections = exports.documentCatalog = exports.copilots = exports.common = exports.actions = void 0;
30
- exports.actions = __importStar(require("./actions"));
31
- __exportStar(require("./actions/types"), exports);
29
+ exports.users = exports.search = exports.permissionsService = exports.documentCollections = exports.documentCatalog = exports.copilots = exports.common = void 0;
32
30
  exports.common = __importStar(require("./common"));
33
31
  __exportStar(require("./common/types"), exports);
34
32
  exports.copilots = __importStar(require("./copilots"));
@@ -43,7 +41,6 @@ exports.search = __importStar(require("./search"));
43
41
  __exportStar(require("./search/types"), exports);
44
42
  exports.users = __importStar(require("./users"));
45
43
  __exportStar(require("./users/types"), exports);
46
- __exportStar(require("./actions/client/requests"), exports);
47
44
  __exportStar(require("./copilots/client/requests"), exports);
48
45
  __exportStar(require("./documentCatalog/client/requests"), exports);
49
46
  __exportStar(require("./documentCollections/client/requests"), exports);
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.23";
1
+ export declare const SDK_VERSION = "0.0.24";
package/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.0.23";
4
+ exports.SDK_VERSION = "0.0.24";
@@ -1,50 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as environments from "../../../../environments";
5
- import * as core from "../../../../core";
6
- import * as Credal from "../../../index";
7
- export declare namespace Actions {
8
- interface Options {
9
- environment?: core.Supplier<environments.CredalEnvironment | string>;
10
- apiKey?: core.Supplier<core.BearerToken | undefined>;
11
- fetcher?: core.FetchFunction;
12
- }
13
- interface RequestOptions {
14
- /** The maximum time to wait for a response in seconds. */
15
- timeoutInSeconds?: number;
16
- /** The number of times to retry the request. Defaults to 2. */
17
- maxRetries?: number;
18
- /** A hook to abort the request. */
19
- abortSignal?: AbortSignal;
20
- }
21
- }
22
- export declare class Actions {
23
- protected readonly _options: Actions.Options;
24
- constructor(_options?: Actions.Options);
25
- /**
26
- * Invoke an action, asking for human confirmation if necessary
27
- *
28
- * @param {Credal.InvokeActionRequest} request
29
- * @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
30
- *
31
- * @example
32
- * await client.actions.invokeAction({
33
- * actionId: "2b5cf2b8-3df3-11ef-9a96-332d4470d189",
34
- * actionInputs: {
35
- * "textToAppend": "If you need more help, please contact your direct manager."
36
- * },
37
- * userEmail: "ben@credal.ai",
38
- * requireHumanConfirmation: true,
39
- * humanConfirmationChannel: {
40
- * type: "slackThread",
41
- * channelId: "ABC123",
42
- * threadTimestamp: "123456789"
43
- * },
44
- * justification: "The user directly asked to update the Relocations Confluence document with this text.",
45
- * auditLogId: "3df3f2b8-3df3-11ef-9a96-332d447011ef"
46
- * })
47
- */
48
- invokeAction(request: Credal.InvokeActionRequest, requestOptions?: Actions.RequestOptions): Promise<Credal.InvokeActionResponse>;
49
- protected _getAuthorizationHeader(): Promise<string>;
50
- }
@@ -1,138 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
28
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
- return new (P || (P = Promise))(function (resolve, reject) {
31
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
- step((generator = generator.apply(thisArg, _arguments || [])).next());
35
- });
36
- };
37
- var __importDefault = (this && this.__importDefault) || function (mod) {
38
- return (mod && mod.__esModule) ? mod : { "default": mod };
39
- };
40
- Object.defineProperty(exports, "__esModule", { value: true });
41
- exports.Actions = void 0;
42
- const environments = __importStar(require("../../../../environments"));
43
- const core = __importStar(require("../../../../core"));
44
- const serializers = __importStar(require("../../../../serialization/index"));
45
- const url_join_1 = __importDefault(require("url-join"));
46
- const errors = __importStar(require("../../../../errors/index"));
47
- class Actions {
48
- constructor(_options = {}) {
49
- this._options = _options;
50
- }
51
- /**
52
- * Invoke an action, asking for human confirmation if necessary
53
- *
54
- * @param {Credal.InvokeActionRequest} request
55
- * @param {Actions.RequestOptions} requestOptions - Request-specific configuration.
56
- *
57
- * @example
58
- * await client.actions.invokeAction({
59
- * actionId: "2b5cf2b8-3df3-11ef-9a96-332d4470d189",
60
- * actionInputs: {
61
- * "textToAppend": "If you need more help, please contact your direct manager."
62
- * },
63
- * userEmail: "ben@credal.ai",
64
- * requireHumanConfirmation: true,
65
- * humanConfirmationChannel: {
66
- * type: "slackThread",
67
- * channelId: "ABC123",
68
- * threadTimestamp: "123456789"
69
- * },
70
- * justification: "The user directly asked to update the Relocations Confluence document with this text.",
71
- * auditLogId: "3df3f2b8-3df3-11ef-9a96-332d447011ef"
72
- * })
73
- */
74
- invokeAction(request, requestOptions) {
75
- var _a, _b;
76
- return __awaiter(this, void 0, void 0, function* () {
77
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
78
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CredalEnvironment.Production, "/v0/actions/invokeAction"),
79
- method: "POST",
80
- headers: {
81
- Authorization: yield this._getAuthorizationHeader(),
82
- "X-Fern-Language": "JavaScript",
83
- "X-Fern-SDK-Name": "@credal/sdk",
84
- "X-Fern-SDK-Version": "0.0.23",
85
- "User-Agent": "@credal/sdk/0.0.23",
86
- "X-Fern-Runtime": core.RUNTIME.type,
87
- "X-Fern-Runtime-Version": core.RUNTIME.version,
88
- },
89
- contentType: "application/json",
90
- requestType: "json",
91
- body: serializers.InvokeActionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
92
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
93
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
94
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
95
- });
96
- if (_response.ok) {
97
- return serializers.InvokeActionResponse.parseOrThrow(_response.body, {
98
- unrecognizedObjectKeys: "passthrough",
99
- allowUnrecognizedUnionMembers: true,
100
- allowUnrecognizedEnumValues: true,
101
- breadcrumbsPrefix: ["response"],
102
- });
103
- }
104
- if (_response.error.reason === "status-code") {
105
- throw new errors.CredalError({
106
- statusCode: _response.error.statusCode,
107
- body: _response.error.body,
108
- });
109
- }
110
- switch (_response.error.reason) {
111
- case "non-json":
112
- throw new errors.CredalError({
113
- statusCode: _response.error.statusCode,
114
- body: _response.error.rawBody,
115
- });
116
- case "timeout":
117
- throw new errors.CredalTimeoutError();
118
- case "unknown":
119
- throw new errors.CredalError({
120
- message: _response.error.errorMessage,
121
- });
122
- }
123
- });
124
- }
125
- _getAuthorizationHeader() {
126
- var _a;
127
- return __awaiter(this, void 0, void 0, function* () {
128
- const bearer = (_a = (yield core.Supplier.get(this._options.apiKey))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env["CREDAL_API_KEY"];
129
- if (bearer == null) {
130
- throw new errors.CredalError({
131
- message: "Please specify CREDAL_API_KEY when instantiating the client.",
132
- });
133
- }
134
- return `Bearer ${bearer}`;
135
- });
136
- }
137
- }
138
- exports.Actions = Actions;
@@ -1 +0,0 @@
1
- export * from "./requests";
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./requests"), exports);
@@ -1,55 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as Credal from "../../../../index";
5
- /**
6
- * @example
7
- * {
8
- * actionId: "2b5cf2b8-3df3-11ef-9a96-332d4470d189",
9
- * actionInputs: {
10
- * "textToAppend": "If you need more help, please contact your direct manager."
11
- * },
12
- * userEmail: "ben@credal.ai",
13
- * requireHumanConfirmation: true,
14
- * humanConfirmationChannel: {
15
- * type: "slackThread",
16
- * channelId: "ABC123",
17
- * threadTimestamp: "123456789"
18
- * },
19
- * justification: "The user directly asked to update the Relocations Confluence document with this text.",
20
- * auditLogId: "3df3f2b8-3df3-11ef-9a96-332d447011ef"
21
- * }
22
- */
23
- export interface InvokeActionRequest {
24
- actionId: string;
25
- /**
26
- * The inputs needed to execute the action
27
- *
28
- */
29
- actionInputs?: unknown;
30
- /**
31
- * The user who we should take the action on behalf of
32
- *
33
- */
34
- userEmail: string;
35
- /**
36
- * If true, then before executing the action we will ask for a human confirmation in Slack. If false, we may still ask for human confirmation if it's required by your organization admin.
37
- *
38
- */
39
- requireHumanConfirmation: boolean;
40
- /**
41
- * Where we should ask for human confirmation if necessary
42
- *
43
- */
44
- humanConfirmationChannel?: Credal.HumanConfirmationChannel;
45
- /**
46
- * The justification for requesting this action. This is likely generated by the LLM that requested the action.
47
- *
48
- */
49
- justification: string;
50
- /**
51
- * Audit log for the message that called for this action
52
- *
53
- */
54
- auditLogId: string;
55
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +0,0 @@
1
- export { type InvokeActionRequest } from "./InvokeActionRequest";
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- export * from "./types";
2
- export * from "./client";
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./types"), exports);
18
- __exportStar(require("./client"), exports);