@crevio/sdk 0.3.2 → 0.3.5
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/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/account.d.ts.map +1 -1
- package/dist/commonjs/models/account.js +4 -12
- package/dist/commonjs/models/account.js.map +1 -1
- package/dist/commonjs/models/blogpost.d.ts.map +1 -1
- package/dist/commonjs/models/blogpost.js +5 -14
- package/dist/commonjs/models/blogpost.js.map +1 -1
- package/dist/commonjs/models/cart.d.ts.map +1 -1
- package/dist/commonjs/models/cart.js +4 -12
- package/dist/commonjs/models/cart.js.map +1 -1
- package/dist/commonjs/models/cartcreaterequest.d.ts +1 -1
- package/dist/commonjs/models/cartcreaterequest.d.ts.map +1 -1
- package/dist/commonjs/models/cartcreaterequest.js +0 -5
- package/dist/commonjs/models/cartcreaterequest.js.map +1 -1
- package/dist/commonjs/models/cartitem.d.ts.map +1 -1
- package/dist/commonjs/models/cartitem.js +1 -6
- package/dist/commonjs/models/cartitem.js.map +1 -1
- package/dist/commonjs/models/cartupdaterequest.d.ts +4 -4
- package/dist/commonjs/models/cartupdaterequest.d.ts.map +1 -1
- package/dist/commonjs/models/cartupdaterequest.js +0 -7
- package/dist/commonjs/models/cartupdaterequest.js.map +1 -1
- package/dist/commonjs/models/checkout.d.ts.map +1 -1
- package/dist/commonjs/models/checkout.js +7 -18
- package/dist/commonjs/models/checkout.js.map +1 -1
- package/dist/commonjs/models/checkoutcreaterequest.d.ts +8 -8
- package/dist/commonjs/models/checkoutcreaterequest.d.ts.map +1 -1
- package/dist/commonjs/models/checkoutcreaterequest.js +2 -15
- package/dist/commonjs/models/checkoutcreaterequest.js.map +1 -1
- package/dist/commonjs/models/checkoutitem.d.ts.map +1 -1
- package/dist/commonjs/models/checkoutitem.js +1 -6
- package/dist/commonjs/models/checkoutitem.js.map +1 -1
- package/dist/commonjs/models/checkoutlink.d.ts.map +1 -1
- package/dist/commonjs/models/checkoutlink.js +6 -16
- package/dist/commonjs/models/checkoutlink.js.map +1 -1
- package/dist/commonjs/models/checkoutlinkrequest.d.ts +7 -7
- package/dist/commonjs/models/checkoutlinkrequest.d.ts.map +1 -1
- package/dist/commonjs/models/checkoutlinkrequest.js +3 -14
- package/dist/commonjs/models/checkoutlinkrequest.js.map +1 -1
- package/dist/commonjs/models/checkoutupdaterequest.d.ts +1 -1
- package/dist/commonjs/models/checkoutupdaterequest.d.ts.map +1 -1
- package/dist/commonjs/models/checkoutupdaterequest.js +0 -5
- package/dist/commonjs/models/checkoutupdaterequest.js.map +1 -1
- package/dist/commonjs/models/customer.d.ts +3 -2
- package/dist/commonjs/models/customer.d.ts.map +1 -1
- package/dist/commonjs/models/customer.js +10 -21
- package/dist/commonjs/models/customer.js.map +1 -1
- package/dist/commonjs/models/customerrequest.d.ts +5 -4
- package/dist/commonjs/models/customerrequest.d.ts.map +1 -1
- package/dist/commonjs/models/customerrequest.js +2 -8
- package/dist/commonjs/models/customerrequest.js.map +1 -1
- package/dist/commonjs/models/discount.d.ts.map +1 -1
- package/dist/commonjs/models/discount.js +11 -26
- package/dist/commonjs/models/discount.js.map +1 -1
- package/dist/commonjs/models/discountrequest.d.ts +8 -8
- package/dist/commonjs/models/discountrequest.d.ts.map +1 -1
- package/dist/commonjs/models/discountrequest.js +1 -12
- package/dist/commonjs/models/discountrequest.js.map +1 -1
- package/dist/commonjs/models/experience.d.ts.map +1 -1
- package/dist/commonjs/models/experience.js +9 -25
- package/dist/commonjs/models/experience.js.map +1 -1
- package/dist/commonjs/models/fileattachment.d.ts.map +1 -1
- package/dist/commonjs/models/fileattachment.js +2 -8
- package/dist/commonjs/models/fileattachment.js.map +1 -1
- package/dist/commonjs/models/imageattachment.d.ts.map +1 -1
- package/dist/commonjs/models/imageattachment.js +2 -8
- package/dist/commonjs/models/imageattachment.js.map +1 -1
- package/dist/commonjs/models/operations/listcustomers.d.ts +2 -1
- package/dist/commonjs/models/operations/listcustomers.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listcustomers.js +2 -1
- package/dist/commonjs/models/operations/listcustomers.js.map +1 -1
- package/dist/commonjs/models/operations/listorders.d.ts +2 -3
- package/dist/commonjs/models/operations/listorders.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listorders.js +2 -3
- package/dist/commonjs/models/operations/listorders.js.map +1 -1
- package/dist/commonjs/models/order.d.ts +2 -3
- package/dist/commonjs/models/order.d.ts.map +1 -1
- package/dist/commonjs/models/order.js +13 -25
- package/dist/commonjs/models/order.js.map +1 -1
- package/dist/commonjs/models/orderlineitem.d.ts.map +1 -1
- package/dist/commonjs/models/orderlineitem.js +1 -6
- package/dist/commonjs/models/orderlineitem.js.map +1 -1
- package/dist/commonjs/models/pricevariant.d.ts.map +1 -1
- package/dist/commonjs/models/pricevariant.js +3 -10
- package/dist/commonjs/models/pricevariant.js.map +1 -1
- package/dist/commonjs/models/product.d.ts.map +1 -1
- package/dist/commonjs/models/product.js +8 -20
- package/dist/commonjs/models/product.js.map +1 -1
- package/dist/commonjs/models/review.d.ts.map +1 -1
- package/dist/commonjs/models/review.js +4 -10
- package/dist/commonjs/models/review.js.map +1 -1
- package/dist/commonjs/models/user.d.ts.map +1 -1
- package/dist/commonjs/models/user.js +12 -26
- package/dist/commonjs/models/user.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/account.d.ts.map +1 -1
- package/dist/esm/models/account.js +4 -12
- package/dist/esm/models/account.js.map +1 -1
- package/dist/esm/models/blogpost.d.ts.map +1 -1
- package/dist/esm/models/blogpost.js +5 -14
- package/dist/esm/models/blogpost.js.map +1 -1
- package/dist/esm/models/cart.d.ts.map +1 -1
- package/dist/esm/models/cart.js +4 -12
- package/dist/esm/models/cart.js.map +1 -1
- package/dist/esm/models/cartcreaterequest.d.ts +1 -1
- package/dist/esm/models/cartcreaterequest.d.ts.map +1 -1
- package/dist/esm/models/cartcreaterequest.js +0 -5
- package/dist/esm/models/cartcreaterequest.js.map +1 -1
- package/dist/esm/models/cartitem.d.ts.map +1 -1
- package/dist/esm/models/cartitem.js +1 -6
- package/dist/esm/models/cartitem.js.map +1 -1
- package/dist/esm/models/cartupdaterequest.d.ts +4 -4
- package/dist/esm/models/cartupdaterequest.d.ts.map +1 -1
- package/dist/esm/models/cartupdaterequest.js +0 -7
- package/dist/esm/models/cartupdaterequest.js.map +1 -1
- package/dist/esm/models/checkout.d.ts.map +1 -1
- package/dist/esm/models/checkout.js +7 -18
- package/dist/esm/models/checkout.js.map +1 -1
- package/dist/esm/models/checkoutcreaterequest.d.ts +8 -8
- package/dist/esm/models/checkoutcreaterequest.d.ts.map +1 -1
- package/dist/esm/models/checkoutcreaterequest.js +2 -15
- package/dist/esm/models/checkoutcreaterequest.js.map +1 -1
- package/dist/esm/models/checkoutitem.d.ts.map +1 -1
- package/dist/esm/models/checkoutitem.js +1 -6
- package/dist/esm/models/checkoutitem.js.map +1 -1
- package/dist/esm/models/checkoutlink.d.ts.map +1 -1
- package/dist/esm/models/checkoutlink.js +6 -16
- package/dist/esm/models/checkoutlink.js.map +1 -1
- package/dist/esm/models/checkoutlinkrequest.d.ts +7 -7
- package/dist/esm/models/checkoutlinkrequest.d.ts.map +1 -1
- package/dist/esm/models/checkoutlinkrequest.js +3 -14
- package/dist/esm/models/checkoutlinkrequest.js.map +1 -1
- package/dist/esm/models/checkoutupdaterequest.d.ts +1 -1
- package/dist/esm/models/checkoutupdaterequest.d.ts.map +1 -1
- package/dist/esm/models/checkoutupdaterequest.js +0 -5
- package/dist/esm/models/checkoutupdaterequest.js.map +1 -1
- package/dist/esm/models/customer.d.ts +3 -2
- package/dist/esm/models/customer.d.ts.map +1 -1
- package/dist/esm/models/customer.js +10 -21
- package/dist/esm/models/customer.js.map +1 -1
- package/dist/esm/models/customerrequest.d.ts +5 -4
- package/dist/esm/models/customerrequest.d.ts.map +1 -1
- package/dist/esm/models/customerrequest.js +2 -8
- package/dist/esm/models/customerrequest.js.map +1 -1
- package/dist/esm/models/discount.d.ts.map +1 -1
- package/dist/esm/models/discount.js +11 -26
- package/dist/esm/models/discount.js.map +1 -1
- package/dist/esm/models/discountrequest.d.ts +8 -8
- package/dist/esm/models/discountrequest.d.ts.map +1 -1
- package/dist/esm/models/discountrequest.js +1 -12
- package/dist/esm/models/discountrequest.js.map +1 -1
- package/dist/esm/models/experience.d.ts.map +1 -1
- package/dist/esm/models/experience.js +9 -25
- package/dist/esm/models/experience.js.map +1 -1
- package/dist/esm/models/fileattachment.d.ts.map +1 -1
- package/dist/esm/models/fileattachment.js +2 -8
- package/dist/esm/models/fileattachment.js.map +1 -1
- package/dist/esm/models/imageattachment.d.ts.map +1 -1
- package/dist/esm/models/imageattachment.js +2 -8
- package/dist/esm/models/imageattachment.js.map +1 -1
- package/dist/esm/models/operations/listcustomers.d.ts +2 -1
- package/dist/esm/models/operations/listcustomers.d.ts.map +1 -1
- package/dist/esm/models/operations/listcustomers.js +2 -1
- package/dist/esm/models/operations/listcustomers.js.map +1 -1
- package/dist/esm/models/operations/listorders.d.ts +2 -3
- package/dist/esm/models/operations/listorders.d.ts.map +1 -1
- package/dist/esm/models/operations/listorders.js +2 -3
- package/dist/esm/models/operations/listorders.js.map +1 -1
- package/dist/esm/models/order.d.ts +2 -3
- package/dist/esm/models/order.d.ts.map +1 -1
- package/dist/esm/models/order.js +13 -25
- package/dist/esm/models/order.js.map +1 -1
- package/dist/esm/models/orderlineitem.d.ts.map +1 -1
- package/dist/esm/models/orderlineitem.js +1 -6
- package/dist/esm/models/orderlineitem.js.map +1 -1
- package/dist/esm/models/pricevariant.d.ts.map +1 -1
- package/dist/esm/models/pricevariant.js +3 -10
- package/dist/esm/models/pricevariant.js.map +1 -1
- package/dist/esm/models/product.d.ts.map +1 -1
- package/dist/esm/models/product.js +8 -20
- package/dist/esm/models/product.js.map +1 -1
- package/dist/esm/models/review.d.ts.map +1 -1
- package/dist/esm/models/review.js +4 -10
- package/dist/esm/models/review.js.map +1 -1
- package/dist/esm/models/user.d.ts.map +1 -1
- package/dist/esm/models/user.js +12 -26
- package/dist/esm/models/user.js.map +1 -1
- package/examples/node_modules/.package-lock.json +1 -1
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/account.ts +4 -12
- package/src/models/blogpost.ts +5 -14
- package/src/models/cart.ts +4 -12
- package/src/models/cartcreaterequest.ts +1 -6
- package/src/models/cartitem.ts +1 -6
- package/src/models/cartupdaterequest.ts +4 -11
- package/src/models/checkout.ts +7 -18
- package/src/models/checkoutcreaterequest.ts +10 -23
- package/src/models/checkoutitem.ts +1 -6
- package/src/models/checkoutlink.ts +6 -16
- package/src/models/checkoutlinkrequest.ts +10 -21
- package/src/models/checkoutupdaterequest.ts +1 -6
- package/src/models/customer.ts +11 -22
- package/src/models/customerrequest.ts +5 -11
- package/src/models/discount.ts +11 -26
- package/src/models/discountrequest.ts +9 -20
- package/src/models/experience.ts +9 -25
- package/src/models/fileattachment.ts +2 -8
- package/src/models/imageattachment.ts +2 -8
- package/src/models/operations/listcustomers.ts +2 -1
- package/src/models/operations/listorders.ts +2 -3
- package/src/models/order.ts +13 -29
- package/src/models/orderlineitem.ts +1 -6
- package/src/models/pricevariant.ts +3 -10
- package/src/models/product.ts +8 -20
- package/src/models/review.ts +4 -12
- package/src/models/user.ts +12 -28
|
@@ -31,9 +31,9 @@ export type CartUpdateRequest = {
|
|
|
31
31
|
/** @internal */
|
|
32
32
|
export type CartItemsAttribute$Outbound = {
|
|
33
33
|
id?: number | undefined;
|
|
34
|
-
|
|
34
|
+
priceVariantId?: number | undefined;
|
|
35
35
|
quantity?: number | undefined;
|
|
36
|
-
|
|
36
|
+
customAmount?: number | undefined;
|
|
37
37
|
_destroy?: boolean | undefined;
|
|
38
38
|
};
|
|
39
39
|
|
|
@@ -50,8 +50,6 @@ export const CartItemsAttribute$outboundSchema: z.ZodType<
|
|
|
50
50
|
destroy: z.boolean().optional(),
|
|
51
51
|
}).transform((v) => {
|
|
52
52
|
return remap$(v, {
|
|
53
|
-
priceVariantId: "price_variant_id",
|
|
54
|
-
customAmount: "custom_amount",
|
|
55
53
|
destroy: "_destroy",
|
|
56
54
|
});
|
|
57
55
|
});
|
|
@@ -66,8 +64,8 @@ export function cartItemsAttributeToJSON(
|
|
|
66
64
|
|
|
67
65
|
/** @internal */
|
|
68
66
|
export type CartUpdateRequestCart$Outbound = {
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
customerId?: number | undefined;
|
|
68
|
+
cartItemsAttributes?: Array<CartItemsAttribute$Outbound> | undefined;
|
|
71
69
|
};
|
|
72
70
|
|
|
73
71
|
/** @internal */
|
|
@@ -79,11 +77,6 @@ export const CartUpdateRequestCart$outboundSchema: z.ZodType<
|
|
|
79
77
|
customerId: z.number().int().optional(),
|
|
80
78
|
cartItemsAttributes: z.array(z.lazy(() => CartItemsAttribute$outboundSchema))
|
|
81
79
|
.optional(),
|
|
82
|
-
}).transform((v) => {
|
|
83
|
-
return remap$(v, {
|
|
84
|
-
customerId: "customer_id",
|
|
85
|
-
cartItemsAttributes: "cart_items_attributes",
|
|
86
|
-
});
|
|
87
80
|
});
|
|
88
81
|
|
|
89
82
|
export function cartUpdateRequestCartToJSON(
|
package/src/models/checkout.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
6
|
import { safeParse } from "../lib/schemas.js";
|
|
8
7
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
8
|
import { AccountSlim, AccountSlim$inboundSchema } from "./accountslim.js";
|
|
@@ -36,26 +35,16 @@ export const Checkout$inboundSchema: z.ZodType<
|
|
|
36
35
|
> = z.object({
|
|
37
36
|
id: z.number().int().optional(),
|
|
38
37
|
status: z.string().optional(),
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
processorId: z.nullable(z.string()).optional(),
|
|
39
|
+
clientSecret: z.nullable(z.string()).optional(),
|
|
40
|
+
prefixId: z.string().optional(),
|
|
42
41
|
mode: z.string().optional(),
|
|
43
42
|
currency: z.string().optional(),
|
|
44
43
|
total: z.number().int().optional(),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}).transform((v) => {
|
|
50
|
-
return remap$(v, {
|
|
51
|
-
"processor_id": "processorId",
|
|
52
|
-
"client_secret": "clientSecret",
|
|
53
|
-
"prefix_id": "prefixId",
|
|
54
|
-
"is_free": "isFree",
|
|
55
|
-
"prefilled_email": "prefilledEmail",
|
|
56
|
-
"checkout_items": "checkoutItems",
|
|
57
|
-
"seller_account": "sellerAccount",
|
|
58
|
-
});
|
|
44
|
+
isFree: z.boolean().optional(),
|
|
45
|
+
prefilledEmail: z.nullable(z.string()).optional(),
|
|
46
|
+
checkoutItems: z.array(CheckoutItem$inboundSchema).optional(),
|
|
47
|
+
sellerAccount: AccountSlim$inboundSchema.optional(),
|
|
59
48
|
});
|
|
60
49
|
|
|
61
50
|
export function checkoutFromJSON(
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
6
|
|
|
8
7
|
export type CheckoutItemsAttribute = {
|
|
9
|
-
priceVariantId
|
|
8
|
+
priceVariantId?: number | undefined;
|
|
10
9
|
quantity?: number | undefined;
|
|
11
10
|
/**
|
|
12
11
|
* Custom amount in cents (pay-what-you-want)
|
|
@@ -19,7 +18,7 @@ export type CheckoutCreateRequestCheckout = {
|
|
|
19
18
|
returnUrl?: string | undefined;
|
|
20
19
|
cancelUrl?: string | undefined;
|
|
21
20
|
discountCode?: string | undefined;
|
|
22
|
-
checkoutItemsAttributes
|
|
21
|
+
checkoutItemsAttributes?: Array<CheckoutItemsAttribute> | undefined;
|
|
23
22
|
};
|
|
24
23
|
|
|
25
24
|
export type CheckoutCreateRequest = {
|
|
@@ -28,9 +27,9 @@ export type CheckoutCreateRequest = {
|
|
|
28
27
|
|
|
29
28
|
/** @internal */
|
|
30
29
|
export type CheckoutItemsAttribute$Outbound = {
|
|
31
|
-
|
|
30
|
+
priceVariantId?: number | undefined;
|
|
32
31
|
quantity?: number | undefined;
|
|
33
|
-
|
|
32
|
+
customAmount?: number | undefined;
|
|
34
33
|
};
|
|
35
34
|
|
|
36
35
|
/** @internal */
|
|
@@ -39,14 +38,9 @@ export const CheckoutItemsAttribute$outboundSchema: z.ZodType<
|
|
|
39
38
|
z.ZodTypeDef,
|
|
40
39
|
CheckoutItemsAttribute
|
|
41
40
|
> = z.object({
|
|
42
|
-
priceVariantId: z.number().int(),
|
|
41
|
+
priceVariantId: z.number().int().optional(),
|
|
43
42
|
quantity: z.number().int().optional(),
|
|
44
43
|
customAmount: z.number().int().optional(),
|
|
45
|
-
}).transform((v) => {
|
|
46
|
-
return remap$(v, {
|
|
47
|
-
priceVariantId: "price_variant_id",
|
|
48
|
-
customAmount: "custom_amount",
|
|
49
|
-
});
|
|
50
44
|
});
|
|
51
45
|
|
|
52
46
|
export function checkoutItemsAttributeToJSON(
|
|
@@ -60,10 +54,10 @@ export function checkoutItemsAttributeToJSON(
|
|
|
60
54
|
/** @internal */
|
|
61
55
|
export type CheckoutCreateRequestCheckout$Outbound = {
|
|
62
56
|
email?: string | undefined;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
57
|
+
returnUrl?: string | undefined;
|
|
58
|
+
cancelUrl?: string | undefined;
|
|
59
|
+
discountCode?: string | undefined;
|
|
60
|
+
checkoutItemsAttributes?: Array<CheckoutItemsAttribute$Outbound> | undefined;
|
|
67
61
|
};
|
|
68
62
|
|
|
69
63
|
/** @internal */
|
|
@@ -78,14 +72,7 @@ export const CheckoutCreateRequestCheckout$outboundSchema: z.ZodType<
|
|
|
78
72
|
discountCode: z.string().optional(),
|
|
79
73
|
checkoutItemsAttributes: z.array(
|
|
80
74
|
z.lazy(() => CheckoutItemsAttribute$outboundSchema),
|
|
81
|
-
),
|
|
82
|
-
}).transform((v) => {
|
|
83
|
-
return remap$(v, {
|
|
84
|
-
returnUrl: "return_url",
|
|
85
|
-
cancelUrl: "cancel_url",
|
|
86
|
-
discountCode: "discount_code",
|
|
87
|
-
checkoutItemsAttributes: "checkout_items_attributes",
|
|
88
|
-
});
|
|
75
|
+
).optional(),
|
|
89
76
|
});
|
|
90
77
|
|
|
91
78
|
export function checkoutCreateRequestCheckoutToJSON(
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
6
|
import { safeParse } from "../lib/schemas.js";
|
|
8
7
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
8
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
@@ -23,11 +22,7 @@ export const CheckoutItem$inboundSchema: z.ZodType<
|
|
|
23
22
|
> = z.object({
|
|
24
23
|
id: z.number().int().optional(),
|
|
25
24
|
quantity: z.number().int().optional(),
|
|
26
|
-
|
|
27
|
-
}).transform((v) => {
|
|
28
|
-
return remap$(v, {
|
|
29
|
-
"price_variant": "priceVariant",
|
|
30
|
-
});
|
|
25
|
+
priceVariant: PriceVariant$inboundSchema.optional(),
|
|
31
26
|
});
|
|
32
27
|
|
|
33
28
|
export function checkoutItemFromJSON(
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
6
|
import { safeParse } from "../lib/schemas.js";
|
|
8
7
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
8
|
import { Discount, Discount$inboundSchema } from "./discount.js";
|
|
@@ -32,24 +31,15 @@ export const CheckoutLink$inboundSchema: z.ZodType<
|
|
|
32
31
|
id: z.number().int().optional(),
|
|
33
32
|
name: z.string().optional(),
|
|
34
33
|
url: z.string().optional(),
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
successUrl: z.nullable(z.string()).optional(),
|
|
35
|
+
allowDiscountCodes: z.boolean().optional(),
|
|
36
|
+
prefixId: z.string().optional(),
|
|
37
|
+
createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
39
38
|
.optional(),
|
|
40
|
-
|
|
39
|
+
updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
41
40
|
.optional(),
|
|
42
41
|
discount: Discount$inboundSchema.optional(),
|
|
43
|
-
|
|
44
|
-
}).transform((v) => {
|
|
45
|
-
return remap$(v, {
|
|
46
|
-
"success_url": "successUrl",
|
|
47
|
-
"allow_discount_codes": "allowDiscountCodes",
|
|
48
|
-
"prefix_id": "prefixId",
|
|
49
|
-
"created_at": "createdAt",
|
|
50
|
-
"updated_at": "updatedAt",
|
|
51
|
-
"price_variants": "priceVariants",
|
|
52
|
-
});
|
|
42
|
+
priceVariants: z.array(PriceVariant$inboundSchema).optional(),
|
|
53
43
|
});
|
|
54
44
|
|
|
55
45
|
export function checkoutLinkFromJSON(
|
|
@@ -3,27 +3,26 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
6
|
|
|
8
7
|
export type CheckoutLinkRequestCheckoutLink = {
|
|
9
8
|
name?: string | undefined;
|
|
10
9
|
discountId?: number | null | undefined;
|
|
11
10
|
allowDiscountCodes?: boolean | undefined;
|
|
12
11
|
successUrl?: string | undefined;
|
|
13
|
-
priceVariantIds
|
|
12
|
+
priceVariantIds?: Array<number> | undefined;
|
|
14
13
|
};
|
|
15
14
|
|
|
16
15
|
export type CheckoutLinkRequest = {
|
|
17
|
-
checkoutLink
|
|
16
|
+
checkoutLink?: CheckoutLinkRequestCheckoutLink | undefined;
|
|
18
17
|
};
|
|
19
18
|
|
|
20
19
|
/** @internal */
|
|
21
20
|
export type CheckoutLinkRequestCheckoutLink$Outbound = {
|
|
22
21
|
name?: string | undefined;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
discountId?: number | null | undefined;
|
|
23
|
+
allowDiscountCodes?: boolean | undefined;
|
|
24
|
+
successUrl?: string | undefined;
|
|
25
|
+
priceVariantIds?: Array<number> | undefined;
|
|
27
26
|
};
|
|
28
27
|
|
|
29
28
|
/** @internal */
|
|
@@ -36,14 +35,7 @@ export const CheckoutLinkRequestCheckoutLink$outboundSchema: z.ZodType<
|
|
|
36
35
|
discountId: z.nullable(z.number().int()).optional(),
|
|
37
36
|
allowDiscountCodes: z.boolean().optional(),
|
|
38
37
|
successUrl: z.string().optional(),
|
|
39
|
-
priceVariantIds: z.array(z.number().int()),
|
|
40
|
-
}).transform((v) => {
|
|
41
|
-
return remap$(v, {
|
|
42
|
-
discountId: "discount_id",
|
|
43
|
-
allowDiscountCodes: "allow_discount_codes",
|
|
44
|
-
successUrl: "success_url",
|
|
45
|
-
priceVariantIds: "price_variant_ids",
|
|
46
|
-
});
|
|
38
|
+
priceVariantIds: z.array(z.number().int()).optional(),
|
|
47
39
|
});
|
|
48
40
|
|
|
49
41
|
export function checkoutLinkRequestCheckoutLinkToJSON(
|
|
@@ -58,7 +50,7 @@ export function checkoutLinkRequestCheckoutLinkToJSON(
|
|
|
58
50
|
|
|
59
51
|
/** @internal */
|
|
60
52
|
export type CheckoutLinkRequest$Outbound = {
|
|
61
|
-
|
|
53
|
+
checkoutLink?: CheckoutLinkRequestCheckoutLink$Outbound | undefined;
|
|
62
54
|
};
|
|
63
55
|
|
|
64
56
|
/** @internal */
|
|
@@ -67,11 +59,8 @@ export const CheckoutLinkRequest$outboundSchema: z.ZodType<
|
|
|
67
59
|
z.ZodTypeDef,
|
|
68
60
|
CheckoutLinkRequest
|
|
69
61
|
> = z.object({
|
|
70
|
-
checkoutLink: z.lazy(() => CheckoutLinkRequestCheckoutLink$outboundSchema)
|
|
71
|
-
|
|
72
|
-
return remap$(v, {
|
|
73
|
-
checkoutLink: "checkout_link",
|
|
74
|
-
});
|
|
62
|
+
checkoutLink: z.lazy(() => CheckoutLinkRequestCheckoutLink$outboundSchema)
|
|
63
|
+
.optional(),
|
|
75
64
|
});
|
|
76
65
|
|
|
77
66
|
export function checkoutLinkRequestToJSON(
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
6
|
|
|
8
7
|
export type CheckoutUpdateRequestCheckout = {
|
|
9
8
|
email?: string | undefined;
|
|
@@ -17,7 +16,7 @@ export type CheckoutUpdateRequest = {
|
|
|
17
16
|
/** @internal */
|
|
18
17
|
export type CheckoutUpdateRequestCheckout$Outbound = {
|
|
19
18
|
email?: string | undefined;
|
|
20
|
-
|
|
19
|
+
discountCode?: string | undefined;
|
|
21
20
|
};
|
|
22
21
|
|
|
23
22
|
/** @internal */
|
|
@@ -28,10 +27,6 @@ export const CheckoutUpdateRequestCheckout$outboundSchema: z.ZodType<
|
|
|
28
27
|
> = z.object({
|
|
29
28
|
email: z.string().optional(),
|
|
30
29
|
discountCode: z.string().optional(),
|
|
31
|
-
}).transform((v) => {
|
|
32
|
-
return remap$(v, {
|
|
33
|
-
discountCode: "discount_code",
|
|
34
|
-
});
|
|
35
30
|
});
|
|
36
31
|
|
|
37
32
|
export function checkoutUpdateRequestCheckoutToJSON(
|
package/src/models/customer.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
6
|
import { safeParse } from "../lib/schemas.js";
|
|
8
7
|
import { ClosedEnum } from "../types/enums.js";
|
|
9
8
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
@@ -11,7 +10,8 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
|
11
10
|
|
|
12
11
|
export const CustomerCustomerType = {
|
|
13
12
|
Lead: "lead",
|
|
14
|
-
|
|
13
|
+
Free: "free",
|
|
14
|
+
Paid: "paid",
|
|
15
15
|
} as const;
|
|
16
16
|
export type CustomerCustomerType = ClosedEnum<typeof CustomerCustomerType>;
|
|
17
17
|
|
|
@@ -20,7 +20,7 @@ export type Customer = {
|
|
|
20
20
|
email?: string | undefined;
|
|
21
21
|
name?: string | undefined;
|
|
22
22
|
firstName?: string | undefined;
|
|
23
|
-
lastName?: string | undefined;
|
|
23
|
+
lastName?: string | null | undefined;
|
|
24
24
|
customerType?: CustomerCustomerType | undefined;
|
|
25
25
|
prefixId?: string | undefined;
|
|
26
26
|
ordersCount?: number | undefined;
|
|
@@ -46,27 +46,16 @@ export const Customer$inboundSchema: z.ZodType<
|
|
|
46
46
|
id: z.number().int().optional(),
|
|
47
47
|
email: z.string().optional(),
|
|
48
48
|
name: z.string().optional(),
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
firstName: z.string().optional(),
|
|
50
|
+
lastName: z.nullable(z.string()).optional(),
|
|
51
|
+
customerType: CustomerCustomerType$inboundSchema.optional(),
|
|
52
|
+
prefixId: z.string().optional(),
|
|
53
|
+
ordersCount: z.number().int().optional(),
|
|
54
|
+
totalSpend: z.number().int().optional(),
|
|
55
|
+
createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
56
56
|
.optional(),
|
|
57
|
-
|
|
57
|
+
updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
58
58
|
.optional(),
|
|
59
|
-
}).transform((v) => {
|
|
60
|
-
return remap$(v, {
|
|
61
|
-
"first_name": "firstName",
|
|
62
|
-
"last_name": "lastName",
|
|
63
|
-
"customer_type": "customerType",
|
|
64
|
-
"prefix_id": "prefixId",
|
|
65
|
-
"orders_count": "ordersCount",
|
|
66
|
-
"total_spend": "totalSpend",
|
|
67
|
-
"created_at": "createdAt",
|
|
68
|
-
"updated_at": "updatedAt",
|
|
69
|
-
});
|
|
70
59
|
});
|
|
71
60
|
|
|
72
61
|
export function customerFromJSON(
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
6
|
import { ClosedEnum } from "../types/enums.js";
|
|
8
7
|
|
|
9
8
|
export const CustomerRequestCustomerType = {
|
|
10
9
|
Lead: "lead",
|
|
11
|
-
|
|
10
|
+
Free: "free",
|
|
11
|
+
Paid: "paid",
|
|
12
12
|
} as const;
|
|
13
13
|
export type CustomerRequestCustomerType = ClosedEnum<
|
|
14
14
|
typeof CustomerRequestCustomerType
|
|
@@ -35,9 +35,9 @@ export const CustomerRequestCustomerType$outboundSchema: z.ZodNativeEnum<
|
|
|
35
35
|
export type CustomerRequestCustomer$Outbound = {
|
|
36
36
|
email: string;
|
|
37
37
|
name?: string | undefined;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
firstName?: string | undefined;
|
|
39
|
+
lastName?: string | undefined;
|
|
40
|
+
customerType?: string | undefined;
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
/** @internal */
|
|
@@ -51,12 +51,6 @@ export const CustomerRequestCustomer$outboundSchema: z.ZodType<
|
|
|
51
51
|
firstName: z.string().optional(),
|
|
52
52
|
lastName: z.string().optional(),
|
|
53
53
|
customerType: CustomerRequestCustomerType$outboundSchema.optional(),
|
|
54
|
-
}).transform((v) => {
|
|
55
|
-
return remap$(v, {
|
|
56
|
-
firstName: "first_name",
|
|
57
|
-
lastName: "last_name",
|
|
58
|
-
customerType: "customer_type",
|
|
59
|
-
});
|
|
60
54
|
});
|
|
61
55
|
|
|
62
56
|
export function customerRequestCustomerToJSON(
|
package/src/models/discount.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
6
|
import { safeParse } from "../lib/schemas.js";
|
|
8
7
|
import { ClosedEnum } from "../types/enums.js";
|
|
9
8
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
@@ -76,39 +75,25 @@ export const Discount$inboundSchema: z.ZodType<
|
|
|
76
75
|
> = z.object({
|
|
77
76
|
id: z.number().int().optional(),
|
|
78
77
|
status: DiscountStatus$inboundSchema.optional(),
|
|
79
|
-
|
|
78
|
+
discountType: DiscountDiscountType$inboundSchema.optional(),
|
|
80
79
|
code: z.string().optional(),
|
|
81
|
-
|
|
80
|
+
redeemBy: z.nullable(
|
|
82
81
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
83
82
|
).optional(),
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
maxRedemptions: z.nullable(z.number().int()).optional(),
|
|
84
|
+
timesRedeemed: z.number().int().optional(),
|
|
86
85
|
duration: z.nullable(DiscountDuration$inboundSchema).optional(),
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
durationInMonths: z.nullable(z.number().int()).optional(),
|
|
87
|
+
amountOff: z.nullable(z.number().int()).optional(),
|
|
88
|
+
percentOff: z.nullable(z.number()).optional(),
|
|
90
89
|
currency: z.nullable(z.string()).optional(),
|
|
91
|
-
|
|
90
|
+
prefixId: z.string().optional(),
|
|
92
91
|
destroyable: z.boolean().optional(),
|
|
93
|
-
|
|
92
|
+
createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
94
93
|
.optional(),
|
|
95
|
-
|
|
94
|
+
updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
96
95
|
.optional(),
|
|
97
|
-
|
|
98
|
-
}).transform((v) => {
|
|
99
|
-
return remap$(v, {
|
|
100
|
-
"discount_type": "discountType",
|
|
101
|
-
"redeem_by": "redeemBy",
|
|
102
|
-
"max_redemptions": "maxRedemptions",
|
|
103
|
-
"times_redeemed": "timesRedeemed",
|
|
104
|
-
"duration_in_months": "durationInMonths",
|
|
105
|
-
"amount_off": "amountOff",
|
|
106
|
-
"percent_off": "percentOff",
|
|
107
|
-
"prefix_id": "prefixId",
|
|
108
|
-
"created_at": "createdAt",
|
|
109
|
-
"updated_at": "updatedAt",
|
|
110
|
-
"price_variants": "priceVariants",
|
|
111
|
-
});
|
|
96
|
+
priceVariants: z.array(PriceVariant$inboundSchema).optional(),
|
|
112
97
|
});
|
|
113
98
|
|
|
114
99
|
export function discountFromJSON(
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
6
|
import { ClosedEnum } from "../types/enums.js";
|
|
8
7
|
|
|
9
8
|
export const DiscountRequestDiscountType = {
|
|
@@ -25,7 +24,7 @@ export type DiscountRequestDuration = ClosedEnum<
|
|
|
25
24
|
|
|
26
25
|
export type DiscountRequestDiscount = {
|
|
27
26
|
code: string;
|
|
28
|
-
discountType
|
|
27
|
+
discountType?: DiscountRequestDiscountType | undefined;
|
|
29
28
|
/**
|
|
30
29
|
* Discount amount in cents (required if discount_type=amount_off)
|
|
31
30
|
*/
|
|
@@ -62,15 +61,15 @@ export const DiscountRequestDuration$outboundSchema: z.ZodNativeEnum<
|
|
|
62
61
|
/** @internal */
|
|
63
62
|
export type DiscountRequestDiscount$Outbound = {
|
|
64
63
|
code: string;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
discountType?: string | undefined;
|
|
65
|
+
amountOff?: number | undefined;
|
|
66
|
+
percentOff?: number | undefined;
|
|
68
67
|
currency?: string | undefined;
|
|
69
68
|
duration?: string | undefined;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
durationInMonths?: number | undefined;
|
|
70
|
+
redeemBy?: string | undefined;
|
|
71
|
+
maxRedemptions?: number | undefined;
|
|
72
|
+
priceVariants?: Array<number> | undefined;
|
|
74
73
|
};
|
|
75
74
|
|
|
76
75
|
/** @internal */
|
|
@@ -80,7 +79,7 @@ export const DiscountRequestDiscount$outboundSchema: z.ZodType<
|
|
|
80
79
|
DiscountRequestDiscount
|
|
81
80
|
> = z.object({
|
|
82
81
|
code: z.string(),
|
|
83
|
-
discountType: DiscountRequestDiscountType$outboundSchema,
|
|
82
|
+
discountType: DiscountRequestDiscountType$outboundSchema.optional(),
|
|
84
83
|
amountOff: z.number().int().optional(),
|
|
85
84
|
percentOff: z.number().optional(),
|
|
86
85
|
currency: z.string().optional(),
|
|
@@ -89,16 +88,6 @@ export const DiscountRequestDiscount$outboundSchema: z.ZodType<
|
|
|
89
88
|
redeemBy: z.date().transform(v => v.toISOString()).optional(),
|
|
90
89
|
maxRedemptions: z.number().int().optional(),
|
|
91
90
|
priceVariants: z.array(z.number().int()).optional(),
|
|
92
|
-
}).transform((v) => {
|
|
93
|
-
return remap$(v, {
|
|
94
|
-
discountType: "discount_type",
|
|
95
|
-
amountOff: "amount_off",
|
|
96
|
-
percentOff: "percent_off",
|
|
97
|
-
durationInMonths: "duration_in_months",
|
|
98
|
-
redeemBy: "redeem_by",
|
|
99
|
-
maxRedemptions: "max_redemptions",
|
|
100
|
-
priceVariants: "price_variants",
|
|
101
|
-
});
|
|
102
91
|
});
|
|
103
92
|
|
|
104
93
|
export function discountRequestDiscountToJSON(
|
package/src/models/experience.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
6
|
import { safeParse } from "../lib/schemas.js";
|
|
8
7
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
8
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
@@ -64,14 +63,9 @@ export const Image$inboundSchema: z.ZodType<Image, z.ZodTypeDef, unknown> = z
|
|
|
64
63
|
.object({
|
|
65
64
|
id: z.number().int().optional(),
|
|
66
65
|
filename: z.string().optional(),
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
contentType: z.string().optional(),
|
|
67
|
+
byteSize: z.number().int().optional(),
|
|
69
68
|
url: z.string().optional(),
|
|
70
|
-
}).transform((v) => {
|
|
71
|
-
return remap$(v, {
|
|
72
|
-
"content_type": "contentType",
|
|
73
|
-
"byte_size": "byteSize",
|
|
74
|
-
});
|
|
75
69
|
});
|
|
76
70
|
|
|
77
71
|
export function imageFromJSON(
|
|
@@ -94,27 +88,17 @@ export const Experience$inboundSchema: z.ZodType<
|
|
|
94
88
|
name: z.string().optional(),
|
|
95
89
|
slug: z.string().optional(),
|
|
96
90
|
description: z.nullable(z.string()).optional(),
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
91
|
+
accessType: z.string().optional(),
|
|
92
|
+
itemType: z.string().optional(),
|
|
93
|
+
prefixId: z.string().optional(),
|
|
94
|
+
typeForDisplay: z.string().optional(),
|
|
95
|
+
activeUsersCount: z.number().int().optional(),
|
|
102
96
|
seo: z.nullable(z.lazy(() => ExperienceSeo$inboundSchema)).optional(),
|
|
103
97
|
image: z.nullable(z.lazy(() => Image$inboundSchema)).optional(),
|
|
104
|
-
|
|
98
|
+
createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
105
99
|
.optional(),
|
|
106
|
-
|
|
100
|
+
updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
107
101
|
.optional(),
|
|
108
|
-
}).transform((v) => {
|
|
109
|
-
return remap$(v, {
|
|
110
|
-
"access_type": "accessType",
|
|
111
|
-
"item_type": "itemType",
|
|
112
|
-
"prefix_id": "prefixId",
|
|
113
|
-
"type_for_display": "typeForDisplay",
|
|
114
|
-
"active_users_count": "activeUsersCount",
|
|
115
|
-
"created_at": "createdAt",
|
|
116
|
-
"updated_at": "updatedAt",
|
|
117
|
-
});
|
|
118
102
|
});
|
|
119
103
|
|
|
120
104
|
export function experienceFromJSON(
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
6
|
import { safeParse } from "../lib/schemas.js";
|
|
8
7
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
8
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
@@ -24,14 +23,9 @@ export const FileAttachment$inboundSchema: z.ZodType<
|
|
|
24
23
|
> = z.object({
|
|
25
24
|
id: z.number().int().optional(),
|
|
26
25
|
filename: z.string().optional(),
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
contentType: z.string().optional(),
|
|
27
|
+
byteSize: z.number().int().optional(),
|
|
29
28
|
url: z.string().optional(),
|
|
30
|
-
}).transform((v) => {
|
|
31
|
-
return remap$(v, {
|
|
32
|
-
"content_type": "contentType",
|
|
33
|
-
"byte_size": "byteSize",
|
|
34
|
-
});
|
|
35
29
|
});
|
|
36
30
|
|
|
37
31
|
export function fileAttachmentFromJSON(
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
6
|
import { safeParse } from "../lib/schemas.js";
|
|
8
7
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
8
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
@@ -24,14 +23,9 @@ export const ImageAttachment$inboundSchema: z.ZodType<
|
|
|
24
23
|
> = z.object({
|
|
25
24
|
id: z.number().int().optional(),
|
|
26
25
|
filename: z.string().optional(),
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
contentType: z.string().optional(),
|
|
27
|
+
byteSize: z.number().int().optional(),
|
|
29
28
|
url: z.string().optional(),
|
|
30
|
-
}).transform((v) => {
|
|
31
|
-
return remap$(v, {
|
|
32
|
-
"content_type": "contentType",
|
|
33
|
-
"byte_size": "byteSize",
|
|
34
|
-
});
|
|
35
29
|
});
|
|
36
30
|
|
|
37
31
|
export function imageAttachmentFromJSON(
|