@gr4vy/sdk 1.7.1 → 1.9.0
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/examples/package-lock.json +1 -1
- package/funcs/transactionsEventsList.d.ts +5 -2
- package/funcs/transactionsEventsList.d.ts.map +1 -1
- package/funcs/transactionsEventsList.js +30 -7
- package/funcs/transactionsEventsList.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/encodings.d.ts +1 -0
- package/lib/encodings.d.ts.map +1 -1
- package/lib/encodings.js +9 -0
- package/lib/encodings.js.map +1 -1
- package/models/components/accountsreceivablesreportspec.d.ts +1 -1
- package/models/components/accountsreceivablesreportspec.d.ts.map +1 -1
- package/models/components/accountsreceivablesreportspec.js +1 -1
- package/models/components/accountsreceivablesreportspec.js.map +1 -1
- package/models/components/accountupdateroptions.d.ts +1 -1
- package/models/components/accountupdateroptions.d.ts.map +1 -1
- package/models/components/accountupdateroptions.js +1 -1
- package/models/components/accountupdateroptions.js.map +1 -1
- package/models/components/applepaypaymentmethodcreate.d.ts +1 -1
- package/models/components/applepaypaymentmethodcreate.d.ts.map +1 -1
- package/models/components/clicktopayfpanpaymentmethodcreate.d.ts +1 -1
- package/models/components/clicktopayfpanpaymentmethodcreate.d.ts.map +1 -1
- package/models/components/clicktopaypaymentmethodcreate.d.ts +1 -1
- package/models/components/clicktopaypaymentmethodcreate.d.ts.map +1 -1
- package/models/components/detailedsettlementreportspec.d.ts +1 -1
- package/models/components/detailedsettlementreportspec.d.ts.map +1 -1
- package/models/components/detailedsettlementreportspec.js +1 -1
- package/models/components/detailedsettlementreportspec.js.map +1 -1
- package/models/components/googlepayfpanpaymentmethodcreate.d.ts +1 -1
- package/models/components/googlepayfpanpaymentmethodcreate.d.ts.map +1 -1
- package/models/components/googlepaypaymentmethodcreate.d.ts +1 -1
- package/models/components/googlepaypaymentmethodcreate.d.ts.map +1 -1
- package/models/components/index.d.ts +0 -1
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +0 -1
- package/models/components/index.js.map +1 -1
- package/models/components/networktokenpaymentmethodcreate.d.ts +1 -1
- package/models/components/networktokenpaymentmethodcreate.d.ts.map +1 -1
- package/models/components/paymentlink.d.ts +8 -0
- package/models/components/paymentlink.d.ts.map +1 -1
- package/models/components/paymentlink.js +3 -0
- package/models/components/paymentlink.js.map +1 -1
- package/models/components/paymentlinkcreate.d.ts +10 -0
- package/models/components/paymentlinkcreate.d.ts.map +1 -1
- package/models/components/paymentlinkcreate.js +3 -0
- package/models/components/paymentlinkcreate.js.map +1 -1
- package/models/components/reportcreate.d.ts +4 -36
- package/models/components/reportcreate.d.ts.map +1 -1
- package/models/components/reportcreate.js +8 -8
- package/models/components/reportcreate.js.map +1 -1
- package/models/components/transactionevent.d.ts +3 -2
- package/models/components/transactionevent.d.ts.map +1 -1
- package/models/components/transactionevent.js +1 -2
- package/models/components/transactionevent.js.map +1 -1
- package/models/components/transactionretriesreportspec.d.ts +1 -1
- package/models/components/transactionretriesreportspec.d.ts.map +1 -1
- package/models/components/transactionretriesreportspec.js +1 -1
- package/models/components/transactionretriesreportspec.js.map +1 -1
- package/models/components/transactionsreportspec.d.ts +1 -1
- package/models/components/transactionsreportspec.d.ts.map +1 -1
- package/models/components/transactionsreportspec.js +1 -1
- package/models/components/transactionsreportspec.js.map +1 -1
- package/models/operations/listbuyerpaymentmethods.d.ts +1 -1
- package/models/operations/listbuyerpaymentmethods.d.ts.map +1 -1
- package/models/operations/listbuyerpaymentmethods.js +1 -1
- package/models/operations/listbuyerpaymentmethods.js.map +1 -1
- package/models/operations/listtransactionevents.d.ts +9 -0
- package/models/operations/listtransactionevents.d.ts.map +1 -1
- package/models/operations/listtransactionevents.js +15 -1
- package/models/operations/listtransactionevents.js.map +1 -1
- package/package.json +1 -1
- package/sdk/events.d.ts +5 -2
- package/sdk/events.d.ts.map +1 -1
- package/sdk/events.js +2 -2
- package/sdk/events.js.map +1 -1
- package/src/funcs/transactionsEventsList.ts +127 -53
- package/src/lib/config.ts +3 -3
- package/src/lib/encodings.ts +13 -0
- package/src/models/components/accountsreceivablesreportspec.ts +2 -4
- package/src/models/components/accountupdateroptions.ts +2 -2
- package/src/models/components/applepaypaymentmethodcreate.ts +1 -1
- package/src/models/components/clicktopayfpanpaymentmethodcreate.ts +1 -1
- package/src/models/components/clicktopaypaymentmethodcreate.ts +1 -1
- package/src/models/components/detailedsettlementreportspec.ts +2 -4
- package/src/models/components/googlepayfpanpaymentmethodcreate.ts +1 -1
- package/src/models/components/googlepaypaymentmethodcreate.ts +1 -1
- package/src/models/components/index.ts +0 -1
- package/src/models/components/networktokenpaymentmethodcreate.ts +1 -1
- package/src/models/components/paymentlink.ts +11 -0
- package/src/models/components/paymentlinkcreate.ts +13 -0
- package/src/models/components/reportcreate.ts +24 -42
- package/src/models/components/transactionevent.ts +2 -6
- package/src/models/components/transactionretriesreportspec.ts +2 -4
- package/src/models/components/transactionsreportspec.ts +2 -2
- package/src/models/operations/listbuyerpaymentmethods.ts +2 -2
- package/src/models/operations/listtransactionevents.ts +31 -0
- package/src/sdk/events.ts +6 -4
- package/src/types/unrecognized.ts +9 -1
- package/tsconfig.json +1 -2
- package/types/unrecognized.d.ts +7 -1
- package/types/unrecognized.d.ts.map +1 -1
- package/types/unrecognized.js +9 -1
- package/types/unrecognized.js.map +1 -1
- package/models/components/transactioneventcontext.d.ts +0 -14
- package/models/components/transactioneventcontext.d.ts.map +0 -1
- package/models/components/transactioneventcontext.js +0 -57
- package/models/components/transactioneventcontext.js.map +0 -1
- package/src/models/components/transactioneventcontext.ts +0 -47
|
@@ -62,7 +62,7 @@ export const OrderBy$outboundSchema: z.ZodType<string, z.ZodTypeDef, OrderBy> =
|
|
|
62
62
|
export type ListBuyerPaymentMethodsRequest$Outbound = {
|
|
63
63
|
buyer_id?: string | null | undefined;
|
|
64
64
|
buyer_external_identifier?: string | null | undefined;
|
|
65
|
-
sort_by
|
|
65
|
+
sort_by?: "last_used_at" | null | undefined;
|
|
66
66
|
order_by: string;
|
|
67
67
|
country?: string | null | undefined;
|
|
68
68
|
currency?: string | null | undefined;
|
|
@@ -77,7 +77,7 @@ export const ListBuyerPaymentMethodsRequest$outboundSchema: z.ZodType<
|
|
|
77
77
|
> = z.object({
|
|
78
78
|
buyerId: z.nullable(z.string()).optional(),
|
|
79
79
|
buyerExternalIdentifier: z.nullable(z.string()).optional(),
|
|
80
|
-
sortBy: z.nullable(z.literal("last_used_at")),
|
|
80
|
+
sortBy: z.nullable(z.literal("last_used_at")).optional(),
|
|
81
81
|
orderBy: OrderBy$outboundSchema.default("desc"),
|
|
82
82
|
country: z.nullable(z.string()).optional(),
|
|
83
83
|
currency: z.nullable(z.string()).optional(),
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
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 * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
7
11
|
|
|
8
12
|
export type ListTransactionEventsGlobals = {
|
|
9
13
|
merchantAccountId?: string | undefined;
|
|
@@ -28,6 +32,10 @@ export type ListTransactionEventsRequest = {
|
|
|
28
32
|
merchantAccountId?: string | null | undefined;
|
|
29
33
|
};
|
|
30
34
|
|
|
35
|
+
export type ListTransactionEventsResponse = {
|
|
36
|
+
result: components.TransactionEvents;
|
|
37
|
+
};
|
|
38
|
+
|
|
31
39
|
/** @internal */
|
|
32
40
|
export type ListTransactionEventsRequest$Outbound = {
|
|
33
41
|
transaction_id: string;
|
|
@@ -61,3 +69,26 @@ export function listTransactionEventsRequestToJSON(
|
|
|
61
69
|
),
|
|
62
70
|
);
|
|
63
71
|
}
|
|
72
|
+
|
|
73
|
+
/** @internal */
|
|
74
|
+
export const ListTransactionEventsResponse$inboundSchema: z.ZodType<
|
|
75
|
+
ListTransactionEventsResponse,
|
|
76
|
+
z.ZodTypeDef,
|
|
77
|
+
unknown
|
|
78
|
+
> = z.object({
|
|
79
|
+
Result: components.TransactionEvents$inboundSchema,
|
|
80
|
+
}).transform((v) => {
|
|
81
|
+
return remap$(v, {
|
|
82
|
+
"Result": "result",
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
export function listTransactionEventsResponseFromJSON(
|
|
87
|
+
jsonString: string,
|
|
88
|
+
): SafeParseResult<ListTransactionEventsResponse, SDKValidationError> {
|
|
89
|
+
return safeParse(
|
|
90
|
+
jsonString,
|
|
91
|
+
(x) => ListTransactionEventsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
92
|
+
`Failed to parse 'ListTransactionEventsResponse' from JSON`,
|
|
93
|
+
);
|
|
94
|
+
}
|
package/src/sdk/events.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import { transactionsEventsList } from "../funcs/transactionsEventsList.js";
|
|
6
6
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
|
-
import * as
|
|
8
|
-
import {
|
|
7
|
+
import * as operations from "../models/operations/index.js";
|
|
8
|
+
import { PageIterator, unwrapResultIterator } from "../types/operations.js";
|
|
9
9
|
|
|
10
10
|
export class Events extends ClientSDK {
|
|
11
11
|
/**
|
|
@@ -20,8 +20,10 @@ export class Events extends ClientSDK {
|
|
|
20
20
|
limit?: number | undefined,
|
|
21
21
|
merchantAccountId?: string | null | undefined,
|
|
22
22
|
options?: RequestOptions,
|
|
23
|
-
): Promise<
|
|
24
|
-
|
|
23
|
+
): Promise<
|
|
24
|
+
PageIterator<operations.ListTransactionEventsResponse, { cursor: string }>
|
|
25
|
+
> {
|
|
26
|
+
return unwrapResultIterator(transactionsEventsList(
|
|
25
27
|
this,
|
|
26
28
|
transactionId,
|
|
27
29
|
cursor,
|
|
@@ -16,8 +16,16 @@ export function startCountingUnrecognized() {
|
|
|
16
16
|
refCount++;
|
|
17
17
|
const start = globalCount;
|
|
18
18
|
return {
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Ends counting and returns the delta.
|
|
21
|
+
* @param delta - If provided, only this amount is added to the parent counter
|
|
22
|
+
* (used for nested unions where we only want to record the winning option's count).
|
|
23
|
+
* If not provided, records all counts since start().
|
|
24
|
+
*/
|
|
25
|
+
end: (delta?: number) => {
|
|
20
26
|
const count = globalCount - start;
|
|
27
|
+
// Reset globalCount back to start, then add only the specified delta
|
|
28
|
+
globalCount = start + (delta ?? count);
|
|
21
29
|
if (--refCount === 0) globalCount = 0;
|
|
22
30
|
return count;
|
|
23
31
|
},
|
package/tsconfig.json
CHANGED
package/types/unrecognized.d.ts
CHANGED
|
@@ -4,7 +4,13 @@ export type Unrecognized<T> = T & {
|
|
|
4
4
|
};
|
|
5
5
|
declare function unrecognized<T>(value: T): Unrecognized<T>;
|
|
6
6
|
export declare function startCountingUnrecognized(): {
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Ends counting and returns the delta.
|
|
9
|
+
* @param delta - If provided, only this amount is added to the parent counter
|
|
10
|
+
* (used for nested unions where we only want to record the winning option's count).
|
|
11
|
+
* If not provided, records all counts since start().
|
|
12
|
+
*/
|
|
13
|
+
end: (delta?: number) => number;
|
|
8
14
|
};
|
|
9
15
|
export { unrecognized };
|
|
10
16
|
//# sourceMappingURL=unrecognized.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unrecognized.d.ts","sourceRoot":"","sources":["../src/types/unrecognized.ts"],"names":[],"mappings":"AAIA,OAAO,CAAC,MAAM,OAAO,EAAE,OAAO,MAAM,CAAC;AACrC,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,CAAC,OAAO,CAAC,EAAE,cAAc,CAAA;CAAE,CAAC;AAEhE,iBAAS,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAGlD;AAID,wBAAgB,yBAAyB
|
|
1
|
+
{"version":3,"file":"unrecognized.d.ts","sourceRoot":"","sources":["../src/types/unrecognized.ts"],"names":[],"mappings":"AAIA,OAAO,CAAC,MAAM,OAAO,EAAE,OAAO,MAAM,CAAC;AACrC,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,CAAC,OAAO,CAAC,EAAE,cAAc,CAAA;CAAE,CAAC;AAEhE,iBAAS,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAGlD;AAID,wBAAgB,yBAAyB;IAIrC;;;;;OAKG;kBACW,MAAM;EAQvB;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
package/types/unrecognized.js
CHANGED
|
@@ -15,8 +15,16 @@ function startCountingUnrecognized() {
|
|
|
15
15
|
refCount++;
|
|
16
16
|
const start = globalCount;
|
|
17
17
|
return {
|
|
18
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Ends counting and returns the delta.
|
|
20
|
+
* @param delta - If provided, only this amount is added to the parent counter
|
|
21
|
+
* (used for nested unions where we only want to record the winning option's count).
|
|
22
|
+
* If not provided, records all counts since start().
|
|
23
|
+
*/
|
|
24
|
+
end: (delta) => {
|
|
19
25
|
const count = globalCount - start;
|
|
26
|
+
// Reset globalCount back to start, then add only the specified delta
|
|
27
|
+
globalCount = start + (delta ?? count);
|
|
20
28
|
if (--refCount === 0)
|
|
21
29
|
globalCount = 0;
|
|
22
30
|
return count;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unrecognized.js","sourceRoot":"","sources":["../src/types/unrecognized.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAYH,
|
|
1
|
+
{"version":3,"file":"unrecognized.js","sourceRoot":"","sources":["../src/types/unrecognized.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAYH,8DAkBC;AAEQ,oCAAY;AA3BrB,SAAS,YAAY,CAAI,KAAQ;IAC/B,WAAW,EAAE,CAAC;IACd,OAAO,KAAwB,CAAC;AAClC,CAAC;AAED,IAAI,WAAW,GAAG,CAAC,CAAC;AACpB,IAAI,QAAQ,GAAG,CAAC,CAAC;AACjB,SAAgB,yBAAyB;IACvC,QAAQ,EAAE,CAAC;IACX,MAAM,KAAK,GAAG,WAAW,CAAC;IAC1B,OAAO;QACL;;;;;WAKG;QACH,GAAG,EAAE,CAAC,KAAc,EAAE,EAAE;YACtB,MAAM,KAAK,GAAG,WAAW,GAAG,KAAK,CAAC;YAClC,qEAAqE;YACrE,WAAW,GAAG,KAAK,GAAG,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC;YACvC,IAAI,EAAE,QAAQ,KAAK,CAAC;gBAAE,WAAW,GAAG,CAAC,CAAC;YACtC,OAAO,KAAK,CAAC;QACf,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v3";
|
|
2
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
export type TransactionEventContext = {
|
|
5
|
-
transactionId?: any | undefined;
|
|
6
|
-
createdAt?: any | undefined;
|
|
7
|
-
additionalProperties?: {
|
|
8
|
-
[k: string]: any;
|
|
9
|
-
} | undefined;
|
|
10
|
-
};
|
|
11
|
-
/** @internal */
|
|
12
|
-
export declare const TransactionEventContext$inboundSchema: z.ZodType<TransactionEventContext, z.ZodTypeDef, unknown>;
|
|
13
|
-
export declare function transactionEventContextFromJSON(jsonString: string): SafeParseResult<TransactionEventContext, SDKValidationError>;
|
|
14
|
-
//# sourceMappingURL=transactioneventcontext.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transactioneventcontext.d.ts","sourceRoot":"","sources":["../../src/models/components/transactioneventcontext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAM5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,uBAAuB,GAAG;IACpC,aAAa,CAAC,EAAE,GAAG,GAAG,SAAS,CAAC;IAChC,SAAS,CAAC,EAAE,GAAG,GAAG,SAAS,CAAC;IAC5B,oBAAoB,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,SAAS,CAAC;CACzD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,qCAAqC,EAAE,CAAC,CAAC,OAAO,CAC3D,uBAAuB,EACvB,CAAC,CAAC,UAAU,EACZ,OAAO,CAaP,CAAC;AAEH,wBAAgB,+BAA+B,CAC7C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,uBAAuB,EAAE,kBAAkB,CAAC,CAM9D"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.TransactionEventContext$inboundSchema = void 0;
|
|
40
|
-
exports.transactionEventContextFromJSON = transactionEventContextFromJSON;
|
|
41
|
-
const z = __importStar(require("zod/v3"));
|
|
42
|
-
const primitives_js_1 = require("../../lib/primitives.js");
|
|
43
|
-
const schemas_js_1 = require("../../lib/schemas.js");
|
|
44
|
-
/** @internal */
|
|
45
|
-
exports.TransactionEventContext$inboundSchema = (0, schemas_js_1.collectExtraKeys)(z.object({
|
|
46
|
-
transaction_id: z.any().optional(),
|
|
47
|
-
created_at: z.any().optional(),
|
|
48
|
-
}).catchall(z.any()), "additionalProperties", true).transform((v) => {
|
|
49
|
-
return (0, primitives_js_1.remap)(v, {
|
|
50
|
-
"transaction_id": "transactionId",
|
|
51
|
-
"created_at": "createdAt",
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
function transactionEventContextFromJSON(jsonString) {
|
|
55
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TransactionEventContext$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TransactionEventContext' from JSON`);
|
|
56
|
-
}
|
|
57
|
-
//# sourceMappingURL=transactioneventcontext.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transactioneventcontext.js","sourceRoot":"","sources":["../../src/models/components/transactioneventcontext.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCH,0EAQC;AA1CD,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAG8B;AAU9B,gBAAgB;AACH,QAAA,qCAAqC,GAI9C,IAAA,6BAAiB,EACnB,CAAC,CAAC,MAAM,CAAC;IACP,cAAc,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAClC,UAAU,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,EACpB,sBAAsB,EACtB,IAAI,CACL,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IAChB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,gBAAgB,EAAE,eAAe;QACjC,YAAY,EAAE,WAAW;KAC1B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,+BAA+B,CAC7C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,6CAAqC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACjE,qDAAqD,CACtD,CAAC;AACJ,CAAC"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import {
|
|
8
|
-
collectExtraKeys as collectExtraKeys$,
|
|
9
|
-
safeParse,
|
|
10
|
-
} from "../../lib/schemas.js";
|
|
11
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
12
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
13
|
-
|
|
14
|
-
export type TransactionEventContext = {
|
|
15
|
-
transactionId?: any | undefined;
|
|
16
|
-
createdAt?: any | undefined;
|
|
17
|
-
additionalProperties?: { [k: string]: any } | undefined;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
/** @internal */
|
|
21
|
-
export const TransactionEventContext$inboundSchema: z.ZodType<
|
|
22
|
-
TransactionEventContext,
|
|
23
|
-
z.ZodTypeDef,
|
|
24
|
-
unknown
|
|
25
|
-
> = collectExtraKeys$(
|
|
26
|
-
z.object({
|
|
27
|
-
transaction_id: z.any().optional(),
|
|
28
|
-
created_at: z.any().optional(),
|
|
29
|
-
}).catchall(z.any()),
|
|
30
|
-
"additionalProperties",
|
|
31
|
-
true,
|
|
32
|
-
).transform((v) => {
|
|
33
|
-
return remap$(v, {
|
|
34
|
-
"transaction_id": "transactionId",
|
|
35
|
-
"created_at": "createdAt",
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
export function transactionEventContextFromJSON(
|
|
40
|
-
jsonString: string,
|
|
41
|
-
): SafeParseResult<TransactionEventContext, SDKValidationError> {
|
|
42
|
-
return safeParse(
|
|
43
|
-
jsonString,
|
|
44
|
-
(x) => TransactionEventContext$inboundSchema.parse(JSON.parse(x)),
|
|
45
|
-
`Failed to parse 'TransactionEventContext' from JSON`,
|
|
46
|
-
);
|
|
47
|
-
}
|