@gr4vy/sdk 1.0.0-beta.7 → 1.0.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -1
- package/bin/mcp-server.js +79 -108
- package/bin/mcp-server.js.map +15 -16
- package/docs/sdks/checkoutsessions/README.md +244 -10
- package/docs/sdks/digitalwallets/README.md +2 -2
- package/docs/sdks/paymentservices/README.md +12 -12
- package/docs/sdks/payouts/README.md +4 -4
- package/docs/sdks/transactions/README.md +4 -4
- package/funcs/checkoutSessionsCreate.d.ts +1 -2
- package/funcs/checkoutSessionsCreate.d.ts.map +1 -1
- package/funcs/checkoutSessionsCreate.js +7 -5
- package/funcs/checkoutSessionsCreate.js.map +1 -1
- package/funcs/checkoutSessionsUpdate.d.ts +1 -1
- package/funcs/checkoutSessionsUpdate.js +5 -5
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/mcp-server/tools/checkoutSessionsCreate.d.ts +2 -2
- package/mcp-server/tools/checkoutSessionsCreate.js +3 -3
- package/mcp-server/tools/checkoutSessionsCreate.js.map +1 -1
- package/mcp-server/tools/checkoutSessionsUpdate.d.ts +1 -1
- package/mcp-server/tools/checkoutSessionsUpdate.js +2 -2
- package/models/components/{checkoutsessionupdate.d.ts → checkoutsessioncreate.d.ts} +14 -14
- package/models/components/{checkoutsessionupdate.d.ts.map → checkoutsessioncreate.d.ts.map} +1 -1
- package/models/components/{checkoutsessionupdate.js → checkoutsessioncreate.js} +17 -17
- package/models/components/{checkoutsessionupdate.js.map → checkoutsessioncreate.js.map} +1 -1
- package/models/components/index.d.ts +1 -2
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -2
- package/models/components/index.js.map +1 -1
- package/models/operations/createcheckoutsession.d.ts +2 -23
- package/models/operations/createcheckoutsession.d.ts.map +1 -1
- package/models/operations/createcheckoutsession.js +7 -40
- package/models/operations/createcheckoutsession.js.map +1 -1
- package/models/operations/updatecheckoutsession.d.ts +2 -2
- package/models/operations/updatecheckoutsession.js +4 -4
- package/package.json +2 -2
- package/sdk/checkoutsessions.d.ts +2 -3
- package/sdk/checkoutsessions.d.ts.map +1 -1
- package/sdk/checkoutsessions.js +4 -4
- package/sdk/checkoutsessions.js.map +1 -1
- package/src/funcs/checkoutSessionsCreate.ts +7 -5
- package/src/funcs/checkoutSessionsUpdate.ts +5 -5
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/mcp-server/tools/checkoutSessionsCreate.ts +3 -3
- package/src/mcp-server/tools/checkoutSessionsUpdate.ts +2 -2
- package/src/models/components/{checkoutsessionupdate.ts → checkoutsessioncreate.ts} +21 -21
- package/src/models/components/index.ts +1 -2
- package/src/models/operations/createcheckoutsession.ts +8 -84
- package/src/models/operations/updatecheckoutsession.ts +6 -6
- package/src/sdk/checkoutsessions.ts +4 -5
- package/models/components/basemodel.d.ts +0 -25
- package/models/components/basemodel.d.ts.map +0 -1
- package/models/components/basemodel.js +0 -55
- package/models/components/basemodel.js.map +0 -1
- package/src/models/components/basemodel.ts +0 -54
package/README.md
CHANGED
|
@@ -1,10 +1,57 @@
|
|
|
1
1
|
# Gr4vy Typescript SDK (Beta)
|
|
2
2
|
|
|
3
|
+
Developer-friendly & type-safe Typescript SDK specifically catered to leverage the **Gr4vy** API.
|
|
4
|
+
|
|
5
|
+
|
|
3
6
|
<div align="left">
|
|
4
7
|
<a href="https://www.npmjs.com/package/@gr4vy/sdk"><img alt="NPM Version" src="https://img.shields.io/npm/v/%40gr4vy%2Fsdk?style=for-the-badge" /></a>
|
|
5
8
|
<a href="https://speakeasyapi.dev/"><img src="https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge&logoColor=FBE331&logo=speakeasy&labelColor=545454" /></a>
|
|
6
9
|
</div>
|
|
7
10
|
|
|
11
|
+
## Summary
|
|
12
|
+
|
|
13
|
+
Gr4vy Typescript SDK
|
|
14
|
+
|
|
15
|
+
The official Gr4vy SDK for Typescript provides a convenient way to interact with the Gr4vy API from your server-side application. This SDK allows you to seamlessly integrate Gr4vy's powerful payment orchestration capabilities, including:
|
|
16
|
+
|
|
17
|
+
* Creating Transactions: Initiate and process payments with various payment methods and services.
|
|
18
|
+
* Managing Buyers: Store and manage buyer information securely.
|
|
19
|
+
* Storing Payment Methods: Securely store and tokenize payment methods for future use.
|
|
20
|
+
* Handling Webhooks: Easily process and respond to webhook events from Gr4vy.
|
|
21
|
+
* And much more: Access the full suite of Gr4vy API payment features.
|
|
22
|
+
|
|
23
|
+
This SDK is designed to simplify development, reduce boilerplate code, and help you get up and running with Gr4vy quickly and efficiently. It handles authentication, request signing, and provides easy-to-use methods for most API endpoints.
|
|
24
|
+
|
|
25
|
+
<!-- No Summary [summary] -->
|
|
26
|
+
|
|
27
|
+
<!-- Start Table of Contents [toc] -->
|
|
28
|
+
## Table of Contents
|
|
29
|
+
<!-- $toc-max-depth=2 -->
|
|
30
|
+
* [Gr4vy Typescript SDK (Beta)](#gr4vy-typescript-sdk-beta)
|
|
31
|
+
* [SDK Installation](#sdk-installation)
|
|
32
|
+
* [Requirements](#requirements)
|
|
33
|
+
* [SDK Example Usage](#sdk-example-usage)
|
|
34
|
+
* [Bearer token generation](#bearer-token-generation)
|
|
35
|
+
* [Embed token generation](#embed-token-generation)
|
|
36
|
+
* [Merchant account ID selection](#merchant-account-id-selection)
|
|
37
|
+
* [Webhooks verification](#webhooks-verification)
|
|
38
|
+
* [Available Resources and Operations](#available-resources-and-operations)
|
|
39
|
+
* [Error Handling](#error-handling)
|
|
40
|
+
* [Server Selection](#server-selection)
|
|
41
|
+
* [Custom HTTP Client](#custom-http-client)
|
|
42
|
+
* [Authentication](#authentication)
|
|
43
|
+
* [SDK Installation](#sdk-installation-1)
|
|
44
|
+
* [SDK Example Usage](#sdk-example-usage-1)
|
|
45
|
+
* [Pagination](#pagination)
|
|
46
|
+
* [Retries](#retries)
|
|
47
|
+
* [Standalone functions](#standalone-functions)
|
|
48
|
+
* [Debugging](#debugging)
|
|
49
|
+
* [Development](#development)
|
|
50
|
+
* [Testing](#testing)
|
|
51
|
+
* [Maturity](#maturity)
|
|
52
|
+
* [Contributions](#contributions)
|
|
53
|
+
|
|
54
|
+
<!-- End Table of Contents [toc] -->
|
|
8
55
|
|
|
9
56
|
## SDK Installation
|
|
10
57
|
|
|
@@ -1098,7 +1145,7 @@ You can also enable a default debug logger by setting an environment variable `G
|
|
|
1098
1145
|
|
|
1099
1146
|
## Testing
|
|
1100
1147
|
|
|
1101
|
-
To run the tests, install NPM and run the following.
|
|
1148
|
+
To run the tests, install NPM, ensure to download the `private_key.pem` for the test environment, and run the following.
|
|
1102
1149
|
|
|
1103
1150
|
```sh
|
|
1104
1151
|
npm install
|
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: "1.0.0-beta.
|
|
4030
|
-
genVersion: "2.605.
|
|
4031
|
-
userAgent: "speakeasy-sdk/typescript 1.0.0-beta.
|
|
4029
|
+
sdkVersion: "1.0.0-beta.9",
|
|
4030
|
+
genVersion: "2.605.6",
|
|
4031
|
+
userAgent: "speakeasy-sdk/typescript 1.0.0-beta.9 2.605.6 1.0.0 @gr4vy/sdk"
|
|
4032
4032
|
};
|
|
4033
4033
|
});
|
|
4034
4034
|
|
|
@@ -36385,18 +36385,6 @@ var init_avsresponsecode = __esm(() => {
|
|
|
36385
36385
|
})(AVSResponseCode$ ||= {});
|
|
36386
36386
|
});
|
|
36387
36387
|
|
|
36388
|
-
// src/models/components/basemodel.ts
|
|
36389
|
-
var BaseModel$inboundSchema, BaseModel$outboundSchema, BaseModel$;
|
|
36390
|
-
var init_basemodel = __esm(() => {
|
|
36391
|
-
init_lib();
|
|
36392
|
-
BaseModel$inboundSchema = objectType({});
|
|
36393
|
-
BaseModel$outboundSchema = objectType({});
|
|
36394
|
-
((BaseModel$) => {
|
|
36395
|
-
BaseModel$.inboundSchema = BaseModel$inboundSchema;
|
|
36396
|
-
BaseModel$.outboundSchema = BaseModel$outboundSchema;
|
|
36397
|
-
})(BaseModel$ ||= {});
|
|
36398
|
-
});
|
|
36399
|
-
|
|
36400
36388
|
// src/models/components/taxidkind.ts
|
|
36401
36389
|
var TaxIdKind, TaxIdKind$inboundSchema, TaxIdKind$outboundSchema, TaxIdKind$;
|
|
36402
36390
|
var init_taxidkind = __esm(() => {
|
|
@@ -37299,43 +37287,6 @@ var init_checkoutsession = __esm(() => {
|
|
|
37299
37287
|
})(CheckoutSession$ ||= {});
|
|
37300
37288
|
});
|
|
37301
37289
|
|
|
37302
|
-
// src/models/components/checkoutsessionpaymentmethodcreate.ts
|
|
37303
|
-
var CheckoutSessionPaymentMethodCreate$inboundSchema, CheckoutSessionPaymentMethodCreate$outboundSchema, CheckoutSessionPaymentMethodCreate$;
|
|
37304
|
-
var init_checkoutsessionpaymentmethodcreate = __esm(() => {
|
|
37305
|
-
init_lib();
|
|
37306
|
-
init_primitives();
|
|
37307
|
-
CheckoutSessionPaymentMethodCreate$inboundSchema = objectType({
|
|
37308
|
-
method: literalType("checkout-session").default("checkout-session"),
|
|
37309
|
-
id: stringType(),
|
|
37310
|
-
external_identifier: nullableType(stringType()).optional(),
|
|
37311
|
-
buyer_id: nullableType(stringType()).optional(),
|
|
37312
|
-
buyer_external_identifier: nullableType(stringType()).optional()
|
|
37313
|
-
}).transform((v2) => {
|
|
37314
|
-
return remap(v2, {
|
|
37315
|
-
external_identifier: "externalIdentifier",
|
|
37316
|
-
buyer_id: "buyerId",
|
|
37317
|
-
buyer_external_identifier: "buyerExternalIdentifier"
|
|
37318
|
-
});
|
|
37319
|
-
});
|
|
37320
|
-
CheckoutSessionPaymentMethodCreate$outboundSchema = objectType({
|
|
37321
|
-
method: literalType("checkout-session").default("checkout-session"),
|
|
37322
|
-
id: stringType(),
|
|
37323
|
-
externalIdentifier: nullableType(stringType()).optional(),
|
|
37324
|
-
buyerId: nullableType(stringType()).optional(),
|
|
37325
|
-
buyerExternalIdentifier: nullableType(stringType()).optional()
|
|
37326
|
-
}).transform((v2) => {
|
|
37327
|
-
return remap(v2, {
|
|
37328
|
-
externalIdentifier: "external_identifier",
|
|
37329
|
-
buyerId: "buyer_id",
|
|
37330
|
-
buyerExternalIdentifier: "buyer_external_identifier"
|
|
37331
|
-
});
|
|
37332
|
-
});
|
|
37333
|
-
((CheckoutSessionPaymentMethodCreate$) => {
|
|
37334
|
-
CheckoutSessionPaymentMethodCreate$.inboundSchema = CheckoutSessionPaymentMethodCreate$inboundSchema;
|
|
37335
|
-
CheckoutSessionPaymentMethodCreate$.outboundSchema = CheckoutSessionPaymentMethodCreate$outboundSchema;
|
|
37336
|
-
})(CheckoutSessionPaymentMethodCreate$ ||= {});
|
|
37337
|
-
});
|
|
37338
|
-
|
|
37339
37290
|
// src/models/components/guestbuyerinput.ts
|
|
37340
37291
|
var GuestBuyerInput$inboundSchema, GuestBuyerInput$outboundSchema, GuestBuyerInput$;
|
|
37341
37292
|
var init_guestbuyerinput = __esm(() => {
|
|
@@ -37379,15 +37330,15 @@ var init_guestbuyerinput = __esm(() => {
|
|
|
37379
37330
|
})(GuestBuyerInput$ ||= {});
|
|
37380
37331
|
});
|
|
37381
37332
|
|
|
37382
|
-
// src/models/components/
|
|
37383
|
-
var
|
|
37384
|
-
var
|
|
37333
|
+
// src/models/components/checkoutsessioncreate.ts
|
|
37334
|
+
var CheckoutSessionCreate$inboundSchema, CheckoutSessionCreate$outboundSchema, CheckoutSessionCreate$;
|
|
37335
|
+
var init_checkoutsessioncreate = __esm(() => {
|
|
37385
37336
|
init_lib();
|
|
37386
37337
|
init_primitives();
|
|
37387
37338
|
init_airline();
|
|
37388
37339
|
init_cartitem();
|
|
37389
37340
|
init_guestbuyerinput();
|
|
37390
|
-
|
|
37341
|
+
CheckoutSessionCreate$inboundSchema = objectType({
|
|
37391
37342
|
cart_items: nullableType(arrayType(CartItem$inboundSchema)).optional(),
|
|
37392
37343
|
metadata: nullableType(recordType(stringType())).optional(),
|
|
37393
37344
|
buyer: nullableType(GuestBuyerInput$inboundSchema).optional(),
|
|
@@ -37399,7 +37350,7 @@ var init_checkoutsessionupdate = __esm(() => {
|
|
|
37399
37350
|
expires_in: "expiresIn"
|
|
37400
37351
|
});
|
|
37401
37352
|
});
|
|
37402
|
-
|
|
37353
|
+
CheckoutSessionCreate$outboundSchema = objectType({
|
|
37403
37354
|
cartItems: nullableType(arrayType(CartItem$outboundSchema)).optional(),
|
|
37404
37355
|
metadata: nullableType(recordType(stringType())).optional(),
|
|
37405
37356
|
buyer: nullableType(GuestBuyerInput$outboundSchema).optional(),
|
|
@@ -37411,10 +37362,47 @@ var init_checkoutsessionupdate = __esm(() => {
|
|
|
37411
37362
|
expiresIn: "expires_in"
|
|
37412
37363
|
});
|
|
37413
37364
|
});
|
|
37414
|
-
((
|
|
37415
|
-
|
|
37416
|
-
|
|
37417
|
-
})(
|
|
37365
|
+
((CheckoutSessionCreate$) => {
|
|
37366
|
+
CheckoutSessionCreate$.inboundSchema = CheckoutSessionCreate$inboundSchema;
|
|
37367
|
+
CheckoutSessionCreate$.outboundSchema = CheckoutSessionCreate$outboundSchema;
|
|
37368
|
+
})(CheckoutSessionCreate$ ||= {});
|
|
37369
|
+
});
|
|
37370
|
+
|
|
37371
|
+
// src/models/components/checkoutsessionpaymentmethodcreate.ts
|
|
37372
|
+
var CheckoutSessionPaymentMethodCreate$inboundSchema, CheckoutSessionPaymentMethodCreate$outboundSchema, CheckoutSessionPaymentMethodCreate$;
|
|
37373
|
+
var init_checkoutsessionpaymentmethodcreate = __esm(() => {
|
|
37374
|
+
init_lib();
|
|
37375
|
+
init_primitives();
|
|
37376
|
+
CheckoutSessionPaymentMethodCreate$inboundSchema = objectType({
|
|
37377
|
+
method: literalType("checkout-session").default("checkout-session"),
|
|
37378
|
+
id: stringType(),
|
|
37379
|
+
external_identifier: nullableType(stringType()).optional(),
|
|
37380
|
+
buyer_id: nullableType(stringType()).optional(),
|
|
37381
|
+
buyer_external_identifier: nullableType(stringType()).optional()
|
|
37382
|
+
}).transform((v2) => {
|
|
37383
|
+
return remap(v2, {
|
|
37384
|
+
external_identifier: "externalIdentifier",
|
|
37385
|
+
buyer_id: "buyerId",
|
|
37386
|
+
buyer_external_identifier: "buyerExternalIdentifier"
|
|
37387
|
+
});
|
|
37388
|
+
});
|
|
37389
|
+
CheckoutSessionPaymentMethodCreate$outboundSchema = objectType({
|
|
37390
|
+
method: literalType("checkout-session").default("checkout-session"),
|
|
37391
|
+
id: stringType(),
|
|
37392
|
+
externalIdentifier: nullableType(stringType()).optional(),
|
|
37393
|
+
buyerId: nullableType(stringType()).optional(),
|
|
37394
|
+
buyerExternalIdentifier: nullableType(stringType()).optional()
|
|
37395
|
+
}).transform((v2) => {
|
|
37396
|
+
return remap(v2, {
|
|
37397
|
+
externalIdentifier: "external_identifier",
|
|
37398
|
+
buyerId: "buyer_id",
|
|
37399
|
+
buyerExternalIdentifier: "buyer_external_identifier"
|
|
37400
|
+
});
|
|
37401
|
+
});
|
|
37402
|
+
((CheckoutSessionPaymentMethodCreate$) => {
|
|
37403
|
+
CheckoutSessionPaymentMethodCreate$.inboundSchema = CheckoutSessionPaymentMethodCreate$inboundSchema;
|
|
37404
|
+
CheckoutSessionPaymentMethodCreate$.outboundSchema = CheckoutSessionPaymentMethodCreate$outboundSchema;
|
|
37405
|
+
})(CheckoutSessionPaymentMethodCreate$ ||= {});
|
|
37418
37406
|
});
|
|
37419
37407
|
|
|
37420
37408
|
// src/models/components/checkoutsessionwithurlpaymentmethodcreate.ts
|
|
@@ -43164,7 +43152,6 @@ var init_components = __esm(() => {
|
|
|
43164
43152
|
init_auditlogentryresource();
|
|
43165
43153
|
init_auditlogentryuser();
|
|
43166
43154
|
init_avsresponsecode();
|
|
43167
|
-
init_basemodel();
|
|
43168
43155
|
init_billingdetailsinput();
|
|
43169
43156
|
init_billingdetailsoutput();
|
|
43170
43157
|
init_browserinfo();
|
|
@@ -43179,10 +43166,10 @@ var init_components = __esm(() => {
|
|
|
43179
43166
|
init_cartitem();
|
|
43180
43167
|
init_checkoutcardconnectionoptions();
|
|
43181
43168
|
init_checkoutsession();
|
|
43169
|
+
init_checkoutsessioncreate();
|
|
43182
43170
|
init_checkoutsessionpaymentmethod();
|
|
43183
43171
|
init_checkoutsessionpaymentmethodcreate();
|
|
43184
43172
|
init_checkoutsessionpaymentmethoddetails();
|
|
43185
|
-
init_checkoutsessionupdate();
|
|
43186
43173
|
init_checkoutsessionwithurlpaymentmethodcreate();
|
|
43187
43174
|
init_clicktopayfpanpaymentmethodcreate();
|
|
43188
43175
|
init_clicktopaypaymentmethodcreate();
|
|
@@ -44161,7 +44148,7 @@ var init_createapplepaydigitalwalletsession = __esm(() => {
|
|
|
44161
44148
|
});
|
|
44162
44149
|
|
|
44163
44150
|
// src/models/operations/createcheckoutsession.ts
|
|
44164
|
-
var CreateCheckoutSessionGlobals$inboundSchema, CreateCheckoutSessionGlobals$outboundSchema, CreateCheckoutSessionGlobals$,
|
|
44151
|
+
var CreateCheckoutSessionGlobals$inboundSchema, CreateCheckoutSessionGlobals$outboundSchema, CreateCheckoutSessionGlobals$, CreateCheckoutSessionRequest$inboundSchema, CreateCheckoutSessionRequest$outboundSchema, CreateCheckoutSessionRequest$;
|
|
44165
44152
|
var init_createcheckoutsession = __esm(() => {
|
|
44166
44153
|
init_lib();
|
|
44167
44154
|
init_primitives();
|
|
@@ -44176,42 +44163,24 @@ var init_createcheckoutsession = __esm(() => {
|
|
|
44176
44163
|
CreateCheckoutSessionGlobals$.inboundSchema = CreateCheckoutSessionGlobals$inboundSchema;
|
|
44177
44164
|
CreateCheckoutSessionGlobals$.outboundSchema = CreateCheckoutSessionGlobals$outboundSchema;
|
|
44178
44165
|
})(CreateCheckoutSessionGlobals$ ||= {});
|
|
44179
|
-
CreateCheckoutSessionBody$inboundSchema = unionType([
|
|
44180
|
-
CheckoutSessionUpdate$inboundSchema,
|
|
44181
|
-
arrayType(BaseModel$inboundSchema)
|
|
44182
|
-
]);
|
|
44183
|
-
CreateCheckoutSessionBody$outboundSchema = unionType([
|
|
44184
|
-
CheckoutSessionUpdate$outboundSchema,
|
|
44185
|
-
arrayType(BaseModel$outboundSchema)
|
|
44186
|
-
]);
|
|
44187
|
-
((CreateCheckoutSessionBody$) => {
|
|
44188
|
-
CreateCheckoutSessionBody$.inboundSchema = CreateCheckoutSessionBody$inboundSchema;
|
|
44189
|
-
CreateCheckoutSessionBody$.outboundSchema = CreateCheckoutSessionBody$outboundSchema;
|
|
44190
|
-
})(CreateCheckoutSessionBody$ ||= {});
|
|
44191
44166
|
CreateCheckoutSessionRequest$inboundSchema = objectType({
|
|
44192
44167
|
timeout_in_seconds: numberType().default(1),
|
|
44193
44168
|
merchantAccountId: nullableType(stringType()).optional(),
|
|
44194
|
-
|
|
44195
|
-
CheckoutSessionUpdate$inboundSchema,
|
|
44196
|
-
arrayType(BaseModel$inboundSchema)
|
|
44197
|
-
])).optional()
|
|
44169
|
+
CheckoutSessionCreate: CheckoutSessionCreate$inboundSchema.optional()
|
|
44198
44170
|
}).transform((v2) => {
|
|
44199
44171
|
return remap(v2, {
|
|
44200
44172
|
timeout_in_seconds: "timeoutInSeconds",
|
|
44201
|
-
|
|
44173
|
+
CheckoutSessionCreate: "checkoutSessionCreate"
|
|
44202
44174
|
});
|
|
44203
44175
|
});
|
|
44204
44176
|
CreateCheckoutSessionRequest$outboundSchema = objectType({
|
|
44205
44177
|
timeoutInSeconds: numberType().default(1),
|
|
44206
44178
|
merchantAccountId: nullableType(stringType()).optional(),
|
|
44207
|
-
|
|
44208
|
-
CheckoutSessionUpdate$outboundSchema,
|
|
44209
|
-
arrayType(BaseModel$outboundSchema)
|
|
44210
|
-
])).optional()
|
|
44179
|
+
checkoutSessionCreate: CheckoutSessionCreate$outboundSchema.optional()
|
|
44211
44180
|
}).transform((v2) => {
|
|
44212
44181
|
return remap(v2, {
|
|
44213
44182
|
timeoutInSeconds: "timeout_in_seconds",
|
|
44214
|
-
|
|
44183
|
+
checkoutSessionCreate: "CheckoutSessionCreate"
|
|
44215
44184
|
});
|
|
44216
44185
|
});
|
|
44217
44186
|
((CreateCheckoutSessionRequest$) => {
|
|
@@ -47076,24 +47045,24 @@ var init_updatecheckoutsession = __esm(() => {
|
|
|
47076
47045
|
session_id: stringType(),
|
|
47077
47046
|
timeout_in_seconds: numberType().default(1),
|
|
47078
47047
|
merchantAccountId: nullableType(stringType()).optional(),
|
|
47079
|
-
|
|
47048
|
+
CheckoutSessionCreate: CheckoutSessionCreate$inboundSchema
|
|
47080
47049
|
}).transform((v2) => {
|
|
47081
47050
|
return remap(v2, {
|
|
47082
47051
|
session_id: "sessionId",
|
|
47083
47052
|
timeout_in_seconds: "timeoutInSeconds",
|
|
47084
|
-
|
|
47053
|
+
CheckoutSessionCreate: "checkoutSessionCreate"
|
|
47085
47054
|
});
|
|
47086
47055
|
});
|
|
47087
47056
|
UpdateCheckoutSessionRequest$outboundSchema = objectType({
|
|
47088
47057
|
sessionId: stringType(),
|
|
47089
47058
|
timeoutInSeconds: numberType().default(1),
|
|
47090
47059
|
merchantAccountId: nullableType(stringType()).optional(),
|
|
47091
|
-
|
|
47060
|
+
checkoutSessionCreate: CheckoutSessionCreate$outboundSchema
|
|
47092
47061
|
}).transform((v2) => {
|
|
47093
47062
|
return remap(v2, {
|
|
47094
47063
|
sessionId: "session_id",
|
|
47095
47064
|
timeoutInSeconds: "timeout_in_seconds",
|
|
47096
|
-
|
|
47065
|
+
checkoutSessionCreate: "CheckoutSessionCreate"
|
|
47097
47066
|
});
|
|
47098
47067
|
});
|
|
47099
47068
|
((UpdateCheckoutSessionRequest$) => {
|
|
@@ -49511,12 +49480,12 @@ Fetch a list of the definitions of each card scheme.`,
|
|
|
49511
49480
|
});
|
|
49512
49481
|
|
|
49513
49482
|
// src/funcs/checkoutSessionsCreate.ts
|
|
49514
|
-
function checkoutSessionsCreate(client,
|
|
49515
|
-
return new APIPromise($do16(client,
|
|
49483
|
+
function checkoutSessionsCreate(client, checkoutSessionCreate, timeoutInSeconds, merchantAccountId, options) {
|
|
49484
|
+
return new APIPromise($do16(client, checkoutSessionCreate, timeoutInSeconds, merchantAccountId, options));
|
|
49516
49485
|
}
|
|
49517
|
-
async function $do16(client,
|
|
49486
|
+
async function $do16(client, checkoutSessionCreate, timeoutInSeconds, merchantAccountId, options) {
|
|
49518
49487
|
const input = {
|
|
49519
|
-
|
|
49488
|
+
checkoutSessionCreate,
|
|
49520
49489
|
timeoutInSeconds,
|
|
49521
49490
|
merchantAccountId
|
|
49522
49491
|
};
|
|
@@ -49525,7 +49494,9 @@ async function $do16(client, requestBody, timeoutInSeconds, merchantAccountId, o
|
|
|
49525
49494
|
return [parsed, { status: "invalid" }];
|
|
49526
49495
|
}
|
|
49527
49496
|
const payload = parsed.value;
|
|
49528
|
-
const body = encodeJSON("body", payload?.
|
|
49497
|
+
const body = encodeJSON("body", payload?.CheckoutSessionCreate, {
|
|
49498
|
+
explode: true
|
|
49499
|
+
});
|
|
49529
49500
|
const path = pathToFunc("/checkout/sessions")();
|
|
49530
49501
|
const query = encodeFormQuery({
|
|
49531
49502
|
timeout_in_seconds: payload?.timeout_in_seconds
|
|
@@ -49613,10 +49584,10 @@ var args16, tool$checkoutSessionsCreate;
|
|
|
49613
49584
|
var init_checkoutSessionsCreate2 = __esm(() => {
|
|
49614
49585
|
init_lib();
|
|
49615
49586
|
init_checkoutSessionsCreate();
|
|
49616
|
-
|
|
49587
|
+
init_components();
|
|
49617
49588
|
init_tools();
|
|
49618
49589
|
args16 = {
|
|
49619
|
-
|
|
49590
|
+
checkoutSessionCreate: CheckoutSessionCreate$inboundSchema.optional(),
|
|
49620
49591
|
timeoutInSeconds: numberType().default(1),
|
|
49621
49592
|
merchantAccountId: nullableType(stringType()).optional()
|
|
49622
49593
|
};
|
|
@@ -49627,7 +49598,7 @@ var init_checkoutSessionsCreate2 = __esm(() => {
|
|
|
49627
49598
|
Create a new checkout session.`,
|
|
49628
49599
|
args: args16,
|
|
49629
49600
|
tool: async (client, args17, ctx) => {
|
|
49630
|
-
const [result, apiCall] = await checkoutSessionsCreate(client, args17.
|
|
49601
|
+
const [result, apiCall] = await checkoutSessionsCreate(client, args17.checkoutSessionCreate, args17.timeoutInSeconds, args17.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
49631
49602
|
if (!result.ok) {
|
|
49632
49603
|
return {
|
|
49633
49604
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -49917,12 +49888,12 @@ Retrieve the information stored on a checkout session.`,
|
|
|
49917
49888
|
});
|
|
49918
49889
|
|
|
49919
49890
|
// src/funcs/checkoutSessionsUpdate.ts
|
|
49920
|
-
function checkoutSessionsUpdate(client,
|
|
49921
|
-
return new APIPromise($do19(client,
|
|
49891
|
+
function checkoutSessionsUpdate(client, checkoutSessionCreate, sessionId, timeoutInSeconds, merchantAccountId, options) {
|
|
49892
|
+
return new APIPromise($do19(client, checkoutSessionCreate, sessionId, timeoutInSeconds, merchantAccountId, options));
|
|
49922
49893
|
}
|
|
49923
|
-
async function $do19(client,
|
|
49894
|
+
async function $do19(client, checkoutSessionCreate, sessionId, timeoutInSeconds, merchantAccountId, options) {
|
|
49924
49895
|
const input = {
|
|
49925
|
-
|
|
49896
|
+
checkoutSessionCreate,
|
|
49926
49897
|
sessionId,
|
|
49927
49898
|
timeoutInSeconds,
|
|
49928
49899
|
merchantAccountId
|
|
@@ -49932,7 +49903,7 @@ async function $do19(client, checkoutSessionUpdate, sessionId, timeoutInSeconds,
|
|
|
49932
49903
|
return [parsed, { status: "invalid" }];
|
|
49933
49904
|
}
|
|
49934
49905
|
const payload = parsed.value;
|
|
49935
|
-
const body = encodeJSON("body", payload.
|
|
49906
|
+
const body = encodeJSON("body", payload.CheckoutSessionCreate, {
|
|
49936
49907
|
explode: true
|
|
49937
49908
|
});
|
|
49938
49909
|
const pathParams = {
|
|
@@ -50031,7 +50002,7 @@ var init_checkoutSessionsUpdate2 = __esm(() => {
|
|
|
50031
50002
|
init_components();
|
|
50032
50003
|
init_tools();
|
|
50033
50004
|
args19 = {
|
|
50034
|
-
|
|
50005
|
+
checkoutSessionCreate: CheckoutSessionCreate$inboundSchema,
|
|
50035
50006
|
sessionId: stringType(),
|
|
50036
50007
|
timeoutInSeconds: numberType().default(1),
|
|
50037
50008
|
merchantAccountId: nullableType(stringType()).optional()
|
|
@@ -50043,7 +50014,7 @@ var init_checkoutSessionsUpdate2 = __esm(() => {
|
|
|
50043
50014
|
Update the information stored on a checkout session.`,
|
|
50044
50015
|
args: args19,
|
|
50045
50016
|
tool: async (client, args20, ctx) => {
|
|
50046
|
-
const [result, apiCall] = await checkoutSessionsUpdate(client, args20.
|
|
50017
|
+
const [result, apiCall] = await checkoutSessionsUpdate(client, args20.checkoutSessionCreate, args20.sessionId, args20.timeoutInSeconds, args20.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
50047
50018
|
if (!result.ok) {
|
|
50048
50019
|
return {
|
|
50049
50020
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -57950,7 +57921,7 @@ Void a previously authorized transaction.`,
|
|
|
57950
57921
|
function createMCPServer(deps) {
|
|
57951
57922
|
const server = new McpServer({
|
|
57952
57923
|
name: "Gr4vy",
|
|
57953
|
-
version: "1.0.0-beta.
|
|
57924
|
+
version: "1.0.0-beta.9"
|
|
57954
57925
|
});
|
|
57955
57926
|
const client = new Gr4vyCore({
|
|
57956
57927
|
bearerAuth: deps.bearerAuth,
|
|
@@ -59336,7 +59307,7 @@ var routes = an({
|
|
|
59336
59307
|
var app = He(routes, {
|
|
59337
59308
|
name: "mcp",
|
|
59338
59309
|
versionInfo: {
|
|
59339
|
-
currentVersion: "1.0.0-beta.
|
|
59310
|
+
currentVersion: "1.0.0-beta.9"
|
|
59340
59311
|
}
|
|
59341
59312
|
});
|
|
59342
59313
|
zt(app, process3.argv.slice(2), buildContext(process3));
|
|
@@ -59344,5 +59315,5 @@ export {
|
|
|
59344
59315
|
app
|
|
59345
59316
|
};
|
|
59346
59317
|
|
|
59347
|
-
//# debugId=
|
|
59318
|
+
//# debugId=F198218B002EF47D64756E2164756E21
|
|
59348
59319
|
//# sourceMappingURL=mcp-server.js.map
|