@credal/sdk 0.1.10 → 0.1.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.
Files changed (76) hide show
  1. package/dist/cjs/BaseClient.d.ts +6 -1
  2. package/dist/cjs/BaseClient.js +47 -0
  3. package/dist/cjs/Client.d.ts +16 -16
  4. package/dist/cjs/Client.js +8 -49
  5. package/dist/cjs/api/resources/copilots/client/Client.d.ts +21 -21
  6. package/dist/cjs/api/resources/copilots/client/Client.js +41 -22
  7. package/dist/cjs/api/resources/documentCatalog/client/Client.d.ts +12 -12
  8. package/dist/cjs/api/resources/documentCatalog/client/Client.js +22 -13
  9. package/dist/cjs/api/resources/documentCollections/client/Client.d.ts +18 -18
  10. package/dist/cjs/api/resources/documentCollections/client/Client.js +34 -19
  11. package/dist/cjs/api/resources/search/client/Client.d.ts +6 -6
  12. package/dist/cjs/api/resources/search/client/Client.js +10 -7
  13. package/dist/cjs/api/resources/users/client/Client.d.ts +6 -6
  14. package/dist/cjs/api/resources/users/client/Client.js +10 -7
  15. package/dist/cjs/core/exports.d.ts +1 -0
  16. package/dist/cjs/core/exports.js +1 -0
  17. package/dist/cjs/core/fetcher/Fetcher.d.ts +4 -1
  18. package/dist/cjs/core/fetcher/Fetcher.js +202 -9
  19. package/dist/cjs/core/fetcher/getRequestBody.d.ts +1 -1
  20. package/dist/cjs/core/fetcher/getRequestBody.js +4 -0
  21. package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -1
  22. package/dist/cjs/core/fetcher/makeRequest.js +0 -2
  23. package/dist/cjs/core/fetcher/requestWithRetries.js +0 -9
  24. package/dist/cjs/core/fetcher/signals.d.ts +0 -6
  25. package/dist/cjs/core/fetcher/signals.js +0 -12
  26. package/dist/cjs/core/headers.js +6 -4
  27. package/dist/cjs/core/index.d.ts +1 -0
  28. package/dist/cjs/core/index.js +2 -1
  29. package/dist/cjs/core/logging/exports.d.ts +18 -0
  30. package/dist/cjs/core/logging/exports.js +45 -0
  31. package/dist/cjs/core/logging/index.d.ts +1 -0
  32. package/dist/cjs/core/logging/index.js +17 -0
  33. package/dist/cjs/core/logging/logger.d.ts +126 -0
  34. package/dist/cjs/core/logging/logger.js +144 -0
  35. package/dist/cjs/core/url/join.js +0 -1
  36. package/dist/cjs/version.d.ts +1 -1
  37. package/dist/cjs/version.js +1 -1
  38. package/dist/esm/BaseClient.d.mts +6 -1
  39. package/dist/esm/BaseClient.mjs +13 -1
  40. package/dist/esm/Client.d.mts +16 -16
  41. package/dist/esm/Client.mjs +13 -21
  42. package/dist/esm/api/resources/copilots/client/Client.d.mts +21 -21
  43. package/dist/esm/api/resources/copilots/client/Client.mjs +39 -20
  44. package/dist/esm/api/resources/documentCatalog/client/Client.d.mts +12 -12
  45. package/dist/esm/api/resources/documentCatalog/client/Client.mjs +20 -11
  46. package/dist/esm/api/resources/documentCollections/client/Client.d.mts +18 -18
  47. package/dist/esm/api/resources/documentCollections/client/Client.mjs +32 -17
  48. package/dist/esm/api/resources/search/client/Client.d.mts +6 -6
  49. package/dist/esm/api/resources/search/client/Client.mjs +8 -5
  50. package/dist/esm/api/resources/users/client/Client.d.mts +6 -6
  51. package/dist/esm/api/resources/users/client/Client.mjs +8 -5
  52. package/dist/esm/core/exports.d.mts +1 -0
  53. package/dist/esm/core/exports.mjs +1 -0
  54. package/dist/esm/core/fetcher/Fetcher.d.mts +4 -1
  55. package/dist/esm/core/fetcher/Fetcher.mjs +202 -9
  56. package/dist/esm/core/fetcher/getRequestBody.d.mts +1 -1
  57. package/dist/esm/core/fetcher/getRequestBody.mjs +4 -0
  58. package/dist/esm/core/fetcher/makeRequest.d.mts +1 -1
  59. package/dist/esm/core/fetcher/makeRequest.mjs +0 -2
  60. package/dist/esm/core/fetcher/requestWithRetries.mjs +0 -9
  61. package/dist/esm/core/fetcher/signals.d.mts +0 -6
  62. package/dist/esm/core/fetcher/signals.mjs +0 -12
  63. package/dist/esm/core/headers.mjs +6 -4
  64. package/dist/esm/core/index.d.mts +1 -0
  65. package/dist/esm/core/index.mjs +1 -0
  66. package/dist/esm/core/logging/exports.d.mts +18 -0
  67. package/dist/esm/core/logging/exports.mjs +9 -0
  68. package/dist/esm/core/logging/index.d.mts +1 -0
  69. package/dist/esm/core/logging/index.mjs +1 -0
  70. package/dist/esm/core/logging/logger.d.mts +126 -0
  71. package/dist/esm/core/logging/logger.mjs +138 -0
  72. package/dist/esm/core/url/join.mjs +0 -1
  73. package/dist/esm/version.d.mts +1 -1
  74. package/dist/esm/version.mjs +1 -1
  75. package/package.json +3 -2
  76. package/reference.md +21 -21
@@ -8,19 +8,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ import { normalizeClientOptions } from "../../../../BaseClient.mjs";
11
12
  import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
12
13
  import * as core from "../../../../core/index.mjs";
13
14
  import * as environments from "../../../../environments.mjs";
14
15
  import * as errors from "../../../../errors/index.mjs";
15
- export class Copilots {
16
- constructor(_options = {}) {
17
- this._options = _options;
16
+ export class CopilotsClient {
17
+ constructor(options = {}) {
18
+ this._options = normalizeClientOptions(options);
18
19
  }
19
20
  /**
20
21
  * Create a new agent. The API key used will be added to the agent for future Requests
21
22
  *
22
23
  * @param {Credal.CreateCopilotRequest} request
23
- * @param {Copilots.RequestOptions} requestOptions - Request-specific configuration.
24
+ * @param {CopilotsClient.RequestOptions} requestOptions - Request-specific configuration.
24
25
  *
25
26
  * @example
26
27
  * await client.copilots.createCopilot({
@@ -37,7 +38,7 @@ export class Copilots {
37
38
  }
38
39
  __createCopilot(request, requestOptions) {
39
40
  return __awaiter(this, void 0, void 0, function* () {
40
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
41
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
41
42
  const _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);
42
43
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
43
44
  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"),
@@ -50,6 +51,8 @@ export class Copilots {
50
51
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
51
52
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
52
53
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
54
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
55
+ logging: this._options.logging,
53
56
  });
54
57
  if (_response.ok) {
55
58
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -82,7 +85,7 @@ export class Copilots {
82
85
  * OPTIONAL. Create a new conversation with the Agent. The conversation ID can be used in the `sendMessage` endpoint. The `sendMessage` endpoint automatically creates new conversations upon first request, but calling this endpoint can simplify certain use cases where it is helpful for the application to have the conversation ID before the first message is sent.
83
86
  *
84
87
  * @param {Credal.CreateConversationRequest} request
85
- * @param {Copilots.RequestOptions} requestOptions - Request-specific configuration.
88
+ * @param {CopilotsClient.RequestOptions} requestOptions - Request-specific configuration.
86
89
  *
87
90
  * @example
88
91
  * await client.copilots.createConversation({
@@ -95,7 +98,7 @@ export class Copilots {
95
98
  }
96
99
  __createConversation(request, requestOptions) {
97
100
  return __awaiter(this, void 0, void 0, function* () {
98
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
101
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
99
102
  const _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);
100
103
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
101
104
  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"),
@@ -108,6 +111,8 @@ export class Copilots {
108
111
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
109
112
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
110
113
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
114
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
115
+ logging: this._options.logging,
111
116
  });
112
117
  if (_response.ok) {
113
118
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -138,7 +143,7 @@ export class Copilots {
138
143
  }
139
144
  /**
140
145
  * @param {Credal.ProvideMessageFeedbackRequest} request
141
- * @param {Copilots.RequestOptions} requestOptions - Request-specific configuration.
146
+ * @param {CopilotsClient.RequestOptions} requestOptions - Request-specific configuration.
142
147
  *
143
148
  * @example
144
149
  * await client.copilots.provideMessageFeedback({
@@ -157,7 +162,7 @@ export class Copilots {
157
162
  }
158
163
  __provideMessageFeedback(request, requestOptions) {
159
164
  return __awaiter(this, void 0, void 0, function* () {
160
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
165
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
161
166
  const _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);
162
167
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
163
168
  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"),
@@ -170,6 +175,8 @@ export class Copilots {
170
175
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
171
176
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
172
177
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
178
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
179
+ logging: this._options.logging,
173
180
  });
174
181
  if (_response.ok) {
175
182
  return { data: undefined, rawResponse: _response.rawResponse };
@@ -200,7 +207,7 @@ export class Copilots {
200
207
  }
201
208
  /**
202
209
  * @param {Credal.SendMessageRequest} request
203
- * @param {Copilots.RequestOptions} requestOptions - Request-specific configuration.
210
+ * @param {CopilotsClient.RequestOptions} requestOptions - Request-specific configuration.
204
211
  *
205
212
  * @example
206
213
  * await client.copilots.sendMessage({
@@ -221,7 +228,7 @@ export class Copilots {
221
228
  }
222
229
  __sendMessage(request, requestOptions) {
223
230
  return __awaiter(this, void 0, void 0, function* () {
224
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
231
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
225
232
  const _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);
226
233
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
227
234
  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"),
@@ -234,6 +241,8 @@ export class Copilots {
234
241
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
235
242
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
236
243
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
244
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
245
+ logging: this._options.logging,
237
246
  });
238
247
  if (_response.ok) {
239
248
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -270,7 +279,7 @@ export class Copilots {
270
279
  }
271
280
  __streamMessage(request, requestOptions) {
272
281
  return __awaiter(this, void 0, void 0, function* () {
273
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
282
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
274
283
  const _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);
275
284
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
276
285
  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"),
@@ -284,6 +293,8 @@ export class Copilots {
284
293
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
285
294
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
286
295
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
296
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
297
+ logging: this._options.logging,
287
298
  });
288
299
  if (_response.ok) {
289
300
  return {
@@ -327,7 +338,7 @@ export class Copilots {
327
338
  * Link a collection with a agent. The API Key used must be added to both the collection and the agent beforehand.
328
339
  *
329
340
  * @param {Credal.AddCollectionToCopilotRequest} request
330
- * @param {Copilots.RequestOptions} requestOptions - Request-specific configuration.
341
+ * @param {CopilotsClient.RequestOptions} requestOptions - Request-specific configuration.
331
342
  *
332
343
  * @example
333
344
  * await client.copilots.addCollectionToCopilot({
@@ -340,7 +351,7 @@ export class Copilots {
340
351
  }
341
352
  __addCollectionToCopilot(request, requestOptions) {
342
353
  return __awaiter(this, void 0, void 0, function* () {
343
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
354
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
344
355
  const _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);
345
356
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
346
357
  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"),
@@ -353,6 +364,8 @@ export class Copilots {
353
364
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
354
365
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
355
366
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
367
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
368
+ logging: this._options.logging,
356
369
  });
357
370
  if (_response.ok) {
358
371
  return { data: undefined, rawResponse: _response.rawResponse };
@@ -385,7 +398,7 @@ export class Copilots {
385
398
  * Unlink a collection with a agent. The API Key used must be added to both the collection and the agent beforehand.
386
399
  *
387
400
  * @param {Credal.RemoveCollectionFromCopilotRequest} request
388
- * @param {Copilots.RequestOptions} requestOptions - Request-specific configuration.
401
+ * @param {CopilotsClient.RequestOptions} requestOptions - Request-specific configuration.
389
402
  *
390
403
  * @example
391
404
  * await client.copilots.removeCollectionFromCopilot({
@@ -398,7 +411,7 @@ export class Copilots {
398
411
  }
399
412
  __removeCollectionFromCopilot(request, requestOptions) {
400
413
  return __awaiter(this, void 0, void 0, function* () {
401
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
414
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
402
415
  const _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);
403
416
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
404
417
  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"),
@@ -411,6 +424,8 @@ export class Copilots {
411
424
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
412
425
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
413
426
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
427
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
428
+ logging: this._options.logging,
414
429
  });
415
430
  if (_response.ok) {
416
431
  return { data: undefined, rawResponse: _response.rawResponse };
@@ -443,7 +458,7 @@ export class Copilots {
443
458
  * Update the configuration for a agent
444
459
  *
445
460
  * @param {Credal.UpdateConfigurationRequest} request
446
- * @param {Copilots.RequestOptions} requestOptions - Request-specific configuration.
461
+ * @param {CopilotsClient.RequestOptions} requestOptions - Request-specific configuration.
447
462
  *
448
463
  * @example
449
464
  * await client.copilots.updateConfiguration({
@@ -464,7 +479,7 @@ export class Copilots {
464
479
  }
465
480
  __updateConfiguration(request, requestOptions) {
466
481
  return __awaiter(this, void 0, void 0, function* () {
467
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
482
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
468
483
  const _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);
469
484
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
470
485
  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"),
@@ -477,6 +492,8 @@ export class Copilots {
477
492
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
478
493
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
479
494
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
495
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
496
+ logging: this._options.logging,
480
497
  });
481
498
  if (_response.ok) {
482
499
  return { data: undefined, rawResponse: _response.rawResponse };
@@ -507,7 +524,7 @@ export class Copilots {
507
524
  }
508
525
  /**
509
526
  * @param {Credal.DeleteCopilotRequest} request
510
- * @param {Copilots.RequestOptions} requestOptions - Request-specific configuration.
527
+ * @param {CopilotsClient.RequestOptions} requestOptions - Request-specific configuration.
511
528
  *
512
529
  * @example
513
530
  * await client.copilots.deleteCopilot({
@@ -519,7 +536,7 @@ export class Copilots {
519
536
  }
520
537
  __deleteCopilot(request, requestOptions) {
521
538
  return __awaiter(this, void 0, void 0, function* () {
522
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
539
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
523
540
  const _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);
524
541
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
525
542
  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"),
@@ -532,6 +549,8 @@ export class Copilots {
532
549
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
533
550
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
534
551
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
552
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
553
+ logging: this._options.logging,
535
554
  });
536
555
  if (_response.ok) {
537
556
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -1,18 +1,18 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
2
  import * as core from "../../../../core/index.mjs";
3
3
  import type * as Credal from "../../../index.mjs";
4
- export declare namespace DocumentCatalog {
4
+ export declare namespace DocumentCatalogClient {
5
5
  interface Options extends BaseClientOptions {
6
6
  }
7
7
  interface RequestOptions extends BaseRequestOptions {
8
8
  }
9
9
  }
10
- export declare class DocumentCatalog {
11
- protected readonly _options: DocumentCatalog.Options;
12
- constructor(_options?: DocumentCatalog.Options);
10
+ export declare class DocumentCatalogClient {
11
+ protected readonly _options: DocumentCatalogClient.Options;
12
+ constructor(options?: DocumentCatalogClient.Options);
13
13
  /**
14
14
  * @param {Credal.UploadDocumentContentsRequest} request
15
- * @param {DocumentCatalog.RequestOptions} requestOptions - Request-specific configuration.
15
+ * @param {DocumentCatalogClient.RequestOptions} requestOptions - Request-specific configuration.
16
16
  *
17
17
  * @example
18
18
  * await client.documentCatalog.uploadDocumentContents({
@@ -23,21 +23,21 @@ export declare class DocumentCatalog {
23
23
  * uploadAsUserEmail: "jack@credal.ai"
24
24
  * })
25
25
  */
26
- uploadDocumentContents(request: Credal.UploadDocumentContentsRequest, requestOptions?: DocumentCatalog.RequestOptions): core.HttpResponsePromise<Credal.UploadDocumentResponse>;
26
+ uploadDocumentContents(request: Credal.UploadDocumentContentsRequest, requestOptions?: DocumentCatalogClient.RequestOptions): core.HttpResponsePromise<Credal.UploadDocumentResponse>;
27
27
  private __uploadDocumentContents;
28
28
  /**
29
29
  * Upload a file (PDF, Word, Excel, CSV, PowerPoint) to Credal. Unlike uploadDocumentContents which requires pre-parsed text, this endpoint accepts actual file uploads and automatically parses them using Credal's parsing service.
30
30
  *
31
31
  * @param {Credal.UploadFileRequest} request
32
- * @param {DocumentCatalog.RequestOptions} requestOptions - Request-specific configuration.
32
+ * @param {DocumentCatalogClient.RequestOptions} requestOptions - Request-specific configuration.
33
33
  */
34
- uploadFile(request: Credal.UploadFileRequest, requestOptions?: DocumentCatalog.RequestOptions): core.HttpResponsePromise<Credal.UploadDocumentResponse>;
34
+ uploadFile(request: Credal.UploadFileRequest, requestOptions?: DocumentCatalogClient.RequestOptions): core.HttpResponsePromise<Credal.UploadDocumentResponse>;
35
35
  private __uploadFile;
36
36
  /**
37
37
  * Sync a document from a source URL. Does not support recursive web search. Reach out to a Credal representative for access.
38
38
  *
39
39
  * @param {Credal.SyncSourceByUrlRequest} request
40
- * @param {DocumentCatalog.RequestOptions} requestOptions - Request-specific configuration.
40
+ * @param {DocumentCatalogClient.RequestOptions} requestOptions - Request-specific configuration.
41
41
  *
42
42
  * @example
43
43
  * await client.documentCatalog.syncSourceByUrl({
@@ -45,13 +45,13 @@ export declare class DocumentCatalog {
45
45
  * uploadAsUserEmail: "ria@credal.ai"
46
46
  * })
47
47
  */
48
- syncSourceByUrl(request: Credal.SyncSourceByUrlRequest, requestOptions?: DocumentCatalog.RequestOptions): core.HttpResponsePromise<Credal.SyncSourceByUrlResponse>;
48
+ syncSourceByUrl(request: Credal.SyncSourceByUrlRequest, requestOptions?: DocumentCatalogClient.RequestOptions): core.HttpResponsePromise<Credal.SyncSourceByUrlResponse>;
49
49
  private __syncSourceByUrl;
50
50
  /**
51
51
  * Bulk patch metadata for documents, synced natively by Credal or manual API uploads
52
52
  *
53
53
  * @param {Credal.DocumentMetadataPatchRequest} request
54
- * @param {DocumentCatalog.RequestOptions} requestOptions - Request-specific configuration.
54
+ * @param {DocumentCatalogClient.RequestOptions} requestOptions - Request-specific configuration.
55
55
  *
56
56
  * @example
57
57
  * await client.documentCatalog.metadata({
@@ -79,7 +79,7 @@ export declare class DocumentCatalog {
79
79
  * uploadAsUserEmail: "ben@credal.ai"
80
80
  * })
81
81
  */
82
- metadata(request: Credal.DocumentMetadataPatchRequest, requestOptions?: DocumentCatalog.RequestOptions): core.HttpResponsePromise<void>;
82
+ metadata(request: Credal.DocumentMetadataPatchRequest, requestOptions?: DocumentCatalogClient.RequestOptions): core.HttpResponsePromise<void>;
83
83
  private __metadata;
84
84
  protected _getAuthorizationHeader(): Promise<string>;
85
85
  }
@@ -8,17 +8,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ import { normalizeClientOptions } from "../../../../BaseClient.mjs";
11
12
  import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
12
13
  import * as core from "../../../../core/index.mjs";
13
14
  import * as environments from "../../../../environments.mjs";
14
15
  import * as errors from "../../../../errors/index.mjs";
15
- export class DocumentCatalog {
16
- constructor(_options = {}) {
17
- this._options = _options;
16
+ export class DocumentCatalogClient {
17
+ constructor(options = {}) {
18
+ this._options = normalizeClientOptions(options);
18
19
  }
19
20
  /**
20
21
  * @param {Credal.UploadDocumentContentsRequest} request
21
- * @param {DocumentCatalog.RequestOptions} requestOptions - Request-specific configuration.
22
+ * @param {DocumentCatalogClient.RequestOptions} requestOptions - Request-specific configuration.
22
23
  *
23
24
  * @example
24
25
  * await client.documentCatalog.uploadDocumentContents({
@@ -34,7 +35,7 @@ export class DocumentCatalog {
34
35
  }
35
36
  __uploadDocumentContents(request, requestOptions) {
36
37
  return __awaiter(this, void 0, void 0, function* () {
37
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
38
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
38
39
  const _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);
39
40
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
40
41
  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"),
@@ -47,6 +48,8 @@ export class DocumentCatalog {
47
48
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
48
49
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
49
50
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
51
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
52
+ logging: this._options.logging,
50
53
  });
51
54
  if (_response.ok) {
52
55
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -79,14 +82,14 @@ export class DocumentCatalog {
79
82
  * Upload a file (PDF, Word, Excel, CSV, PowerPoint) to Credal. Unlike uploadDocumentContents which requires pre-parsed text, this endpoint accepts actual file uploads and automatically parses them using Credal's parsing service.
80
83
  *
81
84
  * @param {Credal.UploadFileRequest} request
82
- * @param {DocumentCatalog.RequestOptions} requestOptions - Request-specific configuration.
85
+ * @param {DocumentCatalogClient.RequestOptions} requestOptions - Request-specific configuration.
83
86
  */
84
87
  uploadFile(request, requestOptions) {
85
88
  return core.HttpResponsePromise.fromPromise(this.__uploadFile(request, requestOptions));
86
89
  }
87
90
  __uploadFile(request, requestOptions) {
88
91
  return __awaiter(this, void 0, void 0, function* () {
89
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
92
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
90
93
  const _request = yield core.newFormData();
91
94
  yield _request.appendFile("file", request.file);
92
95
  if (request.documentName != null) {
@@ -131,6 +134,8 @@ export class DocumentCatalog {
131
134
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
132
135
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
133
136
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
137
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
138
+ logging: this._options.logging,
134
139
  });
135
140
  if (_response.ok) {
136
141
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -163,7 +168,7 @@ export class DocumentCatalog {
163
168
  * Sync a document from a source URL. Does not support recursive web search. Reach out to a Credal representative for access.
164
169
  *
165
170
  * @param {Credal.SyncSourceByUrlRequest} request
166
- * @param {DocumentCatalog.RequestOptions} requestOptions - Request-specific configuration.
171
+ * @param {DocumentCatalogClient.RequestOptions} requestOptions - Request-specific configuration.
167
172
  *
168
173
  * @example
169
174
  * await client.documentCatalog.syncSourceByUrl({
@@ -176,7 +181,7 @@ export class DocumentCatalog {
176
181
  }
177
182
  __syncSourceByUrl(request, requestOptions) {
178
183
  return __awaiter(this, void 0, void 0, function* () {
179
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
184
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
180
185
  const _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);
181
186
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
182
187
  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"),
@@ -189,6 +194,8 @@ export class DocumentCatalog {
189
194
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
190
195
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
191
196
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
197
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
198
+ logging: this._options.logging,
192
199
  });
193
200
  if (_response.ok) {
194
201
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -221,7 +228,7 @@ export class DocumentCatalog {
221
228
  * Bulk patch metadata for documents, synced natively by Credal or manual API uploads
222
229
  *
223
230
  * @param {Credal.DocumentMetadataPatchRequest} request
224
- * @param {DocumentCatalog.RequestOptions} requestOptions - Request-specific configuration.
231
+ * @param {DocumentCatalogClient.RequestOptions} requestOptions - Request-specific configuration.
225
232
  *
226
233
  * @example
227
234
  * await client.documentCatalog.metadata({
@@ -254,7 +261,7 @@ export class DocumentCatalog {
254
261
  }
255
262
  __metadata(request, requestOptions) {
256
263
  return __awaiter(this, void 0, void 0, function* () {
257
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
264
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
258
265
  const _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);
259
266
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
260
267
  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"),
@@ -267,6 +274,8 @@ export class DocumentCatalog {
267
274
  timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
268
275
  maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
269
276
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
277
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
278
+ logging: this._options.logging,
270
279
  });
271
280
  if (_response.ok) {
272
281
  return { data: undefined, rawResponse: _response.rawResponse };
@@ -1,20 +1,20 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
2
  import * as core from "../../../../core/index.mjs";
3
3
  import type * as Credal from "../../../index.mjs";
4
- export declare namespace DocumentCollections {
4
+ export declare namespace DocumentCollectionsClient {
5
5
  interface Options extends BaseClientOptions {
6
6
  }
7
7
  interface RequestOptions extends BaseRequestOptions {
8
8
  }
9
9
  }
10
- export declare class DocumentCollections {
11
- protected readonly _options: DocumentCollections.Options;
12
- constructor(_options?: DocumentCollections.Options);
10
+ export declare class DocumentCollectionsClient {
11
+ protected readonly _options: DocumentCollectionsClient.Options;
12
+ constructor(options?: DocumentCollectionsClient.Options);
13
13
  /**
14
14
  * Add documents to a document collection. Note that the documents must already exist in the document catalog to use this endpoint. If you want to upload a new document to a collection, use the `uploadDocumentContents` endpoint.
15
15
  *
16
16
  * @param {Credal.AddDocumentsToCollectionRequest} request
17
- * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
17
+ * @param {DocumentCollectionsClient.RequestOptions} requestOptions - Request-specific configuration.
18
18
  *
19
19
  * @example
20
20
  * await client.documentCollections.addDocumentsToCollection({
@@ -30,13 +30,13 @@ export declare class DocumentCollections {
30
30
  * }]
31
31
  * })
32
32
  */
33
- addDocumentsToCollection(request: Credal.AddDocumentsToCollectionRequest, requestOptions?: DocumentCollections.RequestOptions): core.HttpResponsePromise<void>;
33
+ addDocumentsToCollection(request: Credal.AddDocumentsToCollectionRequest, requestOptions?: DocumentCollectionsClient.RequestOptions): core.HttpResponsePromise<void>;
34
34
  private __addDocumentsToCollection;
35
35
  /**
36
36
  * Remove documents from a collection
37
37
  *
38
38
  * @param {Credal.RemoveDocumentsFromCollectionRequest} request
39
- * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
39
+ * @param {DocumentCollectionsClient.RequestOptions} requestOptions - Request-specific configuration.
40
40
  *
41
41
  * @example
42
42
  * await client.documentCollections.removeDocumentsFromCollection({
@@ -52,26 +52,26 @@ export declare class DocumentCollections {
52
52
  * }]
53
53
  * })
54
54
  */
55
- removeDocumentsFromCollection(request: Credal.RemoveDocumentsFromCollectionRequest, requestOptions?: DocumentCollections.RequestOptions): core.HttpResponsePromise<void>;
55
+ removeDocumentsFromCollection(request: Credal.RemoveDocumentsFromCollectionRequest, requestOptions?: DocumentCollectionsClient.RequestOptions): core.HttpResponsePromise<void>;
56
56
  private __removeDocumentsFromCollection;
57
57
  /**
58
58
  * List documents in a collection
59
59
  *
60
60
  * @param {Credal.ListDocumentsInCollectionRequest} request
61
- * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
61
+ * @param {DocumentCollectionsClient.RequestOptions} requestOptions - Request-specific configuration.
62
62
  *
63
63
  * @example
64
64
  * await client.documentCollections.listDocumentsInCollection({
65
65
  * collectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24"
66
66
  * })
67
67
  */
68
- listDocumentsInCollection(request: Credal.ListDocumentsInCollectionRequest, requestOptions?: DocumentCollections.RequestOptions): core.HttpResponsePromise<Credal.ListDocumentsInCollectionResponse>;
68
+ listDocumentsInCollection(request: Credal.ListDocumentsInCollectionRequest, requestOptions?: DocumentCollectionsClient.RequestOptions): core.HttpResponsePromise<Credal.ListDocumentsInCollectionResponse>;
69
69
  private __listDocumentsInCollection;
70
70
  /**
71
71
  * Create a new collection. The API key used will be added to the collection for future Requests
72
72
  *
73
73
  * @param {Credal.CreateCollectionRequest} request
74
- * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
74
+ * @param {DocumentCollectionsClient.RequestOptions} requestOptions - Request-specific configuration.
75
75
  *
76
76
  * @example
77
77
  * await client.documentCollections.createCollection({
@@ -83,26 +83,26 @@ export declare class DocumentCollections {
83
83
  * }]
84
84
  * })
85
85
  */
86
- createCollection(request: Credal.CreateCollectionRequest, requestOptions?: DocumentCollections.RequestOptions): core.HttpResponsePromise<Credal.CreateCollectionResponse>;
86
+ createCollection(request: Credal.CreateCollectionRequest, requestOptions?: DocumentCollectionsClient.RequestOptions): core.HttpResponsePromise<Credal.CreateCollectionResponse>;
87
87
  private __createCollection;
88
88
  /**
89
89
  * Delete the collection.
90
90
  *
91
91
  * @param {Credal.DeleteCollectionRequest} request
92
- * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
92
+ * @param {DocumentCollectionsClient.RequestOptions} requestOptions - Request-specific configuration.
93
93
  *
94
94
  * @example
95
95
  * await client.documentCollections.deleteCollection({
96
96
  * collectionId: "ac20e6ba-0bae-11ef-b25a-efca73df4c3a"
97
97
  * })
98
98
  */
99
- deleteCollection(request: Credal.DeleteCollectionRequest, requestOptions?: DocumentCollections.RequestOptions): core.HttpResponsePromise<Credal.DeleteCollectionResponse>;
99
+ deleteCollection(request: Credal.DeleteCollectionRequest, requestOptions?: DocumentCollectionsClient.RequestOptions): core.HttpResponsePromise<Credal.DeleteCollectionResponse>;
100
100
  private __deleteCollection;
101
101
  /**
102
102
  * Credal lets you easily sync your MongoDB data for use in Collections and Agents. Create a new sync from a MongoDB collection to a Credal collection.
103
103
  *
104
104
  * @param {Credal.CreateMongoCollectionSyncRequest} request
105
- * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
105
+ * @param {DocumentCollectionsClient.RequestOptions} requestOptions - Request-specific configuration.
106
106
  *
107
107
  * @example
108
108
  * await client.documentCollections.createMongoCollectionSync({
@@ -125,13 +125,13 @@ export declare class DocumentCollections {
125
125
  * }
126
126
  * })
127
127
  */
128
- createMongoCollectionSync(request: Credal.CreateMongoCollectionSyncRequest, requestOptions?: DocumentCollections.RequestOptions): core.HttpResponsePromise<Credal.MongoCollectionSyncResponse>;
128
+ createMongoCollectionSync(request: Credal.CreateMongoCollectionSyncRequest, requestOptions?: DocumentCollectionsClient.RequestOptions): core.HttpResponsePromise<Credal.MongoCollectionSyncResponse>;
129
129
  private __createMongoCollectionSync;
130
130
  /**
131
131
  * Credal lets you easily sync your MongoDB data for use in Collections and Agents. 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.
132
132
  *
133
133
  * @param {Credal.UpdateMongoCollectionSyncRequest} request
134
- * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
134
+ * @param {DocumentCollectionsClient.RequestOptions} requestOptions - Request-specific configuration.
135
135
  *
136
136
  * @example
137
137
  * await client.documentCollections.updateMongoCollectionSync({
@@ -154,7 +154,7 @@ export declare class DocumentCollections {
154
154
  * }
155
155
  * })
156
156
  */
157
- updateMongoCollectionSync(request: Credal.UpdateMongoCollectionSyncRequest, requestOptions?: DocumentCollections.RequestOptions): core.HttpResponsePromise<Credal.MongoCollectionSyncResponse>;
157
+ updateMongoCollectionSync(request: Credal.UpdateMongoCollectionSyncRequest, requestOptions?: DocumentCollectionsClient.RequestOptions): core.HttpResponsePromise<Credal.MongoCollectionSyncResponse>;
158
158
  private __updateMongoCollectionSync;
159
159
  protected _getAuthorizationHeader(): Promise<string>;
160
160
  }