@zyphr-dev/node-sdk 0.1.55 → 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 (46) hide show
  1. package/dist/index.cjs +1883 -319
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +31 -10
  4. package/dist/index.d.ts +31 -10
  5. package/dist/index.js +1883 -319
  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 +52 -10
  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
  46. package/src/src/models/InviteEndUser200ResponseData.ts +25 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyphr-dev/node-sdk",
3
- "version": "0.1.55",
3
+ "version": "0.1.57",
4
4
  "description": "Official Zyphr SDK for Node.js, React, and React Native",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
package/src/clientAuth.ts CHANGED
@@ -49,7 +49,6 @@ import {
49
49
  AuthSessionsApi,
50
50
  AuthUserProfileApi,
51
51
  AuthWebAuthnApi,
52
- DevicesApi,
53
52
  UtilityApi,
54
53
  } from './src/apis/index.js';
55
54
  import { parseErrorResponse } from './errors.js';
@@ -136,8 +135,21 @@ export class ZyphrClient {
136
135
  readonly webauthn: AuthWebAuthnApi;
137
136
  };
138
137
 
139
- /** Device registration for push (takes an OS-acquired token). */
140
- readonly devices: DevicesApi;
138
+ // NOTE: `devices` is deliberately NOT exposed here (sc-8045).
139
+ //
140
+ // The device API authenticates with the account-scoped secret key
141
+ // (`X-API-Key`), which must never ship inside a client bundle. ZyphrClient
142
+ // only ever resolves the publishable `X-Application-Key`, so every call
143
+ // sent an empty `X-API-Key` header and could only ever 401.
144
+ //
145
+ // Register devices from your own backend with the server-side `Zyphr`
146
+ // client instead:
147
+ //
148
+ // const zyphr = new Zyphr({ apiKey: process.env.ZYPHR_API_KEY });
149
+ // await zyphr.devices.registerDevice({ userId, platform, token });
150
+ //
151
+ // Derive `userId` from your authenticated session server-side — never from
152
+ // client-supplied input.
141
153
 
142
154
  /**
143
155
  * Utility endpoints that are publishable-key-safe: the application's password
@@ -203,7 +215,6 @@ export class ZyphrClient {
203
215
  profile: new AuthUserProfileApi(config),
204
216
  webauthn: new AuthWebAuthnApi(config),
205
217
  };
206
- this.devices = new DevicesApi(config);
207
218
  this.utility = new UtilityApi(config);
208
219
  }
209
220
 
@@ -150,11 +150,25 @@ export class AuthApplicationApi extends runtime.BaseAPI implements AuthApplicati
150
150
  const headerParameters: runtime.HTTPHeaders = {};
151
151
 
152
152
  if (this.configuration && this.configuration.apiKey) {
153
- headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
153
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
154
+ {
155
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
156
+
157
+ if (apiKeyValue) {
158
+ headerParameters["X-Application-Secret"] = apiKeyValue;
159
+ }
160
+ }
154
161
  }
155
162
 
156
163
  if (this.configuration && this.configuration.apiKey) {
157
- headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
164
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
165
+ {
166
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
167
+
168
+ if (apiKeyValue) {
169
+ headerParameters["X-Application-Key"] = apiKeyValue;
170
+ }
171
+ }
158
172
  }
159
173
 
160
174
  const response = await this.request({
@@ -195,11 +209,25 @@ export class AuthApplicationApi extends runtime.BaseAPI implements AuthApplicati
195
209
  headerParameters['Content-Type'] = 'application/json';
196
210
 
197
211
  if (this.configuration && this.configuration.apiKey) {
198
- headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
212
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
213
+ {
214
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
215
+
216
+ if (apiKeyValue) {
217
+ headerParameters["X-Application-Secret"] = apiKeyValue;
218
+ }
219
+ }
199
220
  }
200
221
 
201
222
  if (this.configuration && this.configuration.apiKey) {
202
- headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
223
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
224
+ {
225
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
226
+
227
+ if (apiKeyValue) {
228
+ headerParameters["X-Application-Key"] = apiKeyValue;
229
+ }
230
+ }
203
231
  }
204
232
 
205
233
  const response = await this.request({
@@ -162,7 +162,14 @@ export class AuthEmailOTPApi extends runtime.BaseAPI implements AuthEmailOTPApiI
162
162
  const headerParameters: runtime.HTTPHeaders = {};
163
163
 
164
164
  if (this.configuration && this.configuration.apiKey) {
165
- headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
165
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
166
+ {
167
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
168
+
169
+ if (apiKeyValue) {
170
+ headerParameters["X-Application-Key"] = apiKeyValue;
171
+ }
172
+ }
166
173
  }
167
174
 
168
175
  const response = await this.request({
@@ -203,11 +210,25 @@ export class AuthEmailOTPApi extends runtime.BaseAPI implements AuthEmailOTPApiI
203
210
  headerParameters['Content-Type'] = 'application/json';
204
211
 
205
212
  if (this.configuration && this.configuration.apiKey) {
206
- headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
213
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
214
+ {
215
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
216
+
217
+ if (apiKeyValue) {
218
+ headerParameters["X-Application-Secret"] = apiKeyValue;
219
+ }
220
+ }
207
221
  }
208
222
 
209
223
  if (this.configuration && this.configuration.apiKey) {
210
- headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
224
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
225
+ {
226
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
227
+
228
+ if (apiKeyValue) {
229
+ headerParameters["X-Application-Key"] = apiKeyValue;
230
+ }
231
+ }
211
232
  }
212
233
 
213
234
  const response = await this.request({
@@ -249,11 +270,25 @@ export class AuthEmailOTPApi extends runtime.BaseAPI implements AuthEmailOTPApiI
249
270
  headerParameters['Content-Type'] = 'application/json';
250
271
 
251
272
  if (this.configuration && this.configuration.apiKey) {
252
- headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
273
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
274
+ {
275
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
276
+
277
+ if (apiKeyValue) {
278
+ headerParameters["X-Application-Secret"] = apiKeyValue;
279
+ }
280
+ }
253
281
  }
254
282
 
255
283
  if (this.configuration && this.configuration.apiKey) {
256
- headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
284
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
285
+ {
286
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
287
+
288
+ if (apiKeyValue) {
289
+ headerParameters["X-Application-Key"] = apiKeyValue;
290
+ }
291
+ }
257
292
  }
258
293
 
259
294
  const response = await this.request({
@@ -295,11 +330,25 @@ export class AuthEmailOTPApi extends runtime.BaseAPI implements AuthEmailOTPApiI
295
330
  headerParameters['Content-Type'] = 'application/json';
296
331
 
297
332
  if (this.configuration && this.configuration.apiKey) {
298
- headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
333
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
334
+ {
335
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
336
+
337
+ if (apiKeyValue) {
338
+ headerParameters["X-Application-Secret"] = apiKeyValue;
339
+ }
340
+ }
299
341
  }
300
342
 
301
343
  if (this.configuration && this.configuration.apiKey) {
302
- headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
344
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
345
+ {
346
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
347
+
348
+ if (apiKeyValue) {
349
+ headerParameters["X-Application-Key"] = apiKeyValue;
350
+ }
351
+ }
303
352
  }
304
353
 
305
354
  const response = await this.request({
@@ -341,11 +390,25 @@ export class AuthEmailOTPApi extends runtime.BaseAPI implements AuthEmailOTPApiI
341
390
  headerParameters['Content-Type'] = 'application/json';
342
391
 
343
392
  if (this.configuration && this.configuration.apiKey) {
344
- headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
393
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
394
+ {
395
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
396
+
397
+ if (apiKeyValue) {
398
+ headerParameters["X-Application-Secret"] = apiKeyValue;
399
+ }
400
+ }
345
401
  }
346
402
 
347
403
  if (this.configuration && this.configuration.apiKey) {
348
- headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
404
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
405
+ {
406
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
407
+
408
+ if (apiKeyValue) {
409
+ headerParameters["X-Application-Key"] = apiKeyValue;
410
+ }
411
+ }
349
412
  }
350
413
 
351
414
  const response = await this.request({
@@ -299,11 +299,25 @@ export class AuthEmailTemplatesApi extends runtime.BaseAPI implements AuthEmailT
299
299
  headerParameters['Content-Type'] = 'application/json';
300
300
 
301
301
  if (this.configuration && this.configuration.apiKey) {
302
- headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
302
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
303
+ {
304
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
305
+
306
+ if (apiKeyValue) {
307
+ headerParameters["X-Application-Secret"] = apiKeyValue;
308
+ }
309
+ }
303
310
  }
304
311
 
305
312
  if (this.configuration && this.configuration.apiKey) {
306
- headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
313
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
314
+ {
315
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
316
+
317
+ if (apiKeyValue) {
318
+ headerParameters["X-Application-Key"] = apiKeyValue;
319
+ }
320
+ }
307
321
  }
308
322
 
309
323
  const response = await this.request({
@@ -343,11 +357,25 @@ export class AuthEmailTemplatesApi extends runtime.BaseAPI implements AuthEmailT
343
357
  const headerParameters: runtime.HTTPHeaders = {};
344
358
 
345
359
  if (this.configuration && this.configuration.apiKey) {
346
- headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
360
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
361
+ {
362
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
363
+
364
+ if (apiKeyValue) {
365
+ headerParameters["X-Application-Secret"] = apiKeyValue;
366
+ }
367
+ }
347
368
  }
348
369
 
349
370
  if (this.configuration && this.configuration.apiKey) {
350
- headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
371
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
372
+ {
373
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
374
+
375
+ if (apiKeyValue) {
376
+ headerParameters["X-Application-Key"] = apiKeyValue;
377
+ }
378
+ }
351
379
  }
352
380
 
353
381
  const response = await this.request({
@@ -386,11 +414,25 @@ export class AuthEmailTemplatesApi extends runtime.BaseAPI implements AuthEmailT
386
414
  const headerParameters: runtime.HTTPHeaders = {};
387
415
 
388
416
  if (this.configuration && this.configuration.apiKey) {
389
- headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
417
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
418
+ {
419
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
420
+
421
+ if (apiKeyValue) {
422
+ headerParameters["X-Application-Secret"] = apiKeyValue;
423
+ }
424
+ }
390
425
  }
391
426
 
392
427
  if (this.configuration && this.configuration.apiKey) {
393
- headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
428
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
429
+ {
430
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
431
+
432
+ if (apiKeyValue) {
433
+ headerParameters["X-Application-Key"] = apiKeyValue;
434
+ }
435
+ }
394
436
  }
395
437
 
396
438
  const response = await this.request({
@@ -429,11 +471,25 @@ export class AuthEmailTemplatesApi extends runtime.BaseAPI implements AuthEmailT
429
471
  const headerParameters: runtime.HTTPHeaders = {};
430
472
 
431
473
  if (this.configuration && this.configuration.apiKey) {
432
- headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
474
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
475
+ {
476
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
477
+
478
+ if (apiKeyValue) {
479
+ headerParameters["X-Application-Secret"] = apiKeyValue;
480
+ }
481
+ }
433
482
  }
434
483
 
435
484
  if (this.configuration && this.configuration.apiKey) {
436
- headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
485
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
486
+ {
487
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
488
+
489
+ if (apiKeyValue) {
490
+ headerParameters["X-Application-Key"] = apiKeyValue;
491
+ }
492
+ }
437
493
  }
438
494
 
439
495
  const response = await this.request({
@@ -471,11 +527,25 @@ export class AuthEmailTemplatesApi extends runtime.BaseAPI implements AuthEmailT
471
527
  const headerParameters: runtime.HTTPHeaders = {};
472
528
 
473
529
  if (this.configuration && this.configuration.apiKey) {
474
- headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
530
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
531
+ {
532
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
533
+
534
+ if (apiKeyValue) {
535
+ headerParameters["X-Application-Secret"] = apiKeyValue;
536
+ }
537
+ }
475
538
  }
476
539
 
477
540
  if (this.configuration && this.configuration.apiKey) {
478
- headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
541
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
542
+ {
543
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
544
+
545
+ if (apiKeyValue) {
546
+ headerParameters["X-Application-Key"] = apiKeyValue;
547
+ }
548
+ }
479
549
  }
480
550
 
481
551
  const response = await this.request({
@@ -506,11 +576,25 @@ export class AuthEmailTemplatesApi extends runtime.BaseAPI implements AuthEmailT
506
576
  const headerParameters: runtime.HTTPHeaders = {};
507
577
 
508
578
  if (this.configuration && this.configuration.apiKey) {
509
- headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
579
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
580
+ {
581
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
582
+
583
+ if (apiKeyValue) {
584
+ headerParameters["X-Application-Secret"] = apiKeyValue;
585
+ }
586
+ }
510
587
  }
511
588
 
512
589
  if (this.configuration && this.configuration.apiKey) {
513
- headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
590
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
591
+ {
592
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
593
+
594
+ if (apiKeyValue) {
595
+ headerParameters["X-Application-Key"] = apiKeyValue;
596
+ }
597
+ }
514
598
  }
515
599
 
516
600
  const response = await this.request({
@@ -551,11 +635,25 @@ export class AuthEmailTemplatesApi extends runtime.BaseAPI implements AuthEmailT
551
635
  headerParameters['Content-Type'] = 'application/json';
552
636
 
553
637
  if (this.configuration && this.configuration.apiKey) {
554
- headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
638
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
639
+ {
640
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
641
+
642
+ if (apiKeyValue) {
643
+ headerParameters["X-Application-Secret"] = apiKeyValue;
644
+ }
645
+ }
555
646
  }
556
647
 
557
648
  if (this.configuration && this.configuration.apiKey) {
558
- headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
649
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
650
+ {
651
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
652
+
653
+ if (apiKeyValue) {
654
+ headerParameters["X-Application-Key"] = apiKeyValue;
655
+ }
656
+ }
559
657
  }
560
658
 
561
659
  const response = await this.request({
@@ -602,11 +700,25 @@ export class AuthEmailTemplatesApi extends runtime.BaseAPI implements AuthEmailT
602
700
  const headerParameters: runtime.HTTPHeaders = {};
603
701
 
604
702
  if (this.configuration && this.configuration.apiKey) {
605
- headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
703
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
704
+ {
705
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
706
+
707
+ if (apiKeyValue) {
708
+ headerParameters["X-Application-Secret"] = apiKeyValue;
709
+ }
710
+ }
606
711
  }
607
712
 
608
713
  if (this.configuration && this.configuration.apiKey) {
609
- headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
714
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
715
+ {
716
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
717
+
718
+ if (apiKeyValue) {
719
+ headerParameters["X-Application-Key"] = apiKeyValue;
720
+ }
721
+ }
610
722
  }
611
723
 
612
724
  const response = await this.request({
@@ -654,11 +766,25 @@ export class AuthEmailTemplatesApi extends runtime.BaseAPI implements AuthEmailT
654
766
  headerParameters['Content-Type'] = 'application/json';
655
767
 
656
768
  if (this.configuration && this.configuration.apiKey) {
657
- headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
769
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
770
+ {
771
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
772
+
773
+ if (apiKeyValue) {
774
+ headerParameters["X-Application-Secret"] = apiKeyValue;
775
+ }
776
+ }
658
777
  }
659
778
 
660
779
  if (this.configuration && this.configuration.apiKey) {
661
- headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
780
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
781
+ {
782
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
783
+
784
+ if (apiKeyValue) {
785
+ headerParameters["X-Application-Key"] = apiKeyValue;
786
+ }
787
+ }
662
788
  }
663
789
 
664
790
  const response = await this.request({
@@ -707,11 +833,25 @@ export class AuthEmailTemplatesApi extends runtime.BaseAPI implements AuthEmailT
707
833
  headerParameters['Content-Type'] = 'application/json';
708
834
 
709
835
  if (this.configuration && this.configuration.apiKey) {
710
- headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
836
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
837
+ {
838
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
839
+
840
+ if (apiKeyValue) {
841
+ headerParameters["X-Application-Secret"] = apiKeyValue;
842
+ }
843
+ }
711
844
  }
712
845
 
713
846
  if (this.configuration && this.configuration.apiKey) {
714
- headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
847
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
848
+ {
849
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
850
+
851
+ if (apiKeyValue) {
852
+ headerParameters["X-Application-Key"] = apiKeyValue;
853
+ }
854
+ }
715
855
  }
716
856
 
717
857
  const response = await this.request({
@@ -130,11 +130,25 @@ export class AuthEmailVerificationApi extends runtime.BaseAPI implements AuthEma
130
130
  headerParameters['Content-Type'] = 'application/json';
131
131
 
132
132
  if (this.configuration && this.configuration.apiKey) {
133
- headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
133
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
134
+ {
135
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
136
+
137
+ if (apiKeyValue) {
138
+ headerParameters["X-Application-Secret"] = apiKeyValue;
139
+ }
140
+ }
134
141
  }
135
142
 
136
143
  if (this.configuration && this.configuration.apiKey) {
137
- headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
144
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
145
+ {
146
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
147
+
148
+ if (apiKeyValue) {
149
+ headerParameters["X-Application-Key"] = apiKeyValue;
150
+ }
151
+ }
138
152
  }
139
153
 
140
154
  const response = await this.request({
@@ -169,7 +183,14 @@ export class AuthEmailVerificationApi extends runtime.BaseAPI implements AuthEma
169
183
  headerParameters['Content-Type'] = 'application/json';
170
184
 
171
185
  if (this.configuration && this.configuration.apiKey) {
172
- headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
186
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
187
+ {
188
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
189
+
190
+ if (apiKeyValue) {
191
+ headerParameters["X-Application-Secret"] = apiKeyValue;
192
+ }
193
+ }
173
194
  }
174
195
 
175
196
  if (this.configuration && this.configuration.accessToken) {
@@ -181,7 +202,14 @@ export class AuthEmailVerificationApi extends runtime.BaseAPI implements AuthEma
181
202
  }
182
203
  }
183
204
  if (this.configuration && this.configuration.apiKey) {
184
- headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
205
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
206
+ {
207
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
208
+
209
+ if (apiKeyValue) {
210
+ headerParameters["X-Application-Key"] = apiKeyValue;
211
+ }
212
+ }
185
213
  }
186
214
 
187
215
  const response = await this.request({
@@ -216,7 +244,14 @@ export class AuthEmailVerificationApi extends runtime.BaseAPI implements AuthEma
216
244
  headerParameters['Content-Type'] = 'application/json';
217
245
 
218
246
  if (this.configuration && this.configuration.apiKey) {
219
- headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
247
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
248
+ {
249
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
250
+
251
+ if (apiKeyValue) {
252
+ headerParameters["X-Application-Secret"] = apiKeyValue;
253
+ }
254
+ }
220
255
  }
221
256
 
222
257
  if (this.configuration && this.configuration.accessToken) {
@@ -228,7 +263,14 @@ export class AuthEmailVerificationApi extends runtime.BaseAPI implements AuthEma
228
263
  }
229
264
  }
230
265
  if (this.configuration && this.configuration.apiKey) {
231
- headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
266
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
267
+ {
268
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
269
+
270
+ if (apiKeyValue) {
271
+ headerParameters["X-Application-Key"] = apiKeyValue;
272
+ }
273
+ }
232
274
  }
233
275
 
234
276
  const response = await this.request({
@@ -81,11 +81,25 @@ export class AuthLoginApi extends runtime.BaseAPI implements AuthLoginApiInterfa
81
81
  headerParameters['Content-Type'] = 'application/json';
82
82
 
83
83
  if (this.configuration && this.configuration.apiKey) {
84
- headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
84
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
85
+ {
86
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
87
+
88
+ if (apiKeyValue) {
89
+ headerParameters["X-Application-Secret"] = apiKeyValue;
90
+ }
91
+ }
85
92
  }
86
93
 
87
94
  if (this.configuration && this.configuration.apiKey) {
88
- headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
95
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
96
+ {
97
+ const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
98
+
99
+ if (apiKeyValue) {
100
+ headerParameters["X-Application-Key"] = apiKeyValue;
101
+ }
102
+ }
89
103
  }
90
104
 
91
105
  const response = await this.request({