@zyphr-dev/node-sdk 0.1.56 → 0.1.57

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 (45) hide show
  1. package/dist/index.cjs +1877 -315
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +4 -6
  4. package/dist/index.d.ts +4 -6
  5. package/dist/index.js +1877 -315
  6. package/dist/index.js.map +1 -1
  7. package/package.json +1 -1
  8. package/src/clientAuth.ts +15 -4
  9. package/src/src/apis/AuthApplicationApi.ts +32 -4
  10. package/src/src/apis/AuthEmailOTPApi.ts +72 -9
  11. package/src/src/apis/AuthEmailTemplatesApi.ts +160 -20
  12. package/src/src/apis/AuthEmailVerificationApi.ts +48 -6
  13. package/src/src/apis/AuthLoginApi.ts +16 -2
  14. package/src/src/apis/AuthMFAApi.ts +112 -14
  15. package/src/src/apis/AuthMagicLinksApi.ts +32 -4
  16. package/src/src/apis/AuthOAuthApi.ts +88 -11
  17. package/src/src/apis/AuthOrganizationsApi.ts +176 -22
  18. package/src/src/apis/AuthPasswordResetApi.ts +48 -6
  19. package/src/src/apis/AuthPhoneApi.ts +72 -9
  20. package/src/src/apis/AuthRegistrationApi.ts +40 -5
  21. package/src/src/apis/AuthSessionsApi.ts +56 -7
  22. package/src/src/apis/AuthUserDirectoryApi.ts +144 -18
  23. package/src/src/apis/AuthUserProfileApi.ts +32 -4
  24. package/src/src/apis/AuthWebAuthnApi.ts +96 -12
  25. package/src/src/apis/DevicesApi.ts +52 -10
  26. package/src/src/apis/DomainsApi.ts +56 -7
  27. package/src/src/apis/EmailsApi.ts +48 -6
  28. package/src/src/apis/ExecutionsApi.ts +24 -3
  29. package/src/src/apis/InboundEmailApi.ts +24 -3
  30. package/src/src/apis/InboxApi.ts +88 -11
  31. package/src/src/apis/PushApi.ts +72 -9
  32. package/src/src/apis/SMSApi.ts +80 -10
  33. package/src/src/apis/SlackApi.ts +24 -3
  34. package/src/src/apis/SubscribersApi.ts +160 -20
  35. package/src/src/apis/TemplatesApi.ts +48 -6
  36. package/src/src/apis/TopicsApi.ts +72 -9
  37. package/src/src/apis/UtilityApi.ts +16 -2
  38. package/src/src/apis/WaaSApplicationsApi.ts +48 -6
  39. package/src/src/apis/WaaSDeliveriesApi.ts +32 -4
  40. package/src/src/apis/WaaSEndpointsApi.ts +72 -9
  41. package/src/src/apis/WaaSEventTypesApi.ts +48 -6
  42. package/src/src/apis/WaaSEventsApi.ts +16 -2
  43. package/src/src/apis/WaaSPortalApi.ts +8 -1
  44. package/src/src/apis/WebhooksApi.ts +176 -22
  45. package/src/src/apis/WorkflowsApi.ts +96 -12
@@ -153,7 +153,7 @@ export interface DevicesApiInterface {
153
153
  listDevices(userId?: string, platform?: ListDevicesPlatformEnum, limit?: number, offset?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeviceListResponse>;
154
154
 
155
155
  /**
156
- * Register a device for push notifications. If the token already exists, updates it.
156
+ * Register a device for push notifications. Registration is an upsert keyed on (project, token), so calling it on every app launch is safe and idempotent. Re-registering an existing token under a different `user_id` **reassigns** the device to that user — the previous association does not persist, so a push addressed to the old user will not reach this device. `user_id` is an opaque string you choose. It is stored verbatim with no foreign key, and `POST /v1/push` matches on exactly that value. No Subscriber record is created for you. Requires a secret API key, so call it from your backend and derive `user_id` from the authenticated session rather than the request body.
157
157
  * @summary Register a device
158
158
  * @param {RegisterDeviceRequest} registerDeviceRequest
159
159
  * @param {*} [options] Override http request option.
@@ -163,7 +163,7 @@ export interface DevicesApiInterface {
163
163
  registerDeviceRaw(requestParameters: DevicesApiRegisterDeviceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DeviceResponse>>;
164
164
 
165
165
  /**
166
- * Register a device for push notifications. If the token already exists, updates it.
166
+ * Register a device for push notifications. Registration is an upsert keyed on (project, token), so calling it on every app launch is safe and idempotent. Re-registering an existing token under a different `user_id` **reassigns** the device to that user — the previous association does not persist, so a push addressed to the old user will not reach this device. `user_id` is an opaque string you choose. It is stored verbatim with no foreign key, and `POST /v1/push` matches on exactly that value. No Subscriber record is created for you. Requires a secret API key, so call it from your backend and derive `user_id` from the authenticated session rather than the request body.
167
167
  * Register a device
168
168
  */
169
169
  registerDevice(registerDeviceRequest: RegisterDeviceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeviceResponse>;
@@ -192,7 +192,14 @@ export class DevicesApi extends runtime.BaseAPI implements DevicesApiInterface {
192
192
  const headerParameters: runtime.HTTPHeaders = {};
193
193
 
194
194
  if (this.configuration && this.configuration.apiKey) {
195
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
195
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
196
+ {
197
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
198
+
199
+ if (apiKeyValue) {
200
+ headerParameters["X-API-Key"] = apiKeyValue;
201
+ }
202
+ }
196
203
  }
197
204
 
198
205
  const response = await this.request({
@@ -231,7 +238,14 @@ export class DevicesApi extends runtime.BaseAPI implements DevicesApiInterface {
231
238
  const headerParameters: runtime.HTTPHeaders = {};
232
239
 
233
240
  if (this.configuration && this.configuration.apiKey) {
234
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
241
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
242
+ {
243
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
244
+
245
+ if (apiKeyValue) {
246
+ headerParameters["X-API-Key"] = apiKeyValue;
247
+ }
248
+ }
235
249
  }
236
250
 
237
251
  const response = await this.request({
@@ -270,7 +284,14 @@ export class DevicesApi extends runtime.BaseAPI implements DevicesApiInterface {
270
284
  const headerParameters: runtime.HTTPHeaders = {};
271
285
 
272
286
  if (this.configuration && this.configuration.apiKey) {
273
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
287
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
288
+ {
289
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
290
+
291
+ if (apiKeyValue) {
292
+ headerParameters["X-API-Key"] = apiKeyValue;
293
+ }
294
+ }
274
295
  }
275
296
 
276
297
  const response = await this.request({
@@ -302,7 +323,14 @@ export class DevicesApi extends runtime.BaseAPI implements DevicesApiInterface {
302
323
  const headerParameters: runtime.HTTPHeaders = {};
303
324
 
304
325
  if (this.configuration && this.configuration.apiKey) {
305
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
326
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
327
+ {
328
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
329
+
330
+ if (apiKeyValue) {
331
+ headerParameters["X-API-Key"] = apiKeyValue;
332
+ }
333
+ }
306
334
  }
307
335
 
308
336
  const response = await this.request({
@@ -350,7 +378,14 @@ export class DevicesApi extends runtime.BaseAPI implements DevicesApiInterface {
350
378
  const headerParameters: runtime.HTTPHeaders = {};
351
379
 
352
380
  if (this.configuration && this.configuration.apiKey) {
353
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
381
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
382
+ {
383
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
384
+
385
+ if (apiKeyValue) {
386
+ headerParameters["X-API-Key"] = apiKeyValue;
387
+ }
388
+ }
354
389
  }
355
390
 
356
391
  const response = await this.request({
@@ -373,7 +408,7 @@ export class DevicesApi extends runtime.BaseAPI implements DevicesApiInterface {
373
408
  }
374
409
 
375
410
  /**
376
- * Register a device for push notifications. If the token already exists, updates it.
411
+ * Register a device for push notifications. Registration is an upsert keyed on (project, token), so calling it on every app launch is safe and idempotent. Re-registering an existing token under a different `user_id` **reassigns** the device to that user — the previous association does not persist, so a push addressed to the old user will not reach this device. `user_id` is an opaque string you choose. It is stored verbatim with no foreign key, and `POST /v1/push` matches on exactly that value. No Subscriber record is created for you. Requires a secret API key, so call it from your backend and derive `user_id` from the authenticated session rather than the request body.
377
412
  * Register a device
378
413
  */
379
414
  async registerDeviceRaw(requestParameters: DevicesApiRegisterDeviceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DeviceResponse>> {
@@ -391,7 +426,14 @@ export class DevicesApi extends runtime.BaseAPI implements DevicesApiInterface {
391
426
  headerParameters['Content-Type'] = 'application/json';
392
427
 
393
428
  if (this.configuration && this.configuration.apiKey) {
394
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
429
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
430
+ {
431
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
432
+
433
+ if (apiKeyValue) {
434
+ headerParameters["X-API-Key"] = apiKeyValue;
435
+ }
436
+ }
395
437
  }
396
438
 
397
439
  const response = await this.request({
@@ -406,7 +448,7 @@ export class DevicesApi extends runtime.BaseAPI implements DevicesApiInterface {
406
448
  }
407
449
 
408
450
  /**
409
- * Register a device for push notifications. If the token already exists, updates it.
451
+ * Register a device for push notifications. Registration is an upsert keyed on (project, token), so calling it on every app launch is safe and idempotent. Re-registering an existing token under a different `user_id` **reassigns** the device to that user — the previous association does not persist, so a push addressed to the old user will not reach this device. `user_id` is an opaque string you choose. It is stored verbatim with no foreign key, and `POST /v1/push` matches on exactly that value. No Subscriber record is created for you. Requires a secret API key, so call it from your backend and derive `user_id` from the authenticated session rather than the request body.
410
452
  * Register a device
411
453
  */
412
454
  async registerDevice(registerDeviceRequest: RegisterDeviceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeviceResponse> {
@@ -216,7 +216,14 @@ export class DomainsApi extends runtime.BaseAPI implements DomainsApiInterface {
216
216
  headerParameters['Content-Type'] = 'application/json';
217
217
 
218
218
  if (this.configuration && this.configuration.apiKey) {
219
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
219
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
220
+ {
221
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
222
+
223
+ if (apiKeyValue) {
224
+ headerParameters["X-API-Key"] = apiKeyValue;
225
+ }
226
+ }
220
227
  }
221
228
 
222
229
  const response = await this.request({
@@ -256,7 +263,14 @@ export class DomainsApi extends runtime.BaseAPI implements DomainsApiInterface {
256
263
  const headerParameters: runtime.HTTPHeaders = {};
257
264
 
258
265
  if (this.configuration && this.configuration.apiKey) {
259
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
266
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
267
+ {
268
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
269
+
270
+ if (apiKeyValue) {
271
+ headerParameters["X-API-Key"] = apiKeyValue;
272
+ }
273
+ }
260
274
  }
261
275
 
262
276
  const response = await this.request({
@@ -295,7 +309,14 @@ export class DomainsApi extends runtime.BaseAPI implements DomainsApiInterface {
295
309
  const headerParameters: runtime.HTTPHeaders = {};
296
310
 
297
311
  if (this.configuration && this.configuration.apiKey) {
298
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
312
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
313
+ {
314
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
315
+
316
+ if (apiKeyValue) {
317
+ headerParameters["X-API-Key"] = apiKeyValue;
318
+ }
319
+ }
299
320
  }
300
321
 
301
322
  const response = await this.request({
@@ -334,7 +355,14 @@ export class DomainsApi extends runtime.BaseAPI implements DomainsApiInterface {
334
355
  const headerParameters: runtime.HTTPHeaders = {};
335
356
 
336
357
  if (this.configuration && this.configuration.apiKey) {
337
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
358
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
359
+ {
360
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
361
+
362
+ if (apiKeyValue) {
363
+ headerParameters["X-API-Key"] = apiKeyValue;
364
+ }
365
+ }
338
366
  }
339
367
 
340
368
  const response = await this.request({
@@ -366,7 +394,14 @@ export class DomainsApi extends runtime.BaseAPI implements DomainsApiInterface {
366
394
  const headerParameters: runtime.HTTPHeaders = {};
367
395
 
368
396
  if (this.configuration && this.configuration.apiKey) {
369
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
397
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
398
+ {
399
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
400
+
401
+ if (apiKeyValue) {
402
+ headerParameters["X-API-Key"] = apiKeyValue;
403
+ }
404
+ }
370
405
  }
371
406
 
372
407
  const response = await this.request({
@@ -414,7 +449,14 @@ export class DomainsApi extends runtime.BaseAPI implements DomainsApiInterface {
414
449
  headerParameters['Content-Type'] = 'application/json';
415
450
 
416
451
  if (this.configuration && this.configuration.apiKey) {
417
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
452
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
453
+ {
454
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
455
+
456
+ if (apiKeyValue) {
457
+ headerParameters["X-API-Key"] = apiKeyValue;
458
+ }
459
+ }
418
460
  }
419
461
 
420
462
  const response = await this.request({
@@ -454,7 +496,14 @@ export class DomainsApi extends runtime.BaseAPI implements DomainsApiInterface {
454
496
  const headerParameters: runtime.HTTPHeaders = {};
455
497
 
456
498
  if (this.configuration && this.configuration.apiKey) {
457
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
499
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
500
+ {
501
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
502
+
503
+ if (apiKeyValue) {
504
+ headerParameters["X-API-Key"] = apiKeyValue;
505
+ }
506
+ }
458
507
  }
459
508
 
460
509
  const response = await this.request({
@@ -206,7 +206,14 @@ export class EmailsApi extends runtime.BaseAPI implements EmailsApiInterface {
206
206
  const headerParameters: runtime.HTTPHeaders = {};
207
207
 
208
208
  if (this.configuration && this.configuration.apiKey) {
209
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
209
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
210
+ {
211
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
212
+
213
+ if (apiKeyValue) {
214
+ headerParameters["X-API-Key"] = apiKeyValue;
215
+ }
216
+ }
210
217
  }
211
218
 
212
219
  const response = await this.request({
@@ -245,7 +252,14 @@ export class EmailsApi extends runtime.BaseAPI implements EmailsApiInterface {
245
252
  const headerParameters: runtime.HTTPHeaders = {};
246
253
 
247
254
  if (this.configuration && this.configuration.apiKey) {
248
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
255
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
256
+ {
257
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
258
+
259
+ if (apiKeyValue) {
260
+ headerParameters["X-API-Key"] = apiKeyValue;
261
+ }
262
+ }
249
263
  }
250
264
 
251
265
  const response = await this.request({
@@ -284,7 +298,14 @@ export class EmailsApi extends runtime.BaseAPI implements EmailsApiInterface {
284
298
  const headerParameters: runtime.HTTPHeaders = {};
285
299
 
286
300
  if (this.configuration && this.configuration.apiKey) {
287
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
301
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
302
+ {
303
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
304
+
305
+ if (apiKeyValue) {
306
+ headerParameters["X-API-Key"] = apiKeyValue;
307
+ }
308
+ }
288
309
  }
289
310
 
290
311
  const response = await this.request({
@@ -332,7 +353,14 @@ export class EmailsApi extends runtime.BaseAPI implements EmailsApiInterface {
332
353
  const headerParameters: runtime.HTTPHeaders = {};
333
354
 
334
355
  if (this.configuration && this.configuration.apiKey) {
335
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
356
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
357
+ {
358
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
359
+
360
+ if (apiKeyValue) {
361
+ headerParameters["X-API-Key"] = apiKeyValue;
362
+ }
363
+ }
336
364
  }
337
365
 
338
366
  const response = await this.request({
@@ -373,7 +401,14 @@ export class EmailsApi extends runtime.BaseAPI implements EmailsApiInterface {
373
401
  headerParameters['Content-Type'] = 'application/json';
374
402
 
375
403
  if (this.configuration && this.configuration.apiKey) {
376
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
404
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
405
+ {
406
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
407
+
408
+ if (apiKeyValue) {
409
+ headerParameters["X-API-Key"] = apiKeyValue;
410
+ }
411
+ }
377
412
  }
378
413
 
379
414
  const response = await this.request({
@@ -415,7 +450,14 @@ export class EmailsApi extends runtime.BaseAPI implements EmailsApiInterface {
415
450
  headerParameters['Content-Type'] = 'application/json';
416
451
 
417
452
  if (this.configuration && this.configuration.apiKey) {
418
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
453
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
454
+ {
455
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
456
+
457
+ if (apiKeyValue) {
458
+ headerParameters["X-API-Key"] = apiKeyValue;
459
+ }
460
+ }
419
461
  }
420
462
 
421
463
  const response = await this.request({
@@ -122,7 +122,14 @@ export class ExecutionsApi extends runtime.BaseAPI implements ExecutionsApiInter
122
122
  const headerParameters: runtime.HTTPHeaders = {};
123
123
 
124
124
  if (this.configuration && this.configuration.apiKey) {
125
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
125
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
126
+ {
127
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
128
+
129
+ if (apiKeyValue) {
130
+ headerParameters["X-API-Key"] = apiKeyValue;
131
+ }
132
+ }
126
133
  }
127
134
 
128
135
  const response = await this.request({
@@ -161,7 +168,14 @@ export class ExecutionsApi extends runtime.BaseAPI implements ExecutionsApiInter
161
168
  const headerParameters: runtime.HTTPHeaders = {};
162
169
 
163
170
  if (this.configuration && this.configuration.apiKey) {
164
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
171
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
172
+ {
173
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
174
+
175
+ if (apiKeyValue) {
176
+ headerParameters["X-API-Key"] = apiKeyValue;
177
+ }
178
+ }
165
179
  }
166
180
 
167
181
  const response = await this.request({
@@ -200,7 +214,14 @@ export class ExecutionsApi extends runtime.BaseAPI implements ExecutionsApiInter
200
214
  const headerParameters: runtime.HTTPHeaders = {};
201
215
 
202
216
  if (this.configuration && this.configuration.apiKey) {
203
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
217
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
218
+ {
219
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
220
+
221
+ if (apiKeyValue) {
222
+ headerParameters["X-API-Key"] = apiKeyValue;
223
+ }
224
+ }
204
225
  }
205
226
 
206
227
  const response = await this.request({
@@ -136,7 +136,14 @@ export class InboundEmailApi extends runtime.BaseAPI implements InboundEmailApiI
136
136
  const headerParameters: runtime.HTTPHeaders = {};
137
137
 
138
138
  if (this.configuration && this.configuration.apiKey) {
139
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
139
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
140
+ {
141
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
142
+
143
+ if (apiKeyValue) {
144
+ headerParameters["X-API-Key"] = apiKeyValue;
145
+ }
146
+ }
140
147
  }
141
148
 
142
149
  const response = await this.request({
@@ -175,7 +182,14 @@ export class InboundEmailApi extends runtime.BaseAPI implements InboundEmailApiI
175
182
  const headerParameters: runtime.HTTPHeaders = {};
176
183
 
177
184
  if (this.configuration && this.configuration.apiKey) {
178
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
185
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
186
+ {
187
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
188
+
189
+ if (apiKeyValue) {
190
+ headerParameters["X-API-Key"] = apiKeyValue;
191
+ }
192
+ }
179
193
  }
180
194
 
181
195
  const response = await this.request({
@@ -227,7 +241,14 @@ export class InboundEmailApi extends runtime.BaseAPI implements InboundEmailApiI
227
241
  const headerParameters: runtime.HTTPHeaders = {};
228
242
 
229
243
  if (this.configuration && this.configuration.apiKey) {
230
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
244
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
245
+ {
246
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
247
+
248
+ if (apiKeyValue) {
249
+ headerParameters["X-API-Key"] = apiKeyValue;
250
+ }
251
+ }
231
252
  }
232
253
 
233
254
  const response = await this.request({
@@ -547,7 +547,14 @@ export class InboxApi extends runtime.BaseAPI implements InboxApiInterface {
547
547
  headerParameters['Content-Type'] = 'application/json';
548
548
 
549
549
  if (this.configuration && this.configuration.apiKey) {
550
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
550
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
551
+ {
552
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
553
+
554
+ if (apiKeyValue) {
555
+ headerParameters["X-API-Key"] = apiKeyValue;
556
+ }
557
+ }
551
558
  }
552
559
 
553
560
  const response = await this.request({
@@ -636,7 +643,14 @@ export class InboxApi extends runtime.BaseAPI implements InboxApiInterface {
636
643
  const headerParameters: runtime.HTTPHeaders = {};
637
644
 
638
645
  if (this.configuration && this.configuration.apiKey) {
639
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
646
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
647
+ {
648
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
649
+
650
+ if (apiKeyValue) {
651
+ headerParameters["X-API-Key"] = apiKeyValue;
652
+ }
653
+ }
640
654
  }
641
655
 
642
656
  const response = await this.request({
@@ -716,7 +730,14 @@ export class InboxApi extends runtime.BaseAPI implements InboxApiInterface {
716
730
  headerParameters['Content-Type'] = 'application/json';
717
731
 
718
732
  if (this.configuration && this.configuration.apiKey) {
719
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
733
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
734
+ {
735
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
736
+
737
+ if (apiKeyValue) {
738
+ headerParameters["X-API-Key"] = apiKeyValue;
739
+ }
740
+ }
720
741
  }
721
742
 
722
743
  const response = await this.request({
@@ -764,7 +785,14 @@ export class InboxApi extends runtime.BaseAPI implements InboxApiInterface {
764
785
  const headerParameters: runtime.HTTPHeaders = {};
765
786
 
766
787
  if (this.configuration && this.configuration.apiKey) {
767
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
788
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
789
+ {
790
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
791
+
792
+ if (apiKeyValue) {
793
+ headerParameters["X-API-Key"] = apiKeyValue;
794
+ }
795
+ }
768
796
  }
769
797
 
770
798
  const response = await this.request({
@@ -919,7 +947,14 @@ export class InboxApi extends runtime.BaseAPI implements InboxApiInterface {
919
947
  const headerParameters: runtime.HTTPHeaders = {};
920
948
 
921
949
  if (this.configuration && this.configuration.apiKey) {
922
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
950
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
951
+ {
952
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
953
+
954
+ if (apiKeyValue) {
955
+ headerParameters["X-API-Key"] = apiKeyValue;
956
+ }
957
+ }
923
958
  }
924
959
 
925
960
  const response = await this.request({
@@ -975,7 +1010,14 @@ export class InboxApi extends runtime.BaseAPI implements InboxApiInterface {
975
1010
  const headerParameters: runtime.HTTPHeaders = {};
976
1011
 
977
1012
  if (this.configuration && this.configuration.apiKey) {
978
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1013
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
1014
+ {
1015
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1016
+
1017
+ if (apiKeyValue) {
1018
+ headerParameters["X-API-Key"] = apiKeyValue;
1019
+ }
1020
+ }
979
1021
  }
980
1022
 
981
1023
  const response = await this.request({
@@ -1039,7 +1081,14 @@ export class InboxApi extends runtime.BaseAPI implements InboxApiInterface {
1039
1081
  const headerParameters: runtime.HTTPHeaders = {};
1040
1082
 
1041
1083
  if (this.configuration && this.configuration.apiKey) {
1042
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1084
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
1085
+ {
1086
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1087
+
1088
+ if (apiKeyValue) {
1089
+ headerParameters["X-API-Key"] = apiKeyValue;
1090
+ }
1091
+ }
1043
1092
  }
1044
1093
 
1045
1094
  const response = await this.request({
@@ -1136,7 +1185,14 @@ export class InboxApi extends runtime.BaseAPI implements InboxApiInterface {
1136
1185
  headerParameters['Content-Type'] = 'application/json';
1137
1186
 
1138
1187
  if (this.configuration && this.configuration.apiKey) {
1139
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1188
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
1189
+ {
1190
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1191
+
1192
+ if (apiKeyValue) {
1193
+ headerParameters["X-API-Key"] = apiKeyValue;
1194
+ }
1195
+ }
1140
1196
  }
1141
1197
 
1142
1198
  const response = await this.request({
@@ -1215,7 +1271,14 @@ export class InboxApi extends runtime.BaseAPI implements InboxApiInterface {
1215
1271
  headerParameters['Content-Type'] = 'application/json';
1216
1272
 
1217
1273
  if (this.configuration && this.configuration.apiKey) {
1218
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1274
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
1275
+ {
1276
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1277
+
1278
+ if (apiKeyValue) {
1279
+ headerParameters["X-API-Key"] = apiKeyValue;
1280
+ }
1281
+ }
1219
1282
  }
1220
1283
 
1221
1284
  const response = await this.request({
@@ -1298,7 +1361,14 @@ export class InboxApi extends runtime.BaseAPI implements InboxApiInterface {
1298
1361
  headerParameters['Content-Type'] = 'application/json';
1299
1362
 
1300
1363
  if (this.configuration && this.configuration.apiKey) {
1301
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1364
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
1365
+ {
1366
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1367
+
1368
+ if (apiKeyValue) {
1369
+ headerParameters["X-API-Key"] = apiKeyValue;
1370
+ }
1371
+ }
1302
1372
  }
1303
1373
 
1304
1374
  const response = await this.request({
@@ -1340,7 +1410,14 @@ export class InboxApi extends runtime.BaseAPI implements InboxApiInterface {
1340
1410
  headerParameters['Content-Type'] = 'application/json';
1341
1411
 
1342
1412
  if (this.configuration && this.configuration.apiKey) {
1343
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1413
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
1414
+ {
1415
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1416
+
1417
+ if (apiKeyValue) {
1418
+ headerParameters["X-API-Key"] = apiKeyValue;
1419
+ }
1420
+ }
1344
1421
  }
1345
1422
 
1346
1423
  const response = await this.request({