@gr4vy/sdk 0.18.17 → 0.18.18

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 (109) hide show
  1. package/README.md +13 -19
  2. package/bin/mcp-server.js +334 -334
  3. package/bin/mcp-server.js.map +15 -15
  4. package/docs/sdks/all/README.md +4 -4
  5. package/docs/sdks/gr4vyrefunds/README.md +199 -4
  6. package/funcs/transactionsRefundsAllCreate.d.ts +17 -0
  7. package/funcs/transactionsRefundsAllCreate.d.ts.map +1 -0
  8. package/funcs/{transactionRefundsAllCreate.js → transactionsRefundsAllCreate.js} +3 -3
  9. package/funcs/transactionsRefundsAllCreate.js.map +1 -0
  10. package/funcs/transactionsRefundsCreate.d.ts +17 -0
  11. package/funcs/transactionsRefundsCreate.d.ts.map +1 -0
  12. package/funcs/{transactionRefundsCreate.js → transactionsRefundsCreate.js} +3 -3
  13. package/funcs/{transactionRefundsAllCreate.js.map → transactionsRefundsCreate.js.map} +1 -1
  14. package/funcs/transactionsRefundsGet.d.ts +1 -1
  15. package/funcs/transactionsRefundsGet.d.ts.map +1 -1
  16. package/funcs/transactionsRefundsGet.js +3 -4
  17. package/funcs/transactionsRefundsGet.js.map +1 -1
  18. package/jsr.json +1 -1
  19. package/lib/config.d.ts +3 -3
  20. package/lib/config.js +3 -3
  21. package/lib/config.js.map +1 -1
  22. package/mcp-server/mcp-server.js +1 -1
  23. package/mcp-server/server.js +5 -5
  24. package/mcp-server/server.js.map +1 -1
  25. package/mcp-server/tools/{transactionRefundsAllCreate.d.ts → transactionsRefundsAllCreate.d.ts} +2 -2
  26. package/mcp-server/tools/transactionsRefundsAllCreate.d.ts.map +1 -0
  27. package/mcp-server/tools/{transactionRefundsAllCreate.js → transactionsRefundsAllCreate.js} +6 -6
  28. package/mcp-server/tools/transactionsRefundsAllCreate.js.map +1 -0
  29. package/mcp-server/tools/{transactionRefundsCreate.d.ts → transactionsRefundsCreate.d.ts} +2 -2
  30. package/mcp-server/tools/transactionsRefundsCreate.d.ts.map +1 -0
  31. package/mcp-server/tools/{transactionRefundsCreate.js → transactionsRefundsCreate.js} +6 -6
  32. package/mcp-server/tools/transactionsRefundsCreate.js.map +1 -0
  33. package/models/errors/gettransactionrefund.d.ts +31 -0
  34. package/models/errors/gettransactionrefund.d.ts.map +1 -0
  35. package/models/errors/gettransactionrefund.js +66 -0
  36. package/models/errors/gettransactionrefund.js.map +1 -0
  37. package/models/errors/index.d.ts +1 -1
  38. package/models/errors/index.d.ts.map +1 -1
  39. package/models/errors/index.js +1 -1
  40. package/models/errors/index.js.map +1 -1
  41. package/models/operations/gettransactionrefund.d.ts +61 -0
  42. package/models/operations/gettransactionrefund.d.ts.map +1 -0
  43. package/models/operations/gettransactionrefund.js +101 -0
  44. package/models/operations/gettransactionrefund.js.map +1 -0
  45. package/models/operations/index.d.ts +1 -1
  46. package/models/operations/index.d.ts.map +1 -1
  47. package/models/operations/index.js +1 -1
  48. package/models/operations/index.js.map +1 -1
  49. package/package.json +1 -1
  50. package/sdk/all.js +2 -2
  51. package/sdk/all.js.map +1 -1
  52. package/sdk/gr4vyrefunds.d.ts +14 -0
  53. package/sdk/gr4vyrefunds.d.ts.map +1 -1
  54. package/sdk/gr4vyrefunds.js +22 -2
  55. package/sdk/gr4vyrefunds.js.map +1 -1
  56. package/sdk/sdk.d.ts +0 -3
  57. package/sdk/sdk.d.ts.map +1 -1
  58. package/sdk/sdk.js +0 -4
  59. package/sdk/sdk.js.map +1 -1
  60. package/sdk/transactions.d.ts +2 -2
  61. package/sdk/transactions.d.ts.map +1 -1
  62. package/sdk/transactions.js +2 -2
  63. package/sdk/transactions.js.map +1 -1
  64. package/src/funcs/{transactionRefundsAllCreate.ts → transactionsRefundsAllCreate.ts} +1 -1
  65. package/src/funcs/{transactionRefundsCreate.ts → transactionsRefundsCreate.ts} +1 -1
  66. package/src/funcs/transactionsRefundsGet.ts +7 -8
  67. package/src/lib/config.ts +3 -3
  68. package/src/mcp-server/mcp-server.ts +1 -1
  69. package/src/mcp-server/server.ts +5 -5
  70. package/src/mcp-server/tools/{transactionRefundsAllCreate.ts → transactionsRefundsAllCreate.ts} +4 -4
  71. package/src/mcp-server/tools/{transactionRefundsCreate.ts → transactionsRefundsCreate.ts} +4 -4
  72. package/src/models/errors/{gettreansactionrefund.ts → gettransactionrefund.ts} +23 -23
  73. package/src/models/errors/index.ts +1 -1
  74. package/src/models/operations/gettransactionrefund.ts +150 -0
  75. package/src/models/operations/index.ts +1 -1
  76. package/src/sdk/all.ts +2 -2
  77. package/src/sdk/gr4vyrefunds.ts +44 -2
  78. package/src/sdk/sdk.ts +0 -6
  79. package/src/sdk/transactions.ts +4 -4
  80. package/docs/sdks/gr4vytransactionsrefunds/README.md +0 -202
  81. package/docs/sdks/transaction/README.md +0 -6
  82. package/funcs/transactionRefundsAllCreate.d.ts +0 -17
  83. package/funcs/transactionRefundsAllCreate.d.ts.map +0 -1
  84. package/funcs/transactionRefundsCreate.d.ts +0 -17
  85. package/funcs/transactionRefundsCreate.d.ts.map +0 -1
  86. package/funcs/transactionRefundsCreate.js.map +0 -1
  87. package/mcp-server/tools/transactionRefundsAllCreate.d.ts.map +0 -1
  88. package/mcp-server/tools/transactionRefundsAllCreate.js.map +0 -1
  89. package/mcp-server/tools/transactionRefundsCreate.d.ts.map +0 -1
  90. package/mcp-server/tools/transactionRefundsCreate.js.map +0 -1
  91. package/models/errors/gettreansactionrefund.d.ts +0 -31
  92. package/models/errors/gettreansactionrefund.d.ts.map +0 -1
  93. package/models/errors/gettreansactionrefund.js +0 -66
  94. package/models/errors/gettreansactionrefund.js.map +0 -1
  95. package/models/operations/gettreansactionrefund.d.ts +0 -61
  96. package/models/operations/gettreansactionrefund.d.ts.map +0 -1
  97. package/models/operations/gettreansactionrefund.js +0 -101
  98. package/models/operations/gettreansactionrefund.js.map +0 -1
  99. package/sdk/gr4vytransactionsrefunds.d.ts +0 -19
  100. package/sdk/gr4vytransactionsrefunds.d.ts.map +0 -1
  101. package/sdk/gr4vytransactionsrefunds.js +0 -32
  102. package/sdk/gr4vytransactionsrefunds.js.map +0 -1
  103. package/sdk/transaction.d.ts +0 -7
  104. package/sdk/transaction.d.ts.map +0 -1
  105. package/sdk/transaction.js +0 -15
  106. package/sdk/transaction.js.map +0 -1
  107. package/src/models/operations/gettreansactionrefund.ts +0 -150
  108. package/src/sdk/gr4vytransactionsrefunds.ts +0 -51
  109. package/src/sdk/transaction.ts +0 -13
package/bin/mcp-server.js CHANGED
@@ -4026,9 +4026,9 @@ var init_config = __esm(() => {
4026
4026
  SDK_METADATA = {
4027
4027
  language: "typescript",
4028
4028
  openapiDocVersion: "1.0.0",
4029
- sdkVersion: "0.18.17",
4030
- genVersion: "2.597.9",
4031
- userAgent: "speakeasy-sdk/typescript 0.18.17 2.597.9 1.0.0 @gr4vy/sdk"
4029
+ sdkVersion: "0.18.18",
4030
+ genVersion: "2.598.21",
4031
+ userAgent: "speakeasy-sdk/typescript 0.18.18 2.598.21 1.0.0 @gr4vy/sdk"
4032
4032
  };
4033
4033
  });
4034
4034
 
@@ -44907,50 +44907,50 @@ var init_gettransaction = __esm(() => {
44907
44907
  })(GetTransactionResponse403GetTransaction$ ||= {});
44908
44908
  });
44909
44909
 
44910
- // src/models/errors/gettransactionsummary.ts
44911
- var GetTransactionSummaryResponse403GetTransactionSummary$inboundSchema, GetTransactionSummaryResponse403GetTransactionSummary$outboundSchema, GetTransactionSummaryResponse403GetTransactionSummary$;
44912
- var init_gettransactionsummary = __esm(() => {
44910
+ // src/models/errors/gettransactionrefund.ts
44911
+ var GetTransactionRefundResponse403GetTransactionRefund$inboundSchema, GetTransactionRefundResponse403GetTransactionRefund$outboundSchema, GetTransactionRefundResponse403GetTransactionRefund$;
44912
+ var init_gettransactionrefund = __esm(() => {
44913
44913
  init_lib();
44914
44914
  init_error403();
44915
44915
  init_error403active();
44916
44916
  init_error403forbidden();
44917
- GetTransactionSummaryResponse403GetTransactionSummary$inboundSchema = unionType([
44917
+ GetTransactionRefundResponse403GetTransactionRefund$inboundSchema = unionType([
44918
44918
  Error403$inboundSchema,
44919
44919
  Error403Forbidden$inboundSchema,
44920
44920
  Error403Active$inboundSchema
44921
44921
  ]);
44922
- GetTransactionSummaryResponse403GetTransactionSummary$outboundSchema = unionType([
44922
+ GetTransactionRefundResponse403GetTransactionRefund$outboundSchema = unionType([
44923
44923
  Error403$outboundSchema,
44924
44924
  Error403Forbidden$outboundSchema,
44925
44925
  Error403Active$outboundSchema
44926
44926
  ]);
44927
- ((GetTransactionSummaryResponse403GetTransactionSummary$) => {
44928
- GetTransactionSummaryResponse403GetTransactionSummary$.inboundSchema = GetTransactionSummaryResponse403GetTransactionSummary$inboundSchema;
44929
- GetTransactionSummaryResponse403GetTransactionSummary$.outboundSchema = GetTransactionSummaryResponse403GetTransactionSummary$outboundSchema;
44930
- })(GetTransactionSummaryResponse403GetTransactionSummary$ ||= {});
44927
+ ((GetTransactionRefundResponse403GetTransactionRefund$) => {
44928
+ GetTransactionRefundResponse403GetTransactionRefund$.inboundSchema = GetTransactionRefundResponse403GetTransactionRefund$inboundSchema;
44929
+ GetTransactionRefundResponse403GetTransactionRefund$.outboundSchema = GetTransactionRefundResponse403GetTransactionRefund$outboundSchema;
44930
+ })(GetTransactionRefundResponse403GetTransactionRefund$ ||= {});
44931
44931
  });
44932
44932
 
44933
- // src/models/errors/gettreansactionrefund.ts
44934
- var GetTreansactionRefundResponse403GetTreansactionRefund$inboundSchema, GetTreansactionRefundResponse403GetTreansactionRefund$outboundSchema, GetTreansactionRefundResponse403GetTreansactionRefund$;
44935
- var init_gettreansactionrefund = __esm(() => {
44933
+ // src/models/errors/gettransactionsummary.ts
44934
+ var GetTransactionSummaryResponse403GetTransactionSummary$inboundSchema, GetTransactionSummaryResponse403GetTransactionSummary$outboundSchema, GetTransactionSummaryResponse403GetTransactionSummary$;
44935
+ var init_gettransactionsummary = __esm(() => {
44936
44936
  init_lib();
44937
44937
  init_error403();
44938
44938
  init_error403active();
44939
44939
  init_error403forbidden();
44940
- GetTreansactionRefundResponse403GetTreansactionRefund$inboundSchema = unionType([
44940
+ GetTransactionSummaryResponse403GetTransactionSummary$inboundSchema = unionType([
44941
44941
  Error403$inboundSchema,
44942
44942
  Error403Forbidden$inboundSchema,
44943
44943
  Error403Active$inboundSchema
44944
44944
  ]);
44945
- GetTreansactionRefundResponse403GetTreansactionRefund$outboundSchema = unionType([
44945
+ GetTransactionSummaryResponse403GetTransactionSummary$outboundSchema = unionType([
44946
44946
  Error403$outboundSchema,
44947
44947
  Error403Forbidden$outboundSchema,
44948
44948
  Error403Active$outboundSchema
44949
44949
  ]);
44950
- ((GetTreansactionRefundResponse403GetTreansactionRefund$) => {
44951
- GetTreansactionRefundResponse403GetTreansactionRefund$.inboundSchema = GetTreansactionRefundResponse403GetTreansactionRefund$inboundSchema;
44952
- GetTreansactionRefundResponse403GetTreansactionRefund$.outboundSchema = GetTreansactionRefundResponse403GetTreansactionRefund$outboundSchema;
44953
- })(GetTreansactionRefundResponse403GetTreansactionRefund$ ||= {});
44950
+ ((GetTransactionSummaryResponse403GetTransactionSummary$) => {
44951
+ GetTransactionSummaryResponse403GetTransactionSummary$.inboundSchema = GetTransactionSummaryResponse403GetTransactionSummary$inboundSchema;
44952
+ GetTransactionSummaryResponse403GetTransactionSummary$.outboundSchema = GetTransactionSummaryResponse403GetTransactionSummary$outboundSchema;
44953
+ })(GetTransactionSummaryResponse403GetTransactionSummary$ ||= {});
44954
44954
  });
44955
44955
 
44956
44956
  // src/models/errors/httpvalidationerror.ts
@@ -45778,8 +45778,8 @@ var init_errors = __esm(() => {
45778
45778
  init_getpayout();
45779
45779
  init_getrefund();
45780
45780
  init_gettransaction();
45781
+ init_gettransactionrefund();
45781
45782
  init_gettransactionsummary();
45782
- init_gettreansactionrefund();
45783
45783
  init_httpclienterrors();
45784
45784
  init_httpvalidationerror();
45785
45785
  init_listauditlogs();
@@ -47553,82 +47553,82 @@ var init_gettransaction2 = __esm(() => {
47553
47553
  })(GetTransactionRequest$ ||= {});
47554
47554
  });
47555
47555
 
47556
- // src/models/operations/gettransactionsummary.ts
47557
- var GetTransactionSummaryGlobals$inboundSchema, GetTransactionSummaryGlobals$outboundSchema, GetTransactionSummaryGlobals$, GetTransactionSummaryRequest$inboundSchema, GetTransactionSummaryRequest$outboundSchema, GetTransactionSummaryRequest$;
47558
- var init_gettransactionsummary2 = __esm(() => {
47556
+ // src/models/operations/gettransactionrefund.ts
47557
+ var GetTransactionRefundGlobals$inboundSchema, GetTransactionRefundGlobals$outboundSchema, GetTransactionRefundGlobals$, GetTransactionRefundRequest$inboundSchema, GetTransactionRefundRequest$outboundSchema, GetTransactionRefundRequest$;
47558
+ var init_gettransactionrefund2 = __esm(() => {
47559
47559
  init_lib();
47560
47560
  init_primitives();
47561
- GetTransactionSummaryGlobals$inboundSchema = objectType({
47561
+ GetTransactionRefundGlobals$inboundSchema = objectType({
47562
47562
  merchantAccountId: stringType().optional()
47563
47563
  });
47564
- GetTransactionSummaryGlobals$outboundSchema = objectType({
47564
+ GetTransactionRefundGlobals$outboundSchema = objectType({
47565
47565
  merchantAccountId: stringType().optional()
47566
47566
  });
47567
- ((GetTransactionSummaryGlobals$) => {
47568
- GetTransactionSummaryGlobals$.inboundSchema = GetTransactionSummaryGlobals$inboundSchema;
47569
- GetTransactionSummaryGlobals$.outboundSchema = GetTransactionSummaryGlobals$outboundSchema;
47570
- })(GetTransactionSummaryGlobals$ ||= {});
47571
- GetTransactionSummaryRequest$inboundSchema = objectType({
47567
+ ((GetTransactionRefundGlobals$) => {
47568
+ GetTransactionRefundGlobals$.inboundSchema = GetTransactionRefundGlobals$inboundSchema;
47569
+ GetTransactionRefundGlobals$.outboundSchema = GetTransactionRefundGlobals$outboundSchema;
47570
+ })(GetTransactionRefundGlobals$ ||= {});
47571
+ GetTransactionRefundRequest$inboundSchema = objectType({
47572
47572
  transaction_id: stringType(),
47573
+ refund_id: stringType(),
47573
47574
  merchantAccountId: nullableType(stringType()).optional()
47574
47575
  }).transform((v2) => {
47575
47576
  return remap(v2, {
47576
- transaction_id: "transactionId"
47577
+ transaction_id: "transactionId",
47578
+ refund_id: "refundId"
47577
47579
  });
47578
47580
  });
47579
- GetTransactionSummaryRequest$outboundSchema = objectType({
47581
+ GetTransactionRefundRequest$outboundSchema = objectType({
47580
47582
  transactionId: stringType(),
47583
+ refundId: stringType(),
47581
47584
  merchantAccountId: nullableType(stringType()).optional()
47582
47585
  }).transform((v2) => {
47583
47586
  return remap(v2, {
47584
- transactionId: "transaction_id"
47587
+ transactionId: "transaction_id",
47588
+ refundId: "refund_id"
47585
47589
  });
47586
47590
  });
47587
- ((GetTransactionSummaryRequest$) => {
47588
- GetTransactionSummaryRequest$.inboundSchema = GetTransactionSummaryRequest$inboundSchema;
47589
- GetTransactionSummaryRequest$.outboundSchema = GetTransactionSummaryRequest$outboundSchema;
47590
- })(GetTransactionSummaryRequest$ ||= {});
47591
+ ((GetTransactionRefundRequest$) => {
47592
+ GetTransactionRefundRequest$.inboundSchema = GetTransactionRefundRequest$inboundSchema;
47593
+ GetTransactionRefundRequest$.outboundSchema = GetTransactionRefundRequest$outboundSchema;
47594
+ })(GetTransactionRefundRequest$ ||= {});
47591
47595
  });
47592
47596
 
47593
- // src/models/operations/gettreansactionrefund.ts
47594
- var GetTreansactionRefundGlobals$inboundSchema, GetTreansactionRefundGlobals$outboundSchema, GetTreansactionRefundGlobals$, GetTreansactionRefundRequest$inboundSchema, GetTreansactionRefundRequest$outboundSchema, GetTreansactionRefundRequest$;
47595
- var init_gettreansactionrefund2 = __esm(() => {
47597
+ // src/models/operations/gettransactionsummary.ts
47598
+ var GetTransactionSummaryGlobals$inboundSchema, GetTransactionSummaryGlobals$outboundSchema, GetTransactionSummaryGlobals$, GetTransactionSummaryRequest$inboundSchema, GetTransactionSummaryRequest$outboundSchema, GetTransactionSummaryRequest$;
47599
+ var init_gettransactionsummary2 = __esm(() => {
47596
47600
  init_lib();
47597
47601
  init_primitives();
47598
- GetTreansactionRefundGlobals$inboundSchema = objectType({
47602
+ GetTransactionSummaryGlobals$inboundSchema = objectType({
47599
47603
  merchantAccountId: stringType().optional()
47600
47604
  });
47601
- GetTreansactionRefundGlobals$outboundSchema = objectType({
47605
+ GetTransactionSummaryGlobals$outboundSchema = objectType({
47602
47606
  merchantAccountId: stringType().optional()
47603
47607
  });
47604
- ((GetTreansactionRefundGlobals$) => {
47605
- GetTreansactionRefundGlobals$.inboundSchema = GetTreansactionRefundGlobals$inboundSchema;
47606
- GetTreansactionRefundGlobals$.outboundSchema = GetTreansactionRefundGlobals$outboundSchema;
47607
- })(GetTreansactionRefundGlobals$ ||= {});
47608
- GetTreansactionRefundRequest$inboundSchema = objectType({
47608
+ ((GetTransactionSummaryGlobals$) => {
47609
+ GetTransactionSummaryGlobals$.inboundSchema = GetTransactionSummaryGlobals$inboundSchema;
47610
+ GetTransactionSummaryGlobals$.outboundSchema = GetTransactionSummaryGlobals$outboundSchema;
47611
+ })(GetTransactionSummaryGlobals$ ||= {});
47612
+ GetTransactionSummaryRequest$inboundSchema = objectType({
47609
47613
  transaction_id: stringType(),
47610
- refund_id: stringType(),
47611
47614
  merchantAccountId: nullableType(stringType()).optional()
47612
47615
  }).transform((v2) => {
47613
47616
  return remap(v2, {
47614
- transaction_id: "transactionId",
47615
- refund_id: "refundId"
47617
+ transaction_id: "transactionId"
47616
47618
  });
47617
47619
  });
47618
- GetTreansactionRefundRequest$outboundSchema = objectType({
47620
+ GetTransactionSummaryRequest$outboundSchema = objectType({
47619
47621
  transactionId: stringType(),
47620
- refundId: stringType(),
47621
47622
  merchantAccountId: nullableType(stringType()).optional()
47622
47623
  }).transform((v2) => {
47623
47624
  return remap(v2, {
47624
- transactionId: "transaction_id",
47625
- refundId: "refund_id"
47625
+ transactionId: "transaction_id"
47626
47626
  });
47627
47627
  });
47628
- ((GetTreansactionRefundRequest$) => {
47629
- GetTreansactionRefundRequest$.inboundSchema = GetTreansactionRefundRequest$inboundSchema;
47630
- GetTreansactionRefundRequest$.outboundSchema = GetTreansactionRefundRequest$outboundSchema;
47631
- })(GetTreansactionRefundRequest$ ||= {});
47628
+ ((GetTransactionSummaryRequest$) => {
47629
+ GetTransactionSummaryRequest$.inboundSchema = GetTransactionSummaryRequest$inboundSchema;
47630
+ GetTransactionSummaryRequest$.outboundSchema = GetTransactionSummaryRequest$outboundSchema;
47631
+ })(GetTransactionSummaryRequest$ ||= {});
47632
47632
  });
47633
47633
 
47634
47634
  // src/models/operations/listauditlogs.ts
@@ -49267,8 +49267,8 @@ var init_operations = __esm(() => {
49267
49267
  init_getpayout2();
49268
49268
  init_getrefund2();
49269
49269
  init_gettransaction2();
49270
+ init_gettransactionrefund2();
49270
49271
  init_gettransactionsummary2();
49271
- init_gettreansactionrefund2();
49272
49272
  init_listauditlogs2();
49273
49273
  init_listbuyergiftcards2();
49274
49274
  init_listbuyerpaymentmethods2();
@@ -58303,23 +58303,23 @@ Fetch a refund.`,
58303
58303
  };
58304
58304
  });
58305
58305
 
58306
- // src/funcs/transactionRefundsAllCreate.ts
58307
- function transactionRefundsAllCreate(client, transactionId, transactionRefundAllCreate, timeoutInSeconds, merchantAccountId, options) {
58308
- return new APIPromise($do67(client, transactionId, transactionRefundAllCreate, timeoutInSeconds, merchantAccountId, options));
58306
+ // src/funcs/transactionsCapture.ts
58307
+ function transactionsCapture(client, transactionCapture, transactionId, timeoutInSeconds, merchantAccountId, options) {
58308
+ return new APIPromise($do67(client, transactionCapture, transactionId, timeoutInSeconds, merchantAccountId, options));
58309
58309
  }
58310
- async function $do67(client, transactionId, transactionRefundAllCreate, timeoutInSeconds, merchantAccountId, options) {
58310
+ async function $do67(client, transactionCapture, transactionId, timeoutInSeconds, merchantAccountId, options) {
58311
58311
  const input = {
58312
+ transactionCapture,
58312
58313
  transactionId,
58313
- transactionRefundAllCreate,
58314
58314
  timeoutInSeconds,
58315
58315
  merchantAccountId
58316
58316
  };
58317
- const parsed = safeParse(input, (value) => CreateFullTransactionRefundRequest$outboundSchema.parse(value), "Input validation failed");
58317
+ const parsed = safeParse(input, (value) => CaptureTransactionRequest$outboundSchema.parse(value), "Input validation failed");
58318
58318
  if (!parsed.ok) {
58319
58319
  return [parsed, { status: "invalid" }];
58320
58320
  }
58321
58321
  const payload = parsed.value;
58322
- const body = encodeJSON("body", payload.TransactionRefundAllCreate, {
58322
+ const body = encodeJSON("body", payload.TransactionCapture, {
58323
58323
  explode: true
58324
58324
  });
58325
58325
  const pathParams = {
@@ -58328,7 +58328,7 @@ async function $do67(client, transactionId, transactionRefundAllCreate, timeoutI
58328
58328
  charEncoding: "percent"
58329
58329
  })
58330
58330
  };
58331
- const path = pathToFunc("/transactions/{transaction_id}/refunds/all")(pathParams);
58331
+ const path = pathToFunc("/transactions/{transaction_id}/capture")(pathParams);
58332
58332
  const query = encodeFormQuery({
58333
58333
  timeout_in_seconds: payload.timeout_in_seconds
58334
58334
  });
@@ -58342,7 +58342,7 @@ async function $do67(client, transactionId, transactionRefundAllCreate, timeoutI
58342
58342
  const requestSecurity = resolveGlobalSecurity(securityInput);
58343
58343
  const context = {
58344
58344
  baseURL: options?.serverURL ?? client._baseURL ?? "",
58345
- operationID: "create_full_transaction_refund",
58345
+ operationID: "capture_transaction",
58346
58346
  oAuth2Scopes: [],
58347
58347
  resolvedSecurity: requestSecurity,
58348
58348
  securitySource: client._options.bearerAuth,
@@ -58391,13 +58391,13 @@ async function $do67(client, transactionId, transactionRefundAllCreate, timeoutI
58391
58391
  const responseFields = {
58392
58392
  HttpMeta: { Response: response, Request: req }
58393
58393
  };
58394
- const [result] = await match(json(201, CollectionNoCursorRefund$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, CreateFullTransactionRefundResponse403CreateFullTransactionRefund$inboundSchema), jsonErr(404, Error404$inboundSchema), jsonErr(405, Error405$inboundSchema), jsonErr(409, Error409$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), jsonErr(425, Error425$inboundSchema), jsonErr(429, Error429$inboundSchema), jsonErr(500, Error500$inboundSchema), jsonErr(502, Error502$inboundSchema), jsonErr(504, Error504$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
58394
+ const [result] = await match(json(200, Transaction$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, CaptureTransactionResponse403CaptureTransaction$inboundSchema), jsonErr(404, Error404$inboundSchema), jsonErr(405, Error405$inboundSchema), jsonErr(409, Error409$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), jsonErr(425, Error425$inboundSchema), jsonErr(429, Error429$inboundSchema), jsonErr(500, Error500$inboundSchema), jsonErr(502, Error502$inboundSchema), jsonErr(504, Error504$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
58395
58395
  if (!result.ok) {
58396
58396
  return [result, { status: "complete", request: req, response }];
58397
58397
  }
58398
58398
  return [result, { status: "complete", request: req, response }];
58399
58399
  }
58400
- var init_transactionRefundsAllCreate = __esm(() => {
58400
+ var init_transactionsCapture = __esm(() => {
58401
58401
  init_encodings();
58402
58402
  init_matchers();
58403
58403
  init_primitives();
@@ -58410,27 +58410,27 @@ var init_transactionRefundsAllCreate = __esm(() => {
58410
58410
  init_async();
58411
58411
  });
58412
58412
 
58413
- // src/mcp-server/tools/transactionRefundsAllCreate.ts
58414
- var args67, tool$transactionRefundsAllCreate;
58415
- var init_transactionRefundsAllCreate2 = __esm(() => {
58413
+ // src/mcp-server/tools/transactionsCapture.ts
58414
+ var args67, tool$transactionsCapture;
58415
+ var init_transactionsCapture2 = __esm(() => {
58416
58416
  init_lib();
58417
- init_transactionRefundsAllCreate();
58417
+ init_transactionsCapture();
58418
58418
  init_components();
58419
58419
  init_tools();
58420
58420
  args67 = {
58421
+ transactionCapture: TransactionCapture$inboundSchema,
58421
58422
  transactionId: stringType(),
58422
- transactionRefundAllCreate: nullableType(TransactionRefundAllCreate$inboundSchema).optional(),
58423
58423
  timeoutInSeconds: numberType().default(1),
58424
58424
  merchantAccountId: nullableType(stringType()).optional()
58425
58425
  };
58426
- tool$transactionRefundsAllCreate = {
58427
- name: "transaction-refunds-all-create",
58428
- description: `Create batch transaction refund
58426
+ tool$transactionsCapture = {
58427
+ name: "transactions-capture",
58428
+ description: `Capture transaction
58429
58429
 
58430
- Create a refund for all instruments on a transaction.`,
58430
+ Capture a previously authorized transaction.`,
58431
58431
  args: args67,
58432
58432
  tool: async (client, args68, ctx) => {
58433
- const [result, apiCall] = await transactionRefundsAllCreate(client, args68.transactionId, args68.transactionRefundAllCreate, args68.timeoutInSeconds, args68.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
58433
+ const [result, apiCall] = await transactionsCapture(client, args68.transactionCapture, args68.transactionId, args68.timeoutInSeconds, args68.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
58434
58434
  if (!result.ok) {
58435
58435
  return {
58436
58436
  content: [{ type: "text", text: result.error.message }],
@@ -58443,38 +58443,31 @@ Create a refund for all instruments on a transaction.`,
58443
58443
  };
58444
58444
  });
58445
58445
 
58446
- // src/funcs/transactionRefundsCreate.ts
58447
- function transactionRefundsCreate(client, transactionRefundCreate, transactionId, timeoutInSeconds, merchantAccountId, options) {
58448
- return new APIPromise($do68(client, transactionRefundCreate, transactionId, timeoutInSeconds, merchantAccountId, options));
58446
+ // src/funcs/transactionsCreate.ts
58447
+ function transactionsCreate(client, transactionCreate, timeoutInSeconds, merchantAccountId, idempotencyKey, options) {
58448
+ return new APIPromise($do68(client, transactionCreate, timeoutInSeconds, merchantAccountId, idempotencyKey, options));
58449
58449
  }
58450
- async function $do68(client, transactionRefundCreate, transactionId, timeoutInSeconds, merchantAccountId, options) {
58450
+ async function $do68(client, transactionCreate, timeoutInSeconds, merchantAccountId, idempotencyKey, options) {
58451
58451
  const input = {
58452
- transactionRefundCreate,
58453
- transactionId,
58452
+ transactionCreate,
58454
58453
  timeoutInSeconds,
58455
- merchantAccountId
58454
+ merchantAccountId,
58455
+ idempotencyKey
58456
58456
  };
58457
- const parsed = safeParse(input, (value) => CreateTransactionRefundRequest$outboundSchema.parse(value), "Input validation failed");
58457
+ const parsed = safeParse(input, (value) => CreateTransactionRequest$outboundSchema.parse(value), "Input validation failed");
58458
58458
  if (!parsed.ok) {
58459
58459
  return [parsed, { status: "invalid" }];
58460
58460
  }
58461
58461
  const payload = parsed.value;
58462
- const body = encodeJSON("body", payload.TransactionRefundCreate, {
58463
- explode: true
58464
- });
58465
- const pathParams = {
58466
- transaction_id: encodeSimple("transaction_id", payload.transaction_id, {
58467
- explode: false,
58468
- charEncoding: "percent"
58469
- })
58470
- };
58471
- const path = pathToFunc("/transactions/{transaction_id}/refunds")(pathParams);
58462
+ const body = encodeJSON("body", payload.TransactionCreate, { explode: true });
58463
+ const path = pathToFunc("/transactions")();
58472
58464
  const query = encodeFormQuery({
58473
58465
  timeout_in_seconds: payload.timeout_in_seconds
58474
58466
  });
58475
58467
  const headers = new Headers(compactMap({
58476
58468
  "Content-Type": "application/json",
58477
58469
  Accept: "application/json",
58470
+ "idempotency-key": encodeSimple("idempotency-key", payload["idempotency-key"], { explode: false, charEncoding: "none" }),
58478
58471
  "x-gr4vy-merchant-account-id": encodeSimple("x-gr4vy-merchant-account-id", payload.merchantAccountId ?? client._options.merchantAccountId, { explode: false, charEncoding: "none" })
58479
58472
  }));
58480
58473
  const secConfig = await extractSecurity(client._options.bearerAuth);
@@ -58482,7 +58475,7 @@ async function $do68(client, transactionRefundCreate, transactionId, timeoutInSe
58482
58475
  const requestSecurity = resolveGlobalSecurity(securityInput);
58483
58476
  const context = {
58484
58477
  baseURL: options?.serverURL ?? client._baseURL ?? "",
58485
- operationID: "create_transaction_refund",
58478
+ operationID: "create_transaction",
58486
58479
  oAuth2Scopes: [],
58487
58480
  resolvedSecurity: requestSecurity,
58488
58481
  securitySource: client._options.bearerAuth,
@@ -58531,46 +58524,45 @@ async function $do68(client, transactionRefundCreate, transactionId, timeoutInSe
58531
58524
  const responseFields = {
58532
58525
  HttpMeta: { Response: response, Request: req }
58533
58526
  };
58534
- const [result] = await match(json(201, Refund$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, CreateTransactionRefundResponse403CreateTransactionRefund$inboundSchema), jsonErr(404, Error404$inboundSchema), jsonErr(405, Error405$inboundSchema), jsonErr(409, Error409$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), jsonErr(425, Error425$inboundSchema), jsonErr(429, Error429$inboundSchema), jsonErr(500, Error500$inboundSchema), jsonErr(502, Error502$inboundSchema), jsonErr(504, Error504$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
58527
+ const [result] = await match(json(200, CreateTransactionResponse$inboundSchema), json(201, CreateTransactionResponse$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, CreateTransactionResponse403CreateTransaction$inboundSchema), jsonErr(404, Error404$inboundSchema), jsonErr(405, Error405$inboundSchema), jsonErr(409, Error409$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), jsonErr(425, Error425$inboundSchema), jsonErr(429, Error429$inboundSchema), jsonErr(500, Error500$inboundSchema), jsonErr(502, Error502$inboundSchema), jsonErr(504, Error504$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
58535
58528
  if (!result.ok) {
58536
58529
  return [result, { status: "complete", request: req, response }];
58537
58530
  }
58538
58531
  return [result, { status: "complete", request: req, response }];
58539
58532
  }
58540
- var init_transactionRefundsCreate = __esm(() => {
58533
+ var init_transactionsCreate = __esm(() => {
58541
58534
  init_encodings();
58542
58535
  init_matchers();
58543
58536
  init_primitives();
58544
58537
  init_schemas();
58545
58538
  init_security();
58546
58539
  init_url();
58547
- init_components();
58548
58540
  init_errors();
58549
58541
  init_operations();
58550
58542
  init_async();
58551
58543
  });
58552
58544
 
58553
- // src/mcp-server/tools/transactionRefundsCreate.ts
58554
- var args68, tool$transactionRefundsCreate;
58555
- var init_transactionRefundsCreate2 = __esm(() => {
58545
+ // src/mcp-server/tools/transactionsCreate.ts
58546
+ var args68, tool$transactionsCreate;
58547
+ var init_transactionsCreate2 = __esm(() => {
58556
58548
  init_lib();
58557
- init_transactionRefundsCreate();
58549
+ init_transactionsCreate();
58558
58550
  init_components();
58559
58551
  init_tools();
58560
58552
  args68 = {
58561
- transactionRefundCreate: TransactionRefundCreate$inboundSchema,
58562
- transactionId: stringType(),
58553
+ transactionCreate: TransactionCreate$inboundSchema,
58563
58554
  timeoutInSeconds: numberType().default(1),
58564
- merchantAccountId: nullableType(stringType()).optional()
58555
+ merchantAccountId: nullableType(stringType()).optional(),
58556
+ idempotencyKey: nullableType(stringType()).optional()
58565
58557
  };
58566
- tool$transactionRefundsCreate = {
58567
- name: "transaction-refunds-create",
58568
- description: `Create transaction refund
58558
+ tool$transactionsCreate = {
58559
+ name: "transactions-create",
58560
+ description: `Create transaction
58569
58561
 
58570
- Create a refund for a transaction.`,
58562
+ Create a transaction.`,
58571
58563
  args: args68,
58572
58564
  tool: async (client, args69, ctx) => {
58573
- const [result, apiCall] = await transactionRefundsCreate(client, args69.transactionRefundCreate, args69.transactionId, args69.timeoutInSeconds, args69.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
58565
+ const [result, apiCall] = await transactionsCreate(client, args69.transactionCreate, args69.timeoutInSeconds, args69.merchantAccountId, args69.idempotencyKey, { fetchOptions: { signal: ctx.signal } }).$inspect();
58574
58566
  if (!result.ok) {
58575
58567
  return {
58576
58568
  content: [{ type: "text", text: result.error.message }],
@@ -58583,37 +58575,29 @@ Create a refund for a transaction.`,
58583
58575
  };
58584
58576
  });
58585
58577
 
58586
- // src/funcs/transactionsCapture.ts
58587
- function transactionsCapture(client, transactionCapture, transactionId, timeoutInSeconds, merchantAccountId, options) {
58588
- return new APIPromise($do69(client, transactionCapture, transactionId, timeoutInSeconds, merchantAccountId, options));
58578
+ // src/funcs/transactionsGet.ts
58579
+ function transactionsGet(client, transactionId, merchantAccountId, options) {
58580
+ return new APIPromise($do69(client, transactionId, merchantAccountId, options));
58589
58581
  }
58590
- async function $do69(client, transactionCapture, transactionId, timeoutInSeconds, merchantAccountId, options) {
58582
+ async function $do69(client, transactionId, merchantAccountId, options) {
58591
58583
  const input = {
58592
- transactionCapture,
58593
58584
  transactionId,
58594
- timeoutInSeconds,
58595
58585
  merchantAccountId
58596
58586
  };
58597
- const parsed = safeParse(input, (value) => CaptureTransactionRequest$outboundSchema.parse(value), "Input validation failed");
58587
+ const parsed = safeParse(input, (value) => GetTransactionRequest$outboundSchema.parse(value), "Input validation failed");
58598
58588
  if (!parsed.ok) {
58599
58589
  return [parsed, { status: "invalid" }];
58600
58590
  }
58601
58591
  const payload = parsed.value;
58602
- const body = encodeJSON("body", payload.TransactionCapture, {
58603
- explode: true
58604
- });
58592
+ const body = null;
58605
58593
  const pathParams = {
58606
58594
  transaction_id: encodeSimple("transaction_id", payload.transaction_id, {
58607
58595
  explode: false,
58608
58596
  charEncoding: "percent"
58609
58597
  })
58610
58598
  };
58611
- const path = pathToFunc("/transactions/{transaction_id}/capture")(pathParams);
58612
- const query = encodeFormQuery({
58613
- timeout_in_seconds: payload.timeout_in_seconds
58614
- });
58599
+ const path = pathToFunc("/transactions/{transaction_id}")(pathParams);
58615
58600
  const headers = new Headers(compactMap({
58616
- "Content-Type": "application/json",
58617
58601
  Accept: "application/json",
58618
58602
  "x-gr4vy-merchant-account-id": encodeSimple("x-gr4vy-merchant-account-id", payload.merchantAccountId ?? client._options.merchantAccountId, { explode: false, charEncoding: "none" })
58619
58603
  }));
@@ -58622,20 +58606,28 @@ async function $do69(client, transactionCapture, transactionId, timeoutInSeconds
58622
58606
  const requestSecurity = resolveGlobalSecurity(securityInput);
58623
58607
  const context = {
58624
58608
  baseURL: options?.serverURL ?? client._baseURL ?? "",
58625
- operationID: "capture_transaction",
58609
+ operationID: "get_transaction",
58626
58610
  oAuth2Scopes: [],
58627
58611
  resolvedSecurity: requestSecurity,
58628
58612
  securitySource: client._options.bearerAuth,
58629
- retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
58630
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
58613
+ retryConfig: options?.retries || client._options.retryConfig || {
58614
+ strategy: "backoff",
58615
+ backoff: {
58616
+ initialInterval: 200,
58617
+ maxInterval: 200,
58618
+ exponent: 1,
58619
+ maxElapsedTime: 1000
58620
+ },
58621
+ retryConnectionErrors: true
58622
+ },
58623
+ retryCodes: options?.retryCodes || ["5XX"]
58631
58624
  };
58632
58625
  const requestRes = client._createRequest(context, {
58633
58626
  security: requestSecurity,
58634
- method: "POST",
58627
+ method: "GET",
58635
58628
  baseURL: options?.serverURL,
58636
58629
  path,
58637
58630
  headers,
58638
- query,
58639
58631
  body,
58640
58632
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
58641
58633
  }, options);
@@ -58671,13 +58663,13 @@ async function $do69(client, transactionCapture, transactionId, timeoutInSeconds
58671
58663
  const responseFields = {
58672
58664
  HttpMeta: { Response: response, Request: req }
58673
58665
  };
58674
- const [result] = await match(json(200, Transaction$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, CaptureTransactionResponse403CaptureTransaction$inboundSchema), jsonErr(404, Error404$inboundSchema), jsonErr(405, Error405$inboundSchema), jsonErr(409, Error409$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), jsonErr(425, Error425$inboundSchema), jsonErr(429, Error429$inboundSchema), jsonErr(500, Error500$inboundSchema), jsonErr(502, Error502$inboundSchema), jsonErr(504, Error504$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
58666
+ const [result] = await match(json(200, Transaction$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, GetTransactionResponse403GetTransaction$inboundSchema), jsonErr(404, Error404$inboundSchema), jsonErr(405, Error405$inboundSchema), jsonErr(409, Error409$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), jsonErr(425, Error425$inboundSchema), jsonErr(429, Error429$inboundSchema), jsonErr(500, Error500$inboundSchema), jsonErr(502, Error502$inboundSchema), jsonErr(504, Error504$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
58675
58667
  if (!result.ok) {
58676
58668
  return [result, { status: "complete", request: req, response }];
58677
58669
  }
58678
58670
  return [result, { status: "complete", request: req, response }];
58679
58671
  }
58680
- var init_transactionsCapture = __esm(() => {
58672
+ var init_transactionsGet = __esm(() => {
58681
58673
  init_encodings();
58682
58674
  init_matchers();
58683
58675
  init_primitives();
@@ -58690,27 +58682,24 @@ var init_transactionsCapture = __esm(() => {
58690
58682
  init_async();
58691
58683
  });
58692
58684
 
58693
- // src/mcp-server/tools/transactionsCapture.ts
58694
- var args69, tool$transactionsCapture;
58695
- var init_transactionsCapture2 = __esm(() => {
58685
+ // src/mcp-server/tools/transactionsGet.ts
58686
+ var args69, tool$transactionsGet;
58687
+ var init_transactionsGet2 = __esm(() => {
58696
58688
  init_lib();
58697
- init_transactionsCapture();
58698
- init_components();
58689
+ init_transactionsGet();
58699
58690
  init_tools();
58700
58691
  args69 = {
58701
- transactionCapture: TransactionCapture$inboundSchema,
58702
58692
  transactionId: stringType(),
58703
- timeoutInSeconds: numberType().default(1),
58704
58693
  merchantAccountId: nullableType(stringType()).optional()
58705
58694
  };
58706
- tool$transactionsCapture = {
58707
- name: "transactions-capture",
58708
- description: `Capture transaction
58695
+ tool$transactionsGet = {
58696
+ name: "transactions-get",
58697
+ description: `Get transaction
58709
58698
 
58710
- Capture a previously authorized transaction.`,
58699
+ Fetch a single transaction by its ID.`,
58711
58700
  args: args69,
58712
58701
  tool: async (client, args70, ctx) => {
58713
- const [result, apiCall] = await transactionsCapture(client, args70.transactionCapture, args70.transactionId, args70.timeoutInSeconds, args70.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
58702
+ const [result, apiCall] = await transactionsGet(client, args70.transactionId, args70.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
58714
58703
  if (!result.ok) {
58715
58704
  return {
58716
58705
  content: [{ type: "text", text: result.error.message }],
@@ -58723,48 +58712,85 @@ Capture a previously authorized transaction.`,
58723
58712
  };
58724
58713
  });
58725
58714
 
58726
- // src/funcs/transactionsCreate.ts
58727
- function transactionsCreate(client, transactionCreate, timeoutInSeconds, merchantAccountId, idempotencyKey, options) {
58728
- return new APIPromise($do70(client, transactionCreate, timeoutInSeconds, merchantAccountId, idempotencyKey, options));
58715
+ // src/funcs/transactionsList.ts
58716
+ function transactionsList(client, request, options) {
58717
+ return new APIPromise($do70(client, request, options));
58729
58718
  }
58730
- async function $do70(client, transactionCreate, timeoutInSeconds, merchantAccountId, idempotencyKey, options) {
58731
- const input = {
58732
- transactionCreate,
58733
- timeoutInSeconds,
58734
- merchantAccountId,
58735
- idempotencyKey
58736
- };
58737
- const parsed = safeParse(input, (value) => CreateTransactionRequest$outboundSchema.parse(value), "Input validation failed");
58719
+ async function $do70(client, request, options) {
58720
+ const parsed = safeParse(request, (value) => ListTransactionsRequest$outboundSchema.optional().parse(value), "Input validation failed");
58738
58721
  if (!parsed.ok) {
58739
- return [parsed, { status: "invalid" }];
58722
+ return [haltIterator(parsed), { status: "invalid" }];
58740
58723
  }
58741
58724
  const payload = parsed.value;
58742
- const body = encodeJSON("body", payload.TransactionCreate, { explode: true });
58725
+ const body = null;
58743
58726
  const path = pathToFunc("/transactions")();
58744
58727
  const query = encodeFormQuery({
58745
- timeout_in_seconds: payload.timeout_in_seconds
58728
+ amount_eq: payload?.amount_eq,
58729
+ amount_gte: payload?.amount_gte,
58730
+ amount_lte: payload?.amount_lte,
58731
+ buyer_email_address: payload?.buyer_email_address,
58732
+ buyer_external_identifier: payload?.buyer_external_identifier,
58733
+ buyer_id: payload?.buyer_id,
58734
+ checkout_session_id: payload?.checkout_session_id,
58735
+ created_at_gte: payload?.created_at_gte,
58736
+ created_at_lte: payload?.created_at_lte,
58737
+ currency: payload?.currency,
58738
+ cursor: payload?.cursor,
58739
+ error_code: payload?.error_code,
58740
+ external_identifier: payload?.external_identifier,
58741
+ gift_card_id: payload?.gift_card_id,
58742
+ gift_card_last4: payload?.gift_card_last4,
58743
+ has_gift_card_redemptions: payload?.has_gift_card_redemptions,
58744
+ has_refunds: payload?.has_refunds,
58745
+ has_settlements: payload?.has_settlements,
58746
+ id: payload?.id,
58747
+ is_subsequent_payment: payload?.is_subsequent_payment,
58748
+ limit: payload?.limit,
58749
+ merchant_initiated: payload?.merchant_initiated,
58750
+ metadata: payload?.metadata,
58751
+ method: payload?.method,
58752
+ payment_method_bin: payload?.payment_method_bin,
58753
+ payment_method_fingerprint: payload?.payment_method_fingerprint,
58754
+ payment_method_id: payload?.payment_method_id,
58755
+ payment_method_label: payload?.payment_method_label,
58756
+ payment_service_id: payload?.payment_service_id,
58757
+ payment_service_transaction_id: payload?.payment_service_transaction_id,
58758
+ payment_source: payload?.payment_source,
58759
+ pending_review: payload?.pending_review,
58760
+ reconciliation_id: payload?.reconciliation_id,
58761
+ search: payload?.search,
58762
+ status: payload?.status,
58763
+ updated_at_gte: payload?.updated_at_gte,
58764
+ updated_at_lte: payload?.updated_at_lte
58746
58765
  });
58747
58766
  const headers = new Headers(compactMap({
58748
- "Content-Type": "application/json",
58749
58767
  Accept: "application/json",
58750
- "idempotency-key": encodeSimple("idempotency-key", payload["idempotency-key"], { explode: false, charEncoding: "none" }),
58751
- "x-gr4vy-merchant-account-id": encodeSimple("x-gr4vy-merchant-account-id", payload.merchantAccountId ?? client._options.merchantAccountId, { explode: false, charEncoding: "none" })
58768
+ "x-gr4vy-merchant-account-id": encodeSimple("x-gr4vy-merchant-account-id", payload?.merchantAccountId ?? client._options.merchantAccountId, { explode: false, charEncoding: "none" })
58752
58769
  }));
58753
58770
  const secConfig = await extractSecurity(client._options.bearerAuth);
58754
58771
  const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
58755
58772
  const requestSecurity = resolveGlobalSecurity(securityInput);
58756
58773
  const context = {
58757
58774
  baseURL: options?.serverURL ?? client._baseURL ?? "",
58758
- operationID: "create_transaction",
58775
+ operationID: "list_transactions",
58759
58776
  oAuth2Scopes: [],
58760
58777
  resolvedSecurity: requestSecurity,
58761
58778
  securitySource: client._options.bearerAuth,
58762
- retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
58763
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
58779
+ retryConfig: options?.retries || client._options.retryConfig || {
58780
+ strategy: "backoff",
58781
+ backoff: {
58782
+ initialInterval: 200,
58783
+ maxInterval: 200,
58784
+ exponent: 1,
58785
+ maxElapsedTime: 1000
58786
+ },
58787
+ retryConnectionErrors: true
58788
+ },
58789
+ retryCodes: options?.retryCodes || ["5XX"]
58764
58790
  };
58765
58791
  const requestRes = client._createRequest(context, {
58766
58792
  security: requestSecurity,
58767
- method: "POST",
58793
+ method: "GET",
58768
58794
  baseURL: options?.serverURL,
58769
58795
  path,
58770
58796
  headers,
@@ -58773,7 +58799,7 @@ async function $do70(client, transactionCreate, timeoutInSeconds, merchantAccoun
58773
58799
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
58774
58800
  }, options);
58775
58801
  if (!requestRes.ok) {
58776
- return [requestRes, { status: "invalid" }];
58802
+ return [haltIterator(requestRes), { status: "invalid" }];
58777
58803
  }
58778
58804
  const req = requestRes.value;
58779
58805
  const doResult = await client._do(req, {
@@ -58798,19 +58824,41 @@ async function $do70(client, transactionCreate, timeoutInSeconds, merchantAccoun
58798
58824
  retryCodes: context.retryCodes
58799
58825
  });
58800
58826
  if (!doResult.ok) {
58801
- return [doResult, { status: "request-error", request: req }];
58827
+ return [haltIterator(doResult), { status: "request-error", request: req }];
58802
58828
  }
58803
58829
  const response = doResult.value;
58804
58830
  const responseFields = {
58805
58831
  HttpMeta: { Response: response, Request: req }
58806
58832
  };
58807
- const [result] = await match(json(200, CreateTransactionResponse$inboundSchema), json(201, CreateTransactionResponse$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, CreateTransactionResponse403CreateTransaction$inboundSchema), jsonErr(404, Error404$inboundSchema), jsonErr(405, Error405$inboundSchema), jsonErr(409, Error409$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), jsonErr(425, Error425$inboundSchema), jsonErr(429, Error429$inboundSchema), jsonErr(500, Error500$inboundSchema), jsonErr(502, Error502$inboundSchema), jsonErr(504, Error504$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
58833
+ const [result, raw] = await match(json(200, ListTransactionsResponse$inboundSchema, {
58834
+ key: "Result"
58835
+ }), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, ListTransactionsResponse403ListTransactions$inboundSchema), jsonErr(404, Error404$inboundSchema), jsonErr(405, Error405$inboundSchema), jsonErr(409, Error409$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), jsonErr(425, Error425$inboundSchema), jsonErr(429, Error429$inboundSchema), jsonErr(500, Error500$inboundSchema), jsonErr(502, Error502$inboundSchema), jsonErr(504, Error504$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
58808
58836
  if (!result.ok) {
58809
- return [result, { status: "complete", request: req, response }];
58837
+ return [haltIterator(result), {
58838
+ status: "complete",
58839
+ request: req,
58840
+ response
58841
+ }];
58810
58842
  }
58811
- return [result, { status: "complete", request: req, response }];
58843
+ const nextFunc = (responseData) => {
58844
+ const nextCursor = dlv(responseData, "next_cursor");
58845
+ if (typeof nextCursor !== "string") {
58846
+ return { next: () => null };
58847
+ }
58848
+ const nextVal = () => transactionsList(client, {
58849
+ ...request,
58850
+ cursor: nextCursor
58851
+ }, options);
58852
+ return { next: nextVal, "~next": { cursor: nextCursor } };
58853
+ };
58854
+ const page = { ...result, ...nextFunc(raw) };
58855
+ return [{ ...page, ...createPageIterator(page, (v2) => !v2.ok) }, {
58856
+ status: "complete",
58857
+ request: req,
58858
+ response
58859
+ }];
58812
58860
  }
58813
- var init_transactionsCreate = __esm(() => {
58861
+ var init_transactionsList = __esm(() => {
58814
58862
  init_encodings();
58815
58863
  init_matchers();
58816
58864
  init_primitives();
@@ -58820,64 +58868,69 @@ var init_transactionsCreate = __esm(() => {
58820
58868
  init_errors();
58821
58869
  init_operations();
58822
58870
  init_async();
58871
+ init_operations2();
58823
58872
  });
58824
58873
 
58825
- // src/mcp-server/tools/transactionsCreate.ts
58826
- var args70, tool$transactionsCreate;
58827
- var init_transactionsCreate2 = __esm(() => {
58828
- init_lib();
58829
- init_transactionsCreate();
58830
- init_components();
58874
+ // src/mcp-server/tools/transactionsList.ts
58875
+ var args70, tool$transactionsList;
58876
+ var init_transactionsList2 = __esm(() => {
58877
+ init_transactionsList();
58878
+ init_operations();
58831
58879
  init_tools();
58832
58880
  args70 = {
58833
- transactionCreate: TransactionCreate$inboundSchema,
58834
- timeoutInSeconds: numberType().default(1),
58835
- merchantAccountId: nullableType(stringType()).optional(),
58836
- idempotencyKey: nullableType(stringType()).optional()
58881
+ request: ListTransactionsRequest$inboundSchema.optional()
58837
58882
  };
58838
- tool$transactionsCreate = {
58839
- name: "transactions-create",
58840
- description: `Create transaction
58883
+ tool$transactionsList = {
58884
+ name: "transactions-list",
58885
+ description: `List transactions
58841
58886
 
58842
- Create a transaction.`,
58887
+ List all transactions for a specific merchant account sorted by most recently created.`,
58843
58888
  args: args70,
58844
58889
  tool: async (client, args71, ctx) => {
58845
- const [result, apiCall] = await transactionsCreate(client, args71.transactionCreate, args71.timeoutInSeconds, args71.merchantAccountId, args71.idempotencyKey, { fetchOptions: { signal: ctx.signal } }).$inspect();
58890
+ const [result, apiCall] = await transactionsList(client, args71.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
58846
58891
  if (!result.ok) {
58847
58892
  return {
58848
58893
  content: [{ type: "text", text: result.error.message }],
58849
58894
  isError: true
58850
58895
  };
58851
58896
  }
58852
- const value = result.value;
58897
+ const value = result.value.result;
58853
58898
  return formatResult(value, apiCall);
58854
58899
  }
58855
58900
  };
58856
58901
  });
58857
58902
 
58858
- // src/funcs/transactionsGet.ts
58859
- function transactionsGet(client, transactionId, merchantAccountId, options) {
58860
- return new APIPromise($do71(client, transactionId, merchantAccountId, options));
58903
+ // src/funcs/transactionsRefundsAllCreate.ts
58904
+ function transactionsRefundsAllCreate(client, transactionId, transactionRefundAllCreate, timeoutInSeconds, merchantAccountId, options) {
58905
+ return new APIPromise($do71(client, transactionId, transactionRefundAllCreate, timeoutInSeconds, merchantAccountId, options));
58861
58906
  }
58862
- async function $do71(client, transactionId, merchantAccountId, options) {
58907
+ async function $do71(client, transactionId, transactionRefundAllCreate, timeoutInSeconds, merchantAccountId, options) {
58863
58908
  const input = {
58864
58909
  transactionId,
58910
+ transactionRefundAllCreate,
58911
+ timeoutInSeconds,
58865
58912
  merchantAccountId
58866
58913
  };
58867
- const parsed = safeParse(input, (value) => GetTransactionRequest$outboundSchema.parse(value), "Input validation failed");
58914
+ const parsed = safeParse(input, (value) => CreateFullTransactionRefundRequest$outboundSchema.parse(value), "Input validation failed");
58868
58915
  if (!parsed.ok) {
58869
58916
  return [parsed, { status: "invalid" }];
58870
58917
  }
58871
58918
  const payload = parsed.value;
58872
- const body = null;
58919
+ const body = encodeJSON("body", payload.TransactionRefundAllCreate, {
58920
+ explode: true
58921
+ });
58873
58922
  const pathParams = {
58874
58923
  transaction_id: encodeSimple("transaction_id", payload.transaction_id, {
58875
58924
  explode: false,
58876
58925
  charEncoding: "percent"
58877
58926
  })
58878
58927
  };
58879
- const path = pathToFunc("/transactions/{transaction_id}")(pathParams);
58928
+ const path = pathToFunc("/transactions/{transaction_id}/refunds/all")(pathParams);
58929
+ const query = encodeFormQuery({
58930
+ timeout_in_seconds: payload.timeout_in_seconds
58931
+ });
58880
58932
  const headers = new Headers(compactMap({
58933
+ "Content-Type": "application/json",
58881
58934
  Accept: "application/json",
58882
58935
  "x-gr4vy-merchant-account-id": encodeSimple("x-gr4vy-merchant-account-id", payload.merchantAccountId ?? client._options.merchantAccountId, { explode: false, charEncoding: "none" })
58883
58936
  }));
@@ -58886,28 +58939,20 @@ async function $do71(client, transactionId, merchantAccountId, options) {
58886
58939
  const requestSecurity = resolveGlobalSecurity(securityInput);
58887
58940
  const context = {
58888
58941
  baseURL: options?.serverURL ?? client._baseURL ?? "",
58889
- operationID: "get_transaction",
58942
+ operationID: "create_full_transaction_refund",
58890
58943
  oAuth2Scopes: [],
58891
58944
  resolvedSecurity: requestSecurity,
58892
58945
  securitySource: client._options.bearerAuth,
58893
- retryConfig: options?.retries || client._options.retryConfig || {
58894
- strategy: "backoff",
58895
- backoff: {
58896
- initialInterval: 200,
58897
- maxInterval: 200,
58898
- exponent: 1,
58899
- maxElapsedTime: 1000
58900
- },
58901
- retryConnectionErrors: true
58902
- },
58903
- retryCodes: options?.retryCodes || ["5XX"]
58946
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
58947
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
58904
58948
  };
58905
58949
  const requestRes = client._createRequest(context, {
58906
58950
  security: requestSecurity,
58907
- method: "GET",
58951
+ method: "POST",
58908
58952
  baseURL: options?.serverURL,
58909
58953
  path,
58910
58954
  headers,
58955
+ query,
58911
58956
  body,
58912
58957
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
58913
58958
  }, options);
@@ -58943,13 +58988,13 @@ async function $do71(client, transactionId, merchantAccountId, options) {
58943
58988
  const responseFields = {
58944
58989
  HttpMeta: { Response: response, Request: req }
58945
58990
  };
58946
- const [result] = await match(json(200, Transaction$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, GetTransactionResponse403GetTransaction$inboundSchema), jsonErr(404, Error404$inboundSchema), jsonErr(405, Error405$inboundSchema), jsonErr(409, Error409$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), jsonErr(425, Error425$inboundSchema), jsonErr(429, Error429$inboundSchema), jsonErr(500, Error500$inboundSchema), jsonErr(502, Error502$inboundSchema), jsonErr(504, Error504$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
58991
+ const [result] = await match(json(201, CollectionNoCursorRefund$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, CreateFullTransactionRefundResponse403CreateFullTransactionRefund$inboundSchema), jsonErr(404, Error404$inboundSchema), jsonErr(405, Error405$inboundSchema), jsonErr(409, Error409$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), jsonErr(425, Error425$inboundSchema), jsonErr(429, Error429$inboundSchema), jsonErr(500, Error500$inboundSchema), jsonErr(502, Error502$inboundSchema), jsonErr(504, Error504$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
58947
58992
  if (!result.ok) {
58948
58993
  return [result, { status: "complete", request: req, response }];
58949
58994
  }
58950
58995
  return [result, { status: "complete", request: req, response }];
58951
58996
  }
58952
- var init_transactionsGet = __esm(() => {
58997
+ var init_transactionsRefundsAllCreate = __esm(() => {
58953
58998
  init_encodings();
58954
58999
  init_matchers();
58955
59000
  init_primitives();
@@ -58962,24 +59007,27 @@ var init_transactionsGet = __esm(() => {
58962
59007
  init_async();
58963
59008
  });
58964
59009
 
58965
- // src/mcp-server/tools/transactionsGet.ts
58966
- var args71, tool$transactionsGet;
58967
- var init_transactionsGet2 = __esm(() => {
59010
+ // src/mcp-server/tools/transactionsRefundsAllCreate.ts
59011
+ var args71, tool$transactionsRefundsAllCreate;
59012
+ var init_transactionsRefundsAllCreate2 = __esm(() => {
58968
59013
  init_lib();
58969
- init_transactionsGet();
59014
+ init_transactionsRefundsAllCreate();
59015
+ init_components();
58970
59016
  init_tools();
58971
59017
  args71 = {
58972
59018
  transactionId: stringType(),
59019
+ transactionRefundAllCreate: nullableType(TransactionRefundAllCreate$inboundSchema).optional(),
59020
+ timeoutInSeconds: numberType().default(1),
58973
59021
  merchantAccountId: nullableType(stringType()).optional()
58974
59022
  };
58975
- tool$transactionsGet = {
58976
- name: "transactions-get",
58977
- description: `Get transaction
59023
+ tool$transactionsRefundsAllCreate = {
59024
+ name: "transactions-refunds-all-create",
59025
+ description: `Create batch transaction refund
58978
59026
 
58979
- Fetch a single transaction by its ID.`,
59027
+ Create a refund for all instruments on a transaction.`,
58980
59028
  args: args71,
58981
59029
  tool: async (client, args72, ctx) => {
58982
- const [result, apiCall] = await transactionsGet(client, args72.transactionId, args72.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
59030
+ const [result, apiCall] = await transactionsRefundsAllCreate(client, args72.transactionId, args72.transactionRefundAllCreate, args72.timeoutInSeconds, args72.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
58983
59031
  if (!result.ok) {
58984
59032
  return {
58985
59033
  content: [{ type: "text", text: result.error.message }],
@@ -58992,85 +59040,55 @@ Fetch a single transaction by its ID.`,
58992
59040
  };
58993
59041
  });
58994
59042
 
58995
- // src/funcs/transactionsList.ts
58996
- function transactionsList(client, request, options) {
58997
- return new APIPromise($do72(client, request, options));
59043
+ // src/funcs/transactionsRefundsCreate.ts
59044
+ function transactionsRefundsCreate(client, transactionRefundCreate, transactionId, timeoutInSeconds, merchantAccountId, options) {
59045
+ return new APIPromise($do72(client, transactionRefundCreate, transactionId, timeoutInSeconds, merchantAccountId, options));
58998
59046
  }
58999
- async function $do72(client, request, options) {
59000
- const parsed = safeParse(request, (value) => ListTransactionsRequest$outboundSchema.optional().parse(value), "Input validation failed");
59047
+ async function $do72(client, transactionRefundCreate, transactionId, timeoutInSeconds, merchantAccountId, options) {
59048
+ const input = {
59049
+ transactionRefundCreate,
59050
+ transactionId,
59051
+ timeoutInSeconds,
59052
+ merchantAccountId
59053
+ };
59054
+ const parsed = safeParse(input, (value) => CreateTransactionRefundRequest$outboundSchema.parse(value), "Input validation failed");
59001
59055
  if (!parsed.ok) {
59002
- return [haltIterator(parsed), { status: "invalid" }];
59056
+ return [parsed, { status: "invalid" }];
59003
59057
  }
59004
59058
  const payload = parsed.value;
59005
- const body = null;
59006
- const path = pathToFunc("/transactions")();
59059
+ const body = encodeJSON("body", payload.TransactionRefundCreate, {
59060
+ explode: true
59061
+ });
59062
+ const pathParams = {
59063
+ transaction_id: encodeSimple("transaction_id", payload.transaction_id, {
59064
+ explode: false,
59065
+ charEncoding: "percent"
59066
+ })
59067
+ };
59068
+ const path = pathToFunc("/transactions/{transaction_id}/refunds")(pathParams);
59007
59069
  const query = encodeFormQuery({
59008
- amount_eq: payload?.amount_eq,
59009
- amount_gte: payload?.amount_gte,
59010
- amount_lte: payload?.amount_lte,
59011
- buyer_email_address: payload?.buyer_email_address,
59012
- buyer_external_identifier: payload?.buyer_external_identifier,
59013
- buyer_id: payload?.buyer_id,
59014
- checkout_session_id: payload?.checkout_session_id,
59015
- created_at_gte: payload?.created_at_gte,
59016
- created_at_lte: payload?.created_at_lte,
59017
- currency: payload?.currency,
59018
- cursor: payload?.cursor,
59019
- error_code: payload?.error_code,
59020
- external_identifier: payload?.external_identifier,
59021
- gift_card_id: payload?.gift_card_id,
59022
- gift_card_last4: payload?.gift_card_last4,
59023
- has_gift_card_redemptions: payload?.has_gift_card_redemptions,
59024
- has_refunds: payload?.has_refunds,
59025
- has_settlements: payload?.has_settlements,
59026
- id: payload?.id,
59027
- is_subsequent_payment: payload?.is_subsequent_payment,
59028
- limit: payload?.limit,
59029
- merchant_initiated: payload?.merchant_initiated,
59030
- metadata: payload?.metadata,
59031
- method: payload?.method,
59032
- payment_method_bin: payload?.payment_method_bin,
59033
- payment_method_fingerprint: payload?.payment_method_fingerprint,
59034
- payment_method_id: payload?.payment_method_id,
59035
- payment_method_label: payload?.payment_method_label,
59036
- payment_service_id: payload?.payment_service_id,
59037
- payment_service_transaction_id: payload?.payment_service_transaction_id,
59038
- payment_source: payload?.payment_source,
59039
- pending_review: payload?.pending_review,
59040
- reconciliation_id: payload?.reconciliation_id,
59041
- search: payload?.search,
59042
- status: payload?.status,
59043
- updated_at_gte: payload?.updated_at_gte,
59044
- updated_at_lte: payload?.updated_at_lte
59070
+ timeout_in_seconds: payload.timeout_in_seconds
59045
59071
  });
59046
59072
  const headers = new Headers(compactMap({
59073
+ "Content-Type": "application/json",
59047
59074
  Accept: "application/json",
59048
- "x-gr4vy-merchant-account-id": encodeSimple("x-gr4vy-merchant-account-id", payload?.merchantAccountId ?? client._options.merchantAccountId, { explode: false, charEncoding: "none" })
59075
+ "x-gr4vy-merchant-account-id": encodeSimple("x-gr4vy-merchant-account-id", payload.merchantAccountId ?? client._options.merchantAccountId, { explode: false, charEncoding: "none" })
59049
59076
  }));
59050
59077
  const secConfig = await extractSecurity(client._options.bearerAuth);
59051
59078
  const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
59052
59079
  const requestSecurity = resolveGlobalSecurity(securityInput);
59053
59080
  const context = {
59054
59081
  baseURL: options?.serverURL ?? client._baseURL ?? "",
59055
- operationID: "list_transactions",
59082
+ operationID: "create_transaction_refund",
59056
59083
  oAuth2Scopes: [],
59057
59084
  resolvedSecurity: requestSecurity,
59058
59085
  securitySource: client._options.bearerAuth,
59059
- retryConfig: options?.retries || client._options.retryConfig || {
59060
- strategy: "backoff",
59061
- backoff: {
59062
- initialInterval: 200,
59063
- maxInterval: 200,
59064
- exponent: 1,
59065
- maxElapsedTime: 1000
59066
- },
59067
- retryConnectionErrors: true
59068
- },
59069
- retryCodes: options?.retryCodes || ["5XX"]
59086
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
59087
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
59070
59088
  };
59071
59089
  const requestRes = client._createRequest(context, {
59072
59090
  security: requestSecurity,
59073
- method: "GET",
59091
+ method: "POST",
59074
59092
  baseURL: options?.serverURL,
59075
59093
  path,
59076
59094
  headers,
@@ -59079,7 +59097,7 @@ async function $do72(client, request, options) {
59079
59097
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
59080
59098
  }, options);
59081
59099
  if (!requestRes.ok) {
59082
- return [haltIterator(requestRes), { status: "invalid" }];
59100
+ return [requestRes, { status: "invalid" }];
59083
59101
  }
59084
59102
  const req = requestRes.value;
59085
59103
  const doResult = await client._do(req, {
@@ -59104,77 +59122,59 @@ async function $do72(client, request, options) {
59104
59122
  retryCodes: context.retryCodes
59105
59123
  });
59106
59124
  if (!doResult.ok) {
59107
- return [haltIterator(doResult), { status: "request-error", request: req }];
59125
+ return [doResult, { status: "request-error", request: req }];
59108
59126
  }
59109
59127
  const response = doResult.value;
59110
59128
  const responseFields = {
59111
59129
  HttpMeta: { Response: response, Request: req }
59112
59130
  };
59113
- const [result, raw] = await match(json(200, ListTransactionsResponse$inboundSchema, {
59114
- key: "Result"
59115
- }), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, ListTransactionsResponse403ListTransactions$inboundSchema), jsonErr(404, Error404$inboundSchema), jsonErr(405, Error405$inboundSchema), jsonErr(409, Error409$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), jsonErr(425, Error425$inboundSchema), jsonErr(429, Error429$inboundSchema), jsonErr(500, Error500$inboundSchema), jsonErr(502, Error502$inboundSchema), jsonErr(504, Error504$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
59131
+ const [result] = await match(json(201, Refund$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, CreateTransactionRefundResponse403CreateTransactionRefund$inboundSchema), jsonErr(404, Error404$inboundSchema), jsonErr(405, Error405$inboundSchema), jsonErr(409, Error409$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), jsonErr(425, Error425$inboundSchema), jsonErr(429, Error429$inboundSchema), jsonErr(500, Error500$inboundSchema), jsonErr(502, Error502$inboundSchema), jsonErr(504, Error504$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
59116
59132
  if (!result.ok) {
59117
- return [haltIterator(result), {
59118
- status: "complete",
59119
- request: req,
59120
- response
59121
- }];
59133
+ return [result, { status: "complete", request: req, response }];
59122
59134
  }
59123
- const nextFunc = (responseData) => {
59124
- const nextCursor = dlv(responseData, "next_cursor");
59125
- if (typeof nextCursor !== "string") {
59126
- return { next: () => null };
59127
- }
59128
- const nextVal = () => transactionsList(client, {
59129
- ...request,
59130
- cursor: nextCursor
59131
- }, options);
59132
- return { next: nextVal, "~next": { cursor: nextCursor } };
59133
- };
59134
- const page = { ...result, ...nextFunc(raw) };
59135
- return [{ ...page, ...createPageIterator(page, (v2) => !v2.ok) }, {
59136
- status: "complete",
59137
- request: req,
59138
- response
59139
- }];
59135
+ return [result, { status: "complete", request: req, response }];
59140
59136
  }
59141
- var init_transactionsList = __esm(() => {
59137
+ var init_transactionsRefundsCreate = __esm(() => {
59142
59138
  init_encodings();
59143
59139
  init_matchers();
59144
59140
  init_primitives();
59145
59141
  init_schemas();
59146
59142
  init_security();
59147
59143
  init_url();
59144
+ init_components();
59148
59145
  init_errors();
59149
59146
  init_operations();
59150
59147
  init_async();
59151
- init_operations2();
59152
59148
  });
59153
59149
 
59154
- // src/mcp-server/tools/transactionsList.ts
59155
- var args72, tool$transactionsList;
59156
- var init_transactionsList2 = __esm(() => {
59157
- init_transactionsList();
59158
- init_operations();
59150
+ // src/mcp-server/tools/transactionsRefundsCreate.ts
59151
+ var args72, tool$transactionsRefundsCreate;
59152
+ var init_transactionsRefundsCreate2 = __esm(() => {
59153
+ init_lib();
59154
+ init_transactionsRefundsCreate();
59155
+ init_components();
59159
59156
  init_tools();
59160
59157
  args72 = {
59161
- request: ListTransactionsRequest$inboundSchema.optional()
59158
+ transactionRefundCreate: TransactionRefundCreate$inboundSchema,
59159
+ transactionId: stringType(),
59160
+ timeoutInSeconds: numberType().default(1),
59161
+ merchantAccountId: nullableType(stringType()).optional()
59162
59162
  };
59163
- tool$transactionsList = {
59164
- name: "transactions-list",
59165
- description: `List transactions
59163
+ tool$transactionsRefundsCreate = {
59164
+ name: "transactions-refunds-create",
59165
+ description: `Create transaction refund
59166
59166
 
59167
- List all transactions for a specific merchant account sorted by most recently created.`,
59167
+ Create a refund for a transaction.`,
59168
59168
  args: args72,
59169
59169
  tool: async (client, args73, ctx) => {
59170
- const [result, apiCall] = await transactionsList(client, args73.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
59170
+ const [result, apiCall] = await transactionsRefundsCreate(client, args73.transactionRefundCreate, args73.transactionId, args73.timeoutInSeconds, args73.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
59171
59171
  if (!result.ok) {
59172
59172
  return {
59173
59173
  content: [{ type: "text", text: result.error.message }],
59174
59174
  isError: true
59175
59175
  };
59176
59176
  }
59177
- const value = result.value.result;
59177
+ const value = result.value;
59178
59178
  return formatResult(value, apiCall);
59179
59179
  }
59180
59180
  };
@@ -59190,7 +59190,7 @@ async function $do73(client, transactionId, refundId, merchantAccountId, options
59190
59190
  refundId,
59191
59191
  merchantAccountId
59192
59192
  };
59193
- const parsed = safeParse(input, (value) => GetTreansactionRefundRequest$outboundSchema.parse(value), "Input validation failed");
59193
+ const parsed = safeParse(input, (value) => GetTransactionRefundRequest$outboundSchema.parse(value), "Input validation failed");
59194
59194
  if (!parsed.ok) {
59195
59195
  return [parsed, { status: "invalid" }];
59196
59196
  }
@@ -59216,7 +59216,7 @@ async function $do73(client, transactionId, refundId, merchantAccountId, options
59216
59216
  const requestSecurity = resolveGlobalSecurity(securityInput);
59217
59217
  const context = {
59218
59218
  baseURL: options?.serverURL ?? client._baseURL ?? "",
59219
- operationID: "get_treansaction_refund",
59219
+ operationID: "get_transaction_refund",
59220
59220
  oAuth2Scopes: [],
59221
59221
  resolvedSecurity: requestSecurity,
59222
59222
  securitySource: client._options.bearerAuth,
@@ -59273,7 +59273,7 @@ async function $do73(client, transactionId, refundId, merchantAccountId, options
59273
59273
  const responseFields = {
59274
59274
  HttpMeta: { Response: response, Request: req }
59275
59275
  };
59276
- const [result] = await match(json(200, Refund$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, GetTreansactionRefundResponse403GetTreansactionRefund$inboundSchema), jsonErr(404, Error404$inboundSchema), jsonErr(405, Error405$inboundSchema), jsonErr(409, Error409$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), jsonErr(425, Error425$inboundSchema), jsonErr(429, Error429$inboundSchema), jsonErr(500, Error500$inboundSchema), jsonErr(502, Error502$inboundSchema), jsonErr(504, Error504$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
59276
+ const [result] = await match(json(200, Refund$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, GetTransactionRefundResponse403GetTransactionRefund$inboundSchema), jsonErr(404, Error404$inboundSchema), jsonErr(405, Error405$inboundSchema), jsonErr(409, Error409$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), jsonErr(425, Error425$inboundSchema), jsonErr(429, Error429$inboundSchema), jsonErr(500, Error500$inboundSchema), jsonErr(502, Error502$inboundSchema), jsonErr(504, Error504$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
59277
59277
  if (!result.ok) {
59278
59278
  return [result, { status: "complete", request: req, response }];
59279
59279
  }
@@ -59869,7 +59869,7 @@ Void a previously authorized transaction.`,
59869
59869
  function createMCPServer(deps) {
59870
59870
  const server = new McpServer({
59871
59871
  name: "Gr4vy",
59872
- version: "0.18.17"
59872
+ version: "0.18.18"
59873
59873
  });
59874
59874
  const client = new Gr4vyCore({
59875
59875
  bearerAuth: deps.bearerAuth,
@@ -59958,10 +59958,10 @@ function createMCPServer(deps) {
59958
59958
  tool(tool$digitalWalletsDomainsCreate);
59959
59959
  tool(tool$digitalWalletsDomainsDelete);
59960
59960
  tool(tool$transactionsRefundsList);
59961
+ tool(tool$transactionsRefundsCreate);
59961
59962
  tool(tool$transactionsRefundsGet);
59962
- tool(tool$transactionRefundsCreate);
59963
59963
  tool(tool$paymentMethodsNetworkTokensCryptogramCreate);
59964
- tool(tool$transactionRefundsAllCreate);
59964
+ tool(tool$transactionsRefundsAllCreate);
59965
59965
  return server;
59966
59966
  }
59967
59967
  var init_server2 = __esm(() => {
@@ -60035,12 +60035,12 @@ var init_server2 = __esm(() => {
60035
60035
  init_payoutsGet2();
60036
60036
  init_payoutsList2();
60037
60037
  init_refundsGet2();
60038
- init_transactionRefundsAllCreate2();
60039
- init_transactionRefundsCreate2();
60040
60038
  init_transactionsCapture2();
60041
60039
  init_transactionsCreate2();
60042
60040
  init_transactionsGet2();
60043
60041
  init_transactionsList2();
60042
+ init_transactionsRefundsAllCreate2();
60043
+ init_transactionsRefundsCreate2();
60044
60044
  init_transactionsRefundsGet2();
60045
60045
  init_transactionsRefundsList2();
60046
60046
  init_transactionsSummary2();
@@ -61255,7 +61255,7 @@ var routes = an({
61255
61255
  var app = He(routes, {
61256
61256
  name: "mcp",
61257
61257
  versionInfo: {
61258
- currentVersion: "0.18.17"
61258
+ currentVersion: "0.18.18"
61259
61259
  }
61260
61260
  });
61261
61261
  zt(app, process3.argv.slice(2), buildContext(process3));
@@ -61263,5 +61263,5 @@ export {
61263
61263
  app
61264
61264
  };
61265
61265
 
61266
- //# debugId=7D0E1A3225E6B1FC64756E2164756E21
61266
+ //# debugId=D3160834E2AC4CF564756E2164756E21
61267
61267
  //# sourceMappingURL=mcp-server.js.map