mollie-api-typescript 1.6.10 → 1.7.1
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 +11 -0
- package/dist/commonjs/funcs/payoutsCancel.d.ts +22 -0
- package/dist/commonjs/funcs/payoutsCancel.d.ts.map +1 -0
- package/dist/commonjs/funcs/payoutsCancel.js +147 -0
- package/dist/commonjs/funcs/payoutsCancel.js.map +1 -0
- package/dist/commonjs/funcs/payoutsCreate.d.ts +54 -0
- package/dist/commonjs/funcs/payoutsCreate.d.ts.map +1 -0
- package/dist/commonjs/funcs/payoutsCreate.js +174 -0
- package/dist/commonjs/funcs/payoutsCreate.js.map +1 -0
- package/dist/commonjs/funcs/payoutsGet.d.ts +19 -0
- package/dist/commonjs/funcs/payoutsGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/payoutsGet.js +144 -0
- package/dist/commonjs/funcs/payoutsGet.js.map +1 -0
- package/dist/commonjs/funcs/payoutsList.d.ts +29 -0
- package/dist/commonjs/funcs/payoutsList.d.ts.map +1 -0
- package/dist/commonjs/funcs/payoutsList.js +182 -0
- package/dist/commonjs/funcs/payoutsList.js.map +1 -0
- package/dist/commonjs/hooks/mollie-auth-utils.js +1 -1
- package/dist/commonjs/hooks/mollie-auth-utils.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/models/entitypayoutresponse.d.ts +102 -0
- package/dist/commonjs/models/entitypayoutresponse.d.ts.map +1 -0
- package/dist/commonjs/models/entitypayoutresponse.js +82 -0
- package/dist/commonjs/models/entitypayoutresponse.js.map +1 -0
- package/dist/commonjs/models/entitywebhookevent.d.ts +8 -2
- package/dist/commonjs/models/entitywebhookevent.d.ts.map +1 -1
- package/dist/commonjs/models/entitywebhookevent.js +8 -0
- package/dist/commonjs/models/entitywebhookevent.js.map +1 -1
- package/dist/commonjs/models/index.d.ts +6 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +6 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/listentitypayout.d.ts +98 -0
- package/dist/commonjs/models/listentitypayout.d.ts.map +1 -0
- package/dist/commonjs/models/listentitypayout.js +81 -0
- package/dist/commonjs/models/listentitypayout.js.map +1 -0
- package/dist/commonjs/models/operations/cancelpayout.d.ts +43 -0
- package/dist/commonjs/models/operations/cancelpayout.d.ts.map +1 -0
- package/dist/commonjs/models/operations/cancelpayout.js +57 -0
- package/dist/commonjs/models/operations/cancelpayout.js.map +1 -0
- package/dist/commonjs/models/operations/createpayout.d.ts +41 -0
- package/dist/commonjs/models/operations/createpayout.d.ts.map +1 -0
- package/dist/commonjs/models/operations/createpayout.js +59 -0
- package/dist/commonjs/models/operations/createpayout.js.map +1 -0
- package/dist/commonjs/models/operations/getpayout.d.ts +43 -0
- package/dist/commonjs/models/operations/getpayout.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getpayout.js +57 -0
- package/dist/commonjs/models/operations/getpayout.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +4 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +4 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listpayouts.d.ts +114 -0
- package/dist/commonjs/models/operations/listpayouts.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listpayouts.js +97 -0
- package/dist/commonjs/models/operations/listpayouts.js.map +1 -0
- package/dist/commonjs/models/payoutrequest.d.ts +45 -0
- package/dist/commonjs/models/payoutrequest.d.ts.map +1 -0
- package/dist/commonjs/models/payoutrequest.js +54 -0
- package/dist/commonjs/models/payoutrequest.js.map +1 -0
- package/dist/commonjs/models/payoutstatus.d.ts +20 -0
- package/dist/commonjs/models/payoutstatus.d.ts.map +1 -0
- package/dist/commonjs/models/payoutstatus.js +55 -0
- package/dist/commonjs/models/payoutstatus.js.map +1 -0
- package/dist/commonjs/models/payoutstatusreason.d.ts +21 -0
- package/dist/commonjs/models/payoutstatusreason.d.ts.map +1 -0
- package/dist/commonjs/models/payoutstatusreason.js +53 -0
- package/dist/commonjs/models/payoutstatusreason.js.map +1 -0
- package/dist/commonjs/models/payoutstatusreasoncode.d.ts +28 -0
- package/dist/commonjs/models/payoutstatusreasoncode.d.ts.map +1 -0
- package/dist/commonjs/models/payoutstatusreasoncode.js +63 -0
- package/dist/commonjs/models/payoutstatusreasoncode.js.map +1 -0
- package/dist/commonjs/models/webhookeventtypes.d.ts +5 -0
- package/dist/commonjs/models/webhookeventtypes.d.ts.map +1 -1
- package/dist/commonjs/models/webhookeventtypes.js +5 -0
- package/dist/commonjs/models/webhookeventtypes.js.map +1 -1
- package/dist/commonjs/sdk/payouts.d.ts +81 -0
- package/dist/commonjs/sdk/payouts.d.ts.map +1 -0
- package/dist/commonjs/sdk/payouts.js +98 -0
- package/dist/commonjs/sdk/payouts.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +3 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/funcs/payoutsCancel.d.ts +22 -0
- package/dist/esm/funcs/payoutsCancel.d.ts.map +1 -0
- package/dist/esm/funcs/payoutsCancel.js +111 -0
- package/dist/esm/funcs/payoutsCancel.js.map +1 -0
- package/dist/esm/funcs/payoutsCreate.d.ts +54 -0
- package/dist/esm/funcs/payoutsCreate.d.ts.map +1 -0
- package/dist/esm/funcs/payoutsCreate.js +138 -0
- package/dist/esm/funcs/payoutsCreate.js.map +1 -0
- package/dist/esm/funcs/payoutsGet.d.ts +19 -0
- package/dist/esm/funcs/payoutsGet.d.ts.map +1 -0
- package/dist/esm/funcs/payoutsGet.js +108 -0
- package/dist/esm/funcs/payoutsGet.js.map +1 -0
- package/dist/esm/funcs/payoutsList.d.ts +29 -0
- package/dist/esm/funcs/payoutsList.d.ts.map +1 -0
- package/dist/esm/funcs/payoutsList.js +146 -0
- package/dist/esm/funcs/payoutsList.js.map +1 -0
- package/dist/esm/hooks/mollie-auth-utils.js +1 -1
- package/dist/esm/hooks/mollie-auth-utils.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/models/entitypayoutresponse.d.ts +102 -0
- package/dist/esm/models/entitypayoutresponse.d.ts.map +1 -0
- package/dist/esm/models/entitypayoutresponse.js +44 -0
- package/dist/esm/models/entitypayoutresponse.js.map +1 -0
- package/dist/esm/models/entitywebhookevent.d.ts +8 -2
- package/dist/esm/models/entitywebhookevent.d.ts.map +1 -1
- package/dist/esm/models/entitywebhookevent.js +8 -0
- package/dist/esm/models/entitywebhookevent.js.map +1 -1
- package/dist/esm/models/index.d.ts +6 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +6 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/listentitypayout.d.ts +98 -0
- package/dist/esm/models/listentitypayout.d.ts.map +1 -0
- package/dist/esm/models/listentitypayout.js +43 -0
- package/dist/esm/models/listentitypayout.js.map +1 -0
- package/dist/esm/models/operations/cancelpayout.d.ts +43 -0
- package/dist/esm/models/operations/cancelpayout.d.ts.map +1 -0
- package/dist/esm/models/operations/cancelpayout.js +20 -0
- package/dist/esm/models/operations/cancelpayout.js.map +1 -0
- package/dist/esm/models/operations/createpayout.d.ts +41 -0
- package/dist/esm/models/operations/createpayout.d.ts.map +1 -0
- package/dist/esm/models/operations/createpayout.js +22 -0
- package/dist/esm/models/operations/createpayout.js.map +1 -0
- package/dist/esm/models/operations/getpayout.d.ts +43 -0
- package/dist/esm/models/operations/getpayout.d.ts.map +1 -0
- package/dist/esm/models/operations/getpayout.js +20 -0
- package/dist/esm/models/operations/getpayout.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +4 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +4 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listpayouts.d.ts +114 -0
- package/dist/esm/models/operations/listpayouts.d.ts.map +1 -0
- package/dist/esm/models/operations/listpayouts.js +57 -0
- package/dist/esm/models/operations/listpayouts.js.map +1 -0
- package/dist/esm/models/payoutrequest.d.ts +45 -0
- package/dist/esm/models/payoutrequest.d.ts.map +1 -0
- package/dist/esm/models/payoutrequest.js +17 -0
- package/dist/esm/models/payoutrequest.js.map +1 -0
- package/dist/esm/models/payoutstatus.d.ts +20 -0
- package/dist/esm/models/payoutstatus.d.ts.map +1 -0
- package/dist/esm/models/payoutstatus.js +19 -0
- package/dist/esm/models/payoutstatus.js.map +1 -0
- package/dist/esm/models/payoutstatusreason.d.ts +21 -0
- package/dist/esm/models/payoutstatusreason.d.ts.map +1 -0
- package/dist/esm/models/payoutstatusreason.js +16 -0
- package/dist/esm/models/payoutstatusreason.js.map +1 -0
- package/dist/esm/models/payoutstatusreasoncode.d.ts +28 -0
- package/dist/esm/models/payoutstatusreasoncode.d.ts.map +1 -0
- package/dist/esm/models/payoutstatusreasoncode.js +27 -0
- package/dist/esm/models/payoutstatusreasoncode.js.map +1 -0
- package/dist/esm/models/webhookeventtypes.d.ts +5 -0
- package/dist/esm/models/webhookeventtypes.d.ts.map +1 -1
- package/dist/esm/models/webhookeventtypes.js +5 -0
- package/dist/esm/models/webhookeventtypes.js.map +1 -1
- package/dist/esm/sdk/payouts.d.ts +81 -0
- package/dist/esm/sdk/payouts.d.ts.map +1 -0
- package/dist/esm/sdk/payouts.js +94 -0
- package/dist/esm/sdk/payouts.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +3 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/payoutsCancel.ts +204 -0
- package/src/funcs/payoutsCreate.ts +231 -0
- package/src/funcs/payoutsGet.ts +201 -0
- package/src/funcs/payoutsList.ts +278 -0
- package/src/hooks/mollie-auth-utils.ts +3 -3
- package/src/lib/config.ts +2 -2
- package/src/models/entitypayoutresponse.ts +165 -0
- package/src/models/entitywebhookevent.ts +13 -0
- package/src/models/index.ts +6 -0
- package/src/models/listentitypayout.ts +160 -0
- package/src/models/operations/cancelpayout.ts +71 -0
- package/src/models/operations/createpayout.ts +70 -0
- package/src/models/operations/getpayout.ts +71 -0
- package/src/models/operations/index.ts +4 -0
- package/src/models/operations/listpayouts.ts +208 -0
- package/src/models/payoutrequest.ts +68 -0
- package/src/models/payoutstatus.ts +31 -0
- package/src/models/payoutstatusreason.ts +47 -0
- package/src/models/payoutstatusreasoncode.ts +39 -0
- package/src/models/webhookeventtypes.ts +5 -0
- package/src/sdk/payouts.ts +128 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -9,6 +9,10 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
9
9
|
import * as openEnums from "../types/enums.js";
|
|
10
10
|
import { OpenEnum } from "../types/enums.js";
|
|
11
11
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
12
|
+
import {
|
|
13
|
+
EntityPayoutResponse,
|
|
14
|
+
EntityPayoutResponse$inboundSchema,
|
|
15
|
+
} from "./entitypayoutresponse.js";
|
|
12
16
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
13
17
|
import {
|
|
14
18
|
PaymentLinkResponse,
|
|
@@ -33,6 +37,11 @@ import { Url, Url$inboundSchema } from "./url.js";
|
|
|
33
37
|
export const EntityWebhookEventWebhookEventTypes = {
|
|
34
38
|
PaymentLinkPaid: "payment-link.paid",
|
|
35
39
|
BalanceTransactionCreated: "balance-transaction.created",
|
|
40
|
+
PayoutInitiated: "payout.initiated",
|
|
41
|
+
PayoutProcessingAtBank: "payout.processing-at-bank",
|
|
42
|
+
PayoutCompleted: "payout.completed",
|
|
43
|
+
PayoutCanceled: "payout.canceled",
|
|
44
|
+
PayoutFailed: "payout.failed",
|
|
36
45
|
SalesInvoiceCreated: "sales-invoice.created",
|
|
37
46
|
SalesInvoiceIssued: "sales-invoice.issued",
|
|
38
47
|
SalesInvoiceCanceled: "sales-invoice.canceled",
|
|
@@ -60,6 +69,7 @@ export type EntityWebhookEventWebhookEventTypes = OpenEnum<
|
|
|
60
69
|
export type Entity =
|
|
61
70
|
| PaymentLinkResponse
|
|
62
71
|
| TransferResponse
|
|
72
|
+
| EntityPayoutResponse
|
|
63
73
|
| SalesInvoiceResponse;
|
|
64
74
|
|
|
65
75
|
/**
|
|
@@ -69,6 +79,7 @@ export type Embedded = {
|
|
|
69
79
|
entity?:
|
|
70
80
|
| PaymentLinkResponse
|
|
71
81
|
| TransferResponse
|
|
82
|
+
| EntityPayoutResponse
|
|
72
83
|
| SalesInvoiceResponse
|
|
73
84
|
| undefined;
|
|
74
85
|
};
|
|
@@ -131,6 +142,7 @@ export const Entity$inboundSchema: z.ZodType<Entity, z.ZodTypeDef, unknown> = z
|
|
|
131
142
|
.union([
|
|
132
143
|
PaymentLinkResponse$inboundSchema,
|
|
133
144
|
TransferResponse$inboundSchema,
|
|
145
|
+
EntityPayoutResponse$inboundSchema,
|
|
134
146
|
SalesInvoiceResponse$inboundSchema,
|
|
135
147
|
]);
|
|
136
148
|
|
|
@@ -153,6 +165,7 @@ export const Embedded$inboundSchema: z.ZodType<
|
|
|
153
165
|
entity: z.union([
|
|
154
166
|
PaymentLinkResponse$inboundSchema,
|
|
155
167
|
TransferResponse$inboundSchema,
|
|
168
|
+
EntityPayoutResponse$inboundSchema,
|
|
156
169
|
SalesInvoiceResponse$inboundSchema,
|
|
157
170
|
]).optional(),
|
|
158
171
|
});
|
package/src/models/index.ts
CHANGED
|
@@ -63,6 +63,7 @@ export * from "./entityonboardingstatus.js";
|
|
|
63
63
|
export * from "./entityorganization.js";
|
|
64
64
|
export * from "./entitypaymentroute.js";
|
|
65
65
|
export * from "./entitypaymentrouteresponse.js";
|
|
66
|
+
export * from "./entitypayoutresponse.js";
|
|
66
67
|
export * from "./entitypermission.js";
|
|
67
68
|
export * from "./entityrefundresponse.js";
|
|
68
69
|
export * from "./entitysettlement.js";
|
|
@@ -80,6 +81,7 @@ export * from "./listentitychargeback.js";
|
|
|
80
81
|
export * from "./listentityinvoice.js";
|
|
81
82
|
export * from "./listentitymethod.js";
|
|
82
83
|
export * from "./listentitymethodall.js";
|
|
84
|
+
export * from "./listentitypayout.js";
|
|
83
85
|
export * from "./listentitypermission.js";
|
|
84
86
|
export * from "./listentityrefund.js";
|
|
85
87
|
export * from "./listentitysettlement.js";
|
|
@@ -139,6 +141,10 @@ export * from "./paymentlinksequencetyperesponse.js";
|
|
|
139
141
|
export * from "./paymentmethod.js";
|
|
140
142
|
export * from "./paymentrequest.js";
|
|
141
143
|
export * from "./paymentresponse.js";
|
|
144
|
+
export * from "./payoutrequest.js";
|
|
145
|
+
export * from "./payoutstatus.js";
|
|
146
|
+
export * from "./payoutstatusreason.js";
|
|
147
|
+
export * from "./payoutstatusreasoncode.js";
|
|
142
148
|
export * from "./profilerequest.js";
|
|
143
149
|
export * from "./profileresponse.js";
|
|
144
150
|
export * from "./profilereviewstatusresponse.js";
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 394d8d8b123a
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v3";
|
|
7
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
8
|
+
import { safeParse } from "../lib/schemas.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
|
+
import {
|
|
11
|
+
AmountNullable,
|
|
12
|
+
AmountNullable$inboundSchema,
|
|
13
|
+
} from "./amountnullable.js";
|
|
14
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
15
|
+
import { Mode, Mode$inboundSchema } from "./mode.js";
|
|
16
|
+
import { PayoutStatus, PayoutStatus$inboundSchema } from "./payoutstatus.js";
|
|
17
|
+
import {
|
|
18
|
+
PayoutStatusReason,
|
|
19
|
+
PayoutStatusReason$inboundSchema,
|
|
20
|
+
} from "./payoutstatusreason.js";
|
|
21
|
+
import { Url, Url$inboundSchema } from "./url.js";
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.
|
|
25
|
+
*/
|
|
26
|
+
export type ListEntityPayoutLinks = {
|
|
27
|
+
/**
|
|
28
|
+
* In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
|
|
29
|
+
*/
|
|
30
|
+
self: Url;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export type ListEntityPayout = {
|
|
34
|
+
/**
|
|
35
|
+
* Indicates the response contains a payout object. Will always contain the string `payout` for this endpoint.
|
|
36
|
+
*/
|
|
37
|
+
resource: string;
|
|
38
|
+
/**
|
|
39
|
+
* The identifier uniquely referring to this payout. Mollie assigns this identifier at payout creation time.
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* Mollie will always refer to the payout by this ID. Example: `payout_j8NvRAM2WNZtsykpLEX8J`.
|
|
43
|
+
*/
|
|
44
|
+
id: string;
|
|
45
|
+
/**
|
|
46
|
+
* The identifier of the balance that will be paid out. Example: `bal_gVMhHKqSSRYJyPsuoPNFH`.
|
|
47
|
+
*/
|
|
48
|
+
balanceId: string;
|
|
49
|
+
/**
|
|
50
|
+
* The amount to pay out. When omitted from the request, the full available balance minus any configured
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
* balance reserve is paid out.
|
|
54
|
+
*
|
|
55
|
+
* Merchants registered in the United Kingdom cannot specify a custom amount — omit this field to pay out
|
|
56
|
+
* the full available balance.
|
|
57
|
+
*
|
|
58
|
+
* The value in the response reflects the amount paid out, excluding any applicable fees.
|
|
59
|
+
*/
|
|
60
|
+
amount?: AmountNullable | null | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* The description that will appear on the bank statement for this payout.
|
|
63
|
+
*/
|
|
64
|
+
description?: string | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* The status of the payout.
|
|
67
|
+
*/
|
|
68
|
+
status: PayoutStatus;
|
|
69
|
+
/**
|
|
70
|
+
* The reason for the payout's current status.
|
|
71
|
+
*/
|
|
72
|
+
statusReason: PayoutStatusReason;
|
|
73
|
+
/**
|
|
74
|
+
* The entity's date and time of creation, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
75
|
+
*/
|
|
76
|
+
createdAt: string;
|
|
77
|
+
/**
|
|
78
|
+
* The date and time the payout was initiated, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
79
|
+
*
|
|
80
|
+
* @remarks
|
|
81
|
+
* This is the moment Mollie attempted to reserve the funds on the balance.
|
|
82
|
+
*/
|
|
83
|
+
initiatedAt?: string | null | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* The date and time the payout was sent to the destination bank account, in
|
|
86
|
+
*
|
|
87
|
+
* @remarks
|
|
88
|
+
* [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. `null` if the payout has not completed yet.
|
|
89
|
+
*/
|
|
90
|
+
completedAt?: string | null | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* The date and time the payout was canceled, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
93
|
+
*
|
|
94
|
+
* @remarks
|
|
95
|
+
* `null` if the payout was not canceled.
|
|
96
|
+
*/
|
|
97
|
+
canceledAt?: string | null | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* Whether this entity was created in live mode or in test mode.
|
|
100
|
+
*/
|
|
101
|
+
mode: Mode;
|
|
102
|
+
/**
|
|
103
|
+
* An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.
|
|
104
|
+
*/
|
|
105
|
+
links?: ListEntityPayoutLinks | undefined;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
/** @internal */
|
|
109
|
+
export const ListEntityPayoutLinks$inboundSchema: z.ZodType<
|
|
110
|
+
ListEntityPayoutLinks,
|
|
111
|
+
z.ZodTypeDef,
|
|
112
|
+
unknown
|
|
113
|
+
> = z.object({
|
|
114
|
+
self: Url$inboundSchema,
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
export function listEntityPayoutLinksFromJSON(
|
|
118
|
+
jsonString: string,
|
|
119
|
+
): SafeParseResult<ListEntityPayoutLinks, SDKValidationError> {
|
|
120
|
+
return safeParse(
|
|
121
|
+
jsonString,
|
|
122
|
+
(x) => ListEntityPayoutLinks$inboundSchema.parse(JSON.parse(x)),
|
|
123
|
+
`Failed to parse 'ListEntityPayoutLinks' from JSON`,
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/** @internal */
|
|
128
|
+
export const ListEntityPayout$inboundSchema: z.ZodType<
|
|
129
|
+
ListEntityPayout,
|
|
130
|
+
z.ZodTypeDef,
|
|
131
|
+
unknown
|
|
132
|
+
> = z.object({
|
|
133
|
+
resource: z.string(),
|
|
134
|
+
id: z.string(),
|
|
135
|
+
balanceId: z.string(),
|
|
136
|
+
amount: z.nullable(AmountNullable$inboundSchema).optional(),
|
|
137
|
+
description: z.string().optional(),
|
|
138
|
+
status: PayoutStatus$inboundSchema,
|
|
139
|
+
statusReason: PayoutStatusReason$inboundSchema,
|
|
140
|
+
createdAt: z.string(),
|
|
141
|
+
initiatedAt: z.nullable(z.string()).optional(),
|
|
142
|
+
completedAt: z.nullable(z.string()).optional(),
|
|
143
|
+
canceledAt: z.nullable(z.string()).optional(),
|
|
144
|
+
mode: Mode$inboundSchema,
|
|
145
|
+
_links: z.lazy(() => ListEntityPayoutLinks$inboundSchema).optional(),
|
|
146
|
+
}).transform((v) => {
|
|
147
|
+
return remap$(v, {
|
|
148
|
+
"_links": "links",
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
export function listEntityPayoutFromJSON(
|
|
153
|
+
jsonString: string,
|
|
154
|
+
): SafeParseResult<ListEntityPayout, SDKValidationError> {
|
|
155
|
+
return safeParse(
|
|
156
|
+
jsonString,
|
|
157
|
+
(x) => ListEntityPayout$inboundSchema.parse(JSON.parse(x)),
|
|
158
|
+
`Failed to parse 'ListEntityPayout' from JSON`,
|
|
159
|
+
);
|
|
160
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: a8ceed358b32
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v3";
|
|
7
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
8
|
+
|
|
9
|
+
export type CancelPayoutGlobals = {
|
|
10
|
+
/**
|
|
11
|
+
* Most API credentials are specifically created for either live mode or test mode. In those cases the `testmode` query
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by
|
|
15
|
+
* setting the `testmode` query parameter to `true`.
|
|
16
|
+
*
|
|
17
|
+
* Test entities cannot be retrieved when the endpoint is set to live mode, and vice versa.
|
|
18
|
+
*/
|
|
19
|
+
testmode?: boolean | undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type CancelPayoutRequest = {
|
|
23
|
+
/**
|
|
24
|
+
* Provide the ID of the payout.
|
|
25
|
+
*/
|
|
26
|
+
payoutId: string;
|
|
27
|
+
/**
|
|
28
|
+
* Most API credentials are specifically created for either live mode or test mode. In those cases the `testmode` query
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by
|
|
32
|
+
* setting the `testmode` query parameter to `true`.
|
|
33
|
+
*
|
|
34
|
+
* Test entities cannot be retrieved when the endpoint is set to live mode, and vice versa.
|
|
35
|
+
*/
|
|
36
|
+
testmode?: boolean | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* A unique key to ensure idempotent requests. This key should be a UUID v4 string.
|
|
39
|
+
*/
|
|
40
|
+
idempotencyKey?: string | undefined;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export type CancelPayoutRequest$Outbound = {
|
|
45
|
+
payoutId: string;
|
|
46
|
+
testmode?: boolean | undefined;
|
|
47
|
+
"idempotency-key"?: string | undefined;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export const CancelPayoutRequest$outboundSchema: z.ZodType<
|
|
52
|
+
CancelPayoutRequest$Outbound,
|
|
53
|
+
z.ZodTypeDef,
|
|
54
|
+
CancelPayoutRequest
|
|
55
|
+
> = z.object({
|
|
56
|
+
payoutId: z.string(),
|
|
57
|
+
testmode: z.boolean().optional(),
|
|
58
|
+
idempotencyKey: z.string().optional(),
|
|
59
|
+
}).transform((v) => {
|
|
60
|
+
return remap$(v, {
|
|
61
|
+
idempotencyKey: "idempotency-key",
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
export function cancelPayoutRequestToJSON(
|
|
66
|
+
cancelPayoutRequest: CancelPayoutRequest,
|
|
67
|
+
): string {
|
|
68
|
+
return JSON.stringify(
|
|
69
|
+
CancelPayoutRequest$outboundSchema.parse(cancelPayoutRequest),
|
|
70
|
+
);
|
|
71
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: b7566a7f5207
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v3";
|
|
7
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
8
|
+
import * as models from "../index.js";
|
|
9
|
+
|
|
10
|
+
export type CreatePayoutGlobals = {
|
|
11
|
+
/**
|
|
12
|
+
* Most API credentials are specifically created for either live mode or test mode. In those cases the `testmode` query
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by
|
|
16
|
+
* setting the `testmode` query parameter to `true`.
|
|
17
|
+
*
|
|
18
|
+
* Test entities cannot be retrieved when the endpoint is set to live mode, and vice versa.
|
|
19
|
+
*/
|
|
20
|
+
testmode?: boolean | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type CreatePayoutRequest = {
|
|
24
|
+
/**
|
|
25
|
+
* Most API credentials are specifically created for either live mode or test mode. In those cases the `testmode` query
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by
|
|
29
|
+
* setting the `testmode` query parameter to `true`.
|
|
30
|
+
*
|
|
31
|
+
* Test entities cannot be retrieved when the endpoint is set to live mode, and vice versa.
|
|
32
|
+
*/
|
|
33
|
+
testmode?: boolean | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* A unique key to ensure idempotent requests. This key should be a UUID v4 string.
|
|
36
|
+
*/
|
|
37
|
+
idempotencyKey?: string | undefined;
|
|
38
|
+
payoutRequest: models.PayoutRequest;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export type CreatePayoutRequest$Outbound = {
|
|
43
|
+
testmode?: boolean | undefined;
|
|
44
|
+
"idempotency-key"?: string | undefined;
|
|
45
|
+
"payout-request": models.PayoutRequest$Outbound;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const CreatePayoutRequest$outboundSchema: z.ZodType<
|
|
50
|
+
CreatePayoutRequest$Outbound,
|
|
51
|
+
z.ZodTypeDef,
|
|
52
|
+
CreatePayoutRequest
|
|
53
|
+
> = z.object({
|
|
54
|
+
testmode: z.boolean().optional(),
|
|
55
|
+
idempotencyKey: z.string().optional(),
|
|
56
|
+
payoutRequest: models.PayoutRequest$outboundSchema,
|
|
57
|
+
}).transform((v) => {
|
|
58
|
+
return remap$(v, {
|
|
59
|
+
idempotencyKey: "idempotency-key",
|
|
60
|
+
payoutRequest: "payout-request",
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
export function createPayoutRequestToJSON(
|
|
65
|
+
createPayoutRequest: CreatePayoutRequest,
|
|
66
|
+
): string {
|
|
67
|
+
return JSON.stringify(
|
|
68
|
+
CreatePayoutRequest$outboundSchema.parse(createPayoutRequest),
|
|
69
|
+
);
|
|
70
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: ae27c300ffe4
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v3";
|
|
7
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
8
|
+
|
|
9
|
+
export type GetPayoutGlobals = {
|
|
10
|
+
/**
|
|
11
|
+
* Most API credentials are specifically created for either live mode or test mode. In those cases the `testmode` query
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by
|
|
15
|
+
* setting the `testmode` query parameter to `true`.
|
|
16
|
+
*
|
|
17
|
+
* Test entities cannot be retrieved when the endpoint is set to live mode, and vice versa.
|
|
18
|
+
*/
|
|
19
|
+
testmode?: boolean | undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type GetPayoutRequest = {
|
|
23
|
+
/**
|
|
24
|
+
* Provide the ID of the payout.
|
|
25
|
+
*/
|
|
26
|
+
payoutId: string;
|
|
27
|
+
/**
|
|
28
|
+
* Most API credentials are specifically created for either live mode or test mode. In those cases the `testmode` query
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by
|
|
32
|
+
* setting the `testmode` query parameter to `true`.
|
|
33
|
+
*
|
|
34
|
+
* Test entities cannot be retrieved when the endpoint is set to live mode, and vice versa.
|
|
35
|
+
*/
|
|
36
|
+
testmode?: boolean | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* A unique key to ensure idempotent requests. This key should be a UUID v4 string.
|
|
39
|
+
*/
|
|
40
|
+
idempotencyKey?: string | undefined;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export type GetPayoutRequest$Outbound = {
|
|
45
|
+
payoutId: string;
|
|
46
|
+
testmode?: boolean | undefined;
|
|
47
|
+
"idempotency-key"?: string | undefined;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export const GetPayoutRequest$outboundSchema: z.ZodType<
|
|
52
|
+
GetPayoutRequest$Outbound,
|
|
53
|
+
z.ZodTypeDef,
|
|
54
|
+
GetPayoutRequest
|
|
55
|
+
> = z.object({
|
|
56
|
+
payoutId: z.string(),
|
|
57
|
+
testmode: z.boolean().optional(),
|
|
58
|
+
idempotencyKey: z.string().optional(),
|
|
59
|
+
}).transform((v) => {
|
|
60
|
+
return remap$(v, {
|
|
61
|
+
idempotencyKey: "idempotency-key",
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
export function getPayoutRequestToJSON(
|
|
66
|
+
getPayoutRequest: GetPayoutRequest,
|
|
67
|
+
): string {
|
|
68
|
+
return JSON.stringify(
|
|
69
|
+
GetPayoutRequest$outboundSchema.parse(getPayoutRequest),
|
|
70
|
+
);
|
|
71
|
+
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
export * from "./cancelpayment.js";
|
|
7
|
+
export * from "./cancelpayout.js";
|
|
7
8
|
export * from "./cancelrefund.js";
|
|
8
9
|
export * from "./cancelsubscription.js";
|
|
9
10
|
export * from "./createcapture.js";
|
|
@@ -14,6 +15,7 @@ export * from "./createcustomerpayment.js";
|
|
|
14
15
|
export * from "./createmandate.js";
|
|
15
16
|
export * from "./createpayment.js";
|
|
16
17
|
export * from "./createpaymentlink.js";
|
|
18
|
+
export * from "./createpayout.js";
|
|
17
19
|
export * from "./createprofile.js";
|
|
18
20
|
export * from "./createrefund.js";
|
|
19
21
|
export * from "./createsalesinvoice.js";
|
|
@@ -48,6 +50,7 @@ export * from "./getpartnerstatus.js";
|
|
|
48
50
|
export * from "./getpayment.js";
|
|
49
51
|
export * from "./getpaymentlink.js";
|
|
50
52
|
export * from "./getpaymentlinkpayments.js";
|
|
53
|
+
export * from "./getpayout.js";
|
|
51
54
|
export * from "./getpermission.js";
|
|
52
55
|
export * from "./getprimarybalance.js";
|
|
53
56
|
export * from "./getprofile.js";
|
|
@@ -81,6 +84,7 @@ export * from "./listmandates.js";
|
|
|
81
84
|
export * from "./listmethods.js";
|
|
82
85
|
export * from "./listpaymentlinks.js";
|
|
83
86
|
export * from "./listpayments.js";
|
|
87
|
+
export * from "./listpayouts.js";
|
|
84
88
|
export * from "./listpermissions.js";
|
|
85
89
|
export * from "./listprofiles.js";
|
|
86
90
|
export * from "./listrefunds.js";
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 2417fe06d050
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v3";
|
|
7
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
8
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
import * as models from "../index.js";
|
|
12
|
+
|
|
13
|
+
export type ListPayoutsGlobals = {
|
|
14
|
+
/**
|
|
15
|
+
* Most API credentials are specifically created for either live mode or test mode. In those cases the `testmode` query
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by
|
|
19
|
+
* setting the `testmode` query parameter to `true`.
|
|
20
|
+
*
|
|
21
|
+
* Test entities cannot be retrieved when the endpoint is set to live mode, and vice versa.
|
|
22
|
+
*/
|
|
23
|
+
testmode?: boolean | undefined;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type ListPayoutsRequest = {
|
|
27
|
+
/**
|
|
28
|
+
* Return only payouts for the balance with the given ID. The value must be a valid balance
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* token in the format `bal_*`.
|
|
32
|
+
*/
|
|
33
|
+
balanceId?: string | null | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Provide an ID to start the result set from the item with the given ID and onwards. This allows you to paginate the
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
* result set.
|
|
39
|
+
*/
|
|
40
|
+
from?: string | null | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* The maximum number of items to return. Defaults to 50 items.
|
|
43
|
+
*/
|
|
44
|
+
limit?: number | null | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Used for setting the direction of the result set. Defaults to descending order, meaning the results are ordered from
|
|
47
|
+
*
|
|
48
|
+
* @remarks
|
|
49
|
+
* newest to oldest.
|
|
50
|
+
*/
|
|
51
|
+
sort?: models.Sorting | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Most API credentials are specifically created for either live mode or test mode. In those cases the `testmode` query
|
|
54
|
+
*
|
|
55
|
+
* @remarks
|
|
56
|
+
* parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by
|
|
57
|
+
* setting the `testmode` query parameter to `true`.
|
|
58
|
+
*
|
|
59
|
+
* Test entities cannot be retrieved when the endpoint is set to live mode, and vice versa.
|
|
60
|
+
*/
|
|
61
|
+
testmode?: boolean | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* A unique key to ensure idempotent requests. This key should be a UUID v4 string.
|
|
64
|
+
*/
|
|
65
|
+
idempotencyKey?: string | undefined;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export type ListPayoutsEmbedded = {
|
|
69
|
+
/**
|
|
70
|
+
* An array of payout objects. For a complete reference of the payout object, refer to the
|
|
71
|
+
*
|
|
72
|
+
* @remarks
|
|
73
|
+
* [Get payout endpoint](get-payout) documentation.
|
|
74
|
+
*/
|
|
75
|
+
payouts: Array<models.ListEntityPayout>;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* A list of payout objects. For a complete reference of the payout object, refer to the
|
|
80
|
+
*
|
|
81
|
+
* @remarks
|
|
82
|
+
* [Get payout endpoint](get-payout) documentation.
|
|
83
|
+
*/
|
|
84
|
+
export type ListPayoutsResponseBody = {
|
|
85
|
+
/**
|
|
86
|
+
* The number of items in this result set. If more items are available, a `_links.next` URL will be present in the result
|
|
87
|
+
*
|
|
88
|
+
* @remarks
|
|
89
|
+
* as well.
|
|
90
|
+
*
|
|
91
|
+
* The maximum number of items per result set is controlled by the `limit` property provided in the request. The default
|
|
92
|
+
* limit is 50 items.
|
|
93
|
+
*/
|
|
94
|
+
count: number;
|
|
95
|
+
embedded: ListPayoutsEmbedded;
|
|
96
|
+
/**
|
|
97
|
+
* Links to help navigate through the lists of items. Every URL object will contain an `href` and a `type` field.
|
|
98
|
+
*/
|
|
99
|
+
links: models.ListLinks;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export type ListPayoutsResponse = {
|
|
103
|
+
result: ListPayoutsResponseBody;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
/** @internal */
|
|
107
|
+
export type ListPayoutsRequest$Outbound = {
|
|
108
|
+
balanceId?: string | null | undefined;
|
|
109
|
+
from?: string | null | undefined;
|
|
110
|
+
limit?: number | null | undefined;
|
|
111
|
+
sort?: string | undefined;
|
|
112
|
+
testmode?: boolean | undefined;
|
|
113
|
+
"idempotency-key"?: string | undefined;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
/** @internal */
|
|
117
|
+
export const ListPayoutsRequest$outboundSchema: z.ZodType<
|
|
118
|
+
ListPayoutsRequest$Outbound,
|
|
119
|
+
z.ZodTypeDef,
|
|
120
|
+
ListPayoutsRequest
|
|
121
|
+
> = z.object({
|
|
122
|
+
balanceId: z.nullable(z.string()).optional(),
|
|
123
|
+
from: z.nullable(z.string()).optional(),
|
|
124
|
+
limit: z.nullable(z.number().int()).optional(),
|
|
125
|
+
sort: models.Sorting$outboundSchema.optional(),
|
|
126
|
+
testmode: z.boolean().optional(),
|
|
127
|
+
idempotencyKey: z.string().optional(),
|
|
128
|
+
}).transform((v) => {
|
|
129
|
+
return remap$(v, {
|
|
130
|
+
idempotencyKey: "idempotency-key",
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
export function listPayoutsRequestToJSON(
|
|
135
|
+
listPayoutsRequest: ListPayoutsRequest,
|
|
136
|
+
): string {
|
|
137
|
+
return JSON.stringify(
|
|
138
|
+
ListPayoutsRequest$outboundSchema.parse(listPayoutsRequest),
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/** @internal */
|
|
143
|
+
export const ListPayoutsEmbedded$inboundSchema: z.ZodType<
|
|
144
|
+
ListPayoutsEmbedded,
|
|
145
|
+
z.ZodTypeDef,
|
|
146
|
+
unknown
|
|
147
|
+
> = z.object({
|
|
148
|
+
payouts: z.array(models.ListEntityPayout$inboundSchema),
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
export function listPayoutsEmbeddedFromJSON(
|
|
152
|
+
jsonString: string,
|
|
153
|
+
): SafeParseResult<ListPayoutsEmbedded, SDKValidationError> {
|
|
154
|
+
return safeParse(
|
|
155
|
+
jsonString,
|
|
156
|
+
(x) => ListPayoutsEmbedded$inboundSchema.parse(JSON.parse(x)),
|
|
157
|
+
`Failed to parse 'ListPayoutsEmbedded' from JSON`,
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/** @internal */
|
|
162
|
+
export const ListPayoutsResponseBody$inboundSchema: z.ZodType<
|
|
163
|
+
ListPayoutsResponseBody,
|
|
164
|
+
z.ZodTypeDef,
|
|
165
|
+
unknown
|
|
166
|
+
> = z.object({
|
|
167
|
+
count: z.number().int(),
|
|
168
|
+
_embedded: z.lazy(() => ListPayoutsEmbedded$inboundSchema),
|
|
169
|
+
_links: models.ListLinks$inboundSchema,
|
|
170
|
+
}).transform((v) => {
|
|
171
|
+
return remap$(v, {
|
|
172
|
+
"_embedded": "embedded",
|
|
173
|
+
"_links": "links",
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
export function listPayoutsResponseBodyFromJSON(
|
|
178
|
+
jsonString: string,
|
|
179
|
+
): SafeParseResult<ListPayoutsResponseBody, SDKValidationError> {
|
|
180
|
+
return safeParse(
|
|
181
|
+
jsonString,
|
|
182
|
+
(x) => ListPayoutsResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
183
|
+
`Failed to parse 'ListPayoutsResponseBody' from JSON`,
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/** @internal */
|
|
188
|
+
export const ListPayoutsResponse$inboundSchema: z.ZodType<
|
|
189
|
+
ListPayoutsResponse,
|
|
190
|
+
z.ZodTypeDef,
|
|
191
|
+
unknown
|
|
192
|
+
> = z.object({
|
|
193
|
+
Result: z.lazy(() => ListPayoutsResponseBody$inboundSchema),
|
|
194
|
+
}).transform((v) => {
|
|
195
|
+
return remap$(v, {
|
|
196
|
+
"Result": "result",
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
export function listPayoutsResponseFromJSON(
|
|
201
|
+
jsonString: string,
|
|
202
|
+
): SafeParseResult<ListPayoutsResponse, SDKValidationError> {
|
|
203
|
+
return safeParse(
|
|
204
|
+
jsonString,
|
|
205
|
+
(x) => ListPayoutsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
206
|
+
`Failed to parse 'ListPayoutsResponse' from JSON`,
|
|
207
|
+
);
|
|
208
|
+
}
|