@credal/sdk 0.0.14 → 0.0.15
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/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/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/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/version.d.ts +1 -0
- package/version.js +4 -0
|
@@ -55,16 +55,16 @@ class DocumentCollections {
|
|
|
55
55
|
* @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
56
|
*
|
|
57
57
|
* @example
|
|
58
|
-
* await
|
|
58
|
+
* await client.documentCollections.addDocumentsToCollection({
|
|
59
59
|
* collectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
60
60
|
* resourceIdentifiers: [{
|
|
61
61
|
* type: "external-resource-id",
|
|
62
62
|
* externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
|
|
63
|
-
* resourceType:
|
|
63
|
+
* resourceType: "GOOGLE_DRIVE_ITEM"
|
|
64
64
|
* }, {
|
|
65
65
|
* type: "external-resource-id",
|
|
66
66
|
* externalResourceId: "398KAHdfkjsdf09r54UvyslPVWkQFOA0lOiu34in923",
|
|
67
|
-
* resourceType:
|
|
67
|
+
* resourceType: "GOOGLE_DRIVE_ITEM"
|
|
68
68
|
* }]
|
|
69
69
|
* })
|
|
70
70
|
*/
|
|
@@ -78,14 +78,14 @@ 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.
|
|
81
|
+
"X-Fern-SDK-Version": "0.0.15",
|
|
82
|
+
"User-Agent": "@credal/sdk/0.0.15",
|
|
82
83
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
83
84
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
84
85
|
},
|
|
85
86
|
contentType: "application/json",
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}),
|
|
87
|
+
requestType: "json",
|
|
88
|
+
body: serializers.AddDocumentsToCollectionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
89
89
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
90
90
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
91
91
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -121,16 +121,16 @@ class DocumentCollections {
|
|
|
121
121
|
* @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
|
|
122
122
|
*
|
|
123
123
|
* @example
|
|
124
|
-
* await
|
|
124
|
+
* await client.documentCollections.removeDocumentsFromCollection({
|
|
125
125
|
* collectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
126
126
|
* resourceIdentifiers: [{
|
|
127
127
|
* type: "external-resource-id",
|
|
128
128
|
* externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
|
|
129
|
-
* resourceType:
|
|
129
|
+
* resourceType: "GOOGLE_DRIVE_ITEM"
|
|
130
130
|
* }, {
|
|
131
131
|
* type: "external-resource-id",
|
|
132
132
|
* externalResourceId: "398KAHdfkjsdf09r54UvyslPVWkQFOA0lOiu34in923",
|
|
133
|
-
* resourceType:
|
|
133
|
+
* resourceType: "GOOGLE_DRIVE_ITEM"
|
|
134
134
|
* }]
|
|
135
135
|
* })
|
|
136
136
|
*/
|
|
@@ -144,12 +144,14 @@ 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.
|
|
147
|
+
"X-Fern-SDK-Version": "0.0.15",
|
|
148
|
+
"User-Agent": "@credal/sdk/0.0.15",
|
|
148
149
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
149
150
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
150
151
|
},
|
|
151
152
|
contentType: "application/json",
|
|
152
|
-
|
|
153
|
+
requestType: "json",
|
|
154
|
+
body: serializers.RemoveDocumentsFromCollectionRequest.jsonOrThrow(request, {
|
|
153
155
|
unrecognizedObjectKeys: "strip",
|
|
154
156
|
}),
|
|
155
157
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -187,12 +189,12 @@ class DocumentCollections {
|
|
|
187
189
|
* @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
|
|
188
190
|
*
|
|
189
191
|
* @example
|
|
190
|
-
* await
|
|
192
|
+
* await client.documentCollections.createCollection({
|
|
191
193
|
* name: "Customer Collection",
|
|
192
194
|
* description: "This collection is used to answer customer requests based on internal documentation.",
|
|
193
195
|
* collaborators: [{
|
|
194
196
|
* email: "test@gmail.com",
|
|
195
|
-
* role:
|
|
197
|
+
* role: "editor"
|
|
196
198
|
* }]
|
|
197
199
|
* })
|
|
198
200
|
*/
|
|
@@ -206,18 +208,20 @@ class DocumentCollections {
|
|
|
206
208
|
Authorization: yield this._getAuthorizationHeader(),
|
|
207
209
|
"X-Fern-Language": "JavaScript",
|
|
208
210
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
209
|
-
"X-Fern-SDK-Version": "0.0.
|
|
211
|
+
"X-Fern-SDK-Version": "0.0.15",
|
|
212
|
+
"User-Agent": "@credal/sdk/0.0.15",
|
|
210
213
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
211
214
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
212
215
|
},
|
|
213
216
|
contentType: "application/json",
|
|
214
|
-
|
|
217
|
+
requestType: "json",
|
|
218
|
+
body: serializers.CreateCollectionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
215
219
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
216
220
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
217
221
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
218
222
|
});
|
|
219
223
|
if (_response.ok) {
|
|
220
|
-
return
|
|
224
|
+
return serializers.CreateCollectionResponse.parseOrThrow(_response.body, {
|
|
221
225
|
unrecognizedObjectKeys: "passthrough",
|
|
222
226
|
allowUnrecognizedUnionMembers: true,
|
|
223
227
|
allowUnrecognizedEnumValues: true,
|
|
@@ -252,7 +256,7 @@ class DocumentCollections {
|
|
|
252
256
|
* @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
|
|
253
257
|
*
|
|
254
258
|
* @example
|
|
255
|
-
* await
|
|
259
|
+
* await client.documentCollections.deleteCollection({
|
|
256
260
|
* collectionId: "ac20e6ba-0bae-11ef-b25a-efca73df4c3a"
|
|
257
261
|
* })
|
|
258
262
|
*/
|
|
@@ -266,18 +270,20 @@ class DocumentCollections {
|
|
|
266
270
|
Authorization: yield this._getAuthorizationHeader(),
|
|
267
271
|
"X-Fern-Language": "JavaScript",
|
|
268
272
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
269
|
-
"X-Fern-SDK-Version": "0.0.
|
|
273
|
+
"X-Fern-SDK-Version": "0.0.15",
|
|
274
|
+
"User-Agent": "@credal/sdk/0.0.15",
|
|
270
275
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
271
276
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
272
277
|
},
|
|
273
278
|
contentType: "application/json",
|
|
274
|
-
|
|
279
|
+
requestType: "json",
|
|
280
|
+
body: serializers.DeleteCollectionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
275
281
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
276
282
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
277
283
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
278
284
|
});
|
|
279
285
|
if (_response.ok) {
|
|
280
|
-
return
|
|
286
|
+
return serializers.DeleteCollectionResponse.parseOrThrow(_response.body, {
|
|
281
287
|
unrecognizedObjectKeys: "passthrough",
|
|
282
288
|
allowUnrecognizedUnionMembers: true,
|
|
283
289
|
allowUnrecognizedEnumValues: true,
|
|
@@ -312,7 +318,7 @@ class DocumentCollections {
|
|
|
312
318
|
* @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
|
|
313
319
|
*
|
|
314
320
|
* @example
|
|
315
|
-
* await
|
|
321
|
+
* await client.documentCollections.createMongoCollectionSync({
|
|
316
322
|
* mongoUri: "mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
|
|
317
323
|
* collectionId: "ac20e6ba-0bae-11ef-b25a-efca73df4c3a",
|
|
318
324
|
* config: {
|
|
@@ -342,12 +348,14 @@ class DocumentCollections {
|
|
|
342
348
|
Authorization: yield this._getAuthorizationHeader(),
|
|
343
349
|
"X-Fern-Language": "JavaScript",
|
|
344
350
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
345
|
-
"X-Fern-SDK-Version": "0.0.
|
|
351
|
+
"X-Fern-SDK-Version": "0.0.15",
|
|
352
|
+
"User-Agent": "@credal/sdk/0.0.15",
|
|
346
353
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
347
354
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
348
355
|
},
|
|
349
356
|
contentType: "application/json",
|
|
350
|
-
|
|
357
|
+
requestType: "json",
|
|
358
|
+
body: serializers.CreateMongoCollectionSyncRequest.jsonOrThrow(request, {
|
|
351
359
|
unrecognizedObjectKeys: "strip",
|
|
352
360
|
}),
|
|
353
361
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -355,7 +363,7 @@ class DocumentCollections {
|
|
|
355
363
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
356
364
|
});
|
|
357
365
|
if (_response.ok) {
|
|
358
|
-
return
|
|
366
|
+
return serializers.MongoCollectionSyncResponse.parseOrThrow(_response.body, {
|
|
359
367
|
unrecognizedObjectKeys: "passthrough",
|
|
360
368
|
allowUnrecognizedUnionMembers: true,
|
|
361
369
|
allowUnrecognizedEnumValues: true,
|
|
@@ -390,7 +398,7 @@ class DocumentCollections {
|
|
|
390
398
|
* @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
|
|
391
399
|
*
|
|
392
400
|
* @example
|
|
393
|
-
* await
|
|
401
|
+
* await client.documentCollections.updateMongoCollectionSync({
|
|
394
402
|
* mongoUri: "mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
|
|
395
403
|
* mongoCredentialId: "5988ed76-6ee1-11ef-97dd-1fca54b7c4bc",
|
|
396
404
|
* config: {
|
|
@@ -420,12 +428,14 @@ class DocumentCollections {
|
|
|
420
428
|
Authorization: yield this._getAuthorizationHeader(),
|
|
421
429
|
"X-Fern-Language": "JavaScript",
|
|
422
430
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
423
|
-
"X-Fern-SDK-Version": "0.0.
|
|
431
|
+
"X-Fern-SDK-Version": "0.0.15",
|
|
432
|
+
"User-Agent": "@credal/sdk/0.0.15",
|
|
424
433
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
425
434
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
426
435
|
},
|
|
427
436
|
contentType: "application/json",
|
|
428
|
-
|
|
437
|
+
requestType: "json",
|
|
438
|
+
body: serializers.UpdateMongoCollectionSyncRequest.jsonOrThrow(request, {
|
|
429
439
|
unrecognizedObjectKeys: "strip",
|
|
430
440
|
}),
|
|
431
441
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -433,7 +443,7 @@ class DocumentCollections {
|
|
|
433
443
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
434
444
|
});
|
|
435
445
|
if (_response.ok) {
|
|
436
|
-
return
|
|
446
|
+
return serializers.MongoCollectionSyncResponse.parseOrThrow(_response.body, {
|
|
437
447
|
unrecognizedObjectKeys: "passthrough",
|
|
438
448
|
allowUnrecognizedUnionMembers: true,
|
|
439
449
|
allowUnrecognizedEnumValues: true,
|
package/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.d.ts
CHANGED
|
@@ -9,11 +9,11 @@ import * as Credal from "../../../../index";
|
|
|
9
9
|
* resourceIdentifiers: [{
|
|
10
10
|
* type: "external-resource-id",
|
|
11
11
|
* externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
|
|
12
|
-
* resourceType:
|
|
12
|
+
* resourceType: "GOOGLE_DRIVE_ITEM"
|
|
13
13
|
* }, {
|
|
14
14
|
* type: "external-resource-id",
|
|
15
15
|
* externalResourceId: "398KAHdfkjsdf09r54UvyslPVWkQFOA0lOiu34in923",
|
|
16
|
-
* resourceType:
|
|
16
|
+
* resourceType: "GOOGLE_DRIVE_ITEM"
|
|
17
17
|
* }]
|
|
18
18
|
* }
|
|
19
19
|
*/
|
|
@@ -9,7 +9,7 @@ import * as Credal from "../../../../index";
|
|
|
9
9
|
* description: "This collection is used to answer customer requests based on internal documentation.",
|
|
10
10
|
* collaborators: [{
|
|
11
11
|
* email: "test@gmail.com",
|
|
12
|
-
* role:
|
|
12
|
+
* role: "editor"
|
|
13
13
|
* }]
|
|
14
14
|
* }
|
|
15
15
|
*/
|
package/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.d.ts
CHANGED
|
@@ -9,11 +9,11 @@ import * as Credal from "../../../../index";
|
|
|
9
9
|
* resourceIdentifiers: [{
|
|
10
10
|
* type: "external-resource-id",
|
|
11
11
|
* externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
|
|
12
|
-
* resourceType:
|
|
12
|
+
* resourceType: "GOOGLE_DRIVE_ITEM"
|
|
13
13
|
* }, {
|
|
14
14
|
* type: "external-resource-id",
|
|
15
15
|
* externalResourceId: "398KAHdfkjsdf09r54UvyslPVWkQFOA0lOiu34in923",
|
|
16
|
-
* resourceType:
|
|
16
|
+
* resourceType: "GOOGLE_DRIVE_ITEM"
|
|
17
17
|
* }]
|
|
18
18
|
* }
|
|
19
19
|
*/
|
|
@@ -11,8 +11,11 @@ export declare namespace PermissionsService {
|
|
|
11
11
|
fetcher?: core.FetchFunction;
|
|
12
12
|
}
|
|
13
13
|
interface RequestOptions {
|
|
14
|
+
/** The maximum time to wait for a response in seconds. */
|
|
14
15
|
timeoutInSeconds?: number;
|
|
16
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
15
17
|
maxRetries?: number;
|
|
18
|
+
/** A hook to abort the request. */
|
|
16
19
|
abortSignal?: AbortSignal;
|
|
17
20
|
}
|
|
18
21
|
}
|
|
@@ -26,11 +29,11 @@ export declare class PermissionsService {
|
|
|
26
29
|
* @param {PermissionsService.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
30
|
*
|
|
28
31
|
* @example
|
|
29
|
-
* await
|
|
32
|
+
* await client.permissionsService.checkResourceAuthorizationForUser({
|
|
30
33
|
* resourceIdentifier: {
|
|
31
34
|
* type: "external-resource-id",
|
|
32
35
|
* externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
|
|
33
|
-
* resourceType:
|
|
36
|
+
* resourceType: "GOOGLE_DRIVE_ITEM"
|
|
34
37
|
* },
|
|
35
38
|
* userEmail: "john.smith@foo.com"
|
|
36
39
|
* })
|
|
@@ -43,14 +46,14 @@ export declare class PermissionsService {
|
|
|
43
46
|
* @param {PermissionsService.RequestOptions} requestOptions - Request-specific configuration.
|
|
44
47
|
*
|
|
45
48
|
* @example
|
|
46
|
-
* await
|
|
49
|
+
* await client.permissionsService.checkBulkResourcesAuthorizationForUser({
|
|
47
50
|
* resourceIdentifiers: [{
|
|
48
51
|
* type: "url",
|
|
49
52
|
* url: "https://docs.google.com/document/d/170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr/edit"
|
|
50
53
|
* }, {
|
|
51
54
|
* type: "external-resource-id",
|
|
52
55
|
* externalResourceId: "sfsdfvr54UvyslPVWkQFOA0dfsdfsdflgNycFmdZJQr",
|
|
53
|
-
* resourceType:
|
|
56
|
+
* resourceType: "ZENDESK_TICKET"
|
|
54
57
|
* }],
|
|
55
58
|
* userEmail: "john.smith@foo.com"
|
|
56
59
|
* })
|
|
@@ -63,7 +66,7 @@ export declare class PermissionsService {
|
|
|
63
66
|
* @param {PermissionsService.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
67
|
*
|
|
65
68
|
* @example
|
|
66
|
-
* await
|
|
69
|
+
* await client.permissionsService.listCachedAuthorizedResourcesForUser({
|
|
67
70
|
* userEmail: "john.smith@foo.com"
|
|
68
71
|
* })
|
|
69
72
|
*/
|
|
@@ -55,11 +55,11 @@ class PermissionsService {
|
|
|
55
55
|
* @param {PermissionsService.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
56
|
*
|
|
57
57
|
* @example
|
|
58
|
-
* await
|
|
58
|
+
* await client.permissionsService.checkResourceAuthorizationForUser({
|
|
59
59
|
* resourceIdentifier: {
|
|
60
60
|
* type: "external-resource-id",
|
|
61
61
|
* externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
|
|
62
|
-
* resourceType:
|
|
62
|
+
* resourceType: "GOOGLE_DRIVE_ITEM"
|
|
63
63
|
* },
|
|
64
64
|
* userEmail: "john.smith@foo.com"
|
|
65
65
|
* })
|
|
@@ -74,12 +74,14 @@ 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.
|
|
77
|
+
"X-Fern-SDK-Version": "0.0.15",
|
|
78
|
+
"User-Agent": "@credal/sdk/0.0.15",
|
|
78
79
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
79
80
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
80
81
|
},
|
|
81
82
|
contentType: "application/json",
|
|
82
|
-
|
|
83
|
+
requestType: "json",
|
|
84
|
+
body: serializers.CheckResourceAuthorizationForUserRequest.jsonOrThrow(request, {
|
|
83
85
|
unrecognizedObjectKeys: "strip",
|
|
84
86
|
}),
|
|
85
87
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -87,7 +89,7 @@ class PermissionsService {
|
|
|
87
89
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
88
90
|
});
|
|
89
91
|
if (_response.ok) {
|
|
90
|
-
return
|
|
92
|
+
return serializers.CheckResourceAuthorizationResponse.parseOrThrow(_response.body, {
|
|
91
93
|
unrecognizedObjectKeys: "passthrough",
|
|
92
94
|
allowUnrecognizedUnionMembers: true,
|
|
93
95
|
allowUnrecognizedEnumValues: true,
|
|
@@ -122,14 +124,14 @@ class PermissionsService {
|
|
|
122
124
|
* @param {PermissionsService.RequestOptions} requestOptions - Request-specific configuration.
|
|
123
125
|
*
|
|
124
126
|
* @example
|
|
125
|
-
* await
|
|
127
|
+
* await client.permissionsService.checkBulkResourcesAuthorizationForUser({
|
|
126
128
|
* resourceIdentifiers: [{
|
|
127
129
|
* type: "url",
|
|
128
130
|
* url: "https://docs.google.com/document/d/170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr/edit"
|
|
129
131
|
* }, {
|
|
130
132
|
* type: "external-resource-id",
|
|
131
133
|
* externalResourceId: "sfsdfvr54UvyslPVWkQFOA0dfsdfsdflgNycFmdZJQr",
|
|
132
|
-
* resourceType:
|
|
134
|
+
* resourceType: "ZENDESK_TICKET"
|
|
133
135
|
* }],
|
|
134
136
|
* userEmail: "john.smith@foo.com"
|
|
135
137
|
* })
|
|
@@ -144,12 +146,14 @@ class PermissionsService {
|
|
|
144
146
|
Authorization: yield this._getAuthorizationHeader(),
|
|
145
147
|
"X-Fern-Language": "JavaScript",
|
|
146
148
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
147
|
-
"X-Fern-SDK-Version": "0.0.
|
|
149
|
+
"X-Fern-SDK-Version": "0.0.15",
|
|
150
|
+
"User-Agent": "@credal/sdk/0.0.15",
|
|
148
151
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
149
152
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
150
153
|
},
|
|
151
154
|
contentType: "application/json",
|
|
152
|
-
|
|
155
|
+
requestType: "json",
|
|
156
|
+
body: serializers.CheckBulkResourcesAuthorizationForUserRequest.jsonOrThrow(request, {
|
|
153
157
|
unrecognizedObjectKeys: "strip",
|
|
154
158
|
}),
|
|
155
159
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -157,7 +161,7 @@ class PermissionsService {
|
|
|
157
161
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
158
162
|
});
|
|
159
163
|
if (_response.ok) {
|
|
160
|
-
return
|
|
164
|
+
return serializers.CheckBulkResourcesAuthorizationResponse.parseOrThrow(_response.body, {
|
|
161
165
|
unrecognizedObjectKeys: "passthrough",
|
|
162
166
|
allowUnrecognizedUnionMembers: true,
|
|
163
167
|
allowUnrecognizedEnumValues: true,
|
|
@@ -192,7 +196,7 @@ class PermissionsService {
|
|
|
192
196
|
* @param {PermissionsService.RequestOptions} requestOptions - Request-specific configuration.
|
|
193
197
|
*
|
|
194
198
|
* @example
|
|
195
|
-
* await
|
|
199
|
+
* await client.permissionsService.listCachedAuthorizedResourcesForUser({
|
|
196
200
|
* userEmail: "john.smith@foo.com"
|
|
197
201
|
* })
|
|
198
202
|
*/
|
|
@@ -206,12 +210,14 @@ class PermissionsService {
|
|
|
206
210
|
Authorization: yield this._getAuthorizationHeader(),
|
|
207
211
|
"X-Fern-Language": "JavaScript",
|
|
208
212
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
209
|
-
"X-Fern-SDK-Version": "0.0.
|
|
213
|
+
"X-Fern-SDK-Version": "0.0.15",
|
|
214
|
+
"User-Agent": "@credal/sdk/0.0.15",
|
|
210
215
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
211
216
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
212
217
|
},
|
|
213
218
|
contentType: "application/json",
|
|
214
|
-
|
|
219
|
+
requestType: "json",
|
|
220
|
+
body: serializers.ListCachedAuthorizedResourcesForUserRequest.jsonOrThrow(request, {
|
|
215
221
|
unrecognizedObjectKeys: "strip",
|
|
216
222
|
}),
|
|
217
223
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -219,7 +225,7 @@ class PermissionsService {
|
|
|
219
225
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
220
226
|
});
|
|
221
227
|
if (_response.ok) {
|
|
222
|
-
return
|
|
228
|
+
return serializers.AuthorizedResourceListPage.parseOrThrow(_response.body, {
|
|
223
229
|
unrecognizedObjectKeys: "passthrough",
|
|
224
230
|
allowUnrecognizedUnionMembers: true,
|
|
225
231
|
allowUnrecognizedEnumValues: true,
|
|
@@ -11,7 +11,7 @@ import * as Credal from "../../../../index";
|
|
|
11
11
|
* }, {
|
|
12
12
|
* type: "external-resource-id",
|
|
13
13
|
* externalResourceId: "sfsdfvr54UvyslPVWkQFOA0dfsdfsdflgNycFmdZJQr",
|
|
14
|
-
* resourceType:
|
|
14
|
+
* resourceType: "ZENDESK_TICKET"
|
|
15
15
|
* }],
|
|
16
16
|
* userEmail: "john.smith@foo.com"
|
|
17
17
|
* }
|
|
@@ -8,7 +8,7 @@ import * as Credal from "../../../../index";
|
|
|
8
8
|
* resourceIdentifier: {
|
|
9
9
|
* type: "external-resource-id",
|
|
10
10
|
* externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
|
|
11
|
-
* resourceType:
|
|
11
|
+
* resourceType: "GOOGLE_DRIVE_ITEM"
|
|
12
12
|
* },
|
|
13
13
|
* userEmail: "john.smith@foo.com"
|
|
14
14
|
* }
|
|
@@ -11,8 +11,11 @@ export declare namespace Search {
|
|
|
11
11
|
fetcher?: core.FetchFunction;
|
|
12
12
|
}
|
|
13
13
|
interface RequestOptions {
|
|
14
|
+
/** The maximum time to wait for a response in seconds. */
|
|
14
15
|
timeoutInSeconds?: number;
|
|
16
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
15
17
|
maxRetries?: number;
|
|
18
|
+
/** A hook to abort the request. */
|
|
16
19
|
abortSignal?: AbortSignal;
|
|
17
20
|
}
|
|
18
21
|
}
|
|
@@ -26,12 +29,12 @@ export declare class Search {
|
|
|
26
29
|
* @param {Search.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
30
|
*
|
|
28
31
|
* @example
|
|
29
|
-
* await
|
|
32
|
+
* await client.search.searchDocumentCollection({
|
|
30
33
|
* collectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
31
34
|
* searchQuery: "ABC Corp",
|
|
32
35
|
* structuredQueryFilters: [{
|
|
33
36
|
* field: "status",
|
|
34
|
-
* operator:
|
|
37
|
+
* operator: "==",
|
|
35
38
|
* value: "Open"
|
|
36
39
|
* }],
|
|
37
40
|
* userEmail: "jack@credal.ai",
|
|
@@ -55,12 +55,12 @@ class Search {
|
|
|
55
55
|
* @param {Search.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
56
|
*
|
|
57
57
|
* @example
|
|
58
|
-
* await
|
|
58
|
+
* await client.search.searchDocumentCollection({
|
|
59
59
|
* collectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
60
60
|
* searchQuery: "ABC Corp",
|
|
61
61
|
* structuredQueryFilters: [{
|
|
62
62
|
* field: "status",
|
|
63
|
-
* operator:
|
|
63
|
+
* operator: "==",
|
|
64
64
|
* value: "Open"
|
|
65
65
|
* }],
|
|
66
66
|
* userEmail: "jack@credal.ai",
|
|
@@ -84,20 +84,20 @@ 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.
|
|
87
|
+
"X-Fern-SDK-Version": "0.0.15",
|
|
88
|
+
"User-Agent": "@credal/sdk/0.0.15",
|
|
88
89
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
89
90
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
90
91
|
},
|
|
91
92
|
contentType: "application/json",
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}),
|
|
93
|
+
requestType: "json",
|
|
94
|
+
body: serializers.SearchDocumentCollectionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
95
95
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
96
96
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
97
97
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
98
98
|
});
|
|
99
99
|
if (_response.ok) {
|
|
100
|
-
return
|
|
100
|
+
return serializers.SearchDocumentCollectionResponse.parseOrThrow(_response.body, {
|
|
101
101
|
unrecognizedObjectKeys: "passthrough",
|
|
102
102
|
allowUnrecognizedUnionMembers: true,
|
|
103
103
|
allowUnrecognizedEnumValues: true,
|
|
@@ -11,8 +11,11 @@ export declare namespace Users {
|
|
|
11
11
|
fetcher?: core.FetchFunction;
|
|
12
12
|
}
|
|
13
13
|
interface RequestOptions {
|
|
14
|
+
/** The maximum time to wait for a response in seconds. */
|
|
14
15
|
timeoutInSeconds?: number;
|
|
16
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
15
17
|
maxRetries?: number;
|
|
18
|
+
/** A hook to abort the request. */
|
|
16
19
|
abortSignal?: AbortSignal;
|
|
17
20
|
}
|
|
18
21
|
}
|
|
@@ -26,7 +29,7 @@ export declare class Users {
|
|
|
26
29
|
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
30
|
*
|
|
28
31
|
* @example
|
|
29
|
-
* await
|
|
32
|
+
* await client.users.metadata([{
|
|
30
33
|
* metadata: {
|
|
31
34
|
* "State": "NY",
|
|
32
35
|
* "Job Role": "CEO"
|
|
@@ -55,7 +55,7 @@ class Users {
|
|
|
55
55
|
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
56
|
*
|
|
57
57
|
* @example
|
|
58
|
-
* await
|
|
58
|
+
* await client.users.metadata([{
|
|
59
59
|
* metadata: {
|
|
60
60
|
* "State": "NY",
|
|
61
61
|
* "Job Role": "CEO"
|
|
@@ -79,12 +79,14 @@ 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.
|
|
82
|
+
"X-Fern-SDK-Version": "0.0.15",
|
|
83
|
+
"User-Agent": "@credal/sdk/0.0.15",
|
|
83
84
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
84
85
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
85
86
|
},
|
|
86
87
|
contentType: "application/json",
|
|
87
|
-
|
|
88
|
+
requestType: "json",
|
|
89
|
+
body: serializers.users.metadata.Request.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
88
90
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
89
91
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
90
92
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -12,7 +12,9 @@ export declare namespace Fetcher {
|
|
|
12
12
|
maxRetries?: number;
|
|
13
13
|
withCredentials?: boolean;
|
|
14
14
|
abortSignal?: AbortSignal;
|
|
15
|
-
|
|
15
|
+
requestType?: "json" | "file" | "bytes";
|
|
16
|
+
responseType?: "json" | "blob" | "sse" | "streaming" | "text" | "arrayBuffer";
|
|
17
|
+
duplex?: "half";
|
|
16
18
|
}
|
|
17
19
|
type Error = FailedStatusCodeError | NonJsonError | TimeoutError | UnknownError;
|
|
18
20
|
interface FailedStatusCodeError {
|
|
@@ -33,4 +35,5 @@ export declare namespace Fetcher {
|
|
|
33
35
|
errorMessage: string;
|
|
34
36
|
}
|
|
35
37
|
}
|
|
38
|
+
export declare function fetcherImpl<R = unknown>(args: Fetcher.Args): Promise<APIResponse<R, Fetcher.Error>>;
|
|
36
39
|
export declare const fetcher: FetchFunction;
|