@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.
Files changed (110) hide show
  1. package/examples/package-lock.json +1 -1
  2. package/funcs/transactionsEventsList.d.ts +5 -2
  3. package/funcs/transactionsEventsList.d.ts.map +1 -1
  4. package/funcs/transactionsEventsList.js +30 -7
  5. package/funcs/transactionsEventsList.js.map +1 -1
  6. package/jsr.json +1 -1
  7. package/lib/config.d.ts +3 -3
  8. package/lib/config.js +3 -3
  9. package/lib/encodings.d.ts +1 -0
  10. package/lib/encodings.d.ts.map +1 -1
  11. package/lib/encodings.js +9 -0
  12. package/lib/encodings.js.map +1 -1
  13. package/models/components/accountsreceivablesreportspec.d.ts +1 -1
  14. package/models/components/accountsreceivablesreportspec.d.ts.map +1 -1
  15. package/models/components/accountsreceivablesreportspec.js +1 -1
  16. package/models/components/accountsreceivablesreportspec.js.map +1 -1
  17. package/models/components/accountupdateroptions.d.ts +1 -1
  18. package/models/components/accountupdateroptions.d.ts.map +1 -1
  19. package/models/components/accountupdateroptions.js +1 -1
  20. package/models/components/accountupdateroptions.js.map +1 -1
  21. package/models/components/applepaypaymentmethodcreate.d.ts +1 -1
  22. package/models/components/applepaypaymentmethodcreate.d.ts.map +1 -1
  23. package/models/components/clicktopayfpanpaymentmethodcreate.d.ts +1 -1
  24. package/models/components/clicktopayfpanpaymentmethodcreate.d.ts.map +1 -1
  25. package/models/components/clicktopaypaymentmethodcreate.d.ts +1 -1
  26. package/models/components/clicktopaypaymentmethodcreate.d.ts.map +1 -1
  27. package/models/components/detailedsettlementreportspec.d.ts +1 -1
  28. package/models/components/detailedsettlementreportspec.d.ts.map +1 -1
  29. package/models/components/detailedsettlementreportspec.js +1 -1
  30. package/models/components/detailedsettlementreportspec.js.map +1 -1
  31. package/models/components/googlepayfpanpaymentmethodcreate.d.ts +1 -1
  32. package/models/components/googlepayfpanpaymentmethodcreate.d.ts.map +1 -1
  33. package/models/components/googlepaypaymentmethodcreate.d.ts +1 -1
  34. package/models/components/googlepaypaymentmethodcreate.d.ts.map +1 -1
  35. package/models/components/index.d.ts +0 -1
  36. package/models/components/index.d.ts.map +1 -1
  37. package/models/components/index.js +0 -1
  38. package/models/components/index.js.map +1 -1
  39. package/models/components/networktokenpaymentmethodcreate.d.ts +1 -1
  40. package/models/components/networktokenpaymentmethodcreate.d.ts.map +1 -1
  41. package/models/components/paymentlink.d.ts +8 -0
  42. package/models/components/paymentlink.d.ts.map +1 -1
  43. package/models/components/paymentlink.js +3 -0
  44. package/models/components/paymentlink.js.map +1 -1
  45. package/models/components/paymentlinkcreate.d.ts +10 -0
  46. package/models/components/paymentlinkcreate.d.ts.map +1 -1
  47. package/models/components/paymentlinkcreate.js +3 -0
  48. package/models/components/paymentlinkcreate.js.map +1 -1
  49. package/models/components/reportcreate.d.ts +4 -36
  50. package/models/components/reportcreate.d.ts.map +1 -1
  51. package/models/components/reportcreate.js +8 -8
  52. package/models/components/reportcreate.js.map +1 -1
  53. package/models/components/transactionevent.d.ts +3 -2
  54. package/models/components/transactionevent.d.ts.map +1 -1
  55. package/models/components/transactionevent.js +1 -2
  56. package/models/components/transactionevent.js.map +1 -1
  57. package/models/components/transactionretriesreportspec.d.ts +1 -1
  58. package/models/components/transactionretriesreportspec.d.ts.map +1 -1
  59. package/models/components/transactionretriesreportspec.js +1 -1
  60. package/models/components/transactionretriesreportspec.js.map +1 -1
  61. package/models/components/transactionsreportspec.d.ts +1 -1
  62. package/models/components/transactionsreportspec.d.ts.map +1 -1
  63. package/models/components/transactionsreportspec.js +1 -1
  64. package/models/components/transactionsreportspec.js.map +1 -1
  65. package/models/operations/listbuyerpaymentmethods.d.ts +1 -1
  66. package/models/operations/listbuyerpaymentmethods.d.ts.map +1 -1
  67. package/models/operations/listbuyerpaymentmethods.js +1 -1
  68. package/models/operations/listbuyerpaymentmethods.js.map +1 -1
  69. package/models/operations/listtransactionevents.d.ts +9 -0
  70. package/models/operations/listtransactionevents.d.ts.map +1 -1
  71. package/models/operations/listtransactionevents.js +15 -1
  72. package/models/operations/listtransactionevents.js.map +1 -1
  73. package/package.json +1 -1
  74. package/sdk/events.d.ts +5 -2
  75. package/sdk/events.d.ts.map +1 -1
  76. package/sdk/events.js +2 -2
  77. package/sdk/events.js.map +1 -1
  78. package/src/funcs/transactionsEventsList.ts +127 -53
  79. package/src/lib/config.ts +3 -3
  80. package/src/lib/encodings.ts +13 -0
  81. package/src/models/components/accountsreceivablesreportspec.ts +2 -4
  82. package/src/models/components/accountupdateroptions.ts +2 -2
  83. package/src/models/components/applepaypaymentmethodcreate.ts +1 -1
  84. package/src/models/components/clicktopayfpanpaymentmethodcreate.ts +1 -1
  85. package/src/models/components/clicktopaypaymentmethodcreate.ts +1 -1
  86. package/src/models/components/detailedsettlementreportspec.ts +2 -4
  87. package/src/models/components/googlepayfpanpaymentmethodcreate.ts +1 -1
  88. package/src/models/components/googlepaypaymentmethodcreate.ts +1 -1
  89. package/src/models/components/index.ts +0 -1
  90. package/src/models/components/networktokenpaymentmethodcreate.ts +1 -1
  91. package/src/models/components/paymentlink.ts +11 -0
  92. package/src/models/components/paymentlinkcreate.ts +13 -0
  93. package/src/models/components/reportcreate.ts +24 -42
  94. package/src/models/components/transactionevent.ts +2 -6
  95. package/src/models/components/transactionretriesreportspec.ts +2 -4
  96. package/src/models/components/transactionsreportspec.ts +2 -2
  97. package/src/models/operations/listbuyerpaymentmethods.ts +2 -2
  98. package/src/models/operations/listtransactionevents.ts +31 -0
  99. package/src/sdk/events.ts +6 -4
  100. package/src/types/unrecognized.ts +9 -1
  101. package/tsconfig.json +1 -2
  102. package/types/unrecognized.d.ts +7 -1
  103. package/types/unrecognized.d.ts.map +1 -1
  104. package/types/unrecognized.js +9 -1
  105. package/types/unrecognized.js.map +1 -1
  106. package/models/components/transactioneventcontext.d.ts +0 -14
  107. package/models/components/transactioneventcontext.d.ts.map +0 -1
  108. package/models/components/transactioneventcontext.js +0 -57
  109. package/models/components/transactioneventcontext.js.map +0 -1
  110. 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: "last_used_at" | null;
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 components from "../models/components/index.js";
8
- import { unwrapAsync } from "../types/fp.js";
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<components.TransactionEvents> {
24
- return unwrapAsync(transactionsEventsList(
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
- end: () => {
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
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "incremental": true,
4
- "tsBuildInfoFile": ".tsbuildinfo",
3
+ "incremental": false,
5
4
  "target": "ES2020",
6
5
  "lib": ["ES2022", "DOM", "DOM.Iterable"],
7
6
  "jsx": "react-jsx",
@@ -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
- end: () => number;
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;;EAUxC;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
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"}
@@ -15,8 +15,16 @@ function startCountingUnrecognized() {
15
15
  refCount++;
16
16
  const start = globalCount;
17
17
  return {
18
- end: () => {
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,8DAUC;AAEQ,oCAAY;AAnBrB,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,GAAG,EAAE,GAAG,EAAE;YACR,MAAM,KAAK,GAAG,WAAW,GAAG,KAAK,CAAC;YAClC,IAAI,EAAE,QAAQ,KAAK,CAAC;gBAAE,WAAW,GAAG,CAAC,CAAC;YACtC,OAAO,KAAK,CAAC;QACf,CAAC;KACF,CAAC;AACJ,CAAC"}
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
- }