@unified-api/typescript-sdk 2.9.13 → 2.9.15
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 +12 -0
- package/docs/sdks/payment/README.md +494 -0
- package/docs/sdks/subscription/README.md +501 -0
- package/funcs/paymentCreatePaymentSubscription.d.ts +13 -0
- package/funcs/paymentCreatePaymentSubscription.d.ts.map +1 -0
- package/funcs/paymentCreatePaymentSubscription.js +105 -0
- package/funcs/paymentCreatePaymentSubscription.js.map +1 -0
- package/funcs/paymentGetPaymentSubscription.d.ts +13 -0
- package/funcs/paymentGetPaymentSubscription.d.ts.map +1 -0
- package/funcs/paymentGetPaymentSubscription.js +106 -0
- package/funcs/paymentGetPaymentSubscription.js.map +1 -0
- package/funcs/paymentListPaymentSubscriptions.d.ts +13 -0
- package/funcs/paymentListPaymentSubscriptions.d.ts.map +1 -0
- package/funcs/paymentListPaymentSubscriptions.js +110 -0
- package/funcs/paymentListPaymentSubscriptions.js.map +1 -0
- package/funcs/paymentPatchPaymentSubscription.d.ts +13 -0
- package/funcs/paymentPatchPaymentSubscription.d.ts.map +1 -0
- package/funcs/paymentPatchPaymentSubscription.js +109 -0
- package/funcs/paymentPatchPaymentSubscription.js.map +1 -0
- package/funcs/paymentRemovePaymentSubscription.d.ts +12 -0
- package/funcs/paymentRemovePaymentSubscription.d.ts.map +1 -0
- package/funcs/paymentRemovePaymentSubscription.js +104 -0
- package/funcs/paymentRemovePaymentSubscription.js.map +1 -0
- package/funcs/paymentUpdatePaymentSubscription.d.ts +13 -0
- package/funcs/paymentUpdatePaymentSubscription.d.ts.map +1 -0
- package/funcs/paymentUpdatePaymentSubscription.js +109 -0
- package/funcs/paymentUpdatePaymentSubscription.js.map +1 -0
- package/funcs/subscriptionCreatePaymentSubscription.d.ts +13 -0
- package/funcs/subscriptionCreatePaymentSubscription.d.ts.map +1 -0
- package/funcs/subscriptionCreatePaymentSubscription.js +105 -0
- package/funcs/subscriptionCreatePaymentSubscription.js.map +1 -0
- package/funcs/subscriptionGetPaymentSubscription.d.ts +13 -0
- package/funcs/subscriptionGetPaymentSubscription.d.ts.map +1 -0
- package/funcs/subscriptionGetPaymentSubscription.js +106 -0
- package/funcs/subscriptionGetPaymentSubscription.js.map +1 -0
- package/funcs/subscriptionListPaymentSubscriptions.d.ts +13 -0
- package/funcs/subscriptionListPaymentSubscriptions.d.ts.map +1 -0
- package/funcs/subscriptionListPaymentSubscriptions.js +110 -0
- package/funcs/subscriptionListPaymentSubscriptions.js.map +1 -0
- package/funcs/subscriptionPatchPaymentSubscription.d.ts +13 -0
- package/funcs/subscriptionPatchPaymentSubscription.d.ts.map +1 -0
- package/funcs/subscriptionPatchPaymentSubscription.js +109 -0
- package/funcs/subscriptionPatchPaymentSubscription.js.map +1 -0
- package/funcs/subscriptionRemovePaymentSubscription.d.ts +12 -0
- package/funcs/subscriptionRemovePaymentSubscription.d.ts.map +1 -0
- package/funcs/subscriptionRemovePaymentSubscription.js +104 -0
- package/funcs/subscriptionRemovePaymentSubscription.js.map +1 -0
- package/funcs/subscriptionUpdatePaymentSubscription.d.ts +13 -0
- package/funcs/subscriptionUpdatePaymentSubscription.d.ts.map +1 -0
- package/funcs/subscriptionUpdatePaymentSubscription.js +109 -0
- package/funcs/subscriptionUpdatePaymentSubscription.js.map +1 -0
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/package.json +1 -1
- package/sdk/models/operations/createpaymentsubscription.d.ts +40 -0
- package/sdk/models/operations/createpaymentsubscription.d.ts.map +1 -0
- package/sdk/models/operations/createpaymentsubscription.js +75 -0
- package/sdk/models/operations/createpaymentsubscription.js.map +1 -0
- package/sdk/models/operations/getpaymentsubscription.d.ts +42 -0
- package/sdk/models/operations/getpaymentsubscription.d.ts.map +1 -0
- package/sdk/models/operations/getpaymentsubscription.js +72 -0
- package/sdk/models/operations/getpaymentsubscription.js.map +1 -0
- package/sdk/models/operations/getunifiedintegrationauth.d.ts +6 -0
- package/sdk/models/operations/getunifiedintegrationauth.d.ts.map +1 -1
- package/sdk/models/operations/getunifiedintegrationauth.js +2 -0
- package/sdk/models/operations/getunifiedintegrationauth.js.map +1 -1
- package/sdk/models/operations/index.d.ts +6 -0
- package/sdk/models/operations/index.d.ts.map +1 -1
- package/sdk/models/operations/index.js +6 -0
- package/sdk/models/operations/index.js.map +1 -1
- package/sdk/models/operations/listpaymentsubscriptions.d.ts +57 -0
- package/sdk/models/operations/listpaymentsubscriptions.d.ts.map +1 -0
- package/sdk/models/operations/listpaymentsubscriptions.js +89 -0
- package/sdk/models/operations/listpaymentsubscriptions.js.map +1 -0
- package/sdk/models/operations/patchpaymentsubscription.d.ts +45 -0
- package/sdk/models/operations/patchpaymentsubscription.d.ts.map +1 -0
- package/sdk/models/operations/patchpaymentsubscription.js +77 -0
- package/sdk/models/operations/patchpaymentsubscription.js.map +1 -0
- package/sdk/models/operations/removepaymentsubscription.d.ts +66 -0
- package/sdk/models/operations/removepaymentsubscription.d.ts.map +1 -0
- package/sdk/models/operations/removepaymentsubscription.js +105 -0
- package/sdk/models/operations/removepaymentsubscription.js.map +1 -0
- package/sdk/models/operations/updatepaymentsubscription.d.ts +45 -0
- package/sdk/models/operations/updatepaymentsubscription.d.ts.map +1 -0
- package/sdk/models/operations/updatepaymentsubscription.js +77 -0
- package/sdk/models/operations/updatepaymentsubscription.js.map +1 -0
- package/sdk/models/shared/accountingjournal.d.ts +2 -2
- package/sdk/models/shared/accountingjournal.d.ts.map +1 -1
- package/sdk/models/shared/accountingjournal.js +6 -4
- package/sdk/models/shared/accountingjournal.js.map +1 -1
- package/sdk/models/shared/crmevent.d.ts +18 -0
- package/sdk/models/shared/crmevent.d.ts.map +1 -1
- package/sdk/models/shared/crmevent.js +16 -0
- package/sdk/models/shared/crmevent.js.map +1 -1
- package/sdk/models/shared/crmeventformfield.d.ts +95 -0
- package/sdk/models/shared/crmeventformfield.d.ts.map +1 -0
- package/sdk/models/shared/crmeventformfield.js +96 -0
- package/sdk/models/shared/crmeventformfield.js.map +1 -0
- package/sdk/models/shared/crmeventformoption.d.ts +31 -0
- package/sdk/models/shared/crmeventformoption.d.ts.map +1 -0
- package/sdk/models/shared/crmeventformoption.js +61 -0
- package/sdk/models/shared/crmeventformoption.js.map +1 -0
- package/sdk/models/shared/index.d.ts +7 -1
- package/sdk/models/shared/index.d.ts.map +1 -1
- package/sdk/models/shared/index.js +7 -1
- package/sdk/models/shared/index.js.map +1 -1
- package/sdk/models/shared/{paymentlinklineitem.d.ts → paymentlineitem.d.ts} +14 -14
- package/sdk/models/shared/paymentlineitem.d.ts.map +1 -0
- package/sdk/models/shared/{paymentlinklineitem.js → paymentlineitem.js} +17 -17
- package/sdk/models/shared/paymentlineitem.js.map +1 -0
- package/sdk/models/shared/paymentlink.d.ts +3 -3
- package/sdk/models/shared/paymentlink.d.ts.map +1 -1
- package/sdk/models/shared/paymentlink.js +3 -3
- package/sdk/models/shared/paymentlink.js.map +1 -1
- package/sdk/models/shared/paymentrefund.d.ts +2 -2
- package/sdk/models/shared/paymentrefund.d.ts.map +1 -1
- package/sdk/models/shared/paymentrefund.js +6 -4
- package/sdk/models/shared/paymentrefund.js.map +1 -1
- package/sdk/models/shared/paymentsubscription.d.ts +135 -0
- package/sdk/models/shared/paymentsubscription.d.ts.map +1 -0
- package/sdk/models/shared/paymentsubscription.js +176 -0
- package/sdk/models/shared/paymentsubscription.js.map +1 -0
- package/sdk/models/shared/propertyconnectionpermissions.d.ts +6 -0
- package/sdk/models/shared/propertyconnectionpermissions.d.ts.map +1 -1
- package/sdk/models/shared/propertyconnectionpermissions.js +2 -0
- package/sdk/models/shared/propertyconnectionpermissions.js.map +1 -1
- package/sdk/models/shared/propertycrmeventform.d.ts +36 -0
- package/sdk/models/shared/propertycrmeventform.d.ts.map +1 -0
- package/sdk/models/shared/propertycrmeventform.js +78 -0
- package/sdk/models/shared/propertycrmeventform.js.map +1 -0
- package/sdk/models/shared/propertycrmeventmarketingemail.d.ts +47 -0
- package/sdk/models/shared/propertycrmeventmarketingemail.d.ts.map +1 -0
- package/sdk/models/shared/propertycrmeventmarketingemail.js +80 -0
- package/sdk/models/shared/propertycrmeventmarketingemail.js.map +1 -0
- package/sdk/models/shared/propertycrmeventpageview.d.ts +33 -0
- package/sdk/models/shared/propertycrmeventpageview.d.ts.map +1 -0
- package/sdk/models/shared/propertycrmeventpageview.js +63 -0
- package/sdk/models/shared/propertycrmeventpageview.js.map +1 -0
- package/sdk/models/shared/repoorganization.d.ts +4 -4
- package/sdk/models/shared/repoorganization.d.ts.map +1 -1
- package/sdk/models/shared/repoorganization.js +8 -6
- package/sdk/models/shared/repoorganization.js.map +1 -1
- package/sdk/models/shared/ticketingnote.d.ts +1 -1
- package/sdk/models/shared/ticketingnote.d.ts.map +1 -1
- package/sdk/models/shared/ticketingnote.js +3 -2
- package/sdk/models/shared/ticketingnote.js.map +1 -1
- package/sdk/models/shared/webhook.d.ts +3 -0
- package/sdk/models/shared/webhook.d.ts.map +1 -1
- package/sdk/models/shared/webhook.js +1 -0
- package/sdk/models/shared/webhook.js.map +1 -1
- package/sdk/payment.d.ts +24 -0
- package/sdk/payment.d.ts.map +1 -1
- package/sdk/payment.js +42 -0
- package/sdk/payment.js.map +1 -1
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/sdk/subscription.d.ts +30 -0
- package/sdk/subscription.d.ts.map +1 -0
- package/sdk/subscription.js +54 -0
- package/sdk/subscription.js.map +1 -0
- package/src/funcs/paymentCreatePaymentSubscription.ts +136 -0
- package/src/funcs/paymentGetPaymentSubscription.ts +139 -0
- package/src/funcs/paymentListPaymentSubscriptions.ts +141 -0
- package/src/funcs/paymentPatchPaymentSubscription.ts +142 -0
- package/src/funcs/paymentRemovePaymentSubscription.ts +145 -0
- package/src/funcs/paymentUpdatePaymentSubscription.ts +142 -0
- package/src/funcs/subscriptionCreatePaymentSubscription.ts +136 -0
- package/src/funcs/subscriptionGetPaymentSubscription.ts +139 -0
- package/src/funcs/subscriptionListPaymentSubscriptions.ts +141 -0
- package/src/funcs/subscriptionPatchPaymentSubscription.ts +142 -0
- package/src/funcs/subscriptionRemovePaymentSubscription.ts +145 -0
- package/src/funcs/subscriptionUpdatePaymentSubscription.ts +142 -0
- package/src/lib/config.ts +2 -2
- package/src/sdk/models/operations/createpaymentsubscription.ts +94 -0
- package/src/sdk/models/operations/getpaymentsubscription.ts +94 -0
- package/src/sdk/models/operations/getunifiedintegrationauth.ts +2 -0
- package/src/sdk/models/operations/index.ts +6 -0
- package/src/sdk/models/operations/listpaymentsubscriptions.ts +126 -0
- package/src/sdk/models/operations/patchpaymentsubscription.ts +101 -0
- package/src/sdk/models/operations/removepaymentsubscription.ts +156 -0
- package/src/sdk/models/operations/updatepaymentsubscription.ts +101 -0
- package/src/sdk/models/shared/accountingjournal.ts +8 -6
- package/src/sdk/models/shared/crmevent.ts +37 -0
- package/src/sdk/models/shared/crmeventformfield.ts +123 -0
- package/src/sdk/models/shared/crmeventformoption.ts +70 -0
- package/src/sdk/models/shared/index.ts +7 -1
- package/src/sdk/models/shared/{paymentlinklineitem.ts → paymentlineitem.ts} +21 -23
- package/src/sdk/models/shared/paymentlink.ts +9 -9
- package/src/sdk/models/shared/paymentrefund.ts +8 -6
- package/src/sdk/models/shared/paymentsubscription.ts +247 -0
- package/src/sdk/models/shared/propertyconnectionpermissions.ts +2 -0
- package/src/sdk/models/shared/propertycrmeventform.ts +96 -0
- package/src/sdk/models/shared/propertycrmeventmarketingemail.ts +107 -0
- package/src/sdk/models/shared/propertycrmeventpageview.ts +74 -0
- package/src/sdk/models/shared/repoorganization.ts +12 -10
- package/src/sdk/models/shared/ticketingnote.ts +4 -3
- package/src/sdk/models/shared/webhook.ts +1 -0
- package/src/sdk/payment.ts +90 -0
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/subscription.ts +100 -0
- package/sdk/models/shared/paymentlinklineitem.d.ts.map +0 -1
- package/sdk/models/shared/paymentlinklineitem.js.map +0 -1
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
import {
|
|
12
|
+
PaymentLineitem,
|
|
13
|
+
PaymentLineitem$inboundSchema,
|
|
14
|
+
PaymentLineitem$Outbound,
|
|
15
|
+
PaymentLineitem$outboundSchema,
|
|
16
|
+
} from "./paymentlineitem.js";
|
|
17
|
+
|
|
18
|
+
export const IntervalUnit = {
|
|
19
|
+
Year: "YEAR",
|
|
20
|
+
Month: "MONTH",
|
|
21
|
+
Week: "WEEK",
|
|
22
|
+
Day: "DAY",
|
|
23
|
+
} as const;
|
|
24
|
+
export type IntervalUnit = ClosedEnum<typeof IntervalUnit>;
|
|
25
|
+
|
|
26
|
+
export const PaymentSubscriptionStatus = {
|
|
27
|
+
Active: "ACTIVE",
|
|
28
|
+
Inactive: "INACTIVE",
|
|
29
|
+
Canceled: "CANCELED",
|
|
30
|
+
Paused: "PAUSED",
|
|
31
|
+
} as const;
|
|
32
|
+
export type PaymentSubscriptionStatus = ClosedEnum<
|
|
33
|
+
typeof PaymentSubscriptionStatus
|
|
34
|
+
>;
|
|
35
|
+
|
|
36
|
+
export type PaymentSubscription = {
|
|
37
|
+
canceledAt?: Date | undefined;
|
|
38
|
+
contactId?: string | undefined;
|
|
39
|
+
createdAt?: Date | undefined;
|
|
40
|
+
currency?: string | undefined;
|
|
41
|
+
currentPeriodEndAt?: Date | undefined;
|
|
42
|
+
currentPeriodStartAt?: Date | undefined;
|
|
43
|
+
dayOfMonth?: number | undefined;
|
|
44
|
+
dayOfWeek?: number | undefined;
|
|
45
|
+
description?: string | undefined;
|
|
46
|
+
endAt?: Date | undefined;
|
|
47
|
+
id?: string | undefined;
|
|
48
|
+
interval?: number | undefined;
|
|
49
|
+
intervalUnit?: IntervalUnit | undefined;
|
|
50
|
+
invoiceId?: string | undefined;
|
|
51
|
+
lineitems?: Array<PaymentLineitem> | undefined;
|
|
52
|
+
month?: number | undefined;
|
|
53
|
+
raw?: { [k: string]: any } | undefined;
|
|
54
|
+
startAt?: Date | undefined;
|
|
55
|
+
status?: PaymentSubscriptionStatus | undefined;
|
|
56
|
+
updatedAt?: Date | undefined;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/** @internal */
|
|
60
|
+
export const IntervalUnit$inboundSchema: z.ZodNativeEnum<typeof IntervalUnit> =
|
|
61
|
+
z.nativeEnum(IntervalUnit);
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export const IntervalUnit$outboundSchema: z.ZodNativeEnum<typeof IntervalUnit> =
|
|
65
|
+
IntervalUnit$inboundSchema;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @internal
|
|
69
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
70
|
+
*/
|
|
71
|
+
export namespace IntervalUnit$ {
|
|
72
|
+
/** @deprecated use `IntervalUnit$inboundSchema` instead. */
|
|
73
|
+
export const inboundSchema = IntervalUnit$inboundSchema;
|
|
74
|
+
/** @deprecated use `IntervalUnit$outboundSchema` instead. */
|
|
75
|
+
export const outboundSchema = IntervalUnit$outboundSchema;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** @internal */
|
|
79
|
+
export const PaymentSubscriptionStatus$inboundSchema: z.ZodNativeEnum<
|
|
80
|
+
typeof PaymentSubscriptionStatus
|
|
81
|
+
> = z.nativeEnum(PaymentSubscriptionStatus);
|
|
82
|
+
|
|
83
|
+
/** @internal */
|
|
84
|
+
export const PaymentSubscriptionStatus$outboundSchema: z.ZodNativeEnum<
|
|
85
|
+
typeof PaymentSubscriptionStatus
|
|
86
|
+
> = PaymentSubscriptionStatus$inboundSchema;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @internal
|
|
90
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
91
|
+
*/
|
|
92
|
+
export namespace PaymentSubscriptionStatus$ {
|
|
93
|
+
/** @deprecated use `PaymentSubscriptionStatus$inboundSchema` instead. */
|
|
94
|
+
export const inboundSchema = PaymentSubscriptionStatus$inboundSchema;
|
|
95
|
+
/** @deprecated use `PaymentSubscriptionStatus$outboundSchema` instead. */
|
|
96
|
+
export const outboundSchema = PaymentSubscriptionStatus$outboundSchema;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** @internal */
|
|
100
|
+
export const PaymentSubscription$inboundSchema: z.ZodType<
|
|
101
|
+
PaymentSubscription,
|
|
102
|
+
z.ZodTypeDef,
|
|
103
|
+
unknown
|
|
104
|
+
> = z.object({
|
|
105
|
+
canceled_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
106
|
+
.optional(),
|
|
107
|
+
contact_id: z.string().optional(),
|
|
108
|
+
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
109
|
+
.optional(),
|
|
110
|
+
currency: z.string().optional(),
|
|
111
|
+
current_period_end_at: z.string().datetime({ offset: true }).transform(v =>
|
|
112
|
+
new Date(v)
|
|
113
|
+
).optional(),
|
|
114
|
+
current_period_start_at: z.string().datetime({ offset: true }).transform(v =>
|
|
115
|
+
new Date(v)
|
|
116
|
+
).optional(),
|
|
117
|
+
day_of_month: z.number().optional(),
|
|
118
|
+
day_of_week: z.number().optional(),
|
|
119
|
+
description: z.string().optional(),
|
|
120
|
+
end_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
121
|
+
.optional(),
|
|
122
|
+
id: z.string().optional(),
|
|
123
|
+
interval: z.number().optional(),
|
|
124
|
+
interval_unit: IntervalUnit$inboundSchema.optional(),
|
|
125
|
+
invoice_id: z.string().optional(),
|
|
126
|
+
lineitems: z.array(PaymentLineitem$inboundSchema).optional(),
|
|
127
|
+
month: z.number().optional(),
|
|
128
|
+
raw: z.record(z.any()).optional(),
|
|
129
|
+
start_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
130
|
+
.optional(),
|
|
131
|
+
status: PaymentSubscriptionStatus$inboundSchema.optional(),
|
|
132
|
+
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
133
|
+
.optional(),
|
|
134
|
+
}).transform((v) => {
|
|
135
|
+
return remap$(v, {
|
|
136
|
+
"canceled_at": "canceledAt",
|
|
137
|
+
"contact_id": "contactId",
|
|
138
|
+
"created_at": "createdAt",
|
|
139
|
+
"current_period_end_at": "currentPeriodEndAt",
|
|
140
|
+
"current_period_start_at": "currentPeriodStartAt",
|
|
141
|
+
"day_of_month": "dayOfMonth",
|
|
142
|
+
"day_of_week": "dayOfWeek",
|
|
143
|
+
"end_at": "endAt",
|
|
144
|
+
"interval_unit": "intervalUnit",
|
|
145
|
+
"invoice_id": "invoiceId",
|
|
146
|
+
"start_at": "startAt",
|
|
147
|
+
"updated_at": "updatedAt",
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
/** @internal */
|
|
152
|
+
export type PaymentSubscription$Outbound = {
|
|
153
|
+
canceled_at?: string | undefined;
|
|
154
|
+
contact_id?: string | undefined;
|
|
155
|
+
created_at?: string | undefined;
|
|
156
|
+
currency?: string | undefined;
|
|
157
|
+
current_period_end_at?: string | undefined;
|
|
158
|
+
current_period_start_at?: string | undefined;
|
|
159
|
+
day_of_month?: number | undefined;
|
|
160
|
+
day_of_week?: number | undefined;
|
|
161
|
+
description?: string | undefined;
|
|
162
|
+
end_at?: string | undefined;
|
|
163
|
+
id?: string | undefined;
|
|
164
|
+
interval?: number | undefined;
|
|
165
|
+
interval_unit?: string | undefined;
|
|
166
|
+
invoice_id?: string | undefined;
|
|
167
|
+
lineitems?: Array<PaymentLineitem$Outbound> | undefined;
|
|
168
|
+
month?: number | undefined;
|
|
169
|
+
raw?: { [k: string]: any } | undefined;
|
|
170
|
+
start_at?: string | undefined;
|
|
171
|
+
status?: string | undefined;
|
|
172
|
+
updated_at?: string | undefined;
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
/** @internal */
|
|
176
|
+
export const PaymentSubscription$outboundSchema: z.ZodType<
|
|
177
|
+
PaymentSubscription$Outbound,
|
|
178
|
+
z.ZodTypeDef,
|
|
179
|
+
PaymentSubscription
|
|
180
|
+
> = z.object({
|
|
181
|
+
canceledAt: z.date().transform(v => v.toISOString()).optional(),
|
|
182
|
+
contactId: z.string().optional(),
|
|
183
|
+
createdAt: z.date().transform(v => v.toISOString()).optional(),
|
|
184
|
+
currency: z.string().optional(),
|
|
185
|
+
currentPeriodEndAt: z.date().transform(v => v.toISOString()).optional(),
|
|
186
|
+
currentPeriodStartAt: z.date().transform(v => v.toISOString()).optional(),
|
|
187
|
+
dayOfMonth: z.number().optional(),
|
|
188
|
+
dayOfWeek: z.number().optional(),
|
|
189
|
+
description: z.string().optional(),
|
|
190
|
+
endAt: z.date().transform(v => v.toISOString()).optional(),
|
|
191
|
+
id: z.string().optional(),
|
|
192
|
+
interval: z.number().optional(),
|
|
193
|
+
intervalUnit: IntervalUnit$outboundSchema.optional(),
|
|
194
|
+
invoiceId: z.string().optional(),
|
|
195
|
+
lineitems: z.array(PaymentLineitem$outboundSchema).optional(),
|
|
196
|
+
month: z.number().optional(),
|
|
197
|
+
raw: z.record(z.any()).optional(),
|
|
198
|
+
startAt: z.date().transform(v => v.toISOString()).optional(),
|
|
199
|
+
status: PaymentSubscriptionStatus$outboundSchema.optional(),
|
|
200
|
+
updatedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
201
|
+
}).transform((v) => {
|
|
202
|
+
return remap$(v, {
|
|
203
|
+
canceledAt: "canceled_at",
|
|
204
|
+
contactId: "contact_id",
|
|
205
|
+
createdAt: "created_at",
|
|
206
|
+
currentPeriodEndAt: "current_period_end_at",
|
|
207
|
+
currentPeriodStartAt: "current_period_start_at",
|
|
208
|
+
dayOfMonth: "day_of_month",
|
|
209
|
+
dayOfWeek: "day_of_week",
|
|
210
|
+
endAt: "end_at",
|
|
211
|
+
intervalUnit: "interval_unit",
|
|
212
|
+
invoiceId: "invoice_id",
|
|
213
|
+
startAt: "start_at",
|
|
214
|
+
updatedAt: "updated_at",
|
|
215
|
+
});
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* @internal
|
|
220
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
221
|
+
*/
|
|
222
|
+
export namespace PaymentSubscription$ {
|
|
223
|
+
/** @deprecated use `PaymentSubscription$inboundSchema` instead. */
|
|
224
|
+
export const inboundSchema = PaymentSubscription$inboundSchema;
|
|
225
|
+
/** @deprecated use `PaymentSubscription$outboundSchema` instead. */
|
|
226
|
+
export const outboundSchema = PaymentSubscription$outboundSchema;
|
|
227
|
+
/** @deprecated use `PaymentSubscription$Outbound` instead. */
|
|
228
|
+
export type Outbound = PaymentSubscription$Outbound;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export function paymentSubscriptionToJSON(
|
|
232
|
+
paymentSubscription: PaymentSubscription,
|
|
233
|
+
): string {
|
|
234
|
+
return JSON.stringify(
|
|
235
|
+
PaymentSubscription$outboundSchema.parse(paymentSubscription),
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export function paymentSubscriptionFromJSON(
|
|
240
|
+
jsonString: string,
|
|
241
|
+
): SafeParseResult<PaymentSubscription, SDKValidationError> {
|
|
242
|
+
return safeParse(
|
|
243
|
+
jsonString,
|
|
244
|
+
(x) => PaymentSubscription$inboundSchema.parse(JSON.parse(x)),
|
|
245
|
+
`Failed to parse 'PaymentSubscription' from JSON`,
|
|
246
|
+
);
|
|
247
|
+
}
|
|
@@ -28,6 +28,8 @@ export const PropertyConnectionPermissions = {
|
|
|
28
28
|
PaymentRefundRead: "payment_refund_read",
|
|
29
29
|
PaymentLinkRead: "payment_link_read",
|
|
30
30
|
PaymentLinkWrite: "payment_link_write",
|
|
31
|
+
PaymentSubscriptionRead: "payment_subscription_read",
|
|
32
|
+
PaymentSubscriptionWrite: "payment_subscription_write",
|
|
31
33
|
CommerceItemRead: "commerce_item_read",
|
|
32
34
|
CommerceItemWrite: "commerce_item_write",
|
|
33
35
|
CommerceCollectionRead: "commerce_collection_read",
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
CrmEventFormField,
|
|
12
|
+
CrmEventFormField$inboundSchema,
|
|
13
|
+
CrmEventFormField$Outbound,
|
|
14
|
+
CrmEventFormField$outboundSchema,
|
|
15
|
+
} from "./crmeventformfield.js";
|
|
16
|
+
|
|
17
|
+
export type PropertyCrmEventForm = {
|
|
18
|
+
archivedAt?: Date | undefined;
|
|
19
|
+
fields?: Array<CrmEventFormField> | undefined;
|
|
20
|
+
name?: string | undefined;
|
|
21
|
+
redirectUrl?: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const PropertyCrmEventForm$inboundSchema: z.ZodType<
|
|
26
|
+
PropertyCrmEventForm,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
unknown
|
|
29
|
+
> = z.object({
|
|
30
|
+
archived_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
31
|
+
.optional(),
|
|
32
|
+
fields: z.array(CrmEventFormField$inboundSchema).optional(),
|
|
33
|
+
name: z.string().optional(),
|
|
34
|
+
redirect_url: z.string().optional(),
|
|
35
|
+
}).transform((v) => {
|
|
36
|
+
return remap$(v, {
|
|
37
|
+
"archived_at": "archivedAt",
|
|
38
|
+
"redirect_url": "redirectUrl",
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export type PropertyCrmEventForm$Outbound = {
|
|
44
|
+
archived_at?: string | undefined;
|
|
45
|
+
fields?: Array<CrmEventFormField$Outbound> | undefined;
|
|
46
|
+
name?: string | undefined;
|
|
47
|
+
redirect_url?: string | undefined;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export const PropertyCrmEventForm$outboundSchema: z.ZodType<
|
|
52
|
+
PropertyCrmEventForm$Outbound,
|
|
53
|
+
z.ZodTypeDef,
|
|
54
|
+
PropertyCrmEventForm
|
|
55
|
+
> = z.object({
|
|
56
|
+
archivedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
57
|
+
fields: z.array(CrmEventFormField$outboundSchema).optional(),
|
|
58
|
+
name: z.string().optional(),
|
|
59
|
+
redirectUrl: z.string().optional(),
|
|
60
|
+
}).transform((v) => {
|
|
61
|
+
return remap$(v, {
|
|
62
|
+
archivedAt: "archived_at",
|
|
63
|
+
redirectUrl: "redirect_url",
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @internal
|
|
69
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
70
|
+
*/
|
|
71
|
+
export namespace PropertyCrmEventForm$ {
|
|
72
|
+
/** @deprecated use `PropertyCrmEventForm$inboundSchema` instead. */
|
|
73
|
+
export const inboundSchema = PropertyCrmEventForm$inboundSchema;
|
|
74
|
+
/** @deprecated use `PropertyCrmEventForm$outboundSchema` instead. */
|
|
75
|
+
export const outboundSchema = PropertyCrmEventForm$outboundSchema;
|
|
76
|
+
/** @deprecated use `PropertyCrmEventForm$Outbound` instead. */
|
|
77
|
+
export type Outbound = PropertyCrmEventForm$Outbound;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function propertyCrmEventFormToJSON(
|
|
81
|
+
propertyCrmEventForm: PropertyCrmEventForm,
|
|
82
|
+
): string {
|
|
83
|
+
return JSON.stringify(
|
|
84
|
+
PropertyCrmEventForm$outboundSchema.parse(propertyCrmEventForm),
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function propertyCrmEventFormFromJSON(
|
|
89
|
+
jsonString: string,
|
|
90
|
+
): SafeParseResult<PropertyCrmEventForm, SDKValidationError> {
|
|
91
|
+
return safeParse(
|
|
92
|
+
jsonString,
|
|
93
|
+
(x) => PropertyCrmEventForm$inboundSchema.parse(JSON.parse(x)),
|
|
94
|
+
`Failed to parse 'PropertyCrmEventForm' from JSON`,
|
|
95
|
+
);
|
|
96
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type PropertyCrmEventMarketingEmail = {
|
|
12
|
+
attachmentFileIds?: Array<string> | undefined;
|
|
13
|
+
body?: string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* The event email's cc name & email (name <test@test.com>)
|
|
16
|
+
*/
|
|
17
|
+
cc?: Array<string> | undefined;
|
|
18
|
+
from?: string | undefined;
|
|
19
|
+
name?: string | undefined;
|
|
20
|
+
subject?: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* The event email's "to" name & email (name <test@test.com>)
|
|
23
|
+
*/
|
|
24
|
+
to?: Array<string> | undefined;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const PropertyCrmEventMarketingEmail$inboundSchema: z.ZodType<
|
|
29
|
+
PropertyCrmEventMarketingEmail,
|
|
30
|
+
z.ZodTypeDef,
|
|
31
|
+
unknown
|
|
32
|
+
> = z.object({
|
|
33
|
+
attachment_file_ids: z.array(z.string()).optional(),
|
|
34
|
+
body: z.string().optional(),
|
|
35
|
+
cc: z.array(z.string()).optional(),
|
|
36
|
+
from: z.string().optional(),
|
|
37
|
+
name: z.string().optional(),
|
|
38
|
+
subject: z.string().optional(),
|
|
39
|
+
to: z.array(z.string()).optional(),
|
|
40
|
+
}).transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
"attachment_file_ids": "attachmentFileIds",
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export type PropertyCrmEventMarketingEmail$Outbound = {
|
|
48
|
+
attachment_file_ids?: Array<string> | undefined;
|
|
49
|
+
body?: string | undefined;
|
|
50
|
+
cc?: Array<string> | undefined;
|
|
51
|
+
from?: string | undefined;
|
|
52
|
+
name?: string | undefined;
|
|
53
|
+
subject?: string | undefined;
|
|
54
|
+
to?: Array<string> | undefined;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const PropertyCrmEventMarketingEmail$outboundSchema: z.ZodType<
|
|
59
|
+
PropertyCrmEventMarketingEmail$Outbound,
|
|
60
|
+
z.ZodTypeDef,
|
|
61
|
+
PropertyCrmEventMarketingEmail
|
|
62
|
+
> = z.object({
|
|
63
|
+
attachmentFileIds: z.array(z.string()).optional(),
|
|
64
|
+
body: z.string().optional(),
|
|
65
|
+
cc: z.array(z.string()).optional(),
|
|
66
|
+
from: z.string().optional(),
|
|
67
|
+
name: z.string().optional(),
|
|
68
|
+
subject: z.string().optional(),
|
|
69
|
+
to: z.array(z.string()).optional(),
|
|
70
|
+
}).transform((v) => {
|
|
71
|
+
return remap$(v, {
|
|
72
|
+
attachmentFileIds: "attachment_file_ids",
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @internal
|
|
78
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
79
|
+
*/
|
|
80
|
+
export namespace PropertyCrmEventMarketingEmail$ {
|
|
81
|
+
/** @deprecated use `PropertyCrmEventMarketingEmail$inboundSchema` instead. */
|
|
82
|
+
export const inboundSchema = PropertyCrmEventMarketingEmail$inboundSchema;
|
|
83
|
+
/** @deprecated use `PropertyCrmEventMarketingEmail$outboundSchema` instead. */
|
|
84
|
+
export const outboundSchema = PropertyCrmEventMarketingEmail$outboundSchema;
|
|
85
|
+
/** @deprecated use `PropertyCrmEventMarketingEmail$Outbound` instead. */
|
|
86
|
+
export type Outbound = PropertyCrmEventMarketingEmail$Outbound;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function propertyCrmEventMarketingEmailToJSON(
|
|
90
|
+
propertyCrmEventMarketingEmail: PropertyCrmEventMarketingEmail,
|
|
91
|
+
): string {
|
|
92
|
+
return JSON.stringify(
|
|
93
|
+
PropertyCrmEventMarketingEmail$outboundSchema.parse(
|
|
94
|
+
propertyCrmEventMarketingEmail,
|
|
95
|
+
),
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function propertyCrmEventMarketingEmailFromJSON(
|
|
100
|
+
jsonString: string,
|
|
101
|
+
): SafeParseResult<PropertyCrmEventMarketingEmail, SDKValidationError> {
|
|
102
|
+
return safeParse(
|
|
103
|
+
jsonString,
|
|
104
|
+
(x) => PropertyCrmEventMarketingEmail$inboundSchema.parse(JSON.parse(x)),
|
|
105
|
+
`Failed to parse 'PropertyCrmEventMarketingEmail' from JSON`,
|
|
106
|
+
);
|
|
107
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type PropertyCrmEventPageView = {
|
|
11
|
+
average?: number | undefined;
|
|
12
|
+
count?: number | undefined;
|
|
13
|
+
url?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const PropertyCrmEventPageView$inboundSchema: z.ZodType<
|
|
18
|
+
PropertyCrmEventPageView,
|
|
19
|
+
z.ZodTypeDef,
|
|
20
|
+
unknown
|
|
21
|
+
> = z.object({
|
|
22
|
+
average: z.number().optional(),
|
|
23
|
+
count: z.number().optional(),
|
|
24
|
+
url: z.string().optional(),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export type PropertyCrmEventPageView$Outbound = {
|
|
29
|
+
average?: number | undefined;
|
|
30
|
+
count?: number | undefined;
|
|
31
|
+
url?: string | undefined;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const PropertyCrmEventPageView$outboundSchema: z.ZodType<
|
|
36
|
+
PropertyCrmEventPageView$Outbound,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
PropertyCrmEventPageView
|
|
39
|
+
> = z.object({
|
|
40
|
+
average: z.number().optional(),
|
|
41
|
+
count: z.number().optional(),
|
|
42
|
+
url: z.string().optional(),
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @internal
|
|
47
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
48
|
+
*/
|
|
49
|
+
export namespace PropertyCrmEventPageView$ {
|
|
50
|
+
/** @deprecated use `PropertyCrmEventPageView$inboundSchema` instead. */
|
|
51
|
+
export const inboundSchema = PropertyCrmEventPageView$inboundSchema;
|
|
52
|
+
/** @deprecated use `PropertyCrmEventPageView$outboundSchema` instead. */
|
|
53
|
+
export const outboundSchema = PropertyCrmEventPageView$outboundSchema;
|
|
54
|
+
/** @deprecated use `PropertyCrmEventPageView$Outbound` instead. */
|
|
55
|
+
export type Outbound = PropertyCrmEventPageView$Outbound;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function propertyCrmEventPageViewToJSON(
|
|
59
|
+
propertyCrmEventPageView: PropertyCrmEventPageView,
|
|
60
|
+
): string {
|
|
61
|
+
return JSON.stringify(
|
|
62
|
+
PropertyCrmEventPageView$outboundSchema.parse(propertyCrmEventPageView),
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function propertyCrmEventPageViewFromJSON(
|
|
67
|
+
jsonString: string,
|
|
68
|
+
): SafeParseResult<PropertyCrmEventPageView, SDKValidationError> {
|
|
69
|
+
return safeParse(
|
|
70
|
+
jsonString,
|
|
71
|
+
(x) => PropertyCrmEventPageView$inboundSchema.parse(JSON.parse(x)),
|
|
72
|
+
`Failed to parse 'PropertyCrmEventPageView' from JSON`,
|
|
73
|
+
);
|
|
74
|
+
}
|
|
@@ -10,12 +10,12 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
10
10
|
|
|
11
11
|
export type RepoOrganization = {
|
|
12
12
|
avatarUrl?: string | undefined;
|
|
13
|
-
createdAt?:
|
|
13
|
+
createdAt?: Date | undefined;
|
|
14
14
|
description?: string | undefined;
|
|
15
15
|
id?: string | undefined;
|
|
16
|
-
name
|
|
16
|
+
name?: string | undefined;
|
|
17
17
|
raw?: { [k: string]: any } | undefined;
|
|
18
|
-
updatedAt?:
|
|
18
|
+
updatedAt?: Date | undefined;
|
|
19
19
|
webUrl?: string | undefined;
|
|
20
20
|
};
|
|
21
21
|
|
|
@@ -26,12 +26,14 @@ export const RepoOrganization$inboundSchema: z.ZodType<
|
|
|
26
26
|
unknown
|
|
27
27
|
> = z.object({
|
|
28
28
|
avatar_url: z.string().optional(),
|
|
29
|
-
created_at: z.string().
|
|
29
|
+
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
30
|
+
.optional(),
|
|
30
31
|
description: z.string().optional(),
|
|
31
32
|
id: z.string().optional(),
|
|
32
|
-
name: z.string(),
|
|
33
|
+
name: z.string().optional(),
|
|
33
34
|
raw: z.record(z.any()).optional(),
|
|
34
|
-
updated_at: z.string().
|
|
35
|
+
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
36
|
+
.optional(),
|
|
35
37
|
web_url: z.string().optional(),
|
|
36
38
|
}).transform((v) => {
|
|
37
39
|
return remap$(v, {
|
|
@@ -48,7 +50,7 @@ export type RepoOrganization$Outbound = {
|
|
|
48
50
|
created_at?: string | undefined;
|
|
49
51
|
description?: string | undefined;
|
|
50
52
|
id?: string | undefined;
|
|
51
|
-
name
|
|
53
|
+
name?: string | undefined;
|
|
52
54
|
raw?: { [k: string]: any } | undefined;
|
|
53
55
|
updated_at?: string | undefined;
|
|
54
56
|
web_url?: string | undefined;
|
|
@@ -61,12 +63,12 @@ export const RepoOrganization$outboundSchema: z.ZodType<
|
|
|
61
63
|
RepoOrganization
|
|
62
64
|
> = z.object({
|
|
63
65
|
avatarUrl: z.string().optional(),
|
|
64
|
-
createdAt: z.
|
|
66
|
+
createdAt: z.date().transform(v => v.toISOString()).optional(),
|
|
65
67
|
description: z.string().optional(),
|
|
66
68
|
id: z.string().optional(),
|
|
67
|
-
name: z.string(),
|
|
69
|
+
name: z.string().optional(),
|
|
68
70
|
raw: z.record(z.any()).optional(),
|
|
69
|
-
updatedAt: z.
|
|
71
|
+
updatedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
70
72
|
webUrl: z.string().optional(),
|
|
71
73
|
}).transform((v) => {
|
|
72
74
|
return remap$(v, {
|
|
@@ -15,7 +15,7 @@ export type TicketingNote = {
|
|
|
15
15
|
id?: string | undefined;
|
|
16
16
|
raw?: { [k: string]: any } | undefined;
|
|
17
17
|
ticketId?: string | undefined;
|
|
18
|
-
updatedAt?:
|
|
18
|
+
updatedAt?: Date | undefined;
|
|
19
19
|
userId?: string | undefined;
|
|
20
20
|
};
|
|
21
21
|
|
|
@@ -32,7 +32,8 @@ export const TicketingNote$inboundSchema: z.ZodType<
|
|
|
32
32
|
id: z.string().optional(),
|
|
33
33
|
raw: z.record(z.any()).optional(),
|
|
34
34
|
ticket_id: z.string().optional(),
|
|
35
|
-
updated_at: z.string().
|
|
35
|
+
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
36
|
+
.optional(),
|
|
36
37
|
user_id: z.string().optional(),
|
|
37
38
|
}).transform((v) => {
|
|
38
39
|
return remap$(v, {
|
|
@@ -68,7 +69,7 @@ export const TicketingNote$outboundSchema: z.ZodType<
|
|
|
68
69
|
id: z.string().optional(),
|
|
69
70
|
raw: z.record(z.any()).optional(),
|
|
70
71
|
ticketId: z.string().optional(),
|
|
71
|
-
updatedAt: z.
|
|
72
|
+
updatedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
72
73
|
userId: z.string().optional(),
|
|
73
74
|
}).transform((v) => {
|
|
74
75
|
return remap$(v, {
|
|
@@ -29,6 +29,7 @@ export const ObjectType = {
|
|
|
29
29
|
PaymentLink: "payment_link",
|
|
30
30
|
PaymentPayout: "payment_payout",
|
|
31
31
|
PaymentRefund: "payment_refund",
|
|
32
|
+
PaymentSubscription: "payment_subscription",
|
|
32
33
|
CommerceItem: "commerce_item",
|
|
33
34
|
CommerceCollection: "commerce_collection",
|
|
34
35
|
CommerceInventory: "commerce_inventory",
|