@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
@@ -583,7 +583,14 @@ export class WebhooksApi extends runtime.BaseAPI implements WebhooksApiInterface
583
583
  headerParameters['Content-Type'] = 'application/json';
584
584
 
585
585
  if (this.configuration && this.configuration.apiKey) {
586
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
586
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
587
+ {
588
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
589
+
590
+ if (apiKeyValue) {
591
+ headerParameters["X-API-Key"] = apiKeyValue;
592
+ }
593
+ }
587
594
  }
588
595
 
589
596
  const response = await this.request({
@@ -623,7 +630,14 @@ export class WebhooksApi extends runtime.BaseAPI implements WebhooksApiInterface
623
630
  const headerParameters: runtime.HTTPHeaders = {};
624
631
 
625
632
  if (this.configuration && this.configuration.apiKey) {
626
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
633
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
634
+ {
635
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
636
+
637
+ if (apiKeyValue) {
638
+ headerParameters["X-API-Key"] = apiKeyValue;
639
+ }
640
+ }
627
641
  }
628
642
 
629
643
  const response = await this.request({
@@ -664,7 +678,14 @@ export class WebhooksApi extends runtime.BaseAPI implements WebhooksApiInterface
664
678
  headerParameters['Content-Type'] = 'application/json';
665
679
 
666
680
  if (this.configuration && this.configuration.apiKey) {
667
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
681
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
682
+ {
683
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
684
+
685
+ if (apiKeyValue) {
686
+ headerParameters["X-API-Key"] = apiKeyValue;
687
+ }
688
+ }
668
689
  }
669
690
 
670
691
  const response = await this.request({
@@ -704,7 +725,14 @@ export class WebhooksApi extends runtime.BaseAPI implements WebhooksApiInterface
704
725
  const headerParameters: runtime.HTTPHeaders = {};
705
726
 
706
727
  if (this.configuration && this.configuration.apiKey) {
707
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
728
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
729
+ {
730
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
731
+
732
+ if (apiKeyValue) {
733
+ headerParameters["X-API-Key"] = apiKeyValue;
734
+ }
735
+ }
708
736
  }
709
737
 
710
738
  const response = await this.request({
@@ -736,7 +764,14 @@ export class WebhooksApi extends runtime.BaseAPI implements WebhooksApiInterface
736
764
  const headerParameters: runtime.HTTPHeaders = {};
737
765
 
738
766
  if (this.configuration && this.configuration.apiKey) {
739
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
767
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
768
+ {
769
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
770
+
771
+ if (apiKeyValue) {
772
+ headerParameters["X-API-Key"] = apiKeyValue;
773
+ }
774
+ }
740
775
  }
741
776
 
742
777
  const response = await this.request({
@@ -775,7 +810,14 @@ export class WebhooksApi extends runtime.BaseAPI implements WebhooksApiInterface
775
810
  const headerParameters: runtime.HTTPHeaders = {};
776
811
 
777
812
  if (this.configuration && this.configuration.apiKey) {
778
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
813
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
814
+ {
815
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
816
+
817
+ if (apiKeyValue) {
818
+ headerParameters["X-API-Key"] = apiKeyValue;
819
+ }
820
+ }
779
821
  }
780
822
 
781
823
  const response = await this.request({
@@ -814,7 +856,14 @@ export class WebhooksApi extends runtime.BaseAPI implements WebhooksApiInterface
814
856
  const headerParameters: runtime.HTTPHeaders = {};
815
857
 
816
858
  if (this.configuration && this.configuration.apiKey) {
817
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
859
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
860
+ {
861
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
862
+
863
+ if (apiKeyValue) {
864
+ headerParameters["X-API-Key"] = apiKeyValue;
865
+ }
866
+ }
818
867
  }
819
868
 
820
869
  const response = await this.request({
@@ -860,7 +909,14 @@ export class WebhooksApi extends runtime.BaseAPI implements WebhooksApiInterface
860
909
  const headerParameters: runtime.HTTPHeaders = {};
861
910
 
862
911
  if (this.configuration && this.configuration.apiKey) {
863
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
912
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
913
+ {
914
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
915
+
916
+ if (apiKeyValue) {
917
+ headerParameters["X-API-Key"] = apiKeyValue;
918
+ }
919
+ }
864
920
  }
865
921
 
866
922
  const response = await this.request({
@@ -892,7 +948,14 @@ export class WebhooksApi extends runtime.BaseAPI implements WebhooksApiInterface
892
948
  const headerParameters: runtime.HTTPHeaders = {};
893
949
 
894
950
  if (this.configuration && this.configuration.apiKey) {
895
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
951
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
952
+ {
953
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
954
+
955
+ if (apiKeyValue) {
956
+ headerParameters["X-API-Key"] = apiKeyValue;
957
+ }
958
+ }
896
959
  }
897
960
 
898
961
  const response = await this.request({
@@ -931,7 +994,14 @@ export class WebhooksApi extends runtime.BaseAPI implements WebhooksApiInterface
931
994
  const headerParameters: runtime.HTTPHeaders = {};
932
995
 
933
996
  if (this.configuration && this.configuration.apiKey) {
934
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
997
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
998
+ {
999
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1000
+
1001
+ if (apiKeyValue) {
1002
+ headerParameters["X-API-Key"] = apiKeyValue;
1003
+ }
1004
+ }
935
1005
  }
936
1006
 
937
1007
  const response = await this.request({
@@ -970,7 +1040,14 @@ export class WebhooksApi extends runtime.BaseAPI implements WebhooksApiInterface
970
1040
  const headerParameters: runtime.HTTPHeaders = {};
971
1041
 
972
1042
  if (this.configuration && this.configuration.apiKey) {
973
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1043
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
1044
+ {
1045
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1046
+
1047
+ if (apiKeyValue) {
1048
+ headerParameters["X-API-Key"] = apiKeyValue;
1049
+ }
1050
+ }
974
1051
  }
975
1052
 
976
1053
  const response = await this.request({
@@ -1002,7 +1079,14 @@ export class WebhooksApi extends runtime.BaseAPI implements WebhooksApiInterface
1002
1079
  const headerParameters: runtime.HTTPHeaders = {};
1003
1080
 
1004
1081
  if (this.configuration && this.configuration.apiKey) {
1005
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1082
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
1083
+ {
1084
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1085
+
1086
+ if (apiKeyValue) {
1087
+ headerParameters["X-API-Key"] = apiKeyValue;
1088
+ }
1089
+ }
1006
1090
  }
1007
1091
 
1008
1092
  const response = await this.request({
@@ -1069,7 +1153,14 @@ export class WebhooksApi extends runtime.BaseAPI implements WebhooksApiInterface
1069
1153
  const headerParameters: runtime.HTTPHeaders = {};
1070
1154
 
1071
1155
  if (this.configuration && this.configuration.apiKey) {
1072
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1156
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
1157
+ {
1158
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1159
+
1160
+ if (apiKeyValue) {
1161
+ headerParameters["X-API-Key"] = apiKeyValue;
1162
+ }
1163
+ }
1073
1164
  }
1074
1165
 
1075
1166
  const response = await this.request({
@@ -1105,7 +1196,14 @@ export class WebhooksApi extends runtime.BaseAPI implements WebhooksApiInterface
1105
1196
  const headerParameters: runtime.HTTPHeaders = {};
1106
1197
 
1107
1198
  if (this.configuration && this.configuration.apiKey) {
1108
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1199
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
1200
+ {
1201
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1202
+
1203
+ if (apiKeyValue) {
1204
+ headerParameters["X-API-Key"] = apiKeyValue;
1205
+ }
1206
+ }
1109
1207
  }
1110
1208
 
1111
1209
  const response = await this.request({
@@ -1137,7 +1235,14 @@ export class WebhooksApi extends runtime.BaseAPI implements WebhooksApiInterface
1137
1235
  const headerParameters: runtime.HTTPHeaders = {};
1138
1236
 
1139
1237
  if (this.configuration && this.configuration.apiKey) {
1140
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1238
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
1239
+ {
1240
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1241
+
1242
+ if (apiKeyValue) {
1243
+ headerParameters["X-API-Key"] = apiKeyValue;
1244
+ }
1245
+ }
1141
1246
  }
1142
1247
 
1143
1248
  const response = await this.request({
@@ -1177,7 +1282,14 @@ export class WebhooksApi extends runtime.BaseAPI implements WebhooksApiInterface
1177
1282
  const headerParameters: runtime.HTTPHeaders = {};
1178
1283
 
1179
1284
  if (this.configuration && this.configuration.apiKey) {
1180
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1285
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
1286
+ {
1287
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1288
+
1289
+ if (apiKeyValue) {
1290
+ headerParameters["X-API-Key"] = apiKeyValue;
1291
+ }
1292
+ }
1181
1293
  }
1182
1294
 
1183
1295
  const response = await this.request({
@@ -1225,7 +1337,14 @@ export class WebhooksApi extends runtime.BaseAPI implements WebhooksApiInterface
1225
1337
  headerParameters['Content-Type'] = 'application/json';
1226
1338
 
1227
1339
  if (this.configuration && this.configuration.apiKey) {
1228
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1340
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
1341
+ {
1342
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1343
+
1344
+ if (apiKeyValue) {
1345
+ headerParameters["X-API-Key"] = apiKeyValue;
1346
+ }
1347
+ }
1229
1348
  }
1230
1349
 
1231
1350
  const response = await this.request({
@@ -1272,7 +1391,14 @@ export class WebhooksApi extends runtime.BaseAPI implements WebhooksApiInterface
1272
1391
  const headerParameters: runtime.HTTPHeaders = {};
1273
1392
 
1274
1393
  if (this.configuration && this.configuration.apiKey) {
1275
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1394
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
1395
+ {
1396
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1397
+
1398
+ if (apiKeyValue) {
1399
+ headerParameters["X-API-Key"] = apiKeyValue;
1400
+ }
1401
+ }
1276
1402
  }
1277
1403
 
1278
1404
  const response = await this.request({
@@ -1311,7 +1437,14 @@ export class WebhooksApi extends runtime.BaseAPI implements WebhooksApiInterface
1311
1437
  const headerParameters: runtime.HTTPHeaders = {};
1312
1438
 
1313
1439
  if (this.configuration && this.configuration.apiKey) {
1314
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1440
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
1441
+ {
1442
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1443
+
1444
+ if (apiKeyValue) {
1445
+ headerParameters["X-API-Key"] = apiKeyValue;
1446
+ }
1447
+ }
1315
1448
  }
1316
1449
 
1317
1450
  const response = await this.request({
@@ -1352,7 +1485,14 @@ export class WebhooksApi extends runtime.BaseAPI implements WebhooksApiInterface
1352
1485
  headerParameters['Content-Type'] = 'application/json';
1353
1486
 
1354
1487
  if (this.configuration && this.configuration.apiKey) {
1355
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1488
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
1489
+ {
1490
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1491
+
1492
+ if (apiKeyValue) {
1493
+ headerParameters["X-API-Key"] = apiKeyValue;
1494
+ }
1495
+ }
1356
1496
  }
1357
1497
 
1358
1498
  const response = await this.request({
@@ -1401,7 +1541,14 @@ export class WebhooksApi extends runtime.BaseAPI implements WebhooksApiInterface
1401
1541
  headerParameters['Content-Type'] = 'application/json';
1402
1542
 
1403
1543
  if (this.configuration && this.configuration.apiKey) {
1404
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1544
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
1545
+ {
1546
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1547
+
1548
+ if (apiKeyValue) {
1549
+ headerParameters["X-API-Key"] = apiKeyValue;
1550
+ }
1551
+ }
1405
1552
  }
1406
1553
 
1407
1554
  const response = await this.request({
@@ -1450,7 +1597,14 @@ export class WebhooksApi extends runtime.BaseAPI implements WebhooksApiInterface
1450
1597
  headerParameters['Content-Type'] = 'application/json';
1451
1598
 
1452
1599
  if (this.configuration && this.configuration.apiKey) {
1453
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1600
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
1601
+ {
1602
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1603
+
1604
+ if (apiKeyValue) {
1605
+ headerParameters["X-API-Key"] = apiKeyValue;
1606
+ }
1607
+ }
1454
1608
  }
1455
1609
 
1456
1610
  const response = await this.request({
@@ -373,7 +373,14 @@ export class WorkflowsApi extends runtime.BaseAPI implements WorkflowsApiInterfa
373
373
  headerParameters['Content-Type'] = 'application/json';
374
374
 
375
375
  if (this.configuration && this.configuration.apiKey) {
376
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
376
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
377
+ {
378
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
379
+
380
+ if (apiKeyValue) {
381
+ headerParameters["X-API-Key"] = apiKeyValue;
382
+ }
383
+ }
377
384
  }
378
385
 
379
386
  const response = await this.request({
@@ -415,7 +422,14 @@ export class WorkflowsApi extends runtime.BaseAPI implements WorkflowsApiInterfa
415
422
  headerParameters['Content-Type'] = 'application/json';
416
423
 
417
424
  if (this.configuration && this.configuration.apiKey) {
418
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
425
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
426
+ {
427
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
428
+
429
+ if (apiKeyValue) {
430
+ headerParameters["X-API-Key"] = apiKeyValue;
431
+ }
432
+ }
419
433
  }
420
434
 
421
435
  const response = await this.request({
@@ -455,7 +469,14 @@ export class WorkflowsApi extends runtime.BaseAPI implements WorkflowsApiInterfa
455
469
  const headerParameters: runtime.HTTPHeaders = {};
456
470
 
457
471
  if (this.configuration && this.configuration.apiKey) {
458
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
472
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
473
+ {
474
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
475
+
476
+ if (apiKeyValue) {
477
+ headerParameters["X-API-Key"] = apiKeyValue;
478
+ }
479
+ }
459
480
  }
460
481
 
461
482
  const response = await this.request({
@@ -501,7 +522,14 @@ export class WorkflowsApi extends runtime.BaseAPI implements WorkflowsApiInterfa
501
522
  const headerParameters: runtime.HTTPHeaders = {};
502
523
 
503
524
  if (this.configuration && this.configuration.apiKey) {
504
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
525
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
526
+ {
527
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
528
+
529
+ if (apiKeyValue) {
530
+ headerParameters["X-API-Key"] = apiKeyValue;
531
+ }
532
+ }
505
533
  }
506
534
 
507
535
  const response = await this.request({
@@ -540,7 +568,14 @@ export class WorkflowsApi extends runtime.BaseAPI implements WorkflowsApiInterfa
540
568
  const headerParameters: runtime.HTTPHeaders = {};
541
569
 
542
570
  if (this.configuration && this.configuration.apiKey) {
543
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
571
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
572
+ {
573
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
574
+
575
+ if (apiKeyValue) {
576
+ headerParameters["X-API-Key"] = apiKeyValue;
577
+ }
578
+ }
544
579
  }
545
580
 
546
581
  const response = await this.request({
@@ -587,7 +622,14 @@ export class WorkflowsApi extends runtime.BaseAPI implements WorkflowsApiInterfa
587
622
  const headerParameters: runtime.HTTPHeaders = {};
588
623
 
589
624
  if (this.configuration && this.configuration.apiKey) {
590
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
625
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
626
+ {
627
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
628
+
629
+ if (apiKeyValue) {
630
+ headerParameters["X-API-Key"] = apiKeyValue;
631
+ }
632
+ }
591
633
  }
592
634
 
593
635
  const response = await this.request({
@@ -635,7 +677,14 @@ export class WorkflowsApi extends runtime.BaseAPI implements WorkflowsApiInterfa
635
677
  const headerParameters: runtime.HTTPHeaders = {};
636
678
 
637
679
  if (this.configuration && this.configuration.apiKey) {
638
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
680
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
681
+ {
682
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
683
+
684
+ if (apiKeyValue) {
685
+ headerParameters["X-API-Key"] = apiKeyValue;
686
+ }
687
+ }
639
688
  }
640
689
 
641
690
  const response = await this.request({
@@ -683,7 +732,14 @@ export class WorkflowsApi extends runtime.BaseAPI implements WorkflowsApiInterfa
683
732
  headerParameters['Content-Type'] = 'application/json';
684
733
 
685
734
  if (this.configuration && this.configuration.apiKey) {
686
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
735
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
736
+ {
737
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
738
+
739
+ if (apiKeyValue) {
740
+ headerParameters["X-API-Key"] = apiKeyValue;
741
+ }
742
+ }
687
743
  }
688
744
 
689
745
  const response = await this.request({
@@ -732,7 +788,14 @@ export class WorkflowsApi extends runtime.BaseAPI implements WorkflowsApiInterfa
732
788
  headerParameters['Content-Type'] = 'application/json';
733
789
 
734
790
  if (this.configuration && this.configuration.apiKey) {
735
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
791
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
792
+ {
793
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
794
+
795
+ if (apiKeyValue) {
796
+ headerParameters["X-API-Key"] = apiKeyValue;
797
+ }
798
+ }
736
799
  }
737
800
 
738
801
  const response = await this.request({
@@ -781,7 +844,14 @@ export class WorkflowsApi extends runtime.BaseAPI implements WorkflowsApiInterfa
781
844
  headerParameters['Content-Type'] = 'application/json';
782
845
 
783
846
  if (this.configuration && this.configuration.apiKey) {
784
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
847
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
848
+ {
849
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
850
+
851
+ if (apiKeyValue) {
852
+ headerParameters["X-API-Key"] = apiKeyValue;
853
+ }
854
+ }
785
855
  }
786
856
 
787
857
  const response = await this.request({
@@ -830,7 +900,14 @@ export class WorkflowsApi extends runtime.BaseAPI implements WorkflowsApiInterfa
830
900
  headerParameters['Content-Type'] = 'application/json';
831
901
 
832
902
  if (this.configuration && this.configuration.apiKey) {
833
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
903
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
904
+ {
905
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
906
+
907
+ if (apiKeyValue) {
908
+ headerParameters["X-API-Key"] = apiKeyValue;
909
+ }
910
+ }
834
911
  }
835
912
 
836
913
  const response = await this.request({
@@ -886,7 +963,14 @@ export class WorkflowsApi extends runtime.BaseAPI implements WorkflowsApiInterfa
886
963
  headerParameters['Content-Type'] = 'application/json';
887
964
 
888
965
  if (this.configuration && this.configuration.apiKey) {
889
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
966
+ // An unresolved credential must produce NO header, not an empty one (sc-8162).
967
+ {
968
+ const apiKeyValue = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
969
+
970
+ if (apiKeyValue) {
971
+ headerParameters["X-API-Key"] = apiKeyValue;
972
+ }
973
+ }
890
974
  }
891
975
 
892
976
  const response = await this.request({
@@ -37,6 +37,29 @@ export interface InviteEndUser200ResponseData {
37
37
  * @memberof InviteEndUser200ResponseData
38
38
  */
39
39
  linkSent?: boolean;
40
+ /**
41
+ * Present only when `send_link` was requested and `link_sent` is false — explains why,
42
+ * so a caller can distinguish "suppressed by design" from "delivery failed".
43
+ *
44
+ * Known values:
45
+ *
46
+ * - `identity_has_other_auth_methods` — the identity has no password but does have a
47
+ * linked OAuth provider and/or a passkey, so it is not locked out and no
48
+ * set-password link is sent. The attempt is recorded as a suppressed message,
49
+ * visible via `GET /emails`.
50
+ * - `user_not_found_in_environment` — the identity could not be resolved in the
51
+ * calling environment (a race; it was created or resolved immediately prior).
52
+ * - `recipient_not_allowlisted` — the application's `test_recipients` allowlist
53
+ * blocked the recipient.
54
+ * - `send_failed` — dispatch was attempted and failed with no more specific code.
55
+ *
56
+ * Not a closed set: a mail-provider error code may be surfaced verbatim, so treat
57
+ * an unrecognised value as a generic failure rather than an error.
58
+ *
59
+ * @type {string}
60
+ * @memberof InviteEndUser200ResponseData
61
+ */
62
+ linkSuppressedReason?: string;
40
63
  }
41
64
 
42
65
  /**
@@ -59,6 +82,7 @@ export function InviteEndUser200ResponseDataFromJSONTyped(json: any, ignoreDiscr
59
82
  'userId': json['user_id'] == null ? undefined : json['user_id'],
60
83
  'created': json['created'] == null ? undefined : json['created'],
61
84
  'linkSent': json['link_sent'] == null ? undefined : json['link_sent'],
85
+ 'linkSuppressedReason': json['link_suppressed_reason'] == null ? undefined : json['link_suppressed_reason'],
62
86
  };
63
87
  }
64
88
 
@@ -76,6 +100,7 @@ export function InviteEndUser200ResponseDataToJSONTyped(value?: InviteEndUser200
76
100
  'user_id': value['userId'],
77
101
  'created': value['created'],
78
102
  'link_sent': value['linkSent'],
103
+ 'link_suppressed_reason': value['linkSuppressedReason'],
79
104
  };
80
105
  }
81
106