@moovio/sdk 0.21.15 → 0.21.17
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/README.md +44 -46
- package/bin/mcp-server.js +302 -289
- package/bin/mcp-server.js.map +50 -47
- package/examples/package-lock.json +1 -1
- package/funcs/imagesUpdate.d.ts +1 -2
- package/funcs/imagesUpdate.d.ts.map +1 -1
- package/funcs/imagesUpdate.js +12 -13
- package/funcs/imagesUpdate.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/encodings.d.ts.map +1 -1
- package/lib/encodings.js +3 -1
- package/lib/encodings.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/mcp-server/tools/accountsUpdate.js +1 -1
- package/mcp-server/tools/applePayUpdateMerchantDomains.js +3 -3
- package/mcp-server/tools/brandingUpdate.js +1 -1
- package/mcp-server/tools/cardIssuingUpdate.js +1 -1
- package/mcp-server/tools/cardsUpdate.js +6 -6
- package/mcp-server/tools/imagesUpdate.d.ts.map +1 -1
- package/mcp-server/tools/imagesUpdate.js +1 -2
- package/mcp-server/tools/imagesUpdate.js.map +1 -1
- package/mcp-server/tools/paymentLinksUpdate.js +1 -1
- package/mcp-server/tools/representativesUpdate.js +2 -2
- package/mcp-server/tools/supportUpdateTicket.js +1 -1
- package/mcp-server/tools/sweepsUpdateConfig.js +1 -1
- package/mcp-server/tools/transfersUpdate.js +3 -3
- package/mcp-server/tools/walletsUpdate.js +1 -1
- package/models/components/createevidencefilemultipart.d.ts +1 -1
- package/models/components/createpaymentlink.d.ts +3 -5
- package/models/components/createpaymentlink.d.ts.map +1 -1
- package/models/components/createpaymentlink.js +3 -3
- package/models/components/createpaymentlink.js.map +1 -1
- package/models/components/createpaymentlinklineitem.d.ts +50 -0
- package/models/components/createpaymentlinklineitem.d.ts.map +1 -0
- package/models/components/createpaymentlinklineitem.js +70 -0
- package/models/components/createpaymentlinklineitem.js.map +1 -0
- package/models/components/createpaymentlinklineitemoption.d.ts +44 -0
- package/models/components/createpaymentlinklineitemoption.d.ts.map +1 -0
- package/models/components/createpaymentlinklineitemoption.js +67 -0
- package/models/components/createpaymentlinklineitemoption.js.map +1 -0
- package/models/components/createpaymentlinklineitemoptionvalidationerror.d.ts +24 -0
- package/models/components/createpaymentlinklineitemoptionvalidationerror.d.ts.map +1 -0
- package/models/components/{paymentlinklineitemoptionvalidationerror.js → createpaymentlinklineitemoptionvalidationerror.js} +10 -10
- package/models/components/createpaymentlinklineitemoptionvalidationerror.js.map +1 -0
- package/models/components/createpaymentlinklineitems.d.ts +27 -0
- package/models/components/createpaymentlinklineitems.d.ts.map +1 -0
- package/models/components/{paymentlinklineitemsupdate.js → createpaymentlinklineitems.js} +13 -13
- package/models/components/createpaymentlinklineitems.js.map +1 -0
- package/models/components/createpaymentlinklineitemsupdate.d.ts +27 -0
- package/models/components/createpaymentlinklineitemsupdate.d.ts.map +1 -0
- package/models/components/{paymentlinklineitemsvalidationerror.js → createpaymentlinklineitemsupdate.js} +13 -13
- package/models/components/createpaymentlinklineitemsupdate.js.map +1 -0
- package/models/components/createpaymentlinklineitemsvalidationerror.d.ts +22 -0
- package/models/components/createpaymentlinklineitemsvalidationerror.d.ts.map +1 -0
- package/models/components/createpaymentlinklineitemsvalidationerror.js +61 -0
- package/models/components/createpaymentlinklineitemsvalidationerror.js.map +1 -0
- package/models/components/createpaymentlinklineitemvalidationerror.d.ts +31 -0
- package/models/components/createpaymentlinklineitemvalidationerror.d.ts.map +1 -0
- package/models/components/{paymentlinklineitemvalidationerror.js → createpaymentlinklineitemvalidationerror.js} +13 -15
- package/models/components/createpaymentlinklineitemvalidationerror.js.map +1 -0
- package/models/components/fileuploadrequestmultipart.d.ts +1 -4
- package/models/components/fileuploadrequestmultipart.d.ts.map +1 -1
- package/models/components/fileuploadrequestmultipart.js.map +1 -1
- package/models/components/imageuploadrequestmultipart.d.ts +3 -3
- package/models/components/imageuploadrequestmultipart.d.ts.map +1 -1
- package/models/components/index.d.ts +8 -5
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +8 -5
- package/models/components/index.js.map +1 -1
- package/models/components/invoicepayment.d.ts.map +1 -1
- package/models/components/invoicepayment.js +4 -12
- package/models/components/invoicepayment.js.map +1 -1
- package/models/components/patchsweepconfig.d.ts +6 -60
- package/models/components/patchsweepconfig.d.ts.map +1 -1
- package/models/components/patchsweepconfig.js +7 -79
- package/models/components/patchsweepconfig.js.map +1 -1
- package/models/components/paymentlinklineitem.d.ts +6 -0
- package/models/components/paymentlinklineitem.d.ts.map +1 -1
- package/models/components/paymentlinklineitem.js +3 -0
- package/models/components/paymentlinklineitem.js.map +1 -1
- package/models/components/paymentlinklineitemimagemetadata.d.ts +35 -0
- package/models/components/paymentlinklineitemimagemetadata.d.ts.map +1 -0
- package/models/components/paymentlinklineitemimagemetadata.js +64 -0
- package/models/components/paymentlinklineitemimagemetadata.js.map +1 -0
- package/models/components/paymentlinklineitemoption.d.ts +6 -0
- package/models/components/paymentlinklineitemoption.d.ts.map +1 -1
- package/models/components/paymentlinklineitemoption.js +3 -0
- package/models/components/paymentlinklineitemoption.js.map +1 -1
- package/models/components/paymentmethod.d.ts.map +1 -1
- package/models/components/paymentmethod.js +24 -34
- package/models/components/paymentmethod.js.map +1 -1
- package/models/components/updatepaymentlink.d.ts +3 -3
- package/models/components/updatepaymentlink.d.ts.map +1 -1
- package/models/components/updatepaymentlink.js +3 -3
- package/models/components/updatepaymentlink.js.map +1 -1
- package/models/components/updaterepresentative.d.ts +2 -20
- package/models/components/updaterepresentative.d.ts.map +1 -1
- package/models/components/updaterepresentative.js +3 -32
- package/models/components/updaterepresentative.js.map +1 -1
- package/models/errors/createpaymentlinkerror.d.ts +3 -3
- package/models/errors/createpaymentlinkerror.d.ts.map +1 -1
- package/models/errors/createpaymentlinkerror.js +3 -3
- package/models/errors/createpaymentlinkerror.js.map +1 -1
- package/models/errors/updatepaymentlinkerror.d.ts +3 -3
- package/models/errors/updatepaymentlinkerror.d.ts.map +1 -1
- package/models/errors/updatepaymentlinkerror.js +3 -3
- package/models/errors/updatepaymentlinkerror.js.map +1 -1
- package/models/operations/createpaymentlink.d.ts +3 -0
- package/models/operations/createpaymentlink.d.ts.map +1 -1
- package/models/operations/createpaymentlink.js.map +1 -1
- package/models/operations/disablepaymentlink.d.ts +3 -0
- package/models/operations/disablepaymentlink.d.ts.map +1 -1
- package/models/operations/disablepaymentlink.js.map +1 -1
- package/models/operations/getpaymentlink.d.ts +3 -0
- package/models/operations/getpaymentlink.d.ts.map +1 -1
- package/models/operations/getpaymentlink.js.map +1 -1
- package/models/operations/getpaymentlinkqrcode.d.ts +3 -0
- package/models/operations/getpaymentlinkqrcode.d.ts.map +1 -1
- package/models/operations/getpaymentlinkqrcode.js.map +1 -1
- package/models/operations/listpaymentlinks.d.ts +3 -0
- package/models/operations/listpaymentlinks.d.ts.map +1 -1
- package/models/operations/listpaymentlinks.js.map +1 -1
- package/models/operations/updateimage.d.ts +2 -2
- package/models/operations/updateimage.js +4 -4
- package/models/operations/updatepaymentlink.d.ts +3 -0
- package/models/operations/updatepaymentlink.d.ts.map +1 -1
- package/models/operations/updatepaymentlink.js.map +1 -1
- package/package.json +1 -1
- package/sdk/images.d.ts +1 -2
- package/sdk/images.d.ts.map +1 -1
- package/sdk/images.js +1 -2
- package/sdk/images.js.map +1 -1
- package/src/funcs/imagesUpdate.ts +12 -13
- package/src/lib/config.ts +3 -3
- package/src/lib/encodings.ts +4 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/mcp-server/tools/accountsUpdate.ts +1 -1
- package/src/mcp-server/tools/applePayUpdateMerchantDomains.ts +3 -3
- package/src/mcp-server/tools/brandingUpdate.ts +1 -1
- package/src/mcp-server/tools/cardIssuingUpdate.ts +1 -1
- package/src/mcp-server/tools/cardsUpdate.ts +6 -6
- package/src/mcp-server/tools/imagesUpdate.ts +1 -2
- package/src/mcp-server/tools/paymentLinksUpdate.ts +1 -1
- package/src/mcp-server/tools/representativesUpdate.ts +2 -2
- package/src/mcp-server/tools/supportUpdateTicket.ts +1 -1
- package/src/mcp-server/tools/sweepsUpdateConfig.ts +1 -1
- package/src/mcp-server/tools/transfersUpdate.ts +3 -3
- package/src/mcp-server/tools/walletsUpdate.ts +1 -1
- package/src/models/components/createevidencefilemultipart.ts +1 -1
- package/src/models/components/createpaymentlink.ts +10 -12
- package/src/models/components/createpaymentlinklineitem.ts +104 -0
- package/src/models/components/createpaymentlinklineitemoption.ts +93 -0
- package/src/models/components/createpaymentlinklineitemoptionvalidationerror.ts +80 -0
- package/src/models/components/createpaymentlinklineitems.ts +66 -0
- package/src/models/components/createpaymentlinklineitemsupdate.ts +68 -0
- package/src/models/components/createpaymentlinklineitemsvalidationerror.ts +71 -0
- package/src/models/components/createpaymentlinklineitemvalidationerror.ts +96 -0
- package/src/models/components/fileuploadrequestmultipart.ts +1 -4
- package/src/models/components/imageuploadrequestmultipart.ts +3 -3
- package/src/models/components/index.ts +8 -5
- package/src/models/components/invoicepayment.ts +4 -12
- package/src/models/components/patchsweepconfig.ts +12 -252
- package/src/models/components/paymentlinklineitem.ts +13 -0
- package/src/models/components/paymentlinklineitemimagemetadata.ts +77 -0
- package/src/models/components/paymentlinklineitemoption.ts +13 -0
- package/src/models/components/paymentmethod.ts +24 -70
- package/src/models/components/updatepaymentlink.ts +10 -10
- package/src/models/components/updaterepresentative.ts +4 -59
- package/src/models/errors/createpaymentlinkerror.ts +6 -6
- package/src/models/errors/updatepaymentlinkerror.ts +6 -6
- package/src/models/operations/createpaymentlink.ts +3 -0
- package/src/models/operations/disablepaymentlink.ts +3 -0
- package/src/models/operations/getpaymentlink.ts +3 -0
- package/src/models/operations/getpaymentlinkqrcode.ts +3 -0
- package/src/models/operations/listpaymentlinks.ts +3 -0
- package/src/models/operations/updateimage.ts +8 -8
- package/src/models/operations/updatepaymentlink.ts +3 -0
- package/src/sdk/images.ts +1 -2
- package/src/types/enums.ts +1 -21
- package/src/types/index.ts +2 -1
- package/src/types/unrecognized.ts +27 -0
- package/types/enums.d.ts +1 -8
- package/types/enums.d.ts.map +1 -1
- package/types/enums.js +3 -21
- package/types/enums.js.map +1 -1
- package/types/index.d.ts +2 -1
- package/types/index.d.ts.map +1 -1
- package/types/index.js +15 -0
- package/types/index.js.map +1 -1
- package/types/unrecognized.d.ts +10 -0
- package/types/unrecognized.d.ts.map +1 -0
- package/types/unrecognized.js +26 -0
- package/types/unrecognized.js.map +1 -0
- package/models/components/imageupdaterequestmultipart.d.ts +0 -67
- package/models/components/imageupdaterequestmultipart.d.ts.map +0 -1
- package/models/components/imageupdaterequestmultipart.js +0 -105
- package/models/components/imageupdaterequestmultipart.js.map +0 -1
- package/models/components/paymentlinklineitemoptionvalidationerror.d.ts +0 -24
- package/models/components/paymentlinklineitemoptionvalidationerror.d.ts.map +0 -1
- package/models/components/paymentlinklineitemoptionvalidationerror.js.map +0 -1
- package/models/components/paymentlinklineitemsupdate.d.ts +0 -27
- package/models/components/paymentlinklineitemsupdate.d.ts.map +0 -1
- package/models/components/paymentlinklineitemsupdate.js.map +0 -1
- package/models/components/paymentlinklineitemsvalidationerror.d.ts +0 -22
- package/models/components/paymentlinklineitemsvalidationerror.d.ts.map +0 -1
- package/models/components/paymentlinklineitemsvalidationerror.js.map +0 -1
- package/models/components/paymentlinklineitemvalidationerror.d.ts +0 -31
- package/models/components/paymentlinklineitemvalidationerror.d.ts.map +0 -1
- package/models/components/paymentlinklineitemvalidationerror.js.map +0 -1
- package/src/models/components/imageupdaterequestmultipart.ts +0 -178
- package/src/models/components/paymentlinklineitemoptionvalidationerror.ts +0 -78
- package/src/models/components/paymentlinklineitemsupdate.ts +0 -66
- package/src/models/components/paymentlinklineitemsvalidationerror.ts +0 -62
- package/src/models/components/paymentlinklineitemvalidationerror.ts +0 -88
|
@@ -12,6 +12,12 @@ import {
|
|
|
12
12
|
AmountDecimal$Outbound,
|
|
13
13
|
AmountDecimal$outboundSchema,
|
|
14
14
|
} from "./amountdecimal.js";
|
|
15
|
+
import {
|
|
16
|
+
PaymentLinkLineItemImageMetadata,
|
|
17
|
+
PaymentLinkLineItemImageMetadata$inboundSchema,
|
|
18
|
+
PaymentLinkLineItemImageMetadata$Outbound,
|
|
19
|
+
PaymentLinkLineItemImageMetadata$outboundSchema,
|
|
20
|
+
} from "./paymentlinklineitemimagemetadata.js";
|
|
15
21
|
|
|
16
22
|
/**
|
|
17
23
|
* Represents a modifier or option applied to a line item.
|
|
@@ -29,6 +35,10 @@ export type PaymentLinkLineItemOption = {
|
|
|
29
35
|
* Optional price modification applied by this option. Can be positive, negative, or zero.
|
|
30
36
|
*/
|
|
31
37
|
priceModifier?: AmountDecimal | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Optional list of images associated with this line item option.
|
|
40
|
+
*/
|
|
41
|
+
images?: Array<PaymentLinkLineItemImageMetadata> | undefined;
|
|
32
42
|
/**
|
|
33
43
|
* Optional group identifier to categorize related options (e.g., 'toppings').
|
|
34
44
|
*/
|
|
@@ -44,6 +54,7 @@ export const PaymentLinkLineItemOption$inboundSchema: z.ZodType<
|
|
|
44
54
|
name: z.string(),
|
|
45
55
|
quantity: z.number().int(),
|
|
46
56
|
priceModifier: AmountDecimal$inboundSchema.optional(),
|
|
57
|
+
images: z.array(PaymentLinkLineItemImageMetadata$inboundSchema).optional(),
|
|
47
58
|
group: z.string().optional(),
|
|
48
59
|
});
|
|
49
60
|
/** @internal */
|
|
@@ -51,6 +62,7 @@ export type PaymentLinkLineItemOption$Outbound = {
|
|
|
51
62
|
name: string;
|
|
52
63
|
quantity: number;
|
|
53
64
|
priceModifier?: AmountDecimal$Outbound | undefined;
|
|
65
|
+
images?: Array<PaymentLinkLineItemImageMetadata$Outbound> | undefined;
|
|
54
66
|
group?: string | undefined;
|
|
55
67
|
};
|
|
56
68
|
|
|
@@ -63,6 +75,7 @@ export const PaymentLinkLineItemOption$outboundSchema: z.ZodType<
|
|
|
63
75
|
name: z.string(),
|
|
64
76
|
quantity: z.number().int(),
|
|
65
77
|
priceModifier: AmountDecimal$outboundSchema.optional(),
|
|
78
|
+
images: z.array(PaymentLinkLineItemImageMetadata$outboundSchema).optional(),
|
|
66
79
|
group: z.string().optional(),
|
|
67
80
|
});
|
|
68
81
|
|
|
@@ -111,63 +111,40 @@ export const PaymentMethod$inboundSchema: z.ZodType<
|
|
|
111
111
|
unknown
|
|
112
112
|
> = z.union([
|
|
113
113
|
MoovWalletPaymentMethod$inboundSchema.and(
|
|
114
|
-
z.object({ paymentMethodType: z.literal("moov-wallet") })
|
|
115
|
-
v,
|
|
116
|
-
) => ({ paymentMethodType: v.paymentMethodType })),
|
|
114
|
+
z.object({ paymentMethodType: z.literal("moov-wallet") }),
|
|
117
115
|
),
|
|
118
116
|
AchDebitFundPaymentMethod$inboundSchema.and(
|
|
119
|
-
z.object({ paymentMethodType: z.literal("ach-debit-fund") })
|
|
120
|
-
v,
|
|
121
|
-
) => ({ paymentMethodType: v.paymentMethodType })),
|
|
117
|
+
z.object({ paymentMethodType: z.literal("ach-debit-fund") }),
|
|
122
118
|
),
|
|
123
119
|
AchDebitCollectPaymentMethod$inboundSchema.and(
|
|
124
|
-
z.object({ paymentMethodType: z.literal("ach-debit-collect") })
|
|
125
|
-
v,
|
|
126
|
-
) => ({ paymentMethodType: v.paymentMethodType })),
|
|
120
|
+
z.object({ paymentMethodType: z.literal("ach-debit-collect") }),
|
|
127
121
|
),
|
|
128
122
|
AchCreditStandardPaymentMethod$inboundSchema.and(
|
|
129
|
-
z.object({ paymentMethodType: z.literal("ach-credit-standard") })
|
|
130
|
-
(v) => ({ paymentMethodType: v.paymentMethodType })
|
|
131
|
-
),
|
|
123
|
+
z.object({ paymentMethodType: z.literal("ach-credit-standard") }),
|
|
132
124
|
),
|
|
133
125
|
AchCreditSameDayPaymentMethod$inboundSchema.and(
|
|
134
|
-
z.object({ paymentMethodType: z.literal("ach-credit-same-day") })
|
|
135
|
-
(v) => ({ paymentMethodType: v.paymentMethodType })
|
|
136
|
-
),
|
|
126
|
+
z.object({ paymentMethodType: z.literal("ach-credit-same-day") }),
|
|
137
127
|
),
|
|
138
128
|
RtpCreditPaymentMethod$inboundSchema.and(
|
|
139
|
-
z.object({ paymentMethodType: z.literal("rtp-credit") })
|
|
140
|
-
paymentMethodType: v.paymentMethodType,
|
|
141
|
-
})),
|
|
129
|
+
z.object({ paymentMethodType: z.literal("rtp-credit") }),
|
|
142
130
|
),
|
|
143
131
|
CardPaymentPaymentMethod$inboundSchema.and(
|
|
144
|
-
z.object({ paymentMethodType: z.literal("card-payment") })
|
|
145
|
-
v,
|
|
146
|
-
) => ({ paymentMethodType: v.paymentMethodType })),
|
|
132
|
+
z.object({ paymentMethodType: z.literal("card-payment") }),
|
|
147
133
|
),
|
|
148
134
|
PushToCardPaymentMethod$inboundSchema.and(
|
|
149
|
-
z.object({ paymentMethodType: z.literal("push-to-card") })
|
|
150
|
-
v,
|
|
151
|
-
) => ({ paymentMethodType: v.paymentMethodType })),
|
|
135
|
+
z.object({ paymentMethodType: z.literal("push-to-card") }),
|
|
152
136
|
),
|
|
153
137
|
PullFromCardPaymentMethod$inboundSchema.and(
|
|
154
|
-
z.object({ paymentMethodType: z.literal("pull-from-card") })
|
|
155
|
-
v,
|
|
156
|
-
) => ({ paymentMethodType: v.paymentMethodType })),
|
|
138
|
+
z.object({ paymentMethodType: z.literal("pull-from-card") }),
|
|
157
139
|
),
|
|
158
140
|
ApplePayPaymentMethod$inboundSchema.and(
|
|
159
|
-
z.object({ paymentMethodType: z.literal("apple-pay") })
|
|
160
|
-
paymentMethodType: v.paymentMethodType,
|
|
161
|
-
})),
|
|
141
|
+
z.object({ paymentMethodType: z.literal("apple-pay") }),
|
|
162
142
|
),
|
|
163
143
|
InstantBankCreditPaymentMethod$inboundSchema.and(
|
|
164
|
-
z.object({ paymentMethodType: z.literal("instant-bank-credit") })
|
|
165
|
-
(v) => ({ paymentMethodType: v.paymentMethodType })
|
|
166
|
-
),
|
|
144
|
+
z.object({ paymentMethodType: z.literal("instant-bank-credit") }),
|
|
167
145
|
),
|
|
168
146
|
CardPresentPaymentPaymentMethod$inboundSchema.and(
|
|
169
|
-
z.object({ paymentMethodType: z.literal("card-present-payment") })
|
|
170
|
-
.transform((v) => ({ paymentMethodType: v.paymentMethodType })),
|
|
147
|
+
z.object({ paymentMethodType: z.literal("card-present-payment") }),
|
|
171
148
|
),
|
|
172
149
|
]);
|
|
173
150
|
/** @internal */
|
|
@@ -206,63 +183,40 @@ export const PaymentMethod$outboundSchema: z.ZodType<
|
|
|
206
183
|
PaymentMethod
|
|
207
184
|
> = z.union([
|
|
208
185
|
MoovWalletPaymentMethod$outboundSchema.and(
|
|
209
|
-
z.object({ paymentMethodType: z.literal("moov-wallet") })
|
|
210
|
-
v,
|
|
211
|
-
) => ({ paymentMethodType: v.paymentMethodType })),
|
|
186
|
+
z.object({ paymentMethodType: z.literal("moov-wallet") }),
|
|
212
187
|
),
|
|
213
188
|
AchDebitFundPaymentMethod$outboundSchema.and(
|
|
214
|
-
z.object({ paymentMethodType: z.literal("ach-debit-fund") })
|
|
215
|
-
v,
|
|
216
|
-
) => ({ paymentMethodType: v.paymentMethodType })),
|
|
189
|
+
z.object({ paymentMethodType: z.literal("ach-debit-fund") }),
|
|
217
190
|
),
|
|
218
191
|
AchDebitCollectPaymentMethod$outboundSchema.and(
|
|
219
|
-
z.object({ paymentMethodType: z.literal("ach-debit-collect") })
|
|
220
|
-
v,
|
|
221
|
-
) => ({ paymentMethodType: v.paymentMethodType })),
|
|
192
|
+
z.object({ paymentMethodType: z.literal("ach-debit-collect") }),
|
|
222
193
|
),
|
|
223
194
|
AchCreditStandardPaymentMethod$outboundSchema.and(
|
|
224
|
-
z.object({ paymentMethodType: z.literal("ach-credit-standard") })
|
|
225
|
-
(v) => ({ paymentMethodType: v.paymentMethodType })
|
|
226
|
-
),
|
|
195
|
+
z.object({ paymentMethodType: z.literal("ach-credit-standard") }),
|
|
227
196
|
),
|
|
228
197
|
AchCreditSameDayPaymentMethod$outboundSchema.and(
|
|
229
|
-
z.object({ paymentMethodType: z.literal("ach-credit-same-day") })
|
|
230
|
-
(v) => ({ paymentMethodType: v.paymentMethodType })
|
|
231
|
-
),
|
|
198
|
+
z.object({ paymentMethodType: z.literal("ach-credit-same-day") }),
|
|
232
199
|
),
|
|
233
200
|
RtpCreditPaymentMethod$outboundSchema.and(
|
|
234
|
-
z.object({ paymentMethodType: z.literal("rtp-credit") })
|
|
235
|
-
paymentMethodType: v.paymentMethodType,
|
|
236
|
-
})),
|
|
201
|
+
z.object({ paymentMethodType: z.literal("rtp-credit") }),
|
|
237
202
|
),
|
|
238
203
|
CardPaymentPaymentMethod$outboundSchema.and(
|
|
239
|
-
z.object({ paymentMethodType: z.literal("card-payment") })
|
|
240
|
-
v,
|
|
241
|
-
) => ({ paymentMethodType: v.paymentMethodType })),
|
|
204
|
+
z.object({ paymentMethodType: z.literal("card-payment") }),
|
|
242
205
|
),
|
|
243
206
|
PushToCardPaymentMethod$outboundSchema.and(
|
|
244
|
-
z.object({ paymentMethodType: z.literal("push-to-card") })
|
|
245
|
-
v,
|
|
246
|
-
) => ({ paymentMethodType: v.paymentMethodType })),
|
|
207
|
+
z.object({ paymentMethodType: z.literal("push-to-card") }),
|
|
247
208
|
),
|
|
248
209
|
PullFromCardPaymentMethod$outboundSchema.and(
|
|
249
|
-
z.object({ paymentMethodType: z.literal("pull-from-card") })
|
|
250
|
-
v,
|
|
251
|
-
) => ({ paymentMethodType: v.paymentMethodType })),
|
|
210
|
+
z.object({ paymentMethodType: z.literal("pull-from-card") }),
|
|
252
211
|
),
|
|
253
212
|
ApplePayPaymentMethod$outboundSchema.and(
|
|
254
|
-
z.object({ paymentMethodType: z.literal("apple-pay") })
|
|
255
|
-
paymentMethodType: v.paymentMethodType,
|
|
256
|
-
})),
|
|
213
|
+
z.object({ paymentMethodType: z.literal("apple-pay") }),
|
|
257
214
|
),
|
|
258
215
|
InstantBankCreditPaymentMethod$outboundSchema.and(
|
|
259
|
-
z.object({ paymentMethodType: z.literal("instant-bank-credit") })
|
|
260
|
-
(v) => ({ paymentMethodType: v.paymentMethodType })
|
|
261
|
-
),
|
|
216
|
+
z.object({ paymentMethodType: z.literal("instant-bank-credit") }),
|
|
262
217
|
),
|
|
263
218
|
CardPresentPaymentPaymentMethod$outboundSchema.and(
|
|
264
|
-
z.object({ paymentMethodType: z.literal("card-present-payment") })
|
|
265
|
-
.transform((v) => ({ paymentMethodType: v.paymentMethodType })),
|
|
219
|
+
z.object({ paymentMethodType: z.literal("card-present-payment") }),
|
|
266
220
|
),
|
|
267
221
|
]);
|
|
268
222
|
|
|
@@ -12,6 +12,12 @@ import {
|
|
|
12
12
|
AmountUpdate$Outbound,
|
|
13
13
|
AmountUpdate$outboundSchema,
|
|
14
14
|
} from "./amountupdate.js";
|
|
15
|
+
import {
|
|
16
|
+
CreatePaymentLinkLineItemsUpdate,
|
|
17
|
+
CreatePaymentLinkLineItemsUpdate$inboundSchema,
|
|
18
|
+
CreatePaymentLinkLineItemsUpdate$Outbound,
|
|
19
|
+
CreatePaymentLinkLineItemsUpdate$outboundSchema,
|
|
20
|
+
} from "./createpaymentlinklineitemsupdate.js";
|
|
15
21
|
import {
|
|
16
22
|
PaymentLinkCustomerOptions,
|
|
17
23
|
PaymentLinkCustomerOptions$inboundSchema,
|
|
@@ -24,12 +30,6 @@ import {
|
|
|
24
30
|
PaymentLinkDisplayOptionsUpdate$Outbound,
|
|
25
31
|
PaymentLinkDisplayOptionsUpdate$outboundSchema,
|
|
26
32
|
} from "./paymentlinkdisplayoptionsupdate.js";
|
|
27
|
-
import {
|
|
28
|
-
PaymentLinkLineItemsUpdate,
|
|
29
|
-
PaymentLinkLineItemsUpdate$inboundSchema,
|
|
30
|
-
PaymentLinkLineItemsUpdate$Outbound,
|
|
31
|
-
PaymentLinkLineItemsUpdate$outboundSchema,
|
|
32
|
-
} from "./paymentlinklineitemsupdate.js";
|
|
33
33
|
import {
|
|
34
34
|
PaymentLinkPaymentDetailsUpdate,
|
|
35
35
|
PaymentLinkPaymentDetailsUpdate$inboundSchema,
|
|
@@ -62,7 +62,7 @@ export type UpdatePaymentLink = {
|
|
|
62
62
|
* @remarks
|
|
63
63
|
* When line items are provided, their total plus sales tax must equal the payment link amount.
|
|
64
64
|
*/
|
|
65
|
-
lineItems?:
|
|
65
|
+
lineItems?: CreatePaymentLinkLineItemsUpdate | undefined;
|
|
66
66
|
};
|
|
67
67
|
|
|
68
68
|
/** @internal */
|
|
@@ -79,7 +79,7 @@ export const UpdatePaymentLink$inboundSchema: z.ZodType<
|
|
|
79
79
|
customer: PaymentLinkCustomerOptions$inboundSchema.optional(),
|
|
80
80
|
payment: PaymentLinkPaymentDetailsUpdate$inboundSchema.optional(),
|
|
81
81
|
payout: PaymentLinkPayoutDetailsUpdate$inboundSchema.optional(),
|
|
82
|
-
lineItems:
|
|
82
|
+
lineItems: CreatePaymentLinkLineItemsUpdate$inboundSchema.optional(),
|
|
83
83
|
});
|
|
84
84
|
/** @internal */
|
|
85
85
|
export type UpdatePaymentLink$Outbound = {
|
|
@@ -89,7 +89,7 @@ export type UpdatePaymentLink$Outbound = {
|
|
|
89
89
|
customer?: PaymentLinkCustomerOptions$Outbound | undefined;
|
|
90
90
|
payment?: PaymentLinkPaymentDetailsUpdate$Outbound | undefined;
|
|
91
91
|
payout?: PaymentLinkPayoutDetailsUpdate$Outbound | undefined;
|
|
92
|
-
lineItems?:
|
|
92
|
+
lineItems?: CreatePaymentLinkLineItemsUpdate$Outbound | undefined;
|
|
93
93
|
};
|
|
94
94
|
|
|
95
95
|
/** @internal */
|
|
@@ -104,7 +104,7 @@ export const UpdatePaymentLink$outboundSchema: z.ZodType<
|
|
|
104
104
|
customer: PaymentLinkCustomerOptions$outboundSchema.optional(),
|
|
105
105
|
payment: PaymentLinkPaymentDetailsUpdate$outboundSchema.optional(),
|
|
106
106
|
payout: PaymentLinkPayoutDetailsUpdate$outboundSchema.optional(),
|
|
107
|
-
lineItems:
|
|
107
|
+
lineItems: CreatePaymentLinkLineItemsUpdate$outboundSchema.optional(),
|
|
108
108
|
});
|
|
109
109
|
|
|
110
110
|
export function updatePaymentLinkToJSON(
|
|
@@ -18,10 +18,6 @@ export type Phone = {
|
|
|
18
18
|
countryCode?: string | undefined;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
export type Two = {};
|
|
22
|
-
|
|
23
|
-
export type Email = string | Two;
|
|
24
|
-
|
|
25
21
|
export type UpdateRepresentativeAddress = {
|
|
26
22
|
addressLine1?: string | undefined;
|
|
27
23
|
addressLine2?: string | undefined;
|
|
@@ -77,7 +73,7 @@ export type Responsibilities = {
|
|
|
77
73
|
export type UpdateRepresentative = {
|
|
78
74
|
name?: IndividualNameUpdate | undefined;
|
|
79
75
|
phone?: Phone | null | undefined;
|
|
80
|
-
email?: string |
|
|
76
|
+
email?: string | null | undefined;
|
|
81
77
|
address?: UpdateRepresentativeAddress | null | undefined;
|
|
82
78
|
birthDate?: UpdateRepresentativeBirthDate | null | undefined;
|
|
83
79
|
governmentID?: UpdateRepresentativeGovernmentID | null | undefined;
|
|
@@ -119,55 +115,6 @@ export function phoneFromJSON(
|
|
|
119
115
|
);
|
|
120
116
|
}
|
|
121
117
|
|
|
122
|
-
/** @internal */
|
|
123
|
-
export const Two$inboundSchema: z.ZodType<Two, z.ZodTypeDef, unknown> = z
|
|
124
|
-
.object({});
|
|
125
|
-
/** @internal */
|
|
126
|
-
export type Two$Outbound = {};
|
|
127
|
-
|
|
128
|
-
/** @internal */
|
|
129
|
-
export const Two$outboundSchema: z.ZodType<Two$Outbound, z.ZodTypeDef, Two> = z
|
|
130
|
-
.object({});
|
|
131
|
-
|
|
132
|
-
export function twoToJSON(two: Two): string {
|
|
133
|
-
return JSON.stringify(Two$outboundSchema.parse(two));
|
|
134
|
-
}
|
|
135
|
-
export function twoFromJSON(
|
|
136
|
-
jsonString: string,
|
|
137
|
-
): SafeParseResult<Two, SDKValidationError> {
|
|
138
|
-
return safeParse(
|
|
139
|
-
jsonString,
|
|
140
|
-
(x) => Two$inboundSchema.parse(JSON.parse(x)),
|
|
141
|
-
`Failed to parse 'Two' from JSON`,
|
|
142
|
-
);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/** @internal */
|
|
146
|
-
export const Email$inboundSchema: z.ZodType<Email, z.ZodTypeDef, unknown> = z
|
|
147
|
-
.union([z.string(), z.lazy(() => Two$inboundSchema)]);
|
|
148
|
-
/** @internal */
|
|
149
|
-
export type Email$Outbound = string | Two$Outbound;
|
|
150
|
-
|
|
151
|
-
/** @internal */
|
|
152
|
-
export const Email$outboundSchema: z.ZodType<
|
|
153
|
-
Email$Outbound,
|
|
154
|
-
z.ZodTypeDef,
|
|
155
|
-
Email
|
|
156
|
-
> = z.union([z.string(), z.lazy(() => Two$outboundSchema)]);
|
|
157
|
-
|
|
158
|
-
export function emailToJSON(email: Email): string {
|
|
159
|
-
return JSON.stringify(Email$outboundSchema.parse(email));
|
|
160
|
-
}
|
|
161
|
-
export function emailFromJSON(
|
|
162
|
-
jsonString: string,
|
|
163
|
-
): SafeParseResult<Email, SDKValidationError> {
|
|
164
|
-
return safeParse(
|
|
165
|
-
jsonString,
|
|
166
|
-
(x) => Email$inboundSchema.parse(JSON.parse(x)),
|
|
167
|
-
`Failed to parse 'Email' from JSON`,
|
|
168
|
-
);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
118
|
/** @internal */
|
|
172
119
|
export const UpdateRepresentativeAddress$inboundSchema: z.ZodType<
|
|
173
120
|
UpdateRepresentativeAddress,
|
|
@@ -455,8 +402,7 @@ export const UpdateRepresentative$inboundSchema: z.ZodType<
|
|
|
455
402
|
> = z.object({
|
|
456
403
|
name: IndividualNameUpdate$inboundSchema.optional(),
|
|
457
404
|
phone: z.nullable(z.lazy(() => Phone$inboundSchema)).optional(),
|
|
458
|
-
email: z.nullable(z.
|
|
459
|
-
.optional(),
|
|
405
|
+
email: z.nullable(z.string()).optional(),
|
|
460
406
|
address: z.nullable(z.lazy(() => UpdateRepresentativeAddress$inboundSchema))
|
|
461
407
|
.optional(),
|
|
462
408
|
birthDate: z.nullable(
|
|
@@ -472,7 +418,7 @@ export const UpdateRepresentative$inboundSchema: z.ZodType<
|
|
|
472
418
|
export type UpdateRepresentative$Outbound = {
|
|
473
419
|
name?: IndividualNameUpdate$Outbound | undefined;
|
|
474
420
|
phone?: Phone$Outbound | null | undefined;
|
|
475
|
-
email?: string |
|
|
421
|
+
email?: string | null | undefined;
|
|
476
422
|
address?: UpdateRepresentativeAddress$Outbound | null | undefined;
|
|
477
423
|
birthDate?: UpdateRepresentativeBirthDate$Outbound | null | undefined;
|
|
478
424
|
governmentID?: UpdateRepresentativeGovernmentID$Outbound | null | undefined;
|
|
@@ -487,8 +433,7 @@ export const UpdateRepresentative$outboundSchema: z.ZodType<
|
|
|
487
433
|
> = z.object({
|
|
488
434
|
name: IndividualNameUpdate$outboundSchema.optional(),
|
|
489
435
|
phone: z.nullable(z.lazy(() => Phone$outboundSchema)).optional(),
|
|
490
|
-
email: z.nullable(z.
|
|
491
|
-
.optional(),
|
|
436
|
+
email: z.nullable(z.string()).optional(),
|
|
492
437
|
address: z.nullable(z.lazy(() => UpdateRepresentativeAddress$outboundSchema))
|
|
493
438
|
.optional(),
|
|
494
439
|
birthDate: z.nullable(
|
|
@@ -15,7 +15,7 @@ export type CreatePaymentLinkErrorData = {
|
|
|
15
15
|
display?: components.DisplayOptionsError | undefined;
|
|
16
16
|
payment?: components.PaymentDetailsError | undefined;
|
|
17
17
|
payout?: components.PayoutDetailsError | undefined;
|
|
18
|
-
lineItems?: components.
|
|
18
|
+
lineItems?: components.CreatePaymentLinkLineItemsValidationError | undefined;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
export class CreatePaymentLinkError extends MoovError {
|
|
@@ -27,7 +27,7 @@ export class CreatePaymentLinkError extends MoovError {
|
|
|
27
27
|
display?: components.DisplayOptionsError | undefined;
|
|
28
28
|
payment?: components.PaymentDetailsError | undefined;
|
|
29
29
|
payout?: components.PayoutDetailsError | undefined;
|
|
30
|
-
lineItems?: components.
|
|
30
|
+
lineItems?: components.CreatePaymentLinkLineItemsValidationError | undefined;
|
|
31
31
|
|
|
32
32
|
/** The original data that was passed to this error instance. */
|
|
33
33
|
data$: CreatePaymentLinkErrorData;
|
|
@@ -73,7 +73,7 @@ export const CreatePaymentLinkError$inboundSchema: z.ZodType<
|
|
|
73
73
|
display: components.DisplayOptionsError$inboundSchema.optional(),
|
|
74
74
|
payment: components.PaymentDetailsError$inboundSchema.optional(),
|
|
75
75
|
payout: components.PayoutDetailsError$inboundSchema.optional(),
|
|
76
|
-
lineItems: components.
|
|
76
|
+
lineItems: components.CreatePaymentLinkLineItemsValidationError$inboundSchema
|
|
77
77
|
.optional(),
|
|
78
78
|
request$: z.instanceof(Request),
|
|
79
79
|
response$: z.instanceof(Response),
|
|
@@ -98,7 +98,7 @@ export type CreatePaymentLinkError$Outbound = {
|
|
|
98
98
|
payment?: components.PaymentDetailsError$Outbound | undefined;
|
|
99
99
|
payout?: components.PayoutDetailsError$Outbound | undefined;
|
|
100
100
|
lineItems?:
|
|
101
|
-
| components.
|
|
101
|
+
| components.CreatePaymentLinkLineItemsValidationError$Outbound
|
|
102
102
|
| undefined;
|
|
103
103
|
};
|
|
104
104
|
|
|
@@ -118,6 +118,6 @@ export const CreatePaymentLinkError$outboundSchema: z.ZodType<
|
|
|
118
118
|
display: components.DisplayOptionsError$outboundSchema.optional(),
|
|
119
119
|
payment: components.PaymentDetailsError$outboundSchema.optional(),
|
|
120
120
|
payout: components.PayoutDetailsError$outboundSchema.optional(),
|
|
121
|
-
lineItems: components
|
|
122
|
-
.optional(),
|
|
121
|
+
lineItems: components
|
|
122
|
+
.CreatePaymentLinkLineItemsValidationError$outboundSchema.optional(),
|
|
123
123
|
}));
|
|
@@ -12,7 +12,7 @@ export type UpdatePaymentLinkErrorData = {
|
|
|
12
12
|
display?: components.DisplayOptionsError | undefined;
|
|
13
13
|
payment?: components.PaymentDetailsError | undefined;
|
|
14
14
|
payout?: components.PayoutDetailsError | undefined;
|
|
15
|
-
lineItems?: components.
|
|
15
|
+
lineItems?: components.CreatePaymentLinkLineItemsValidationError | undefined;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
export class UpdatePaymentLinkError extends MoovError {
|
|
@@ -21,7 +21,7 @@ export class UpdatePaymentLinkError extends MoovError {
|
|
|
21
21
|
display?: components.DisplayOptionsError | undefined;
|
|
22
22
|
payment?: components.PaymentDetailsError | undefined;
|
|
23
23
|
payout?: components.PayoutDetailsError | undefined;
|
|
24
|
-
lineItems?: components.
|
|
24
|
+
lineItems?: components.CreatePaymentLinkLineItemsValidationError | undefined;
|
|
25
25
|
|
|
26
26
|
/** The original data that was passed to this error instance. */
|
|
27
27
|
data$: UpdatePaymentLinkErrorData;
|
|
@@ -57,7 +57,7 @@ export const UpdatePaymentLinkError$inboundSchema: z.ZodType<
|
|
|
57
57
|
display: components.DisplayOptionsError$inboundSchema.optional(),
|
|
58
58
|
payment: components.PaymentDetailsError$inboundSchema.optional(),
|
|
59
59
|
payout: components.PayoutDetailsError$inboundSchema.optional(),
|
|
60
|
-
lineItems: components.
|
|
60
|
+
lineItems: components.CreatePaymentLinkLineItemsValidationError$inboundSchema
|
|
61
61
|
.optional(),
|
|
62
62
|
request$: z.instanceof(Request),
|
|
63
63
|
response$: z.instanceof(Response),
|
|
@@ -79,7 +79,7 @@ export type UpdatePaymentLinkError$Outbound = {
|
|
|
79
79
|
payment?: components.PaymentDetailsError$Outbound | undefined;
|
|
80
80
|
payout?: components.PayoutDetailsError$Outbound | undefined;
|
|
81
81
|
lineItems?:
|
|
82
|
-
| components.
|
|
82
|
+
| components.CreatePaymentLinkLineItemsValidationError$Outbound
|
|
83
83
|
| undefined;
|
|
84
84
|
};
|
|
85
85
|
|
|
@@ -96,6 +96,6 @@ export const UpdatePaymentLinkError$outboundSchema: z.ZodType<
|
|
|
96
96
|
display: components.DisplayOptionsError$outboundSchema.optional(),
|
|
97
97
|
payment: components.PaymentDetailsError$outboundSchema.optional(),
|
|
98
98
|
payout: components.PayoutDetailsError$outboundSchema.optional(),
|
|
99
|
-
lineItems: components
|
|
100
|
-
.optional(),
|
|
99
|
+
lineItems: components
|
|
100
|
+
.CreatePaymentLinkLineItemsValidationError$outboundSchema.optional(),
|
|
101
101
|
}));
|
|
@@ -30,7 +30,7 @@ export type UpdateImageGlobals = {
|
|
|
30
30
|
export type UpdateImageRequest = {
|
|
31
31
|
accountID: string;
|
|
32
32
|
imageID: string;
|
|
33
|
-
|
|
33
|
+
imageUploadRequestMultiPart: components.ImageUploadRequestMultiPart;
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
export type UpdateImageResponse = {
|
|
@@ -93,18 +93,18 @@ export const UpdateImageRequest$inboundSchema: z.ZodType<
|
|
|
93
93
|
> = z.object({
|
|
94
94
|
accountID: z.string(),
|
|
95
95
|
imageID: z.string(),
|
|
96
|
-
|
|
97
|
-
components.
|
|
96
|
+
ImageUploadRequestMultiPart:
|
|
97
|
+
components.ImageUploadRequestMultiPart$inboundSchema,
|
|
98
98
|
}).transform((v) => {
|
|
99
99
|
return remap$(v, {
|
|
100
|
-
"
|
|
100
|
+
"ImageUploadRequestMultiPart": "imageUploadRequestMultiPart",
|
|
101
101
|
});
|
|
102
102
|
});
|
|
103
103
|
/** @internal */
|
|
104
104
|
export type UpdateImageRequest$Outbound = {
|
|
105
105
|
accountID: string;
|
|
106
106
|
imageID: string;
|
|
107
|
-
|
|
107
|
+
ImageUploadRequestMultiPart: components.ImageUploadRequestMultiPart$Outbound;
|
|
108
108
|
};
|
|
109
109
|
|
|
110
110
|
/** @internal */
|
|
@@ -115,11 +115,11 @@ export const UpdateImageRequest$outboundSchema: z.ZodType<
|
|
|
115
115
|
> = z.object({
|
|
116
116
|
accountID: z.string(),
|
|
117
117
|
imageID: z.string(),
|
|
118
|
-
|
|
119
|
-
components.
|
|
118
|
+
imageUploadRequestMultiPart:
|
|
119
|
+
components.ImageUploadRequestMultiPart$outboundSchema,
|
|
120
120
|
}).transform((v) => {
|
|
121
121
|
return remap$(v, {
|
|
122
|
-
|
|
122
|
+
imageUploadRequestMultiPart: "ImageUploadRequestMultiPart",
|
|
123
123
|
});
|
|
124
124
|
});
|
|
125
125
|
|
package/src/sdk/images.ts
CHANGED
|
@@ -66,8 +66,7 @@ export class Images extends ClientSDK {
|
|
|
66
66
|
* Replace an existing image and, optionally, its metadata.
|
|
67
67
|
*
|
|
68
68
|
* This endpoint replaces the existing image with the new PNG, JPEG, or WebP. Omit
|
|
69
|
-
* the metadata form section to keep existing metadata,
|
|
70
|
-
* Duplicate images, and requests larger than 16MB will be rejected.
|
|
69
|
+
* the metadata form section to keep existing metadata. Duplicate images, and requests larger than 16MB will be rejected.
|
|
71
70
|
*/
|
|
72
71
|
async update(
|
|
73
72
|
request: operations.UpdateImageRequest,
|
package/src/types/enums.ts
CHANGED
|
@@ -3,34 +3,14 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
+
import { Unrecognized, unrecognized } from "./unrecognized.js";
|
|
6
7
|
|
|
7
|
-
declare const __brand: unique symbol;
|
|
8
|
-
export type Unrecognized<T> = T & { [__brand]: "unrecognized" };
|
|
9
8
|
export type ClosedEnum<T extends Readonly<Record<string, string | number>>> =
|
|
10
9
|
T[keyof T];
|
|
11
10
|
export type OpenEnum<T extends Readonly<Record<string, string | number>>> =
|
|
12
11
|
| T[keyof T]
|
|
13
12
|
| Unrecognized<T[keyof T] extends number ? number : string>;
|
|
14
13
|
|
|
15
|
-
function unrecognized<T>(value: T): Unrecognized<T> {
|
|
16
|
-
unrecognizedCount++;
|
|
17
|
-
return value as Unrecognized<T>;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
let unrecognizedCount = 0;
|
|
21
|
-
let refCount = 0;
|
|
22
|
-
export function unrecognizedCounter() {
|
|
23
|
-
refCount++;
|
|
24
|
-
const start = unrecognizedCount;
|
|
25
|
-
return {
|
|
26
|
-
count: () => {
|
|
27
|
-
const count = unrecognizedCount - start;
|
|
28
|
-
if (--refCount === 0) unrecognizedCount = 0;
|
|
29
|
-
return count;
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
|
|
34
14
|
export function inboundSchema<T extends Record<string, string>>(
|
|
35
15
|
enumObj: T,
|
|
36
16
|
): z.ZodType<OpenEnum<T>, z.ZodTypeDef, unknown> {
|
package/src/types/index.ts
CHANGED
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
export { blobLikeSchema, isBlobLike } from "./blobs.js";
|
|
6
6
|
export { Decimal } from "./decimal.js";
|
|
7
|
-
export type { ClosedEnum, OpenEnum
|
|
7
|
+
export type { ClosedEnum, OpenEnum } from "./enums.js";
|
|
8
8
|
export type { Result } from "./fp.js";
|
|
9
9
|
export type { PageIterator, Paginator } from "./operations.js";
|
|
10
10
|
export { createPageIterator } from "./operations.js";
|
|
11
11
|
export { RFCDate } from "./rfcdate.js";
|
|
12
|
+
export * from "./unrecognized.js";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
declare const __brand: unique symbol;
|
|
6
|
+
export type Unrecognized<T> = T & { [__brand]: "unrecognized" };
|
|
7
|
+
|
|
8
|
+
function unrecognized<T>(value: T): Unrecognized<T> {
|
|
9
|
+
globalCount++;
|
|
10
|
+
return value as Unrecognized<T>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let globalCount = 0;
|
|
14
|
+
let refCount = 0;
|
|
15
|
+
export function startCountingUnrecognized() {
|
|
16
|
+
refCount++;
|
|
17
|
+
const start = globalCount;
|
|
18
|
+
return {
|
|
19
|
+
end: () => {
|
|
20
|
+
const count = globalCount - start;
|
|
21
|
+
if (--refCount === 0) globalCount = 0;
|
|
22
|
+
return count;
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { unrecognized };
|