@greensecurity/javascript-sdk 0.47.0-beta.0 → 0.47.0-beta.10

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 (164) hide show
  1. package/dist/commonjs/__tests__/doAdmin.test.js +26 -0
  2. package/dist/commonjs/__tests__/doAdmin.test.js.map +1 -1
  3. package/dist/commonjs/__tests__/vendors.test.js +1 -1
  4. package/dist/commonjs/__tests__/zoneDevicesCreate.test.js +19 -1
  5. package/dist/commonjs/__tests__/zoneDevicesCreate.test.js.map +1 -1
  6. package/dist/commonjs/__tests__/zoneDevicesList.test.js +13 -1
  7. package/dist/commonjs/__tests__/zoneDevicesList.test.js.map +1 -1
  8. package/dist/commonjs/__tests__/zones.test.js +31 -4
  9. package/dist/commonjs/__tests__/zones.test.js.map +1 -1
  10. package/dist/commonjs/admin-funcs/doAdmin.d.ts +3 -1
  11. package/dist/commonjs/admin-funcs/doAdmin.d.ts.map +1 -1
  12. package/dist/commonjs/admin-funcs/doAdmin.js +11 -3
  13. package/dist/commonjs/admin-funcs/doAdmin.js.map +1 -1
  14. package/dist/commonjs/admin-funcs/lookupsAddressAutocomplete.d.ts +4 -0
  15. package/dist/commonjs/admin-funcs/lookupsAddressAutocomplete.d.ts.map +1 -0
  16. package/dist/commonjs/admin-funcs/lookupsAddressAutocomplete.js +17 -0
  17. package/dist/commonjs/admin-funcs/lookupsAddressAutocomplete.js.map +1 -0
  18. package/dist/commonjs/admin-funcs/lookupsAddressPlace.d.ts +4 -0
  19. package/dist/commonjs/admin-funcs/lookupsAddressPlace.d.ts.map +1 -0
  20. package/dist/commonjs/admin-funcs/lookupsAddressPlace.js +16 -0
  21. package/dist/commonjs/admin-funcs/lookupsAddressPlace.js.map +1 -0
  22. package/dist/commonjs/admin-funcs/lookupsAddressValidation.d.ts +13 -0
  23. package/dist/commonjs/admin-funcs/lookupsAddressValidation.d.ts.map +1 -0
  24. package/dist/commonjs/admin-funcs/lookupsAddressValidation.js +10 -0
  25. package/dist/commonjs/admin-funcs/lookupsAddressValidation.js.map +1 -0
  26. package/dist/commonjs/admin-funcs/networksCreate.d.ts +4 -0
  27. package/dist/commonjs/admin-funcs/networksCreate.d.ts.map +1 -1
  28. package/dist/commonjs/admin-funcs/networksCreate.js.map +1 -1
  29. package/dist/commonjs/admin-funcs/vendorCredentialCreateFormQuote.d.ts +18 -1
  30. package/dist/commonjs/admin-funcs/vendorCredentialCreateFormQuote.d.ts.map +1 -1
  31. package/dist/commonjs/admin-funcs/vendorCredentialCreateFormQuote.js +18 -2
  32. package/dist/commonjs/admin-funcs/vendorCredentialCreateFormQuote.js.map +1 -1
  33. package/dist/commonjs/admin-funcs/vendorCredentialGetFormLineItems.d.ts +5 -1
  34. package/dist/commonjs/admin-funcs/vendorCredentialGetFormLineItems.d.ts.map +1 -1
  35. package/dist/commonjs/admin-funcs/vendorCredentialGetFormLineItems.js +5 -2
  36. package/dist/commonjs/admin-funcs/vendorCredentialGetFormLineItems.js.map +1 -1
  37. package/dist/commonjs/admin-funcs/zoneDevicesDelete.d.ts +3 -0
  38. package/dist/commonjs/admin-funcs/zoneDevicesDelete.d.ts.map +1 -0
  39. package/dist/commonjs/admin-funcs/zoneDevicesDelete.js +11 -0
  40. package/dist/commonjs/admin-funcs/zoneDevicesDelete.js.map +1 -0
  41. package/dist/commonjs/admin-funcs/zoneDevicesList.d.ts +1 -0
  42. package/dist/commonjs/admin-funcs/zoneDevicesList.d.ts.map +1 -1
  43. package/dist/commonjs/admin-funcs/zoneDevicesList.js +3 -0
  44. package/dist/commonjs/admin-funcs/zoneDevicesList.js.map +1 -1
  45. package/dist/commonjs/admin-funcs/zoneDevicesProvisioning.d.ts +3 -0
  46. package/dist/commonjs/admin-funcs/zoneDevicesProvisioning.d.ts.map +1 -0
  47. package/dist/commonjs/admin-funcs/zoneDevicesProvisioning.js +15 -0
  48. package/dist/commonjs/admin-funcs/zoneDevicesProvisioning.js.map +1 -0
  49. package/dist/commonjs/admin-funcs/zoneDevicesUpdate.d.ts +10 -0
  50. package/dist/commonjs/admin-funcs/zoneDevicesUpdate.d.ts.map +1 -0
  51. package/dist/commonjs/admin-funcs/zoneDevicesUpdate.js +14 -0
  52. package/dist/commonjs/admin-funcs/zoneDevicesUpdate.js.map +1 -0
  53. package/dist/commonjs/apps/components.d.ts.map +1 -1
  54. package/dist/commonjs/apps/components.js +5 -0
  55. package/dist/commonjs/apps/components.js.map +1 -1
  56. package/dist/commonjs/apps/surfaces.js +2 -2
  57. package/dist/commonjs/apps/surfaces.js.map +1 -1
  58. package/dist/commonjs/index.extras.d.ts +14 -0
  59. package/dist/commonjs/index.extras.d.ts.map +1 -1
  60. package/dist/commonjs/index.extras.js +14 -0
  61. package/dist/commonjs/index.extras.js.map +1 -1
  62. package/dist/commonjs/lib/config.d.ts +3 -3
  63. package/dist/commonjs/lib/config.js +3 -3
  64. package/dist/commonjs/lib/config.js.map +1 -1
  65. package/dist/commonjs/models/operations/createinvoice.d.ts +25 -0
  66. package/dist/commonjs/models/operations/createinvoice.d.ts.map +1 -1
  67. package/dist/commonjs/models/operations/createinvoice.js +10 -0
  68. package/dist/commonjs/models/operations/createinvoice.js.map +1 -1
  69. package/dist/commonjs/types/smartUnion.js +3 -3
  70. package/dist/commonjs/types/smartUnion.js.map +1 -1
  71. package/dist/esm/__tests__/doAdmin.test.js +27 -1
  72. package/dist/esm/__tests__/doAdmin.test.js.map +1 -1
  73. package/dist/esm/__tests__/vendors.test.js +1 -1
  74. package/dist/esm/__tests__/zoneDevicesCreate.test.js +19 -1
  75. package/dist/esm/__tests__/zoneDevicesCreate.test.js.map +1 -1
  76. package/dist/esm/__tests__/zoneDevicesList.test.js +13 -1
  77. package/dist/esm/__tests__/zoneDevicesList.test.js.map +1 -1
  78. package/dist/esm/__tests__/zones.test.js +31 -4
  79. package/dist/esm/__tests__/zones.test.js.map +1 -1
  80. package/dist/esm/admin-funcs/doAdmin.d.ts +3 -1
  81. package/dist/esm/admin-funcs/doAdmin.d.ts.map +1 -1
  82. package/dist/esm/admin-funcs/doAdmin.js +10 -3
  83. package/dist/esm/admin-funcs/doAdmin.js.map +1 -1
  84. package/dist/esm/admin-funcs/lookupsAddressAutocomplete.d.ts +4 -0
  85. package/dist/esm/admin-funcs/lookupsAddressAutocomplete.d.ts.map +1 -0
  86. package/dist/esm/admin-funcs/lookupsAddressAutocomplete.js +14 -0
  87. package/dist/esm/admin-funcs/lookupsAddressAutocomplete.js.map +1 -0
  88. package/dist/esm/admin-funcs/lookupsAddressPlace.d.ts +4 -0
  89. package/dist/esm/admin-funcs/lookupsAddressPlace.d.ts.map +1 -0
  90. package/dist/esm/admin-funcs/lookupsAddressPlace.js +13 -0
  91. package/dist/esm/admin-funcs/lookupsAddressPlace.js.map +1 -0
  92. package/dist/esm/admin-funcs/lookupsAddressValidation.d.ts +13 -0
  93. package/dist/esm/admin-funcs/lookupsAddressValidation.d.ts.map +1 -0
  94. package/dist/esm/admin-funcs/lookupsAddressValidation.js +7 -0
  95. package/dist/esm/admin-funcs/lookupsAddressValidation.js.map +1 -0
  96. package/dist/esm/admin-funcs/networksCreate.d.ts +4 -0
  97. package/dist/esm/admin-funcs/networksCreate.d.ts.map +1 -1
  98. package/dist/esm/admin-funcs/networksCreate.js.map +1 -1
  99. package/dist/esm/admin-funcs/vendorCredentialCreateFormQuote.d.ts +18 -1
  100. package/dist/esm/admin-funcs/vendorCredentialCreateFormQuote.d.ts.map +1 -1
  101. package/dist/esm/admin-funcs/vendorCredentialCreateFormQuote.js +18 -2
  102. package/dist/esm/admin-funcs/vendorCredentialCreateFormQuote.js.map +1 -1
  103. package/dist/esm/admin-funcs/vendorCredentialGetFormLineItems.d.ts +5 -1
  104. package/dist/esm/admin-funcs/vendorCredentialGetFormLineItems.d.ts.map +1 -1
  105. package/dist/esm/admin-funcs/vendorCredentialGetFormLineItems.js +5 -2
  106. package/dist/esm/admin-funcs/vendorCredentialGetFormLineItems.js.map +1 -1
  107. package/dist/esm/admin-funcs/zoneDevicesDelete.d.ts +3 -0
  108. package/dist/esm/admin-funcs/zoneDevicesDelete.d.ts.map +1 -0
  109. package/dist/esm/admin-funcs/zoneDevicesDelete.js +8 -0
  110. package/dist/esm/admin-funcs/zoneDevicesDelete.js.map +1 -0
  111. package/dist/esm/admin-funcs/zoneDevicesList.d.ts +1 -0
  112. package/dist/esm/admin-funcs/zoneDevicesList.d.ts.map +1 -1
  113. package/dist/esm/admin-funcs/zoneDevicesList.js +3 -0
  114. package/dist/esm/admin-funcs/zoneDevicesList.js.map +1 -1
  115. package/dist/esm/admin-funcs/zoneDevicesProvisioning.d.ts +3 -0
  116. package/dist/esm/admin-funcs/zoneDevicesProvisioning.d.ts.map +1 -0
  117. package/dist/esm/admin-funcs/zoneDevicesProvisioning.js +12 -0
  118. package/dist/esm/admin-funcs/zoneDevicesProvisioning.js.map +1 -0
  119. package/dist/esm/admin-funcs/zoneDevicesUpdate.d.ts +10 -0
  120. package/dist/esm/admin-funcs/zoneDevicesUpdate.d.ts.map +1 -0
  121. package/dist/esm/admin-funcs/zoneDevicesUpdate.js +11 -0
  122. package/dist/esm/admin-funcs/zoneDevicesUpdate.js.map +1 -0
  123. package/dist/esm/apps/components.d.ts.map +1 -1
  124. package/dist/esm/apps/components.js +5 -0
  125. package/dist/esm/apps/components.js.map +1 -1
  126. package/dist/esm/apps/surfaces.js +2 -2
  127. package/dist/esm/apps/surfaces.js.map +1 -1
  128. package/dist/esm/index.extras.d.ts +14 -0
  129. package/dist/esm/index.extras.d.ts.map +1 -1
  130. package/dist/esm/index.extras.js +14 -0
  131. package/dist/esm/index.extras.js.map +1 -1
  132. package/dist/esm/lib/config.d.ts +3 -3
  133. package/dist/esm/lib/config.js +3 -3
  134. package/dist/esm/lib/config.js.map +1 -1
  135. package/dist/esm/models/operations/createinvoice.d.ts +25 -0
  136. package/dist/esm/models/operations/createinvoice.d.ts.map +1 -1
  137. package/dist/esm/models/operations/createinvoice.js +10 -0
  138. package/dist/esm/models/operations/createinvoice.js.map +1 -1
  139. package/dist/esm/types/smartUnion.js +3 -3
  140. package/dist/esm/types/smartUnion.js.map +1 -1
  141. package/jsr.json +1 -1
  142. package/package.json +1 -1
  143. package/src/__tests__/doAdmin.test.ts +35 -0
  144. package/src/__tests__/vendors.test.ts +1 -1
  145. package/src/__tests__/zoneDevicesCreate.test.ts +25 -1
  146. package/src/__tests__/zoneDevicesList.test.ts +15 -1
  147. package/src/__tests__/zones.test.ts +31 -4
  148. package/src/admin-funcs/doAdmin.ts +20 -3
  149. package/src/admin-funcs/lookupsAddressAutocomplete.ts +23 -0
  150. package/src/admin-funcs/lookupsAddressPlace.ts +20 -0
  151. package/src/admin-funcs/lookupsAddressValidation.ts +21 -0
  152. package/src/admin-funcs/networksCreate.ts +5 -0
  153. package/src/admin-funcs/vendorCredentialCreateFormQuote.ts +20 -1
  154. package/src/admin-funcs/vendorCredentialGetFormLineItems.ts +5 -0
  155. package/src/admin-funcs/zoneDevicesDelete.ts +8 -0
  156. package/src/admin-funcs/zoneDevicesList.ts +4 -0
  157. package/src/admin-funcs/zoneDevicesProvisioning.ts +12 -0
  158. package/src/admin-funcs/zoneDevicesUpdate.ts +21 -0
  159. package/src/apps/components.ts +5 -0
  160. package/src/apps/surfaces.ts +2 -2
  161. package/src/index.extras.ts +15 -0
  162. package/src/lib/config.ts +3 -3
  163. package/src/models/operations/createinvoice.ts +35 -0
  164. package/src/types/smartUnion.ts +3 -3
@@ -58,6 +58,10 @@ export type Five = {
58
58
  * A campaign opt-in code, taken from the link that carried the offer Deliberately not an enumeration. The server decides which codes are live, what each one grants, and who qualifies for it. These decisions change as campaigns come and go. The server ignores an unrecognized code, or one the account does not qualify for, and creates the invoice as if the code were absent, never returning an error. The server adds any line item the code earns, and it appears on the quote.
59
59
  */
60
60
  promo?: string | undefined;
61
+ /**
62
+ * Set to `true` when the payer intends to settle this order from their credit balance before their payment method is charged. This affects only how the convenience fee is calculated: the fee pays for card processing, so it is assessed on the amount the card is left to cover once credits have been applied, and an order a balance covers in full carries none. No credits are debited here, and the balance is read from the payer's own ledger rather than taken from this request. Settle the credits with `POST /invoices/{id}/payment` and `use_credits: true`.
63
+ */
64
+ useCredits?: boolean | undefined;
61
65
  };
62
66
 
63
67
  export const CreateInvoiceRequestBodyInvoicesPaymentHandler = {
@@ -105,6 +109,10 @@ export type Four = {
105
109
  * A campaign opt-in code, taken from the link that carried the offer Deliberately not an enumeration. The server decides which codes are live, what each one grants, and who qualifies for it. These decisions change as campaigns come and go. The server ignores an unrecognized code, or one the account does not qualify for, and creates the invoice as if the code were absent, never returning an error. The server adds any line item the code earns, and it appears on the quote.
106
110
  */
107
111
  promo?: string | undefined;
112
+ /**
113
+ * Set to `true` when the payer intends to settle this order from their credit balance before their payment method is charged. This affects only how the convenience fee is calculated: the fee pays for card processing, so it is assessed on the amount the card is left to cover once credits have been applied, and an order a balance covers in full carries none. No credits are debited here, and the balance is read from the payer's own ledger rather than taken from this request. Settle the credits with `POST /invoices/{id}/payment` and `use_credits: true`.
114
+ */
115
+ useCredits?: boolean | undefined;
108
116
  };
109
117
 
110
118
  export const CreateInvoiceRequestBodyPaymentHandler = {
@@ -152,6 +160,10 @@ export type Three = {
152
160
  * A campaign opt-in code, taken from the link that carried the offer Deliberately not an enumeration. The server decides which codes are live, what each one grants, and who qualifies for it. These decisions change as campaigns come and go. The server ignores an unrecognized code, or one the account does not qualify for, and creates the invoice as if the code were absent, never returning an error. The server adds any line item the code earns, and it appears on the quote.
153
161
  */
154
162
  promo?: string | undefined;
163
+ /**
164
+ * Set to `true` when the payer intends to settle this order from their credit balance before their payment method is charged. This affects only how the convenience fee is calculated: the fee pays for card processing, so it is assessed on the amount the card is left to cover once credits have been applied, and an order a balance covers in full carries none. No credits are debited here, and the balance is read from the payer's own ledger rather than taken from this request. Settle the credits with `POST /invoices/{id}/payment` and `use_credits: true`.
165
+ */
166
+ useCredits?: boolean | undefined;
155
167
  };
156
168
 
157
169
  export const RequestBodyPaymentHandler = {
@@ -197,6 +209,10 @@ export type CreateInvoiceRequestBody2 = {
197
209
  * A campaign opt-in code, taken from the link that carried the offer Deliberately not an enumeration. The server decides which codes are live, what each one grants, and who qualifies for it. These decisions change as campaigns come and go. The server ignores an unrecognized code, or one the account does not qualify for, and creates the invoice as if the code were absent, never returning an error. The server adds any line item the code earns, and it appears on the quote.
198
210
  */
199
211
  promo?: string | undefined;
212
+ /**
213
+ * Set to `true` when the payer intends to settle this order from their credit balance before their payment method is charged. This affects only how the convenience fee is calculated: the fee pays for card processing, so it is assessed on the amount the card is left to cover once credits have been applied, and an order a balance covers in full carries none. No credits are debited here, and the balance is read from the payer's own ledger rather than taken from this request. Settle the credits with `POST /invoices/{id}/payment` and `use_credits: true`.
214
+ */
215
+ useCredits?: boolean | undefined;
200
216
  };
201
217
 
202
218
  export const PaymentHandler = {
@@ -240,6 +256,10 @@ export type RequestBody1 = {
240
256
  * A campaign opt-in code, taken from the link that carried the offer Deliberately not an enumeration. The server decides which codes are live, what each one grants, and who qualifies for it. These decisions change as campaigns come and go. The server ignores an unrecognized code, or one the account does not qualify for, and creates the invoice as if the code were absent, never returning an error. The server adds any line item the code earns, and it appears on the quote.
241
257
  */
242
258
  promo?: string | undefined;
259
+ /**
260
+ * Set to `true` when the payer intends to settle this order from their credit balance before their payment method is charged. This affects only how the convenience fee is calculated: the fee pays for card processing, so it is assessed on the amount the card is left to cover once credits have been applied, and an order a balance covers in full carries none. No credits are debited here, and the balance is read from the payer's own ledger rather than taken from this request. Settle the credits with `POST /invoices/{id}/payment` and `use_credits: true`.
261
+ */
262
+ useCredits?: boolean | undefined;
243
263
  };
244
264
 
245
265
  /**
@@ -336,6 +356,7 @@ export type Five$Outbound = {
336
356
  credential_pricing_ids?: Array<number> | null | undefined;
337
357
  invoice_type?: string | undefined;
338
358
  promo?: string | undefined;
359
+ use_credits: boolean;
339
360
  };
340
361
 
341
362
  /** @internal */
@@ -350,11 +371,13 @@ export const Five$outboundSchema: z.ZodType<Five$Outbound, z.ZodTypeDef, Five> =
350
371
  CreateInvoiceRequestBodyInvoicesRequestInvoiceType$outboundSchema
351
372
  .optional(),
352
373
  promo: z.string().optional(),
374
+ useCredits: z.boolean().default(false),
353
375
  }).transform((v) => {
354
376
  return remap$(v, {
355
377
  vendorCredentialId: "vendor_credential_id",
356
378
  credentialPricingIds: "credential_pricing_ids",
357
379
  invoiceType: "invoice_type",
380
+ useCredits: "use_credits",
358
381
  });
359
382
  });
360
383
 
@@ -432,6 +455,7 @@ export type Four$Outbound = {
432
455
  credential_pricing_ids?: Array<number> | null | undefined;
433
456
  invoice_type?: string | undefined;
434
457
  promo?: string | undefined;
458
+ use_credits: boolean;
435
459
  };
436
460
 
437
461
  /** @internal */
@@ -445,11 +469,13 @@ export const Four$outboundSchema: z.ZodType<Four$Outbound, z.ZodTypeDef, Four> =
445
469
  invoiceType: CreateInvoiceRequestBodyInvoicesInvoiceType$outboundSchema
446
470
  .optional(),
447
471
  promo: z.string().optional(),
472
+ useCredits: z.boolean().default(false),
448
473
  }).transform((v) => {
449
474
  return remap$(v, {
450
475
  systemId: "system_id",
451
476
  credentialPricingIds: "credential_pricing_ids",
452
477
  invoiceType: "invoice_type",
478
+ useCredits: "use_credits",
453
479
  });
454
480
  });
455
481
 
@@ -529,6 +555,7 @@ export type Three$Outbound = {
529
555
  credential_pricing_ids?: Array<number> | null | undefined;
530
556
  invoice_type?: string | undefined;
531
557
  promo?: string | undefined;
558
+ use_credits: boolean;
532
559
  };
533
560
 
534
561
  /** @internal */
@@ -543,11 +570,13 @@ export const Three$outboundSchema: z.ZodType<
543
570
  credentialPricingIds: z.nullable(z.array(z.number().int())).optional(),
544
571
  invoiceType: CreateInvoiceRequestBodyInvoiceType$outboundSchema.optional(),
545
572
  promo: z.string().optional(),
573
+ useCredits: z.boolean().default(false),
546
574
  }).transform((v) => {
547
575
  return remap$(v, {
548
576
  facilityId: "facility_id",
549
577
  credentialPricingIds: "credential_pricing_ids",
550
578
  invoiceType: "invoice_type",
579
+ useCredits: "use_credits",
551
580
  });
552
581
  });
553
582
 
@@ -622,6 +651,7 @@ export type CreateInvoiceRequestBody2$Outbound = {
622
651
  credential_pricing_ids?: Array<number> | null | undefined;
623
652
  invoice_type?: string | undefined;
624
653
  promo?: string | undefined;
654
+ use_credits: boolean;
625
655
  };
626
656
 
627
657
  /** @internal */
@@ -635,11 +665,13 @@ export const CreateInvoiceRequestBody2$outboundSchema: z.ZodType<
635
665
  credentialPricingIds: z.nullable(z.array(z.number().int())).optional(),
636
666
  invoiceType: RequestBodyInvoiceType$outboundSchema.optional(),
637
667
  promo: z.string().optional(),
668
+ useCredits: z.boolean().default(false),
638
669
  }).transform((v) => {
639
670
  return remap$(v, {
640
671
  companyId: "company_id",
641
672
  credentialPricingIds: "credential_pricing_ids",
642
673
  invoiceType: "invoice_type",
674
+ useCredits: "use_credits",
643
675
  });
644
676
  });
645
677
 
@@ -713,6 +745,7 @@ export type RequestBody1$Outbound = {
713
745
  credential_pricing_ids?: Array<number> | null | undefined;
714
746
  invoice_type?: string | undefined;
715
747
  promo?: string | undefined;
748
+ use_credits: boolean;
716
749
  };
717
750
 
718
751
  /** @internal */
@@ -726,11 +759,13 @@ export const RequestBody1$outboundSchema: z.ZodType<
726
759
  credentialPricingIds: z.nullable(z.array(z.number().int())).optional(),
727
760
  invoiceType: InvoiceType$outboundSchema.optional(),
728
761
  promo: z.string().optional(),
762
+ useCredits: z.boolean().default(false),
729
763
  }).transform((v) => {
730
764
  return remap$(v, {
731
765
  vendorId: "vendor_id",
732
766
  credentialPricingIds: "credential_pricing_ids",
733
767
  invoiceType: "invoice_type",
768
+ useCredits: "use_credits",
734
769
  });
735
770
  });
736
771
 
@@ -33,13 +33,13 @@ export function smartUnion<
33
33
  > {
34
34
  return z.unknown().transform((input, ctx) => {
35
35
  const candidates: Candidate[] = [];
36
- const errors: z.ZodIssue[][] = options.map(() => []);
36
+ const errors: z.ZodIssue[][] = [];
37
37
 
38
38
  const parentUnrecognizedCtr = startCountingUnrecognized();
39
39
  const parentZeroDefaultCtr = startCountingDefaultToZeroValue();
40
40
 
41
41
  // Filter out invalid options
42
- for (const [i, option] of options.entries()) {
42
+ for (const option of options) {
43
43
  const unrecognizedCtr = startCountingUnrecognized();
44
44
  const zeroDefaultCtr = startCountingDefaultToZeroValue();
45
45
  const result = option.safeParse(input);
@@ -54,7 +54,7 @@ export function smartUnion<
54
54
  });
55
55
  continue;
56
56
  }
57
- errors[i]!.push(...result.error.issues);
57
+ errors.push(result.error.issues);
58
58
  }
59
59
 
60
60
  // No valid options