@gr4vy/sdk 2.3.11 → 2.3.14
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/funcs/paymentLinksList.d.ts +1 -1
- package/funcs/paymentLinksList.d.ts.map +1 -1
- package/funcs/paymentLinksList.js +17 -11
- package/funcs/paymentLinksList.js.map +1 -1
- package/funcs/transactionsList.js +1 -0
- package/funcs/transactionsList.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/aiinsightsreportspec.d.ts +24 -0
- package/models/components/aiinsightsreportspec.d.ts.map +1 -0
- package/models/components/aiinsightsreportspec.js +50 -0
- package/models/components/aiinsightsreportspec.js.map +1 -0
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/components/paymentlinkstatus.d.ts +2 -0
- package/models/components/paymentlinkstatus.d.ts.map +1 -1
- package/models/components/paymentlinkstatus.js +3 -1
- package/models/components/paymentlinkstatus.js.map +1 -1
- package/models/components/refund.d.ts +12 -0
- package/models/components/refund.d.ts.map +1 -1
- package/models/components/refund.js +5 -0
- package/models/components/refund.js.map +1 -1
- package/models/components/reportcreate.d.ts +5 -4
- package/models/components/reportcreate.d.ts.map +1 -1
- package/models/components/reportcreate.js +3 -0
- package/models/components/reportcreate.js.map +1 -1
- package/models/components/reportspecmodel.d.ts +1 -0
- package/models/components/reportspecmodel.d.ts.map +1 -1
- package/models/components/reportspecmodel.js +1 -0
- package/models/components/reportspecmodel.js.map +1 -1
- package/models/components/transactionevent.d.ts +1 -0
- package/models/components/transactionevent.d.ts.map +1 -1
- package/models/components/transactionevent.js +1 -0
- package/models/components/transactionevent.js.map +1 -1
- package/models/operations/listpaymentlinks.d.ts +45 -0
- package/models/operations/listpaymentlinks.d.ts.map +1 -1
- package/models/operations/listpaymentlinks.js +17 -0
- package/models/operations/listpaymentlinks.js.map +1 -1
- package/models/operations/listtransactions.d.ts +5 -0
- package/models/operations/listtransactions.d.ts.map +1 -1
- package/models/operations/listtransactions.js +2 -0
- package/models/operations/listtransactions.js.map +1 -1
- package/package.json +1 -1
- package/sdk/paymentlinks.d.ts +1 -1
- package/sdk/paymentlinks.d.ts.map +1 -1
- package/sdk/paymentlinks.js +2 -2
- package/sdk/paymentlinks.js.map +1 -1
- package/src/funcs/paymentLinksList.ts +17 -24
- package/src/funcs/transactionsList.ts +1 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/aiinsightsreportspec.ts +40 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/components/paymentlinkstatus.ts +6 -0
- package/src/models/components/refund.ts +17 -0
- package/src/models/components/reportcreate.ts +11 -0
- package/src/models/components/reportspecmodel.ts +1 -0
- package/src/models/components/transactionevent.ts +2 -0
- package/src/models/operations/listpaymentlinks.ts +62 -0
- package/src/models/operations/listtransactions.ts +7 -0
- package/src/sdk/paymentlinks.ts +2 -8
|
@@ -22,6 +22,42 @@ export type ListPaymentLinksRequest = {
|
|
|
22
22
|
* The maximum number of items that are returned.
|
|
23
23
|
*/
|
|
24
24
|
limit?: number | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Filters the results to only payment links created before this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
|
|
27
|
+
*/
|
|
28
|
+
createdAtLte?: Date | null | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Filters the results to only payment links created after this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
|
|
31
|
+
*/
|
|
32
|
+
createdAtGte?: Date | null | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Filters the results to only payment links updated before this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
|
|
35
|
+
*/
|
|
36
|
+
updatedAtLte?: Date | null | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Filters the results to only payment links updated after this ISO date-time string. The time zone must be included. Ensure that the date-time string is URL encoded, e.g. `2022-01-01T12:00:00+08:00` must be encoded as `2022-01-01T12%3A00%3A00%2B08%3A00`.
|
|
39
|
+
*/
|
|
40
|
+
updatedAtGte?: Date | null | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Filters for payment links that have matching `currency` values. The `currency` values provided must be formatted as 3-letter ISO currency codes.
|
|
43
|
+
*/
|
|
44
|
+
currency?: Array<string> | null | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Filters for payment links that have an `amount` equal to this value.
|
|
47
|
+
*/
|
|
48
|
+
amountEq?: number | null | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Filters for payment links that have an `amount` greater than or equal to this value.
|
|
51
|
+
*/
|
|
52
|
+
amountGte?: number | null | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Filters for payment links that have an `amount` less than or equal to this value.
|
|
55
|
+
*/
|
|
56
|
+
amountLte?: number | null | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Filters the results to only the payment links that have a `status` that matches with any of the provided status values.
|
|
59
|
+
*/
|
|
60
|
+
status?: Array<components.PaymentLinkStatus> | null | undefined;
|
|
25
61
|
/**
|
|
26
62
|
* Filters the results to only get the items for which some of the buyer data contains exactly the provided `buyer_search` values.
|
|
27
63
|
*/
|
|
@@ -40,6 +76,15 @@ export type ListPaymentLinksResponse = {
|
|
|
40
76
|
export type ListPaymentLinksRequest$Outbound = {
|
|
41
77
|
cursor?: string | null | undefined;
|
|
42
78
|
limit: number;
|
|
79
|
+
created_at_lte?: string | null | undefined;
|
|
80
|
+
created_at_gte?: string | null | undefined;
|
|
81
|
+
updated_at_lte?: string | null | undefined;
|
|
82
|
+
updated_at_gte?: string | null | undefined;
|
|
83
|
+
currency?: Array<string> | null | undefined;
|
|
84
|
+
amount_eq?: number | null | undefined;
|
|
85
|
+
amount_gte?: number | null | undefined;
|
|
86
|
+
amount_lte?: number | null | undefined;
|
|
87
|
+
status?: Array<string> | null | undefined;
|
|
43
88
|
buyer_search?: Array<string> | null | undefined;
|
|
44
89
|
merchantAccountId?: string | null | undefined;
|
|
45
90
|
};
|
|
@@ -52,10 +97,27 @@ export const ListPaymentLinksRequest$outboundSchema: z.ZodType<
|
|
|
52
97
|
> = z.object({
|
|
53
98
|
cursor: z.nullable(z.string()).optional(),
|
|
54
99
|
limit: z.number().int().default(20),
|
|
100
|
+
createdAtLte: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
101
|
+
createdAtGte: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
102
|
+
updatedAtLte: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
103
|
+
updatedAtGte: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
104
|
+
currency: z.nullable(z.array(z.string())).optional(),
|
|
105
|
+
amountEq: z.nullable(z.number().int()).optional(),
|
|
106
|
+
amountGte: z.nullable(z.number().int()).optional(),
|
|
107
|
+
amountLte: z.nullable(z.number().int()).optional(),
|
|
108
|
+
status: z.nullable(z.array(components.PaymentLinkStatus$outboundSchema))
|
|
109
|
+
.optional(),
|
|
55
110
|
buyerSearch: z.nullable(z.array(z.string())).optional(),
|
|
56
111
|
merchantAccountId: z.nullable(z.string()).optional(),
|
|
57
112
|
}).transform((v) => {
|
|
58
113
|
return remap$(v, {
|
|
114
|
+
createdAtLte: "created_at_lte",
|
|
115
|
+
createdAtGte: "created_at_gte",
|
|
116
|
+
updatedAtLte: "updated_at_lte",
|
|
117
|
+
updatedAtGte: "updated_at_gte",
|
|
118
|
+
amountEq: "amount_eq",
|
|
119
|
+
amountGte: "amount_gte",
|
|
120
|
+
amountLte: "amount_lte",
|
|
59
121
|
buyerSearch: "buyer_search",
|
|
60
122
|
});
|
|
61
123
|
});
|
|
@@ -109,6 +109,10 @@ export type ListTransactionsRequest = {
|
|
|
109
109
|
* Filters for transactions where the `checkout_session_id` matches the provided value.
|
|
110
110
|
*/
|
|
111
111
|
checkoutSessionId?: string | null | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* Filters for transactions where the `payment_link_id` matches the provided value.
|
|
114
|
+
*/
|
|
115
|
+
paymentLinkId?: string | null | undefined;
|
|
112
116
|
/**
|
|
113
117
|
* Filters for transactions where the `reconciliation_id` matches the provided value.
|
|
114
118
|
*/
|
|
@@ -205,6 +209,7 @@ export type ListTransactionsRequest$Outbound = {
|
|
|
205
209
|
has_refunds?: boolean | null | undefined;
|
|
206
210
|
pending_review?: boolean | null | undefined;
|
|
207
211
|
checkout_session_id?: string | null | undefined;
|
|
212
|
+
payment_link_id?: string | null | undefined;
|
|
208
213
|
reconciliation_id?: string | null | undefined;
|
|
209
214
|
has_gift_card_redemptions?: boolean | null | undefined;
|
|
210
215
|
gift_card_id?: string | null | undefined;
|
|
@@ -260,6 +265,7 @@ export const ListTransactionsRequest$outboundSchema: z.ZodType<
|
|
|
260
265
|
hasRefunds: z.nullable(z.boolean()).optional(),
|
|
261
266
|
pendingReview: z.nullable(z.boolean()).optional(),
|
|
262
267
|
checkoutSessionId: z.nullable(z.string()).optional(),
|
|
268
|
+
paymentLinkId: z.nullable(z.string()).optional(),
|
|
263
269
|
reconciliationId: z.nullable(z.string()).optional(),
|
|
264
270
|
hasGiftCardRedemptions: z.nullable(z.boolean()).optional(),
|
|
265
271
|
giftCardId: z.nullable(z.string()).optional(),
|
|
@@ -301,6 +307,7 @@ export const ListTransactionsRequest$outboundSchema: z.ZodType<
|
|
|
301
307
|
hasRefunds: "has_refunds",
|
|
302
308
|
pendingReview: "pending_review",
|
|
303
309
|
checkoutSessionId: "checkout_session_id",
|
|
310
|
+
paymentLinkId: "payment_link_id",
|
|
304
311
|
reconciliationId: "reconciliation_id",
|
|
305
312
|
hasGiftCardRedemptions: "has_gift_card_redemptions",
|
|
306
313
|
giftCardId: "gift_card_id",
|
package/src/sdk/paymentlinks.ts
CHANGED
|
@@ -39,20 +39,14 @@ export class PaymentLinks extends ClientSDK {
|
|
|
39
39
|
* List all created payment links.
|
|
40
40
|
*/
|
|
41
41
|
async list(
|
|
42
|
-
|
|
43
|
-
limit?: number | undefined,
|
|
44
|
-
buyerSearch?: Array<string> | null | undefined,
|
|
45
|
-
merchantAccountId?: string | null | undefined,
|
|
42
|
+
request?: operations.ListPaymentLinksRequest | undefined,
|
|
46
43
|
options?: RequestOptions,
|
|
47
44
|
): Promise<
|
|
48
45
|
PageIterator<operations.ListPaymentLinksResponse, { cursor: string }>
|
|
49
46
|
> {
|
|
50
47
|
return unwrapResultIterator(paymentLinksList(
|
|
51
48
|
this,
|
|
52
|
-
|
|
53
|
-
limit,
|
|
54
|
-
buyerSearch,
|
|
55
|
-
merchantAccountId,
|
|
49
|
+
request,
|
|
56
50
|
options,
|
|
57
51
|
));
|
|
58
52
|
}
|