@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.
- package/dist/commonjs/__tests__/doAdmin.test.js +26 -0
- package/dist/commonjs/__tests__/doAdmin.test.js.map +1 -1
- package/dist/commonjs/__tests__/vendors.test.js +1 -1
- package/dist/commonjs/__tests__/zoneDevicesCreate.test.js +19 -1
- package/dist/commonjs/__tests__/zoneDevicesCreate.test.js.map +1 -1
- package/dist/commonjs/__tests__/zoneDevicesList.test.js +13 -1
- package/dist/commonjs/__tests__/zoneDevicesList.test.js.map +1 -1
- package/dist/commonjs/__tests__/zones.test.js +31 -4
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/admin-funcs/doAdmin.d.ts +3 -1
- package/dist/commonjs/admin-funcs/doAdmin.d.ts.map +1 -1
- package/dist/commonjs/admin-funcs/doAdmin.js +11 -3
- package/dist/commonjs/admin-funcs/doAdmin.js.map +1 -1
- package/dist/commonjs/admin-funcs/lookupsAddressAutocomplete.d.ts +4 -0
- package/dist/commonjs/admin-funcs/lookupsAddressAutocomplete.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/lookupsAddressAutocomplete.js +17 -0
- package/dist/commonjs/admin-funcs/lookupsAddressAutocomplete.js.map +1 -0
- package/dist/commonjs/admin-funcs/lookupsAddressPlace.d.ts +4 -0
- package/dist/commonjs/admin-funcs/lookupsAddressPlace.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/lookupsAddressPlace.js +16 -0
- package/dist/commonjs/admin-funcs/lookupsAddressPlace.js.map +1 -0
- package/dist/commonjs/admin-funcs/lookupsAddressValidation.d.ts +13 -0
- package/dist/commonjs/admin-funcs/lookupsAddressValidation.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/lookupsAddressValidation.js +10 -0
- package/dist/commonjs/admin-funcs/lookupsAddressValidation.js.map +1 -0
- package/dist/commonjs/admin-funcs/networksCreate.d.ts +4 -0
- package/dist/commonjs/admin-funcs/networksCreate.d.ts.map +1 -1
- package/dist/commonjs/admin-funcs/networksCreate.js.map +1 -1
- package/dist/commonjs/admin-funcs/vendorCredentialCreateFormQuote.d.ts +18 -1
- package/dist/commonjs/admin-funcs/vendorCredentialCreateFormQuote.d.ts.map +1 -1
- package/dist/commonjs/admin-funcs/vendorCredentialCreateFormQuote.js +18 -2
- package/dist/commonjs/admin-funcs/vendorCredentialCreateFormQuote.js.map +1 -1
- package/dist/commonjs/admin-funcs/vendorCredentialGetFormLineItems.d.ts +5 -1
- package/dist/commonjs/admin-funcs/vendorCredentialGetFormLineItems.d.ts.map +1 -1
- package/dist/commonjs/admin-funcs/vendorCredentialGetFormLineItems.js +5 -2
- package/dist/commonjs/admin-funcs/vendorCredentialGetFormLineItems.js.map +1 -1
- package/dist/commonjs/admin-funcs/zoneDevicesDelete.d.ts +3 -0
- package/dist/commonjs/admin-funcs/zoneDevicesDelete.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/zoneDevicesDelete.js +11 -0
- package/dist/commonjs/admin-funcs/zoneDevicesDelete.js.map +1 -0
- package/dist/commonjs/admin-funcs/zoneDevicesList.d.ts +1 -0
- package/dist/commonjs/admin-funcs/zoneDevicesList.d.ts.map +1 -1
- package/dist/commonjs/admin-funcs/zoneDevicesList.js +3 -0
- package/dist/commonjs/admin-funcs/zoneDevicesList.js.map +1 -1
- package/dist/commonjs/admin-funcs/zoneDevicesProvisioning.d.ts +3 -0
- package/dist/commonjs/admin-funcs/zoneDevicesProvisioning.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/zoneDevicesProvisioning.js +15 -0
- package/dist/commonjs/admin-funcs/zoneDevicesProvisioning.js.map +1 -0
- package/dist/commonjs/admin-funcs/zoneDevicesUpdate.d.ts +10 -0
- package/dist/commonjs/admin-funcs/zoneDevicesUpdate.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/zoneDevicesUpdate.js +14 -0
- package/dist/commonjs/admin-funcs/zoneDevicesUpdate.js.map +1 -0
- package/dist/commonjs/apps/components.d.ts.map +1 -1
- package/dist/commonjs/apps/components.js +5 -0
- package/dist/commonjs/apps/components.js.map +1 -1
- package/dist/commonjs/apps/surfaces.js +2 -2
- package/dist/commonjs/apps/surfaces.js.map +1 -1
- package/dist/commonjs/index.extras.d.ts +14 -0
- package/dist/commonjs/index.extras.d.ts.map +1 -1
- package/dist/commonjs/index.extras.js +14 -0
- package/dist/commonjs/index.extras.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/models/operations/createinvoice.d.ts +25 -0
- package/dist/commonjs/models/operations/createinvoice.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createinvoice.js +10 -0
- package/dist/commonjs/models/operations/createinvoice.js.map +1 -1
- package/dist/commonjs/types/smartUnion.js +3 -3
- package/dist/commonjs/types/smartUnion.js.map +1 -1
- package/dist/esm/__tests__/doAdmin.test.js +27 -1
- package/dist/esm/__tests__/doAdmin.test.js.map +1 -1
- package/dist/esm/__tests__/vendors.test.js +1 -1
- package/dist/esm/__tests__/zoneDevicesCreate.test.js +19 -1
- package/dist/esm/__tests__/zoneDevicesCreate.test.js.map +1 -1
- package/dist/esm/__tests__/zoneDevicesList.test.js +13 -1
- package/dist/esm/__tests__/zoneDevicesList.test.js.map +1 -1
- package/dist/esm/__tests__/zones.test.js +31 -4
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/admin-funcs/doAdmin.d.ts +3 -1
- package/dist/esm/admin-funcs/doAdmin.d.ts.map +1 -1
- package/dist/esm/admin-funcs/doAdmin.js +10 -3
- package/dist/esm/admin-funcs/doAdmin.js.map +1 -1
- package/dist/esm/admin-funcs/lookupsAddressAutocomplete.d.ts +4 -0
- package/dist/esm/admin-funcs/lookupsAddressAutocomplete.d.ts.map +1 -0
- package/dist/esm/admin-funcs/lookupsAddressAutocomplete.js +14 -0
- package/dist/esm/admin-funcs/lookupsAddressAutocomplete.js.map +1 -0
- package/dist/esm/admin-funcs/lookupsAddressPlace.d.ts +4 -0
- package/dist/esm/admin-funcs/lookupsAddressPlace.d.ts.map +1 -0
- package/dist/esm/admin-funcs/lookupsAddressPlace.js +13 -0
- package/dist/esm/admin-funcs/lookupsAddressPlace.js.map +1 -0
- package/dist/esm/admin-funcs/lookupsAddressValidation.d.ts +13 -0
- package/dist/esm/admin-funcs/lookupsAddressValidation.d.ts.map +1 -0
- package/dist/esm/admin-funcs/lookupsAddressValidation.js +7 -0
- package/dist/esm/admin-funcs/lookupsAddressValidation.js.map +1 -0
- package/dist/esm/admin-funcs/networksCreate.d.ts +4 -0
- package/dist/esm/admin-funcs/networksCreate.d.ts.map +1 -1
- package/dist/esm/admin-funcs/networksCreate.js.map +1 -1
- package/dist/esm/admin-funcs/vendorCredentialCreateFormQuote.d.ts +18 -1
- package/dist/esm/admin-funcs/vendorCredentialCreateFormQuote.d.ts.map +1 -1
- package/dist/esm/admin-funcs/vendorCredentialCreateFormQuote.js +18 -2
- package/dist/esm/admin-funcs/vendorCredentialCreateFormQuote.js.map +1 -1
- package/dist/esm/admin-funcs/vendorCredentialGetFormLineItems.d.ts +5 -1
- package/dist/esm/admin-funcs/vendorCredentialGetFormLineItems.d.ts.map +1 -1
- package/dist/esm/admin-funcs/vendorCredentialGetFormLineItems.js +5 -2
- package/dist/esm/admin-funcs/vendorCredentialGetFormLineItems.js.map +1 -1
- package/dist/esm/admin-funcs/zoneDevicesDelete.d.ts +3 -0
- package/dist/esm/admin-funcs/zoneDevicesDelete.d.ts.map +1 -0
- package/dist/esm/admin-funcs/zoneDevicesDelete.js +8 -0
- package/dist/esm/admin-funcs/zoneDevicesDelete.js.map +1 -0
- package/dist/esm/admin-funcs/zoneDevicesList.d.ts +1 -0
- package/dist/esm/admin-funcs/zoneDevicesList.d.ts.map +1 -1
- package/dist/esm/admin-funcs/zoneDevicesList.js +3 -0
- package/dist/esm/admin-funcs/zoneDevicesList.js.map +1 -1
- package/dist/esm/admin-funcs/zoneDevicesProvisioning.d.ts +3 -0
- package/dist/esm/admin-funcs/zoneDevicesProvisioning.d.ts.map +1 -0
- package/dist/esm/admin-funcs/zoneDevicesProvisioning.js +12 -0
- package/dist/esm/admin-funcs/zoneDevicesProvisioning.js.map +1 -0
- package/dist/esm/admin-funcs/zoneDevicesUpdate.d.ts +10 -0
- package/dist/esm/admin-funcs/zoneDevicesUpdate.d.ts.map +1 -0
- package/dist/esm/admin-funcs/zoneDevicesUpdate.js +11 -0
- package/dist/esm/admin-funcs/zoneDevicesUpdate.js.map +1 -0
- package/dist/esm/apps/components.d.ts.map +1 -1
- package/dist/esm/apps/components.js +5 -0
- package/dist/esm/apps/components.js.map +1 -1
- package/dist/esm/apps/surfaces.js +2 -2
- package/dist/esm/apps/surfaces.js.map +1 -1
- package/dist/esm/index.extras.d.ts +14 -0
- package/dist/esm/index.extras.d.ts.map +1 -1
- package/dist/esm/index.extras.js +14 -0
- package/dist/esm/index.extras.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/models/operations/createinvoice.d.ts +25 -0
- package/dist/esm/models/operations/createinvoice.d.ts.map +1 -1
- package/dist/esm/models/operations/createinvoice.js +10 -0
- package/dist/esm/models/operations/createinvoice.js.map +1 -1
- package/dist/esm/types/smartUnion.js +3 -3
- package/dist/esm/types/smartUnion.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/doAdmin.test.ts +35 -0
- package/src/__tests__/vendors.test.ts +1 -1
- package/src/__tests__/zoneDevicesCreate.test.ts +25 -1
- package/src/__tests__/zoneDevicesList.test.ts +15 -1
- package/src/__tests__/zones.test.ts +31 -4
- package/src/admin-funcs/doAdmin.ts +20 -3
- package/src/admin-funcs/lookupsAddressAutocomplete.ts +23 -0
- package/src/admin-funcs/lookupsAddressPlace.ts +20 -0
- package/src/admin-funcs/lookupsAddressValidation.ts +21 -0
- package/src/admin-funcs/networksCreate.ts +5 -0
- package/src/admin-funcs/vendorCredentialCreateFormQuote.ts +20 -1
- package/src/admin-funcs/vendorCredentialGetFormLineItems.ts +5 -0
- package/src/admin-funcs/zoneDevicesDelete.ts +8 -0
- package/src/admin-funcs/zoneDevicesList.ts +4 -0
- package/src/admin-funcs/zoneDevicesProvisioning.ts +12 -0
- package/src/admin-funcs/zoneDevicesUpdate.ts +21 -0
- package/src/apps/components.ts +5 -0
- package/src/apps/surfaces.ts +2 -2
- package/src/index.extras.ts +15 -0
- package/src/lib/config.ts +3 -3
- package/src/models/operations/createinvoice.ts +35 -0
- 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
|
|
package/src/types/smartUnion.ts
CHANGED
|
@@ -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[][] =
|
|
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
|
|
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
|
|
57
|
+
errors.push(result.error.issues);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
// No valid options
|