@credal/sdk 0.0.11 → 0.0.12
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/api/resources/copilots/client/Client.js +8 -8
- package/api/resources/documentCatalog/client/Client.js +2 -2
- package/api/resources/documentCollections/client/Client.d.ts +56 -0
- package/api/resources/documentCollections/client/Client.js +160 -4
- package/api/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.d.ts +31 -0
- package/api/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.js +5 -0
- package/api/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.d.ts +31 -0
- package/api/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.js +5 -0
- package/api/resources/documentCollections/client/requests/index.d.ts +2 -0
- package/api/resources/documentCollections/types/MongoCollectionSyncConfig.d.ts +10 -0
- package/api/resources/documentCollections/types/MongoCollectionSyncConfig.js +5 -0
- package/api/resources/documentCollections/types/MongoCollectionSyncResponse.d.ts +8 -0
- package/api/resources/documentCollections/types/MongoCollectionSyncResponse.js +5 -0
- package/api/resources/documentCollections/types/MongoSourceFieldsConfig.d.ts +9 -0
- package/api/resources/documentCollections/types/MongoSourceFieldsConfig.js +5 -0
- package/api/resources/documentCollections/types/index.d.ts +3 -0
- package/api/resources/documentCollections/types/index.js +3 -0
- package/api/resources/permissionsService/client/Client.js +3 -3
- package/api/resources/search/client/Client.js +1 -1
- package/api/resources/users/client/Client.js +1 -1
- package/dist/api/resources/copilots/client/Client.js +8 -8
- package/dist/api/resources/documentCatalog/client/Client.js +2 -2
- package/dist/api/resources/documentCollections/client/Client.d.ts +56 -0
- package/dist/api/resources/documentCollections/client/Client.js +160 -4
- package/dist/api/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.d.ts +31 -0
- package/dist/api/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.js +5 -0
- package/dist/api/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.d.ts +31 -0
- package/dist/api/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.js +5 -0
- package/dist/api/resources/documentCollections/client/requests/index.d.ts +2 -0
- package/dist/api/resources/documentCollections/types/MongoCollectionSyncConfig.d.ts +10 -0
- package/dist/api/resources/documentCollections/types/MongoCollectionSyncConfig.js +5 -0
- package/dist/api/resources/documentCollections/types/MongoCollectionSyncResponse.d.ts +8 -0
- package/dist/api/resources/documentCollections/types/MongoCollectionSyncResponse.js +5 -0
- package/dist/api/resources/documentCollections/types/MongoSourceFieldsConfig.d.ts +9 -0
- package/dist/api/resources/documentCollections/types/MongoSourceFieldsConfig.js +5 -0
- package/dist/api/resources/documentCollections/types/index.d.ts +3 -0
- package/dist/api/resources/documentCollections/types/index.js +3 -0
- package/dist/api/resources/permissionsService/client/Client.js +3 -3
- package/dist/api/resources/search/client/Client.js +1 -1
- package/dist/api/resources/users/client/Client.js +1 -1
- package/dist/serialization/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.d.ts +15 -0
- package/dist/serialization/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.js +36 -0
- package/dist/serialization/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.d.ts +15 -0
- package/dist/serialization/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.js +36 -0
- package/dist/serialization/resources/documentCollections/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/documentCollections/client/requests/index.js +5 -1
- package/dist/serialization/resources/documentCollections/types/MongoCollectionSyncConfig.d.ts +16 -0
- package/dist/serialization/resources/documentCollections/types/MongoCollectionSyncConfig.js +37 -0
- package/dist/serialization/resources/documentCollections/types/MongoCollectionSyncResponse.d.ts +14 -0
- package/dist/serialization/resources/documentCollections/types/MongoCollectionSyncResponse.js +35 -0
- package/dist/serialization/resources/documentCollections/types/MongoSourceFieldsConfig.d.ts +15 -0
- package/dist/serialization/resources/documentCollections/types/MongoSourceFieldsConfig.js +36 -0
- package/dist/serialization/resources/documentCollections/types/index.d.ts +3 -0
- package/dist/serialization/resources/documentCollections/types/index.js +3 -0
- package/package.json +1 -1
- package/reference.md +202 -0
- package/serialization/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.d.ts +15 -0
- package/serialization/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.js +36 -0
- package/serialization/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.d.ts +15 -0
- package/serialization/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.js +36 -0
- package/serialization/resources/documentCollections/client/requests/index.d.ts +2 -0
- package/serialization/resources/documentCollections/client/requests/index.js +5 -1
- package/serialization/resources/documentCollections/types/MongoCollectionSyncConfig.d.ts +16 -0
- package/serialization/resources/documentCollections/types/MongoCollectionSyncConfig.js +37 -0
- package/serialization/resources/documentCollections/types/MongoCollectionSyncResponse.d.ts +14 -0
- package/serialization/resources/documentCollections/types/MongoCollectionSyncResponse.js +35 -0
- package/serialization/resources/documentCollections/types/MongoSourceFieldsConfig.d.ts +15 -0
- package/serialization/resources/documentCollections/types/MongoSourceFieldsConfig.js +36 -0
- package/serialization/resources/documentCollections/types/index.d.ts +3 -0
- package/serialization/resources/documentCollections/types/index.js +3 -0
|
@@ -90,5 +90,61 @@ export declare class DocumentCollections {
|
|
|
90
90
|
* })
|
|
91
91
|
*/
|
|
92
92
|
deleteCollection(request: Credal.DeleteCollectionRequest, requestOptions?: DocumentCollections.RequestOptions): Promise<Credal.DeleteCollectionResponse>;
|
|
93
|
+
/**
|
|
94
|
+
* 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.
|
|
95
|
+
*
|
|
96
|
+
* @param {Credal.CreateMongoCollectionSyncRequest} request
|
|
97
|
+
* @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* await credal.documentCollections.createMongoCollectionSync({
|
|
101
|
+
* mongoUri: "mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
|
|
102
|
+
* collectionId: "ac20e6ba-0bae-11ef-b25a-efca73df4c3a",
|
|
103
|
+
* config: {
|
|
104
|
+
* syncName: "My sales transcripts",
|
|
105
|
+
* collectionName: "myCollection",
|
|
106
|
+
* filterExpression: {
|
|
107
|
+
* "status": {
|
|
108
|
+
* "$ne": "disabled"
|
|
109
|
+
* }
|
|
110
|
+
* },
|
|
111
|
+
* sourceFields: {
|
|
112
|
+
* body: "body",
|
|
113
|
+
* sourceName: "meetingName",
|
|
114
|
+
* sourceSystemUpdated: "transcriptDatetime",
|
|
115
|
+
* sourceUrl: "link"
|
|
116
|
+
* }
|
|
117
|
+
* }
|
|
118
|
+
* })
|
|
119
|
+
*/
|
|
120
|
+
createMongoCollectionSync(request: Credal.CreateMongoCollectionSyncRequest, requestOptions?: DocumentCollections.RequestOptions): Promise<Credal.MongoCollectionSyncResponse>;
|
|
121
|
+
/**
|
|
122
|
+
* 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.
|
|
123
|
+
*
|
|
124
|
+
* @param {Credal.UpdateMongoCollectionSyncRequest} request
|
|
125
|
+
* @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* await credal.documentCollections.updateMongoCollectionSync({
|
|
129
|
+
* mongoUri: "mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
|
|
130
|
+
* mongoCredentialId: "5988ed76-6ee1-11ef-97dd-1fca54b7c4bc",
|
|
131
|
+
* config: {
|
|
132
|
+
* syncName: "My recent summarized sales transcripts",
|
|
133
|
+
* collectionName: "myCollection",
|
|
134
|
+
* filterExpression: {
|
|
135
|
+
* "transcriptDatetime": {
|
|
136
|
+
* "$gt": "2023-01-01T00:00:00.000Z"
|
|
137
|
+
* }
|
|
138
|
+
* },
|
|
139
|
+
* sourceFields: {
|
|
140
|
+
* body: "transcriptSummary",
|
|
141
|
+
* sourceName: "meetingName",
|
|
142
|
+
* sourceSystemUpdated: "transcriptDatetime",
|
|
143
|
+
* sourceUrl: "link"
|
|
144
|
+
* }
|
|
145
|
+
* }
|
|
146
|
+
* })
|
|
147
|
+
*/
|
|
148
|
+
updateMongoCollectionSync(request: Credal.UpdateMongoCollectionSyncRequest, requestOptions?: DocumentCollections.RequestOptions): Promise<Credal.MongoCollectionSyncResponse>;
|
|
93
149
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
94
150
|
}
|
|
@@ -78,7 +78,7 @@ 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.12",
|
|
82
82
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
83
83
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
84
84
|
},
|
|
@@ -144,7 +144,7 @@ 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.12",
|
|
148
148
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
149
149
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
150
150
|
},
|
|
@@ -206,7 +206,7 @@ class DocumentCollections {
|
|
|
206
206
|
Authorization: yield this._getAuthorizationHeader(),
|
|
207
207
|
"X-Fern-Language": "JavaScript",
|
|
208
208
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
209
|
-
"X-Fern-SDK-Version": "0.0.
|
|
209
|
+
"X-Fern-SDK-Version": "0.0.12",
|
|
210
210
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
211
211
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
212
212
|
},
|
|
@@ -266,7 +266,7 @@ class DocumentCollections {
|
|
|
266
266
|
Authorization: yield this._getAuthorizationHeader(),
|
|
267
267
|
"X-Fern-Language": "JavaScript",
|
|
268
268
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
269
|
-
"X-Fern-SDK-Version": "0.0.
|
|
269
|
+
"X-Fern-SDK-Version": "0.0.12",
|
|
270
270
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
271
271
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
272
272
|
},
|
|
@@ -305,6 +305,162 @@ class DocumentCollections {
|
|
|
305
305
|
}
|
|
306
306
|
});
|
|
307
307
|
}
|
|
308
|
+
/**
|
|
309
|
+
* 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.
|
|
310
|
+
*
|
|
311
|
+
* @param {Credal.CreateMongoCollectionSyncRequest} request
|
|
312
|
+
* @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
|
|
313
|
+
*
|
|
314
|
+
* @example
|
|
315
|
+
* await credal.documentCollections.createMongoCollectionSync({
|
|
316
|
+
* mongoUri: "mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
|
|
317
|
+
* collectionId: "ac20e6ba-0bae-11ef-b25a-efca73df4c3a",
|
|
318
|
+
* config: {
|
|
319
|
+
* syncName: "My sales transcripts",
|
|
320
|
+
* collectionName: "myCollection",
|
|
321
|
+
* filterExpression: {
|
|
322
|
+
* "status": {
|
|
323
|
+
* "$ne": "disabled"
|
|
324
|
+
* }
|
|
325
|
+
* },
|
|
326
|
+
* sourceFields: {
|
|
327
|
+
* body: "body",
|
|
328
|
+
* sourceName: "meetingName",
|
|
329
|
+
* sourceSystemUpdated: "transcriptDatetime",
|
|
330
|
+
* sourceUrl: "link"
|
|
331
|
+
* }
|
|
332
|
+
* }
|
|
333
|
+
* })
|
|
334
|
+
*/
|
|
335
|
+
createMongoCollectionSync(request, requestOptions) {
|
|
336
|
+
var _a, _b;
|
|
337
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
338
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
339
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CredalEnvironment.Production, "/v0/documentCollections/mongodb/createMongoSync"),
|
|
340
|
+
method: "POST",
|
|
341
|
+
headers: {
|
|
342
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
343
|
+
"X-Fern-Language": "JavaScript",
|
|
344
|
+
"X-Fern-SDK-Name": "@credal/sdk",
|
|
345
|
+
"X-Fern-SDK-Version": "0.0.12",
|
|
346
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
347
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
348
|
+
},
|
|
349
|
+
contentType: "application/json",
|
|
350
|
+
body: yield serializers.CreateMongoCollectionSyncRequest.jsonOrThrow(request, {
|
|
351
|
+
unrecognizedObjectKeys: "strip",
|
|
352
|
+
}),
|
|
353
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
354
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
355
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
356
|
+
});
|
|
357
|
+
if (_response.ok) {
|
|
358
|
+
return yield serializers.MongoCollectionSyncResponse.parseOrThrow(_response.body, {
|
|
359
|
+
unrecognizedObjectKeys: "passthrough",
|
|
360
|
+
allowUnrecognizedUnionMembers: true,
|
|
361
|
+
allowUnrecognizedEnumValues: true,
|
|
362
|
+
breadcrumbsPrefix: ["response"],
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
if (_response.error.reason === "status-code") {
|
|
366
|
+
throw new errors.CredalError({
|
|
367
|
+
statusCode: _response.error.statusCode,
|
|
368
|
+
body: _response.error.body,
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
switch (_response.error.reason) {
|
|
372
|
+
case "non-json":
|
|
373
|
+
throw new errors.CredalError({
|
|
374
|
+
statusCode: _response.error.statusCode,
|
|
375
|
+
body: _response.error.rawBody,
|
|
376
|
+
});
|
|
377
|
+
case "timeout":
|
|
378
|
+
throw new errors.CredalTimeoutError();
|
|
379
|
+
case "unknown":
|
|
380
|
+
throw new errors.CredalError({
|
|
381
|
+
message: _response.error.errorMessage,
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* 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.
|
|
388
|
+
*
|
|
389
|
+
* @param {Credal.UpdateMongoCollectionSyncRequest} request
|
|
390
|
+
* @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
|
|
391
|
+
*
|
|
392
|
+
* @example
|
|
393
|
+
* await credal.documentCollections.updateMongoCollectionSync({
|
|
394
|
+
* mongoUri: "mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
|
|
395
|
+
* mongoCredentialId: "5988ed76-6ee1-11ef-97dd-1fca54b7c4bc",
|
|
396
|
+
* config: {
|
|
397
|
+
* syncName: "My recent summarized sales transcripts",
|
|
398
|
+
* collectionName: "myCollection",
|
|
399
|
+
* filterExpression: {
|
|
400
|
+
* "transcriptDatetime": {
|
|
401
|
+
* "$gt": "2023-01-01T00:00:00.000Z"
|
|
402
|
+
* }
|
|
403
|
+
* },
|
|
404
|
+
* sourceFields: {
|
|
405
|
+
* body: "transcriptSummary",
|
|
406
|
+
* sourceName: "meetingName",
|
|
407
|
+
* sourceSystemUpdated: "transcriptDatetime",
|
|
408
|
+
* sourceUrl: "link"
|
|
409
|
+
* }
|
|
410
|
+
* }
|
|
411
|
+
* })
|
|
412
|
+
*/
|
|
413
|
+
updateMongoCollectionSync(request, requestOptions) {
|
|
414
|
+
var _a, _b;
|
|
415
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
416
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
417
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CredalEnvironment.Production, "/v0/documentCollections/mongodb/updateMongoSync"),
|
|
418
|
+
method: "POST",
|
|
419
|
+
headers: {
|
|
420
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
421
|
+
"X-Fern-Language": "JavaScript",
|
|
422
|
+
"X-Fern-SDK-Name": "@credal/sdk",
|
|
423
|
+
"X-Fern-SDK-Version": "0.0.12",
|
|
424
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
425
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
426
|
+
},
|
|
427
|
+
contentType: "application/json",
|
|
428
|
+
body: yield serializers.UpdateMongoCollectionSyncRequest.jsonOrThrow(request, {
|
|
429
|
+
unrecognizedObjectKeys: "strip",
|
|
430
|
+
}),
|
|
431
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
432
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
433
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
434
|
+
});
|
|
435
|
+
if (_response.ok) {
|
|
436
|
+
return yield serializers.MongoCollectionSyncResponse.parseOrThrow(_response.body, {
|
|
437
|
+
unrecognizedObjectKeys: "passthrough",
|
|
438
|
+
allowUnrecognizedUnionMembers: true,
|
|
439
|
+
allowUnrecognizedEnumValues: true,
|
|
440
|
+
breadcrumbsPrefix: ["response"],
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
if (_response.error.reason === "status-code") {
|
|
444
|
+
throw new errors.CredalError({
|
|
445
|
+
statusCode: _response.error.statusCode,
|
|
446
|
+
body: _response.error.body,
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
switch (_response.error.reason) {
|
|
450
|
+
case "non-json":
|
|
451
|
+
throw new errors.CredalError({
|
|
452
|
+
statusCode: _response.error.statusCode,
|
|
453
|
+
body: _response.error.rawBody,
|
|
454
|
+
});
|
|
455
|
+
case "timeout":
|
|
456
|
+
throw new errors.CredalTimeoutError();
|
|
457
|
+
case "unknown":
|
|
458
|
+
throw new errors.CredalError({
|
|
459
|
+
message: _response.error.errorMessage,
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
});
|
|
463
|
+
}
|
|
308
464
|
_getAuthorizationHeader() {
|
|
309
465
|
var _a;
|
|
310
466
|
return __awaiter(this, void 0, void 0, function* () {
|
package/dist/api/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Credal from "../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* mongoUri: "mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
|
|
9
|
+
* collectionId: "ac20e6ba-0bae-11ef-b25a-efca73df4c3a",
|
|
10
|
+
* config: {
|
|
11
|
+
* syncName: "My sales transcripts",
|
|
12
|
+
* collectionName: "myCollection",
|
|
13
|
+
* filterExpression: {
|
|
14
|
+
* "status": {
|
|
15
|
+
* "$ne": "disabled"
|
|
16
|
+
* }
|
|
17
|
+
* },
|
|
18
|
+
* sourceFields: {
|
|
19
|
+
* body: "body",
|
|
20
|
+
* sourceName: "meetingName",
|
|
21
|
+
* sourceSystemUpdated: "transcriptDatetime",
|
|
22
|
+
* sourceUrl: "link"
|
|
23
|
+
* }
|
|
24
|
+
* }
|
|
25
|
+
* }
|
|
26
|
+
*/
|
|
27
|
+
export interface CreateMongoCollectionSyncRequest {
|
|
28
|
+
collectionId: string;
|
|
29
|
+
mongoUri: string;
|
|
30
|
+
config: Credal.MongoCollectionSyncConfig;
|
|
31
|
+
}
|
package/dist/api/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Credal from "../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* mongoUri: "mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
|
|
9
|
+
* mongoCredentialId: "5988ed76-6ee1-11ef-97dd-1fca54b7c4bc",
|
|
10
|
+
* config: {
|
|
11
|
+
* syncName: "My recent summarized sales transcripts",
|
|
12
|
+
* collectionName: "myCollection",
|
|
13
|
+
* filterExpression: {
|
|
14
|
+
* "transcriptDatetime": {
|
|
15
|
+
* "$gt": "2023-01-01T00:00:00.000Z"
|
|
16
|
+
* }
|
|
17
|
+
* },
|
|
18
|
+
* sourceFields: {
|
|
19
|
+
* body: "transcriptSummary",
|
|
20
|
+
* sourceName: "meetingName",
|
|
21
|
+
* sourceSystemUpdated: "transcriptDatetime",
|
|
22
|
+
* sourceUrl: "link"
|
|
23
|
+
* }
|
|
24
|
+
* }
|
|
25
|
+
* }
|
|
26
|
+
*/
|
|
27
|
+
export interface UpdateMongoCollectionSyncRequest {
|
|
28
|
+
mongoCredentialId: string;
|
|
29
|
+
mongoUri: string;
|
|
30
|
+
config: Credal.MongoCollectionSyncConfig;
|
|
31
|
+
}
|
|
@@ -2,3 +2,5 @@ export { type AddDocumentsToCollectionRequest } from "./AddDocumentsToCollection
|
|
|
2
2
|
export { type RemoveDocumentsFromCollectionRequest } from "./RemoveDocumentsFromCollectionRequest";
|
|
3
3
|
export { type CreateCollectionRequest } from "./CreateCollectionRequest";
|
|
4
4
|
export { type DeleteCollectionRequest } from "./DeleteCollectionRequest";
|
|
5
|
+
export { type CreateMongoCollectionSyncRequest } from "./CreateMongoCollectionSyncRequest";
|
|
6
|
+
export { type UpdateMongoCollectionSyncRequest } from "./UpdateMongoCollectionSyncRequest";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Credal from "../../../index";
|
|
5
|
+
export interface MongoCollectionSyncConfig {
|
|
6
|
+
syncName: string;
|
|
7
|
+
collectionName: string;
|
|
8
|
+
filterExpression?: unknown;
|
|
9
|
+
sourceFields: Credal.MongoSourceFieldsConfig;
|
|
10
|
+
}
|
|
@@ -16,3 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./CreateCollectionResponse"), exports);
|
|
18
18
|
__exportStar(require("./DeleteCollectionResponse"), exports);
|
|
19
|
+
__exportStar(require("./MongoSourceFieldsConfig"), exports);
|
|
20
|
+
__exportStar(require("./MongoCollectionSyncConfig"), exports);
|
|
21
|
+
__exportStar(require("./MongoCollectionSyncResponse"), exports);
|
|
@@ -74,7 +74,7 @@ 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.12",
|
|
78
78
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
79
79
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
80
80
|
},
|
|
@@ -144,7 +144,7 @@ class PermissionsService {
|
|
|
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.12",
|
|
148
148
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
149
149
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
150
150
|
},
|
|
@@ -206,7 +206,7 @@ class PermissionsService {
|
|
|
206
206
|
Authorization: yield this._getAuthorizationHeader(),
|
|
207
207
|
"X-Fern-Language": "JavaScript",
|
|
208
208
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
209
|
-
"X-Fern-SDK-Version": "0.0.
|
|
209
|
+
"X-Fern-SDK-Version": "0.0.12",
|
|
210
210
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
211
211
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
212
212
|
},
|
|
@@ -84,7 +84,7 @@ 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.12",
|
|
88
88
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
89
89
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
90
90
|
},
|
|
@@ -79,7 +79,7 @@ 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.12",
|
|
83
83
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
84
84
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
85
85
|
},
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../../../../index";
|
|
5
|
+
import * as Credal from "../../../../../api/index";
|
|
6
|
+
import * as core from "../../../../../core";
|
|
7
|
+
import { MongoCollectionSyncConfig } from "../../types/MongoCollectionSyncConfig";
|
|
8
|
+
export declare const CreateMongoCollectionSyncRequest: core.serialization.Schema<serializers.CreateMongoCollectionSyncRequest.Raw, Credal.CreateMongoCollectionSyncRequest>;
|
|
9
|
+
export declare namespace CreateMongoCollectionSyncRequest {
|
|
10
|
+
interface Raw {
|
|
11
|
+
collectionId: string;
|
|
12
|
+
mongoURI: string;
|
|
13
|
+
config: MongoCollectionSyncConfig.Raw;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.CreateMongoCollectionSyncRequest = void 0;
|
|
30
|
+
const core = __importStar(require("../../../../../core"));
|
|
31
|
+
const MongoCollectionSyncConfig_1 = require("../../types/MongoCollectionSyncConfig");
|
|
32
|
+
exports.CreateMongoCollectionSyncRequest = core.serialization.object({
|
|
33
|
+
collectionId: core.serialization.string(),
|
|
34
|
+
mongoUri: core.serialization.property("mongoURI", core.serialization.string()),
|
|
35
|
+
config: MongoCollectionSyncConfig_1.MongoCollectionSyncConfig,
|
|
36
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../../../../index";
|
|
5
|
+
import * as Credal from "../../../../../api/index";
|
|
6
|
+
import * as core from "../../../../../core";
|
|
7
|
+
import { MongoCollectionSyncConfig } from "../../types/MongoCollectionSyncConfig";
|
|
8
|
+
export declare const UpdateMongoCollectionSyncRequest: core.serialization.Schema<serializers.UpdateMongoCollectionSyncRequest.Raw, Credal.UpdateMongoCollectionSyncRequest>;
|
|
9
|
+
export declare namespace UpdateMongoCollectionSyncRequest {
|
|
10
|
+
interface Raw {
|
|
11
|
+
mongoCredentialId: string;
|
|
12
|
+
mongoURI: string;
|
|
13
|
+
config: MongoCollectionSyncConfig.Raw;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.UpdateMongoCollectionSyncRequest = void 0;
|
|
30
|
+
const core = __importStar(require("../../../../../core"));
|
|
31
|
+
const MongoCollectionSyncConfig_1 = require("../../types/MongoCollectionSyncConfig");
|
|
32
|
+
exports.UpdateMongoCollectionSyncRequest = core.serialization.object({
|
|
33
|
+
mongoCredentialId: core.serialization.string(),
|
|
34
|
+
mongoUri: core.serialization.property("mongoURI", core.serialization.string()),
|
|
35
|
+
config: MongoCollectionSyncConfig_1.MongoCollectionSyncConfig,
|
|
36
|
+
});
|
|
@@ -2,3 +2,5 @@ export { AddDocumentsToCollectionRequest } from "./AddDocumentsToCollectionReque
|
|
|
2
2
|
export { RemoveDocumentsFromCollectionRequest } from "./RemoveDocumentsFromCollectionRequest";
|
|
3
3
|
export { CreateCollectionRequest } from "./CreateCollectionRequest";
|
|
4
4
|
export { DeleteCollectionRequest } from "./DeleteCollectionRequest";
|
|
5
|
+
export { CreateMongoCollectionSyncRequest } from "./CreateMongoCollectionSyncRequest";
|
|
6
|
+
export { UpdateMongoCollectionSyncRequest } from "./UpdateMongoCollectionSyncRequest";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DeleteCollectionRequest = exports.CreateCollectionRequest = exports.RemoveDocumentsFromCollectionRequest = exports.AddDocumentsToCollectionRequest = void 0;
|
|
3
|
+
exports.UpdateMongoCollectionSyncRequest = exports.CreateMongoCollectionSyncRequest = exports.DeleteCollectionRequest = exports.CreateCollectionRequest = exports.RemoveDocumentsFromCollectionRequest = exports.AddDocumentsToCollectionRequest = void 0;
|
|
4
4
|
var AddDocumentsToCollectionRequest_1 = require("./AddDocumentsToCollectionRequest");
|
|
5
5
|
Object.defineProperty(exports, "AddDocumentsToCollectionRequest", { enumerable: true, get: function () { return AddDocumentsToCollectionRequest_1.AddDocumentsToCollectionRequest; } });
|
|
6
6
|
var RemoveDocumentsFromCollectionRequest_1 = require("./RemoveDocumentsFromCollectionRequest");
|
|
@@ -9,3 +9,7 @@ var CreateCollectionRequest_1 = require("./CreateCollectionRequest");
|
|
|
9
9
|
Object.defineProperty(exports, "CreateCollectionRequest", { enumerable: true, get: function () { return CreateCollectionRequest_1.CreateCollectionRequest; } });
|
|
10
10
|
var DeleteCollectionRequest_1 = require("./DeleteCollectionRequest");
|
|
11
11
|
Object.defineProperty(exports, "DeleteCollectionRequest", { enumerable: true, get: function () { return DeleteCollectionRequest_1.DeleteCollectionRequest; } });
|
|
12
|
+
var CreateMongoCollectionSyncRequest_1 = require("./CreateMongoCollectionSyncRequest");
|
|
13
|
+
Object.defineProperty(exports, "CreateMongoCollectionSyncRequest", { enumerable: true, get: function () { return CreateMongoCollectionSyncRequest_1.CreateMongoCollectionSyncRequest; } });
|
|
14
|
+
var UpdateMongoCollectionSyncRequest_1 = require("./UpdateMongoCollectionSyncRequest");
|
|
15
|
+
Object.defineProperty(exports, "UpdateMongoCollectionSyncRequest", { enumerable: true, get: function () { return UpdateMongoCollectionSyncRequest_1.UpdateMongoCollectionSyncRequest; } });
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../../../index";
|
|
5
|
+
import * as Credal from "../../../../api/index";
|
|
6
|
+
import * as core from "../../../../core";
|
|
7
|
+
import { MongoSourceFieldsConfig } from "./MongoSourceFieldsConfig";
|
|
8
|
+
export declare const MongoCollectionSyncConfig: core.serialization.ObjectSchema<serializers.MongoCollectionSyncConfig.Raw, Credal.MongoCollectionSyncConfig>;
|
|
9
|
+
export declare namespace MongoCollectionSyncConfig {
|
|
10
|
+
interface Raw {
|
|
11
|
+
syncName: string;
|
|
12
|
+
collectionName: string;
|
|
13
|
+
filterExpression?: unknown;
|
|
14
|
+
sourceFields: MongoSourceFieldsConfig.Raw;
|
|
15
|
+
}
|
|
16
|
+
}
|