@unified-api/typescript-sdk 2.9.14 → 2.9.16
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 +24 -0
- package/docs/sdks/comment/README.md +501 -0
- package/docs/sdks/payment/README.md +494 -0
- package/docs/sdks/subscription/README.md +501 -0
- package/docs/sdks/task/README.md +494 -0
- package/funcs/commentCreateTaskComment.d.ts +13 -0
- package/funcs/commentCreateTaskComment.d.ts.map +1 -0
- package/funcs/commentCreateTaskComment.js +103 -0
- package/funcs/commentCreateTaskComment.js.map +1 -0
- package/funcs/commentGetTaskComment.d.ts +13 -0
- package/funcs/commentGetTaskComment.d.ts.map +1 -0
- package/funcs/commentGetTaskComment.js +106 -0
- package/funcs/commentGetTaskComment.js.map +1 -0
- package/funcs/commentListTaskComments.d.ts +13 -0
- package/funcs/commentListTaskComments.d.ts.map +1 -0
- package/funcs/commentListTaskComments.js +110 -0
- package/funcs/commentListTaskComments.js.map +1 -0
- package/funcs/commentPatchTaskComment.d.ts +13 -0
- package/funcs/commentPatchTaskComment.d.ts.map +1 -0
- package/funcs/commentPatchTaskComment.js +107 -0
- package/funcs/commentPatchTaskComment.js.map +1 -0
- package/funcs/commentRemoveTaskComment.d.ts +12 -0
- package/funcs/commentRemoveTaskComment.d.ts.map +1 -0
- package/funcs/commentRemoveTaskComment.js +104 -0
- package/funcs/commentRemoveTaskComment.js.map +1 -0
- package/funcs/commentUpdateTaskComment.d.ts +13 -0
- package/funcs/commentUpdateTaskComment.d.ts.map +1 -0
- package/funcs/commentUpdateTaskComment.js +107 -0
- package/funcs/commentUpdateTaskComment.js.map +1 -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/funcs/taskCreateTaskComment.d.ts +13 -0
- package/funcs/taskCreateTaskComment.d.ts.map +1 -0
- package/funcs/taskCreateTaskComment.js +103 -0
- package/funcs/taskCreateTaskComment.js.map +1 -0
- package/funcs/taskGetTaskComment.d.ts +13 -0
- package/funcs/taskGetTaskComment.d.ts.map +1 -0
- package/funcs/taskGetTaskComment.js +106 -0
- package/funcs/taskGetTaskComment.js.map +1 -0
- package/funcs/taskListTaskComments.d.ts +13 -0
- package/funcs/taskListTaskComments.d.ts.map +1 -0
- package/funcs/taskListTaskComments.js +110 -0
- package/funcs/taskListTaskComments.js.map +1 -0
- package/funcs/taskPatchTaskComment.d.ts +13 -0
- package/funcs/taskPatchTaskComment.d.ts.map +1 -0
- package/funcs/taskPatchTaskComment.js +107 -0
- package/funcs/taskPatchTaskComment.js.map +1 -0
- package/funcs/taskRemoveTaskComment.d.ts +12 -0
- package/funcs/taskRemoveTaskComment.d.ts.map +1 -0
- package/funcs/taskRemoveTaskComment.js +104 -0
- package/funcs/taskRemoveTaskComment.js.map +1 -0
- package/funcs/taskUpdateTaskComment.d.ts +13 -0
- package/funcs/taskUpdateTaskComment.d.ts.map +1 -0
- package/funcs/taskUpdateTaskComment.js +107 -0
- package/funcs/taskUpdateTaskComment.js.map +1 -0
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/package.json +1 -1
- package/sdk/comment.d.ts +30 -0
- package/sdk/comment.d.ts.map +1 -0
- package/sdk/comment.js +54 -0
- package/sdk/comment.js.map +1 -0
- 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/createtaskcomment.d.ts +40 -0
- package/sdk/models/operations/createtaskcomment.d.ts.map +1 -0
- package/sdk/models/operations/createtaskcomment.js +75 -0
- package/sdk/models/operations/createtaskcomment.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/gettaskcomment.d.ts +42 -0
- package/sdk/models/operations/gettaskcomment.d.ts.map +1 -0
- package/sdk/models/operations/gettaskcomment.js +72 -0
- package/sdk/models/operations/gettaskcomment.js.map +1 -0
- package/sdk/models/operations/getunifiedintegrationauth.d.ts +12 -0
- package/sdk/models/operations/getunifiedintegrationauth.d.ts.map +1 -1
- package/sdk/models/operations/getunifiedintegrationauth.js +4 -0
- package/sdk/models/operations/getunifiedintegrationauth.js.map +1 -1
- package/sdk/models/operations/index.d.ts +12 -0
- package/sdk/models/operations/index.d.ts.map +1 -1
- package/sdk/models/operations/index.js +12 -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/listtaskcomments.d.ts +57 -0
- package/sdk/models/operations/listtaskcomments.d.ts.map +1 -0
- package/sdk/models/operations/listtaskcomments.js +89 -0
- package/sdk/models/operations/listtaskcomments.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/patchtaskcomment.d.ts +45 -0
- package/sdk/models/operations/patchtaskcomment.d.ts.map +1 -0
- package/sdk/models/operations/patchtaskcomment.js +77 -0
- package/sdk/models/operations/patchtaskcomment.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/removetaskcomment.d.ts +66 -0
- package/sdk/models/operations/removetaskcomment.d.ts.map +1 -0
- package/sdk/models/operations/removetaskcomment.js +105 -0
- package/sdk/models/operations/removetaskcomment.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/operations/updatetaskcomment.d.ts +45 -0
- package/sdk/models/operations/updatetaskcomment.d.ts.map +1 -0
- package/sdk/models/operations/updatetaskcomment.js +77 -0
- package/sdk/models/operations/updatetaskcomment.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/index.d.ts +3 -1
- package/sdk/models/shared/index.d.ts.map +1 -1
- package/sdk/models/shared/index.js +3 -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 +12 -0
- package/sdk/models/shared/propertyconnectionpermissions.d.ts.map +1 -1
- package/sdk/models/shared/propertyconnectionpermissions.js +4 -0
- package/sdk/models/shared/propertyconnectionpermissions.js.map +1 -1
- package/sdk/models/shared/propertycrmeventemail.d.ts +2 -2
- 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/taskcomment.d.ts +47 -0
- package/sdk/models/shared/taskcomment.d.ts.map +1 -0
- package/sdk/models/shared/taskcomment.js +92 -0
- package/sdk/models/shared/taskcomment.js.map +1 -0
- package/sdk/models/shared/tasktask.d.ts +5 -0
- package/sdk/models/shared/tasktask.d.ts.map +1 -1
- package/sdk/models/shared/tasktask.js +4 -0
- package/sdk/models/shared/tasktask.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 +6 -0
- package/sdk/models/shared/webhook.d.ts.map +1 -1
- package/sdk/models/shared/webhook.js +2 -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 +6 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +8 -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/sdk/task.d.ts +24 -0
- package/sdk/task.d.ts.map +1 -1
- package/sdk/task.js +42 -0
- package/sdk/task.js.map +1 -1
- package/src/funcs/commentCreateTaskComment.ts +133 -0
- package/src/funcs/commentGetTaskComment.ts +136 -0
- package/src/funcs/commentListTaskComments.ts +140 -0
- package/src/funcs/commentPatchTaskComment.ts +137 -0
- package/src/funcs/commentRemoveTaskComment.ts +139 -0
- package/src/funcs/commentUpdateTaskComment.ts +137 -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/funcs/taskCreateTaskComment.ts +133 -0
- package/src/funcs/taskGetTaskComment.ts +136 -0
- package/src/funcs/taskListTaskComments.ts +140 -0
- package/src/funcs/taskPatchTaskComment.ts +137 -0
- package/src/funcs/taskRemoveTaskComment.ts +139 -0
- package/src/funcs/taskUpdateTaskComment.ts +137 -0
- package/src/lib/config.ts +2 -2
- package/src/sdk/comment.ts +100 -0
- package/src/sdk/models/operations/createpaymentsubscription.ts +94 -0
- package/src/sdk/models/operations/createtaskcomment.ts +92 -0
- package/src/sdk/models/operations/getpaymentsubscription.ts +94 -0
- package/src/sdk/models/operations/gettaskcomment.ts +92 -0
- package/src/sdk/models/operations/getunifiedintegrationauth.ts +4 -0
- package/src/sdk/models/operations/index.ts +12 -0
- package/src/sdk/models/operations/listpaymentsubscriptions.ts +126 -0
- package/src/sdk/models/operations/listtaskcomments.ts +124 -0
- package/src/sdk/models/operations/patchpaymentsubscription.ts +101 -0
- package/src/sdk/models/operations/patchtaskcomment.ts +99 -0
- package/src/sdk/models/operations/removepaymentsubscription.ts +156 -0
- package/src/sdk/models/operations/removetaskcomment.ts +151 -0
- package/src/sdk/models/operations/updatepaymentsubscription.ts +101 -0
- package/src/sdk/models/operations/updatetaskcomment.ts +99 -0
- package/src/sdk/models/shared/accountingjournal.ts +8 -6
- package/src/sdk/models/shared/index.ts +3 -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 +4 -0
- package/src/sdk/models/shared/propertycrmeventemail.ts +2 -2
- package/src/sdk/models/shared/repoorganization.ts +12 -10
- package/src/sdk/models/shared/taskcomment.ts +109 -0
- package/src/sdk/models/shared/tasktask.ts +9 -0
- package/src/sdk/models/shared/ticketingnote.ts +4 -3
- package/src/sdk/models/shared/webhook.ts +2 -0
- package/src/sdk/payment.ts +90 -0
- package/src/sdk/sdk.ts +12 -0
- package/src/sdk/subscription.ts +100 -0
- package/src/sdk/task.ts +90 -0
- package/sdk/models/shared/paymentlinklineitem.d.ts.map +0 -1
- package/sdk/models/shared/paymentlinklineitem.js.map +0 -1
|
@@ -0,0 +1,151 @@
|
|
|
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 RemoveTaskCommentRequest = {
|
|
12
|
+
/**
|
|
13
|
+
* ID of the connection
|
|
14
|
+
*/
|
|
15
|
+
connectionId: string;
|
|
16
|
+
/**
|
|
17
|
+
* ID of the Comment
|
|
18
|
+
*/
|
|
19
|
+
id: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type RemoveTaskCommentResponse = {
|
|
23
|
+
headers: { [k: string]: Array<string> };
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const RemoveTaskCommentRequest$inboundSchema: z.ZodType<
|
|
28
|
+
RemoveTaskCommentRequest,
|
|
29
|
+
z.ZodTypeDef,
|
|
30
|
+
unknown
|
|
31
|
+
> = z.object({
|
|
32
|
+
connection_id: z.string(),
|
|
33
|
+
id: z.string(),
|
|
34
|
+
}).transform((v) => {
|
|
35
|
+
return remap$(v, {
|
|
36
|
+
"connection_id": "connectionId",
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export type RemoveTaskCommentRequest$Outbound = {
|
|
42
|
+
connection_id: string;
|
|
43
|
+
id: string;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const RemoveTaskCommentRequest$outboundSchema: z.ZodType<
|
|
48
|
+
RemoveTaskCommentRequest$Outbound,
|
|
49
|
+
z.ZodTypeDef,
|
|
50
|
+
RemoveTaskCommentRequest
|
|
51
|
+
> = z.object({
|
|
52
|
+
connectionId: z.string(),
|
|
53
|
+
id: z.string(),
|
|
54
|
+
}).transform((v) => {
|
|
55
|
+
return remap$(v, {
|
|
56
|
+
connectionId: "connection_id",
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
63
|
+
*/
|
|
64
|
+
export namespace RemoveTaskCommentRequest$ {
|
|
65
|
+
/** @deprecated use `RemoveTaskCommentRequest$inboundSchema` instead. */
|
|
66
|
+
export const inboundSchema = RemoveTaskCommentRequest$inboundSchema;
|
|
67
|
+
/** @deprecated use `RemoveTaskCommentRequest$outboundSchema` instead. */
|
|
68
|
+
export const outboundSchema = RemoveTaskCommentRequest$outboundSchema;
|
|
69
|
+
/** @deprecated use `RemoveTaskCommentRequest$Outbound` instead. */
|
|
70
|
+
export type Outbound = RemoveTaskCommentRequest$Outbound;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function removeTaskCommentRequestToJSON(
|
|
74
|
+
removeTaskCommentRequest: RemoveTaskCommentRequest,
|
|
75
|
+
): string {
|
|
76
|
+
return JSON.stringify(
|
|
77
|
+
RemoveTaskCommentRequest$outboundSchema.parse(removeTaskCommentRequest),
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function removeTaskCommentRequestFromJSON(
|
|
82
|
+
jsonString: string,
|
|
83
|
+
): SafeParseResult<RemoveTaskCommentRequest, SDKValidationError> {
|
|
84
|
+
return safeParse(
|
|
85
|
+
jsonString,
|
|
86
|
+
(x) => RemoveTaskCommentRequest$inboundSchema.parse(JSON.parse(x)),
|
|
87
|
+
`Failed to parse 'RemoveTaskCommentRequest' from JSON`,
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** @internal */
|
|
92
|
+
export const RemoveTaskCommentResponse$inboundSchema: z.ZodType<
|
|
93
|
+
RemoveTaskCommentResponse,
|
|
94
|
+
z.ZodTypeDef,
|
|
95
|
+
unknown
|
|
96
|
+
> = z.object({
|
|
97
|
+
Headers: z.record(z.array(z.string())),
|
|
98
|
+
}).transform((v) => {
|
|
99
|
+
return remap$(v, {
|
|
100
|
+
"Headers": "headers",
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
/** @internal */
|
|
105
|
+
export type RemoveTaskCommentResponse$Outbound = {
|
|
106
|
+
Headers: { [k: string]: Array<string> };
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/** @internal */
|
|
110
|
+
export const RemoveTaskCommentResponse$outboundSchema: z.ZodType<
|
|
111
|
+
RemoveTaskCommentResponse$Outbound,
|
|
112
|
+
z.ZodTypeDef,
|
|
113
|
+
RemoveTaskCommentResponse
|
|
114
|
+
> = z.object({
|
|
115
|
+
headers: z.record(z.array(z.string())),
|
|
116
|
+
}).transform((v) => {
|
|
117
|
+
return remap$(v, {
|
|
118
|
+
headers: "Headers",
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @internal
|
|
124
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
125
|
+
*/
|
|
126
|
+
export namespace RemoveTaskCommentResponse$ {
|
|
127
|
+
/** @deprecated use `RemoveTaskCommentResponse$inboundSchema` instead. */
|
|
128
|
+
export const inboundSchema = RemoveTaskCommentResponse$inboundSchema;
|
|
129
|
+
/** @deprecated use `RemoveTaskCommentResponse$outboundSchema` instead. */
|
|
130
|
+
export const outboundSchema = RemoveTaskCommentResponse$outboundSchema;
|
|
131
|
+
/** @deprecated use `RemoveTaskCommentResponse$Outbound` instead. */
|
|
132
|
+
export type Outbound = RemoveTaskCommentResponse$Outbound;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export function removeTaskCommentResponseToJSON(
|
|
136
|
+
removeTaskCommentResponse: RemoveTaskCommentResponse,
|
|
137
|
+
): string {
|
|
138
|
+
return JSON.stringify(
|
|
139
|
+
RemoveTaskCommentResponse$outboundSchema.parse(removeTaskCommentResponse),
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export function removeTaskCommentResponseFromJSON(
|
|
144
|
+
jsonString: string,
|
|
145
|
+
): SafeParseResult<RemoveTaskCommentResponse, SDKValidationError> {
|
|
146
|
+
return safeParse(
|
|
147
|
+
jsonString,
|
|
148
|
+
(x) => RemoveTaskCommentResponse$inboundSchema.parse(JSON.parse(x)),
|
|
149
|
+
`Failed to parse 'RemoveTaskCommentResponse' from JSON`,
|
|
150
|
+
);
|
|
151
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
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 * as shared from "../shared/index.js";
|
|
11
|
+
|
|
12
|
+
export type UpdatePaymentSubscriptionRequest = {
|
|
13
|
+
paymentSubscription?: shared.PaymentSubscription | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* ID of the connection
|
|
16
|
+
*/
|
|
17
|
+
connectionId: string;
|
|
18
|
+
/**
|
|
19
|
+
* Comma-delimited fields to return
|
|
20
|
+
*/
|
|
21
|
+
fields?: Array<string> | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* ID of the Subscription
|
|
24
|
+
*/
|
|
25
|
+
id: string;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const UpdatePaymentSubscriptionRequest$inboundSchema: z.ZodType<
|
|
30
|
+
UpdatePaymentSubscriptionRequest,
|
|
31
|
+
z.ZodTypeDef,
|
|
32
|
+
unknown
|
|
33
|
+
> = z.object({
|
|
34
|
+
PaymentSubscription: shared.PaymentSubscription$inboundSchema.optional(),
|
|
35
|
+
connection_id: z.string(),
|
|
36
|
+
fields: z.array(z.string()).optional(),
|
|
37
|
+
id: z.string(),
|
|
38
|
+
}).transform((v) => {
|
|
39
|
+
return remap$(v, {
|
|
40
|
+
"PaymentSubscription": "paymentSubscription",
|
|
41
|
+
"connection_id": "connectionId",
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export type UpdatePaymentSubscriptionRequest$Outbound = {
|
|
47
|
+
PaymentSubscription?: shared.PaymentSubscription$Outbound | undefined;
|
|
48
|
+
connection_id: string;
|
|
49
|
+
fields?: Array<string> | undefined;
|
|
50
|
+
id: string;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const UpdatePaymentSubscriptionRequest$outboundSchema: z.ZodType<
|
|
55
|
+
UpdatePaymentSubscriptionRequest$Outbound,
|
|
56
|
+
z.ZodTypeDef,
|
|
57
|
+
UpdatePaymentSubscriptionRequest
|
|
58
|
+
> = z.object({
|
|
59
|
+
paymentSubscription: shared.PaymentSubscription$outboundSchema.optional(),
|
|
60
|
+
connectionId: z.string(),
|
|
61
|
+
fields: z.array(z.string()).optional(),
|
|
62
|
+
id: z.string(),
|
|
63
|
+
}).transform((v) => {
|
|
64
|
+
return remap$(v, {
|
|
65
|
+
paymentSubscription: "PaymentSubscription",
|
|
66
|
+
connectionId: "connection_id",
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @internal
|
|
72
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
73
|
+
*/
|
|
74
|
+
export namespace UpdatePaymentSubscriptionRequest$ {
|
|
75
|
+
/** @deprecated use `UpdatePaymentSubscriptionRequest$inboundSchema` instead. */
|
|
76
|
+
export const inboundSchema = UpdatePaymentSubscriptionRequest$inboundSchema;
|
|
77
|
+
/** @deprecated use `UpdatePaymentSubscriptionRequest$outboundSchema` instead. */
|
|
78
|
+
export const outboundSchema = UpdatePaymentSubscriptionRequest$outboundSchema;
|
|
79
|
+
/** @deprecated use `UpdatePaymentSubscriptionRequest$Outbound` instead. */
|
|
80
|
+
export type Outbound = UpdatePaymentSubscriptionRequest$Outbound;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function updatePaymentSubscriptionRequestToJSON(
|
|
84
|
+
updatePaymentSubscriptionRequest: UpdatePaymentSubscriptionRequest,
|
|
85
|
+
): string {
|
|
86
|
+
return JSON.stringify(
|
|
87
|
+
UpdatePaymentSubscriptionRequest$outboundSchema.parse(
|
|
88
|
+
updatePaymentSubscriptionRequest,
|
|
89
|
+
),
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function updatePaymentSubscriptionRequestFromJSON(
|
|
94
|
+
jsonString: string,
|
|
95
|
+
): SafeParseResult<UpdatePaymentSubscriptionRequest, SDKValidationError> {
|
|
96
|
+
return safeParse(
|
|
97
|
+
jsonString,
|
|
98
|
+
(x) => UpdatePaymentSubscriptionRequest$inboundSchema.parse(JSON.parse(x)),
|
|
99
|
+
`Failed to parse 'UpdatePaymentSubscriptionRequest' from JSON`,
|
|
100
|
+
);
|
|
101
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
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 * as shared from "../shared/index.js";
|
|
11
|
+
|
|
12
|
+
export type UpdateTaskCommentRequest = {
|
|
13
|
+
taskComment?: shared.TaskComment | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* ID of the connection
|
|
16
|
+
*/
|
|
17
|
+
connectionId: string;
|
|
18
|
+
/**
|
|
19
|
+
* Comma-delimited fields to return
|
|
20
|
+
*/
|
|
21
|
+
fields?: Array<string> | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* ID of the Comment
|
|
24
|
+
*/
|
|
25
|
+
id: string;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const UpdateTaskCommentRequest$inboundSchema: z.ZodType<
|
|
30
|
+
UpdateTaskCommentRequest,
|
|
31
|
+
z.ZodTypeDef,
|
|
32
|
+
unknown
|
|
33
|
+
> = z.object({
|
|
34
|
+
TaskComment: shared.TaskComment$inboundSchema.optional(),
|
|
35
|
+
connection_id: z.string(),
|
|
36
|
+
fields: z.array(z.string()).optional(),
|
|
37
|
+
id: z.string(),
|
|
38
|
+
}).transform((v) => {
|
|
39
|
+
return remap$(v, {
|
|
40
|
+
"TaskComment": "taskComment",
|
|
41
|
+
"connection_id": "connectionId",
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export type UpdateTaskCommentRequest$Outbound = {
|
|
47
|
+
TaskComment?: shared.TaskComment$Outbound | undefined;
|
|
48
|
+
connection_id: string;
|
|
49
|
+
fields?: Array<string> | undefined;
|
|
50
|
+
id: string;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const UpdateTaskCommentRequest$outboundSchema: z.ZodType<
|
|
55
|
+
UpdateTaskCommentRequest$Outbound,
|
|
56
|
+
z.ZodTypeDef,
|
|
57
|
+
UpdateTaskCommentRequest
|
|
58
|
+
> = z.object({
|
|
59
|
+
taskComment: shared.TaskComment$outboundSchema.optional(),
|
|
60
|
+
connectionId: z.string(),
|
|
61
|
+
fields: z.array(z.string()).optional(),
|
|
62
|
+
id: z.string(),
|
|
63
|
+
}).transform((v) => {
|
|
64
|
+
return remap$(v, {
|
|
65
|
+
taskComment: "TaskComment",
|
|
66
|
+
connectionId: "connection_id",
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @internal
|
|
72
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
73
|
+
*/
|
|
74
|
+
export namespace UpdateTaskCommentRequest$ {
|
|
75
|
+
/** @deprecated use `UpdateTaskCommentRequest$inboundSchema` instead. */
|
|
76
|
+
export const inboundSchema = UpdateTaskCommentRequest$inboundSchema;
|
|
77
|
+
/** @deprecated use `UpdateTaskCommentRequest$outboundSchema` instead. */
|
|
78
|
+
export const outboundSchema = UpdateTaskCommentRequest$outboundSchema;
|
|
79
|
+
/** @deprecated use `UpdateTaskCommentRequest$Outbound` instead. */
|
|
80
|
+
export type Outbound = UpdateTaskCommentRequest$Outbound;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function updateTaskCommentRequestToJSON(
|
|
84
|
+
updateTaskCommentRequest: UpdateTaskCommentRequest,
|
|
85
|
+
): string {
|
|
86
|
+
return JSON.stringify(
|
|
87
|
+
UpdateTaskCommentRequest$outboundSchema.parse(updateTaskCommentRequest),
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function updateTaskCommentRequestFromJSON(
|
|
92
|
+
jsonString: string,
|
|
93
|
+
): SafeParseResult<UpdateTaskCommentRequest, SDKValidationError> {
|
|
94
|
+
return safeParse(
|
|
95
|
+
jsonString,
|
|
96
|
+
(x) => UpdateTaskCommentRequest$inboundSchema.parse(JSON.parse(x)),
|
|
97
|
+
`Failed to parse 'UpdateTaskCommentRequest' from JSON`,
|
|
98
|
+
);
|
|
99
|
+
}
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./accountingjournallineitem.js";
|
|
16
16
|
|
|
17
17
|
export type AccountingJournal = {
|
|
18
|
-
createdAt?:
|
|
18
|
+
createdAt?: Date | undefined;
|
|
19
19
|
currency?: string | undefined;
|
|
20
20
|
description?: string | undefined;
|
|
21
21
|
id?: string | undefined;
|
|
@@ -27,7 +27,7 @@ export type AccountingJournal = {
|
|
|
27
27
|
reference?: string | undefined;
|
|
28
28
|
taxAmount?: number | undefined;
|
|
29
29
|
taxrateId?: string | undefined;
|
|
30
|
-
updatedAt?:
|
|
30
|
+
updatedAt?: Date | undefined;
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
/** @internal */
|
|
@@ -36,7 +36,8 @@ export const AccountingJournal$inboundSchema: z.ZodType<
|
|
|
36
36
|
z.ZodTypeDef,
|
|
37
37
|
unknown
|
|
38
38
|
> = z.object({
|
|
39
|
-
created_at: z.string().
|
|
39
|
+
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
40
|
+
.optional(),
|
|
40
41
|
currency: z.string().optional(),
|
|
41
42
|
description: z.string().optional(),
|
|
42
43
|
id: z.string().optional(),
|
|
@@ -45,7 +46,8 @@ export const AccountingJournal$inboundSchema: z.ZodType<
|
|
|
45
46
|
reference: z.string().optional(),
|
|
46
47
|
tax_amount: z.number().optional(),
|
|
47
48
|
taxrate_id: z.string().optional(),
|
|
48
|
-
updated_at: z.string().
|
|
49
|
+
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
50
|
+
.optional(),
|
|
49
51
|
}).transform((v) => {
|
|
50
52
|
return remap$(v, {
|
|
51
53
|
"created_at": "createdAt",
|
|
@@ -75,7 +77,7 @@ export const AccountingJournal$outboundSchema: z.ZodType<
|
|
|
75
77
|
z.ZodTypeDef,
|
|
76
78
|
AccountingJournal
|
|
77
79
|
> = z.object({
|
|
78
|
-
createdAt: z.
|
|
80
|
+
createdAt: z.date().transform(v => v.toISOString()).optional(),
|
|
79
81
|
currency: z.string().optional(),
|
|
80
82
|
description: z.string().optional(),
|
|
81
83
|
id: z.string().optional(),
|
|
@@ -84,7 +86,7 @@ export const AccountingJournal$outboundSchema: z.ZodType<
|
|
|
84
86
|
reference: z.string().optional(),
|
|
85
87
|
taxAmount: z.number().optional(),
|
|
86
88
|
taxrateId: z.string().optional(),
|
|
87
|
-
updatedAt: z.
|
|
89
|
+
updatedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
88
90
|
}).transform((v) => {
|
|
89
91
|
return remap$(v, {
|
|
90
92
|
createdAt: "created_at",
|
|
@@ -95,11 +95,12 @@ export * from "./messagingchannel.js";
|
|
|
95
95
|
export * from "./messagingmember.js";
|
|
96
96
|
export * from "./messagingmessage.js";
|
|
97
97
|
export * from "./metadatametadata.js";
|
|
98
|
+
export * from "./paymentlineitem.js";
|
|
98
99
|
export * from "./paymentlink.js";
|
|
99
|
-
export * from "./paymentlinklineitem.js";
|
|
100
100
|
export * from "./paymentpayment.js";
|
|
101
101
|
export * from "./paymentpayout.js";
|
|
102
102
|
export * from "./paymentrefund.js";
|
|
103
|
+
export * from "./paymentsubscription.js";
|
|
103
104
|
export * from "./propertyaccountingcontactbillingaddress.js";
|
|
104
105
|
export * from "./propertyaccountingcontactshippingaddress.js";
|
|
105
106
|
export * from "./propertyaccountingorderbillingaddress.js";
|
|
@@ -167,6 +168,7 @@ export * from "./scimusergroups.js";
|
|
|
167
168
|
export * from "./security.js";
|
|
168
169
|
export * from "./storagefile.js";
|
|
169
170
|
export * from "./storagepermission.js";
|
|
171
|
+
export * from "./taskcomment.js";
|
|
170
172
|
export * from "./taskproject.js";
|
|
171
173
|
export * from "./tasktask.js";
|
|
172
174
|
export * from "./ticketingcustomer.js";
|
|
@@ -8,7 +8,7 @@ import { safeParse } from "../../../lib/schemas.js";
|
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
|
|
11
|
-
export type
|
|
11
|
+
export type PaymentLineitem = {
|
|
12
12
|
accountId?: string | undefined;
|
|
13
13
|
createdAt?: Date | undefined;
|
|
14
14
|
discountAmount?: number | undefined;
|
|
@@ -29,8 +29,8 @@ export type PaymentLinkLineitem = {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
/** @internal */
|
|
32
|
-
export const
|
|
33
|
-
|
|
32
|
+
export const PaymentLineitem$inboundSchema: z.ZodType<
|
|
33
|
+
PaymentLineitem,
|
|
34
34
|
z.ZodTypeDef,
|
|
35
35
|
unknown
|
|
36
36
|
> = z.object({
|
|
@@ -75,7 +75,7 @@ export const PaymentLinkLineitem$inboundSchema: z.ZodType<
|
|
|
75
75
|
});
|
|
76
76
|
|
|
77
77
|
/** @internal */
|
|
78
|
-
export type
|
|
78
|
+
export type PaymentLineitem$Outbound = {
|
|
79
79
|
account_id?: string | undefined;
|
|
80
80
|
created_at?: string | undefined;
|
|
81
81
|
discount_amount?: number | undefined;
|
|
@@ -96,10 +96,10 @@ export type PaymentLinkLineitem$Outbound = {
|
|
|
96
96
|
};
|
|
97
97
|
|
|
98
98
|
/** @internal */
|
|
99
|
-
export const
|
|
100
|
-
|
|
99
|
+
export const PaymentLineitem$outboundSchema: z.ZodType<
|
|
100
|
+
PaymentLineitem$Outbound,
|
|
101
101
|
z.ZodTypeDef,
|
|
102
|
-
|
|
102
|
+
PaymentLineitem
|
|
103
103
|
> = z.object({
|
|
104
104
|
accountId: z.string().optional(),
|
|
105
105
|
createdAt: z.date().transform(v => v.toISOString()).optional(),
|
|
@@ -142,29 +142,27 @@ export const PaymentLinkLineitem$outboundSchema: z.ZodType<
|
|
|
142
142
|
* @internal
|
|
143
143
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
144
144
|
*/
|
|
145
|
-
export namespace
|
|
146
|
-
/** @deprecated use `
|
|
147
|
-
export const inboundSchema =
|
|
148
|
-
/** @deprecated use `
|
|
149
|
-
export const outboundSchema =
|
|
150
|
-
/** @deprecated use `
|
|
151
|
-
export type Outbound =
|
|
145
|
+
export namespace PaymentLineitem$ {
|
|
146
|
+
/** @deprecated use `PaymentLineitem$inboundSchema` instead. */
|
|
147
|
+
export const inboundSchema = PaymentLineitem$inboundSchema;
|
|
148
|
+
/** @deprecated use `PaymentLineitem$outboundSchema` instead. */
|
|
149
|
+
export const outboundSchema = PaymentLineitem$outboundSchema;
|
|
150
|
+
/** @deprecated use `PaymentLineitem$Outbound` instead. */
|
|
151
|
+
export type Outbound = PaymentLineitem$Outbound;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
export function
|
|
155
|
-
|
|
154
|
+
export function paymentLineitemToJSON(
|
|
155
|
+
paymentLineitem: PaymentLineitem,
|
|
156
156
|
): string {
|
|
157
|
-
return JSON.stringify(
|
|
158
|
-
PaymentLinkLineitem$outboundSchema.parse(paymentLinkLineitem),
|
|
159
|
-
);
|
|
157
|
+
return JSON.stringify(PaymentLineitem$outboundSchema.parse(paymentLineitem));
|
|
160
158
|
}
|
|
161
159
|
|
|
162
|
-
export function
|
|
160
|
+
export function paymentLineitemFromJSON(
|
|
163
161
|
jsonString: string,
|
|
164
|
-
): SafeParseResult<
|
|
162
|
+
): SafeParseResult<PaymentLineitem, SDKValidationError> {
|
|
165
163
|
return safeParse(
|
|
166
164
|
jsonString,
|
|
167
|
-
(x) =>
|
|
168
|
-
`Failed to parse '
|
|
165
|
+
(x) => PaymentLineitem$inboundSchema.parse(JSON.parse(x)),
|
|
166
|
+
`Failed to parse 'PaymentLineitem' from JSON`,
|
|
169
167
|
);
|
|
170
168
|
}
|
|
@@ -8,11 +8,11 @@ import { safeParse } from "../../../lib/schemas.js";
|
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} from "./
|
|
11
|
+
PaymentLineitem,
|
|
12
|
+
PaymentLineitem$inboundSchema,
|
|
13
|
+
PaymentLineitem$Outbound,
|
|
14
|
+
PaymentLineitem$outboundSchema,
|
|
15
|
+
} from "./paymentlineitem.js";
|
|
16
16
|
|
|
17
17
|
export type PaymentLink = {
|
|
18
18
|
amount?: number | undefined;
|
|
@@ -22,7 +22,7 @@ export type PaymentLink = {
|
|
|
22
22
|
id?: string | undefined;
|
|
23
23
|
isActive?: boolean | undefined;
|
|
24
24
|
isChargeableNow?: boolean | undefined;
|
|
25
|
-
lineitems?: Array<
|
|
25
|
+
lineitems?: Array<PaymentLineitem> | undefined;
|
|
26
26
|
paymentId?: string | undefined;
|
|
27
27
|
raw?: { [k: string]: any } | undefined;
|
|
28
28
|
successUrl?: string | undefined;
|
|
@@ -44,7 +44,7 @@ export const PaymentLink$inboundSchema: z.ZodType<
|
|
|
44
44
|
id: z.string().optional(),
|
|
45
45
|
is_active: z.boolean().optional(),
|
|
46
46
|
is_chargeable_now: z.boolean().optional(),
|
|
47
|
-
lineitems: z.array(
|
|
47
|
+
lineitems: z.array(PaymentLineitem$inboundSchema).optional(),
|
|
48
48
|
payment_id: z.string().optional(),
|
|
49
49
|
raw: z.record(z.any()).optional(),
|
|
50
50
|
success_url: z.string().optional(),
|
|
@@ -72,7 +72,7 @@ export type PaymentLink$Outbound = {
|
|
|
72
72
|
id?: string | undefined;
|
|
73
73
|
is_active?: boolean | undefined;
|
|
74
74
|
is_chargeable_now?: boolean | undefined;
|
|
75
|
-
lineitems?: Array<
|
|
75
|
+
lineitems?: Array<PaymentLineitem$Outbound> | undefined;
|
|
76
76
|
payment_id?: string | undefined;
|
|
77
77
|
raw?: { [k: string]: any } | undefined;
|
|
78
78
|
success_url?: string | undefined;
|
|
@@ -93,7 +93,7 @@ export const PaymentLink$outboundSchema: z.ZodType<
|
|
|
93
93
|
id: z.string().optional(),
|
|
94
94
|
isActive: z.boolean().optional(),
|
|
95
95
|
isChargeableNow: z.boolean().optional(),
|
|
96
|
-
lineitems: z.array(
|
|
96
|
+
lineitems: z.array(PaymentLineitem$outboundSchema).optional(),
|
|
97
97
|
paymentId: z.string().optional(),
|
|
98
98
|
raw: z.record(z.any()).optional(),
|
|
99
99
|
successUrl: z.string().optional(),
|
|
@@ -18,7 +18,7 @@ export const PaymentRefundStatus = {
|
|
|
18
18
|
export type PaymentRefundStatus = ClosedEnum<typeof PaymentRefundStatus>;
|
|
19
19
|
|
|
20
20
|
export type PaymentRefund = {
|
|
21
|
-
createdAt?:
|
|
21
|
+
createdAt?: Date | undefined;
|
|
22
22
|
currency?: string | undefined;
|
|
23
23
|
id?: string | undefined;
|
|
24
24
|
notes?: string | undefined;
|
|
@@ -27,7 +27,7 @@ export type PaymentRefund = {
|
|
|
27
27
|
reference?: string | undefined;
|
|
28
28
|
status?: PaymentRefundStatus | undefined;
|
|
29
29
|
totalAmount: number;
|
|
30
|
-
updatedAt?:
|
|
30
|
+
updatedAt?: Date | undefined;
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
/** @internal */
|
|
@@ -57,7 +57,8 @@ export const PaymentRefund$inboundSchema: z.ZodType<
|
|
|
57
57
|
z.ZodTypeDef,
|
|
58
58
|
unknown
|
|
59
59
|
> = z.object({
|
|
60
|
-
created_at: z.string().
|
|
60
|
+
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
61
|
+
.optional(),
|
|
61
62
|
currency: z.string().optional(),
|
|
62
63
|
id: z.string().optional(),
|
|
63
64
|
notes: z.string().optional(),
|
|
@@ -66,7 +67,8 @@ export const PaymentRefund$inboundSchema: z.ZodType<
|
|
|
66
67
|
reference: z.string().optional(),
|
|
67
68
|
status: PaymentRefundStatus$inboundSchema.optional(),
|
|
68
69
|
total_amount: z.number(),
|
|
69
|
-
updated_at: z.string().
|
|
70
|
+
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
71
|
+
.optional(),
|
|
70
72
|
}).transform((v) => {
|
|
71
73
|
return remap$(v, {
|
|
72
74
|
"created_at": "createdAt",
|
|
@@ -96,7 +98,7 @@ export const PaymentRefund$outboundSchema: z.ZodType<
|
|
|
96
98
|
z.ZodTypeDef,
|
|
97
99
|
PaymentRefund
|
|
98
100
|
> = z.object({
|
|
99
|
-
createdAt: z.
|
|
101
|
+
createdAt: z.date().transform(v => v.toISOString()).optional(),
|
|
100
102
|
currency: z.string().optional(),
|
|
101
103
|
id: z.string().optional(),
|
|
102
104
|
notes: z.string().optional(),
|
|
@@ -105,7 +107,7 @@ export const PaymentRefund$outboundSchema: z.ZodType<
|
|
|
105
107
|
reference: z.string().optional(),
|
|
106
108
|
status: PaymentRefundStatus$outboundSchema.optional(),
|
|
107
109
|
totalAmount: z.number(),
|
|
108
|
-
updatedAt: z.
|
|
110
|
+
updatedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
109
111
|
}).transform((v) => {
|
|
110
112
|
return remap$(v, {
|
|
111
113
|
createdAt: "created_at",
|