@credal/sdk 0.0.14 → 0.0.16
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/Client.d.ts +3 -0
- package/api/resources/copilots/client/Client.d.ts +13 -10
- package/api/resources/copilots/client/Client.js +52 -40
- package/api/resources/copilots/client/requests/CreateCopilotRequest.d.ts +1 -1
- package/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.d.ts +1 -1
- package/api/resources/copilots/types/DataFilter.d.ts +1 -1
- package/api/resources/copilots/types/FinalChunk.d.ts +1 -1
- package/api/resources/copilots/types/StreamingChunk.d.ts +15 -1
- package/api/resources/documentCatalog/client/Client.d.ts +7 -4
- package/api/resources/documentCatalog/client/Client.js +13 -13
- package/api/resources/documentCollections/client/Client.d.ts +14 -11
- package/api/resources/documentCollections/client/Client.js +39 -29
- package/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.d.ts +2 -2
- package/api/resources/documentCollections/client/requests/CreateCollectionRequest.d.ts +1 -1
- package/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.d.ts +2 -2
- package/api/resources/permissionsService/client/Client.d.ts +8 -5
- package/api/resources/permissionsService/client/Client.js +20 -14
- package/api/resources/permissionsService/client/requests/CheckBulkResourcesAuthorizationForUserRequest.d.ts +1 -1
- package/api/resources/permissionsService/client/requests/CheckResourceAuthorizationForUserRequest.d.ts +1 -1
- package/api/resources/search/client/Client.d.ts +5 -2
- package/api/resources/search/client/Client.js +7 -7
- package/api/resources/search/client/requests/SearchDocumentCollectionRequest.d.ts +1 -1
- package/api/resources/users/client/Client.d.ts +4 -1
- package/api/resources/users/client/Client.js +5 -3
- package/core/fetcher/Fetcher.d.ts +4 -1
- package/core/fetcher/Fetcher.js +19 -176
- package/core/fetcher/createRequestUrl.d.ts +1 -0
- package/core/fetcher/createRequestUrl.js +13 -0
- package/core/fetcher/getFetchFn.d.ts +4 -0
- package/core/fetcher/getFetchFn.js +59 -0
- package/core/fetcher/getRequestBody.d.ts +7 -0
- package/core/fetcher/getRequestBody.js +23 -0
- package/core/fetcher/getResponseBody.d.ts +1 -0
- package/core/fetcher/getResponseBody.js +55 -0
- package/core/fetcher/makeRequest.d.ts +1 -0
- package/core/fetcher/makeRequest.js +42 -0
- package/core/fetcher/requestWithRetries.d.ts +1 -0
- package/core/fetcher/requestWithRetries.js +41 -0
- package/core/fetcher/signals.d.ts +12 -0
- package/core/fetcher/signals.js +37 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +50 -0
- package/core/runtime/runtime.d.ts +2 -1
- package/core/runtime/runtime.js +12 -1
- package/core/schemas/Schema.d.ts +8 -4
- package/core/schemas/Schema.js +1 -0
- package/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/core/schemas/builders/bigint/bigint.js +50 -0
- package/core/schemas/builders/bigint/index.d.ts +1 -0
- package/core/schemas/builders/bigint/index.js +5 -0
- package/core/schemas/builders/index.d.ts +1 -0
- package/core/schemas/builders/index.js +1 -0
- package/core/schemas/builders/lazy/lazy.d.ts +2 -2
- package/core/schemas/builders/lazy/lazy.js +8 -19
- package/core/schemas/builders/lazy/lazyObject.js +1 -10
- package/core/schemas/builders/list/list.js +31 -44
- package/core/schemas/builders/object/object.js +90 -111
- package/core/schemas/builders/object/types.d.ts +2 -2
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
- package/core/schemas/builders/record/record.js +49 -60
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
- package/core/schemas/builders/set/set.js +6 -15
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
- package/core/schemas/builders/union/union.js +51 -62
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
- package/core/schemas/utils/maybeSkipValidation.js +3 -12
- package/core/streaming-fetcher/Stream.js +6 -6
- package/dist/Client.d.ts +3 -0
- package/dist/api/resources/copilots/client/Client.d.ts +13 -10
- package/dist/api/resources/copilots/client/Client.js +52 -40
- package/dist/api/resources/copilots/client/requests/CreateCopilotRequest.d.ts +1 -1
- package/dist/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.d.ts +1 -1
- package/dist/api/resources/copilots/types/DataFilter.d.ts +1 -1
- package/dist/api/resources/copilots/types/FinalChunk.d.ts +1 -1
- package/dist/api/resources/copilots/types/StreamingChunk.d.ts +15 -1
- package/dist/api/resources/documentCatalog/client/Client.d.ts +7 -4
- package/dist/api/resources/documentCatalog/client/Client.js +13 -13
- package/dist/api/resources/documentCollections/client/Client.d.ts +14 -11
- package/dist/api/resources/documentCollections/client/Client.js +39 -29
- package/dist/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.d.ts +2 -2
- package/dist/api/resources/documentCollections/client/requests/CreateCollectionRequest.d.ts +1 -1
- package/dist/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.d.ts +2 -2
- package/dist/api/resources/permissionsService/client/Client.d.ts +8 -5
- package/dist/api/resources/permissionsService/client/Client.js +20 -14
- package/dist/api/resources/permissionsService/client/requests/CheckBulkResourcesAuthorizationForUserRequest.d.ts +1 -1
- package/dist/api/resources/permissionsService/client/requests/CheckResourceAuthorizationForUserRequest.d.ts +1 -1
- package/dist/api/resources/search/client/Client.d.ts +5 -2
- package/dist/api/resources/search/client/Client.js +7 -7
- package/dist/api/resources/search/client/requests/SearchDocumentCollectionRequest.d.ts +1 -1
- package/dist/api/resources/users/client/Client.d.ts +4 -1
- package/dist/api/resources/users/client/Client.js +5 -3
- package/dist/core/fetcher/Fetcher.d.ts +4 -1
- package/dist/core/fetcher/Fetcher.js +19 -176
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/core/fetcher/createRequestUrl.js +13 -0
- package/dist/core/fetcher/getFetchFn.d.ts +4 -0
- package/dist/core/fetcher/getFetchFn.js +59 -0
- package/dist/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/core/fetcher/getRequestBody.js +23 -0
- package/dist/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getResponseBody.js +55 -0
- package/dist/core/fetcher/makeRequest.d.ts +1 -0
- package/dist/core/fetcher/makeRequest.js +42 -0
- package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/core/fetcher/requestWithRetries.js +41 -0
- package/dist/core/fetcher/signals.d.ts +12 -0
- package/dist/core/fetcher/signals.js +37 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +50 -0
- package/dist/core/runtime/runtime.d.ts +2 -1
- package/dist/core/runtime/runtime.js +12 -1
- package/dist/core/schemas/Schema.d.ts +8 -4
- package/dist/core/schemas/Schema.js +1 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/dist/core/schemas/builders/bigint/bigint.js +50 -0
- package/dist/core/schemas/builders/bigint/index.d.ts +1 -0
- package/dist/core/schemas/builders/bigint/index.js +5 -0
- package/dist/core/schemas/builders/index.d.ts +1 -0
- package/dist/core/schemas/builders/index.js +1 -0
- package/dist/core/schemas/builders/lazy/lazy.d.ts +2 -2
- package/dist/core/schemas/builders/lazy/lazy.js +8 -19
- package/dist/core/schemas/builders/lazy/lazyObject.js +1 -10
- package/dist/core/schemas/builders/list/list.js +31 -44
- package/dist/core/schemas/builders/object/object.js +90 -111
- package/dist/core/schemas/builders/object/types.d.ts +2 -2
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
- package/dist/core/schemas/builders/record/record.js +49 -60
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
- package/dist/core/schemas/builders/set/set.js +6 -15
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
- package/dist/core/schemas/builders/union/union.js +51 -62
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
- package/dist/core/schemas/utils/maybeSkipValidation.js +3 -12
- package/dist/core/streaming-fetcher/Stream.js +6 -6
- package/dist/serialization/resources/copilots/types/DataFilter.d.ts +1 -1
- package/dist/serialization/resources/copilots/types/DataFilter.js +1 -1
- package/dist/serialization/resources/copilots/types/FinalChunk.d.ts +1 -1
- package/dist/serialization/resources/copilots/types/FinalChunk.js +1 -1
- package/dist/serialization/resources/copilots/types/StreamingChunk.d.ts +13 -1
- package/dist/serialization/resources/copilots/types/StreamingChunk.js +11 -1
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/package.json +12 -2
- package/reference.md +155 -534
- package/serialization/resources/copilots/types/DataFilter.d.ts +1 -1
- package/serialization/resources/copilots/types/DataFilter.js +1 -1
- package/serialization/resources/copilots/types/FinalChunk.d.ts +1 -1
- package/serialization/resources/copilots/types/FinalChunk.js +1 -1
- package/serialization/resources/copilots/types/StreamingChunk.d.ts +13 -1
- package/serialization/resources/copilots/types/StreamingChunk.js +11 -1
- package/version.d.ts +1 -0
- package/version.js +4 -0
package/reference.md
CHANGED
|
@@ -1,272 +1,215 @@
|
|
|
1
|
-
|
|
1
|
+
# Reference
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Copilots
|
|
4
4
|
|
|
5
|
+
<details><summary><code>client.copilots.<a href="/src/api/resources/copilots/client/Client.ts">createCopilot</a>({ ...params }) -> Credal.CreateCopilotResponse</code></summary>
|
|
5
6
|
<dl>
|
|
6
|
-
|
|
7
7
|
<dd>
|
|
8
8
|
|
|
9
9
|
#### 📝 Description
|
|
10
10
|
|
|
11
11
|
<dl>
|
|
12
|
-
|
|
13
12
|
<dd>
|
|
14
13
|
|
|
15
14
|
<dl>
|
|
16
|
-
|
|
17
15
|
<dd>
|
|
18
16
|
|
|
19
17
|
Create a new copilot. The API key used will be added to the copilot for future Requests
|
|
20
18
|
|
|
21
19
|
</dd>
|
|
22
|
-
|
|
23
20
|
</dl>
|
|
24
|
-
|
|
25
21
|
</dd>
|
|
26
|
-
|
|
27
22
|
</dl>
|
|
28
23
|
|
|
29
24
|
#### 🔌 Usage
|
|
30
25
|
|
|
31
26
|
<dl>
|
|
32
|
-
|
|
33
27
|
<dd>
|
|
34
28
|
|
|
35
29
|
<dl>
|
|
36
|
-
|
|
37
30
|
<dd>
|
|
38
31
|
|
|
39
|
-
```
|
|
40
|
-
await
|
|
32
|
+
```typescript
|
|
33
|
+
await client.copilots.createCopilot({
|
|
41
34
|
name: "Customer Copilot",
|
|
42
35
|
description: "This copilot is used to answer customer requests based on internal documentation.",
|
|
43
36
|
collaborators: [
|
|
44
37
|
{
|
|
45
38
|
email: "test@gmail.com",
|
|
46
|
-
role:
|
|
39
|
+
role: "editor",
|
|
47
40
|
},
|
|
48
41
|
],
|
|
49
42
|
});
|
|
50
43
|
```
|
|
51
44
|
|
|
52
45
|
</dd>
|
|
53
|
-
|
|
54
46
|
</dl>
|
|
55
|
-
|
|
56
47
|
</dd>
|
|
57
|
-
|
|
58
48
|
</dl>
|
|
59
49
|
|
|
60
50
|
#### ⚙️ Parameters
|
|
61
51
|
|
|
62
52
|
<dl>
|
|
63
|
-
|
|
64
53
|
<dd>
|
|
65
54
|
|
|
66
55
|
<dl>
|
|
67
|
-
|
|
68
56
|
<dd>
|
|
69
57
|
|
|
70
|
-
**request
|
|
58
|
+
**request:** `Credal.CreateCopilotRequest`
|
|
71
59
|
|
|
72
60
|
</dd>
|
|
73
|
-
|
|
74
61
|
</dl>
|
|
75
62
|
|
|
76
63
|
<dl>
|
|
77
|
-
|
|
78
64
|
<dd>
|
|
79
65
|
|
|
80
|
-
**requestOptions
|
|
66
|
+
**requestOptions:** `Copilots.RequestOptions`
|
|
81
67
|
|
|
82
68
|
</dd>
|
|
83
|
-
|
|
84
69
|
</dl>
|
|
85
|
-
|
|
86
70
|
</dd>
|
|
87
|
-
|
|
88
71
|
</dl>
|
|
89
72
|
|
|
90
73
|
</dd>
|
|
91
|
-
|
|
92
74
|
</dl>
|
|
93
75
|
</details>
|
|
94
76
|
|
|
95
|
-
<details><summary
|
|
96
|
-
|
|
77
|
+
<details><summary><code>client.copilots.<a href="/src/api/resources/copilots/client/Client.ts">createConversation</a>({ ...params }) -> Credal.CreateConversationResponse</code></summary>
|
|
97
78
|
<dl>
|
|
98
|
-
|
|
99
79
|
<dd>
|
|
100
80
|
|
|
101
81
|
#### 📝 Description
|
|
102
82
|
|
|
103
83
|
<dl>
|
|
104
|
-
|
|
105
84
|
<dd>
|
|
106
85
|
|
|
107
86
|
<dl>
|
|
108
|
-
|
|
109
87
|
<dd>
|
|
110
88
|
|
|
111
89
|
OPTIONAL. Create a new conversation with the Copilot. The conversation ID can be used in the `sendMessage` endpoint. The `sendMessage` endpoint automatically creates new conversations upon first request, but calling this endpoint can simplify certain use cases where it is helpful for the application to have the conversation ID before the first message is sent.
|
|
112
90
|
|
|
113
91
|
</dd>
|
|
114
|
-
|
|
115
92
|
</dl>
|
|
116
|
-
|
|
117
93
|
</dd>
|
|
118
|
-
|
|
119
94
|
</dl>
|
|
120
95
|
|
|
121
96
|
#### 🔌 Usage
|
|
122
97
|
|
|
123
98
|
<dl>
|
|
124
|
-
|
|
125
99
|
<dd>
|
|
126
100
|
|
|
127
101
|
<dl>
|
|
128
|
-
|
|
129
102
|
<dd>
|
|
130
103
|
|
|
131
|
-
```
|
|
132
|
-
await
|
|
104
|
+
```typescript
|
|
105
|
+
await client.copilots.createConversation({
|
|
133
106
|
agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
134
107
|
userEmail: "ravin@credal.ai",
|
|
135
108
|
});
|
|
136
109
|
```
|
|
137
110
|
|
|
138
111
|
</dd>
|
|
139
|
-
|
|
140
112
|
</dl>
|
|
141
|
-
|
|
142
113
|
</dd>
|
|
143
|
-
|
|
144
114
|
</dl>
|
|
145
115
|
|
|
146
116
|
#### ⚙️ Parameters
|
|
147
117
|
|
|
148
118
|
<dl>
|
|
149
|
-
|
|
150
119
|
<dd>
|
|
151
120
|
|
|
152
121
|
<dl>
|
|
153
|
-
|
|
154
122
|
<dd>
|
|
155
123
|
|
|
156
|
-
**request
|
|
124
|
+
**request:** `Credal.CreateConversationRequest`
|
|
157
125
|
|
|
158
126
|
</dd>
|
|
159
|
-
|
|
160
127
|
</dl>
|
|
161
128
|
|
|
162
129
|
<dl>
|
|
163
|
-
|
|
164
130
|
<dd>
|
|
165
131
|
|
|
166
|
-
**requestOptions
|
|
132
|
+
**requestOptions:** `Copilots.RequestOptions`
|
|
167
133
|
|
|
168
134
|
</dd>
|
|
169
|
-
|
|
170
135
|
</dl>
|
|
171
|
-
|
|
172
136
|
</dd>
|
|
173
|
-
|
|
174
137
|
</dl>
|
|
175
138
|
|
|
176
139
|
</dd>
|
|
177
|
-
|
|
178
140
|
</dl>
|
|
179
141
|
</details>
|
|
180
142
|
|
|
181
|
-
<details><summary
|
|
182
|
-
|
|
143
|
+
<details><summary><code>client.copilots.<a href="/src/api/resources/copilots/client/Client.ts">provideMessageFeedback</a>({ ...params }) -> void</code></summary>
|
|
183
144
|
<dl>
|
|
184
|
-
|
|
185
145
|
<dd>
|
|
186
146
|
|
|
187
147
|
#### 🔌 Usage
|
|
188
148
|
|
|
189
149
|
<dl>
|
|
190
|
-
|
|
191
150
|
<dd>
|
|
192
151
|
|
|
193
152
|
<dl>
|
|
194
|
-
|
|
195
153
|
<dd>
|
|
196
154
|
|
|
197
|
-
```
|
|
198
|
-
await
|
|
155
|
+
```typescript
|
|
156
|
+
await client.copilots.provideMessageFeedback({
|
|
199
157
|
userEmail: "ravin@credal.ai",
|
|
200
158
|
messageId: "dd721cd8-4bf2-4b94-9869-258df3dab9dc",
|
|
201
159
|
agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
202
160
|
messageFeedback: {
|
|
203
|
-
feedback:
|
|
161
|
+
feedback: "NEGATIVE",
|
|
204
162
|
suggestedAnswer: "Yes, Credal is SOC 2 compliant.",
|
|
205
163
|
},
|
|
206
164
|
});
|
|
207
165
|
```
|
|
208
166
|
|
|
209
167
|
</dd>
|
|
210
|
-
|
|
211
168
|
</dl>
|
|
212
|
-
|
|
213
169
|
</dd>
|
|
214
|
-
|
|
215
170
|
</dl>
|
|
216
171
|
|
|
217
172
|
#### ⚙️ Parameters
|
|
218
173
|
|
|
219
174
|
<dl>
|
|
220
|
-
|
|
221
175
|
<dd>
|
|
222
176
|
|
|
223
177
|
<dl>
|
|
224
|
-
|
|
225
178
|
<dd>
|
|
226
179
|
|
|
227
|
-
**request
|
|
180
|
+
**request:** `Credal.ProvideMessageFeedbackRequest`
|
|
228
181
|
|
|
229
182
|
</dd>
|
|
230
|
-
|
|
231
183
|
</dl>
|
|
232
184
|
|
|
233
185
|
<dl>
|
|
234
|
-
|
|
235
186
|
<dd>
|
|
236
187
|
|
|
237
|
-
**requestOptions
|
|
188
|
+
**requestOptions:** `Copilots.RequestOptions`
|
|
238
189
|
|
|
239
190
|
</dd>
|
|
240
|
-
|
|
241
191
|
</dl>
|
|
242
|
-
|
|
243
192
|
</dd>
|
|
244
|
-
|
|
245
193
|
</dl>
|
|
246
194
|
|
|
247
195
|
</dd>
|
|
248
|
-
|
|
249
196
|
</dl>
|
|
250
197
|
</details>
|
|
251
198
|
|
|
252
|
-
<details><summary
|
|
253
|
-
|
|
199
|
+
<details><summary><code>client.copilots.<a href="/src/api/resources/copilots/client/Client.ts">sendMessage</a>({ ...params }) -> Credal.SendAgentMessageResponse</code></summary>
|
|
254
200
|
<dl>
|
|
255
|
-
|
|
256
201
|
<dd>
|
|
257
202
|
|
|
258
203
|
#### 🔌 Usage
|
|
259
204
|
|
|
260
205
|
<dl>
|
|
261
|
-
|
|
262
206
|
<dd>
|
|
263
207
|
|
|
264
208
|
<dl>
|
|
265
|
-
|
|
266
209
|
<dd>
|
|
267
210
|
|
|
268
|
-
```
|
|
269
|
-
await
|
|
211
|
+
```typescript
|
|
212
|
+
await client.copilots.sendMessage({
|
|
270
213
|
agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
271
214
|
message: "Is Credal SOC 2 compliant?",
|
|
272
215
|
userEmail: "ravin@credal.ai",
|
|
@@ -284,319 +227,278 @@ await credal.copilots.sendMessage({
|
|
|
284
227
|
```
|
|
285
228
|
|
|
286
229
|
</dd>
|
|
287
|
-
|
|
288
230
|
</dl>
|
|
289
|
-
|
|
290
231
|
</dd>
|
|
291
|
-
|
|
292
232
|
</dl>
|
|
293
233
|
|
|
294
234
|
#### ⚙️ Parameters
|
|
295
235
|
|
|
296
236
|
<dl>
|
|
297
|
-
|
|
298
237
|
<dd>
|
|
299
238
|
|
|
300
239
|
<dl>
|
|
301
|
-
|
|
302
240
|
<dd>
|
|
303
241
|
|
|
304
|
-
**request
|
|
242
|
+
**request:** `Credal.SendMessageRequest`
|
|
305
243
|
|
|
306
244
|
</dd>
|
|
307
|
-
|
|
308
245
|
</dl>
|
|
309
246
|
|
|
310
247
|
<dl>
|
|
311
|
-
|
|
312
248
|
<dd>
|
|
313
249
|
|
|
314
|
-
**requestOptions
|
|
250
|
+
**requestOptions:** `Copilots.RequestOptions`
|
|
315
251
|
|
|
316
252
|
</dd>
|
|
317
|
-
|
|
318
253
|
</dl>
|
|
319
|
-
|
|
320
254
|
</dd>
|
|
321
|
-
|
|
322
255
|
</dl>
|
|
323
256
|
|
|
324
257
|
</dd>
|
|
325
|
-
|
|
326
258
|
</dl>
|
|
327
259
|
</details>
|
|
328
260
|
|
|
329
|
-
<details><summary
|
|
330
|
-
|
|
261
|
+
<details><summary><code>client.copilots.<a href="/src/api/resources/copilots/client/Client.ts">streamMessage</a>({ ...params }) -> core.Stream<Credal.StreamingChunk></code></summary>
|
|
331
262
|
<dl>
|
|
332
|
-
|
|
333
263
|
<dd>
|
|
334
264
|
|
|
335
265
|
#### 📝 Description
|
|
336
266
|
|
|
337
267
|
<dl>
|
|
338
|
-
|
|
339
268
|
<dd>
|
|
340
269
|
|
|
341
270
|
<dl>
|
|
342
|
-
|
|
343
271
|
<dd>
|
|
344
272
|
|
|
345
273
|
This endpoint allows you to send a message to a specific copilot and get the response back as a streamed set of Server-Sent Events.
|
|
346
274
|
|
|
347
275
|
</dd>
|
|
348
|
-
|
|
349
276
|
</dl>
|
|
350
|
-
|
|
351
277
|
</dd>
|
|
352
|
-
|
|
353
278
|
</dl>
|
|
354
279
|
|
|
355
|
-
####
|
|
280
|
+
#### 🔌 Usage
|
|
356
281
|
|
|
357
282
|
<dl>
|
|
358
|
-
|
|
359
283
|
<dd>
|
|
360
284
|
|
|
361
285
|
<dl>
|
|
362
|
-
|
|
363
286
|
<dd>
|
|
364
287
|
|
|
365
|
-
|
|
288
|
+
```typescript
|
|
289
|
+
const response = await client.copilots.streamMessage({
|
|
290
|
+
copilotId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
291
|
+
message: "Is Credal SOC 2 compliant?",
|
|
292
|
+
email: "ravin@credal.ai",
|
|
293
|
+
inputVariables: [
|
|
294
|
+
{
|
|
295
|
+
name: "input1",
|
|
296
|
+
urls: ["https://drive.google.com/file/d/123456/view"],
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
name: "input2",
|
|
300
|
+
urls: ["https://drive.google.com/file/d/123457/view", "https://drive.google.com/file/d/123458/view"],
|
|
301
|
+
},
|
|
302
|
+
],
|
|
303
|
+
});
|
|
304
|
+
for await (const item of response) {
|
|
305
|
+
console.log(item);
|
|
306
|
+
}
|
|
307
|
+
```
|
|
366
308
|
|
|
367
309
|
</dd>
|
|
368
|
-
|
|
369
310
|
</dl>
|
|
311
|
+
</dd>
|
|
312
|
+
</dl>
|
|
313
|
+
|
|
314
|
+
#### ⚙️ Parameters
|
|
370
315
|
|
|
371
316
|
<dl>
|
|
317
|
+
<dd>
|
|
372
318
|
|
|
319
|
+
<dl>
|
|
373
320
|
<dd>
|
|
374
321
|
|
|
375
|
-
**
|
|
322
|
+
**request:** `Credal.StreamMessageRequest`
|
|
376
323
|
|
|
377
324
|
</dd>
|
|
378
|
-
|
|
379
325
|
</dl>
|
|
380
326
|
|
|
381
|
-
|
|
327
|
+
<dl>
|
|
328
|
+
<dd>
|
|
382
329
|
|
|
383
|
-
|
|
330
|
+
**requestOptions:** `Copilots.RequestOptions`
|
|
384
331
|
|
|
385
332
|
</dd>
|
|
333
|
+
</dl>
|
|
334
|
+
</dd>
|
|
335
|
+
</dl>
|
|
386
336
|
|
|
337
|
+
</dd>
|
|
387
338
|
</dl>
|
|
388
339
|
</details>
|
|
389
340
|
|
|
390
|
-
<details><summary
|
|
391
|
-
|
|
341
|
+
<details><summary><code>client.copilots.<a href="/src/api/resources/copilots/client/Client.ts">addCollectionToCopilot</a>({ ...params }) -> void</code></summary>
|
|
392
342
|
<dl>
|
|
393
|
-
|
|
394
343
|
<dd>
|
|
395
344
|
|
|
396
345
|
#### 📝 Description
|
|
397
346
|
|
|
398
347
|
<dl>
|
|
399
|
-
|
|
400
348
|
<dd>
|
|
401
349
|
|
|
402
350
|
<dl>
|
|
403
|
-
|
|
404
351
|
<dd>
|
|
405
352
|
|
|
406
353
|
Link a collection with a copilot. The API Key used must be added to both the collection and the copilot beforehand.
|
|
407
354
|
|
|
408
355
|
</dd>
|
|
409
|
-
|
|
410
356
|
</dl>
|
|
411
|
-
|
|
412
357
|
</dd>
|
|
413
|
-
|
|
414
358
|
</dl>
|
|
415
359
|
|
|
416
360
|
#### 🔌 Usage
|
|
417
361
|
|
|
418
362
|
<dl>
|
|
419
|
-
|
|
420
363
|
<dd>
|
|
421
364
|
|
|
422
365
|
<dl>
|
|
423
|
-
|
|
424
366
|
<dd>
|
|
425
367
|
|
|
426
|
-
```
|
|
427
|
-
await
|
|
368
|
+
```typescript
|
|
369
|
+
await client.copilots.addCollectionToCopilot({
|
|
428
370
|
copilotId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
429
371
|
collectionId: "def1055f-83c5-43d6-b558-f7a38e7b299e",
|
|
430
372
|
});
|
|
431
373
|
```
|
|
432
374
|
|
|
433
375
|
</dd>
|
|
434
|
-
|
|
435
376
|
</dl>
|
|
436
|
-
|
|
437
377
|
</dd>
|
|
438
|
-
|
|
439
378
|
</dl>
|
|
440
379
|
|
|
441
380
|
#### ⚙️ Parameters
|
|
442
381
|
|
|
443
382
|
<dl>
|
|
444
|
-
|
|
445
383
|
<dd>
|
|
446
384
|
|
|
447
385
|
<dl>
|
|
448
|
-
|
|
449
386
|
<dd>
|
|
450
387
|
|
|
451
|
-
**request
|
|
388
|
+
**request:** `Credal.AddCollectionToCopilotRequest`
|
|
452
389
|
|
|
453
390
|
</dd>
|
|
454
|
-
|
|
455
391
|
</dl>
|
|
456
392
|
|
|
457
393
|
<dl>
|
|
458
|
-
|
|
459
394
|
<dd>
|
|
460
395
|
|
|
461
|
-
**requestOptions
|
|
396
|
+
**requestOptions:** `Copilots.RequestOptions`
|
|
462
397
|
|
|
463
398
|
</dd>
|
|
464
|
-
|
|
465
399
|
</dl>
|
|
466
|
-
|
|
467
400
|
</dd>
|
|
468
|
-
|
|
469
401
|
</dl>
|
|
470
402
|
|
|
471
403
|
</dd>
|
|
472
|
-
|
|
473
404
|
</dl>
|
|
474
405
|
</details>
|
|
475
406
|
|
|
476
|
-
<details><summary
|
|
477
|
-
|
|
407
|
+
<details><summary><code>client.copilots.<a href="/src/api/resources/copilots/client/Client.ts">removeCollectionFromCopilot</a>({ ...params }) -> void</code></summary>
|
|
478
408
|
<dl>
|
|
479
|
-
|
|
480
409
|
<dd>
|
|
481
410
|
|
|
482
411
|
#### 📝 Description
|
|
483
412
|
|
|
484
413
|
<dl>
|
|
485
|
-
|
|
486
414
|
<dd>
|
|
487
415
|
|
|
488
416
|
<dl>
|
|
489
|
-
|
|
490
417
|
<dd>
|
|
491
418
|
|
|
492
419
|
Unlink a collection with a copilot. The API Key used must be added to both the collection and the copilot beforehand.
|
|
493
420
|
|
|
494
421
|
</dd>
|
|
495
|
-
|
|
496
422
|
</dl>
|
|
497
|
-
|
|
498
423
|
</dd>
|
|
499
|
-
|
|
500
424
|
</dl>
|
|
501
425
|
|
|
502
426
|
#### 🔌 Usage
|
|
503
427
|
|
|
504
428
|
<dl>
|
|
505
|
-
|
|
506
429
|
<dd>
|
|
507
430
|
|
|
508
431
|
<dl>
|
|
509
|
-
|
|
510
432
|
<dd>
|
|
511
433
|
|
|
512
|
-
```
|
|
513
|
-
await
|
|
434
|
+
```typescript
|
|
435
|
+
await client.copilots.removeCollectionFromCopilot({
|
|
514
436
|
copilotId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
515
437
|
collectionId: "def1055f-83c5-43d6-b558-f7a38e7b299e",
|
|
516
438
|
});
|
|
517
439
|
```
|
|
518
440
|
|
|
519
441
|
</dd>
|
|
520
|
-
|
|
521
442
|
</dl>
|
|
522
|
-
|
|
523
443
|
</dd>
|
|
524
|
-
|
|
525
444
|
</dl>
|
|
526
445
|
|
|
527
446
|
#### ⚙️ Parameters
|
|
528
447
|
|
|
529
448
|
<dl>
|
|
530
|
-
|
|
531
449
|
<dd>
|
|
532
450
|
|
|
533
451
|
<dl>
|
|
534
|
-
|
|
535
452
|
<dd>
|
|
536
453
|
|
|
537
|
-
**request
|
|
454
|
+
**request:** `Credal.RemoveCollectionFromCopilotRequest`
|
|
538
455
|
|
|
539
456
|
</dd>
|
|
540
|
-
|
|
541
457
|
</dl>
|
|
542
458
|
|
|
543
459
|
<dl>
|
|
544
|
-
|
|
545
460
|
<dd>
|
|
546
461
|
|
|
547
|
-
**requestOptions
|
|
462
|
+
**requestOptions:** `Copilots.RequestOptions`
|
|
548
463
|
|
|
549
464
|
</dd>
|
|
550
|
-
|
|
551
465
|
</dl>
|
|
552
|
-
|
|
553
466
|
</dd>
|
|
554
|
-
|
|
555
467
|
</dl>
|
|
556
468
|
|
|
557
469
|
</dd>
|
|
558
|
-
|
|
559
470
|
</dl>
|
|
560
471
|
</details>
|
|
561
472
|
|
|
562
|
-
<details><summary
|
|
563
|
-
|
|
473
|
+
<details><summary><code>client.copilots.<a href="/src/api/resources/copilots/client/Client.ts">updateConfiguration</a>({ ...params }) -> void</code></summary>
|
|
564
474
|
<dl>
|
|
565
|
-
|
|
566
475
|
<dd>
|
|
567
476
|
|
|
568
477
|
#### 📝 Description
|
|
569
478
|
|
|
570
479
|
<dl>
|
|
571
|
-
|
|
572
480
|
<dd>
|
|
573
481
|
|
|
574
482
|
<dl>
|
|
575
|
-
|
|
576
483
|
<dd>
|
|
577
484
|
|
|
578
485
|
Update the configuration for a copilot
|
|
579
486
|
|
|
580
487
|
</dd>
|
|
581
|
-
|
|
582
488
|
</dl>
|
|
583
|
-
|
|
584
489
|
</dd>
|
|
585
|
-
|
|
586
490
|
</dl>
|
|
587
491
|
|
|
588
492
|
#### 🔌 Usage
|
|
589
493
|
|
|
590
494
|
<dl>
|
|
591
|
-
|
|
592
495
|
<dd>
|
|
593
496
|
|
|
594
497
|
<dl>
|
|
595
|
-
|
|
596
498
|
<dd>
|
|
597
499
|
|
|
598
|
-
```
|
|
599
|
-
await
|
|
500
|
+
```typescript
|
|
501
|
+
await client.copilots.updateConfiguration({
|
|
600
502
|
copilotId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
601
503
|
configuration: {
|
|
602
504
|
name: "Customer Copilot",
|
|
@@ -611,133 +513,103 @@ await credal.copilots.updateConfiguration({
|
|
|
611
513
|
```
|
|
612
514
|
|
|
613
515
|
</dd>
|
|
614
|
-
|
|
615
516
|
</dl>
|
|
616
|
-
|
|
617
517
|
</dd>
|
|
618
|
-
|
|
619
518
|
</dl>
|
|
620
519
|
|
|
621
520
|
#### ⚙️ Parameters
|
|
622
521
|
|
|
623
522
|
<dl>
|
|
624
|
-
|
|
625
523
|
<dd>
|
|
626
524
|
|
|
627
525
|
<dl>
|
|
628
|
-
|
|
629
526
|
<dd>
|
|
630
527
|
|
|
631
|
-
**request
|
|
528
|
+
**request:** `Credal.UpdateConfigurationRequest`
|
|
632
529
|
|
|
633
530
|
</dd>
|
|
634
|
-
|
|
635
531
|
</dl>
|
|
636
532
|
|
|
637
533
|
<dl>
|
|
638
|
-
|
|
639
534
|
<dd>
|
|
640
535
|
|
|
641
|
-
**requestOptions
|
|
536
|
+
**requestOptions:** `Copilots.RequestOptions`
|
|
642
537
|
|
|
643
538
|
</dd>
|
|
644
|
-
|
|
645
539
|
</dl>
|
|
646
|
-
|
|
647
540
|
</dd>
|
|
648
|
-
|
|
649
541
|
</dl>
|
|
650
542
|
|
|
651
543
|
</dd>
|
|
652
|
-
|
|
653
544
|
</dl>
|
|
654
545
|
</details>
|
|
655
546
|
|
|
656
|
-
<details><summary
|
|
657
|
-
|
|
547
|
+
<details><summary><code>client.copilots.<a href="/src/api/resources/copilots/client/Client.ts">deleteCopilot</a>({ ...params }) -> Credal.DeleteCopilotResponse</code></summary>
|
|
658
548
|
<dl>
|
|
659
|
-
|
|
660
549
|
<dd>
|
|
661
550
|
|
|
662
551
|
#### 🔌 Usage
|
|
663
552
|
|
|
664
553
|
<dl>
|
|
665
|
-
|
|
666
554
|
<dd>
|
|
667
555
|
|
|
668
556
|
<dl>
|
|
669
|
-
|
|
670
557
|
<dd>
|
|
671
558
|
|
|
672
|
-
```
|
|
673
|
-
await
|
|
559
|
+
```typescript
|
|
560
|
+
await client.copilots.deleteCopilot({
|
|
674
561
|
id: "ac20e6ba-0bae-11ef-b25a-efca73df4c3a",
|
|
675
562
|
});
|
|
676
563
|
```
|
|
677
564
|
|
|
678
565
|
</dd>
|
|
679
|
-
|
|
680
566
|
</dl>
|
|
681
|
-
|
|
682
567
|
</dd>
|
|
683
|
-
|
|
684
568
|
</dl>
|
|
685
569
|
|
|
686
570
|
#### ⚙️ Parameters
|
|
687
571
|
|
|
688
572
|
<dl>
|
|
689
|
-
|
|
690
573
|
<dd>
|
|
691
574
|
|
|
692
575
|
<dl>
|
|
693
|
-
|
|
694
576
|
<dd>
|
|
695
577
|
|
|
696
|
-
**request
|
|
578
|
+
**request:** `Credal.DeleteCopilotRequest`
|
|
697
579
|
|
|
698
580
|
</dd>
|
|
699
|
-
|
|
700
581
|
</dl>
|
|
701
582
|
|
|
702
583
|
<dl>
|
|
703
|
-
|
|
704
584
|
<dd>
|
|
705
585
|
|
|
706
|
-
**requestOptions
|
|
586
|
+
**requestOptions:** `Copilots.RequestOptions`
|
|
707
587
|
|
|
708
588
|
</dd>
|
|
709
|
-
|
|
710
589
|
</dl>
|
|
711
|
-
|
|
712
590
|
</dd>
|
|
713
|
-
|
|
714
591
|
</dl>
|
|
715
592
|
|
|
716
593
|
</dd>
|
|
717
|
-
|
|
718
594
|
</dl>
|
|
719
595
|
</details>
|
|
720
596
|
|
|
721
597
|
## DocumentCatalog
|
|
722
598
|
|
|
723
|
-
<details><summary
|
|
724
|
-
|
|
599
|
+
<details><summary><code>client.documentCatalog.<a href="/src/api/resources/documentCatalog/client/Client.ts">uploadDocumentContents</a>({ ...params }) -> Credal.UploadDocumentResponse</code></summary>
|
|
725
600
|
<dl>
|
|
726
|
-
|
|
727
601
|
<dd>
|
|
728
602
|
|
|
729
603
|
#### 🔌 Usage
|
|
730
604
|
|
|
731
605
|
<dl>
|
|
732
|
-
|
|
733
606
|
<dd>
|
|
734
607
|
|
|
735
608
|
<dl>
|
|
736
|
-
|
|
737
609
|
<dd>
|
|
738
610
|
|
|
739
|
-
```
|
|
740
|
-
await
|
|
611
|
+
```typescript
|
|
612
|
+
await client.documentCatalog.uploadDocumentContents({
|
|
741
613
|
documentName: "My Document",
|
|
742
614
|
documentContents:
|
|
743
615
|
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
|
|
@@ -748,86 +620,66 @@ await credal.documentCatalog.uploadDocumentContents({
|
|
|
748
620
|
```
|
|
749
621
|
|
|
750
622
|
</dd>
|
|
751
|
-
|
|
752
623
|
</dl>
|
|
753
|
-
|
|
754
624
|
</dd>
|
|
755
|
-
|
|
756
625
|
</dl>
|
|
757
626
|
|
|
758
627
|
#### ⚙️ Parameters
|
|
759
628
|
|
|
760
629
|
<dl>
|
|
761
|
-
|
|
762
630
|
<dd>
|
|
763
631
|
|
|
764
632
|
<dl>
|
|
765
|
-
|
|
766
633
|
<dd>
|
|
767
634
|
|
|
768
|
-
**request
|
|
635
|
+
**request:** `Credal.UploadDocumentContentsRequest`
|
|
769
636
|
|
|
770
637
|
</dd>
|
|
771
|
-
|
|
772
638
|
</dl>
|
|
773
639
|
|
|
774
640
|
<dl>
|
|
775
|
-
|
|
776
641
|
<dd>
|
|
777
642
|
|
|
778
|
-
**requestOptions
|
|
643
|
+
**requestOptions:** `DocumentCatalog.RequestOptions`
|
|
779
644
|
|
|
780
645
|
</dd>
|
|
781
|
-
|
|
782
646
|
</dl>
|
|
783
|
-
|
|
784
647
|
</dd>
|
|
785
|
-
|
|
786
648
|
</dl>
|
|
787
649
|
|
|
788
650
|
</dd>
|
|
789
|
-
|
|
790
651
|
</dl>
|
|
791
652
|
</details>
|
|
792
653
|
|
|
793
|
-
<details><summary
|
|
794
|
-
|
|
654
|
+
<details><summary><code>client.documentCatalog.<a href="/src/api/resources/documentCatalog/client/Client.ts">metadata</a>({ ...params }) -> void</code></summary>
|
|
795
655
|
<dl>
|
|
796
|
-
|
|
797
656
|
<dd>
|
|
798
657
|
|
|
799
658
|
#### 📝 Description
|
|
800
659
|
|
|
801
660
|
<dl>
|
|
802
|
-
|
|
803
661
|
<dd>
|
|
804
662
|
|
|
805
663
|
<dl>
|
|
806
|
-
|
|
807
664
|
<dd>
|
|
808
665
|
|
|
809
666
|
Bulk patch metadata for documents, synced natively by Credal or manual API uploads
|
|
810
667
|
|
|
811
668
|
</dd>
|
|
812
|
-
|
|
813
669
|
</dl>
|
|
814
|
-
|
|
815
670
|
</dd>
|
|
816
|
-
|
|
817
671
|
</dl>
|
|
818
672
|
|
|
819
673
|
#### 🔌 Usage
|
|
820
674
|
|
|
821
675
|
<dl>
|
|
822
|
-
|
|
823
676
|
<dd>
|
|
824
677
|
|
|
825
678
|
<dl>
|
|
826
|
-
|
|
827
679
|
<dd>
|
|
828
680
|
|
|
829
|
-
```
|
|
830
|
-
await
|
|
681
|
+
```typescript
|
|
682
|
+
await client.documentCatalog.metadata({
|
|
831
683
|
sources: [
|
|
832
684
|
{
|
|
833
685
|
metadata: {
|
|
@@ -837,7 +689,7 @@ await credal.documentCatalog.metadata({
|
|
|
837
689
|
resourceIdentifier: {
|
|
838
690
|
type: "external-resource-id",
|
|
839
691
|
externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
|
|
840
|
-
resourceType:
|
|
692
|
+
resourceType: "GOOGLE_DRIVE_ITEM",
|
|
841
693
|
},
|
|
842
694
|
},
|
|
843
695
|
{
|
|
@@ -848,7 +700,7 @@ await credal.documentCatalog.metadata({
|
|
|
848
700
|
resourceIdentifier: {
|
|
849
701
|
type: "external-resource-id",
|
|
850
702
|
externalResourceId: "123456",
|
|
851
|
-
resourceType:
|
|
703
|
+
resourceType: "ZENDESK_TICKET",
|
|
852
704
|
},
|
|
853
705
|
},
|
|
854
706
|
],
|
|
@@ -857,459 +709,359 @@ await credal.documentCatalog.metadata({
|
|
|
857
709
|
```
|
|
858
710
|
|
|
859
711
|
</dd>
|
|
860
|
-
|
|
861
712
|
</dl>
|
|
862
|
-
|
|
863
713
|
</dd>
|
|
864
|
-
|
|
865
714
|
</dl>
|
|
866
715
|
|
|
867
716
|
#### ⚙️ Parameters
|
|
868
717
|
|
|
869
718
|
<dl>
|
|
870
|
-
|
|
871
719
|
<dd>
|
|
872
720
|
|
|
873
721
|
<dl>
|
|
874
|
-
|
|
875
722
|
<dd>
|
|
876
723
|
|
|
877
|
-
**request
|
|
724
|
+
**request:** `Credal.DocumentMetadataPatchRequest`
|
|
878
725
|
|
|
879
726
|
</dd>
|
|
880
|
-
|
|
881
727
|
</dl>
|
|
882
728
|
|
|
883
729
|
<dl>
|
|
884
|
-
|
|
885
730
|
<dd>
|
|
886
731
|
|
|
887
|
-
**requestOptions
|
|
732
|
+
**requestOptions:** `DocumentCatalog.RequestOptions`
|
|
888
733
|
|
|
889
734
|
</dd>
|
|
890
|
-
|
|
891
735
|
</dl>
|
|
892
|
-
|
|
893
736
|
</dd>
|
|
894
|
-
|
|
895
737
|
</dl>
|
|
896
738
|
|
|
897
739
|
</dd>
|
|
898
|
-
|
|
899
740
|
</dl>
|
|
900
741
|
</details>
|
|
901
742
|
|
|
902
743
|
## DocumentCollections
|
|
903
744
|
|
|
904
|
-
<details><summary
|
|
905
|
-
|
|
745
|
+
<details><summary><code>client.documentCollections.<a href="/src/api/resources/documentCollections/client/Client.ts">addDocumentsToCollection</a>({ ...params }) -> void</code></summary>
|
|
906
746
|
<dl>
|
|
907
|
-
|
|
908
747
|
<dd>
|
|
909
748
|
|
|
910
749
|
#### 📝 Description
|
|
911
750
|
|
|
912
751
|
<dl>
|
|
913
|
-
|
|
914
752
|
<dd>
|
|
915
753
|
|
|
916
754
|
<dl>
|
|
917
|
-
|
|
918
755
|
<dd>
|
|
919
756
|
|
|
920
757
|
Add documents to a document collection. Note that the documents must already exist in the document catalog to use this endpoint. If you want to upload a new document to a collection, use the `uploadDocumentContents` endpoint.
|
|
921
758
|
|
|
922
759
|
</dd>
|
|
923
|
-
|
|
924
760
|
</dl>
|
|
925
|
-
|
|
926
761
|
</dd>
|
|
927
|
-
|
|
928
762
|
</dl>
|
|
929
763
|
|
|
930
764
|
#### 🔌 Usage
|
|
931
765
|
|
|
932
766
|
<dl>
|
|
933
|
-
|
|
934
767
|
<dd>
|
|
935
768
|
|
|
936
769
|
<dl>
|
|
937
|
-
|
|
938
770
|
<dd>
|
|
939
771
|
|
|
940
|
-
```
|
|
941
|
-
await
|
|
772
|
+
```typescript
|
|
773
|
+
await client.documentCollections.addDocumentsToCollection({
|
|
942
774
|
collectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
943
775
|
resourceIdentifiers: [
|
|
944
776
|
{
|
|
945
777
|
type: "external-resource-id",
|
|
946
778
|
externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
|
|
947
|
-
resourceType:
|
|
779
|
+
resourceType: "GOOGLE_DRIVE_ITEM",
|
|
948
780
|
},
|
|
949
781
|
{
|
|
950
782
|
type: "external-resource-id",
|
|
951
783
|
externalResourceId: "398KAHdfkjsdf09r54UvyslPVWkQFOA0lOiu34in923",
|
|
952
|
-
resourceType:
|
|
784
|
+
resourceType: "GOOGLE_DRIVE_ITEM",
|
|
953
785
|
},
|
|
954
786
|
],
|
|
955
787
|
});
|
|
956
788
|
```
|
|
957
789
|
|
|
958
790
|
</dd>
|
|
959
|
-
|
|
960
791
|
</dl>
|
|
961
|
-
|
|
962
792
|
</dd>
|
|
963
|
-
|
|
964
793
|
</dl>
|
|
965
794
|
|
|
966
795
|
#### ⚙️ Parameters
|
|
967
796
|
|
|
968
797
|
<dl>
|
|
969
|
-
|
|
970
798
|
<dd>
|
|
971
799
|
|
|
972
800
|
<dl>
|
|
973
|
-
|
|
974
801
|
<dd>
|
|
975
802
|
|
|
976
|
-
**request
|
|
803
|
+
**request:** `Credal.AddDocumentsToCollectionRequest`
|
|
977
804
|
|
|
978
805
|
</dd>
|
|
979
|
-
|
|
980
806
|
</dl>
|
|
981
807
|
|
|
982
808
|
<dl>
|
|
983
|
-
|
|
984
809
|
<dd>
|
|
985
810
|
|
|
986
|
-
**requestOptions
|
|
811
|
+
**requestOptions:** `DocumentCollections.RequestOptions`
|
|
987
812
|
|
|
988
813
|
</dd>
|
|
989
|
-
|
|
990
814
|
</dl>
|
|
991
|
-
|
|
992
815
|
</dd>
|
|
993
|
-
|
|
994
816
|
</dl>
|
|
995
817
|
|
|
996
818
|
</dd>
|
|
997
|
-
|
|
998
819
|
</dl>
|
|
999
820
|
</details>
|
|
1000
821
|
|
|
1001
|
-
<details><summary
|
|
1002
|
-
|
|
822
|
+
<details><summary><code>client.documentCollections.<a href="/src/api/resources/documentCollections/client/Client.ts">removeDocumentsFromCollection</a>({ ...params }) -> void</code></summary>
|
|
1003
823
|
<dl>
|
|
1004
|
-
|
|
1005
824
|
<dd>
|
|
1006
825
|
|
|
1007
826
|
#### 📝 Description
|
|
1008
827
|
|
|
1009
828
|
<dl>
|
|
1010
|
-
|
|
1011
829
|
<dd>
|
|
1012
830
|
|
|
1013
831
|
<dl>
|
|
1014
|
-
|
|
1015
832
|
<dd>
|
|
1016
833
|
|
|
1017
834
|
Remove documents from a collection
|
|
1018
835
|
|
|
1019
836
|
</dd>
|
|
1020
|
-
|
|
1021
837
|
</dl>
|
|
1022
|
-
|
|
1023
838
|
</dd>
|
|
1024
|
-
|
|
1025
839
|
</dl>
|
|
1026
840
|
|
|
1027
841
|
#### 🔌 Usage
|
|
1028
842
|
|
|
1029
843
|
<dl>
|
|
1030
|
-
|
|
1031
844
|
<dd>
|
|
1032
845
|
|
|
1033
846
|
<dl>
|
|
1034
|
-
|
|
1035
847
|
<dd>
|
|
1036
848
|
|
|
1037
|
-
```
|
|
1038
|
-
await
|
|
849
|
+
```typescript
|
|
850
|
+
await client.documentCollections.removeDocumentsFromCollection({
|
|
1039
851
|
collectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
1040
852
|
resourceIdentifiers: [
|
|
1041
853
|
{
|
|
1042
854
|
type: "external-resource-id",
|
|
1043
855
|
externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
|
|
1044
|
-
resourceType:
|
|
856
|
+
resourceType: "GOOGLE_DRIVE_ITEM",
|
|
1045
857
|
},
|
|
1046
858
|
{
|
|
1047
859
|
type: "external-resource-id",
|
|
1048
860
|
externalResourceId: "398KAHdfkjsdf09r54UvyslPVWkQFOA0lOiu34in923",
|
|
1049
|
-
resourceType:
|
|
861
|
+
resourceType: "GOOGLE_DRIVE_ITEM",
|
|
1050
862
|
},
|
|
1051
863
|
],
|
|
1052
864
|
});
|
|
1053
865
|
```
|
|
1054
866
|
|
|
1055
867
|
</dd>
|
|
1056
|
-
|
|
1057
868
|
</dl>
|
|
1058
|
-
|
|
1059
869
|
</dd>
|
|
1060
|
-
|
|
1061
870
|
</dl>
|
|
1062
871
|
|
|
1063
872
|
#### ⚙️ Parameters
|
|
1064
873
|
|
|
1065
874
|
<dl>
|
|
1066
|
-
|
|
1067
875
|
<dd>
|
|
1068
876
|
|
|
1069
877
|
<dl>
|
|
1070
|
-
|
|
1071
878
|
<dd>
|
|
1072
879
|
|
|
1073
|
-
**request
|
|
880
|
+
**request:** `Credal.RemoveDocumentsFromCollectionRequest`
|
|
1074
881
|
|
|
1075
882
|
</dd>
|
|
1076
|
-
|
|
1077
883
|
</dl>
|
|
1078
884
|
|
|
1079
885
|
<dl>
|
|
1080
|
-
|
|
1081
886
|
<dd>
|
|
1082
887
|
|
|
1083
|
-
**requestOptions
|
|
888
|
+
**requestOptions:** `DocumentCollections.RequestOptions`
|
|
1084
889
|
|
|
1085
890
|
</dd>
|
|
1086
|
-
|
|
1087
891
|
</dl>
|
|
1088
|
-
|
|
1089
892
|
</dd>
|
|
1090
|
-
|
|
1091
893
|
</dl>
|
|
1092
894
|
|
|
1093
895
|
</dd>
|
|
1094
|
-
|
|
1095
896
|
</dl>
|
|
1096
897
|
</details>
|
|
1097
898
|
|
|
1098
|
-
<details><summary
|
|
1099
|
-
|
|
899
|
+
<details><summary><code>client.documentCollections.<a href="/src/api/resources/documentCollections/client/Client.ts">createCollection</a>({ ...params }) -> Credal.CreateCollectionResponse</code></summary>
|
|
1100
900
|
<dl>
|
|
1101
|
-
|
|
1102
901
|
<dd>
|
|
1103
902
|
|
|
1104
903
|
#### 📝 Description
|
|
1105
904
|
|
|
1106
905
|
<dl>
|
|
1107
|
-
|
|
1108
906
|
<dd>
|
|
1109
907
|
|
|
1110
908
|
<dl>
|
|
1111
|
-
|
|
1112
909
|
<dd>
|
|
1113
910
|
|
|
1114
911
|
Create a new copilot. The API key used will be added to the copilot for future Requests
|
|
1115
912
|
|
|
1116
913
|
</dd>
|
|
1117
|
-
|
|
1118
914
|
</dl>
|
|
1119
|
-
|
|
1120
915
|
</dd>
|
|
1121
|
-
|
|
1122
916
|
</dl>
|
|
1123
917
|
|
|
1124
918
|
#### 🔌 Usage
|
|
1125
919
|
|
|
1126
920
|
<dl>
|
|
1127
|
-
|
|
1128
921
|
<dd>
|
|
1129
922
|
|
|
1130
923
|
<dl>
|
|
1131
|
-
|
|
1132
924
|
<dd>
|
|
1133
925
|
|
|
1134
|
-
```
|
|
1135
|
-
await
|
|
926
|
+
```typescript
|
|
927
|
+
await client.documentCollections.createCollection({
|
|
1136
928
|
name: "Customer Collection",
|
|
1137
929
|
description: "This collection is used to answer customer requests based on internal documentation.",
|
|
1138
930
|
collaborators: [
|
|
1139
931
|
{
|
|
1140
932
|
email: "test@gmail.com",
|
|
1141
|
-
role:
|
|
933
|
+
role: "editor",
|
|
1142
934
|
},
|
|
1143
935
|
],
|
|
1144
936
|
});
|
|
1145
937
|
```
|
|
1146
938
|
|
|
1147
939
|
</dd>
|
|
1148
|
-
|
|
1149
940
|
</dl>
|
|
1150
|
-
|
|
1151
941
|
</dd>
|
|
1152
|
-
|
|
1153
942
|
</dl>
|
|
1154
943
|
|
|
1155
944
|
#### ⚙️ Parameters
|
|
1156
945
|
|
|
1157
946
|
<dl>
|
|
1158
|
-
|
|
1159
947
|
<dd>
|
|
1160
948
|
|
|
1161
949
|
<dl>
|
|
1162
|
-
|
|
1163
950
|
<dd>
|
|
1164
951
|
|
|
1165
|
-
**request
|
|
952
|
+
**request:** `Credal.CreateCollectionRequest`
|
|
1166
953
|
|
|
1167
954
|
</dd>
|
|
1168
|
-
|
|
1169
955
|
</dl>
|
|
1170
956
|
|
|
1171
957
|
<dl>
|
|
1172
|
-
|
|
1173
958
|
<dd>
|
|
1174
959
|
|
|
1175
|
-
**requestOptions
|
|
960
|
+
**requestOptions:** `DocumentCollections.RequestOptions`
|
|
1176
961
|
|
|
1177
962
|
</dd>
|
|
1178
|
-
|
|
1179
963
|
</dl>
|
|
1180
|
-
|
|
1181
964
|
</dd>
|
|
1182
|
-
|
|
1183
965
|
</dl>
|
|
1184
966
|
|
|
1185
967
|
</dd>
|
|
1186
|
-
|
|
1187
968
|
</dl>
|
|
1188
969
|
</details>
|
|
1189
970
|
|
|
1190
|
-
<details><summary
|
|
1191
|
-
|
|
971
|
+
<details><summary><code>client.documentCollections.<a href="/src/api/resources/documentCollections/client/Client.ts">deleteCollection</a>({ ...params }) -> Credal.DeleteCollectionResponse</code></summary>
|
|
1192
972
|
<dl>
|
|
1193
|
-
|
|
1194
973
|
<dd>
|
|
1195
974
|
|
|
1196
975
|
#### 📝 Description
|
|
1197
976
|
|
|
1198
977
|
<dl>
|
|
1199
|
-
|
|
1200
978
|
<dd>
|
|
1201
979
|
|
|
1202
980
|
<dl>
|
|
1203
|
-
|
|
1204
981
|
<dd>
|
|
1205
982
|
|
|
1206
983
|
Delete the collection.
|
|
1207
984
|
|
|
1208
985
|
</dd>
|
|
1209
|
-
|
|
1210
986
|
</dl>
|
|
1211
|
-
|
|
1212
987
|
</dd>
|
|
1213
|
-
|
|
1214
988
|
</dl>
|
|
1215
989
|
|
|
1216
990
|
#### 🔌 Usage
|
|
1217
991
|
|
|
1218
992
|
<dl>
|
|
1219
|
-
|
|
1220
993
|
<dd>
|
|
1221
994
|
|
|
1222
995
|
<dl>
|
|
1223
|
-
|
|
1224
996
|
<dd>
|
|
1225
997
|
|
|
1226
|
-
```
|
|
1227
|
-
await
|
|
998
|
+
```typescript
|
|
999
|
+
await client.documentCollections.deleteCollection({
|
|
1228
1000
|
collectionId: "ac20e6ba-0bae-11ef-b25a-efca73df4c3a",
|
|
1229
1001
|
});
|
|
1230
1002
|
```
|
|
1231
1003
|
|
|
1232
1004
|
</dd>
|
|
1233
|
-
|
|
1234
1005
|
</dl>
|
|
1235
|
-
|
|
1236
1006
|
</dd>
|
|
1237
|
-
|
|
1238
1007
|
</dl>
|
|
1239
1008
|
|
|
1240
1009
|
#### ⚙️ Parameters
|
|
1241
1010
|
|
|
1242
1011
|
<dl>
|
|
1243
|
-
|
|
1244
1012
|
<dd>
|
|
1245
1013
|
|
|
1246
1014
|
<dl>
|
|
1247
|
-
|
|
1248
1015
|
<dd>
|
|
1249
1016
|
|
|
1250
|
-
**request
|
|
1017
|
+
**request:** `Credal.DeleteCollectionRequest`
|
|
1251
1018
|
|
|
1252
1019
|
</dd>
|
|
1253
|
-
|
|
1254
1020
|
</dl>
|
|
1255
1021
|
|
|
1256
1022
|
<dl>
|
|
1257
|
-
|
|
1258
1023
|
<dd>
|
|
1259
1024
|
|
|
1260
|
-
**requestOptions
|
|
1025
|
+
**requestOptions:** `DocumentCollections.RequestOptions`
|
|
1261
1026
|
|
|
1262
1027
|
</dd>
|
|
1263
|
-
|
|
1264
1028
|
</dl>
|
|
1265
|
-
|
|
1266
1029
|
</dd>
|
|
1267
|
-
|
|
1268
1030
|
</dl>
|
|
1269
1031
|
|
|
1270
1032
|
</dd>
|
|
1271
|
-
|
|
1272
1033
|
</dl>
|
|
1273
1034
|
</details>
|
|
1274
1035
|
|
|
1275
|
-
<details><summary
|
|
1276
|
-
|
|
1036
|
+
<details><summary><code>client.documentCollections.<a href="/src/api/resources/documentCollections/client/Client.ts">createMongoCollectionSync</a>({ ...params }) -> Credal.MongoCollectionSyncResponse</code></summary>
|
|
1277
1037
|
<dl>
|
|
1278
|
-
|
|
1279
1038
|
<dd>
|
|
1280
1039
|
|
|
1281
1040
|
#### 📝 Description
|
|
1282
1041
|
|
|
1283
1042
|
<dl>
|
|
1284
|
-
|
|
1285
1043
|
<dd>
|
|
1286
1044
|
|
|
1287
1045
|
<dl>
|
|
1288
|
-
|
|
1289
1046
|
<dd>
|
|
1290
1047
|
|
|
1291
1048
|
Credal lets you easily sync your MongoDB data for use in Collections and Copilots. Create a new sync from a MongoDB collection to a Credal collection.
|
|
1292
1049
|
|
|
1293
1050
|
</dd>
|
|
1294
|
-
|
|
1295
1051
|
</dl>
|
|
1296
|
-
|
|
1297
1052
|
</dd>
|
|
1298
|
-
|
|
1299
1053
|
</dl>
|
|
1300
1054
|
|
|
1301
1055
|
#### 🔌 Usage
|
|
1302
1056
|
|
|
1303
1057
|
<dl>
|
|
1304
|
-
|
|
1305
1058
|
<dd>
|
|
1306
1059
|
|
|
1307
1060
|
<dl>
|
|
1308
|
-
|
|
1309
1061
|
<dd>
|
|
1310
1062
|
|
|
1311
|
-
```
|
|
1312
|
-
await
|
|
1063
|
+
```typescript
|
|
1064
|
+
await client.documentCollections.createMongoCollectionSync({
|
|
1313
1065
|
mongoUri: "mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
|
|
1314
1066
|
collectionId: "ac20e6ba-0bae-11ef-b25a-efca73df4c3a",
|
|
1315
1067
|
config: {
|
|
@@ -1331,86 +1083,66 @@ await credal.documentCollections.createMongoCollectionSync({
|
|
|
1331
1083
|
```
|
|
1332
1084
|
|
|
1333
1085
|
</dd>
|
|
1334
|
-
|
|
1335
1086
|
</dl>
|
|
1336
|
-
|
|
1337
1087
|
</dd>
|
|
1338
|
-
|
|
1339
1088
|
</dl>
|
|
1340
1089
|
|
|
1341
1090
|
#### ⚙️ Parameters
|
|
1342
1091
|
|
|
1343
1092
|
<dl>
|
|
1344
|
-
|
|
1345
1093
|
<dd>
|
|
1346
1094
|
|
|
1347
1095
|
<dl>
|
|
1348
|
-
|
|
1349
1096
|
<dd>
|
|
1350
1097
|
|
|
1351
|
-
**request
|
|
1098
|
+
**request:** `Credal.CreateMongoCollectionSyncRequest`
|
|
1352
1099
|
|
|
1353
1100
|
</dd>
|
|
1354
|
-
|
|
1355
1101
|
</dl>
|
|
1356
1102
|
|
|
1357
1103
|
<dl>
|
|
1358
|
-
|
|
1359
1104
|
<dd>
|
|
1360
1105
|
|
|
1361
|
-
**requestOptions
|
|
1106
|
+
**requestOptions:** `DocumentCollections.RequestOptions`
|
|
1362
1107
|
|
|
1363
1108
|
</dd>
|
|
1364
|
-
|
|
1365
1109
|
</dl>
|
|
1366
|
-
|
|
1367
1110
|
</dd>
|
|
1368
|
-
|
|
1369
1111
|
</dl>
|
|
1370
1112
|
|
|
1371
1113
|
</dd>
|
|
1372
|
-
|
|
1373
1114
|
</dl>
|
|
1374
1115
|
</details>
|
|
1375
1116
|
|
|
1376
|
-
<details><summary
|
|
1377
|
-
|
|
1117
|
+
<details><summary><code>client.documentCollections.<a href="/src/api/resources/documentCollections/client/Client.ts">updateMongoCollectionSync</a>({ ...params }) -> Credal.MongoCollectionSyncResponse</code></summary>
|
|
1378
1118
|
<dl>
|
|
1379
|
-
|
|
1380
1119
|
<dd>
|
|
1381
1120
|
|
|
1382
1121
|
#### 📝 Description
|
|
1383
1122
|
|
|
1384
1123
|
<dl>
|
|
1385
|
-
|
|
1386
1124
|
<dd>
|
|
1387
1125
|
|
|
1388
1126
|
<dl>
|
|
1389
|
-
|
|
1390
1127
|
<dd>
|
|
1391
1128
|
|
|
1392
1129
|
Credal lets you easily sync your MongoDB data for use in Collections and Copilots. Update an existing sync from a MongoDB collection to a Credal collection via the `mongoCredentialId`, to disambiguate between multiple potential syncs to a given collection.
|
|
1393
1130
|
|
|
1394
1131
|
</dd>
|
|
1395
|
-
|
|
1396
1132
|
</dl>
|
|
1397
|
-
|
|
1398
1133
|
</dd>
|
|
1399
|
-
|
|
1400
1134
|
</dl>
|
|
1401
1135
|
|
|
1402
1136
|
#### 🔌 Usage
|
|
1403
1137
|
|
|
1404
1138
|
<dl>
|
|
1405
|
-
|
|
1406
1139
|
<dd>
|
|
1407
1140
|
|
|
1408
1141
|
<dl>
|
|
1409
|
-
|
|
1410
1142
|
<dd>
|
|
1411
1143
|
|
|
1412
|
-
```
|
|
1413
|
-
await
|
|
1144
|
+
```typescript
|
|
1145
|
+
await client.documentCollections.updateMongoCollectionSync({
|
|
1414
1146
|
mongoUri: "mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
|
|
1415
1147
|
mongoCredentialId: "5988ed76-6ee1-11ef-97dd-1fca54b7c4bc",
|
|
1416
1148
|
config: {
|
|
@@ -1432,178 +1164,138 @@ await credal.documentCollections.updateMongoCollectionSync({
|
|
|
1432
1164
|
```
|
|
1433
1165
|
|
|
1434
1166
|
</dd>
|
|
1435
|
-
|
|
1436
1167
|
</dl>
|
|
1437
|
-
|
|
1438
1168
|
</dd>
|
|
1439
|
-
|
|
1440
1169
|
</dl>
|
|
1441
1170
|
|
|
1442
1171
|
#### ⚙️ Parameters
|
|
1443
1172
|
|
|
1444
1173
|
<dl>
|
|
1445
|
-
|
|
1446
1174
|
<dd>
|
|
1447
1175
|
|
|
1448
1176
|
<dl>
|
|
1449
|
-
|
|
1450
1177
|
<dd>
|
|
1451
1178
|
|
|
1452
|
-
**request
|
|
1179
|
+
**request:** `Credal.UpdateMongoCollectionSyncRequest`
|
|
1453
1180
|
|
|
1454
1181
|
</dd>
|
|
1455
|
-
|
|
1456
1182
|
</dl>
|
|
1457
1183
|
|
|
1458
1184
|
<dl>
|
|
1459
|
-
|
|
1460
1185
|
<dd>
|
|
1461
1186
|
|
|
1462
|
-
**requestOptions
|
|
1187
|
+
**requestOptions:** `DocumentCollections.RequestOptions`
|
|
1463
1188
|
|
|
1464
1189
|
</dd>
|
|
1465
|
-
|
|
1466
1190
|
</dl>
|
|
1467
|
-
|
|
1468
1191
|
</dd>
|
|
1469
|
-
|
|
1470
1192
|
</dl>
|
|
1471
1193
|
|
|
1472
1194
|
</dd>
|
|
1473
|
-
|
|
1474
1195
|
</dl>
|
|
1475
1196
|
</details>
|
|
1476
1197
|
|
|
1477
1198
|
## PermissionsService
|
|
1478
1199
|
|
|
1479
|
-
<details><summary
|
|
1480
|
-
|
|
1200
|
+
<details><summary><code>client.permissionsService.<a href="/src/api/resources/permissionsService/client/Client.ts">checkResourceAuthorizationForUser</a>({ ...params }) -> Credal.CheckResourceAuthorizationResponse</code></summary>
|
|
1481
1201
|
<dl>
|
|
1482
|
-
|
|
1483
1202
|
<dd>
|
|
1484
1203
|
|
|
1485
1204
|
#### 📝 Description
|
|
1486
1205
|
|
|
1487
1206
|
<dl>
|
|
1488
|
-
|
|
1489
1207
|
<dd>
|
|
1490
1208
|
|
|
1491
1209
|
<dl>
|
|
1492
|
-
|
|
1493
1210
|
<dd>
|
|
1494
1211
|
|
|
1495
1212
|
Admin endpoint to check whether the specified user is authorized to read the specified resource.
|
|
1496
1213
|
|
|
1497
1214
|
</dd>
|
|
1498
|
-
|
|
1499
1215
|
</dl>
|
|
1500
|
-
|
|
1501
1216
|
</dd>
|
|
1502
|
-
|
|
1503
1217
|
</dl>
|
|
1504
1218
|
|
|
1505
1219
|
#### 🔌 Usage
|
|
1506
1220
|
|
|
1507
1221
|
<dl>
|
|
1508
|
-
|
|
1509
1222
|
<dd>
|
|
1510
1223
|
|
|
1511
1224
|
<dl>
|
|
1512
|
-
|
|
1513
1225
|
<dd>
|
|
1514
1226
|
|
|
1515
|
-
```
|
|
1516
|
-
await
|
|
1227
|
+
```typescript
|
|
1228
|
+
await client.permissionsService.checkResourceAuthorizationForUser({
|
|
1517
1229
|
resourceIdentifier: {
|
|
1518
1230
|
type: "external-resource-id",
|
|
1519
1231
|
externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
|
|
1520
|
-
resourceType:
|
|
1232
|
+
resourceType: "GOOGLE_DRIVE_ITEM",
|
|
1521
1233
|
},
|
|
1522
1234
|
userEmail: "john.smith@foo.com",
|
|
1523
1235
|
});
|
|
1524
1236
|
```
|
|
1525
1237
|
|
|
1526
1238
|
</dd>
|
|
1527
|
-
|
|
1528
1239
|
</dl>
|
|
1529
|
-
|
|
1530
1240
|
</dd>
|
|
1531
|
-
|
|
1532
1241
|
</dl>
|
|
1533
1242
|
|
|
1534
1243
|
#### ⚙️ Parameters
|
|
1535
1244
|
|
|
1536
1245
|
<dl>
|
|
1537
|
-
|
|
1538
1246
|
<dd>
|
|
1539
1247
|
|
|
1540
1248
|
<dl>
|
|
1541
|
-
|
|
1542
1249
|
<dd>
|
|
1543
1250
|
|
|
1544
|
-
**request
|
|
1251
|
+
**request:** `Credal.CheckResourceAuthorizationForUserRequest`
|
|
1545
1252
|
|
|
1546
1253
|
</dd>
|
|
1547
|
-
|
|
1548
1254
|
</dl>
|
|
1549
1255
|
|
|
1550
1256
|
<dl>
|
|
1551
|
-
|
|
1552
1257
|
<dd>
|
|
1553
1258
|
|
|
1554
|
-
**requestOptions
|
|
1259
|
+
**requestOptions:** `PermissionsService.RequestOptions`
|
|
1555
1260
|
|
|
1556
1261
|
</dd>
|
|
1557
|
-
|
|
1558
1262
|
</dl>
|
|
1559
|
-
|
|
1560
1263
|
</dd>
|
|
1561
|
-
|
|
1562
1264
|
</dl>
|
|
1563
1265
|
|
|
1564
1266
|
</dd>
|
|
1565
|
-
|
|
1566
1267
|
</dl>
|
|
1567
1268
|
</details>
|
|
1568
1269
|
|
|
1569
|
-
<details><summary
|
|
1570
|
-
|
|
1270
|
+
<details><summary><code>client.permissionsService.<a href="/src/api/resources/permissionsService/client/Client.ts">checkBulkResourcesAuthorizationForUser</a>({ ...params }) -> Credal.CheckBulkResourcesAuthorizationResponse</code></summary>
|
|
1571
1271
|
<dl>
|
|
1572
|
-
|
|
1573
1272
|
<dd>
|
|
1574
1273
|
|
|
1575
1274
|
#### 📝 Description
|
|
1576
1275
|
|
|
1577
1276
|
<dl>
|
|
1578
|
-
|
|
1579
1277
|
<dd>
|
|
1580
1278
|
|
|
1581
1279
|
<dl>
|
|
1582
|
-
|
|
1583
1280
|
<dd>
|
|
1584
1281
|
|
|
1585
1282
|
Admin endpoint to check whether the specified user is authorized to read the specified set of resources.
|
|
1586
1283
|
|
|
1587
1284
|
</dd>
|
|
1588
|
-
|
|
1589
1285
|
</dl>
|
|
1590
|
-
|
|
1591
1286
|
</dd>
|
|
1592
|
-
|
|
1593
1287
|
</dl>
|
|
1594
1288
|
|
|
1595
1289
|
#### 🔌 Usage
|
|
1596
1290
|
|
|
1597
1291
|
<dl>
|
|
1598
|
-
|
|
1599
1292
|
<dd>
|
|
1600
1293
|
|
|
1601
1294
|
<dl>
|
|
1602
|
-
|
|
1603
1295
|
<dd>
|
|
1604
1296
|
|
|
1605
|
-
```
|
|
1606
|
-
await
|
|
1297
|
+
```typescript
|
|
1298
|
+
await client.permissionsService.checkBulkResourcesAuthorizationForUser({
|
|
1607
1299
|
resourceIdentifiers: [
|
|
1608
1300
|
{
|
|
1609
1301
|
type: "url",
|
|
@@ -1612,7 +1304,7 @@ await credal.permissionsService.checkBulkResourcesAuthorizationForUser({
|
|
|
1612
1304
|
{
|
|
1613
1305
|
type: "external-resource-id",
|
|
1614
1306
|
externalResourceId: "sfsdfvr54UvyslPVWkQFOA0dfsdfsdflgNycFmdZJQr",
|
|
1615
|
-
resourceType:
|
|
1307
|
+
resourceType: "ZENDESK_TICKET",
|
|
1616
1308
|
},
|
|
1617
1309
|
],
|
|
1618
1310
|
userEmail: "john.smith@foo.com",
|
|
@@ -1620,179 +1312,139 @@ await credal.permissionsService.checkBulkResourcesAuthorizationForUser({
|
|
|
1620
1312
|
```
|
|
1621
1313
|
|
|
1622
1314
|
</dd>
|
|
1623
|
-
|
|
1624
1315
|
</dl>
|
|
1625
|
-
|
|
1626
1316
|
</dd>
|
|
1627
|
-
|
|
1628
1317
|
</dl>
|
|
1629
1318
|
|
|
1630
1319
|
#### ⚙️ Parameters
|
|
1631
1320
|
|
|
1632
1321
|
<dl>
|
|
1633
|
-
|
|
1634
1322
|
<dd>
|
|
1635
1323
|
|
|
1636
1324
|
<dl>
|
|
1637
|
-
|
|
1638
1325
|
<dd>
|
|
1639
1326
|
|
|
1640
|
-
**request
|
|
1327
|
+
**request:** `Credal.CheckBulkResourcesAuthorizationForUserRequest`
|
|
1641
1328
|
|
|
1642
1329
|
</dd>
|
|
1643
|
-
|
|
1644
1330
|
</dl>
|
|
1645
1331
|
|
|
1646
1332
|
<dl>
|
|
1647
|
-
|
|
1648
1333
|
<dd>
|
|
1649
1334
|
|
|
1650
|
-
**requestOptions
|
|
1335
|
+
**requestOptions:** `PermissionsService.RequestOptions`
|
|
1651
1336
|
|
|
1652
1337
|
</dd>
|
|
1653
|
-
|
|
1654
1338
|
</dl>
|
|
1655
|
-
|
|
1656
1339
|
</dd>
|
|
1657
|
-
|
|
1658
1340
|
</dl>
|
|
1659
1341
|
|
|
1660
1342
|
</dd>
|
|
1661
|
-
|
|
1662
1343
|
</dl>
|
|
1663
1344
|
</details>
|
|
1664
1345
|
|
|
1665
|
-
<details><summary
|
|
1666
|
-
|
|
1346
|
+
<details><summary><code>client.permissionsService.<a href="/src/api/resources/permissionsService/client/Client.ts">listCachedAuthorizedResourcesForUser</a>({ ...params }) -> Credal.AuthorizedResourceListPage</code></summary>
|
|
1667
1347
|
<dl>
|
|
1668
|
-
|
|
1669
1348
|
<dd>
|
|
1670
1349
|
|
|
1671
1350
|
#### 📝 Description
|
|
1672
1351
|
|
|
1673
1352
|
<dl>
|
|
1674
|
-
|
|
1675
1353
|
<dd>
|
|
1676
1354
|
|
|
1677
1355
|
<dl>
|
|
1678
|
-
|
|
1679
1356
|
<dd>
|
|
1680
1357
|
|
|
1681
1358
|
Admin endpoint to list all resources that the specified user is authorized to read. Note this endpoint returns cached results and may not be up-to-date. You can use the checkResourceAuthorizationForUser endpoint with disableCache set to true to get the most up-to-date results.
|
|
1682
1359
|
|
|
1683
1360
|
</dd>
|
|
1684
|
-
|
|
1685
1361
|
</dl>
|
|
1686
|
-
|
|
1687
1362
|
</dd>
|
|
1688
|
-
|
|
1689
1363
|
</dl>
|
|
1690
1364
|
|
|
1691
1365
|
#### 🔌 Usage
|
|
1692
1366
|
|
|
1693
1367
|
<dl>
|
|
1694
|
-
|
|
1695
1368
|
<dd>
|
|
1696
1369
|
|
|
1697
1370
|
<dl>
|
|
1698
|
-
|
|
1699
1371
|
<dd>
|
|
1700
1372
|
|
|
1701
|
-
```
|
|
1702
|
-
await
|
|
1373
|
+
```typescript
|
|
1374
|
+
await client.permissionsService.listCachedAuthorizedResourcesForUser({
|
|
1703
1375
|
userEmail: "john.smith@foo.com",
|
|
1704
1376
|
});
|
|
1705
1377
|
```
|
|
1706
1378
|
|
|
1707
1379
|
</dd>
|
|
1708
|
-
|
|
1709
1380
|
</dl>
|
|
1710
|
-
|
|
1711
1381
|
</dd>
|
|
1712
|
-
|
|
1713
1382
|
</dl>
|
|
1714
1383
|
|
|
1715
1384
|
#### ⚙️ Parameters
|
|
1716
1385
|
|
|
1717
1386
|
<dl>
|
|
1718
|
-
|
|
1719
1387
|
<dd>
|
|
1720
1388
|
|
|
1721
1389
|
<dl>
|
|
1722
|
-
|
|
1723
1390
|
<dd>
|
|
1724
1391
|
|
|
1725
|
-
**request
|
|
1392
|
+
**request:** `Credal.ListCachedAuthorizedResourcesForUserRequest`
|
|
1726
1393
|
|
|
1727
1394
|
</dd>
|
|
1728
|
-
|
|
1729
1395
|
</dl>
|
|
1730
1396
|
|
|
1731
1397
|
<dl>
|
|
1732
|
-
|
|
1733
1398
|
<dd>
|
|
1734
1399
|
|
|
1735
|
-
**requestOptions
|
|
1400
|
+
**requestOptions:** `PermissionsService.RequestOptions`
|
|
1736
1401
|
|
|
1737
1402
|
</dd>
|
|
1738
|
-
|
|
1739
1403
|
</dl>
|
|
1740
|
-
|
|
1741
1404
|
</dd>
|
|
1742
|
-
|
|
1743
1405
|
</dl>
|
|
1744
1406
|
|
|
1745
1407
|
</dd>
|
|
1746
|
-
|
|
1747
1408
|
</dl>
|
|
1748
1409
|
</details>
|
|
1749
1410
|
|
|
1750
1411
|
## Search
|
|
1751
1412
|
|
|
1752
|
-
<details><summary
|
|
1753
|
-
|
|
1413
|
+
<details><summary><code>client.search.<a href="/src/api/resources/search/client/Client.ts">searchDocumentCollection</a>({ ...params }) -> Credal.SearchDocumentCollectionResponse</code></summary>
|
|
1754
1414
|
<dl>
|
|
1755
|
-
|
|
1756
1415
|
<dd>
|
|
1757
1416
|
|
|
1758
1417
|
#### 📝 Description
|
|
1759
1418
|
|
|
1760
1419
|
<dl>
|
|
1761
|
-
|
|
1762
1420
|
<dd>
|
|
1763
1421
|
|
|
1764
1422
|
<dl>
|
|
1765
|
-
|
|
1766
1423
|
<dd>
|
|
1767
1424
|
|
|
1768
1425
|
Search across all documents in a document collection using the document metadata and contents.
|
|
1769
1426
|
|
|
1770
1427
|
</dd>
|
|
1771
|
-
|
|
1772
1428
|
</dl>
|
|
1773
|
-
|
|
1774
1429
|
</dd>
|
|
1775
|
-
|
|
1776
1430
|
</dl>
|
|
1777
1431
|
|
|
1778
1432
|
#### 🔌 Usage
|
|
1779
1433
|
|
|
1780
1434
|
<dl>
|
|
1781
|
-
|
|
1782
1435
|
<dd>
|
|
1783
1436
|
|
|
1784
1437
|
<dl>
|
|
1785
|
-
|
|
1786
1438
|
<dd>
|
|
1787
1439
|
|
|
1788
|
-
```
|
|
1789
|
-
await
|
|
1440
|
+
```typescript
|
|
1441
|
+
await client.search.searchDocumentCollection({
|
|
1790
1442
|
collectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
1791
1443
|
searchQuery: "ABC Corp",
|
|
1792
1444
|
structuredQueryFilters: [
|
|
1793
1445
|
{
|
|
1794
1446
|
field: "status",
|
|
1795
|
-
operator:
|
|
1447
|
+
operator: "==",
|
|
1796
1448
|
value: "Open",
|
|
1797
1449
|
},
|
|
1798
1450
|
],
|
|
@@ -1809,88 +1461,68 @@ await credal.search.searchDocumentCollection({
|
|
|
1809
1461
|
```
|
|
1810
1462
|
|
|
1811
1463
|
</dd>
|
|
1812
|
-
|
|
1813
1464
|
</dl>
|
|
1814
|
-
|
|
1815
1465
|
</dd>
|
|
1816
|
-
|
|
1817
1466
|
</dl>
|
|
1818
1467
|
|
|
1819
1468
|
#### ⚙️ Parameters
|
|
1820
1469
|
|
|
1821
1470
|
<dl>
|
|
1822
|
-
|
|
1823
1471
|
<dd>
|
|
1824
1472
|
|
|
1825
1473
|
<dl>
|
|
1826
|
-
|
|
1827
1474
|
<dd>
|
|
1828
1475
|
|
|
1829
|
-
**request
|
|
1476
|
+
**request:** `Credal.SearchDocumentCollectionRequest`
|
|
1830
1477
|
|
|
1831
1478
|
</dd>
|
|
1832
|
-
|
|
1833
1479
|
</dl>
|
|
1834
1480
|
|
|
1835
1481
|
<dl>
|
|
1836
|
-
|
|
1837
1482
|
<dd>
|
|
1838
1483
|
|
|
1839
|
-
**requestOptions
|
|
1484
|
+
**requestOptions:** `Search.RequestOptions`
|
|
1840
1485
|
|
|
1841
1486
|
</dd>
|
|
1842
|
-
|
|
1843
1487
|
</dl>
|
|
1844
|
-
|
|
1845
1488
|
</dd>
|
|
1846
|
-
|
|
1847
1489
|
</dl>
|
|
1848
1490
|
|
|
1849
1491
|
</dd>
|
|
1850
|
-
|
|
1851
1492
|
</dl>
|
|
1852
1493
|
</details>
|
|
1853
1494
|
|
|
1854
1495
|
## Users
|
|
1855
1496
|
|
|
1856
|
-
<details><summary
|
|
1857
|
-
|
|
1497
|
+
<details><summary><code>client.users.<a href="/src/api/resources/users/client/Client.ts">metadata</a>({ ...params }) -> void</code></summary>
|
|
1858
1498
|
<dl>
|
|
1859
|
-
|
|
1860
1499
|
<dd>
|
|
1861
1500
|
|
|
1862
1501
|
#### 📝 Description
|
|
1863
1502
|
|
|
1864
1503
|
<dl>
|
|
1865
|
-
|
|
1866
1504
|
<dd>
|
|
1867
1505
|
|
|
1868
1506
|
<dl>
|
|
1869
|
-
|
|
1870
1507
|
<dd>
|
|
1871
1508
|
|
|
1872
1509
|
Bulk patch metadata for users
|
|
1873
1510
|
|
|
1874
1511
|
</dd>
|
|
1875
|
-
|
|
1876
1512
|
</dl>
|
|
1877
|
-
|
|
1878
1513
|
</dd>
|
|
1879
|
-
|
|
1880
1514
|
</dl>
|
|
1881
1515
|
|
|
1882
1516
|
#### 🔌 Usage
|
|
1883
1517
|
|
|
1884
1518
|
<dl>
|
|
1885
|
-
|
|
1886
1519
|
<dd>
|
|
1887
1520
|
|
|
1888
1521
|
<dl>
|
|
1889
|
-
|
|
1890
1522
|
<dd>
|
|
1891
1523
|
|
|
1892
|
-
```
|
|
1893
|
-
await
|
|
1524
|
+
```typescript
|
|
1525
|
+
await client.users.metadata([
|
|
1894
1526
|
{
|
|
1895
1527
|
metadata: {
|
|
1896
1528
|
State: "NY",
|
|
@@ -1909,44 +1541,33 @@ await credal.users.metadata([
|
|
|
1909
1541
|
```
|
|
1910
1542
|
|
|
1911
1543
|
</dd>
|
|
1912
|
-
|
|
1913
1544
|
</dl>
|
|
1914
|
-
|
|
1915
1545
|
</dd>
|
|
1916
|
-
|
|
1917
1546
|
</dl>
|
|
1918
1547
|
|
|
1919
1548
|
#### ⚙️ Parameters
|
|
1920
1549
|
|
|
1921
1550
|
<dl>
|
|
1922
|
-
|
|
1923
1551
|
<dd>
|
|
1924
1552
|
|
|
1925
1553
|
<dl>
|
|
1926
|
-
|
|
1927
1554
|
<dd>
|
|
1928
1555
|
|
|
1929
|
-
**request
|
|
1556
|
+
**request:** `Credal.UserMetadataPatch[]`
|
|
1930
1557
|
|
|
1931
1558
|
</dd>
|
|
1932
|
-
|
|
1933
1559
|
</dl>
|
|
1934
1560
|
|
|
1935
1561
|
<dl>
|
|
1936
|
-
|
|
1937
1562
|
<dd>
|
|
1938
1563
|
|
|
1939
|
-
**requestOptions
|
|
1564
|
+
**requestOptions:** `Users.RequestOptions`
|
|
1940
1565
|
|
|
1941
1566
|
</dd>
|
|
1942
|
-
|
|
1943
1567
|
</dl>
|
|
1944
|
-
|
|
1945
1568
|
</dd>
|
|
1946
|
-
|
|
1947
1569
|
</dl>
|
|
1948
1570
|
|
|
1949
1571
|
</dd>
|
|
1950
|
-
|
|
1951
1572
|
</dl>
|
|
1952
1573
|
</details>
|