@gr4vy/sdk 0.17.2 → 0.17.4

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 (80) hide show
  1. package/bin/mcp-server.js +147 -40
  2. package/bin/mcp-server.js.map +17 -16
  3. package/docs/sdks/checkoutsessions/README.md +6 -212
  4. package/docs/sdks/giftcards/README.md +9 -5
  5. package/docs/sdks/transactions/README.md +10 -6
  6. package/funcs/checkoutSessionsCreate.d.ts +2 -1
  7. package/funcs/checkoutSessionsCreate.d.ts.map +1 -1
  8. package/funcs/checkoutSessionsCreate.js +5 -7
  9. package/funcs/checkoutSessionsCreate.js.map +1 -1
  10. package/funcs/giftCardsList.d.ts +5 -2
  11. package/funcs/giftCardsList.d.ts.map +1 -1
  12. package/funcs/giftCardsList.js +27 -7
  13. package/funcs/giftCardsList.js.map +1 -1
  14. package/funcs/transactionsList.d.ts +5 -3
  15. package/funcs/transactionsList.d.ts.map +1 -1
  16. package/funcs/transactionsList.js +31 -8
  17. package/funcs/transactionsList.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/mcp-server/mcp-server.js +1 -1
  22. package/mcp-server/server.js +1 -1
  23. package/mcp-server/tools/checkoutSessionsCreate.d.ts +2 -2
  24. package/mcp-server/tools/checkoutSessionsCreate.d.ts.map +1 -1
  25. package/mcp-server/tools/checkoutSessionsCreate.js +4 -3
  26. package/mcp-server/tools/checkoutSessionsCreate.js.map +1 -1
  27. package/mcp-server/tools/giftCardsList.js +1 -1
  28. package/mcp-server/tools/giftCardsList.js.map +1 -1
  29. package/mcp-server/tools/transactionsList.js +2 -2
  30. package/mcp-server/tools/transactionsList.js.map +1 -1
  31. package/models/components/basemodel.d.ts +25 -0
  32. package/models/components/basemodel.d.ts.map +1 -0
  33. package/models/components/basemodel.js +55 -0
  34. package/models/components/basemodel.js.map +1 -0
  35. package/models/components/index.d.ts +1 -0
  36. package/models/components/index.d.ts.map +1 -1
  37. package/models/components/index.js +1 -0
  38. package/models/components/index.js.map +1 -1
  39. package/models/operations/createcheckoutsession.d.ts +23 -2
  40. package/models/operations/createcheckoutsession.d.ts.map +1 -1
  41. package/models/operations/createcheckoutsession.js +40 -5
  42. package/models/operations/createcheckoutsession.js.map +1 -1
  43. package/models/operations/listgiftcards.d.ts +26 -0
  44. package/models/operations/listgiftcards.d.ts.map +1 -1
  45. package/models/operations/listgiftcards.js +37 -1
  46. package/models/operations/listgiftcards.js.map +1 -1
  47. package/models/operations/listtransactions.d.ts +25 -0
  48. package/models/operations/listtransactions.d.ts.map +1 -1
  49. package/models/operations/listtransactions.js +36 -1
  50. package/models/operations/listtransactions.js.map +1 -1
  51. package/package.json +5 -1
  52. package/sdk/checkoutsessions.d.ts +2 -1
  53. package/sdk/checkoutsessions.d.ts.map +1 -1
  54. package/sdk/checkoutsessions.js +2 -2
  55. package/sdk/checkoutsessions.js.map +1 -1
  56. package/sdk/giftcards.d.ts +5 -1
  57. package/sdk/giftcards.d.ts.map +1 -1
  58. package/sdk/giftcards.js +2 -1
  59. package/sdk/giftcards.js.map +1 -1
  60. package/sdk/transactions.d.ts +5 -2
  61. package/sdk/transactions.d.ts.map +1 -1
  62. package/sdk/transactions.js +3 -2
  63. package/sdk/transactions.js.map +1 -1
  64. package/src/funcs/checkoutSessionsCreate.ts +5 -7
  65. package/src/funcs/giftCardsList.ts +121 -51
  66. package/src/funcs/transactionsList.ts +117 -47
  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 +1 -1
  70. package/src/mcp-server/tools/checkoutSessionsCreate.ts +4 -5
  71. package/src/mcp-server/tools/giftCardsList.ts +1 -1
  72. package/src/mcp-server/tools/transactionsList.ts +2 -2
  73. package/src/models/components/basemodel.ts +54 -0
  74. package/src/models/components/index.ts +1 -0
  75. package/src/models/operations/createcheckoutsession.ts +79 -8
  76. package/src/models/operations/listgiftcards.ts +67 -0
  77. package/src/models/operations/listtransactions.ts +66 -0
  78. package/src/sdk/checkoutsessions.ts +3 -2
  79. package/src/sdk/giftcards.ts +6 -2
  80. package/src/sdk/transactions.ts +6 -3
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.17.2",
4030
- genVersion: "2.588.4",
4031
- userAgent: "speakeasy-sdk/typescript 0.17.2 2.588.4 1.0.0 @gr4vy/sdk"
4029
+ sdkVersion: "0.17.4",
4030
+ genVersion: "2.591.1",
4031
+ userAgent: "speakeasy-sdk/typescript 0.17.4 2.591.1 1.0.0 @gr4vy/sdk"
4032
4032
  };
4033
4033
  });
4034
4034
 
@@ -36348,6 +36348,18 @@ var init_avsresponsecode = __esm(() => {
36348
36348
  })(AVSResponseCode$ ||= {});
36349
36349
  });
36350
36350
 
36351
+ // src/models/components/basemodel.ts
36352
+ var BaseModel$inboundSchema, BaseModel$outboundSchema, BaseModel$;
36353
+ var init_basemodel = __esm(() => {
36354
+ init_lib();
36355
+ BaseModel$inboundSchema = objectType({});
36356
+ BaseModel$outboundSchema = objectType({});
36357
+ ((BaseModel$) => {
36358
+ BaseModel$.inboundSchema = BaseModel$inboundSchema;
36359
+ BaseModel$.outboundSchema = BaseModel$outboundSchema;
36360
+ })(BaseModel$ ||= {});
36361
+ });
36362
+
36351
36363
  // src/models/components/taxidkind.ts
36352
36364
  var TaxIdKind, TaxIdKind$inboundSchema, TaxIdKind$outboundSchema, TaxIdKind$;
36353
36365
  var init_taxidkind = __esm(() => {
@@ -42007,6 +42019,7 @@ var init_components = __esm(() => {
42007
42019
  init_auditlogentryresource();
42008
42020
  init_auditlogentryuser();
42009
42021
  init_avsresponsecode();
42022
+ init_basemodel();
42010
42023
  init_billingdetailsinput();
42011
42024
  init_billingdetailsoutput();
42012
42025
  init_browserinfo();
@@ -44493,27 +44506,45 @@ var init_createaccountupdaterjob2 = __esm(() => {
44493
44506
  });
44494
44507
 
44495
44508
  // src/models/operations/createcheckoutsession.ts
44496
- var CreateCheckoutSessionRequest$inboundSchema, CreateCheckoutSessionRequest$outboundSchema, CreateCheckoutSessionRequest$;
44509
+ var CreateCheckoutSessionBody$inboundSchema, CreateCheckoutSessionBody$outboundSchema, CreateCheckoutSessionBody$, CreateCheckoutSessionRequest$inboundSchema, CreateCheckoutSessionRequest$outboundSchema, CreateCheckoutSessionRequest$;
44497
44510
  var init_createcheckoutsession2 = __esm(() => {
44498
44511
  init_lib();
44499
44512
  init_primitives();
44500
44513
  init_components();
44514
+ CreateCheckoutSessionBody$inboundSchema = unionType([
44515
+ CheckoutSessionUpdate$inboundSchema,
44516
+ arrayType(BaseModel$inboundSchema)
44517
+ ]);
44518
+ CreateCheckoutSessionBody$outboundSchema = unionType([
44519
+ CheckoutSessionUpdate$outboundSchema,
44520
+ arrayType(BaseModel$outboundSchema)
44521
+ ]);
44522
+ ((CreateCheckoutSessionBody$) => {
44523
+ CreateCheckoutSessionBody$.inboundSchema = CreateCheckoutSessionBody$inboundSchema;
44524
+ CreateCheckoutSessionBody$.outboundSchema = CreateCheckoutSessionBody$outboundSchema;
44525
+ })(CreateCheckoutSessionBody$ ||= {});
44501
44526
  CreateCheckoutSessionRequest$inboundSchema = objectType({
44502
44527
  timeout_in_seconds: numberType().default(1),
44503
- CheckoutSessionUpdate: nullableType(CheckoutSessionUpdate$inboundSchema).optional()
44528
+ RequestBody: nullableType(unionType([
44529
+ CheckoutSessionUpdate$inboundSchema,
44530
+ arrayType(BaseModel$inboundSchema)
44531
+ ])).optional()
44504
44532
  }).transform((v2) => {
44505
44533
  return remap(v2, {
44506
44534
  timeout_in_seconds: "timeoutInSeconds",
44507
- CheckoutSessionUpdate: "checkoutSessionUpdate"
44535
+ RequestBody: "requestBody"
44508
44536
  });
44509
44537
  });
44510
44538
  CreateCheckoutSessionRequest$outboundSchema = objectType({
44511
44539
  timeoutInSeconds: numberType().default(1),
44512
- checkoutSessionUpdate: nullableType(CheckoutSessionUpdate$outboundSchema).optional()
44540
+ requestBody: nullableType(unionType([
44541
+ CheckoutSessionUpdate$outboundSchema,
44542
+ arrayType(BaseModel$outboundSchema)
44543
+ ])).optional()
44513
44544
  }).transform((v2) => {
44514
44545
  return remap(v2, {
44515
44546
  timeoutInSeconds: "timeout_in_seconds",
44516
- checkoutSessionUpdate: "CheckoutSessionUpdate"
44547
+ requestBody: "RequestBody"
44517
44548
  });
44518
44549
  });
44519
44550
  ((CreateCheckoutSessionRequest$) => {
@@ -45621,10 +45652,11 @@ var init_listgiftcardbalances2 = __esm(() => {
45621
45652
  });
45622
45653
 
45623
45654
  // src/models/operations/listgiftcards.ts
45624
- var ListGiftCardsRequest$inboundSchema, ListGiftCardsRequest$outboundSchema, ListGiftCardsRequest$;
45655
+ var ListGiftCardsRequest$inboundSchema, ListGiftCardsRequest$outboundSchema, ListGiftCardsRequest$, ListGiftCardsResponse$inboundSchema, ListGiftCardsResponse$outboundSchema, ListGiftCardsResponse$;
45625
45656
  var init_listgiftcards2 = __esm(() => {
45626
45657
  init_lib();
45627
45658
  init_primitives();
45659
+ init_components();
45628
45660
  ListGiftCardsRequest$inboundSchema = objectType({
45629
45661
  buyer_external_identifier: nullableType(stringType()).optional(),
45630
45662
  buyer_id: nullableType(stringType()).optional(),
@@ -45651,6 +45683,24 @@ var init_listgiftcards2 = __esm(() => {
45651
45683
  ListGiftCardsRequest$.inboundSchema = ListGiftCardsRequest$inboundSchema;
45652
45684
  ListGiftCardsRequest$.outboundSchema = ListGiftCardsRequest$outboundSchema;
45653
45685
  })(ListGiftCardsRequest$ ||= {});
45686
+ ListGiftCardsResponse$inboundSchema = objectType({
45687
+ Result: CollectionGiftCard$inboundSchema
45688
+ }).transform((v2) => {
45689
+ return remap(v2, {
45690
+ Result: "result"
45691
+ });
45692
+ });
45693
+ ListGiftCardsResponse$outboundSchema = objectType({
45694
+ result: CollectionGiftCard$outboundSchema
45695
+ }).transform((v2) => {
45696
+ return remap(v2, {
45697
+ result: "Result"
45698
+ });
45699
+ });
45700
+ ((ListGiftCardsResponse$) => {
45701
+ ListGiftCardsResponse$.inboundSchema = ListGiftCardsResponse$inboundSchema;
45702
+ ListGiftCardsResponse$.outboundSchema = ListGiftCardsResponse$outboundSchema;
45703
+ })(ListGiftCardsResponse$ ||= {});
45654
45704
  });
45655
45705
 
45656
45706
  // src/models/operations/listpaymentmethodnetworktokens.ts
@@ -45829,7 +45879,7 @@ var init_listtransactionrefunds2 = __esm(() => {
45829
45879
  });
45830
45880
 
45831
45881
  // src/models/operations/listtransactions.ts
45832
- var ListTransactionsRequest$inboundSchema, ListTransactionsRequest$outboundSchema, ListTransactionsRequest$;
45882
+ var ListTransactionsRequest$inboundSchema, ListTransactionsRequest$outboundSchema, ListTransactionsRequest$, ListTransactionsResponse$inboundSchema, ListTransactionsResponse$outboundSchema, ListTransactionsResponse$;
45833
45883
  var init_listtransactions2 = __esm(() => {
45834
45884
  init_lib();
45835
45885
  init_primitives();
@@ -45980,6 +46030,24 @@ var init_listtransactions2 = __esm(() => {
45980
46030
  ListTransactionsRequest$.inboundSchema = ListTransactionsRequest$inboundSchema;
45981
46031
  ListTransactionsRequest$.outboundSchema = ListTransactionsRequest$outboundSchema;
45982
46032
  })(ListTransactionsRequest$ ||= {});
46033
+ ListTransactionsResponse$inboundSchema = objectType({
46034
+ Result: CollectionTransactionSummary$inboundSchema
46035
+ }).transform((v2) => {
46036
+ return remap(v2, {
46037
+ Result: "result"
46038
+ });
46039
+ });
46040
+ ListTransactionsResponse$outboundSchema = objectType({
46041
+ result: CollectionTransactionSummary$outboundSchema
46042
+ }).transform((v2) => {
46043
+ return remap(v2, {
46044
+ result: "Result"
46045
+ });
46046
+ });
46047
+ ((ListTransactionsResponse$) => {
46048
+ ListTransactionsResponse$.inboundSchema = ListTransactionsResponse$inboundSchema;
46049
+ ListTransactionsResponse$.outboundSchema = ListTransactionsResponse$outboundSchema;
46050
+ })(ListTransactionsResponse$ ||= {});
45983
46051
  });
45984
46052
 
45985
46053
  // src/models/operations/registerdigitalwalletdomain.ts
@@ -48465,12 +48533,12 @@ Fetch a list of the definitions of each card scheme.`,
48465
48533
  });
48466
48534
 
48467
48535
  // src/funcs/checkoutSessionsCreate.ts
48468
- function checkoutSessionsCreate(client, checkoutSessionUpdate, timeoutInSeconds, options) {
48469
- return new APIPromise($do16(client, checkoutSessionUpdate, timeoutInSeconds, options));
48536
+ function checkoutSessionsCreate(client, requestBody, timeoutInSeconds, options) {
48537
+ return new APIPromise($do16(client, requestBody, timeoutInSeconds, options));
48470
48538
  }
48471
- async function $do16(client, checkoutSessionUpdate, timeoutInSeconds, options) {
48539
+ async function $do16(client, requestBody, timeoutInSeconds, options) {
48472
48540
  const input = {
48473
- checkoutSessionUpdate,
48541
+ requestBody,
48474
48542
  timeoutInSeconds
48475
48543
  };
48476
48544
  const parsed = safeParse(input, (value) => CreateCheckoutSessionRequest$outboundSchema.optional().parse(value), "Input validation failed");
@@ -48478,9 +48546,7 @@ async function $do16(client, checkoutSessionUpdate, timeoutInSeconds, options) {
48478
48546
  return [parsed, { status: "invalid" }];
48479
48547
  }
48480
48548
  const payload = parsed.value;
48481
- const body = encodeJSON("body", payload?.CheckoutSessionUpdate, {
48482
- explode: true
48483
- });
48549
+ const body = encodeJSON("body", payload?.RequestBody, { explode: true });
48484
48550
  const path = pathToFunc("/checkout/sessions")();
48485
48551
  const query = encodeFormQuery({
48486
48552
  timeout_in_seconds: payload?.timeout_in_seconds
@@ -48567,10 +48633,10 @@ var args15, tool$checkoutSessionsCreate;
48567
48633
  var init_checkoutSessionsCreate2 = __esm(() => {
48568
48634
  init_lib();
48569
48635
  init_checkoutSessionsCreate();
48570
- init_components();
48636
+ init_operations();
48571
48637
  init_tools();
48572
48638
  args15 = {
48573
- checkoutSessionUpdate: nullableType(CheckoutSessionUpdate$inboundSchema).optional(),
48639
+ requestBody: nullableType(CreateCheckoutSessionBody$inboundSchema).optional(),
48574
48640
  timeoutInSeconds: numberType().default(1)
48575
48641
  };
48576
48642
  tool$checkoutSessionsCreate = {
@@ -48580,7 +48646,7 @@ var init_checkoutSessionsCreate2 = __esm(() => {
48580
48646
  Create a new checkout session.`,
48581
48647
  args: args15,
48582
48648
  tool: async (client, args16, ctx) => {
48583
- const [result, apiCall] = await checkoutSessionsCreate(client, args16.checkoutSessionUpdate, args16.timeoutInSeconds, { fetchOptions: { signal: ctx.signal } }).$inspect();
48649
+ const [result, apiCall] = await checkoutSessionsCreate(client, args16.requestBody, args16.timeoutInSeconds, { fetchOptions: { signal: ctx.signal } }).$inspect();
48584
48650
  if (!result.ok) {
48585
48651
  return {
48586
48652
  content: [{ type: "text", text: result.error.message }],
@@ -50782,7 +50848,7 @@ async function $do34(client, buyerExternalIdentifier, buyerId, cursor, limit, op
50782
50848
  };
50783
50849
  const parsed = safeParse(input, (value) => ListGiftCardsRequest$outboundSchema.optional().parse(value), "Input validation failed");
50784
50850
  if (!parsed.ok) {
50785
- return [parsed, { status: "invalid" }];
50851
+ return [haltIterator(parsed), { status: "invalid" }];
50786
50852
  }
50787
50853
  const payload = parsed.value;
50788
50854
  const body = null;
@@ -50828,7 +50894,7 @@ async function $do34(client, buyerExternalIdentifier, buyerId, cursor, limit, op
50828
50894
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
50829
50895
  }, options);
50830
50896
  if (!requestRes.ok) {
50831
- return [requestRes, { status: "invalid" }];
50897
+ return [haltIterator(requestRes), { status: "invalid" }];
50832
50898
  }
50833
50899
  const req = requestRes.value;
50834
50900
  const doResult = await client._do(req, {
@@ -50853,17 +50919,36 @@ async function $do34(client, buyerExternalIdentifier, buyerId, cursor, limit, op
50853
50919
  retryCodes: context.retryCodes
50854
50920
  });
50855
50921
  if (!doResult.ok) {
50856
- return [doResult, { status: "request-error", request: req }];
50922
+ return [haltIterator(doResult), { status: "request-error", request: req }];
50857
50923
  }
50858
50924
  const response = doResult.value;
50859
50925
  const responseFields = {
50860
50926
  HttpMeta: { Response: response, Request: req }
50861
50927
  };
50862
- const [result] = await match(json(200, CollectionGiftCard$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, ListGiftCardsResponse403ListGiftCards$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 });
50928
+ const [result, raw] = await match(json(200, ListGiftCardsResponse$inboundSchema, {
50929
+ key: "Result"
50930
+ }), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, ListGiftCardsResponse403ListGiftCards$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 });
50863
50931
  if (!result.ok) {
50864
- return [result, { status: "complete", request: req, response }];
50932
+ return [haltIterator(result), {
50933
+ status: "complete",
50934
+ request: req,
50935
+ response
50936
+ }];
50865
50937
  }
50866
- return [result, { status: "complete", request: req, response }];
50938
+ const nextFunc = (responseData) => {
50939
+ const nextCursor = dlv(responseData, "next_cursor");
50940
+ if (typeof nextCursor !== "string") {
50941
+ return { next: () => null };
50942
+ }
50943
+ const nextVal = () => giftCardsList(client, buyerExternalIdentifier, buyerId, nextCursor, limit, options);
50944
+ return { next: nextVal, "~next": { cursor: nextCursor } };
50945
+ };
50946
+ const page = { ...result, ...nextFunc(raw) };
50947
+ return [{ ...page, ...createPageIterator(page, (v2) => !v2.ok) }, {
50948
+ status: "complete",
50949
+ request: req,
50950
+ response
50951
+ }];
50867
50952
  }
50868
50953
  var init_giftCardsList = __esm(() => {
50869
50954
  init_encodings();
@@ -50872,10 +50957,10 @@ var init_giftCardsList = __esm(() => {
50872
50957
  init_schemas();
50873
50958
  init_security();
50874
50959
  init_url();
50875
- init_components();
50876
50960
  init_errors();
50877
50961
  init_operations();
50878
50962
  init_async();
50963
+ init_operations2();
50879
50964
  });
50880
50965
 
50881
50966
  // src/mcp-server/tools/giftCardsList.ts
@@ -50904,7 +50989,7 @@ Browser all gift cards.`,
50904
50989
  isError: true
50905
50990
  };
50906
50991
  }
50907
- const value = result.value;
50992
+ const value = result.value.result;
50908
50993
  return formatResult(value, apiCall);
50909
50994
  }
50910
50995
  };
@@ -53981,7 +54066,7 @@ function transactionsList(client, request, options) {
53981
54066
  async function $do58(client, request, options) {
53982
54067
  const parsed = safeParse(request, (value) => ListTransactionsRequest$outboundSchema.optional().parse(value), "Input validation failed");
53983
54068
  if (!parsed.ok) {
53984
- return [parsed, { status: "invalid" }];
54069
+ return [haltIterator(parsed), { status: "invalid" }];
53985
54070
  }
53986
54071
  const payload = parsed.value;
53987
54072
  const body = null;
@@ -54060,7 +54145,7 @@ async function $do58(client, request, options) {
54060
54145
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
54061
54146
  }, options);
54062
54147
  if (!requestRes.ok) {
54063
- return [requestRes, { status: "invalid" }];
54148
+ return [haltIterator(requestRes), { status: "invalid" }];
54064
54149
  }
54065
54150
  const req = requestRes.value;
54066
54151
  const doResult = await client._do(req, {
@@ -54085,17 +54170,39 @@ async function $do58(client, request, options) {
54085
54170
  retryCodes: context.retryCodes
54086
54171
  });
54087
54172
  if (!doResult.ok) {
54088
- return [doResult, { status: "request-error", request: req }];
54173
+ return [haltIterator(doResult), { status: "request-error", request: req }];
54089
54174
  }
54090
54175
  const response = doResult.value;
54091
54176
  const responseFields = {
54092
54177
  HttpMeta: { Response: response, Request: req }
54093
54178
  };
54094
- const [result] = await match(json(200, CollectionTransactionSummary$inboundSchema), 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 });
54179
+ const [result, raw] = await match(json(200, ListTransactionsResponse$inboundSchema, {
54180
+ key: "Result"
54181
+ }), 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 });
54095
54182
  if (!result.ok) {
54096
- return [result, { status: "complete", request: req, response }];
54183
+ return [haltIterator(result), {
54184
+ status: "complete",
54185
+ request: req,
54186
+ response
54187
+ }];
54097
54188
  }
54098
- return [result, { status: "complete", request: req, response }];
54189
+ const nextFunc = (responseData) => {
54190
+ const nextCursor = dlv(responseData, "next_cursor");
54191
+ if (typeof nextCursor !== "string") {
54192
+ return { next: () => null };
54193
+ }
54194
+ const nextVal = () => transactionsList(client, {
54195
+ ...request,
54196
+ cursor: nextCursor
54197
+ }, options);
54198
+ return { next: nextVal, "~next": { cursor: nextCursor } };
54199
+ };
54200
+ const page = { ...result, ...nextFunc(raw) };
54201
+ return [{ ...page, ...createPageIterator(page, (v2) => !v2.ok) }, {
54202
+ status: "complete",
54203
+ request: req,
54204
+ response
54205
+ }];
54099
54206
  }
54100
54207
  var init_transactionsList = __esm(() => {
54101
54208
  init_encodings();
@@ -54104,10 +54211,10 @@ var init_transactionsList = __esm(() => {
54104
54211
  init_schemas();
54105
54212
  init_security();
54106
54213
  init_url();
54107
- init_components();
54108
54214
  init_errors();
54109
54215
  init_operations();
54110
54216
  init_async();
54217
+ init_operations2();
54111
54218
  });
54112
54219
 
54113
54220
  // src/mcp-server/tools/transactionsList.ts
@@ -54123,7 +54230,7 @@ var init_transactionsList2 = __esm(() => {
54123
54230
  name: "transactions-list",
54124
54231
  description: `List transactions
54125
54232
 
54126
- List all transactions.`,
54233
+ List all transactions for a specific merchant account sorted by most recently created.`,
54127
54234
  args: args56,
54128
54235
  tool: async (client, args57, ctx) => {
54129
54236
  const [result, apiCall] = await transactionsList(client, args57.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
@@ -54133,7 +54240,7 @@ List all transactions.`,
54133
54240
  isError: true
54134
54241
  };
54135
54242
  }
54136
- const value = result.value;
54243
+ const value = result.value.result;
54137
54244
  return formatResult(value, apiCall);
54138
54245
  }
54139
54246
  };
@@ -54813,7 +54920,7 @@ Void an authorized transaction.`,
54813
54920
  function createMCPServer(deps) {
54814
54921
  const server = new McpServer({
54815
54922
  name: "Gr4vy",
54816
- version: "0.17.2"
54923
+ version: "0.17.4"
54817
54924
  });
54818
54925
  const client = new Gr4vyCore({
54819
54926
  bearerAuth: deps.bearerAuth,
@@ -56160,7 +56267,7 @@ var routes = an({
56160
56267
  var app = He(routes, {
56161
56268
  name: "mcp",
56162
56269
  versionInfo: {
56163
- currentVersion: "0.17.2"
56270
+ currentVersion: "0.17.4"
56164
56271
  }
56165
56272
  });
56166
56273
  zt(app, process3.argv.slice(2), buildContext(process3));
@@ -56168,5 +56275,5 @@ export {
56168
56275
  app
56169
56276
  };
56170
56277
 
56171
- //# debugId=B66B12C99B78070C64756E2164756E21
56278
+ //# debugId=7F0B92FEDDAE728C64756E2164756E21
56172
56279
  //# sourceMappingURL=mcp-server.js.map