agentmail 0.0.49 → 0.0.51

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 (87) hide show
  1. package/README.md +13 -2
  2. package/dist/cjs/Client.d.ts +2 -0
  3. package/dist/cjs/Client.js +2 -2
  4. package/dist/cjs/api/resources/domains/client/Client.d.ts +2 -0
  5. package/dist/cjs/api/resources/domains/client/Client.js +16 -9
  6. package/dist/cjs/api/resources/drafts/client/Client.d.ts +2 -0
  7. package/dist/cjs/api/resources/drafts/client/Client.js +8 -5
  8. package/dist/cjs/api/resources/drafts/types/CreateDraftRequest.d.ts +1 -0
  9. package/dist/cjs/api/resources/drafts/types/Draft.d.ts +2 -0
  10. package/dist/cjs/api/resources/drafts/types/DraftItem.d.ts +2 -0
  11. package/dist/cjs/api/resources/drafts/types/DraftSendAt.d.ts +7 -0
  12. package/dist/cjs/api/resources/drafts/types/DraftSendAt.js +5 -0
  13. package/dist/cjs/api/resources/drafts/types/DraftSendStatus.d.ts +12 -0
  14. package/dist/cjs/api/resources/drafts/types/DraftSendStatus.js +11 -0
  15. package/dist/cjs/api/resources/drafts/types/index.d.ts +2 -0
  16. package/dist/cjs/api/resources/drafts/types/index.js +2 -0
  17. package/dist/cjs/api/resources/inboxes/client/Client.d.ts +2 -0
  18. package/dist/cjs/api/resources/inboxes/client/Client.js +12 -7
  19. package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.d.ts +16 -1
  20. package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.js +76 -10
  21. package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.d.ts +2 -0
  22. package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +28 -15
  23. package/dist/cjs/api/resources/inboxes/resources/metrics/client/Client.d.ts +2 -0
  24. package/dist/cjs/api/resources/inboxes/resources/metrics/client/Client.js +4 -3
  25. package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.d.ts +2 -0
  26. package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +12 -7
  27. package/dist/cjs/api/resources/metrics/client/Client.d.ts +2 -0
  28. package/dist/cjs/api/resources/metrics/client/Client.js +4 -3
  29. package/dist/cjs/api/resources/threads/client/Client.d.ts +2 -0
  30. package/dist/cjs/api/resources/threads/client/Client.js +12 -7
  31. package/dist/cjs/api/resources/webhooks/client/Client.d.ts +2 -0
  32. package/dist/cjs/api/resources/webhooks/client/Client.js +16 -9
  33. package/dist/cjs/core/auth/AuthProvider.d.ts +4 -0
  34. package/dist/cjs/core/auth/AuthProvider.js +2 -0
  35. package/dist/cjs/core/auth/AuthRequest.d.ts +9 -0
  36. package/dist/cjs/core/auth/AuthRequest.js +2 -0
  37. package/dist/cjs/core/auth/index.d.ts +2 -0
  38. package/dist/cjs/core/fetcher/Fetcher.d.ts +1 -1
  39. package/dist/cjs/core/fetcher/Fetcher.js +2 -2
  40. package/dist/cjs/core/fetcher/index.d.ts +5 -5
  41. package/dist/cjs/core/fetcher/index.js +5 -5
  42. package/dist/cjs/version.d.ts +1 -1
  43. package/dist/cjs/version.js +1 -1
  44. package/dist/esm/Client.d.mts +2 -0
  45. package/dist/esm/Client.mjs +2 -2
  46. package/dist/esm/api/resources/domains/client/Client.d.mts +2 -0
  47. package/dist/esm/api/resources/domains/client/Client.mjs +16 -9
  48. package/dist/esm/api/resources/drafts/client/Client.d.mts +2 -0
  49. package/dist/esm/api/resources/drafts/client/Client.mjs +8 -5
  50. package/dist/esm/api/resources/drafts/types/CreateDraftRequest.d.mts +1 -0
  51. package/dist/esm/api/resources/drafts/types/Draft.d.mts +2 -0
  52. package/dist/esm/api/resources/drafts/types/DraftItem.d.mts +2 -0
  53. package/dist/esm/api/resources/drafts/types/DraftSendAt.d.mts +7 -0
  54. package/dist/esm/api/resources/drafts/types/DraftSendAt.mjs +4 -0
  55. package/dist/esm/api/resources/drafts/types/DraftSendStatus.d.mts +12 -0
  56. package/dist/esm/api/resources/drafts/types/DraftSendStatus.mjs +8 -0
  57. package/dist/esm/api/resources/drafts/types/index.d.mts +2 -0
  58. package/dist/esm/api/resources/drafts/types/index.mjs +2 -0
  59. package/dist/esm/api/resources/inboxes/client/Client.d.mts +2 -0
  60. package/dist/esm/api/resources/inboxes/client/Client.mjs +12 -7
  61. package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.d.mts +16 -1
  62. package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.mjs +76 -10
  63. package/dist/esm/api/resources/inboxes/resources/messages/client/Client.d.mts +2 -0
  64. package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +28 -15
  65. package/dist/esm/api/resources/inboxes/resources/metrics/client/Client.d.mts +2 -0
  66. package/dist/esm/api/resources/inboxes/resources/metrics/client/Client.mjs +4 -3
  67. package/dist/esm/api/resources/inboxes/resources/threads/client/Client.d.mts +2 -0
  68. package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +12 -7
  69. package/dist/esm/api/resources/metrics/client/Client.d.mts +2 -0
  70. package/dist/esm/api/resources/metrics/client/Client.mjs +4 -3
  71. package/dist/esm/api/resources/threads/client/Client.d.mts +2 -0
  72. package/dist/esm/api/resources/threads/client/Client.mjs +12 -7
  73. package/dist/esm/api/resources/webhooks/client/Client.d.mts +2 -0
  74. package/dist/esm/api/resources/webhooks/client/Client.mjs +16 -9
  75. package/dist/esm/core/auth/AuthProvider.d.mts +4 -0
  76. package/dist/esm/core/auth/AuthProvider.mjs +1 -0
  77. package/dist/esm/core/auth/AuthRequest.d.mts +9 -0
  78. package/dist/esm/core/auth/AuthRequest.mjs +1 -0
  79. package/dist/esm/core/auth/index.d.mts +2 -0
  80. package/dist/esm/core/fetcher/Fetcher.d.mts +1 -1
  81. package/dist/esm/core/fetcher/Fetcher.mjs +2 -2
  82. package/dist/esm/core/fetcher/index.d.mts +5 -5
  83. package/dist/esm/core/fetcher/index.mjs +2 -2
  84. package/dist/esm/version.d.mts +1 -1
  85. package/dist/esm/version.mjs +1 -1
  86. package/package.json +1 -1
  87. package/reference.md +57 -0
package/README.md CHANGED
@@ -78,6 +78,18 @@ const response = await client.inboxes.create(..., {
78
78
  });
79
79
  ```
80
80
 
81
+ ### Additional Query String Parameters
82
+
83
+ If you would like to send additional query string parameters as part of the request, use the `queryParams` request option.
84
+
85
+ ```typescript
86
+ const response = await client.inboxes.create(..., {
87
+ queryParams: {
88
+ 'customQueryParamKey': 'custom query param value'
89
+ }
90
+ });
91
+ ```
92
+
81
93
  ### Retries
82
94
 
83
95
  The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
@@ -134,8 +146,7 @@ console.log(rawResponse.headers['X-My-Header']);
134
146
 
135
147
  ### Runtime Compatibility
136
148
 
137
- The SDK defaults to `node-fetch` but will use the global fetch client if present. The SDK works in the following
138
- runtimes:
149
+ The SDK works in the following runtimes:
139
150
 
140
151
  - Node.js 18+
141
152
  - Vercel
@@ -26,6 +26,8 @@ export declare namespace AgentMailClient {
26
26
  maxRetries?: number;
27
27
  /** A hook to abort the request. */
28
28
  abortSignal?: AbortSignal;
29
+ /** Additional query string parameters to include in the request. */
30
+ queryParams?: Record<string, unknown>;
29
31
  /** Additional headers to include in the request. */
30
32
  headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
31
33
  }
@@ -51,8 +51,8 @@ class AgentMailClient {
51
51
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
52
52
  "X-Fern-Language": "JavaScript",
53
53
  "X-Fern-SDK-Name": "agentmail",
54
- "X-Fern-SDK-Version": "0.0.49",
55
- "User-Agent": "agentmail/0.0.49",
54
+ "X-Fern-SDK-Version": "0.0.51",
55
+ "User-Agent": "agentmail/0.0.51",
56
56
  "X-Fern-Runtime": core.RUNTIME.type,
57
57
  "X-Fern-Runtime-Version": core.RUNTIME.version,
58
58
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -20,6 +20,8 @@ export declare namespace Domains {
20
20
  maxRetries?: number;
21
21
  /** A hook to abort the request. */
22
22
  abortSignal?: AbortSignal;
23
+ /** Additional query string parameters to include in the request. */
24
+ queryParams?: Record<string, unknown>;
23
25
  /** Additional headers to include in the request. */
24
26
  headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
25
27
  }
@@ -76,11 +76,12 @@ class Domains {
76
76
  if (pageToken != null) {
77
77
  _queryParams["page_token"] = pageToken;
78
78
  }
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);
79
80
  const _response = yield core.fetcher({
80
- url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production).http, "/v0/domains"),
81
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, "/v0/domains"),
81
82
  method: "GET",
82
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
83
- queryParameters: _queryParams,
83
+ headers: _headers,
84
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
84
85
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
85
86
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
86
87
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -127,10 +128,12 @@ class Domains {
127
128
  __get(domain, requestOptions) {
128
129
  return __awaiter(this, void 0, void 0, function* () {
129
130
  var _a, _b, _c;
131
+ 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);
130
132
  const _response = yield core.fetcher({
131
- url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production).http, `/v0/domains/${encodeURIComponent(domain)}`),
133
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/domains/${encodeURIComponent(domain)}`),
132
134
  method: "GET",
133
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
135
+ headers: _headers,
136
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
134
137
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
135
138
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
136
139
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -184,11 +187,13 @@ class Domains {
184
187
  __create(request, requestOptions) {
185
188
  return __awaiter(this, void 0, void 0, function* () {
186
189
  var _a, _b, _c;
190
+ 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);
187
191
  const _response = yield core.fetcher({
188
- url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production).http, "/v0/domains"),
192
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, "/v0/domains"),
189
193
  method: "POST",
190
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
194
+ headers: _headers,
191
195
  contentType: "application/json",
196
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
192
197
  requestType: "json",
193
198
  body: request,
194
199
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -242,10 +247,12 @@ class Domains {
242
247
  __delete(domain, requestOptions) {
243
248
  return __awaiter(this, void 0, void 0, function* () {
244
249
  var _a, _b, _c;
250
+ 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);
245
251
  const _response = yield core.fetcher({
246
- url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production).http, `/v0/domains/${encodeURIComponent(domain)}`),
252
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/domains/${encodeURIComponent(domain)}`),
247
253
  method: "DELETE",
248
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
254
+ headers: _headers,
255
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
249
256
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
250
257
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
251
258
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -20,6 +20,8 @@ export declare namespace Drafts {
20
20
  maxRetries?: number;
21
21
  /** A hook to abort the request. */
22
22
  abortSignal?: AbortSignal;
23
+ /** Additional query string parameters to include in the request. */
24
+ queryParams?: Record<string, unknown>;
23
25
  /** Additional headers to include in the request. */
24
26
  headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
25
27
  }
@@ -85,11 +85,12 @@ class Drafts {
85
85
  if (ascending != null) {
86
86
  _queryParams["ascending"] = ascending.toString();
87
87
  }
88
+ 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);
88
89
  const _response = yield core.fetcher({
89
- url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production).http, "/v0/drafts"),
90
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, "/v0/drafts"),
90
91
  method: "GET",
91
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
92
- queryParameters: _queryParams,
92
+ headers: _headers,
93
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
93
94
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
94
95
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
95
96
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -141,10 +142,12 @@ class Drafts {
141
142
  __get(draftId, requestOptions) {
142
143
  return __awaiter(this, void 0, void 0, function* () {
143
144
  var _a, _b, _c;
145
+ 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);
144
146
  const _response = yield core.fetcher({
145
- url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production).http, `/v0/drafts/${encodeURIComponent(draftId)}`),
147
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/drafts/${encodeURIComponent(draftId)}`),
146
148
  method: "GET",
147
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
149
+ headers: _headers,
150
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
148
151
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
149
152
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
150
153
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -11,4 +11,5 @@ export interface CreateDraftRequest {
11
11
  subject?: AgentMail.DraftSubject;
12
12
  text?: AgentMail.DraftText;
13
13
  html?: AgentMail.DraftHtml;
14
+ send_at?: AgentMail.DraftSendAt;
14
15
  }
@@ -20,6 +20,8 @@ export interface Draft {
20
20
  in_reply_to?: string;
21
21
  /** IDs of previous messages in thread. */
22
22
  references?: string[];
23
+ send_status?: AgentMail.DraftSendStatus;
24
+ send_at?: AgentMail.DraftSendAt;
23
25
  updated_at: AgentMail.DraftUpdatedAt;
24
26
  /** Time at which draft was created. */
25
27
  created_at: string;
@@ -13,5 +13,7 @@ export interface DraftItem {
13
13
  subject?: AgentMail.DraftSubject;
14
14
  preview?: AgentMail.DraftPreview;
15
15
  attachments?: AgentMail.DraftAttachments;
16
+ send_status?: AgentMail.DraftSendStatus;
17
+ send_at?: AgentMail.DraftSendAt;
16
18
  updated_at: AgentMail.DraftUpdatedAt;
17
19
  }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Time at which to schedule send draft.
6
+ */
7
+ export type DraftSendAt = string;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Schedule send status of draft.
6
+ */
7
+ export type DraftSendStatus = "scheduled" | "sending" | "failed";
8
+ export declare const DraftSendStatus: {
9
+ readonly Scheduled: "scheduled";
10
+ readonly Sending: "sending";
11
+ readonly Failed: "failed";
12
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DraftSendStatus = void 0;
7
+ exports.DraftSendStatus = {
8
+ Scheduled: "scheduled",
9
+ Sending: "sending",
10
+ Failed: "failed",
11
+ };
@@ -9,6 +9,8 @@ export * from "./DraftPreview.js";
9
9
  export * from "./DraftText.js";
10
10
  export * from "./DraftHtml.js";
11
11
  export * from "./DraftAttachments.js";
12
+ export * from "./DraftSendStatus.js";
13
+ export * from "./DraftSendAt.js";
12
14
  export * from "./DraftUpdatedAt.js";
13
15
  export * from "./DraftItem.js";
14
16
  export * from "./Draft.js";
@@ -25,6 +25,8 @@ __exportStar(require("./DraftPreview.js"), exports);
25
25
  __exportStar(require("./DraftText.js"), exports);
26
26
  __exportStar(require("./DraftHtml.js"), exports);
27
27
  __exportStar(require("./DraftAttachments.js"), exports);
28
+ __exportStar(require("./DraftSendStatus.js"), exports);
29
+ __exportStar(require("./DraftSendAt.js"), exports);
28
30
  __exportStar(require("./DraftUpdatedAt.js"), exports);
29
31
  __exportStar(require("./DraftItem.js"), exports);
30
32
  __exportStar(require("./Draft.js"), exports);
@@ -24,6 +24,8 @@ export declare namespace Inboxes {
24
24
  maxRetries?: number;
25
25
  /** A hook to abort the request. */
26
26
  abortSignal?: AbortSignal;
27
+ /** Additional query string parameters to include in the request. */
28
+ queryParams?: Record<string, unknown>;
27
29
  /** Additional headers to include in the request. */
28
30
  headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
29
31
  }
@@ -96,11 +96,12 @@ class Inboxes {
96
96
  if (pageToken != null) {
97
97
  _queryParams["page_token"] = pageToken;
98
98
  }
99
+ 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);
99
100
  const _response = yield core.fetcher({
100
- url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production).http, "/v0/inboxes"),
101
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, "/v0/inboxes"),
101
102
  method: "GET",
102
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
103
- queryParameters: _queryParams,
103
+ headers: _headers,
104
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
104
105
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
105
106
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
106
107
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -150,10 +151,12 @@ class Inboxes {
150
151
  __get(inboxId, requestOptions) {
151
152
  return __awaiter(this, void 0, void 0, function* () {
152
153
  var _a, _b, _c;
154
+ 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);
153
155
  const _response = yield core.fetcher({
154
- url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(inboxId)}`),
156
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(inboxId)}`),
155
157
  method: "GET",
156
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
158
+ headers: _headers,
159
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
157
160
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
158
161
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
159
162
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -210,11 +213,13 @@ class Inboxes {
210
213
  __create(request, requestOptions) {
211
214
  return __awaiter(this, void 0, void 0, function* () {
212
215
  var _a, _b, _c;
216
+ 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
217
  const _response = yield core.fetcher({
214
- url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production).http, "/v0/inboxes"),
218
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, "/v0/inboxes"),
215
219
  method: "POST",
216
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
220
+ headers: _headers,
217
221
  contentType: "application/json",
222
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
218
223
  requestType: "json",
219
224
  body: request,
220
225
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -20,6 +20,8 @@ export declare namespace Drafts {
20
20
  maxRetries?: number;
21
21
  /** A hook to abort the request. */
22
22
  abortSignal?: AbortSignal;
23
+ /** Additional query string parameters to include in the request. */
24
+ queryParams?: Record<string, unknown>;
23
25
  /** Additional headers to include in the request. */
24
26
  headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
25
27
  }
@@ -67,7 +69,8 @@ export declare class Drafts {
67
69
  * bcc: undefined,
68
70
  * subject: undefined,
69
71
  * text: undefined,
70
- * html: undefined
72
+ * html: undefined,
73
+ * send_at: undefined
71
74
  * })
72
75
  */
73
76
  create(inboxId: AgentMail.inboxes.InboxId, request: AgentMail.CreateDraftRequest, requestOptions?: Drafts.RequestOptions): core.HttpResponsePromise<AgentMail.Draft>;
@@ -90,5 +93,17 @@ export declare class Drafts {
90
93
  */
91
94
  send(inboxId: AgentMail.inboxes.InboxId, draftId: AgentMail.DraftId, request: AgentMail.UpdateMessageRequest, requestOptions?: Drafts.RequestOptions): core.HttpResponsePromise<AgentMail.SendMessageResponse>;
92
95
  private __send;
96
+ /**
97
+ * @param {AgentMail.inboxes.InboxId} inboxId
98
+ * @param {AgentMail.DraftId} draftId
99
+ * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
100
+ *
101
+ * @throws {@link AgentMail.NotFoundError}
102
+ *
103
+ * @example
104
+ * await client.inboxes.drafts.delete("inbox_id", "draft_id")
105
+ */
106
+ delete(inboxId: AgentMail.inboxes.InboxId, draftId: AgentMail.DraftId, requestOptions?: Drafts.RequestOptions): core.HttpResponsePromise<void>;
107
+ private __delete;
93
108
  protected _getAuthorizationHeader(): Promise<string>;
94
109
  }
@@ -86,11 +86,12 @@ class Drafts {
86
86
  if (ascending != null) {
87
87
  _queryParams["ascending"] = ascending.toString();
88
88
  }
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);
89
90
  const _response = yield core.fetcher({
90
- url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(inboxId)}/drafts`),
91
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(inboxId)}/drafts`),
91
92
  method: "GET",
92
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
93
- queryParameters: _queryParams,
93
+ headers: _headers,
94
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
94
95
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
95
96
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
96
97
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -143,10 +144,12 @@ class Drafts {
143
144
  __get(inboxId, draftId, requestOptions) {
144
145
  return __awaiter(this, void 0, void 0, function* () {
145
146
  var _a, _b, _c;
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);
146
148
  const _response = yield core.fetcher({
147
- url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(inboxId)}/drafts/${encodeURIComponent(draftId)}`),
149
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(inboxId)}/drafts/${encodeURIComponent(draftId)}`),
148
150
  method: "GET",
149
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
151
+ headers: _headers,
152
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
150
153
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
151
154
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
152
155
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -199,7 +202,8 @@ class Drafts {
199
202
  * bcc: undefined,
200
203
  * subject: undefined,
201
204
  * text: undefined,
202
- * html: undefined
205
+ * html: undefined,
206
+ * send_at: undefined
203
207
  * })
204
208
  */
205
209
  create(inboxId, request, requestOptions) {
@@ -208,11 +212,13 @@ class Drafts {
208
212
  __create(inboxId, request, requestOptions) {
209
213
  return __awaiter(this, void 0, void 0, function* () {
210
214
  var _a, _b, _c;
215
+ 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);
211
216
  const _response = yield core.fetcher({
212
- url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(inboxId)}/drafts`),
217
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(inboxId)}/drafts`),
213
218
  method: "POST",
214
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
219
+ headers: _headers,
215
220
  contentType: "application/json",
221
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
216
222
  requestType: "json",
217
223
  body: request,
218
224
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -273,11 +279,13 @@ class Drafts {
273
279
  __send(inboxId, draftId, request, requestOptions) {
274
280
  return __awaiter(this, void 0, void 0, function* () {
275
281
  var _a, _b, _c;
282
+ 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);
276
283
  const _response = yield core.fetcher({
277
- url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(inboxId)}/drafts/${encodeURIComponent(draftId)}/send`),
284
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(inboxId)}/drafts/${encodeURIComponent(draftId)}/send`),
278
285
  method: "POST",
279
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
286
+ headers: _headers,
280
287
  contentType: "application/json",
288
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
281
289
  requestType: "json",
282
290
  body: request,
283
291
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -320,6 +328,64 @@ class Drafts {
320
328
  }
321
329
  });
322
330
  }
331
+ /**
332
+ * @param {AgentMail.inboxes.InboxId} inboxId
333
+ * @param {AgentMail.DraftId} draftId
334
+ * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
335
+ *
336
+ * @throws {@link AgentMail.NotFoundError}
337
+ *
338
+ * @example
339
+ * await client.inboxes.drafts.delete("inbox_id", "draft_id")
340
+ */
341
+ delete(inboxId, draftId, requestOptions) {
342
+ return core.HttpResponsePromise.fromPromise(this.__delete(inboxId, draftId, requestOptions));
343
+ }
344
+ __delete(inboxId, draftId, requestOptions) {
345
+ return __awaiter(this, void 0, void 0, function* () {
346
+ var _a, _b, _c;
347
+ 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);
348
+ const _response = yield core.fetcher({
349
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(inboxId)}/drafts/${encodeURIComponent(draftId)}`),
350
+ method: "DELETE",
351
+ headers: _headers,
352
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
353
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
354
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
355
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
356
+ });
357
+ if (_response.ok) {
358
+ return { data: undefined, rawResponse: _response.rawResponse };
359
+ }
360
+ if (_response.error.reason === "status-code") {
361
+ switch (_response.error.statusCode) {
362
+ case 404:
363
+ throw new AgentMail.NotFoundError(_response.error.body, _response.rawResponse);
364
+ default:
365
+ throw new errors.AgentMailError({
366
+ statusCode: _response.error.statusCode,
367
+ body: _response.error.body,
368
+ rawResponse: _response.rawResponse,
369
+ });
370
+ }
371
+ }
372
+ switch (_response.error.reason) {
373
+ case "non-json":
374
+ throw new errors.AgentMailError({
375
+ statusCode: _response.error.statusCode,
376
+ body: _response.error.rawBody,
377
+ rawResponse: _response.rawResponse,
378
+ });
379
+ case "timeout":
380
+ throw new errors.AgentMailTimeoutError("Timeout exceeded when calling DELETE /v0/inboxes/{inbox_id}/drafts/{draft_id}.");
381
+ case "unknown":
382
+ throw new errors.AgentMailError({
383
+ message: _response.error.errorMessage,
384
+ rawResponse: _response.rawResponse,
385
+ });
386
+ }
387
+ });
388
+ }
323
389
  _getAuthorizationHeader() {
324
390
  return __awaiter(this, void 0, void 0, function* () {
325
391
  var _a;
@@ -20,6 +20,8 @@ export declare namespace Messages {
20
20
  maxRetries?: number;
21
21
  /** A hook to abort the request. */
22
22
  abortSignal?: AbortSignal;
23
+ /** Additional query string parameters to include in the request. */
24
+ queryParams?: Record<string, unknown>;
23
25
  /** Additional headers to include in the request. */
24
26
  headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
25
27
  }