@credal/sdk 0.1.2 → 0.1.3
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/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/copilots/client/Client.js +36 -27
- package/dist/cjs/api/resources/documentCatalog/client/Client.js +12 -9
- package/dist/cjs/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.d.ts +1 -1
- package/dist/cjs/api/resources/documentCatalog/types/DocumentMetadataPatch.d.ts +1 -1
- package/dist/cjs/api/resources/documentCollections/client/Client.js +28 -21
- package/dist/cjs/api/resources/documentCollections/client/requests/ListDocumentsInCollectionRequest.d.ts +1 -3
- package/dist/cjs/api/resources/permissionsService/client/Client.js +12 -9
- package/dist/cjs/api/resources/search/client/Client.js +4 -3
- package/dist/cjs/api/resources/users/client/Client.js +4 -3
- package/dist/cjs/api/resources/users/types/UserMetadataPatch.d.ts +1 -1
- package/dist/cjs/core/auth/AuthProvider.d.ts +4 -0
- package/dist/cjs/core/auth/AuthProvider.js +2 -0
- package/dist/cjs/core/auth/AuthRequest.d.ts +9 -0
- package/dist/cjs/core/auth/AuthRequest.js +2 -0
- package/dist/cjs/core/auth/index.d.ts +2 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/copilots/client/Client.mjs +36 -27
- package/dist/esm/api/resources/documentCatalog/client/Client.mjs +12 -9
- package/dist/esm/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.d.mts +1 -1
- package/dist/esm/api/resources/documentCatalog/types/DocumentMetadataPatch.d.mts +1 -1
- package/dist/esm/api/resources/documentCollections/client/Client.mjs +28 -21
- package/dist/esm/api/resources/documentCollections/client/requests/ListDocumentsInCollectionRequest.d.mts +1 -3
- package/dist/esm/api/resources/permissionsService/client/Client.mjs +12 -9
- package/dist/esm/api/resources/search/client/Client.mjs +4 -3
- package/dist/esm/api/resources/users/client/Client.mjs +4 -3
- package/dist/esm/api/resources/users/types/UserMetadataPatch.d.mts +1 -1
- package/dist/esm/core/auth/AuthProvider.d.mts +4 -0
- package/dist/esm/core/auth/AuthProvider.mjs +1 -0
- package/dist/esm/core/auth/AuthRequest.d.mts +9 -0
- package/dist/esm/core/auth/AuthRequest.mjs +1 -0
- package/dist/esm/core/auth/index.d.mts +2 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
package/dist/cjs/Client.js
CHANGED
|
@@ -50,8 +50,8 @@ class CredalClient {
|
|
|
50
50
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
51
51
|
"X-Fern-Language": "JavaScript",
|
|
52
52
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
53
|
-
"X-Fern-SDK-Version": "0.1.
|
|
54
|
-
"User-Agent": "@credal/sdk/0.1.
|
|
53
|
+
"X-Fern-SDK-Version": "0.1.3",
|
|
54
|
+
"User-Agent": "@credal/sdk/0.1.3",
|
|
55
55
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
56
56
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
57
57
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -76,10 +76,11 @@ class Copilots {
|
|
|
76
76
|
__createCopilot(request, requestOptions) {
|
|
77
77
|
return __awaiter(this, void 0, void 0, function* () {
|
|
78
78
|
var _a, _b, _c, _d;
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
var _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
80
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
81
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/createCopilot"),
|
|
81
82
|
method: "POST",
|
|
82
|
-
headers:
|
|
83
|
+
headers: _headers,
|
|
83
84
|
contentType: "application/json",
|
|
84
85
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
85
86
|
requestType: "json",
|
|
@@ -133,10 +134,11 @@ class Copilots {
|
|
|
133
134
|
__createConversation(request, requestOptions) {
|
|
134
135
|
return __awaiter(this, void 0, void 0, function* () {
|
|
135
136
|
var _a, _b, _c, _d;
|
|
136
|
-
|
|
137
|
-
|
|
137
|
+
var _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
138
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
139
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/createConversation"),
|
|
138
140
|
method: "POST",
|
|
139
|
-
headers:
|
|
141
|
+
headers: _headers,
|
|
140
142
|
contentType: "application/json",
|
|
141
143
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
142
144
|
requestType: "json",
|
|
@@ -194,10 +196,11 @@ class Copilots {
|
|
|
194
196
|
__provideMessageFeedback(request, requestOptions) {
|
|
195
197
|
return __awaiter(this, void 0, void 0, function* () {
|
|
196
198
|
var _a, _b, _c, _d;
|
|
197
|
-
|
|
198
|
-
|
|
199
|
+
var _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
200
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
201
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/provideMessageFeedback"),
|
|
199
202
|
method: "POST",
|
|
200
|
-
headers:
|
|
203
|
+
headers: _headers,
|
|
201
204
|
contentType: "application/json",
|
|
202
205
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
203
206
|
requestType: "json",
|
|
@@ -257,10 +260,11 @@ class Copilots {
|
|
|
257
260
|
__sendMessage(request, requestOptions) {
|
|
258
261
|
return __awaiter(this, void 0, void 0, function* () {
|
|
259
262
|
var _a, _b, _c, _d;
|
|
260
|
-
|
|
261
|
-
|
|
263
|
+
var _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
264
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
265
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/sendMessage"),
|
|
262
266
|
method: "POST",
|
|
263
|
-
headers:
|
|
267
|
+
headers: _headers,
|
|
264
268
|
contentType: "application/json",
|
|
265
269
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
266
270
|
requestType: "json",
|
|
@@ -305,10 +309,11 @@ class Copilots {
|
|
|
305
309
|
__streamMessage(request, requestOptions) {
|
|
306
310
|
return __awaiter(this, void 0, void 0, function* () {
|
|
307
311
|
var _a, _b, _c, _d;
|
|
308
|
-
|
|
309
|
-
|
|
312
|
+
var _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
313
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
314
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/streamMessage"),
|
|
310
315
|
method: "POST",
|
|
311
|
-
headers:
|
|
316
|
+
headers: _headers,
|
|
312
317
|
contentType: "application/json",
|
|
313
318
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
314
319
|
requestType: "json",
|
|
@@ -374,10 +379,11 @@ class Copilots {
|
|
|
374
379
|
__addCollectionToCopilot(request, requestOptions) {
|
|
375
380
|
return __awaiter(this, void 0, void 0, function* () {
|
|
376
381
|
var _a, _b, _c, _d;
|
|
377
|
-
|
|
378
|
-
|
|
382
|
+
var _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
383
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
384
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/addCollectionToCopilot"),
|
|
379
385
|
method: "POST",
|
|
380
|
-
headers:
|
|
386
|
+
headers: _headers,
|
|
381
387
|
contentType: "application/json",
|
|
382
388
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
383
389
|
requestType: "json",
|
|
@@ -431,10 +437,11 @@ class Copilots {
|
|
|
431
437
|
__removeCollectionFromCopilot(request, requestOptions) {
|
|
432
438
|
return __awaiter(this, void 0, void 0, function* () {
|
|
433
439
|
var _a, _b, _c, _d;
|
|
434
|
-
|
|
435
|
-
|
|
440
|
+
var _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
441
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
442
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/removeCollectionFromCopilot"),
|
|
436
443
|
method: "POST",
|
|
437
|
-
headers:
|
|
444
|
+
headers: _headers,
|
|
438
445
|
contentType: "application/json",
|
|
439
446
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
440
447
|
requestType: "json",
|
|
@@ -496,10 +503,11 @@ class Copilots {
|
|
|
496
503
|
__updateConfiguration(request, requestOptions) {
|
|
497
504
|
return __awaiter(this, void 0, void 0, function* () {
|
|
498
505
|
var _a, _b, _c, _d;
|
|
499
|
-
|
|
500
|
-
|
|
506
|
+
var _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
507
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
508
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/updateConfiguration"),
|
|
501
509
|
method: "POST",
|
|
502
|
-
headers:
|
|
510
|
+
headers: _headers,
|
|
503
511
|
contentType: "application/json",
|
|
504
512
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
505
513
|
requestType: "json",
|
|
@@ -550,10 +558,11 @@ class Copilots {
|
|
|
550
558
|
__deleteCopilot(request, requestOptions) {
|
|
551
559
|
return __awaiter(this, void 0, void 0, function* () {
|
|
552
560
|
var _a, _b, _c, _d;
|
|
553
|
-
|
|
554
|
-
|
|
561
|
+
var _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
562
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
563
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/deleteCopilot"),
|
|
555
564
|
method: "DELETE",
|
|
556
|
-
headers:
|
|
565
|
+
headers: _headers,
|
|
557
566
|
contentType: "application/json",
|
|
558
567
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
559
568
|
requestType: "json",
|
|
@@ -73,10 +73,11 @@ class DocumentCatalog {
|
|
|
73
73
|
__uploadDocumentContents(request, requestOptions) {
|
|
74
74
|
return __awaiter(this, void 0, void 0, function* () {
|
|
75
75
|
var _a, _b, _c, _d;
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
var _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
77
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
78
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/catalog/uploadDocumentContents"),
|
|
78
79
|
method: "POST",
|
|
79
|
-
headers:
|
|
80
|
+
headers: _headers,
|
|
80
81
|
contentType: "application/json",
|
|
81
82
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
82
83
|
requestType: "json",
|
|
@@ -130,10 +131,11 @@ class DocumentCatalog {
|
|
|
130
131
|
__syncSourceByUrl(request, requestOptions) {
|
|
131
132
|
return __awaiter(this, void 0, void 0, function* () {
|
|
132
133
|
var _a, _b, _c, _d;
|
|
133
|
-
|
|
134
|
-
|
|
134
|
+
var _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
135
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
136
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/catalog/syncSourceByUrl"),
|
|
135
137
|
method: "POST",
|
|
136
|
-
headers:
|
|
138
|
+
headers: _headers,
|
|
137
139
|
contentType: "application/json",
|
|
138
140
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
139
141
|
requestType: "json",
|
|
@@ -207,10 +209,11 @@ class DocumentCatalog {
|
|
|
207
209
|
__metadata(request, requestOptions) {
|
|
208
210
|
return __awaiter(this, void 0, void 0, function* () {
|
|
209
211
|
var _a, _b, _c, _d;
|
|
210
|
-
|
|
211
|
-
|
|
212
|
+
var _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
213
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
214
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/catalog/metadata"),
|
|
212
215
|
method: "PATCH",
|
|
213
|
-
headers:
|
|
216
|
+
headers: _headers,
|
|
214
217
|
contentType: "application/json",
|
|
215
218
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
216
219
|
requestType: "json",
|
package/dist/cjs/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export interface UploadDocumentContentsRequest {
|
|
|
25
25
|
/** The external URL of the document you want to upload. If provided Credal will link to this URL. */
|
|
26
26
|
documentExternalUrl?: string;
|
|
27
27
|
/** Optional JSON representing any custom metadata for this document */
|
|
28
|
-
customMetadata?: unknown
|
|
28
|
+
customMetadata?: Record<string, unknown>;
|
|
29
29
|
/** If specified, document will also be added to a particular document collection */
|
|
30
30
|
collectionId?: string;
|
|
31
31
|
/** If specified, document contents will be re-uploaded and re-embedded even if the document already exists in Credal */
|
|
@@ -6,5 +6,5 @@ export interface DocumentMetadataPatch {
|
|
|
6
6
|
/** The identifier for the resource you want to patch */
|
|
7
7
|
resourceIdentifier: Credal.ResourceIdentifier;
|
|
8
8
|
/** Key-value object of metadata for document. Keys will be merged with any existing values but can also be set to `null` to effectively remove */
|
|
9
|
-
metadata
|
|
9
|
+
metadata: Record<string, unknown>;
|
|
10
10
|
}
|
|
@@ -80,10 +80,11 @@ class DocumentCollections {
|
|
|
80
80
|
__addDocumentsToCollection(request, requestOptions) {
|
|
81
81
|
return __awaiter(this, void 0, void 0, function* () {
|
|
82
82
|
var _a, _b, _c, _d;
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
var _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
84
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
85
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/documentCollections/addDocumentsToCollection"),
|
|
85
86
|
method: "POST",
|
|
86
|
-
headers:
|
|
87
|
+
headers: _headers,
|
|
87
88
|
contentType: "application/json",
|
|
88
89
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
89
90
|
requestType: "json",
|
|
@@ -145,10 +146,11 @@ class DocumentCollections {
|
|
|
145
146
|
__removeDocumentsFromCollection(request, requestOptions) {
|
|
146
147
|
return __awaiter(this, void 0, void 0, function* () {
|
|
147
148
|
var _a, _b, _c, _d;
|
|
148
|
-
|
|
149
|
-
|
|
149
|
+
var _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
150
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
151
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/documentCollections/removeDocumentsFromCollection"),
|
|
150
152
|
method: "DELETE",
|
|
151
|
-
headers:
|
|
153
|
+
headers: _headers,
|
|
152
154
|
contentType: "application/json",
|
|
153
155
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
154
156
|
requestType: "json",
|
|
@@ -204,10 +206,11 @@ class DocumentCollections {
|
|
|
204
206
|
const { collectionId } = request;
|
|
205
207
|
const _queryParams = {};
|
|
206
208
|
_queryParams["collectionId"] = collectionId;
|
|
207
|
-
|
|
208
|
-
|
|
209
|
+
var _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
210
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
211
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/documentCollections/listDocumentsInCollection"),
|
|
209
212
|
method: "GET",
|
|
210
|
-
headers:
|
|
213
|
+
headers: _headers,
|
|
211
214
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
212
215
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
213
216
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -265,10 +268,11 @@ class DocumentCollections {
|
|
|
265
268
|
__createCollection(request, requestOptions) {
|
|
266
269
|
return __awaiter(this, void 0, void 0, function* () {
|
|
267
270
|
var _a, _b, _c, _d;
|
|
268
|
-
|
|
269
|
-
|
|
271
|
+
var _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
272
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
273
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/documentCollections/createCollection"),
|
|
270
274
|
method: "POST",
|
|
271
|
-
headers:
|
|
275
|
+
headers: _headers,
|
|
272
276
|
contentType: "application/json",
|
|
273
277
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
274
278
|
requestType: "json",
|
|
@@ -321,10 +325,11 @@ class DocumentCollections {
|
|
|
321
325
|
__deleteCollection(request, requestOptions) {
|
|
322
326
|
return __awaiter(this, void 0, void 0, function* () {
|
|
323
327
|
var _a, _b, _c, _d;
|
|
324
|
-
|
|
325
|
-
|
|
328
|
+
var _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
329
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
330
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/documentCollections/deleteCollection"),
|
|
326
331
|
method: "DELETE",
|
|
327
|
-
headers:
|
|
332
|
+
headers: _headers,
|
|
328
333
|
contentType: "application/json",
|
|
329
334
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
330
335
|
requestType: "json",
|
|
@@ -393,10 +398,11 @@ class DocumentCollections {
|
|
|
393
398
|
__createMongoCollectionSync(request, requestOptions) {
|
|
394
399
|
return __awaiter(this, void 0, void 0, function* () {
|
|
395
400
|
var _a, _b, _c, _d;
|
|
396
|
-
|
|
397
|
-
|
|
401
|
+
var _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
402
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
403
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/documentCollections/mongodb/createMongoSync"),
|
|
398
404
|
method: "POST",
|
|
399
|
-
headers:
|
|
405
|
+
headers: _headers,
|
|
400
406
|
contentType: "application/json",
|
|
401
407
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
402
408
|
requestType: "json",
|
|
@@ -465,10 +471,11 @@ class DocumentCollections {
|
|
|
465
471
|
__updateMongoCollectionSync(request, requestOptions) {
|
|
466
472
|
return __awaiter(this, void 0, void 0, function* () {
|
|
467
473
|
var _a, _b, _c, _d;
|
|
468
|
-
|
|
469
|
-
|
|
474
|
+
var _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
475
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
476
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/documentCollections/mongodb/updateMongoSync"),
|
|
470
477
|
method: "POST",
|
|
471
|
-
headers:
|
|
478
|
+
headers: _headers,
|
|
472
479
|
contentType: "application/json",
|
|
473
480
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
474
481
|
requestType: "json",
|
|
@@ -76,10 +76,11 @@ class PermissionsService {
|
|
|
76
76
|
__checkResourceAuthorizationForUser(request, requestOptions) {
|
|
77
77
|
return __awaiter(this, void 0, void 0, function* () {
|
|
78
78
|
var _a, _b, _c, _d;
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
var _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
80
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
81
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/permissions/checkResourceAuthorizationForUser"),
|
|
81
82
|
method: "POST",
|
|
82
|
-
headers:
|
|
83
|
+
headers: _headers,
|
|
83
84
|
contentType: "application/json",
|
|
84
85
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
85
86
|
requestType: "json",
|
|
@@ -143,10 +144,11 @@ class PermissionsService {
|
|
|
143
144
|
__checkBulkResourcesAuthorizationForUser(request, requestOptions) {
|
|
144
145
|
return __awaiter(this, void 0, void 0, function* () {
|
|
145
146
|
var _a, _b, _c, _d;
|
|
146
|
-
|
|
147
|
-
|
|
147
|
+
var _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
148
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
149
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/permissions/checkBulkResourcesAuthorizationForUser"),
|
|
148
150
|
method: "POST",
|
|
149
|
-
headers:
|
|
151
|
+
headers: _headers,
|
|
150
152
|
contentType: "application/json",
|
|
151
153
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
152
154
|
requestType: "json",
|
|
@@ -202,10 +204,11 @@ class PermissionsService {
|
|
|
202
204
|
__listCachedAuthorizedResourcesForUser(request, requestOptions) {
|
|
203
205
|
return __awaiter(this, void 0, void 0, function* () {
|
|
204
206
|
var _a, _b, _c, _d;
|
|
205
|
-
|
|
206
|
-
|
|
207
|
+
var _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
208
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
209
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/permissions/listCachedAuthorizedResourcesForUser"),
|
|
207
210
|
method: "POST",
|
|
208
|
-
headers:
|
|
211
|
+
headers: _headers,
|
|
209
212
|
contentType: "application/json",
|
|
210
213
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
211
214
|
requestType: "json",
|
|
@@ -86,10 +86,11 @@ class Search {
|
|
|
86
86
|
__searchDocumentCollection(request, requestOptions) {
|
|
87
87
|
return __awaiter(this, void 0, void 0, function* () {
|
|
88
88
|
var _a, _b, _c, _d;
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
var _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
90
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
91
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/search/searchDocumentCollection"),
|
|
91
92
|
method: "POST",
|
|
92
|
-
headers:
|
|
93
|
+
headers: _headers,
|
|
93
94
|
contentType: "application/json",
|
|
94
95
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
95
96
|
requestType: "json",
|
|
@@ -81,10 +81,11 @@ class Users {
|
|
|
81
81
|
__metadata(request, requestOptions) {
|
|
82
82
|
return __awaiter(this, void 0, void 0, function* () {
|
|
83
83
|
var _a, _b, _c, _d;
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
var _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
85
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
86
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/users/metadata"),
|
|
86
87
|
method: "PATCH",
|
|
87
|
-
headers:
|
|
88
|
+
headers: _headers,
|
|
88
89
|
contentType: "application/json",
|
|
89
90
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
90
91
|
requestType: "json",
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.1.
|
|
1
|
+
export declare const SDK_VERSION = "0.1.3";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -14,8 +14,8 @@ export class CredalClient {
|
|
|
14
14
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
15
15
|
"X-Fern-Language": "JavaScript",
|
|
16
16
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
17
|
-
"X-Fern-SDK-Version": "0.1.
|
|
18
|
-
"User-Agent": "@credal/sdk/0.1.
|
|
17
|
+
"X-Fern-SDK-Version": "0.1.3",
|
|
18
|
+
"User-Agent": "@credal/sdk/0.1.3",
|
|
19
19
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
20
20
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
21
21
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -40,10 +40,11 @@ export class Copilots {
|
|
|
40
40
|
__createCopilot(request, requestOptions) {
|
|
41
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
42
|
var _a, _b, _c, _d;
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
44
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
45
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/createCopilot"),
|
|
45
46
|
method: "POST",
|
|
46
|
-
headers:
|
|
47
|
+
headers: _headers,
|
|
47
48
|
contentType: "application/json",
|
|
48
49
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
49
50
|
requestType: "json",
|
|
@@ -97,10 +98,11 @@ export class Copilots {
|
|
|
97
98
|
__createConversation(request, requestOptions) {
|
|
98
99
|
return __awaiter(this, void 0, void 0, function* () {
|
|
99
100
|
var _a, _b, _c, _d;
|
|
100
|
-
|
|
101
|
-
|
|
101
|
+
var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
102
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
103
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/createConversation"),
|
|
102
104
|
method: "POST",
|
|
103
|
-
headers:
|
|
105
|
+
headers: _headers,
|
|
104
106
|
contentType: "application/json",
|
|
105
107
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
106
108
|
requestType: "json",
|
|
@@ -158,10 +160,11 @@ export class Copilots {
|
|
|
158
160
|
__provideMessageFeedback(request, requestOptions) {
|
|
159
161
|
return __awaiter(this, void 0, void 0, function* () {
|
|
160
162
|
var _a, _b, _c, _d;
|
|
161
|
-
|
|
162
|
-
|
|
163
|
+
var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
164
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
165
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/provideMessageFeedback"),
|
|
163
166
|
method: "POST",
|
|
164
|
-
headers:
|
|
167
|
+
headers: _headers,
|
|
165
168
|
contentType: "application/json",
|
|
166
169
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
167
170
|
requestType: "json",
|
|
@@ -221,10 +224,11 @@ export class Copilots {
|
|
|
221
224
|
__sendMessage(request, requestOptions) {
|
|
222
225
|
return __awaiter(this, void 0, void 0, function* () {
|
|
223
226
|
var _a, _b, _c, _d;
|
|
224
|
-
|
|
225
|
-
|
|
227
|
+
var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
228
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
229
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/sendMessage"),
|
|
226
230
|
method: "POST",
|
|
227
|
-
headers:
|
|
231
|
+
headers: _headers,
|
|
228
232
|
contentType: "application/json",
|
|
229
233
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
230
234
|
requestType: "json",
|
|
@@ -269,10 +273,11 @@ export class Copilots {
|
|
|
269
273
|
__streamMessage(request, requestOptions) {
|
|
270
274
|
return __awaiter(this, void 0, void 0, function* () {
|
|
271
275
|
var _a, _b, _c, _d;
|
|
272
|
-
|
|
273
|
-
|
|
276
|
+
var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
277
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
278
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/streamMessage"),
|
|
274
279
|
method: "POST",
|
|
275
|
-
headers:
|
|
280
|
+
headers: _headers,
|
|
276
281
|
contentType: "application/json",
|
|
277
282
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
278
283
|
requestType: "json",
|
|
@@ -338,10 +343,11 @@ export class Copilots {
|
|
|
338
343
|
__addCollectionToCopilot(request, requestOptions) {
|
|
339
344
|
return __awaiter(this, void 0, void 0, function* () {
|
|
340
345
|
var _a, _b, _c, _d;
|
|
341
|
-
|
|
342
|
-
|
|
346
|
+
var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
347
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
348
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/addCollectionToCopilot"),
|
|
343
349
|
method: "POST",
|
|
344
|
-
headers:
|
|
350
|
+
headers: _headers,
|
|
345
351
|
contentType: "application/json",
|
|
346
352
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
347
353
|
requestType: "json",
|
|
@@ -395,10 +401,11 @@ export class Copilots {
|
|
|
395
401
|
__removeCollectionFromCopilot(request, requestOptions) {
|
|
396
402
|
return __awaiter(this, void 0, void 0, function* () {
|
|
397
403
|
var _a, _b, _c, _d;
|
|
398
|
-
|
|
399
|
-
|
|
404
|
+
var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
405
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
406
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/removeCollectionFromCopilot"),
|
|
400
407
|
method: "POST",
|
|
401
|
-
headers:
|
|
408
|
+
headers: _headers,
|
|
402
409
|
contentType: "application/json",
|
|
403
410
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
404
411
|
requestType: "json",
|
|
@@ -460,10 +467,11 @@ export class Copilots {
|
|
|
460
467
|
__updateConfiguration(request, requestOptions) {
|
|
461
468
|
return __awaiter(this, void 0, void 0, function* () {
|
|
462
469
|
var _a, _b, _c, _d;
|
|
463
|
-
|
|
464
|
-
|
|
470
|
+
var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
471
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
472
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/updateConfiguration"),
|
|
465
473
|
method: "POST",
|
|
466
|
-
headers:
|
|
474
|
+
headers: _headers,
|
|
467
475
|
contentType: "application/json",
|
|
468
476
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
469
477
|
requestType: "json",
|
|
@@ -514,10 +522,11 @@ export class Copilots {
|
|
|
514
522
|
__deleteCopilot(request, requestOptions) {
|
|
515
523
|
return __awaiter(this, void 0, void 0, function* () {
|
|
516
524
|
var _a, _b, _c, _d;
|
|
517
|
-
|
|
518
|
-
|
|
525
|
+
var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
526
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
527
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/deleteCopilot"),
|
|
519
528
|
method: "DELETE",
|
|
520
|
-
headers:
|
|
529
|
+
headers: _headers,
|
|
521
530
|
contentType: "application/json",
|
|
522
531
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
523
532
|
requestType: "json",
|
|
@@ -37,10 +37,11 @@ export class DocumentCatalog {
|
|
|
37
37
|
__uploadDocumentContents(request, requestOptions) {
|
|
38
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
39
|
var _a, _b, _c, _d;
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
41
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
42
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/catalog/uploadDocumentContents"),
|
|
42
43
|
method: "POST",
|
|
43
|
-
headers:
|
|
44
|
+
headers: _headers,
|
|
44
45
|
contentType: "application/json",
|
|
45
46
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
46
47
|
requestType: "json",
|
|
@@ -94,10 +95,11 @@ export class DocumentCatalog {
|
|
|
94
95
|
__syncSourceByUrl(request, requestOptions) {
|
|
95
96
|
return __awaiter(this, void 0, void 0, function* () {
|
|
96
97
|
var _a, _b, _c, _d;
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
99
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
100
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/catalog/syncSourceByUrl"),
|
|
99
101
|
method: "POST",
|
|
100
|
-
headers:
|
|
102
|
+
headers: _headers,
|
|
101
103
|
contentType: "application/json",
|
|
102
104
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
103
105
|
requestType: "json",
|
|
@@ -171,10 +173,11 @@ export class DocumentCatalog {
|
|
|
171
173
|
__metadata(request, requestOptions) {
|
|
172
174
|
return __awaiter(this, void 0, void 0, function* () {
|
|
173
175
|
var _a, _b, _c, _d;
|
|
174
|
-
|
|
175
|
-
|
|
176
|
+
var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
177
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
178
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/catalog/metadata"),
|
|
176
179
|
method: "PATCH",
|
|
177
|
-
headers:
|
|
180
|
+
headers: _headers,
|
|
178
181
|
contentType: "application/json",
|
|
179
182
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
180
183
|
requestType: "json",
|
package/dist/esm/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.d.mts
CHANGED
|
@@ -25,7 +25,7 @@ export interface UploadDocumentContentsRequest {
|
|
|
25
25
|
/** The external URL of the document you want to upload. If provided Credal will link to this URL. */
|
|
26
26
|
documentExternalUrl?: string;
|
|
27
27
|
/** Optional JSON representing any custom metadata for this document */
|
|
28
|
-
customMetadata?: unknown
|
|
28
|
+
customMetadata?: Record<string, unknown>;
|
|
29
29
|
/** If specified, document will also be added to a particular document collection */
|
|
30
30
|
collectionId?: string;
|
|
31
31
|
/** If specified, document contents will be re-uploaded and re-embedded even if the document already exists in Credal */
|
|
@@ -6,5 +6,5 @@ export interface DocumentMetadataPatch {
|
|
|
6
6
|
/** The identifier for the resource you want to patch */
|
|
7
7
|
resourceIdentifier: Credal.ResourceIdentifier;
|
|
8
8
|
/** Key-value object of metadata for document. Keys will be merged with any existing values but can also be set to `null` to effectively remove */
|
|
9
|
-
metadata
|
|
9
|
+
metadata: Record<string, unknown>;
|
|
10
10
|
}
|
|
@@ -44,10 +44,11 @@ export class DocumentCollections {
|
|
|
44
44
|
__addDocumentsToCollection(request, requestOptions) {
|
|
45
45
|
return __awaiter(this, void 0, void 0, function* () {
|
|
46
46
|
var _a, _b, _c, _d;
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
48
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
49
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/documentCollections/addDocumentsToCollection"),
|
|
49
50
|
method: "POST",
|
|
50
|
-
headers:
|
|
51
|
+
headers: _headers,
|
|
51
52
|
contentType: "application/json",
|
|
52
53
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
53
54
|
requestType: "json",
|
|
@@ -109,10 +110,11 @@ export class DocumentCollections {
|
|
|
109
110
|
__removeDocumentsFromCollection(request, requestOptions) {
|
|
110
111
|
return __awaiter(this, void 0, void 0, function* () {
|
|
111
112
|
var _a, _b, _c, _d;
|
|
112
|
-
|
|
113
|
-
|
|
113
|
+
var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
114
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
115
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/documentCollections/removeDocumentsFromCollection"),
|
|
114
116
|
method: "DELETE",
|
|
115
|
-
headers:
|
|
117
|
+
headers: _headers,
|
|
116
118
|
contentType: "application/json",
|
|
117
119
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
118
120
|
requestType: "json",
|
|
@@ -168,10 +170,11 @@ export class DocumentCollections {
|
|
|
168
170
|
const { collectionId } = request;
|
|
169
171
|
const _queryParams = {};
|
|
170
172
|
_queryParams["collectionId"] = collectionId;
|
|
171
|
-
|
|
172
|
-
|
|
173
|
+
var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
174
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
175
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/documentCollections/listDocumentsInCollection"),
|
|
173
176
|
method: "GET",
|
|
174
|
-
headers:
|
|
177
|
+
headers: _headers,
|
|
175
178
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
176
179
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
177
180
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -229,10 +232,11 @@ export class DocumentCollections {
|
|
|
229
232
|
__createCollection(request, requestOptions) {
|
|
230
233
|
return __awaiter(this, void 0, void 0, function* () {
|
|
231
234
|
var _a, _b, _c, _d;
|
|
232
|
-
|
|
233
|
-
|
|
235
|
+
var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
236
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
237
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/documentCollections/createCollection"),
|
|
234
238
|
method: "POST",
|
|
235
|
-
headers:
|
|
239
|
+
headers: _headers,
|
|
236
240
|
contentType: "application/json",
|
|
237
241
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
238
242
|
requestType: "json",
|
|
@@ -285,10 +289,11 @@ export class DocumentCollections {
|
|
|
285
289
|
__deleteCollection(request, requestOptions) {
|
|
286
290
|
return __awaiter(this, void 0, void 0, function* () {
|
|
287
291
|
var _a, _b, _c, _d;
|
|
288
|
-
|
|
289
|
-
|
|
292
|
+
var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
293
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
294
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/documentCollections/deleteCollection"),
|
|
290
295
|
method: "DELETE",
|
|
291
|
-
headers:
|
|
296
|
+
headers: _headers,
|
|
292
297
|
contentType: "application/json",
|
|
293
298
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
294
299
|
requestType: "json",
|
|
@@ -357,10 +362,11 @@ export class DocumentCollections {
|
|
|
357
362
|
__createMongoCollectionSync(request, requestOptions) {
|
|
358
363
|
return __awaiter(this, void 0, void 0, function* () {
|
|
359
364
|
var _a, _b, _c, _d;
|
|
360
|
-
|
|
361
|
-
|
|
365
|
+
var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
366
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
367
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/documentCollections/mongodb/createMongoSync"),
|
|
362
368
|
method: "POST",
|
|
363
|
-
headers:
|
|
369
|
+
headers: _headers,
|
|
364
370
|
contentType: "application/json",
|
|
365
371
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
366
372
|
requestType: "json",
|
|
@@ -429,10 +435,11 @@ export class DocumentCollections {
|
|
|
429
435
|
__updateMongoCollectionSync(request, requestOptions) {
|
|
430
436
|
return __awaiter(this, void 0, void 0, function* () {
|
|
431
437
|
var _a, _b, _c, _d;
|
|
432
|
-
|
|
433
|
-
|
|
438
|
+
var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
439
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
440
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/documentCollections/mongodb/updateMongoSync"),
|
|
434
441
|
method: "POST",
|
|
435
|
-
headers:
|
|
442
|
+
headers: _headers,
|
|
436
443
|
contentType: "application/json",
|
|
437
444
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
438
445
|
requestType: "json",
|
|
@@ -40,10 +40,11 @@ export class PermissionsService {
|
|
|
40
40
|
__checkResourceAuthorizationForUser(request, requestOptions) {
|
|
41
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
42
|
var _a, _b, _c, _d;
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
44
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
45
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/permissions/checkResourceAuthorizationForUser"),
|
|
45
46
|
method: "POST",
|
|
46
|
-
headers:
|
|
47
|
+
headers: _headers,
|
|
47
48
|
contentType: "application/json",
|
|
48
49
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
49
50
|
requestType: "json",
|
|
@@ -107,10 +108,11 @@ export class PermissionsService {
|
|
|
107
108
|
__checkBulkResourcesAuthorizationForUser(request, requestOptions) {
|
|
108
109
|
return __awaiter(this, void 0, void 0, function* () {
|
|
109
110
|
var _a, _b, _c, _d;
|
|
110
|
-
|
|
111
|
-
|
|
111
|
+
var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
112
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
113
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/permissions/checkBulkResourcesAuthorizationForUser"),
|
|
112
114
|
method: "POST",
|
|
113
|
-
headers:
|
|
115
|
+
headers: _headers,
|
|
114
116
|
contentType: "application/json",
|
|
115
117
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
116
118
|
requestType: "json",
|
|
@@ -166,10 +168,11 @@ export class PermissionsService {
|
|
|
166
168
|
__listCachedAuthorizedResourcesForUser(request, requestOptions) {
|
|
167
169
|
return __awaiter(this, void 0, void 0, function* () {
|
|
168
170
|
var _a, _b, _c, _d;
|
|
169
|
-
|
|
170
|
-
|
|
171
|
+
var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
172
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
173
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/permissions/listCachedAuthorizedResourcesForUser"),
|
|
171
174
|
method: "POST",
|
|
172
|
-
headers:
|
|
175
|
+
headers: _headers,
|
|
173
176
|
contentType: "application/json",
|
|
174
177
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
175
178
|
requestType: "json",
|
|
@@ -50,10 +50,11 @@ export class Search {
|
|
|
50
50
|
__searchDocumentCollection(request, requestOptions) {
|
|
51
51
|
return __awaiter(this, void 0, void 0, function* () {
|
|
52
52
|
var _a, _b, _c, _d;
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
54
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
55
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/search/searchDocumentCollection"),
|
|
55
56
|
method: "POST",
|
|
56
|
-
headers:
|
|
57
|
+
headers: _headers,
|
|
57
58
|
contentType: "application/json",
|
|
58
59
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
59
60
|
requestType: "json",
|
|
@@ -45,10 +45,11 @@ export class Users {
|
|
|
45
45
|
__metadata(request, requestOptions) {
|
|
46
46
|
return __awaiter(this, void 0, void 0, function* () {
|
|
47
47
|
var _a, _b, _c, _d;
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
49
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
50
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/users/metadata"),
|
|
50
51
|
method: "PATCH",
|
|
51
|
-
headers:
|
|
52
|
+
headers: _headers,
|
|
52
53
|
contentType: "application/json",
|
|
53
54
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
54
55
|
requestType: "json",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.1.
|
|
1
|
+
export declare const SDK_VERSION = "0.1.3";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.1.
|
|
1
|
+
export const SDK_VERSION = "0.1.3";
|