@gr4vy/sdk 0.18.13 → 0.18.15
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 +11 -0
- package/bin/mcp-server.js +1776 -630
- package/bin/mcp-server.js.map +29 -9
- package/docs/sdks/merchantaccounts/README.md +454 -0
- package/funcs/merchantAccountsCreate.d.ts +17 -0
- package/funcs/merchantAccountsCreate.d.ts.map +1 -0
- package/funcs/merchantAccountsCreate.js +133 -0
- package/funcs/merchantAccountsCreate.js.map +1 -0
- package/funcs/merchantAccountsGet.d.ts +17 -0
- package/funcs/merchantAccountsGet.d.ts.map +1 -0
- package/funcs/merchantAccountsGet.js +137 -0
- package/funcs/merchantAccountsGet.js.map +1 -0
- package/funcs/merchantAccountsList.d.ts +20 -0
- package/funcs/merchantAccountsList.d.ts.map +1 -0
- package/funcs/merchantAccountsList.js +162 -0
- package/funcs/merchantAccountsList.js.map +1 -0
- package/funcs/merchantAccountsUpdate.d.ts +17 -0
- package/funcs/merchantAccountsUpdate.d.ts.map +1 -0
- package/funcs/merchantAccountsUpdate.js +137 -0
- package/funcs/merchantAccountsUpdate.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/lib/config.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +9 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/merchantAccountsCreate.d.ts +10 -0
- package/mcp-server/tools/merchantAccountsCreate.d.ts.map +1 -0
- package/mcp-server/tools/merchantAccountsCreate.js +56 -0
- package/mcp-server/tools/merchantAccountsCreate.js.map +1 -0
- package/mcp-server/tools/merchantAccountsGet.d.ts +8 -0
- package/mcp-server/tools/merchantAccountsGet.d.ts.map +1 -0
- package/mcp-server/tools/merchantAccountsGet.js +54 -0
- package/mcp-server/tools/merchantAccountsGet.js.map +1 -0
- package/mcp-server/tools/merchantAccountsList.d.ts +10 -0
- package/mcp-server/tools/merchantAccountsList.d.ts.map +1 -0
- package/mcp-server/tools/merchantAccountsList.js +56 -0
- package/mcp-server/tools/merchantAccountsList.js.map +1 -0
- package/mcp-server/tools/merchantAccountsUpdate.d.ts +11 -0
- package/mcp-server/tools/merchantAccountsUpdate.d.ts.map +1 -0
- package/mcp-server/tools/merchantAccountsUpdate.js +57 -0
- package/mcp-server/tools/merchantAccountsUpdate.js.map +1 -0
- package/models/components/collectionmerchantaccount.d.ts +48 -0
- package/models/components/collectionmerchantaccount.d.ts.map +1 -0
- package/models/components/collectionmerchantaccount.js +77 -0
- package/models/components/collectionmerchantaccount.js.map +1 -0
- package/models/components/index.d.ts +4 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +4 -0
- package/models/components/index.js.map +1 -1
- package/models/components/merchantaccount.d.ts +148 -0
- package/models/components/merchantaccount.d.ts.map +1 -0
- package/models/components/merchantaccount.js +159 -0
- package/models/components/merchantaccount.js.map +1 -0
- package/models/components/merchantaccountcreate.d.ts +133 -0
- package/models/components/merchantaccountcreate.d.ts.map +1 -0
- package/models/components/merchantaccountcreate.js +149 -0
- package/models/components/merchantaccountcreate.js.map +1 -0
- package/models/components/merchantaccountupdate.d.ts +128 -0
- package/models/components/merchantaccountupdate.d.ts.map +1 -0
- package/models/components/merchantaccountupdate.js +147 -0
- package/models/components/merchantaccountupdate.js.map +1 -0
- package/models/errors/createmerchantaccount.d.ts +31 -0
- package/models/errors/createmerchantaccount.d.ts.map +1 -0
- package/models/errors/createmerchantaccount.js +66 -0
- package/models/errors/createmerchantaccount.js.map +1 -0
- package/models/errors/getmerchantaccount.d.ts +31 -0
- package/models/errors/getmerchantaccount.d.ts.map +1 -0
- package/models/errors/getmerchantaccount.js +66 -0
- package/models/errors/getmerchantaccount.js.map +1 -0
- package/models/errors/index.d.ts +4 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +4 -0
- package/models/errors/index.js.map +1 -1
- package/models/errors/listmerchantaccounts.d.ts +31 -0
- package/models/errors/listmerchantaccounts.d.ts.map +1 -0
- package/models/errors/listmerchantaccounts.js +66 -0
- package/models/errors/listmerchantaccounts.js.map +1 -0
- package/models/errors/updatemerchantaccount.d.ts +31 -0
- package/models/errors/updatemerchantaccount.d.ts.map +1 -0
- package/models/errors/updatemerchantaccount.js +66 -0
- package/models/errors/updatemerchantaccount.js.map +1 -0
- package/models/operations/createmerchantaccount.d.ts +32 -0
- package/models/operations/createmerchantaccount.d.ts.map +1 -0
- package/models/operations/createmerchantaccount.js +73 -0
- package/models/operations/createmerchantaccount.js.map +1 -0
- package/models/operations/getmerchantaccount.d.ts +29 -0
- package/models/operations/getmerchantaccount.d.ts.map +1 -0
- package/models/operations/getmerchantaccount.js +68 -0
- package/models/operations/getmerchantaccount.js.map +1 -0
- package/models/operations/index.d.ts +4 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +4 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listmerchantaccounts.d.ts +59 -0
- package/models/operations/listmerchantaccounts.d.ts.map +1 -0
- package/models/operations/listmerchantaccounts.js +100 -0
- package/models/operations/listmerchantaccounts.js.map +1 -0
- package/models/operations/updatemerchantaccount.d.ts +34 -0
- package/models/operations/updatemerchantaccount.d.ts.map +1 -0
- package/models/operations/updatemerchantaccount.js +77 -0
- package/models/operations/updatemerchantaccount.js.map +1 -0
- package/package.json +1 -1
- package/sdk/merchantaccounts.d.ts +37 -0
- package/sdk/merchantaccounts.d.ts.map +1 -0
- package/sdk/merchantaccounts.js +53 -0
- package/sdk/merchantaccounts.js.map +1 -0
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/src/funcs/merchantAccountsCreate.ts +243 -0
- package/src/funcs/merchantAccountsGet.ts +249 -0
- package/src/funcs/merchantAccountsList.ts +326 -0
- package/src/funcs/merchantAccountsUpdate.ts +257 -0
- package/src/lib/config.ts +4 -4
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +9 -1
- package/src/mcp-server/tools/merchantAccountsCreate.ts +40 -0
- package/src/mcp-server/tools/merchantAccountsGet.ts +37 -0
- package/src/mcp-server/tools/merchantAccountsList.ts +41 -0
- package/src/mcp-server/tools/merchantAccountsUpdate.ts +42 -0
- package/src/models/components/collectionmerchantaccount.ts +107 -0
- package/src/models/components/index.ts +4 -0
- package/src/models/components/merchantaccount.ts +296 -0
- package/src/models/components/merchantaccountcreate.ts +273 -0
- package/src/models/components/merchantaccountupdate.ts +266 -0
- package/src/models/errors/createmerchantaccount.ts +107 -0
- package/src/models/errors/getmerchantaccount.ts +107 -0
- package/src/models/errors/index.ts +4 -0
- package/src/models/errors/listmerchantaccounts.ts +107 -0
- package/src/models/errors/updatemerchantaccount.ts +107 -0
- package/src/models/operations/createmerchantaccount.ts +84 -0
- package/src/models/operations/getmerchantaccount.ts +75 -0
- package/src/models/operations/index.ts +4 -0
- package/src/models/operations/listmerchantaccounts.ts +146 -0
- package/src/models/operations/updatemerchantaccount.ts +90 -0
- package/src/sdk/merchantaccounts.ts +95 -0
- package/src/sdk/sdk.ts +6 -0
package/bin/mcp-server.js
CHANGED
|
@@ -4020,15 +4020,15 @@ var ServerProduction = "production", ServerSandbox = "sandbox", ServerList, SDK_
|
|
|
4020
4020
|
var init_config = __esm(() => {
|
|
4021
4021
|
init_url();
|
|
4022
4022
|
ServerList = {
|
|
4023
|
-
[ServerProduction]: "https://api.
|
|
4023
|
+
[ServerProduction]: "https://api.example.gr4vy.app",
|
|
4024
4024
|
[ServerSandbox]: "https://api.sandbox.{id}.gr4vy.app"
|
|
4025
4025
|
};
|
|
4026
4026
|
SDK_METADATA = {
|
|
4027
4027
|
language: "typescript",
|
|
4028
4028
|
openapiDocVersion: "1.0.0",
|
|
4029
|
-
sdkVersion: "0.18.
|
|
4030
|
-
genVersion: "2.593.
|
|
4031
|
-
userAgent: "speakeasy-sdk/typescript 0.18.
|
|
4029
|
+
sdkVersion: "0.18.15",
|
|
4030
|
+
genVersion: "2.593.4",
|
|
4031
|
+
userAgent: "speakeasy-sdk/typescript 0.18.15 2.593.4 1.0.0 @gr4vy/sdk"
|
|
4032
4032
|
};
|
|
4033
4033
|
});
|
|
4034
4034
|
|
|
@@ -37799,6 +37799,154 @@ var init_collectiongiftcard = __esm(() => {
|
|
|
37799
37799
|
})(CollectionGiftCard$ ||= {});
|
|
37800
37800
|
});
|
|
37801
37801
|
|
|
37802
|
+
// src/models/components/merchantaccount.ts
|
|
37803
|
+
var MerchantAccount$inboundSchema, MerchantAccount$outboundSchema, MerchantAccount$;
|
|
37804
|
+
var init_merchantaccount = __esm(() => {
|
|
37805
|
+
init_lib();
|
|
37806
|
+
init_primitives();
|
|
37807
|
+
init_cardscheme();
|
|
37808
|
+
MerchantAccount$inboundSchema = objectType({
|
|
37809
|
+
type: literalType("merchant-account").default("merchant-account"),
|
|
37810
|
+
id: stringType(),
|
|
37811
|
+
display_name: stringType(),
|
|
37812
|
+
outbound_webhook_url: nullableType(stringType()).optional(),
|
|
37813
|
+
outbound_webhook_username: nullableType(stringType()).optional(),
|
|
37814
|
+
outbound_webhook_password: nullableType(stringType()).optional(),
|
|
37815
|
+
loon_client_key: nullableType(stringType()).optional(),
|
|
37816
|
+
loon_secret_key: nullableType(stringType()).optional(),
|
|
37817
|
+
loon_accepted_schemes: nullableType(arrayType(CardScheme$inboundSchema)).optional(),
|
|
37818
|
+
account_updater_request_encryption_key: nullableType(stringType()).optional(),
|
|
37819
|
+
account_updater_request_encryption_key_id: nullableType(stringType()).optional(),
|
|
37820
|
+
account_updater_response_decryption_key: nullableType(stringType()).optional(),
|
|
37821
|
+
account_updater_response_decryption_key_id: nullableType(stringType()).optional(),
|
|
37822
|
+
account_updater_enabled: booleanType(),
|
|
37823
|
+
over_capture_amount: nullableType(numberType().int()).optional(),
|
|
37824
|
+
over_capture_percentage: nullableType(numberType().int()).optional(),
|
|
37825
|
+
visa_network_tokens_requestor_id: nullableType(stringType()).optional(),
|
|
37826
|
+
visa_network_tokens_app_id: nullableType(stringType()).optional(),
|
|
37827
|
+
amex_network_tokens_requestor_id: nullableType(stringType()).optional(),
|
|
37828
|
+
amex_network_tokens_app_id: nullableType(stringType()).optional(),
|
|
37829
|
+
mastercard_network_tokens_requestor_id: nullableType(stringType()).optional(),
|
|
37830
|
+
mastercard_network_tokens_app_id: nullableType(stringType()).optional(),
|
|
37831
|
+
created_at: stringType().datetime({ offset: true }).transform((v2) => new Date(v2)),
|
|
37832
|
+
updated_at: stringType().datetime({ offset: true }).transform((v2) => new Date(v2))
|
|
37833
|
+
}).transform((v2) => {
|
|
37834
|
+
return remap(v2, {
|
|
37835
|
+
display_name: "displayName",
|
|
37836
|
+
outbound_webhook_url: "outboundWebhookUrl",
|
|
37837
|
+
outbound_webhook_username: "outboundWebhookUsername",
|
|
37838
|
+
outbound_webhook_password: "outboundWebhookPassword",
|
|
37839
|
+
loon_client_key: "loonClientKey",
|
|
37840
|
+
loon_secret_key: "loonSecretKey",
|
|
37841
|
+
loon_accepted_schemes: "loonAcceptedSchemes",
|
|
37842
|
+
account_updater_request_encryption_key: "accountUpdaterRequestEncryptionKey",
|
|
37843
|
+
account_updater_request_encryption_key_id: "accountUpdaterRequestEncryptionKeyId",
|
|
37844
|
+
account_updater_response_decryption_key: "accountUpdaterResponseDecryptionKey",
|
|
37845
|
+
account_updater_response_decryption_key_id: "accountUpdaterResponseDecryptionKeyId",
|
|
37846
|
+
account_updater_enabled: "accountUpdaterEnabled",
|
|
37847
|
+
over_capture_amount: "overCaptureAmount",
|
|
37848
|
+
over_capture_percentage: "overCapturePercentage",
|
|
37849
|
+
visa_network_tokens_requestor_id: "visaNetworkTokensRequestorId",
|
|
37850
|
+
visa_network_tokens_app_id: "visaNetworkTokensAppId",
|
|
37851
|
+
amex_network_tokens_requestor_id: "amexNetworkTokensRequestorId",
|
|
37852
|
+
amex_network_tokens_app_id: "amexNetworkTokensAppId",
|
|
37853
|
+
mastercard_network_tokens_requestor_id: "mastercardNetworkTokensRequestorId",
|
|
37854
|
+
mastercard_network_tokens_app_id: "mastercardNetworkTokensAppId",
|
|
37855
|
+
created_at: "createdAt",
|
|
37856
|
+
updated_at: "updatedAt"
|
|
37857
|
+
});
|
|
37858
|
+
});
|
|
37859
|
+
MerchantAccount$outboundSchema = objectType({
|
|
37860
|
+
type: literalType("merchant-account").default("merchant-account"),
|
|
37861
|
+
id: stringType(),
|
|
37862
|
+
displayName: stringType(),
|
|
37863
|
+
outboundWebhookUrl: nullableType(stringType()).optional(),
|
|
37864
|
+
outboundWebhookUsername: nullableType(stringType()).optional(),
|
|
37865
|
+
outboundWebhookPassword: nullableType(stringType()).optional(),
|
|
37866
|
+
loonClientKey: nullableType(stringType()).optional(),
|
|
37867
|
+
loonSecretKey: nullableType(stringType()).optional(),
|
|
37868
|
+
loonAcceptedSchemes: nullableType(arrayType(CardScheme$outboundSchema)).optional(),
|
|
37869
|
+
accountUpdaterRequestEncryptionKey: nullableType(stringType()).optional(),
|
|
37870
|
+
accountUpdaterRequestEncryptionKeyId: nullableType(stringType()).optional(),
|
|
37871
|
+
accountUpdaterResponseDecryptionKey: nullableType(stringType()).optional(),
|
|
37872
|
+
accountUpdaterResponseDecryptionKeyId: nullableType(stringType()).optional(),
|
|
37873
|
+
accountUpdaterEnabled: booleanType(),
|
|
37874
|
+
overCaptureAmount: nullableType(numberType().int()).optional(),
|
|
37875
|
+
overCapturePercentage: nullableType(numberType().int()).optional(),
|
|
37876
|
+
visaNetworkTokensRequestorId: nullableType(stringType()).optional(),
|
|
37877
|
+
visaNetworkTokensAppId: nullableType(stringType()).optional(),
|
|
37878
|
+
amexNetworkTokensRequestorId: nullableType(stringType()).optional(),
|
|
37879
|
+
amexNetworkTokensAppId: nullableType(stringType()).optional(),
|
|
37880
|
+
mastercardNetworkTokensRequestorId: nullableType(stringType()).optional(),
|
|
37881
|
+
mastercardNetworkTokensAppId: nullableType(stringType()).optional(),
|
|
37882
|
+
createdAt: dateType().transform((v2) => v2.toISOString()),
|
|
37883
|
+
updatedAt: dateType().transform((v2) => v2.toISOString())
|
|
37884
|
+
}).transform((v2) => {
|
|
37885
|
+
return remap(v2, {
|
|
37886
|
+
displayName: "display_name",
|
|
37887
|
+
outboundWebhookUrl: "outbound_webhook_url",
|
|
37888
|
+
outboundWebhookUsername: "outbound_webhook_username",
|
|
37889
|
+
outboundWebhookPassword: "outbound_webhook_password",
|
|
37890
|
+
loonClientKey: "loon_client_key",
|
|
37891
|
+
loonSecretKey: "loon_secret_key",
|
|
37892
|
+
loonAcceptedSchemes: "loon_accepted_schemes",
|
|
37893
|
+
accountUpdaterRequestEncryptionKey: "account_updater_request_encryption_key",
|
|
37894
|
+
accountUpdaterRequestEncryptionKeyId: "account_updater_request_encryption_key_id",
|
|
37895
|
+
accountUpdaterResponseDecryptionKey: "account_updater_response_decryption_key",
|
|
37896
|
+
accountUpdaterResponseDecryptionKeyId: "account_updater_response_decryption_key_id",
|
|
37897
|
+
accountUpdaterEnabled: "account_updater_enabled",
|
|
37898
|
+
overCaptureAmount: "over_capture_amount",
|
|
37899
|
+
overCapturePercentage: "over_capture_percentage",
|
|
37900
|
+
visaNetworkTokensRequestorId: "visa_network_tokens_requestor_id",
|
|
37901
|
+
visaNetworkTokensAppId: "visa_network_tokens_app_id",
|
|
37902
|
+
amexNetworkTokensRequestorId: "amex_network_tokens_requestor_id",
|
|
37903
|
+
amexNetworkTokensAppId: "amex_network_tokens_app_id",
|
|
37904
|
+
mastercardNetworkTokensRequestorId: "mastercard_network_tokens_requestor_id",
|
|
37905
|
+
mastercardNetworkTokensAppId: "mastercard_network_tokens_app_id",
|
|
37906
|
+
createdAt: "created_at",
|
|
37907
|
+
updatedAt: "updated_at"
|
|
37908
|
+
});
|
|
37909
|
+
});
|
|
37910
|
+
((MerchantAccount$) => {
|
|
37911
|
+
MerchantAccount$.inboundSchema = MerchantAccount$inboundSchema;
|
|
37912
|
+
MerchantAccount$.outboundSchema = MerchantAccount$outboundSchema;
|
|
37913
|
+
})(MerchantAccount$ ||= {});
|
|
37914
|
+
});
|
|
37915
|
+
|
|
37916
|
+
// src/models/components/collectionmerchantaccount.ts
|
|
37917
|
+
var CollectionMerchantAccount$inboundSchema, CollectionMerchantAccount$outboundSchema, CollectionMerchantAccount$;
|
|
37918
|
+
var init_collectionmerchantaccount = __esm(() => {
|
|
37919
|
+
init_lib();
|
|
37920
|
+
init_primitives();
|
|
37921
|
+
init_merchantaccount();
|
|
37922
|
+
CollectionMerchantAccount$inboundSchema = objectType({
|
|
37923
|
+
items: arrayType(MerchantAccount$inboundSchema),
|
|
37924
|
+
limit: numberType().int().default(20),
|
|
37925
|
+
next_cursor: nullableType(stringType()).optional(),
|
|
37926
|
+
previous_cursor: nullableType(stringType()).optional()
|
|
37927
|
+
}).transform((v2) => {
|
|
37928
|
+
return remap(v2, {
|
|
37929
|
+
next_cursor: "nextCursor",
|
|
37930
|
+
previous_cursor: "previousCursor"
|
|
37931
|
+
});
|
|
37932
|
+
});
|
|
37933
|
+
CollectionMerchantAccount$outboundSchema = objectType({
|
|
37934
|
+
items: arrayType(MerchantAccount$outboundSchema),
|
|
37935
|
+
limit: numberType().int().default(20),
|
|
37936
|
+
nextCursor: nullableType(stringType()).optional(),
|
|
37937
|
+
previousCursor: nullableType(stringType()).optional()
|
|
37938
|
+
}).transform((v2) => {
|
|
37939
|
+
return remap(v2, {
|
|
37940
|
+
nextCursor: "next_cursor",
|
|
37941
|
+
previousCursor: "previous_cursor"
|
|
37942
|
+
});
|
|
37943
|
+
});
|
|
37944
|
+
((CollectionMerchantAccount$) => {
|
|
37945
|
+
CollectionMerchantAccount$.inboundSchema = CollectionMerchantAccount$inboundSchema;
|
|
37946
|
+
CollectionMerchantAccount$.outboundSchema = CollectionMerchantAccount$outboundSchema;
|
|
37947
|
+
})(CollectionMerchantAccount$ ||= {});
|
|
37948
|
+
});
|
|
37949
|
+
|
|
37802
37950
|
// src/models/components/collectionnocursorcardschemedefinition.ts
|
|
37803
37951
|
var CollectionNoCursorCardSchemeDefinition$inboundSchema, CollectionNoCursorCardSchemeDefinition$outboundSchema, CollectionNoCursorCardSchemeDefinition$;
|
|
37804
37952
|
var init_collectionnocursorcardschemedefinition = __esm(() => {
|
|
@@ -40452,6 +40600,212 @@ var init_googlepaysessionrequest = __esm(() => {
|
|
|
40452
40600
|
})(GooglePaySessionRequest$ ||= {});
|
|
40453
40601
|
});
|
|
40454
40602
|
|
|
40603
|
+
// src/models/components/merchantaccountcreate.ts
|
|
40604
|
+
var MerchantAccountCreate$inboundSchema, MerchantAccountCreate$outboundSchema, MerchantAccountCreate$;
|
|
40605
|
+
var init_merchantaccountcreate = __esm(() => {
|
|
40606
|
+
init_lib();
|
|
40607
|
+
init_primitives();
|
|
40608
|
+
init_cardscheme();
|
|
40609
|
+
MerchantAccountCreate$inboundSchema = objectType({
|
|
40610
|
+
account_updater_enabled: booleanType().default(false),
|
|
40611
|
+
account_updater_request_encryption_key: nullableType(stringType()).optional(),
|
|
40612
|
+
account_updater_request_encryption_key_id: nullableType(stringType()).optional(),
|
|
40613
|
+
account_updater_response_decryption_key: nullableType(stringType()).optional(),
|
|
40614
|
+
account_updater_response_decryption_key_id: nullableType(stringType()).optional(),
|
|
40615
|
+
over_capture_amount: nullableType(numberType().int()).optional(),
|
|
40616
|
+
over_capture_percentage: nullableType(numberType().int()).optional(),
|
|
40617
|
+
loon_client_key: nullableType(stringType()).optional(),
|
|
40618
|
+
loon_secret_key: nullableType(stringType()).optional(),
|
|
40619
|
+
loon_accepted_schemes: nullableType(arrayType(CardScheme$inboundSchema)).optional(),
|
|
40620
|
+
visa_network_tokens_requestor_id: nullableType(stringType()).optional(),
|
|
40621
|
+
visa_network_tokens_app_id: nullableType(stringType()).optional(),
|
|
40622
|
+
amex_network_tokens_requestor_id: nullableType(stringType()).optional(),
|
|
40623
|
+
amex_network_tokens_app_id: nullableType(stringType()).optional(),
|
|
40624
|
+
mastercard_network_tokens_requestor_id: nullableType(stringType()).optional(),
|
|
40625
|
+
mastercard_network_tokens_app_id: nullableType(stringType()).optional(),
|
|
40626
|
+
outbound_webhook_url: nullableType(stringType()).optional(),
|
|
40627
|
+
outbound_webhook_username: nullableType(stringType()).optional(),
|
|
40628
|
+
outbound_webhook_password: nullableType(stringType()).optional(),
|
|
40629
|
+
id: stringType(),
|
|
40630
|
+
display_name: stringType()
|
|
40631
|
+
}).transform((v2) => {
|
|
40632
|
+
return remap(v2, {
|
|
40633
|
+
account_updater_enabled: "accountUpdaterEnabled",
|
|
40634
|
+
account_updater_request_encryption_key: "accountUpdaterRequestEncryptionKey",
|
|
40635
|
+
account_updater_request_encryption_key_id: "accountUpdaterRequestEncryptionKeyId",
|
|
40636
|
+
account_updater_response_decryption_key: "accountUpdaterResponseDecryptionKey",
|
|
40637
|
+
account_updater_response_decryption_key_id: "accountUpdaterResponseDecryptionKeyId",
|
|
40638
|
+
over_capture_amount: "overCaptureAmount",
|
|
40639
|
+
over_capture_percentage: "overCapturePercentage",
|
|
40640
|
+
loon_client_key: "loonClientKey",
|
|
40641
|
+
loon_secret_key: "loonSecretKey",
|
|
40642
|
+
loon_accepted_schemes: "loonAcceptedSchemes",
|
|
40643
|
+
visa_network_tokens_requestor_id: "visaNetworkTokensRequestorId",
|
|
40644
|
+
visa_network_tokens_app_id: "visaNetworkTokensAppId",
|
|
40645
|
+
amex_network_tokens_requestor_id: "amexNetworkTokensRequestorId",
|
|
40646
|
+
amex_network_tokens_app_id: "amexNetworkTokensAppId",
|
|
40647
|
+
mastercard_network_tokens_requestor_id: "mastercardNetworkTokensRequestorId",
|
|
40648
|
+
mastercard_network_tokens_app_id: "mastercardNetworkTokensAppId",
|
|
40649
|
+
outbound_webhook_url: "outboundWebhookUrl",
|
|
40650
|
+
outbound_webhook_username: "outboundWebhookUsername",
|
|
40651
|
+
outbound_webhook_password: "outboundWebhookPassword",
|
|
40652
|
+
display_name: "displayName"
|
|
40653
|
+
});
|
|
40654
|
+
});
|
|
40655
|
+
MerchantAccountCreate$outboundSchema = objectType({
|
|
40656
|
+
accountUpdaterEnabled: booleanType().default(false),
|
|
40657
|
+
accountUpdaterRequestEncryptionKey: nullableType(stringType()).optional(),
|
|
40658
|
+
accountUpdaterRequestEncryptionKeyId: nullableType(stringType()).optional(),
|
|
40659
|
+
accountUpdaterResponseDecryptionKey: nullableType(stringType()).optional(),
|
|
40660
|
+
accountUpdaterResponseDecryptionKeyId: nullableType(stringType()).optional(),
|
|
40661
|
+
overCaptureAmount: nullableType(numberType().int()).optional(),
|
|
40662
|
+
overCapturePercentage: nullableType(numberType().int()).optional(),
|
|
40663
|
+
loonClientKey: nullableType(stringType()).optional(),
|
|
40664
|
+
loonSecretKey: nullableType(stringType()).optional(),
|
|
40665
|
+
loonAcceptedSchemes: nullableType(arrayType(CardScheme$outboundSchema)).optional(),
|
|
40666
|
+
visaNetworkTokensRequestorId: nullableType(stringType()).optional(),
|
|
40667
|
+
visaNetworkTokensAppId: nullableType(stringType()).optional(),
|
|
40668
|
+
amexNetworkTokensRequestorId: nullableType(stringType()).optional(),
|
|
40669
|
+
amexNetworkTokensAppId: nullableType(stringType()).optional(),
|
|
40670
|
+
mastercardNetworkTokensRequestorId: nullableType(stringType()).optional(),
|
|
40671
|
+
mastercardNetworkTokensAppId: nullableType(stringType()).optional(),
|
|
40672
|
+
outboundWebhookUrl: nullableType(stringType()).optional(),
|
|
40673
|
+
outboundWebhookUsername: nullableType(stringType()).optional(),
|
|
40674
|
+
outboundWebhookPassword: nullableType(stringType()).optional(),
|
|
40675
|
+
id: stringType(),
|
|
40676
|
+
displayName: stringType()
|
|
40677
|
+
}).transform((v2) => {
|
|
40678
|
+
return remap(v2, {
|
|
40679
|
+
accountUpdaterEnabled: "account_updater_enabled",
|
|
40680
|
+
accountUpdaterRequestEncryptionKey: "account_updater_request_encryption_key",
|
|
40681
|
+
accountUpdaterRequestEncryptionKeyId: "account_updater_request_encryption_key_id",
|
|
40682
|
+
accountUpdaterResponseDecryptionKey: "account_updater_response_decryption_key",
|
|
40683
|
+
accountUpdaterResponseDecryptionKeyId: "account_updater_response_decryption_key_id",
|
|
40684
|
+
overCaptureAmount: "over_capture_amount",
|
|
40685
|
+
overCapturePercentage: "over_capture_percentage",
|
|
40686
|
+
loonClientKey: "loon_client_key",
|
|
40687
|
+
loonSecretKey: "loon_secret_key",
|
|
40688
|
+
loonAcceptedSchemes: "loon_accepted_schemes",
|
|
40689
|
+
visaNetworkTokensRequestorId: "visa_network_tokens_requestor_id",
|
|
40690
|
+
visaNetworkTokensAppId: "visa_network_tokens_app_id",
|
|
40691
|
+
amexNetworkTokensRequestorId: "amex_network_tokens_requestor_id",
|
|
40692
|
+
amexNetworkTokensAppId: "amex_network_tokens_app_id",
|
|
40693
|
+
mastercardNetworkTokensRequestorId: "mastercard_network_tokens_requestor_id",
|
|
40694
|
+
mastercardNetworkTokensAppId: "mastercard_network_tokens_app_id",
|
|
40695
|
+
outboundWebhookUrl: "outbound_webhook_url",
|
|
40696
|
+
outboundWebhookUsername: "outbound_webhook_username",
|
|
40697
|
+
outboundWebhookPassword: "outbound_webhook_password",
|
|
40698
|
+
displayName: "display_name"
|
|
40699
|
+
});
|
|
40700
|
+
});
|
|
40701
|
+
((MerchantAccountCreate$) => {
|
|
40702
|
+
MerchantAccountCreate$.inboundSchema = MerchantAccountCreate$inboundSchema;
|
|
40703
|
+
MerchantAccountCreate$.outboundSchema = MerchantAccountCreate$outboundSchema;
|
|
40704
|
+
})(MerchantAccountCreate$ ||= {});
|
|
40705
|
+
});
|
|
40706
|
+
|
|
40707
|
+
// src/models/components/merchantaccountupdate.ts
|
|
40708
|
+
var MerchantAccountUpdate$inboundSchema, MerchantAccountUpdate$outboundSchema, MerchantAccountUpdate$;
|
|
40709
|
+
var init_merchantaccountupdate = __esm(() => {
|
|
40710
|
+
init_lib();
|
|
40711
|
+
init_primitives();
|
|
40712
|
+
init_cardscheme();
|
|
40713
|
+
MerchantAccountUpdate$inboundSchema = objectType({
|
|
40714
|
+
account_updater_enabled: booleanType().default(false),
|
|
40715
|
+
account_updater_request_encryption_key: nullableType(stringType()).optional(),
|
|
40716
|
+
account_updater_request_encryption_key_id: nullableType(stringType()).optional(),
|
|
40717
|
+
account_updater_response_decryption_key: nullableType(stringType()).optional(),
|
|
40718
|
+
account_updater_response_decryption_key_id: nullableType(stringType()).optional(),
|
|
40719
|
+
over_capture_amount: nullableType(numberType().int()).optional(),
|
|
40720
|
+
over_capture_percentage: nullableType(numberType().int()).optional(),
|
|
40721
|
+
loon_client_key: nullableType(stringType()).optional(),
|
|
40722
|
+
loon_secret_key: nullableType(stringType()).optional(),
|
|
40723
|
+
loon_accepted_schemes: nullableType(arrayType(CardScheme$inboundSchema)).optional(),
|
|
40724
|
+
visa_network_tokens_requestor_id: nullableType(stringType()).optional(),
|
|
40725
|
+
visa_network_tokens_app_id: nullableType(stringType()).optional(),
|
|
40726
|
+
amex_network_tokens_requestor_id: nullableType(stringType()).optional(),
|
|
40727
|
+
amex_network_tokens_app_id: nullableType(stringType()).optional(),
|
|
40728
|
+
mastercard_network_tokens_requestor_id: nullableType(stringType()).optional(),
|
|
40729
|
+
mastercard_network_tokens_app_id: nullableType(stringType()).optional(),
|
|
40730
|
+
display_name: nullableType(stringType()).optional(),
|
|
40731
|
+
outbound_webhook_url: nullableType(stringType()).optional(),
|
|
40732
|
+
outbound_webhook_username: nullableType(stringType()).optional(),
|
|
40733
|
+
outbound_webhook_password: nullableType(stringType()).optional()
|
|
40734
|
+
}).transform((v2) => {
|
|
40735
|
+
return remap(v2, {
|
|
40736
|
+
account_updater_enabled: "accountUpdaterEnabled",
|
|
40737
|
+
account_updater_request_encryption_key: "accountUpdaterRequestEncryptionKey",
|
|
40738
|
+
account_updater_request_encryption_key_id: "accountUpdaterRequestEncryptionKeyId",
|
|
40739
|
+
account_updater_response_decryption_key: "accountUpdaterResponseDecryptionKey",
|
|
40740
|
+
account_updater_response_decryption_key_id: "accountUpdaterResponseDecryptionKeyId",
|
|
40741
|
+
over_capture_amount: "overCaptureAmount",
|
|
40742
|
+
over_capture_percentage: "overCapturePercentage",
|
|
40743
|
+
loon_client_key: "loonClientKey",
|
|
40744
|
+
loon_secret_key: "loonSecretKey",
|
|
40745
|
+
loon_accepted_schemes: "loonAcceptedSchemes",
|
|
40746
|
+
visa_network_tokens_requestor_id: "visaNetworkTokensRequestorId",
|
|
40747
|
+
visa_network_tokens_app_id: "visaNetworkTokensAppId",
|
|
40748
|
+
amex_network_tokens_requestor_id: "amexNetworkTokensRequestorId",
|
|
40749
|
+
amex_network_tokens_app_id: "amexNetworkTokensAppId",
|
|
40750
|
+
mastercard_network_tokens_requestor_id: "mastercardNetworkTokensRequestorId",
|
|
40751
|
+
mastercard_network_tokens_app_id: "mastercardNetworkTokensAppId",
|
|
40752
|
+
display_name: "displayName",
|
|
40753
|
+
outbound_webhook_url: "outboundWebhookUrl",
|
|
40754
|
+
outbound_webhook_username: "outboundWebhookUsername",
|
|
40755
|
+
outbound_webhook_password: "outboundWebhookPassword"
|
|
40756
|
+
});
|
|
40757
|
+
});
|
|
40758
|
+
MerchantAccountUpdate$outboundSchema = objectType({
|
|
40759
|
+
accountUpdaterEnabled: booleanType().default(false),
|
|
40760
|
+
accountUpdaterRequestEncryptionKey: nullableType(stringType()).optional(),
|
|
40761
|
+
accountUpdaterRequestEncryptionKeyId: nullableType(stringType()).optional(),
|
|
40762
|
+
accountUpdaterResponseDecryptionKey: nullableType(stringType()).optional(),
|
|
40763
|
+
accountUpdaterResponseDecryptionKeyId: nullableType(stringType()).optional(),
|
|
40764
|
+
overCaptureAmount: nullableType(numberType().int()).optional(),
|
|
40765
|
+
overCapturePercentage: nullableType(numberType().int()).optional(),
|
|
40766
|
+
loonClientKey: nullableType(stringType()).optional(),
|
|
40767
|
+
loonSecretKey: nullableType(stringType()).optional(),
|
|
40768
|
+
loonAcceptedSchemes: nullableType(arrayType(CardScheme$outboundSchema)).optional(),
|
|
40769
|
+
visaNetworkTokensRequestorId: nullableType(stringType()).optional(),
|
|
40770
|
+
visaNetworkTokensAppId: nullableType(stringType()).optional(),
|
|
40771
|
+
amexNetworkTokensRequestorId: nullableType(stringType()).optional(),
|
|
40772
|
+
amexNetworkTokensAppId: nullableType(stringType()).optional(),
|
|
40773
|
+
mastercardNetworkTokensRequestorId: nullableType(stringType()).optional(),
|
|
40774
|
+
mastercardNetworkTokensAppId: nullableType(stringType()).optional(),
|
|
40775
|
+
displayName: nullableType(stringType()).optional(),
|
|
40776
|
+
outboundWebhookUrl: nullableType(stringType()).optional(),
|
|
40777
|
+
outboundWebhookUsername: nullableType(stringType()).optional(),
|
|
40778
|
+
outboundWebhookPassword: nullableType(stringType()).optional()
|
|
40779
|
+
}).transform((v2) => {
|
|
40780
|
+
return remap(v2, {
|
|
40781
|
+
accountUpdaterEnabled: "account_updater_enabled",
|
|
40782
|
+
accountUpdaterRequestEncryptionKey: "account_updater_request_encryption_key",
|
|
40783
|
+
accountUpdaterRequestEncryptionKeyId: "account_updater_request_encryption_key_id",
|
|
40784
|
+
accountUpdaterResponseDecryptionKey: "account_updater_response_decryption_key",
|
|
40785
|
+
accountUpdaterResponseDecryptionKeyId: "account_updater_response_decryption_key_id",
|
|
40786
|
+
overCaptureAmount: "over_capture_amount",
|
|
40787
|
+
overCapturePercentage: "over_capture_percentage",
|
|
40788
|
+
loonClientKey: "loon_client_key",
|
|
40789
|
+
loonSecretKey: "loon_secret_key",
|
|
40790
|
+
loonAcceptedSchemes: "loon_accepted_schemes",
|
|
40791
|
+
visaNetworkTokensRequestorId: "visa_network_tokens_requestor_id",
|
|
40792
|
+
visaNetworkTokensAppId: "visa_network_tokens_app_id",
|
|
40793
|
+
amexNetworkTokensRequestorId: "amex_network_tokens_requestor_id",
|
|
40794
|
+
amexNetworkTokensAppId: "amex_network_tokens_app_id",
|
|
40795
|
+
mastercardNetworkTokensRequestorId: "mastercard_network_tokens_requestor_id",
|
|
40796
|
+
mastercardNetworkTokensAppId: "mastercard_network_tokens_app_id",
|
|
40797
|
+
displayName: "display_name",
|
|
40798
|
+
outboundWebhookUrl: "outbound_webhook_url",
|
|
40799
|
+
outboundWebhookUsername: "outbound_webhook_username",
|
|
40800
|
+
outboundWebhookPassword: "outbound_webhook_password"
|
|
40801
|
+
});
|
|
40802
|
+
});
|
|
40803
|
+
((MerchantAccountUpdate$) => {
|
|
40804
|
+
MerchantAccountUpdate$.inboundSchema = MerchantAccountUpdate$inboundSchema;
|
|
40805
|
+
MerchantAccountUpdate$.outboundSchema = MerchantAccountUpdate$outboundSchema;
|
|
40806
|
+
})(MerchantAccountUpdate$ ||= {});
|
|
40807
|
+
});
|
|
40808
|
+
|
|
40455
40809
|
// src/models/components/networktokencreate.ts
|
|
40456
40810
|
var NetworkTokenCreate$inboundSchema, NetworkTokenCreate$outboundSchema, NetworkTokenCreate$;
|
|
40457
40811
|
var init_networktokencreate = __esm(() => {
|
|
@@ -42055,6 +42409,7 @@ var init_components = __esm(() => {
|
|
|
42055
42409
|
init_collectionauditlogentry();
|
|
42056
42410
|
init_collectionbuyer();
|
|
42057
42411
|
init_collectiongiftcard();
|
|
42412
|
+
init_collectionmerchantaccount();
|
|
42058
42413
|
init_collectionnocursorcardschemedefinition();
|
|
42059
42414
|
init_collectionnocursordigitalwallet();
|
|
42060
42415
|
init_collectionnocursorgiftcardsummary();
|
|
@@ -42102,6 +42457,9 @@ var init_components = __esm(() => {
|
|
|
42102
42457
|
init_guestbuyerinput();
|
|
42103
42458
|
init_guestbuyeroutput();
|
|
42104
42459
|
init_instrumenttype();
|
|
42460
|
+
init_merchantaccount();
|
|
42461
|
+
init_merchantaccountcreate();
|
|
42462
|
+
init_merchantaccountupdate();
|
|
42105
42463
|
init_method();
|
|
42106
42464
|
init_mode();
|
|
42107
42465
|
init_networktoken();
|
|
@@ -42565,6 +42923,29 @@ var init_creategooglepaydigitalwalletsession = __esm(() => {
|
|
|
42565
42923
|
})(CreateGooglePayDigitalWalletSessionResponse403CreateGooglePayDigitalWalletSession$ ||= {});
|
|
42566
42924
|
});
|
|
42567
42925
|
|
|
42926
|
+
// src/models/errors/createmerchantaccount.ts
|
|
42927
|
+
var CreateMerchantAccountResponse403CreateMerchantAccount$inboundSchema, CreateMerchantAccountResponse403CreateMerchantAccount$outboundSchema, CreateMerchantAccountResponse403CreateMerchantAccount$;
|
|
42928
|
+
var init_createmerchantaccount = __esm(() => {
|
|
42929
|
+
init_lib();
|
|
42930
|
+
init_error403();
|
|
42931
|
+
init_error403active();
|
|
42932
|
+
init_error403forbidden();
|
|
42933
|
+
CreateMerchantAccountResponse403CreateMerchantAccount$inboundSchema = unionType([
|
|
42934
|
+
Error403$inboundSchema,
|
|
42935
|
+
Error403Forbidden$inboundSchema,
|
|
42936
|
+
Error403Active$inboundSchema
|
|
42937
|
+
]);
|
|
42938
|
+
CreateMerchantAccountResponse403CreateMerchantAccount$outboundSchema = unionType([
|
|
42939
|
+
Error403$outboundSchema,
|
|
42940
|
+
Error403Forbidden$outboundSchema,
|
|
42941
|
+
Error403Active$outboundSchema
|
|
42942
|
+
]);
|
|
42943
|
+
((CreateMerchantAccountResponse403CreateMerchantAccount$) => {
|
|
42944
|
+
CreateMerchantAccountResponse403CreateMerchantAccount$.inboundSchema = CreateMerchantAccountResponse403CreateMerchantAccount$inboundSchema;
|
|
42945
|
+
CreateMerchantAccountResponse403CreateMerchantAccount$.outboundSchema = CreateMerchantAccountResponse403CreateMerchantAccount$outboundSchema;
|
|
42946
|
+
})(CreateMerchantAccountResponse403CreateMerchantAccount$ ||= {});
|
|
42947
|
+
});
|
|
42948
|
+
|
|
42568
42949
|
// src/models/errors/createpaymentmethod.ts
|
|
42569
42950
|
var CreatePaymentMethodResponse403CreatePaymentMethod$inboundSchema, CreatePaymentMethodResponse403CreatePaymentMethod$outboundSchema, CreatePaymentMethodResponse403CreatePaymentMethod$;
|
|
42570
42951
|
var init_createpaymentmethod = __esm(() => {
|
|
@@ -43505,6 +43886,29 @@ var init_getgiftcard = __esm(() => {
|
|
|
43505
43886
|
})(GetGiftCardResponse403GetGiftCard$ ||= {});
|
|
43506
43887
|
});
|
|
43507
43888
|
|
|
43889
|
+
// src/models/errors/getmerchantaccount.ts
|
|
43890
|
+
var GetMerchantAccountResponse403GetMerchantAccount$inboundSchema, GetMerchantAccountResponse403GetMerchantAccount$outboundSchema, GetMerchantAccountResponse403GetMerchantAccount$;
|
|
43891
|
+
var init_getmerchantaccount = __esm(() => {
|
|
43892
|
+
init_lib();
|
|
43893
|
+
init_error403();
|
|
43894
|
+
init_error403active();
|
|
43895
|
+
init_error403forbidden();
|
|
43896
|
+
GetMerchantAccountResponse403GetMerchantAccount$inboundSchema = unionType([
|
|
43897
|
+
Error403$inboundSchema,
|
|
43898
|
+
Error403Forbidden$inboundSchema,
|
|
43899
|
+
Error403Active$inboundSchema
|
|
43900
|
+
]);
|
|
43901
|
+
GetMerchantAccountResponse403GetMerchantAccount$outboundSchema = unionType([
|
|
43902
|
+
Error403$outboundSchema,
|
|
43903
|
+
Error403Forbidden$outboundSchema,
|
|
43904
|
+
Error403Active$outboundSchema
|
|
43905
|
+
]);
|
|
43906
|
+
((GetMerchantAccountResponse403GetMerchantAccount$) => {
|
|
43907
|
+
GetMerchantAccountResponse403GetMerchantAccount$.inboundSchema = GetMerchantAccountResponse403GetMerchantAccount$inboundSchema;
|
|
43908
|
+
GetMerchantAccountResponse403GetMerchantAccount$.outboundSchema = GetMerchantAccountResponse403GetMerchantAccount$outboundSchema;
|
|
43909
|
+
})(GetMerchantAccountResponse403GetMerchantAccount$ ||= {});
|
|
43910
|
+
});
|
|
43911
|
+
|
|
43508
43912
|
// src/models/errors/getpaymentmethod.ts
|
|
43509
43913
|
var GetPaymentMethodResponse403GetPaymentMethod$inboundSchema, GetPaymentMethodResponse403GetPaymentMethod$outboundSchema, GetPaymentMethodResponse403GetPaymentMethod$;
|
|
43510
43914
|
var init_getpaymentmethod = __esm(() => {
|
|
@@ -43881,6 +44285,29 @@ var init_listgiftcards = __esm(() => {
|
|
|
43881
44285
|
})(ListGiftCardsResponse403ListGiftCards$ ||= {});
|
|
43882
44286
|
});
|
|
43883
44287
|
|
|
44288
|
+
// src/models/errors/listmerchantaccounts.ts
|
|
44289
|
+
var ListMerchantAccountsResponse403ListMerchantAccounts$inboundSchema, ListMerchantAccountsResponse403ListMerchantAccounts$outboundSchema, ListMerchantAccountsResponse403ListMerchantAccounts$;
|
|
44290
|
+
var init_listmerchantaccounts = __esm(() => {
|
|
44291
|
+
init_lib();
|
|
44292
|
+
init_error403();
|
|
44293
|
+
init_error403active();
|
|
44294
|
+
init_error403forbidden();
|
|
44295
|
+
ListMerchantAccountsResponse403ListMerchantAccounts$inboundSchema = unionType([
|
|
44296
|
+
Error403$inboundSchema,
|
|
44297
|
+
Error403Forbidden$inboundSchema,
|
|
44298
|
+
Error403Active$inboundSchema
|
|
44299
|
+
]);
|
|
44300
|
+
ListMerchantAccountsResponse403ListMerchantAccounts$outboundSchema = unionType([
|
|
44301
|
+
Error403$outboundSchema,
|
|
44302
|
+
Error403Forbidden$outboundSchema,
|
|
44303
|
+
Error403Active$outboundSchema
|
|
44304
|
+
]);
|
|
44305
|
+
((ListMerchantAccountsResponse403ListMerchantAccounts$) => {
|
|
44306
|
+
ListMerchantAccountsResponse403ListMerchantAccounts$.inboundSchema = ListMerchantAccountsResponse403ListMerchantAccounts$inboundSchema;
|
|
44307
|
+
ListMerchantAccountsResponse403ListMerchantAccounts$.outboundSchema = ListMerchantAccountsResponse403ListMerchantAccounts$outboundSchema;
|
|
44308
|
+
})(ListMerchantAccountsResponse403ListMerchantAccounts$ ||= {});
|
|
44309
|
+
});
|
|
44310
|
+
|
|
43884
44311
|
// src/models/errors/listpaymentmethodnetworktokens.ts
|
|
43885
44312
|
var ListPaymentMethodNetworkTokensResponse403ListPaymentMethodNetworkTokens$inboundSchema, ListPaymentMethodNetworkTokensResponse403ListPaymentMethodNetworkTokens$outboundSchema, ListPaymentMethodNetworkTokensResponse403ListPaymentMethodNetworkTokens$;
|
|
43886
44313
|
var init_listpaymentmethodnetworktokens = __esm(() => {
|
|
@@ -44249,6 +44676,29 @@ var init_updatedigitalwallet = __esm(() => {
|
|
|
44249
44676
|
})(UpdateDigitalWalletResponse403UpdateDigitalWallet$ ||= {});
|
|
44250
44677
|
});
|
|
44251
44678
|
|
|
44679
|
+
// src/models/errors/updatemerchantaccount.ts
|
|
44680
|
+
var UpdateMerchantAccountResponse403UpdateMerchantAccount$inboundSchema, UpdateMerchantAccountResponse403UpdateMerchantAccount$outboundSchema, UpdateMerchantAccountResponse403UpdateMerchantAccount$;
|
|
44681
|
+
var init_updatemerchantaccount = __esm(() => {
|
|
44682
|
+
init_lib();
|
|
44683
|
+
init_error403();
|
|
44684
|
+
init_error403active();
|
|
44685
|
+
init_error403forbidden();
|
|
44686
|
+
UpdateMerchantAccountResponse403UpdateMerchantAccount$inboundSchema = unionType([
|
|
44687
|
+
Error403$inboundSchema,
|
|
44688
|
+
Error403Forbidden$inboundSchema,
|
|
44689
|
+
Error403Active$inboundSchema
|
|
44690
|
+
]);
|
|
44691
|
+
UpdateMerchantAccountResponse403UpdateMerchantAccount$outboundSchema = unionType([
|
|
44692
|
+
Error403$outboundSchema,
|
|
44693
|
+
Error403Forbidden$outboundSchema,
|
|
44694
|
+
Error403Active$outboundSchema
|
|
44695
|
+
]);
|
|
44696
|
+
((UpdateMerchantAccountResponse403UpdateMerchantAccount$) => {
|
|
44697
|
+
UpdateMerchantAccountResponse403UpdateMerchantAccount$.inboundSchema = UpdateMerchantAccountResponse403UpdateMerchantAccount$inboundSchema;
|
|
44698
|
+
UpdateMerchantAccountResponse403UpdateMerchantAccount$.outboundSchema = UpdateMerchantAccountResponse403UpdateMerchantAccount$outboundSchema;
|
|
44699
|
+
})(UpdateMerchantAccountResponse403UpdateMerchantAccount$ ||= {});
|
|
44700
|
+
});
|
|
44701
|
+
|
|
44252
44702
|
// src/models/errors/voidtransaction.ts
|
|
44253
44703
|
var VoidTransactionResponse403VoidTransaction$inboundSchema, VoidTransactionResponse403VoidTransaction$outboundSchema, VoidTransactionResponse403VoidTransaction$;
|
|
44254
44704
|
var init_voidtransaction = __esm(() => {
|
|
@@ -44285,6 +44735,7 @@ var init_errors = __esm(() => {
|
|
|
44285
44735
|
init_createfulltransactionrefund();
|
|
44286
44736
|
init_creategiftcard();
|
|
44287
44737
|
init_creategooglepaydigitalwalletsession();
|
|
44738
|
+
init_createmerchantaccount();
|
|
44288
44739
|
init_createpaymentmethod();
|
|
44289
44740
|
init_createpaymentmethodnetworktoken();
|
|
44290
44741
|
init_createpaymentmethodnetworktokencryptogram();
|
|
@@ -44318,6 +44769,7 @@ var init_errors = __esm(() => {
|
|
|
44318
44769
|
init_getcheckoutsession();
|
|
44319
44770
|
init_getdigitalwallet();
|
|
44320
44771
|
init_getgiftcard();
|
|
44772
|
+
init_getmerchantaccount();
|
|
44321
44773
|
init_getpaymentmethod();
|
|
44322
44774
|
init_getpayout();
|
|
44323
44775
|
init_getrefund();
|
|
@@ -44335,6 +44787,7 @@ var init_errors = __esm(() => {
|
|
|
44335
44787
|
init_listdigitalwallets();
|
|
44336
44788
|
init_listgiftcardbalances();
|
|
44337
44789
|
init_listgiftcards();
|
|
44790
|
+
init_listmerchantaccounts();
|
|
44338
44791
|
init_listpaymentmethodnetworktokens();
|
|
44339
44792
|
init_listpaymentmethodpaymentservicetokens();
|
|
44340
44793
|
init_listpaymentmethods();
|
|
@@ -44353,6 +44806,7 @@ var init_errors = __esm(() => {
|
|
|
44353
44806
|
init_updatebuyershippingdetails();
|
|
44354
44807
|
init_updatecheckoutsession();
|
|
44355
44808
|
init_updatedigitalwallet();
|
|
44809
|
+
init_updatemerchantaccount();
|
|
44356
44810
|
init_voidtransaction();
|
|
44357
44811
|
});
|
|
44358
44812
|
|
|
@@ -44798,6 +45252,36 @@ var init_creategooglepaydigitalwalletsession2 = __esm(() => {
|
|
|
44798
45252
|
})(CreateGooglePayDigitalWalletSessionRequest$ ||= {});
|
|
44799
45253
|
});
|
|
44800
45254
|
|
|
45255
|
+
// src/models/operations/createmerchantaccount.ts
|
|
45256
|
+
var CreateMerchantAccountRequest$inboundSchema, CreateMerchantAccountRequest$outboundSchema, CreateMerchantAccountRequest$;
|
|
45257
|
+
var init_createmerchantaccount2 = __esm(() => {
|
|
45258
|
+
init_lib();
|
|
45259
|
+
init_primitives();
|
|
45260
|
+
init_components();
|
|
45261
|
+
CreateMerchantAccountRequest$inboundSchema = objectType({
|
|
45262
|
+
timeout_in_seconds: numberType().default(1),
|
|
45263
|
+
MerchantAccountCreate: MerchantAccountCreate$inboundSchema
|
|
45264
|
+
}).transform((v2) => {
|
|
45265
|
+
return remap(v2, {
|
|
45266
|
+
timeout_in_seconds: "timeoutInSeconds",
|
|
45267
|
+
MerchantAccountCreate: "merchantAccountCreate"
|
|
45268
|
+
});
|
|
45269
|
+
});
|
|
45270
|
+
CreateMerchantAccountRequest$outboundSchema = objectType({
|
|
45271
|
+
timeoutInSeconds: numberType().default(1),
|
|
45272
|
+
merchantAccountCreate: MerchantAccountCreate$outboundSchema
|
|
45273
|
+
}).transform((v2) => {
|
|
45274
|
+
return remap(v2, {
|
|
45275
|
+
timeoutInSeconds: "timeout_in_seconds",
|
|
45276
|
+
merchantAccountCreate: "MerchantAccountCreate"
|
|
45277
|
+
});
|
|
45278
|
+
});
|
|
45279
|
+
((CreateMerchantAccountRequest$) => {
|
|
45280
|
+
CreateMerchantAccountRequest$.inboundSchema = CreateMerchantAccountRequest$inboundSchema;
|
|
45281
|
+
CreateMerchantAccountRequest$.outboundSchema = CreateMerchantAccountRequest$outboundSchema;
|
|
45282
|
+
})(CreateMerchantAccountRequest$ ||= {});
|
|
45283
|
+
});
|
|
45284
|
+
|
|
44801
45285
|
// src/models/operations/createpaymentmethod.ts
|
|
44802
45286
|
var CreatePaymentMethodGlobals$inboundSchema, CreatePaymentMethodGlobals$outboundSchema, CreatePaymentMethodGlobals$, CreatePaymentMethodBody$inboundSchema, CreatePaymentMethodBody$outboundSchema, CreatePaymentMethodBody$, CreatePaymentMethodRequest$inboundSchema, CreatePaymentMethodRequest$outboundSchema, CreatePaymentMethodRequest$;
|
|
44803
45287
|
var init_createpaymentmethod2 = __esm(() => {
|
|
@@ -45673,6 +46157,31 @@ var init_getgiftcard2 = __esm(() => {
|
|
|
45673
46157
|
})(GetGiftCardRequest$ ||= {});
|
|
45674
46158
|
});
|
|
45675
46159
|
|
|
46160
|
+
// src/models/operations/getmerchantaccount.ts
|
|
46161
|
+
var GetMerchantAccountRequest$inboundSchema, GetMerchantAccountRequest$outboundSchema, GetMerchantAccountRequest$;
|
|
46162
|
+
var init_getmerchantaccount2 = __esm(() => {
|
|
46163
|
+
init_lib();
|
|
46164
|
+
init_primitives();
|
|
46165
|
+
GetMerchantAccountRequest$inboundSchema = objectType({
|
|
46166
|
+
merchant_account_id: stringType()
|
|
46167
|
+
}).transform((v2) => {
|
|
46168
|
+
return remap(v2, {
|
|
46169
|
+
merchant_account_id: "merchantAccountId"
|
|
46170
|
+
});
|
|
46171
|
+
});
|
|
46172
|
+
GetMerchantAccountRequest$outboundSchema = objectType({
|
|
46173
|
+
merchantAccountId: stringType()
|
|
46174
|
+
}).transform((v2) => {
|
|
46175
|
+
return remap(v2, {
|
|
46176
|
+
merchantAccountId: "merchant_account_id"
|
|
46177
|
+
});
|
|
46178
|
+
});
|
|
46179
|
+
((GetMerchantAccountRequest$) => {
|
|
46180
|
+
GetMerchantAccountRequest$.inboundSchema = GetMerchantAccountRequest$inboundSchema;
|
|
46181
|
+
GetMerchantAccountRequest$.outboundSchema = GetMerchantAccountRequest$outboundSchema;
|
|
46182
|
+
})(GetMerchantAccountRequest$ ||= {});
|
|
46183
|
+
});
|
|
46184
|
+
|
|
45676
46185
|
// src/models/operations/getpaymentmethod.ts
|
|
45677
46186
|
var GetPaymentMethodGlobals$inboundSchema, GetPaymentMethodGlobals$outboundSchema, GetPaymentMethodGlobals$, GetPaymentMethodRequest$inboundSchema, GetPaymentMethodRequest$outboundSchema, GetPaymentMethodRequest$;
|
|
45678
46187
|
var init_getpaymentmethod2 = __esm(() => {
|
|
@@ -46336,6 +46845,46 @@ var init_listgiftcards2 = __esm(() => {
|
|
|
46336
46845
|
})(ListGiftCardsResponse$ ||= {});
|
|
46337
46846
|
});
|
|
46338
46847
|
|
|
46848
|
+
// src/models/operations/listmerchantaccounts.ts
|
|
46849
|
+
var ListMerchantAccountsRequest$inboundSchema, ListMerchantAccountsRequest$outboundSchema, ListMerchantAccountsRequest$, ListMerchantAccountsResponse$inboundSchema, ListMerchantAccountsResponse$outboundSchema, ListMerchantAccountsResponse$;
|
|
46850
|
+
var init_listmerchantaccounts2 = __esm(() => {
|
|
46851
|
+
init_lib();
|
|
46852
|
+
init_primitives();
|
|
46853
|
+
init_components();
|
|
46854
|
+
ListMerchantAccountsRequest$inboundSchema = objectType({
|
|
46855
|
+
cursor: nullableType(stringType()).optional(),
|
|
46856
|
+
limit: numberType().int().default(20),
|
|
46857
|
+
search: nullableType(stringType()).optional()
|
|
46858
|
+
});
|
|
46859
|
+
ListMerchantAccountsRequest$outboundSchema = objectType({
|
|
46860
|
+
cursor: nullableType(stringType()).optional(),
|
|
46861
|
+
limit: numberType().int().default(20),
|
|
46862
|
+
search: nullableType(stringType()).optional()
|
|
46863
|
+
});
|
|
46864
|
+
((ListMerchantAccountsRequest$) => {
|
|
46865
|
+
ListMerchantAccountsRequest$.inboundSchema = ListMerchantAccountsRequest$inboundSchema;
|
|
46866
|
+
ListMerchantAccountsRequest$.outboundSchema = ListMerchantAccountsRequest$outboundSchema;
|
|
46867
|
+
})(ListMerchantAccountsRequest$ ||= {});
|
|
46868
|
+
ListMerchantAccountsResponse$inboundSchema = objectType({
|
|
46869
|
+
Result: CollectionMerchantAccount$inboundSchema
|
|
46870
|
+
}).transform((v2) => {
|
|
46871
|
+
return remap(v2, {
|
|
46872
|
+
Result: "result"
|
|
46873
|
+
});
|
|
46874
|
+
});
|
|
46875
|
+
ListMerchantAccountsResponse$outboundSchema = objectType({
|
|
46876
|
+
result: CollectionMerchantAccount$outboundSchema
|
|
46877
|
+
}).transform((v2) => {
|
|
46878
|
+
return remap(v2, {
|
|
46879
|
+
result: "Result"
|
|
46880
|
+
});
|
|
46881
|
+
});
|
|
46882
|
+
((ListMerchantAccountsResponse$) => {
|
|
46883
|
+
ListMerchantAccountsResponse$.inboundSchema = ListMerchantAccountsResponse$inboundSchema;
|
|
46884
|
+
ListMerchantAccountsResponse$.outboundSchema = ListMerchantAccountsResponse$outboundSchema;
|
|
46885
|
+
})(ListMerchantAccountsResponse$ ||= {});
|
|
46886
|
+
});
|
|
46887
|
+
|
|
46339
46888
|
// src/models/operations/listpaymentmethodnetworktokens.ts
|
|
46340
46889
|
var ListPaymentMethodNetworkTokensGlobals$inboundSchema, ListPaymentMethodNetworkTokensGlobals$outboundSchema, ListPaymentMethodNetworkTokensGlobals$, ListPaymentMethodNetworkTokensRequest$inboundSchema, ListPaymentMethodNetworkTokensRequest$outboundSchema, ListPaymentMethodNetworkTokensRequest$;
|
|
46341
46890
|
var init_listpaymentmethodnetworktokens2 = __esm(() => {
|
|
@@ -47204,6 +47753,40 @@ var init_updatedigitalwallet2 = __esm(() => {
|
|
|
47204
47753
|
})(UpdateDigitalWalletRequest$ ||= {});
|
|
47205
47754
|
});
|
|
47206
47755
|
|
|
47756
|
+
// src/models/operations/updatemerchantaccount.ts
|
|
47757
|
+
var UpdateMerchantAccountRequest$inboundSchema, UpdateMerchantAccountRequest$outboundSchema, UpdateMerchantAccountRequest$;
|
|
47758
|
+
var init_updatemerchantaccount2 = __esm(() => {
|
|
47759
|
+
init_lib();
|
|
47760
|
+
init_primitives();
|
|
47761
|
+
init_components();
|
|
47762
|
+
UpdateMerchantAccountRequest$inboundSchema = objectType({
|
|
47763
|
+
merchant_account_id: stringType(),
|
|
47764
|
+
timeout_in_seconds: numberType().default(1),
|
|
47765
|
+
MerchantAccountUpdate: MerchantAccountUpdate$inboundSchema
|
|
47766
|
+
}).transform((v2) => {
|
|
47767
|
+
return remap(v2, {
|
|
47768
|
+
merchant_account_id: "merchantAccountId",
|
|
47769
|
+
timeout_in_seconds: "timeoutInSeconds",
|
|
47770
|
+
MerchantAccountUpdate: "merchantAccountUpdate"
|
|
47771
|
+
});
|
|
47772
|
+
});
|
|
47773
|
+
UpdateMerchantAccountRequest$outboundSchema = objectType({
|
|
47774
|
+
merchantAccountId: stringType(),
|
|
47775
|
+
timeoutInSeconds: numberType().default(1),
|
|
47776
|
+
merchantAccountUpdate: MerchantAccountUpdate$outboundSchema
|
|
47777
|
+
}).transform((v2) => {
|
|
47778
|
+
return remap(v2, {
|
|
47779
|
+
merchantAccountId: "merchant_account_id",
|
|
47780
|
+
timeoutInSeconds: "timeout_in_seconds",
|
|
47781
|
+
merchantAccountUpdate: "MerchantAccountUpdate"
|
|
47782
|
+
});
|
|
47783
|
+
});
|
|
47784
|
+
((UpdateMerchantAccountRequest$) => {
|
|
47785
|
+
UpdateMerchantAccountRequest$.inboundSchema = UpdateMerchantAccountRequest$inboundSchema;
|
|
47786
|
+
UpdateMerchantAccountRequest$.outboundSchema = UpdateMerchantAccountRequest$outboundSchema;
|
|
47787
|
+
})(UpdateMerchantAccountRequest$ ||= {});
|
|
47788
|
+
});
|
|
47789
|
+
|
|
47207
47790
|
// src/models/operations/voidtransaction.ts
|
|
47208
47791
|
var VoidTransactionGlobals$inboundSchema, VoidTransactionGlobals$outboundSchema, VoidTransactionGlobals$, VoidTransactionRequest$inboundSchema, VoidTransactionRequest$outboundSchema, VoidTransactionRequest$;
|
|
47209
47792
|
var init_voidtransaction2 = __esm(() => {
|
|
@@ -47257,6 +47840,7 @@ var init_operations = __esm(() => {
|
|
|
47257
47840
|
init_createfulltransactionrefund2();
|
|
47258
47841
|
init_creategiftcard2();
|
|
47259
47842
|
init_creategooglepaydigitalwalletsession2();
|
|
47843
|
+
init_createmerchantaccount2();
|
|
47260
47844
|
init_createpaymentmethod2();
|
|
47261
47845
|
init_createpaymentmethodnetworktoken2();
|
|
47262
47846
|
init_createpaymentmethodnetworktokencryptogram2();
|
|
@@ -47277,6 +47861,7 @@ var init_operations = __esm(() => {
|
|
|
47277
47861
|
init_getcheckoutsession2();
|
|
47278
47862
|
init_getdigitalwallet2();
|
|
47279
47863
|
init_getgiftcard2();
|
|
47864
|
+
init_getmerchantaccount2();
|
|
47280
47865
|
init_getpaymentmethod2();
|
|
47281
47866
|
init_getpayout2();
|
|
47282
47867
|
init_getrefund2();
|
|
@@ -47292,6 +47877,7 @@ var init_operations = __esm(() => {
|
|
|
47292
47877
|
init_listdigitalwallets2();
|
|
47293
47878
|
init_listgiftcardbalances2();
|
|
47294
47879
|
init_listgiftcards2();
|
|
47880
|
+
init_listmerchantaccounts2();
|
|
47295
47881
|
init_listpaymentmethodnetworktokens2();
|
|
47296
47882
|
init_listpaymentmethodpaymentservicetokens2();
|
|
47297
47883
|
init_listpaymentmethods2();
|
|
@@ -47308,6 +47894,7 @@ var init_operations = __esm(() => {
|
|
|
47308
47894
|
init_updatebuyershippingdetails2();
|
|
47309
47895
|
init_updatecheckoutsession2();
|
|
47310
47896
|
init_updatedigitalwallet2();
|
|
47897
|
+
init_updatemerchantaccount2();
|
|
47311
47898
|
init_voidtransaction2();
|
|
47312
47899
|
});
|
|
47313
47900
|
|
|
@@ -51977,37 +52564,37 @@ Browser all gift cards.`,
|
|
|
51977
52564
|
};
|
|
51978
52565
|
});
|
|
51979
52566
|
|
|
51980
|
-
// src/funcs/
|
|
51981
|
-
function
|
|
51982
|
-
return new APIPromise($do35(client,
|
|
52567
|
+
// src/funcs/merchantAccountsCreate.ts
|
|
52568
|
+
function merchantAccountsCreate(client, merchantAccountCreate, timeoutInSeconds, options) {
|
|
52569
|
+
return new APIPromise($do35(client, merchantAccountCreate, timeoutInSeconds, options));
|
|
51983
52570
|
}
|
|
51984
|
-
async function $do35(client,
|
|
52571
|
+
async function $do35(client, merchantAccountCreate, timeoutInSeconds, options) {
|
|
51985
52572
|
const input = {
|
|
51986
|
-
|
|
51987
|
-
timeoutInSeconds
|
|
51988
|
-
merchantAccountId
|
|
52573
|
+
merchantAccountCreate,
|
|
52574
|
+
timeoutInSeconds
|
|
51989
52575
|
};
|
|
51990
|
-
const parsed = safeParse(input, (value) =>
|
|
52576
|
+
const parsed = safeParse(input, (value) => CreateMerchantAccountRequest$outboundSchema.parse(value), "Input validation failed");
|
|
51991
52577
|
if (!parsed.ok) {
|
|
51992
52578
|
return [parsed, { status: "invalid" }];
|
|
51993
52579
|
}
|
|
51994
52580
|
const payload = parsed.value;
|
|
51995
|
-
const body = encodeJSON("body", payload.
|
|
51996
|
-
|
|
52581
|
+
const body = encodeJSON("body", payload.MerchantAccountCreate, {
|
|
52582
|
+
explode: true
|
|
52583
|
+
});
|
|
52584
|
+
const path = pathToFunc("/merchant-accounts")();
|
|
51997
52585
|
const query = encodeFormQuery({
|
|
51998
52586
|
timeout_in_seconds: payload.timeout_in_seconds
|
|
51999
52587
|
});
|
|
52000
52588
|
const headers = new Headers(compactMap({
|
|
52001
52589
|
"Content-Type": "application/json",
|
|
52002
|
-
Accept: "application/json"
|
|
52003
|
-
"x-gr4vy-merchant-account-id": encodeSimple("x-gr4vy-merchant-account-id", payload.merchantAccountId ?? client._options.merchantAccountId, { explode: false, charEncoding: "none" })
|
|
52590
|
+
Accept: "application/json"
|
|
52004
52591
|
}));
|
|
52005
52592
|
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
52006
52593
|
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
52007
52594
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
52008
52595
|
const context = {
|
|
52009
52596
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
52010
|
-
operationID: "
|
|
52597
|
+
operationID: "create_merchant_account",
|
|
52011
52598
|
oAuth2Scopes: [],
|
|
52012
52599
|
resolvedSecurity: requestSecurity,
|
|
52013
52600
|
securitySource: client._options.bearerAuth,
|
|
@@ -52056,13 +52643,13 @@ async function $do35(client, requestBody, timeoutInSeconds, merchantAccountId, o
|
|
|
52056
52643
|
const responseFields = {
|
|
52057
52644
|
HttpMeta: { Response: response, Request: req }
|
|
52058
52645
|
};
|
|
52059
|
-
const [result] = await match(json(201,
|
|
52646
|
+
const [result] = await match(json(201, MerchantAccount$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, CreateMerchantAccountResponse403CreateMerchantAccount$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 });
|
|
52060
52647
|
if (!result.ok) {
|
|
52061
52648
|
return [result, { status: "complete", request: req, response }];
|
|
52062
52649
|
}
|
|
52063
52650
|
return [result, { status: "complete", request: req, response }];
|
|
52064
52651
|
}
|
|
52065
|
-
var
|
|
52652
|
+
var init_merchantAccountsCreate = __esm(() => {
|
|
52066
52653
|
init_encodings();
|
|
52067
52654
|
init_matchers();
|
|
52068
52655
|
init_primitives();
|
|
@@ -52075,26 +52662,25 @@ var init_paymentMethodsCreate = __esm(() => {
|
|
|
52075
52662
|
init_async();
|
|
52076
52663
|
});
|
|
52077
52664
|
|
|
52078
|
-
// src/mcp-server/tools/
|
|
52079
|
-
var args35, tool$
|
|
52080
|
-
var
|
|
52665
|
+
// src/mcp-server/tools/merchantAccountsCreate.ts
|
|
52666
|
+
var args35, tool$merchantAccountsCreate;
|
|
52667
|
+
var init_merchantAccountsCreate2 = __esm(() => {
|
|
52081
52668
|
init_lib();
|
|
52082
|
-
|
|
52083
|
-
|
|
52669
|
+
init_merchantAccountsCreate();
|
|
52670
|
+
init_components();
|
|
52084
52671
|
init_tools();
|
|
52085
52672
|
args35 = {
|
|
52086
|
-
|
|
52087
|
-
timeoutInSeconds: numberType().default(1)
|
|
52088
|
-
merchantAccountId: nullableType(stringType()).optional()
|
|
52673
|
+
merchantAccountCreate: MerchantAccountCreate$inboundSchema,
|
|
52674
|
+
timeoutInSeconds: numberType().default(1)
|
|
52089
52675
|
};
|
|
52090
|
-
tool$
|
|
52091
|
-
name: "
|
|
52092
|
-
description: `Create
|
|
52676
|
+
tool$merchantAccountsCreate = {
|
|
52677
|
+
name: "merchant-accounts-create",
|
|
52678
|
+
description: `Create a merchant account
|
|
52093
52679
|
|
|
52094
|
-
|
|
52680
|
+
Create a new merchant account in an instance.`,
|
|
52095
52681
|
args: args35,
|
|
52096
52682
|
tool: async (client, args36, ctx) => {
|
|
52097
|
-
const [result, apiCall] = await
|
|
52683
|
+
const [result, apiCall] = await merchantAccountsCreate(client, args36.merchantAccountCreate, args36.timeoutInSeconds, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
52098
52684
|
if (!result.ok) {
|
|
52099
52685
|
return {
|
|
52100
52686
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -52107,44 +52693,51 @@ Store a new payment method.`,
|
|
|
52107
52693
|
};
|
|
52108
52694
|
});
|
|
52109
52695
|
|
|
52110
|
-
// src/funcs/
|
|
52111
|
-
function
|
|
52112
|
-
return new APIPromise($do36(client,
|
|
52696
|
+
// src/funcs/merchantAccountsGet.ts
|
|
52697
|
+
function merchantAccountsGet(client, merchantAccountId, options) {
|
|
52698
|
+
return new APIPromise($do36(client, merchantAccountId, options));
|
|
52113
52699
|
}
|
|
52114
|
-
async function $do36(client,
|
|
52700
|
+
async function $do36(client, merchantAccountId, options) {
|
|
52115
52701
|
const input = {
|
|
52116
|
-
paymentMethodId,
|
|
52117
52702
|
merchantAccountId
|
|
52118
52703
|
};
|
|
52119
|
-
const parsed = safeParse(input, (value) =>
|
|
52704
|
+
const parsed = safeParse(input, (value) => GetMerchantAccountRequest$outboundSchema.parse(value), "Input validation failed");
|
|
52120
52705
|
if (!parsed.ok) {
|
|
52121
52706
|
return [parsed, { status: "invalid" }];
|
|
52122
52707
|
}
|
|
52123
52708
|
const payload = parsed.value;
|
|
52124
52709
|
const body = null;
|
|
52125
52710
|
const pathParams = {
|
|
52126
|
-
|
|
52711
|
+
merchant_account_id: encodeSimple("merchant_account_id", payload.merchant_account_id, { explode: false, charEncoding: "percent" })
|
|
52127
52712
|
};
|
|
52128
|
-
const path = pathToFunc("/
|
|
52713
|
+
const path = pathToFunc("/merchant-accounts/{merchant_account_id}")(pathParams);
|
|
52129
52714
|
const headers = new Headers(compactMap({
|
|
52130
|
-
Accept: "application/json"
|
|
52131
|
-
"x-gr4vy-merchant-account-id": encodeSimple("x-gr4vy-merchant-account-id", payload.merchantAccountId ?? client._options.merchantAccountId, { explode: false, charEncoding: "none" })
|
|
52715
|
+
Accept: "application/json"
|
|
52132
52716
|
}));
|
|
52133
52717
|
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
52134
52718
|
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
52135
52719
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
52136
52720
|
const context = {
|
|
52137
52721
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
52138
|
-
operationID: "
|
|
52722
|
+
operationID: "get_merchant_account",
|
|
52139
52723
|
oAuth2Scopes: [],
|
|
52140
52724
|
resolvedSecurity: requestSecurity,
|
|
52141
52725
|
securitySource: client._options.bearerAuth,
|
|
52142
|
-
retryConfig: options?.retries || client._options.retryConfig || {
|
|
52143
|
-
|
|
52726
|
+
retryConfig: options?.retries || client._options.retryConfig || {
|
|
52727
|
+
strategy: "backoff",
|
|
52728
|
+
backoff: {
|
|
52729
|
+
initialInterval: 200,
|
|
52730
|
+
maxInterval: 200,
|
|
52731
|
+
exponent: 1,
|
|
52732
|
+
maxElapsedTime: 1000
|
|
52733
|
+
},
|
|
52734
|
+
retryConnectionErrors: true
|
|
52735
|
+
},
|
|
52736
|
+
retryCodes: options?.retryCodes || ["5XX"]
|
|
52144
52737
|
};
|
|
52145
52738
|
const requestRes = client._createRequest(context, {
|
|
52146
52739
|
security: requestSecurity,
|
|
52147
|
-
method: "
|
|
52740
|
+
method: "GET",
|
|
52148
52741
|
baseURL: options?.serverURL,
|
|
52149
52742
|
path,
|
|
52150
52743
|
headers,
|
|
@@ -52183,83 +52776,85 @@ async function $do36(client, paymentMethodId, merchantAccountId, options) {
|
|
|
52183
52776
|
const responseFields = {
|
|
52184
52777
|
HttpMeta: { Response: response, Request: req }
|
|
52185
52778
|
};
|
|
52186
|
-
const [result] = await match(
|
|
52779
|
+
const [result] = await match(json(200, MerchantAccount$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, GetMerchantAccountResponse403GetMerchantAccount$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 });
|
|
52187
52780
|
if (!result.ok) {
|
|
52188
52781
|
return [result, { status: "complete", request: req, response }];
|
|
52189
52782
|
}
|
|
52190
52783
|
return [result, { status: "complete", request: req, response }];
|
|
52191
52784
|
}
|
|
52192
|
-
var
|
|
52193
|
-
init_lib();
|
|
52785
|
+
var init_merchantAccountsGet = __esm(() => {
|
|
52194
52786
|
init_encodings();
|
|
52195
52787
|
init_matchers();
|
|
52196
52788
|
init_primitives();
|
|
52197
52789
|
init_schemas();
|
|
52198
52790
|
init_security();
|
|
52199
52791
|
init_url();
|
|
52792
|
+
init_components();
|
|
52200
52793
|
init_errors();
|
|
52201
52794
|
init_operations();
|
|
52202
52795
|
init_async();
|
|
52203
52796
|
});
|
|
52204
52797
|
|
|
52205
|
-
// src/mcp-server/tools/
|
|
52206
|
-
var args36, tool$
|
|
52207
|
-
var
|
|
52798
|
+
// src/mcp-server/tools/merchantAccountsGet.ts
|
|
52799
|
+
var args36, tool$merchantAccountsGet;
|
|
52800
|
+
var init_merchantAccountsGet2 = __esm(() => {
|
|
52208
52801
|
init_lib();
|
|
52209
|
-
|
|
52802
|
+
init_merchantAccountsGet();
|
|
52210
52803
|
init_tools();
|
|
52211
52804
|
args36 = {
|
|
52212
|
-
|
|
52213
|
-
merchantAccountId: nullableType(stringType()).optional()
|
|
52805
|
+
merchantAccountId: stringType()
|
|
52214
52806
|
};
|
|
52215
|
-
tool$
|
|
52216
|
-
name: "
|
|
52217
|
-
description: `
|
|
52807
|
+
tool$merchantAccountsGet = {
|
|
52808
|
+
name: "merchant-accounts-get",
|
|
52809
|
+
description: `Get a merchant account
|
|
52218
52810
|
|
|
52219
|
-
|
|
52811
|
+
Get info about a merchant account in an instance.`,
|
|
52220
52812
|
args: args36,
|
|
52221
52813
|
tool: async (client, args37, ctx) => {
|
|
52222
|
-
const [result, apiCall] = await
|
|
52814
|
+
const [result, apiCall] = await merchantAccountsGet(client, args37.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
52223
52815
|
if (!result.ok) {
|
|
52224
52816
|
return {
|
|
52225
52817
|
content: [{ type: "text", text: result.error.message }],
|
|
52226
52818
|
isError: true
|
|
52227
52819
|
};
|
|
52228
52820
|
}
|
|
52229
|
-
|
|
52821
|
+
const value = result.value;
|
|
52822
|
+
return formatResult(value, apiCall);
|
|
52230
52823
|
}
|
|
52231
52824
|
};
|
|
52232
52825
|
});
|
|
52233
52826
|
|
|
52234
|
-
// src/funcs/
|
|
52235
|
-
function
|
|
52236
|
-
return new APIPromise($do37(client,
|
|
52827
|
+
// src/funcs/merchantAccountsList.ts
|
|
52828
|
+
function merchantAccountsList(client, cursor, limit, search, options) {
|
|
52829
|
+
return new APIPromise($do37(client, cursor, limit, search, options));
|
|
52237
52830
|
}
|
|
52238
|
-
async function $do37(client,
|
|
52831
|
+
async function $do37(client, cursor, limit, search, options) {
|
|
52239
52832
|
const input = {
|
|
52240
|
-
|
|
52241
|
-
|
|
52833
|
+
cursor,
|
|
52834
|
+
limit,
|
|
52835
|
+
search
|
|
52242
52836
|
};
|
|
52243
|
-
const parsed = safeParse(input, (value) =>
|
|
52837
|
+
const parsed = safeParse(input, (value) => ListMerchantAccountsRequest$outboundSchema.optional().parse(value), "Input validation failed");
|
|
52244
52838
|
if (!parsed.ok) {
|
|
52245
|
-
return [parsed, { status: "invalid" }];
|
|
52839
|
+
return [haltIterator(parsed), { status: "invalid" }];
|
|
52246
52840
|
}
|
|
52247
52841
|
const payload = parsed.value;
|
|
52248
52842
|
const body = null;
|
|
52249
|
-
const
|
|
52250
|
-
|
|
52251
|
-
|
|
52252
|
-
|
|
52843
|
+
const path = pathToFunc("/merchant-accounts")();
|
|
52844
|
+
const query = encodeFormQuery({
|
|
52845
|
+
cursor: payload?.cursor,
|
|
52846
|
+
limit: payload?.limit,
|
|
52847
|
+
search: payload?.search
|
|
52848
|
+
});
|
|
52253
52849
|
const headers = new Headers(compactMap({
|
|
52254
|
-
Accept: "application/json"
|
|
52255
|
-
"x-gr4vy-merchant-account-id": encodeSimple("x-gr4vy-merchant-account-id", payload.merchantAccountId ?? client._options.merchantAccountId, { explode: false, charEncoding: "none" })
|
|
52850
|
+
Accept: "application/json"
|
|
52256
52851
|
}));
|
|
52257
52852
|
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
52258
52853
|
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
52259
52854
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
52260
52855
|
const context = {
|
|
52261
52856
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
52262
|
-
operationID: "
|
|
52857
|
+
operationID: "list_merchant_accounts",
|
|
52263
52858
|
oAuth2Scopes: [],
|
|
52264
52859
|
resolvedSecurity: requestSecurity,
|
|
52265
52860
|
securitySource: client._options.bearerAuth,
|
|
@@ -52281,11 +52876,12 @@ async function $do37(client, paymentMethodId, merchantAccountId, options) {
|
|
|
52281
52876
|
baseURL: options?.serverURL,
|
|
52282
52877
|
path,
|
|
52283
52878
|
headers,
|
|
52879
|
+
query,
|
|
52284
52880
|
body,
|
|
52285
52881
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
52286
52882
|
}, options);
|
|
52287
52883
|
if (!requestRes.ok) {
|
|
52288
|
-
return [requestRes, { status: "invalid" }];
|
|
52884
|
+
return [haltIterator(requestRes), { status: "invalid" }];
|
|
52289
52885
|
}
|
|
52290
52886
|
const req = requestRes.value;
|
|
52291
52887
|
const doResult = await client._do(req, {
|
|
@@ -52310,109 +52906,125 @@ async function $do37(client, paymentMethodId, merchantAccountId, options) {
|
|
|
52310
52906
|
retryCodes: context.retryCodes
|
|
52311
52907
|
});
|
|
52312
52908
|
if (!doResult.ok) {
|
|
52313
|
-
return [doResult, { status: "request-error", request: req }];
|
|
52909
|
+
return [haltIterator(doResult), { status: "request-error", request: req }];
|
|
52314
52910
|
}
|
|
52315
52911
|
const response = doResult.value;
|
|
52316
52912
|
const responseFields = {
|
|
52317
52913
|
HttpMeta: { Response: response, Request: req }
|
|
52318
52914
|
};
|
|
52319
|
-
const [result] = await match(json(200,
|
|
52915
|
+
const [result, raw] = await match(json(200, ListMerchantAccountsResponse$inboundSchema, {
|
|
52916
|
+
key: "Result"
|
|
52917
|
+
}), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, ListMerchantAccountsResponse403ListMerchantAccounts$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 });
|
|
52320
52918
|
if (!result.ok) {
|
|
52321
|
-
return [result, {
|
|
52919
|
+
return [haltIterator(result), {
|
|
52920
|
+
status: "complete",
|
|
52921
|
+
request: req,
|
|
52922
|
+
response
|
|
52923
|
+
}];
|
|
52322
52924
|
}
|
|
52323
|
-
|
|
52925
|
+
const nextFunc = (responseData) => {
|
|
52926
|
+
const nextCursor = dlv(responseData, "next_cursor");
|
|
52927
|
+
if (typeof nextCursor !== "string") {
|
|
52928
|
+
return { next: () => null };
|
|
52929
|
+
}
|
|
52930
|
+
const nextVal = () => merchantAccountsList(client, nextCursor, limit, search, options);
|
|
52931
|
+
return { next: nextVal, "~next": { cursor: nextCursor } };
|
|
52932
|
+
};
|
|
52933
|
+
const page = { ...result, ...nextFunc(raw) };
|
|
52934
|
+
return [{ ...page, ...createPageIterator(page, (v2) => !v2.ok) }, {
|
|
52935
|
+
status: "complete",
|
|
52936
|
+
request: req,
|
|
52937
|
+
response
|
|
52938
|
+
}];
|
|
52324
52939
|
}
|
|
52325
|
-
var
|
|
52940
|
+
var init_merchantAccountsList = __esm(() => {
|
|
52326
52941
|
init_encodings();
|
|
52327
52942
|
init_matchers();
|
|
52328
52943
|
init_primitives();
|
|
52329
52944
|
init_schemas();
|
|
52330
52945
|
init_security();
|
|
52331
52946
|
init_url();
|
|
52332
|
-
init_components();
|
|
52333
52947
|
init_errors();
|
|
52334
52948
|
init_operations();
|
|
52335
52949
|
init_async();
|
|
52950
|
+
init_operations2();
|
|
52336
52951
|
});
|
|
52337
52952
|
|
|
52338
|
-
// src/mcp-server/tools/
|
|
52339
|
-
var args37, tool$
|
|
52340
|
-
var
|
|
52953
|
+
// src/mcp-server/tools/merchantAccountsList.ts
|
|
52954
|
+
var args37, tool$merchantAccountsList;
|
|
52955
|
+
var init_merchantAccountsList2 = __esm(() => {
|
|
52341
52956
|
init_lib();
|
|
52342
|
-
|
|
52957
|
+
init_merchantAccountsList();
|
|
52343
52958
|
init_tools();
|
|
52344
52959
|
args37 = {
|
|
52345
|
-
|
|
52346
|
-
|
|
52960
|
+
cursor: nullableType(stringType()).optional(),
|
|
52961
|
+
limit: numberType().int().default(20),
|
|
52962
|
+
search: nullableType(stringType()).optional()
|
|
52347
52963
|
};
|
|
52348
|
-
tool$
|
|
52349
|
-
name: "
|
|
52350
|
-
description: `
|
|
52964
|
+
tool$merchantAccountsList = {
|
|
52965
|
+
name: "merchant-accounts-list",
|
|
52966
|
+
description: `List all merchant accounts
|
|
52351
52967
|
|
|
52352
|
-
|
|
52968
|
+
List all merchant accounts in an instance.`,
|
|
52353
52969
|
args: args37,
|
|
52354
52970
|
tool: async (client, args38, ctx) => {
|
|
52355
|
-
const [result, apiCall] = await
|
|
52971
|
+
const [result, apiCall] = await merchantAccountsList(client, args38.cursor, args38.limit, args38.search, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
52356
52972
|
if (!result.ok) {
|
|
52357
52973
|
return {
|
|
52358
52974
|
content: [{ type: "text", text: result.error.message }],
|
|
52359
52975
|
isError: true
|
|
52360
52976
|
};
|
|
52361
52977
|
}
|
|
52362
|
-
const value = result.value;
|
|
52978
|
+
const value = result.value.result;
|
|
52363
52979
|
return formatResult(value, apiCall);
|
|
52364
52980
|
}
|
|
52365
52981
|
};
|
|
52366
52982
|
});
|
|
52367
52983
|
|
|
52368
|
-
// src/funcs/
|
|
52369
|
-
function
|
|
52370
|
-
return new APIPromise($do38(client,
|
|
52984
|
+
// src/funcs/merchantAccountsUpdate.ts
|
|
52985
|
+
function merchantAccountsUpdate(client, merchantAccountUpdate, merchantAccountId, timeoutInSeconds, options) {
|
|
52986
|
+
return new APIPromise($do38(client, merchantAccountUpdate, merchantAccountId, timeoutInSeconds, options));
|
|
52371
52987
|
}
|
|
52372
|
-
async function $do38(client,
|
|
52373
|
-
const
|
|
52988
|
+
async function $do38(client, merchantAccountUpdate, merchantAccountId, timeoutInSeconds, options) {
|
|
52989
|
+
const input = {
|
|
52990
|
+
merchantAccountUpdate,
|
|
52991
|
+
merchantAccountId,
|
|
52992
|
+
timeoutInSeconds
|
|
52993
|
+
};
|
|
52994
|
+
const parsed = safeParse(input, (value) => UpdateMerchantAccountRequest$outboundSchema.parse(value), "Input validation failed");
|
|
52374
52995
|
if (!parsed.ok) {
|
|
52375
|
-
return [
|
|
52996
|
+
return [parsed, { status: "invalid" }];
|
|
52376
52997
|
}
|
|
52377
52998
|
const payload = parsed.value;
|
|
52378
|
-
const body =
|
|
52379
|
-
|
|
52999
|
+
const body = encodeJSON("body", payload.MerchantAccountUpdate, {
|
|
53000
|
+
explode: true
|
|
53001
|
+
});
|
|
53002
|
+
const pathParams = {
|
|
53003
|
+
merchant_account_id: encodeSimple("merchant_account_id", payload.merchant_account_id, { explode: false, charEncoding: "percent" })
|
|
53004
|
+
};
|
|
53005
|
+
const path = pathToFunc("/merchant-accounts/{merchant_account_id}")(pathParams);
|
|
52380
53006
|
const query = encodeFormQuery({
|
|
52381
|
-
|
|
52382
|
-
buyer_id: payload?.buyer_id,
|
|
52383
|
-
cursor: payload?.cursor,
|
|
52384
|
-
external_identifier: payload?.external_identifier,
|
|
52385
|
-
limit: payload?.limit,
|
|
52386
|
-
status: payload?.status
|
|
53007
|
+
timeout_in_seconds: payload.timeout_in_seconds
|
|
52387
53008
|
});
|
|
52388
53009
|
const headers = new Headers(compactMap({
|
|
52389
|
-
|
|
52390
|
-
|
|
53010
|
+
"Content-Type": "application/json",
|
|
53011
|
+
Accept: "application/json"
|
|
52391
53012
|
}));
|
|
52392
53013
|
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
52393
53014
|
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
52394
53015
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
52395
53016
|
const context = {
|
|
52396
53017
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
52397
|
-
operationID: "
|
|
53018
|
+
operationID: "update_merchant_account",
|
|
52398
53019
|
oAuth2Scopes: [],
|
|
52399
53020
|
resolvedSecurity: requestSecurity,
|
|
52400
53021
|
securitySource: client._options.bearerAuth,
|
|
52401
|
-
retryConfig: options?.retries || client._options.retryConfig || {
|
|
52402
|
-
|
|
52403
|
-
backoff: {
|
|
52404
|
-
initialInterval: 200,
|
|
52405
|
-
maxInterval: 200,
|
|
52406
|
-
exponent: 1,
|
|
52407
|
-
maxElapsedTime: 1000
|
|
52408
|
-
},
|
|
52409
|
-
retryConnectionErrors: true
|
|
52410
|
-
},
|
|
52411
|
-
retryCodes: options?.retryCodes || ["5XX"]
|
|
53022
|
+
retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
|
|
53023
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
|
|
52412
53024
|
};
|
|
52413
53025
|
const requestRes = client._createRequest(context, {
|
|
52414
53026
|
security: requestSecurity,
|
|
52415
|
-
method: "
|
|
53027
|
+
method: "PUT",
|
|
52416
53028
|
baseURL: options?.serverURL,
|
|
52417
53029
|
path,
|
|
52418
53030
|
headers,
|
|
@@ -52421,7 +53033,7 @@ async function $do38(client, request, options) {
|
|
|
52421
53033
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
52422
53034
|
}, options);
|
|
52423
53035
|
if (!requestRes.ok) {
|
|
52424
|
-
return [
|
|
53036
|
+
return [requestRes, { status: "invalid" }];
|
|
52425
53037
|
}
|
|
52426
53038
|
const req = requestRes.value;
|
|
52427
53039
|
const doResult = await client._do(req, {
|
|
@@ -52446,105 +53058,80 @@ async function $do38(client, request, options) {
|
|
|
52446
53058
|
retryCodes: context.retryCodes
|
|
52447
53059
|
});
|
|
52448
53060
|
if (!doResult.ok) {
|
|
52449
|
-
return [
|
|
53061
|
+
return [doResult, { status: "request-error", request: req }];
|
|
52450
53062
|
}
|
|
52451
53063
|
const response = doResult.value;
|
|
52452
53064
|
const responseFields = {
|
|
52453
53065
|
HttpMeta: { Response: response, Request: req }
|
|
52454
53066
|
};
|
|
52455
|
-
const [result
|
|
52456
|
-
key: "Result"
|
|
52457
|
-
}), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, ListPaymentMethodsResponse403ListPaymentMethods$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 });
|
|
53067
|
+
const [result] = await match(json(200, MerchantAccount$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, UpdateMerchantAccountResponse403UpdateMerchantAccount$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 });
|
|
52458
53068
|
if (!result.ok) {
|
|
52459
|
-
return [
|
|
52460
|
-
status: "complete",
|
|
52461
|
-
request: req,
|
|
52462
|
-
response
|
|
52463
|
-
}];
|
|
53069
|
+
return [result, { status: "complete", request: req, response }];
|
|
52464
53070
|
}
|
|
52465
|
-
|
|
52466
|
-
const nextCursor = dlv(responseData, "next_cursor");
|
|
52467
|
-
if (typeof nextCursor !== "string") {
|
|
52468
|
-
return { next: () => null };
|
|
52469
|
-
}
|
|
52470
|
-
const nextVal = () => paymentMethodsList(client, {
|
|
52471
|
-
...request,
|
|
52472
|
-
cursor: nextCursor
|
|
52473
|
-
}, options);
|
|
52474
|
-
return { next: nextVal, "~next": { cursor: nextCursor } };
|
|
52475
|
-
};
|
|
52476
|
-
const page = { ...result, ...nextFunc(raw) };
|
|
52477
|
-
return [{ ...page, ...createPageIterator(page, (v2) => !v2.ok) }, {
|
|
52478
|
-
status: "complete",
|
|
52479
|
-
request: req,
|
|
52480
|
-
response
|
|
52481
|
-
}];
|
|
53071
|
+
return [result, { status: "complete", request: req, response }];
|
|
52482
53072
|
}
|
|
52483
|
-
var
|
|
53073
|
+
var init_merchantAccountsUpdate = __esm(() => {
|
|
52484
53074
|
init_encodings();
|
|
52485
53075
|
init_matchers();
|
|
52486
53076
|
init_primitives();
|
|
52487
53077
|
init_schemas();
|
|
52488
53078
|
init_security();
|
|
52489
53079
|
init_url();
|
|
53080
|
+
init_components();
|
|
52490
53081
|
init_errors();
|
|
52491
53082
|
init_operations();
|
|
52492
53083
|
init_async();
|
|
52493
|
-
init_operations2();
|
|
52494
53084
|
});
|
|
52495
53085
|
|
|
52496
|
-
// src/mcp-server/tools/
|
|
52497
|
-
var args38, tool$
|
|
52498
|
-
var
|
|
52499
|
-
|
|
52500
|
-
|
|
53086
|
+
// src/mcp-server/tools/merchantAccountsUpdate.ts
|
|
53087
|
+
var args38, tool$merchantAccountsUpdate;
|
|
53088
|
+
var init_merchantAccountsUpdate2 = __esm(() => {
|
|
53089
|
+
init_lib();
|
|
53090
|
+
init_merchantAccountsUpdate();
|
|
53091
|
+
init_components();
|
|
52501
53092
|
init_tools();
|
|
52502
53093
|
args38 = {
|
|
52503
|
-
|
|
53094
|
+
merchantAccountUpdate: MerchantAccountUpdate$inboundSchema,
|
|
53095
|
+
merchantAccountId: stringType(),
|
|
53096
|
+
timeoutInSeconds: numberType().default(1)
|
|
52504
53097
|
};
|
|
52505
|
-
tool$
|
|
52506
|
-
name: "
|
|
52507
|
-
description: `
|
|
53098
|
+
tool$merchantAccountsUpdate = {
|
|
53099
|
+
name: "merchant-accounts-update",
|
|
53100
|
+
description: `Update a merchant account
|
|
52508
53101
|
|
|
52509
|
-
|
|
53102
|
+
Update info for a merchant account in an instance.`,
|
|
52510
53103
|
args: args38,
|
|
52511
53104
|
tool: async (client, args39, ctx) => {
|
|
52512
|
-
const [result, apiCall] = await
|
|
53105
|
+
const [result, apiCall] = await merchantAccountsUpdate(client, args39.merchantAccountUpdate, args39.merchantAccountId, args39.timeoutInSeconds, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
52513
53106
|
if (!result.ok) {
|
|
52514
53107
|
return {
|
|
52515
53108
|
content: [{ type: "text", text: result.error.message }],
|
|
52516
53109
|
isError: true
|
|
52517
53110
|
};
|
|
52518
53111
|
}
|
|
52519
|
-
const value = result.value
|
|
53112
|
+
const value = result.value;
|
|
52520
53113
|
return formatResult(value, apiCall);
|
|
52521
53114
|
}
|
|
52522
53115
|
};
|
|
52523
53116
|
});
|
|
52524
53117
|
|
|
52525
|
-
// src/funcs/
|
|
52526
|
-
function
|
|
52527
|
-
return new APIPromise($do39(client,
|
|
53118
|
+
// src/funcs/paymentMethodsCreate.ts
|
|
53119
|
+
function paymentMethodsCreate(client, requestBody, timeoutInSeconds, merchantAccountId, options) {
|
|
53120
|
+
return new APIPromise($do39(client, requestBody, timeoutInSeconds, merchantAccountId, options));
|
|
52528
53121
|
}
|
|
52529
|
-
async function $do39(client,
|
|
53122
|
+
async function $do39(client, requestBody, timeoutInSeconds, merchantAccountId, options) {
|
|
52530
53123
|
const input = {
|
|
52531
|
-
|
|
52532
|
-
paymentMethodId,
|
|
53124
|
+
requestBody,
|
|
52533
53125
|
timeoutInSeconds,
|
|
52534
53126
|
merchantAccountId
|
|
52535
53127
|
};
|
|
52536
|
-
const parsed = safeParse(input, (value) =>
|
|
53128
|
+
const parsed = safeParse(input, (value) => CreatePaymentMethodRequest$outboundSchema.parse(value), "Input validation failed");
|
|
52537
53129
|
if (!parsed.ok) {
|
|
52538
53130
|
return [parsed, { status: "invalid" }];
|
|
52539
53131
|
}
|
|
52540
53132
|
const payload = parsed.value;
|
|
52541
|
-
const body = encodeJSON("body", payload.
|
|
52542
|
-
|
|
52543
|
-
});
|
|
52544
|
-
const pathParams = {
|
|
52545
|
-
payment_method_id: encodeSimple("payment_method_id", payload.payment_method_id, { explode: false, charEncoding: "percent" })
|
|
52546
|
-
};
|
|
52547
|
-
const path = pathToFunc("/payment-methods/{payment_method_id}/network-tokens")(pathParams);
|
|
53133
|
+
const body = encodeJSON("body", payload.RequestBody, { explode: true });
|
|
53134
|
+
const path = pathToFunc("/payment-methods")();
|
|
52548
53135
|
const query = encodeFormQuery({
|
|
52549
53136
|
timeout_in_seconds: payload.timeout_in_seconds
|
|
52550
53137
|
});
|
|
@@ -52558,7 +53145,7 @@ async function $do39(client, networkTokenCreate, paymentMethodId, timeoutInSecon
|
|
|
52558
53145
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
52559
53146
|
const context = {
|
|
52560
53147
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
52561
|
-
operationID: "
|
|
53148
|
+
operationID: "create_payment_method",
|
|
52562
53149
|
oAuth2Scopes: [],
|
|
52563
53150
|
resolvedSecurity: requestSecurity,
|
|
52564
53151
|
securitySource: client._options.bearerAuth,
|
|
@@ -52607,13 +53194,13 @@ async function $do39(client, networkTokenCreate, paymentMethodId, timeoutInSecon
|
|
|
52607
53194
|
const responseFields = {
|
|
52608
53195
|
HttpMeta: { Response: response, Request: req }
|
|
52609
53196
|
};
|
|
52610
|
-
const [result] = await match(json(201,
|
|
53197
|
+
const [result] = await match(json(201, PaymentMethod$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, CreatePaymentMethodResponse403CreatePaymentMethod$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 });
|
|
52611
53198
|
if (!result.ok) {
|
|
52612
53199
|
return [result, { status: "complete", request: req, response }];
|
|
52613
53200
|
}
|
|
52614
53201
|
return [result, { status: "complete", request: req, response }];
|
|
52615
53202
|
}
|
|
52616
|
-
var
|
|
53203
|
+
var init_paymentMethodsCreate = __esm(() => {
|
|
52617
53204
|
init_encodings();
|
|
52618
53205
|
init_matchers();
|
|
52619
53206
|
init_primitives();
|
|
@@ -52626,27 +53213,26 @@ var init_paymentMethodsNetworkTokensCreate = __esm(() => {
|
|
|
52626
53213
|
init_async();
|
|
52627
53214
|
});
|
|
52628
53215
|
|
|
52629
|
-
// src/mcp-server/tools/
|
|
52630
|
-
var args39, tool$
|
|
52631
|
-
var
|
|
53216
|
+
// src/mcp-server/tools/paymentMethodsCreate.ts
|
|
53217
|
+
var args39, tool$paymentMethodsCreate;
|
|
53218
|
+
var init_paymentMethodsCreate2 = __esm(() => {
|
|
52632
53219
|
init_lib();
|
|
52633
|
-
|
|
52634
|
-
|
|
53220
|
+
init_paymentMethodsCreate();
|
|
53221
|
+
init_operations();
|
|
52635
53222
|
init_tools();
|
|
52636
53223
|
args39 = {
|
|
52637
|
-
|
|
52638
|
-
paymentMethodId: stringType(),
|
|
53224
|
+
requestBody: CreatePaymentMethodBody$inboundSchema,
|
|
52639
53225
|
timeoutInSeconds: numberType().default(1),
|
|
52640
53226
|
merchantAccountId: nullableType(stringType()).optional()
|
|
52641
53227
|
};
|
|
52642
|
-
tool$
|
|
52643
|
-
name: "payment-methods-
|
|
52644
|
-
description: `
|
|
53228
|
+
tool$paymentMethodsCreate = {
|
|
53229
|
+
name: "payment-methods-create",
|
|
53230
|
+
description: `Create payment method
|
|
52645
53231
|
|
|
52646
|
-
|
|
53232
|
+
Store a new payment method.`,
|
|
52647
53233
|
args: args39,
|
|
52648
53234
|
tool: async (client, args40, ctx) => {
|
|
52649
|
-
const [result, apiCall] = await
|
|
53235
|
+
const [result, apiCall] = await paymentMethodsCreate(client, args40.requestBody, args40.timeoutInSeconds, args40.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
52650
53236
|
if (!result.ok) {
|
|
52651
53237
|
return {
|
|
52652
53238
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -52659,27 +53245,26 @@ Provision a network token for a payment method.`,
|
|
|
52659
53245
|
};
|
|
52660
53246
|
});
|
|
52661
53247
|
|
|
52662
|
-
// src/funcs/
|
|
52663
|
-
function
|
|
52664
|
-
return new APIPromise($do40(client,
|
|
53248
|
+
// src/funcs/paymentMethodsDelete.ts
|
|
53249
|
+
function paymentMethodsDelete(client, paymentMethodId, merchantAccountId, options) {
|
|
53250
|
+
return new APIPromise($do40(client, paymentMethodId, merchantAccountId, options));
|
|
52665
53251
|
}
|
|
52666
|
-
async function $do40(client,
|
|
52667
|
-
const
|
|
53252
|
+
async function $do40(client, paymentMethodId, merchantAccountId, options) {
|
|
53253
|
+
const input = {
|
|
53254
|
+
paymentMethodId,
|
|
53255
|
+
merchantAccountId
|
|
53256
|
+
};
|
|
53257
|
+
const parsed = safeParse(input, (value) => DeletePaymentMethodRequest$outboundSchema.parse(value), "Input validation failed");
|
|
52668
53258
|
if (!parsed.ok) {
|
|
52669
53259
|
return [parsed, { status: "invalid" }];
|
|
52670
53260
|
}
|
|
52671
53261
|
const payload = parsed.value;
|
|
52672
|
-
const body =
|
|
53262
|
+
const body = null;
|
|
52673
53263
|
const pathParams = {
|
|
52674
|
-
network_token_id: encodeSimple("network_token_id", payload.network_token_id, { explode: false, charEncoding: "percent" }),
|
|
52675
53264
|
payment_method_id: encodeSimple("payment_method_id", payload.payment_method_id, { explode: false, charEncoding: "percent" })
|
|
52676
53265
|
};
|
|
52677
|
-
const path = pathToFunc("/payment-methods/{payment_method_id}
|
|
52678
|
-
const query = encodeFormQuery({
|
|
52679
|
-
timeout_in_seconds: payload.timeout_in_seconds
|
|
52680
|
-
});
|
|
53266
|
+
const path = pathToFunc("/payment-methods/{payment_method_id}")(pathParams);
|
|
52681
53267
|
const headers = new Headers(compactMap({
|
|
52682
|
-
"Content-Type": "application/json",
|
|
52683
53268
|
Accept: "application/json",
|
|
52684
53269
|
"x-gr4vy-merchant-account-id": encodeSimple("x-gr4vy-merchant-account-id", payload.merchantAccountId ?? client._options.merchantAccountId, { explode: false, charEncoding: "none" })
|
|
52685
53270
|
}));
|
|
@@ -52688,7 +53273,7 @@ async function $do40(client, request, options) {
|
|
|
52688
53273
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
52689
53274
|
const context = {
|
|
52690
53275
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
52691
|
-
operationID: "
|
|
53276
|
+
operationID: "delete_payment_method",
|
|
52692
53277
|
oAuth2Scopes: [],
|
|
52693
53278
|
resolvedSecurity: requestSecurity,
|
|
52694
53279
|
securitySource: client._options.bearerAuth,
|
|
@@ -52697,11 +53282,10 @@ async function $do40(client, request, options) {
|
|
|
52697
53282
|
};
|
|
52698
53283
|
const requestRes = client._createRequest(context, {
|
|
52699
53284
|
security: requestSecurity,
|
|
52700
|
-
method: "
|
|
53285
|
+
method: "DELETE",
|
|
52701
53286
|
baseURL: options?.serverURL,
|
|
52702
53287
|
path,
|
|
52703
53288
|
headers,
|
|
52704
|
-
query,
|
|
52705
53289
|
body,
|
|
52706
53290
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
52707
53291
|
}, options);
|
|
@@ -52737,79 +53321,73 @@ async function $do40(client, request, options) {
|
|
|
52737
53321
|
const responseFields = {
|
|
52738
53322
|
HttpMeta: { Response: response, Request: req }
|
|
52739
53323
|
};
|
|
52740
|
-
const [result] = await match(
|
|
53324
|
+
const [result] = await match(nil(204, voidType()), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, DeletePaymentMethodResponse403DeletePaymentMethod$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 });
|
|
52741
53325
|
if (!result.ok) {
|
|
52742
53326
|
return [result, { status: "complete", request: req, response }];
|
|
52743
53327
|
}
|
|
52744
53328
|
return [result, { status: "complete", request: req, response }];
|
|
52745
53329
|
}
|
|
52746
|
-
var
|
|
53330
|
+
var init_paymentMethodsDelete = __esm(() => {
|
|
53331
|
+
init_lib();
|
|
52747
53332
|
init_encodings();
|
|
52748
53333
|
init_matchers();
|
|
52749
53334
|
init_primitives();
|
|
52750
53335
|
init_schemas();
|
|
52751
53336
|
init_security();
|
|
52752
53337
|
init_url();
|
|
52753
|
-
init_components();
|
|
52754
53338
|
init_errors();
|
|
52755
53339
|
init_operations();
|
|
52756
53340
|
init_async();
|
|
52757
53341
|
});
|
|
52758
53342
|
|
|
52759
|
-
// src/mcp-server/tools/
|
|
52760
|
-
var args40, tool$
|
|
52761
|
-
var
|
|
52762
|
-
|
|
52763
|
-
|
|
53343
|
+
// src/mcp-server/tools/paymentMethodsDelete.ts
|
|
53344
|
+
var args40, tool$paymentMethodsDelete;
|
|
53345
|
+
var init_paymentMethodsDelete2 = __esm(() => {
|
|
53346
|
+
init_lib();
|
|
53347
|
+
init_paymentMethodsDelete();
|
|
52764
53348
|
init_tools();
|
|
52765
53349
|
args40 = {
|
|
52766
|
-
|
|
53350
|
+
paymentMethodId: stringType(),
|
|
53351
|
+
merchantAccountId: nullableType(stringType()).optional()
|
|
52767
53352
|
};
|
|
52768
|
-
tool$
|
|
52769
|
-
name: "payment-methods-
|
|
52770
|
-
description: `
|
|
53353
|
+
tool$paymentMethodsDelete = {
|
|
53354
|
+
name: "payment-methods-delete",
|
|
53355
|
+
description: `Delete payment method
|
|
52771
53356
|
|
|
52772
|
-
|
|
53357
|
+
Delete a payment method.`,
|
|
52773
53358
|
args: args40,
|
|
52774
53359
|
tool: async (client, args41, ctx) => {
|
|
52775
|
-
const [result, apiCall] = await
|
|
53360
|
+
const [result, apiCall] = await paymentMethodsDelete(client, args41.paymentMethodId, args41.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
52776
53361
|
if (!result.ok) {
|
|
52777
53362
|
return {
|
|
52778
53363
|
content: [{ type: "text", text: result.error.message }],
|
|
52779
53364
|
isError: true
|
|
52780
53365
|
};
|
|
52781
53366
|
}
|
|
52782
|
-
|
|
52783
|
-
return formatResult(value, apiCall);
|
|
53367
|
+
return formatResult(undefined, apiCall);
|
|
52784
53368
|
}
|
|
52785
53369
|
};
|
|
52786
53370
|
});
|
|
52787
53371
|
|
|
52788
|
-
// src/funcs/
|
|
52789
|
-
function
|
|
52790
|
-
return new APIPromise($do41(client, paymentMethodId,
|
|
53372
|
+
// src/funcs/paymentMethodsGet.ts
|
|
53373
|
+
function paymentMethodsGet(client, paymentMethodId, merchantAccountId, options) {
|
|
53374
|
+
return new APIPromise($do41(client, paymentMethodId, merchantAccountId, options));
|
|
52791
53375
|
}
|
|
52792
|
-
async function $do41(client, paymentMethodId,
|
|
53376
|
+
async function $do41(client, paymentMethodId, merchantAccountId, options) {
|
|
52793
53377
|
const input = {
|
|
52794
53378
|
paymentMethodId,
|
|
52795
|
-
networkTokenId,
|
|
52796
|
-
timeoutInSeconds,
|
|
52797
53379
|
merchantAccountId
|
|
52798
53380
|
};
|
|
52799
|
-
const parsed = safeParse(input, (value) =>
|
|
53381
|
+
const parsed = safeParse(input, (value) => GetPaymentMethodRequest$outboundSchema.parse(value), "Input validation failed");
|
|
52800
53382
|
if (!parsed.ok) {
|
|
52801
53383
|
return [parsed, { status: "invalid" }];
|
|
52802
53384
|
}
|
|
52803
53385
|
const payload = parsed.value;
|
|
52804
53386
|
const body = null;
|
|
52805
53387
|
const pathParams = {
|
|
52806
|
-
network_token_id: encodeSimple("network_token_id", payload.network_token_id, { explode: false, charEncoding: "percent" }),
|
|
52807
53388
|
payment_method_id: encodeSimple("payment_method_id", payload.payment_method_id, { explode: false, charEncoding: "percent" })
|
|
52808
53389
|
};
|
|
52809
|
-
const path = pathToFunc("/payment-methods/{payment_method_id}
|
|
52810
|
-
const query = encodeFormQuery({
|
|
52811
|
-
timeout_in_seconds: payload.timeout_in_seconds
|
|
52812
|
-
});
|
|
53390
|
+
const path = pathToFunc("/payment-methods/{payment_method_id}")(pathParams);
|
|
52813
53391
|
const headers = new Headers(compactMap({
|
|
52814
53392
|
Accept: "application/json",
|
|
52815
53393
|
"x-gr4vy-merchant-account-id": encodeSimple("x-gr4vy-merchant-account-id", payload.merchantAccountId ?? client._options.merchantAccountId, { explode: false, charEncoding: "none" })
|
|
@@ -52819,20 +53397,28 @@ async function $do41(client, paymentMethodId, networkTokenId, timeoutInSeconds,
|
|
|
52819
53397
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
52820
53398
|
const context = {
|
|
52821
53399
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
52822
|
-
operationID: "
|
|
53400
|
+
operationID: "get_payment_method",
|
|
52823
53401
|
oAuth2Scopes: [],
|
|
52824
53402
|
resolvedSecurity: requestSecurity,
|
|
52825
53403
|
securitySource: client._options.bearerAuth,
|
|
52826
|
-
retryConfig: options?.retries || client._options.retryConfig || {
|
|
52827
|
-
|
|
53404
|
+
retryConfig: options?.retries || client._options.retryConfig || {
|
|
53405
|
+
strategy: "backoff",
|
|
53406
|
+
backoff: {
|
|
53407
|
+
initialInterval: 200,
|
|
53408
|
+
maxInterval: 200,
|
|
53409
|
+
exponent: 1,
|
|
53410
|
+
maxElapsedTime: 1000
|
|
53411
|
+
},
|
|
53412
|
+
retryConnectionErrors: true
|
|
53413
|
+
},
|
|
53414
|
+
retryCodes: options?.retryCodes || ["5XX"]
|
|
52828
53415
|
};
|
|
52829
53416
|
const requestRes = client._createRequest(context, {
|
|
52830
53417
|
security: requestSecurity,
|
|
52831
|
-
method: "
|
|
53418
|
+
method: "GET",
|
|
52832
53419
|
baseURL: options?.serverURL,
|
|
52833
53420
|
path,
|
|
52834
53421
|
headers,
|
|
52835
|
-
query,
|
|
52836
53422
|
body,
|
|
52837
53423
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
52838
53424
|
}, options);
|
|
@@ -52868,85 +53454,85 @@ async function $do41(client, paymentMethodId, networkTokenId, timeoutInSeconds,
|
|
|
52868
53454
|
const responseFields = {
|
|
52869
53455
|
HttpMeta: { Response: response, Request: req }
|
|
52870
53456
|
};
|
|
52871
|
-
const [result] = await match(
|
|
53457
|
+
const [result] = await match(json(200, PaymentMethod$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, GetPaymentMethodResponse403GetPaymentMethod$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 });
|
|
52872
53458
|
if (!result.ok) {
|
|
52873
53459
|
return [result, { status: "complete", request: req, response }];
|
|
52874
53460
|
}
|
|
52875
53461
|
return [result, { status: "complete", request: req, response }];
|
|
52876
53462
|
}
|
|
52877
|
-
var
|
|
52878
|
-
init_lib();
|
|
53463
|
+
var init_paymentMethodsGet = __esm(() => {
|
|
52879
53464
|
init_encodings();
|
|
52880
53465
|
init_matchers();
|
|
52881
53466
|
init_primitives();
|
|
52882
53467
|
init_schemas();
|
|
52883
53468
|
init_security();
|
|
52884
53469
|
init_url();
|
|
53470
|
+
init_components();
|
|
52885
53471
|
init_errors();
|
|
52886
53472
|
init_operations();
|
|
52887
53473
|
init_async();
|
|
52888
53474
|
});
|
|
52889
53475
|
|
|
52890
|
-
// src/mcp-server/tools/
|
|
52891
|
-
var args41, tool$
|
|
52892
|
-
var
|
|
53476
|
+
// src/mcp-server/tools/paymentMethodsGet.ts
|
|
53477
|
+
var args41, tool$paymentMethodsGet;
|
|
53478
|
+
var init_paymentMethodsGet2 = __esm(() => {
|
|
52893
53479
|
init_lib();
|
|
52894
|
-
|
|
53480
|
+
init_paymentMethodsGet();
|
|
52895
53481
|
init_tools();
|
|
52896
53482
|
args41 = {
|
|
52897
53483
|
paymentMethodId: stringType(),
|
|
52898
|
-
networkTokenId: stringType(),
|
|
52899
|
-
timeoutInSeconds: numberType().default(1),
|
|
52900
53484
|
merchantAccountId: nullableType(stringType()).optional()
|
|
52901
53485
|
};
|
|
52902
|
-
tool$
|
|
52903
|
-
name: "payment-methods-
|
|
52904
|
-
description: `
|
|
53486
|
+
tool$paymentMethodsGet = {
|
|
53487
|
+
name: "payment-methods-get",
|
|
53488
|
+
description: `Get payment method
|
|
52905
53489
|
|
|
52906
|
-
|
|
53490
|
+
Retrieve a payment method.`,
|
|
52907
53491
|
args: args41,
|
|
52908
53492
|
tool: async (client, args42, ctx) => {
|
|
52909
|
-
const [result, apiCall] = await
|
|
53493
|
+
const [result, apiCall] = await paymentMethodsGet(client, args42.paymentMethodId, args42.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
52910
53494
|
if (!result.ok) {
|
|
52911
53495
|
return {
|
|
52912
53496
|
content: [{ type: "text", text: result.error.message }],
|
|
52913
53497
|
isError: true
|
|
52914
53498
|
};
|
|
52915
53499
|
}
|
|
52916
|
-
|
|
53500
|
+
const value = result.value;
|
|
53501
|
+
return formatResult(value, apiCall);
|
|
52917
53502
|
}
|
|
52918
53503
|
};
|
|
52919
53504
|
});
|
|
52920
53505
|
|
|
52921
|
-
// src/funcs/
|
|
52922
|
-
function
|
|
52923
|
-
return new APIPromise($do42(client,
|
|
53506
|
+
// src/funcs/paymentMethodsList.ts
|
|
53507
|
+
function paymentMethodsList(client, request, options) {
|
|
53508
|
+
return new APIPromise($do42(client, request, options));
|
|
52924
53509
|
}
|
|
52925
|
-
async function $do42(client,
|
|
52926
|
-
const
|
|
52927
|
-
paymentMethodId,
|
|
52928
|
-
merchantAccountId
|
|
52929
|
-
};
|
|
52930
|
-
const parsed = safeParse(input, (value) => ListPaymentMethodNetworkTokensRequest$outboundSchema.parse(value), "Input validation failed");
|
|
53510
|
+
async function $do42(client, request, options) {
|
|
53511
|
+
const parsed = safeParse(request, (value) => ListPaymentMethodsRequest$outboundSchema.optional().parse(value), "Input validation failed");
|
|
52931
53512
|
if (!parsed.ok) {
|
|
52932
|
-
return [parsed, { status: "invalid" }];
|
|
53513
|
+
return [haltIterator(parsed), { status: "invalid" }];
|
|
52933
53514
|
}
|
|
52934
53515
|
const payload = parsed.value;
|
|
52935
53516
|
const body = null;
|
|
52936
|
-
const
|
|
52937
|
-
|
|
52938
|
-
|
|
52939
|
-
|
|
53517
|
+
const path = pathToFunc("/payment-methods")();
|
|
53518
|
+
const query = encodeFormQuery({
|
|
53519
|
+
buyer_external_identifier: payload?.buyer_external_identifier,
|
|
53520
|
+
buyer_id: payload?.buyer_id,
|
|
53521
|
+
cursor: payload?.cursor,
|
|
53522
|
+
external_identifier: payload?.external_identifier,
|
|
53523
|
+
limit: payload?.limit,
|
|
53524
|
+
status: payload?.status
|
|
53525
|
+
});
|
|
52940
53526
|
const headers = new Headers(compactMap({
|
|
52941
53527
|
Accept: "application/json",
|
|
52942
|
-
"x-gr4vy-merchant-account-id": encodeSimple("x-gr4vy-merchant-account-id", payload
|
|
53528
|
+
"x-gr4vy-merchant-account-id": encodeSimple("x-gr4vy-merchant-account-id", payload?.merchantAccountId ?? client._options.merchantAccountId, { explode: false, charEncoding: "none" })
|
|
52943
53529
|
}));
|
|
52944
53530
|
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
52945
53531
|
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
52946
53532
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
52947
53533
|
const context = {
|
|
52948
53534
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
52949
|
-
operationID: "
|
|
53535
|
+
operationID: "list_payment_methods",
|
|
52950
53536
|
oAuth2Scopes: [],
|
|
52951
53537
|
resolvedSecurity: requestSecurity,
|
|
52952
53538
|
securitySource: client._options.bearerAuth,
|
|
@@ -52968,11 +53554,12 @@ async function $do42(client, paymentMethodId, merchantAccountId, options) {
|
|
|
52968
53554
|
baseURL: options?.serverURL,
|
|
52969
53555
|
path,
|
|
52970
53556
|
headers,
|
|
53557
|
+
query,
|
|
52971
53558
|
body,
|
|
52972
53559
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
52973
53560
|
}, options);
|
|
52974
53561
|
if (!requestRes.ok) {
|
|
52975
|
-
return [requestRes, { status: "invalid" }];
|
|
53562
|
+
return [haltIterator(requestRes), { status: "invalid" }];
|
|
52976
53563
|
}
|
|
52977
53564
|
const req = requestRes.value;
|
|
52978
53565
|
const doResult = await client._do(req, {
|
|
@@ -52997,87 +53584,110 @@ async function $do42(client, paymentMethodId, merchantAccountId, options) {
|
|
|
52997
53584
|
retryCodes: context.retryCodes
|
|
52998
53585
|
});
|
|
52999
53586
|
if (!doResult.ok) {
|
|
53000
|
-
return [doResult, { status: "request-error", request: req }];
|
|
53587
|
+
return [haltIterator(doResult), { status: "request-error", request: req }];
|
|
53001
53588
|
}
|
|
53002
53589
|
const response = doResult.value;
|
|
53003
53590
|
const responseFields = {
|
|
53004
53591
|
HttpMeta: { Response: response, Request: req }
|
|
53005
53592
|
};
|
|
53006
|
-
const [result] = await match(json(200,
|
|
53593
|
+
const [result, raw] = await match(json(200, ListPaymentMethodsResponse$inboundSchema, {
|
|
53594
|
+
key: "Result"
|
|
53595
|
+
}), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, ListPaymentMethodsResponse403ListPaymentMethods$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 });
|
|
53007
53596
|
if (!result.ok) {
|
|
53008
|
-
return [result, {
|
|
53597
|
+
return [haltIterator(result), {
|
|
53598
|
+
status: "complete",
|
|
53599
|
+
request: req,
|
|
53600
|
+
response
|
|
53601
|
+
}];
|
|
53009
53602
|
}
|
|
53010
|
-
|
|
53603
|
+
const nextFunc = (responseData) => {
|
|
53604
|
+
const nextCursor = dlv(responseData, "next_cursor");
|
|
53605
|
+
if (typeof nextCursor !== "string") {
|
|
53606
|
+
return { next: () => null };
|
|
53607
|
+
}
|
|
53608
|
+
const nextVal = () => paymentMethodsList(client, {
|
|
53609
|
+
...request,
|
|
53610
|
+
cursor: nextCursor
|
|
53611
|
+
}, options);
|
|
53612
|
+
return { next: nextVal, "~next": { cursor: nextCursor } };
|
|
53613
|
+
};
|
|
53614
|
+
const page = { ...result, ...nextFunc(raw) };
|
|
53615
|
+
return [{ ...page, ...createPageIterator(page, (v2) => !v2.ok) }, {
|
|
53616
|
+
status: "complete",
|
|
53617
|
+
request: req,
|
|
53618
|
+
response
|
|
53619
|
+
}];
|
|
53011
53620
|
}
|
|
53012
|
-
var
|
|
53621
|
+
var init_paymentMethodsList = __esm(() => {
|
|
53013
53622
|
init_encodings();
|
|
53014
53623
|
init_matchers();
|
|
53015
53624
|
init_primitives();
|
|
53016
53625
|
init_schemas();
|
|
53017
53626
|
init_security();
|
|
53018
53627
|
init_url();
|
|
53019
|
-
init_components();
|
|
53020
53628
|
init_errors();
|
|
53021
53629
|
init_operations();
|
|
53022
53630
|
init_async();
|
|
53631
|
+
init_operations2();
|
|
53023
53632
|
});
|
|
53024
53633
|
|
|
53025
|
-
// src/mcp-server/tools/
|
|
53026
|
-
var args42, tool$
|
|
53027
|
-
var
|
|
53028
|
-
|
|
53029
|
-
|
|
53634
|
+
// src/mcp-server/tools/paymentMethodsList.ts
|
|
53635
|
+
var args42, tool$paymentMethodsList;
|
|
53636
|
+
var init_paymentMethodsList2 = __esm(() => {
|
|
53637
|
+
init_paymentMethodsList();
|
|
53638
|
+
init_operations();
|
|
53030
53639
|
init_tools();
|
|
53031
53640
|
args42 = {
|
|
53032
|
-
|
|
53033
|
-
merchantAccountId: nullableType(stringType()).optional()
|
|
53641
|
+
request: ListPaymentMethodsRequest$inboundSchema.optional()
|
|
53034
53642
|
};
|
|
53035
|
-
tool$
|
|
53036
|
-
name: "payment-methods-
|
|
53037
|
-
description: `List
|
|
53643
|
+
tool$paymentMethodsList = {
|
|
53644
|
+
name: "payment-methods-list",
|
|
53645
|
+
description: `List all payment methods
|
|
53038
53646
|
|
|
53039
|
-
List all
|
|
53647
|
+
List all stored payment method.`,
|
|
53040
53648
|
args: args42,
|
|
53041
53649
|
tool: async (client, args43, ctx) => {
|
|
53042
|
-
const [result, apiCall] = await
|
|
53650
|
+
const [result, apiCall] = await paymentMethodsList(client, args43.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
53043
53651
|
if (!result.ok) {
|
|
53044
53652
|
return {
|
|
53045
53653
|
content: [{ type: "text", text: result.error.message }],
|
|
53046
53654
|
isError: true
|
|
53047
53655
|
};
|
|
53048
53656
|
}
|
|
53049
|
-
const value = result.value;
|
|
53657
|
+
const value = result.value.result;
|
|
53050
53658
|
return formatResult(value, apiCall);
|
|
53051
53659
|
}
|
|
53052
53660
|
};
|
|
53053
53661
|
});
|
|
53054
53662
|
|
|
53055
|
-
// src/funcs/
|
|
53056
|
-
function
|
|
53057
|
-
return new APIPromise($do43(client,
|
|
53663
|
+
// src/funcs/paymentMethodsNetworkTokensCreate.ts
|
|
53664
|
+
function paymentMethodsNetworkTokensCreate(client, networkTokenCreate, paymentMethodId, timeoutInSeconds, merchantAccountId, options) {
|
|
53665
|
+
return new APIPromise($do43(client, networkTokenCreate, paymentMethodId, timeoutInSeconds, merchantAccountId, options));
|
|
53058
53666
|
}
|
|
53059
|
-
async function $do43(client,
|
|
53667
|
+
async function $do43(client, networkTokenCreate, paymentMethodId, timeoutInSeconds, merchantAccountId, options) {
|
|
53060
53668
|
const input = {
|
|
53669
|
+
networkTokenCreate,
|
|
53061
53670
|
paymentMethodId,
|
|
53062
|
-
networkTokenId,
|
|
53063
53671
|
timeoutInSeconds,
|
|
53064
53672
|
merchantAccountId
|
|
53065
53673
|
};
|
|
53066
|
-
const parsed = safeParse(input, (value) =>
|
|
53674
|
+
const parsed = safeParse(input, (value) => CreatePaymentMethodNetworkTokenRequest$outboundSchema.parse(value), "Input validation failed");
|
|
53067
53675
|
if (!parsed.ok) {
|
|
53068
53676
|
return [parsed, { status: "invalid" }];
|
|
53069
53677
|
}
|
|
53070
53678
|
const payload = parsed.value;
|
|
53071
|
-
const body =
|
|
53679
|
+
const body = encodeJSON("body", payload.NetworkTokenCreate, {
|
|
53680
|
+
explode: true
|
|
53681
|
+
});
|
|
53072
53682
|
const pathParams = {
|
|
53073
|
-
network_token_id: encodeSimple("network_token_id", payload.network_token_id, { explode: false, charEncoding: "percent" }),
|
|
53074
53683
|
payment_method_id: encodeSimple("payment_method_id", payload.payment_method_id, { explode: false, charEncoding: "percent" })
|
|
53075
53684
|
};
|
|
53076
|
-
const path = pathToFunc("/payment-methods/{payment_method_id}/network-tokens
|
|
53685
|
+
const path = pathToFunc("/payment-methods/{payment_method_id}/network-tokens")(pathParams);
|
|
53077
53686
|
const query = encodeFormQuery({
|
|
53078
53687
|
timeout_in_seconds: payload.timeout_in_seconds
|
|
53079
53688
|
});
|
|
53080
53689
|
const headers = new Headers(compactMap({
|
|
53690
|
+
"Content-Type": "application/json",
|
|
53081
53691
|
Accept: "application/json",
|
|
53082
53692
|
"x-gr4vy-merchant-account-id": encodeSimple("x-gr4vy-merchant-account-id", payload.merchantAccountId ?? client._options.merchantAccountId, { explode: false, charEncoding: "none" })
|
|
53083
53693
|
}));
|
|
@@ -53086,7 +53696,7 @@ async function $do43(client, paymentMethodId, networkTokenId, timeoutInSeconds,
|
|
|
53086
53696
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
53087
53697
|
const context = {
|
|
53088
53698
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
53089
|
-
operationID: "
|
|
53699
|
+
operationID: "create_payment_method_network_token",
|
|
53090
53700
|
oAuth2Scopes: [],
|
|
53091
53701
|
resolvedSecurity: requestSecurity,
|
|
53092
53702
|
securitySource: client._options.bearerAuth,
|
|
@@ -53135,13 +53745,13 @@ async function $do43(client, paymentMethodId, networkTokenId, timeoutInSeconds,
|
|
|
53135
53745
|
const responseFields = {
|
|
53136
53746
|
HttpMeta: { Response: response, Request: req }
|
|
53137
53747
|
};
|
|
53138
|
-
const [result] = await match(json(
|
|
53748
|
+
const [result] = await match(json(201, NetworkToken$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, CreatePaymentMethodNetworkTokenResponse403CreatePaymentMethodNetworkToken$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 });
|
|
53139
53749
|
if (!result.ok) {
|
|
53140
53750
|
return [result, { status: "complete", request: req, response }];
|
|
53141
53751
|
}
|
|
53142
53752
|
return [result, { status: "complete", request: req, response }];
|
|
53143
53753
|
}
|
|
53144
|
-
var
|
|
53754
|
+
var init_paymentMethodsNetworkTokensCreate = __esm(() => {
|
|
53145
53755
|
init_encodings();
|
|
53146
53756
|
init_matchers();
|
|
53147
53757
|
init_primitives();
|
|
@@ -53154,26 +53764,27 @@ var init_paymentMethodsNetworkTokensResume = __esm(() => {
|
|
|
53154
53764
|
init_async();
|
|
53155
53765
|
});
|
|
53156
53766
|
|
|
53157
|
-
// src/mcp-server/tools/
|
|
53158
|
-
var args43, tool$
|
|
53159
|
-
var
|
|
53767
|
+
// src/mcp-server/tools/paymentMethodsNetworkTokensCreate.ts
|
|
53768
|
+
var args43, tool$paymentMethodsNetworkTokensCreate;
|
|
53769
|
+
var init_paymentMethodsNetworkTokensCreate2 = __esm(() => {
|
|
53160
53770
|
init_lib();
|
|
53161
|
-
|
|
53771
|
+
init_paymentMethodsNetworkTokensCreate();
|
|
53772
|
+
init_components();
|
|
53162
53773
|
init_tools();
|
|
53163
53774
|
args43 = {
|
|
53775
|
+
networkTokenCreate: NetworkTokenCreate$inboundSchema,
|
|
53164
53776
|
paymentMethodId: stringType(),
|
|
53165
|
-
networkTokenId: stringType(),
|
|
53166
53777
|
timeoutInSeconds: numberType().default(1),
|
|
53167
53778
|
merchantAccountId: nullableType(stringType()).optional()
|
|
53168
53779
|
};
|
|
53169
|
-
tool$
|
|
53170
|
-
name: "payment-methods-network-tokens-
|
|
53171
|
-
description: `
|
|
53780
|
+
tool$paymentMethodsNetworkTokensCreate = {
|
|
53781
|
+
name: "payment-methods-network-tokens-create",
|
|
53782
|
+
description: `Provision network token
|
|
53172
53783
|
|
|
53173
|
-
|
|
53784
|
+
Provision a network token for a payment method.`,
|
|
53174
53785
|
args: args43,
|
|
53175
53786
|
tool: async (client, args44, ctx) => {
|
|
53176
|
-
const [result, apiCall] = await
|
|
53787
|
+
const [result, apiCall] = await paymentMethodsNetworkTokensCreate(client, args44.networkTokenCreate, args44.paymentMethodId, args44.timeoutInSeconds, args44.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
53177
53788
|
if (!result.ok) {
|
|
53178
53789
|
return {
|
|
53179
53790
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -53186,32 +53797,27 @@ Resume a suspended network token for a payment method.`,
|
|
|
53186
53797
|
};
|
|
53187
53798
|
});
|
|
53188
53799
|
|
|
53189
|
-
// src/funcs/
|
|
53190
|
-
function
|
|
53191
|
-
return new APIPromise($do44(client,
|
|
53800
|
+
// src/funcs/paymentMethodsNetworkTokensCryptogramCreate.ts
|
|
53801
|
+
function paymentMethodsNetworkTokensCryptogramCreate(client, request, options) {
|
|
53802
|
+
return new APIPromise($do44(client, request, options));
|
|
53192
53803
|
}
|
|
53193
|
-
async function $do44(client,
|
|
53194
|
-
const
|
|
53195
|
-
paymentMethodId,
|
|
53196
|
-
networkTokenId,
|
|
53197
|
-
timeoutInSeconds,
|
|
53198
|
-
merchantAccountId
|
|
53199
|
-
};
|
|
53200
|
-
const parsed = safeParse(input, (value) => SuspendPaymentMethodNetworkTokenRequest$outboundSchema.parse(value), "Input validation failed");
|
|
53804
|
+
async function $do44(client, request, options) {
|
|
53805
|
+
const parsed = safeParse(request, (value) => CreatePaymentMethodNetworkTokenCryptogramRequest$outboundSchema.parse(value), "Input validation failed");
|
|
53201
53806
|
if (!parsed.ok) {
|
|
53202
53807
|
return [parsed, { status: "invalid" }];
|
|
53203
53808
|
}
|
|
53204
53809
|
const payload = parsed.value;
|
|
53205
|
-
const body =
|
|
53810
|
+
const body = encodeJSON("body", payload.CryptogramCreate, { explode: true });
|
|
53206
53811
|
const pathParams = {
|
|
53207
53812
|
network_token_id: encodeSimple("network_token_id", payload.network_token_id, { explode: false, charEncoding: "percent" }),
|
|
53208
53813
|
payment_method_id: encodeSimple("payment_method_id", payload.payment_method_id, { explode: false, charEncoding: "percent" })
|
|
53209
53814
|
};
|
|
53210
|
-
const path = pathToFunc("/payment-methods/{payment_method_id}/network-tokens/{network_token_id}/
|
|
53815
|
+
const path = pathToFunc("/payment-methods/{payment_method_id}/network-tokens/{network_token_id}/cryptogram")(pathParams);
|
|
53211
53816
|
const query = encodeFormQuery({
|
|
53212
53817
|
timeout_in_seconds: payload.timeout_in_seconds
|
|
53213
53818
|
});
|
|
53214
53819
|
const headers = new Headers(compactMap({
|
|
53820
|
+
"Content-Type": "application/json",
|
|
53215
53821
|
Accept: "application/json",
|
|
53216
53822
|
"x-gr4vy-merchant-account-id": encodeSimple("x-gr4vy-merchant-account-id", payload.merchantAccountId ?? client._options.merchantAccountId, { explode: false, charEncoding: "none" })
|
|
53217
53823
|
}));
|
|
@@ -53220,7 +53826,7 @@ async function $do44(client, paymentMethodId, networkTokenId, timeoutInSeconds,
|
|
|
53220
53826
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
53221
53827
|
const context = {
|
|
53222
53828
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
53223
|
-
operationID: "
|
|
53829
|
+
operationID: "create_payment_method_network_token_cryptogram",
|
|
53224
53830
|
oAuth2Scopes: [],
|
|
53225
53831
|
resolvedSecurity: requestSecurity,
|
|
53226
53832
|
securitySource: client._options.bearerAuth,
|
|
@@ -53269,13 +53875,13 @@ async function $do44(client, paymentMethodId, networkTokenId, timeoutInSeconds,
|
|
|
53269
53875
|
const responseFields = {
|
|
53270
53876
|
HttpMeta: { Response: response, Request: req }
|
|
53271
53877
|
};
|
|
53272
|
-
const [result] = await match(json(
|
|
53878
|
+
const [result] = await match(json(201, Cryptogram$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, CreatePaymentMethodNetworkTokenCryptogramResponse403CreatePaymentMethodNetworkTokenCryptogram$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 });
|
|
53273
53879
|
if (!result.ok) {
|
|
53274
53880
|
return [result, { status: "complete", request: req, response }];
|
|
53275
53881
|
}
|
|
53276
53882
|
return [result, { status: "complete", request: req, response }];
|
|
53277
53883
|
}
|
|
53278
|
-
var
|
|
53884
|
+
var init_paymentMethodsNetworkTokensCryptogramCreate = __esm(() => {
|
|
53279
53885
|
init_encodings();
|
|
53280
53886
|
init_matchers();
|
|
53281
53887
|
init_primitives();
|
|
@@ -53288,26 +53894,23 @@ var init_paymentMethodsNetworkTokensSuspend = __esm(() => {
|
|
|
53288
53894
|
init_async();
|
|
53289
53895
|
});
|
|
53290
53896
|
|
|
53291
|
-
// src/mcp-server/tools/
|
|
53292
|
-
var args44, tool$
|
|
53293
|
-
var
|
|
53294
|
-
|
|
53295
|
-
|
|
53897
|
+
// src/mcp-server/tools/paymentMethodsNetworkTokensCryptogramCreate.ts
|
|
53898
|
+
var args44, tool$paymentMethodsNetworkTokensCryptogramCreate;
|
|
53899
|
+
var init_paymentMethodsNetworkTokensCryptogramCreate2 = __esm(() => {
|
|
53900
|
+
init_paymentMethodsNetworkTokensCryptogramCreate();
|
|
53901
|
+
init_operations();
|
|
53296
53902
|
init_tools();
|
|
53297
53903
|
args44 = {
|
|
53298
|
-
|
|
53299
|
-
networkTokenId: stringType(),
|
|
53300
|
-
timeoutInSeconds: numberType().default(1),
|
|
53301
|
-
merchantAccountId: nullableType(stringType()).optional()
|
|
53904
|
+
request: CreatePaymentMethodNetworkTokenCryptogramRequest$inboundSchema
|
|
53302
53905
|
};
|
|
53303
|
-
tool$
|
|
53304
|
-
name: "payment-methods-network-tokens-
|
|
53305
|
-
description: `
|
|
53906
|
+
tool$paymentMethodsNetworkTokensCryptogramCreate = {
|
|
53907
|
+
name: "payment-methods-network-tokens-cryptogram-create",
|
|
53908
|
+
description: `Provision network token cryptogram
|
|
53306
53909
|
|
|
53307
|
-
|
|
53910
|
+
Provision a cryptogram for a network token.`,
|
|
53308
53911
|
args: args44,
|
|
53309
53912
|
tool: async (client, args45, ctx) => {
|
|
53310
|
-
const [result, apiCall] = await
|
|
53913
|
+
const [result, apiCall] = await paymentMethodsNetworkTokensCryptogramCreate(client, args45.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
53311
53914
|
if (!result.ok) {
|
|
53312
53915
|
return {
|
|
53313
53916
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -53320,34 +53923,32 @@ Suspend a network token for a payment method.`,
|
|
|
53320
53923
|
};
|
|
53321
53924
|
});
|
|
53322
53925
|
|
|
53323
|
-
// src/funcs/
|
|
53324
|
-
function
|
|
53325
|
-
return new APIPromise($do45(client,
|
|
53926
|
+
// src/funcs/paymentMethodsNetworkTokensDelete.ts
|
|
53927
|
+
function paymentMethodsNetworkTokensDelete(client, paymentMethodId, networkTokenId, timeoutInSeconds, merchantAccountId, options) {
|
|
53928
|
+
return new APIPromise($do45(client, paymentMethodId, networkTokenId, timeoutInSeconds, merchantAccountId, options));
|
|
53326
53929
|
}
|
|
53327
|
-
async function $do45(client,
|
|
53930
|
+
async function $do45(client, paymentMethodId, networkTokenId, timeoutInSeconds, merchantAccountId, options) {
|
|
53328
53931
|
const input = {
|
|
53329
|
-
paymentServiceTokenCreate,
|
|
53330
53932
|
paymentMethodId,
|
|
53933
|
+
networkTokenId,
|
|
53331
53934
|
timeoutInSeconds,
|
|
53332
53935
|
merchantAccountId
|
|
53333
53936
|
};
|
|
53334
|
-
const parsed = safeParse(input, (value) =>
|
|
53937
|
+
const parsed = safeParse(input, (value) => DeletePaymentMethodNetworkTokenRequest$outboundSchema.parse(value), "Input validation failed");
|
|
53335
53938
|
if (!parsed.ok) {
|
|
53336
53939
|
return [parsed, { status: "invalid" }];
|
|
53337
53940
|
}
|
|
53338
53941
|
const payload = parsed.value;
|
|
53339
|
-
const body =
|
|
53340
|
-
explode: true
|
|
53341
|
-
});
|
|
53942
|
+
const body = null;
|
|
53342
53943
|
const pathParams = {
|
|
53944
|
+
network_token_id: encodeSimple("network_token_id", payload.network_token_id, { explode: false, charEncoding: "percent" }),
|
|
53343
53945
|
payment_method_id: encodeSimple("payment_method_id", payload.payment_method_id, { explode: false, charEncoding: "percent" })
|
|
53344
53946
|
};
|
|
53345
|
-
const path = pathToFunc("/payment-methods/{payment_method_id}/
|
|
53947
|
+
const path = pathToFunc("/payment-methods/{payment_method_id}/network-tokens/{network_token_id}")(pathParams);
|
|
53346
53948
|
const query = encodeFormQuery({
|
|
53347
53949
|
timeout_in_seconds: payload.timeout_in_seconds
|
|
53348
53950
|
});
|
|
53349
53951
|
const headers = new Headers(compactMap({
|
|
53350
|
-
"Content-Type": "application/json",
|
|
53351
53952
|
Accept: "application/json",
|
|
53352
53953
|
"x-gr4vy-merchant-account-id": encodeSimple("x-gr4vy-merchant-account-id", payload.merchantAccountId ?? client._options.merchantAccountId, { explode: false, charEncoding: "none" })
|
|
53353
53954
|
}));
|
|
@@ -53356,7 +53957,7 @@ async function $do45(client, paymentServiceTokenCreate, paymentMethodId, timeout
|
|
|
53356
53957
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
53357
53958
|
const context = {
|
|
53358
53959
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
53359
|
-
operationID: "
|
|
53960
|
+
operationID: "delete_payment_method_network_token",
|
|
53360
53961
|
oAuth2Scopes: [],
|
|
53361
53962
|
resolvedSecurity: requestSecurity,
|
|
53362
53963
|
securitySource: client._options.bearerAuth,
|
|
@@ -53365,7 +53966,7 @@ async function $do45(client, paymentServiceTokenCreate, paymentMethodId, timeout
|
|
|
53365
53966
|
};
|
|
53366
53967
|
const requestRes = client._createRequest(context, {
|
|
53367
53968
|
security: requestSecurity,
|
|
53368
|
-
method: "
|
|
53969
|
+
method: "DELETE",
|
|
53369
53970
|
baseURL: options?.serverURL,
|
|
53370
53971
|
path,
|
|
53371
53972
|
headers,
|
|
@@ -53405,83 +54006,75 @@ async function $do45(client, paymentServiceTokenCreate, paymentMethodId, timeout
|
|
|
53405
54006
|
const responseFields = {
|
|
53406
54007
|
HttpMeta: { Response: response, Request: req }
|
|
53407
54008
|
};
|
|
53408
|
-
const [result] = await match(
|
|
54009
|
+
const [result] = await match(nil(204, voidType()), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, DeletePaymentMethodNetworkTokenResponse403DeletePaymentMethodNetworkToken$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 });
|
|
53409
54010
|
if (!result.ok) {
|
|
53410
54011
|
return [result, { status: "complete", request: req, response }];
|
|
53411
54012
|
}
|
|
53412
54013
|
return [result, { status: "complete", request: req, response }];
|
|
53413
54014
|
}
|
|
53414
|
-
var
|
|
54015
|
+
var init_paymentMethodsNetworkTokensDelete = __esm(() => {
|
|
54016
|
+
init_lib();
|
|
53415
54017
|
init_encodings();
|
|
53416
54018
|
init_matchers();
|
|
53417
54019
|
init_primitives();
|
|
53418
54020
|
init_schemas();
|
|
53419
54021
|
init_security();
|
|
53420
54022
|
init_url();
|
|
53421
|
-
init_components();
|
|
53422
54023
|
init_errors();
|
|
53423
54024
|
init_operations();
|
|
53424
54025
|
init_async();
|
|
53425
54026
|
});
|
|
53426
54027
|
|
|
53427
|
-
// src/mcp-server/tools/
|
|
53428
|
-
var args45, tool$
|
|
53429
|
-
var
|
|
54028
|
+
// src/mcp-server/tools/paymentMethodsNetworkTokensDelete.ts
|
|
54029
|
+
var args45, tool$paymentMethodsNetworkTokensDelete;
|
|
54030
|
+
var init_paymentMethodsNetworkTokensDelete2 = __esm(() => {
|
|
53430
54031
|
init_lib();
|
|
53431
|
-
|
|
53432
|
-
init_components();
|
|
54032
|
+
init_paymentMethodsNetworkTokensDelete();
|
|
53433
54033
|
init_tools();
|
|
53434
54034
|
args45 = {
|
|
53435
|
-
paymentServiceTokenCreate: PaymentServiceTokenCreate$inboundSchema,
|
|
53436
54035
|
paymentMethodId: stringType(),
|
|
54036
|
+
networkTokenId: stringType(),
|
|
53437
54037
|
timeoutInSeconds: numberType().default(1),
|
|
53438
54038
|
merchantAccountId: nullableType(stringType()).optional()
|
|
53439
54039
|
};
|
|
53440
|
-
tool$
|
|
53441
|
-
name: "payment-methods-
|
|
53442
|
-
description: `
|
|
54040
|
+
tool$paymentMethodsNetworkTokensDelete = {
|
|
54041
|
+
name: "payment-methods-network-tokens-delete",
|
|
54042
|
+
description: `Delete network token
|
|
53443
54043
|
|
|
53444
|
-
|
|
54044
|
+
Delete a network token for a payment method.`,
|
|
53445
54045
|
args: args45,
|
|
53446
54046
|
tool: async (client, args46, ctx) => {
|
|
53447
|
-
const [result, apiCall] = await
|
|
54047
|
+
const [result, apiCall] = await paymentMethodsNetworkTokensDelete(client, args46.paymentMethodId, args46.networkTokenId, args46.timeoutInSeconds, args46.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
53448
54048
|
if (!result.ok) {
|
|
53449
54049
|
return {
|
|
53450
54050
|
content: [{ type: "text", text: result.error.message }],
|
|
53451
54051
|
isError: true
|
|
53452
54052
|
};
|
|
53453
54053
|
}
|
|
53454
|
-
|
|
53455
|
-
return formatResult(value, apiCall);
|
|
54054
|
+
return formatResult(undefined, apiCall);
|
|
53456
54055
|
}
|
|
53457
54056
|
};
|
|
53458
54057
|
});
|
|
53459
54058
|
|
|
53460
|
-
// src/funcs/
|
|
53461
|
-
function
|
|
53462
|
-
return new APIPromise($do46(client, paymentMethodId,
|
|
54059
|
+
// src/funcs/paymentMethodsNetworkTokensList.ts
|
|
54060
|
+
function paymentMethodsNetworkTokensList(client, paymentMethodId, merchantAccountId, options) {
|
|
54061
|
+
return new APIPromise($do46(client, paymentMethodId, merchantAccountId, options));
|
|
53463
54062
|
}
|
|
53464
|
-
async function $do46(client, paymentMethodId,
|
|
54063
|
+
async function $do46(client, paymentMethodId, merchantAccountId, options) {
|
|
53465
54064
|
const input = {
|
|
53466
54065
|
paymentMethodId,
|
|
53467
|
-
paymentServiceTokenId,
|
|
53468
|
-
timeoutInSeconds,
|
|
53469
54066
|
merchantAccountId
|
|
53470
54067
|
};
|
|
53471
|
-
const parsed = safeParse(input, (value) =>
|
|
54068
|
+
const parsed = safeParse(input, (value) => ListPaymentMethodNetworkTokensRequest$outboundSchema.parse(value), "Input validation failed");
|
|
53472
54069
|
if (!parsed.ok) {
|
|
53473
54070
|
return [parsed, { status: "invalid" }];
|
|
53474
54071
|
}
|
|
53475
54072
|
const payload = parsed.value;
|
|
53476
54073
|
const body = null;
|
|
53477
54074
|
const pathParams = {
|
|
53478
|
-
payment_method_id: encodeSimple("payment_method_id", payload.payment_method_id, { explode: false, charEncoding: "percent" })
|
|
53479
|
-
payment_service_token_id: encodeSimple("payment_service_token_id", payload.payment_service_token_id, { explode: false, charEncoding: "percent" })
|
|
54075
|
+
payment_method_id: encodeSimple("payment_method_id", payload.payment_method_id, { explode: false, charEncoding: "percent" })
|
|
53480
54076
|
};
|
|
53481
|
-
const path = pathToFunc("/payment-methods/{payment_method_id}/
|
|
53482
|
-
const query = encodeFormQuery({
|
|
53483
|
-
timeout_in_seconds: payload.timeout_in_seconds
|
|
53484
|
-
});
|
|
54077
|
+
const path = pathToFunc("/payment-methods/{payment_method_id}/network-tokens")(pathParams);
|
|
53485
54078
|
const headers = new Headers(compactMap({
|
|
53486
54079
|
Accept: "application/json",
|
|
53487
54080
|
"x-gr4vy-merchant-account-id": encodeSimple("x-gr4vy-merchant-account-id", payload.merchantAccountId ?? client._options.merchantAccountId, { explode: false, charEncoding: "none" })
|
|
@@ -53491,20 +54084,28 @@ async function $do46(client, paymentMethodId, paymentServiceTokenId, timeoutInSe
|
|
|
53491
54084
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
53492
54085
|
const context = {
|
|
53493
54086
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
53494
|
-
operationID: "
|
|
54087
|
+
operationID: "list_payment_method_network_tokens",
|
|
53495
54088
|
oAuth2Scopes: [],
|
|
53496
54089
|
resolvedSecurity: requestSecurity,
|
|
53497
54090
|
securitySource: client._options.bearerAuth,
|
|
53498
|
-
retryConfig: options?.retries || client._options.retryConfig || {
|
|
53499
|
-
|
|
54091
|
+
retryConfig: options?.retries || client._options.retryConfig || {
|
|
54092
|
+
strategy: "backoff",
|
|
54093
|
+
backoff: {
|
|
54094
|
+
initialInterval: 200,
|
|
54095
|
+
maxInterval: 200,
|
|
54096
|
+
exponent: 1,
|
|
54097
|
+
maxElapsedTime: 1000
|
|
54098
|
+
},
|
|
54099
|
+
retryConnectionErrors: true
|
|
54100
|
+
},
|
|
54101
|
+
retryCodes: options?.retryCodes || ["5XX"]
|
|
53500
54102
|
};
|
|
53501
54103
|
const requestRes = client._createRequest(context, {
|
|
53502
54104
|
security: requestSecurity,
|
|
53503
|
-
method: "
|
|
54105
|
+
method: "GET",
|
|
53504
54106
|
baseURL: options?.serverURL,
|
|
53505
54107
|
path,
|
|
53506
54108
|
headers,
|
|
53507
|
-
query,
|
|
53508
54109
|
body,
|
|
53509
54110
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
53510
54111
|
}, options);
|
|
@@ -53540,78 +54141,79 @@ async function $do46(client, paymentMethodId, paymentServiceTokenId, timeoutInSe
|
|
|
53540
54141
|
const responseFields = {
|
|
53541
54142
|
HttpMeta: { Response: response, Request: req }
|
|
53542
54143
|
};
|
|
53543
|
-
const [result] = await match(
|
|
54144
|
+
const [result] = await match(json(200, CollectionNoCursorNetworkToken$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, ListPaymentMethodNetworkTokensResponse403ListPaymentMethodNetworkTokens$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 });
|
|
53544
54145
|
if (!result.ok) {
|
|
53545
54146
|
return [result, { status: "complete", request: req, response }];
|
|
53546
54147
|
}
|
|
53547
54148
|
return [result, { status: "complete", request: req, response }];
|
|
53548
54149
|
}
|
|
53549
|
-
var
|
|
53550
|
-
init_lib();
|
|
54150
|
+
var init_paymentMethodsNetworkTokensList = __esm(() => {
|
|
53551
54151
|
init_encodings();
|
|
53552
54152
|
init_matchers();
|
|
53553
54153
|
init_primitives();
|
|
53554
54154
|
init_schemas();
|
|
53555
54155
|
init_security();
|
|
53556
54156
|
init_url();
|
|
54157
|
+
init_components();
|
|
53557
54158
|
init_errors();
|
|
53558
54159
|
init_operations();
|
|
53559
54160
|
init_async();
|
|
53560
54161
|
});
|
|
53561
54162
|
|
|
53562
|
-
// src/mcp-server/tools/
|
|
53563
|
-
var args46, tool$
|
|
53564
|
-
var
|
|
54163
|
+
// src/mcp-server/tools/paymentMethodsNetworkTokensList.ts
|
|
54164
|
+
var args46, tool$paymentMethodsNetworkTokensList;
|
|
54165
|
+
var init_paymentMethodsNetworkTokensList2 = __esm(() => {
|
|
53565
54166
|
init_lib();
|
|
53566
|
-
|
|
54167
|
+
init_paymentMethodsNetworkTokensList();
|
|
53567
54168
|
init_tools();
|
|
53568
54169
|
args46 = {
|
|
53569
54170
|
paymentMethodId: stringType(),
|
|
53570
|
-
paymentServiceTokenId: stringType(),
|
|
53571
|
-
timeoutInSeconds: numberType().default(1),
|
|
53572
54171
|
merchantAccountId: nullableType(stringType()).optional()
|
|
53573
54172
|
};
|
|
53574
|
-
tool$
|
|
53575
|
-
name: "payment-methods-
|
|
53576
|
-
description: `
|
|
54173
|
+
tool$paymentMethodsNetworkTokensList = {
|
|
54174
|
+
name: "payment-methods-network-tokens-list",
|
|
54175
|
+
description: `List network tokens
|
|
53577
54176
|
|
|
53578
|
-
|
|
54177
|
+
List all network tokens stored for a payment method.`,
|
|
53579
54178
|
args: args46,
|
|
53580
54179
|
tool: async (client, args47, ctx) => {
|
|
53581
|
-
const [result, apiCall] = await
|
|
54180
|
+
const [result, apiCall] = await paymentMethodsNetworkTokensList(client, args47.paymentMethodId, args47.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
53582
54181
|
if (!result.ok) {
|
|
53583
54182
|
return {
|
|
53584
54183
|
content: [{ type: "text", text: result.error.message }],
|
|
53585
54184
|
isError: true
|
|
53586
54185
|
};
|
|
53587
54186
|
}
|
|
53588
|
-
|
|
54187
|
+
const value = result.value;
|
|
54188
|
+
return formatResult(value, apiCall);
|
|
53589
54189
|
}
|
|
53590
54190
|
};
|
|
53591
54191
|
});
|
|
53592
54192
|
|
|
53593
|
-
// src/funcs/
|
|
53594
|
-
function
|
|
53595
|
-
return new APIPromise($do47(client, paymentMethodId,
|
|
54193
|
+
// src/funcs/paymentMethodsNetworkTokensResume.ts
|
|
54194
|
+
function paymentMethodsNetworkTokensResume(client, paymentMethodId, networkTokenId, timeoutInSeconds, merchantAccountId, options) {
|
|
54195
|
+
return new APIPromise($do47(client, paymentMethodId, networkTokenId, timeoutInSeconds, merchantAccountId, options));
|
|
53596
54196
|
}
|
|
53597
|
-
async function $do47(client, paymentMethodId,
|
|
54197
|
+
async function $do47(client, paymentMethodId, networkTokenId, timeoutInSeconds, merchantAccountId, options) {
|
|
53598
54198
|
const input = {
|
|
53599
54199
|
paymentMethodId,
|
|
53600
|
-
|
|
54200
|
+
networkTokenId,
|
|
54201
|
+
timeoutInSeconds,
|
|
53601
54202
|
merchantAccountId
|
|
53602
54203
|
};
|
|
53603
|
-
const parsed = safeParse(input, (value) =>
|
|
54204
|
+
const parsed = safeParse(input, (value) => ResumePaymentMethodNetworkTokenRequest$outboundSchema.parse(value), "Input validation failed");
|
|
53604
54205
|
if (!parsed.ok) {
|
|
53605
54206
|
return [parsed, { status: "invalid" }];
|
|
53606
54207
|
}
|
|
53607
54208
|
const payload = parsed.value;
|
|
53608
54209
|
const body = null;
|
|
53609
54210
|
const pathParams = {
|
|
54211
|
+
network_token_id: encodeSimple("network_token_id", payload.network_token_id, { explode: false, charEncoding: "percent" }),
|
|
53610
54212
|
payment_method_id: encodeSimple("payment_method_id", payload.payment_method_id, { explode: false, charEncoding: "percent" })
|
|
53611
54213
|
};
|
|
53612
|
-
const path = pathToFunc("/payment-methods/{payment_method_id}/
|
|
54214
|
+
const path = pathToFunc("/payment-methods/{payment_method_id}/network-tokens/{network_token_id}/resume")(pathParams);
|
|
53613
54215
|
const query = encodeFormQuery({
|
|
53614
|
-
|
|
54216
|
+
timeout_in_seconds: payload.timeout_in_seconds
|
|
53615
54217
|
});
|
|
53616
54218
|
const headers = new Headers(compactMap({
|
|
53617
54219
|
Accept: "application/json",
|
|
@@ -53622,25 +54224,16 @@ async function $do47(client, paymentMethodId, paymentServiceId, merchantAccountI
|
|
|
53622
54224
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
53623
54225
|
const context = {
|
|
53624
54226
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
53625
|
-
operationID: "
|
|
54227
|
+
operationID: "resume_payment_method_network_token",
|
|
53626
54228
|
oAuth2Scopes: [],
|
|
53627
54229
|
resolvedSecurity: requestSecurity,
|
|
53628
54230
|
securitySource: client._options.bearerAuth,
|
|
53629
|
-
retryConfig: options?.retries || client._options.retryConfig || {
|
|
53630
|
-
|
|
53631
|
-
backoff: {
|
|
53632
|
-
initialInterval: 200,
|
|
53633
|
-
maxInterval: 200,
|
|
53634
|
-
exponent: 1,
|
|
53635
|
-
maxElapsedTime: 1000
|
|
53636
|
-
},
|
|
53637
|
-
retryConnectionErrors: true
|
|
53638
|
-
},
|
|
53639
|
-
retryCodes: options?.retryCodes || ["5XX"]
|
|
54231
|
+
retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
|
|
54232
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
|
|
53640
54233
|
};
|
|
53641
54234
|
const requestRes = client._createRequest(context, {
|
|
53642
54235
|
security: requestSecurity,
|
|
53643
|
-
method: "
|
|
54236
|
+
method: "POST",
|
|
53644
54237
|
baseURL: options?.serverURL,
|
|
53645
54238
|
path,
|
|
53646
54239
|
headers,
|
|
@@ -53680,13 +54273,13 @@ async function $do47(client, paymentMethodId, paymentServiceId, merchantAccountI
|
|
|
53680
54273
|
const responseFields = {
|
|
53681
54274
|
HttpMeta: { Response: response, Request: req }
|
|
53682
54275
|
};
|
|
53683
|
-
const [result] = await match(json(200,
|
|
54276
|
+
const [result] = await match(json(200, NetworkToken$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, ResumePaymentMethodNetworkTokenResponse403ResumePaymentMethodNetworkToken$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 });
|
|
53684
54277
|
if (!result.ok) {
|
|
53685
54278
|
return [result, { status: "complete", request: req, response }];
|
|
53686
54279
|
}
|
|
53687
54280
|
return [result, { status: "complete", request: req, response }];
|
|
53688
54281
|
}
|
|
53689
|
-
var
|
|
54282
|
+
var init_paymentMethodsNetworkTokensResume = __esm(() => {
|
|
53690
54283
|
init_encodings();
|
|
53691
54284
|
init_matchers();
|
|
53692
54285
|
init_primitives();
|
|
@@ -53699,25 +54292,26 @@ var init_paymentMethodsPaymentServiceTokensList = __esm(() => {
|
|
|
53699
54292
|
init_async();
|
|
53700
54293
|
});
|
|
53701
54294
|
|
|
53702
|
-
// src/mcp-server/tools/
|
|
53703
|
-
var args47, tool$
|
|
53704
|
-
var
|
|
54295
|
+
// src/mcp-server/tools/paymentMethodsNetworkTokensResume.ts
|
|
54296
|
+
var args47, tool$paymentMethodsNetworkTokensResume;
|
|
54297
|
+
var init_paymentMethodsNetworkTokensResume2 = __esm(() => {
|
|
53705
54298
|
init_lib();
|
|
53706
|
-
|
|
54299
|
+
init_paymentMethodsNetworkTokensResume();
|
|
53707
54300
|
init_tools();
|
|
53708
54301
|
args47 = {
|
|
53709
54302
|
paymentMethodId: stringType(),
|
|
53710
|
-
|
|
54303
|
+
networkTokenId: stringType(),
|
|
54304
|
+
timeoutInSeconds: numberType().default(1),
|
|
53711
54305
|
merchantAccountId: nullableType(stringType()).optional()
|
|
53712
54306
|
};
|
|
53713
|
-
tool$
|
|
53714
|
-
name: "payment-methods-
|
|
53715
|
-
description: `
|
|
54307
|
+
tool$paymentMethodsNetworkTokensResume = {
|
|
54308
|
+
name: "payment-methods-network-tokens-resume",
|
|
54309
|
+
description: `Resume network token
|
|
53716
54310
|
|
|
53717
|
-
|
|
54311
|
+
Resume a suspended network token for a payment method.`,
|
|
53718
54312
|
args: args47,
|
|
53719
54313
|
tool: async (client, args48, ctx) => {
|
|
53720
|
-
const [result, apiCall] = await
|
|
54314
|
+
const [result, apiCall] = await paymentMethodsNetworkTokensResume(client, args48.paymentMethodId, args48.networkTokenId, args48.timeoutInSeconds, args48.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
53721
54315
|
if (!result.ok) {
|
|
53722
54316
|
return {
|
|
53723
54317
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -53730,26 +54324,32 @@ List all gateway tokens stored for a payment method.`,
|
|
|
53730
54324
|
};
|
|
53731
54325
|
});
|
|
53732
54326
|
|
|
53733
|
-
// src/funcs/
|
|
53734
|
-
function
|
|
53735
|
-
return new APIPromise($do48(client,
|
|
54327
|
+
// src/funcs/paymentMethodsNetworkTokensSuspend.ts
|
|
54328
|
+
function paymentMethodsNetworkTokensSuspend(client, paymentMethodId, networkTokenId, timeoutInSeconds, merchantAccountId, options) {
|
|
54329
|
+
return new APIPromise($do48(client, paymentMethodId, networkTokenId, timeoutInSeconds, merchantAccountId, options));
|
|
53736
54330
|
}
|
|
53737
|
-
async function $do48(client,
|
|
54331
|
+
async function $do48(client, paymentMethodId, networkTokenId, timeoutInSeconds, merchantAccountId, options) {
|
|
53738
54332
|
const input = {
|
|
53739
|
-
|
|
54333
|
+
paymentMethodId,
|
|
54334
|
+
networkTokenId,
|
|
54335
|
+
timeoutInSeconds,
|
|
53740
54336
|
merchantAccountId
|
|
53741
54337
|
};
|
|
53742
|
-
const parsed = safeParse(input, (value) =>
|
|
54338
|
+
const parsed = safeParse(input, (value) => SuspendPaymentMethodNetworkTokenRequest$outboundSchema.parse(value), "Input validation failed");
|
|
53743
54339
|
if (!parsed.ok) {
|
|
53744
54340
|
return [parsed, { status: "invalid" }];
|
|
53745
54341
|
}
|
|
53746
54342
|
const payload = parsed.value;
|
|
53747
|
-
const body =
|
|
53748
|
-
|
|
54343
|
+
const body = null;
|
|
54344
|
+
const pathParams = {
|
|
54345
|
+
network_token_id: encodeSimple("network_token_id", payload.network_token_id, { explode: false, charEncoding: "percent" }),
|
|
54346
|
+
payment_method_id: encodeSimple("payment_method_id", payload.payment_method_id, { explode: false, charEncoding: "percent" })
|
|
54347
|
+
};
|
|
54348
|
+
const path = pathToFunc("/payment-methods/{payment_method_id}/network-tokens/{network_token_id}/suspend")(pathParams);
|
|
54349
|
+
const query = encodeFormQuery({
|
|
54350
|
+
timeout_in_seconds: payload.timeout_in_seconds
|
|
53749
54351
|
});
|
|
53750
|
-
const path = pathToFunc("/payment-options")();
|
|
53751
54352
|
const headers = new Headers(compactMap({
|
|
53752
|
-
"Content-Type": "application/json",
|
|
53753
54353
|
Accept: "application/json",
|
|
53754
54354
|
"x-gr4vy-merchant-account-id": encodeSimple("x-gr4vy-merchant-account-id", payload.merchantAccountId ?? client._options.merchantAccountId, { explode: false, charEncoding: "none" })
|
|
53755
54355
|
}));
|
|
@@ -53758,7 +54358,7 @@ async function $do48(client, paymentOptionRequest, merchantAccountId, options) {
|
|
|
53758
54358
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
53759
54359
|
const context = {
|
|
53760
54360
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
53761
|
-
operationID: "
|
|
54361
|
+
operationID: "suspend_payment_method_network_token",
|
|
53762
54362
|
oAuth2Scopes: [],
|
|
53763
54363
|
resolvedSecurity: requestSecurity,
|
|
53764
54364
|
securitySource: client._options.bearerAuth,
|
|
@@ -53771,6 +54371,7 @@ async function $do48(client, paymentOptionRequest, merchantAccountId, options) {
|
|
|
53771
54371
|
baseURL: options?.serverURL,
|
|
53772
54372
|
path,
|
|
53773
54373
|
headers,
|
|
54374
|
+
query,
|
|
53774
54375
|
body,
|
|
53775
54376
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
53776
54377
|
}, options);
|
|
@@ -53806,13 +54407,13 @@ async function $do48(client, paymentOptionRequest, merchantAccountId, options) {
|
|
|
53806
54407
|
const responseFields = {
|
|
53807
54408
|
HttpMeta: { Response: response, Request: req }
|
|
53808
54409
|
};
|
|
53809
|
-
const [result] = await match(json(200,
|
|
54410
|
+
const [result] = await match(json(200, NetworkToken$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, SuspendPaymentMethodNetworkTokenResponse403SuspendPaymentMethodNetworkToken$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 });
|
|
53810
54411
|
if (!result.ok) {
|
|
53811
54412
|
return [result, { status: "complete", request: req, response }];
|
|
53812
54413
|
}
|
|
53813
54414
|
return [result, { status: "complete", request: req, response }];
|
|
53814
54415
|
}
|
|
53815
|
-
var
|
|
54416
|
+
var init_paymentMethodsNetworkTokensSuspend = __esm(() => {
|
|
53816
54417
|
init_encodings();
|
|
53817
54418
|
init_matchers();
|
|
53818
54419
|
init_primitives();
|
|
@@ -53825,25 +54426,26 @@ var init_paymentOptionsList = __esm(() => {
|
|
|
53825
54426
|
init_async();
|
|
53826
54427
|
});
|
|
53827
54428
|
|
|
53828
|
-
// src/mcp-server/tools/
|
|
53829
|
-
var args48, tool$
|
|
53830
|
-
var
|
|
54429
|
+
// src/mcp-server/tools/paymentMethodsNetworkTokensSuspend.ts
|
|
54430
|
+
var args48, tool$paymentMethodsNetworkTokensSuspend;
|
|
54431
|
+
var init_paymentMethodsNetworkTokensSuspend2 = __esm(() => {
|
|
53831
54432
|
init_lib();
|
|
53832
|
-
|
|
53833
|
-
init_components();
|
|
54433
|
+
init_paymentMethodsNetworkTokensSuspend();
|
|
53834
54434
|
init_tools();
|
|
53835
54435
|
args48 = {
|
|
53836
|
-
|
|
54436
|
+
paymentMethodId: stringType(),
|
|
54437
|
+
networkTokenId: stringType(),
|
|
54438
|
+
timeoutInSeconds: numberType().default(1),
|
|
53837
54439
|
merchantAccountId: nullableType(stringType()).optional()
|
|
53838
54440
|
};
|
|
53839
|
-
tool$
|
|
53840
|
-
name: "payment-
|
|
53841
|
-
description: `
|
|
54441
|
+
tool$paymentMethodsNetworkTokensSuspend = {
|
|
54442
|
+
name: "payment-methods-network-tokens-suspend",
|
|
54443
|
+
description: `Suspend network token
|
|
53842
54444
|
|
|
53843
|
-
|
|
54445
|
+
Suspend a network token for a payment method.`,
|
|
53844
54446
|
args: args48,
|
|
53845
54447
|
tool: async (client, args49, ctx) => {
|
|
53846
|
-
const [result, apiCall] = await
|
|
54448
|
+
const [result, apiCall] = await paymentMethodsNetworkTokensSuspend(client, args49.paymentMethodId, args49.networkTokenId, args49.timeoutInSeconds, args49.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
53847
54449
|
if (!result.ok) {
|
|
53848
54450
|
return {
|
|
53849
54451
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -53856,23 +54458,29 @@ List the payment options available at checkout. filtering by country, currency,
|
|
|
53856
54458
|
};
|
|
53857
54459
|
});
|
|
53858
54460
|
|
|
53859
|
-
// src/funcs/
|
|
53860
|
-
function
|
|
53861
|
-
return new APIPromise($do49(client,
|
|
54461
|
+
// src/funcs/paymentMethodsPaymentServiceTokensCreate.ts
|
|
54462
|
+
function paymentMethodsPaymentServiceTokensCreate(client, paymentServiceTokenCreate, paymentMethodId, timeoutInSeconds, merchantAccountId, options) {
|
|
54463
|
+
return new APIPromise($do49(client, paymentServiceTokenCreate, paymentMethodId, timeoutInSeconds, merchantAccountId, options));
|
|
53862
54464
|
}
|
|
53863
|
-
async function $do49(client,
|
|
54465
|
+
async function $do49(client, paymentServiceTokenCreate, paymentMethodId, timeoutInSeconds, merchantAccountId, options) {
|
|
53864
54466
|
const input = {
|
|
53865
|
-
|
|
54467
|
+
paymentServiceTokenCreate,
|
|
54468
|
+
paymentMethodId,
|
|
53866
54469
|
timeoutInSeconds,
|
|
53867
54470
|
merchantAccountId
|
|
53868
54471
|
};
|
|
53869
|
-
const parsed = safeParse(input, (value) =>
|
|
54472
|
+
const parsed = safeParse(input, (value) => CreatePaymentMethodPaymentServiceTokenRequest$outboundSchema.parse(value), "Input validation failed");
|
|
53870
54473
|
if (!parsed.ok) {
|
|
53871
54474
|
return [parsed, { status: "invalid" }];
|
|
53872
54475
|
}
|
|
53873
54476
|
const payload = parsed.value;
|
|
53874
|
-
const body = encodeJSON("body", payload.
|
|
53875
|
-
|
|
54477
|
+
const body = encodeJSON("body", payload.PaymentServiceTokenCreate, {
|
|
54478
|
+
explode: true
|
|
54479
|
+
});
|
|
54480
|
+
const pathParams = {
|
|
54481
|
+
payment_method_id: encodeSimple("payment_method_id", payload.payment_method_id, { explode: false, charEncoding: "percent" })
|
|
54482
|
+
};
|
|
54483
|
+
const path = pathToFunc("/payment-methods/{payment_method_id}/payment-service-tokens")(pathParams);
|
|
53876
54484
|
const query = encodeFormQuery({
|
|
53877
54485
|
timeout_in_seconds: payload.timeout_in_seconds
|
|
53878
54486
|
});
|
|
@@ -53886,7 +54494,7 @@ async function $do49(client, payoutCreate, timeoutInSeconds, merchantAccountId,
|
|
|
53886
54494
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
53887
54495
|
const context = {
|
|
53888
54496
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
53889
|
-
operationID: "
|
|
54497
|
+
operationID: "create_payment_method_payment_service_token",
|
|
53890
54498
|
oAuth2Scopes: [],
|
|
53891
54499
|
resolvedSecurity: requestSecurity,
|
|
53892
54500
|
securitySource: client._options.bearerAuth,
|
|
@@ -53935,13 +54543,13 @@ async function $do49(client, payoutCreate, timeoutInSeconds, merchantAccountId,
|
|
|
53935
54543
|
const responseFields = {
|
|
53936
54544
|
HttpMeta: { Response: response, Request: req }
|
|
53937
54545
|
};
|
|
53938
|
-
const [result] = await match(json(201,
|
|
54546
|
+
const [result] = await match(json(201, PaymentServiceToken$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, CreatePaymentMethodPaymentServiceTokenResponse403CreatePaymentMethodPaymentServiceToken$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 });
|
|
53939
54547
|
if (!result.ok) {
|
|
53940
54548
|
return [result, { status: "complete", request: req, response }];
|
|
53941
54549
|
}
|
|
53942
54550
|
return [result, { status: "complete", request: req, response }];
|
|
53943
54551
|
}
|
|
53944
|
-
var
|
|
54552
|
+
var init_paymentMethodsPaymentServiceTokensCreate = __esm(() => {
|
|
53945
54553
|
init_encodings();
|
|
53946
54554
|
init_matchers();
|
|
53947
54555
|
init_primitives();
|
|
@@ -53954,26 +54562,27 @@ var init_payoutsCreate = __esm(() => {
|
|
|
53954
54562
|
init_async();
|
|
53955
54563
|
});
|
|
53956
54564
|
|
|
53957
|
-
// src/mcp-server/tools/
|
|
53958
|
-
var args49, tool$
|
|
53959
|
-
var
|
|
54565
|
+
// src/mcp-server/tools/paymentMethodsPaymentServiceTokensCreate.ts
|
|
54566
|
+
var args49, tool$paymentMethodsPaymentServiceTokensCreate;
|
|
54567
|
+
var init_paymentMethodsPaymentServiceTokensCreate2 = __esm(() => {
|
|
53960
54568
|
init_lib();
|
|
53961
|
-
|
|
54569
|
+
init_paymentMethodsPaymentServiceTokensCreate();
|
|
53962
54570
|
init_components();
|
|
53963
54571
|
init_tools();
|
|
53964
54572
|
args49 = {
|
|
53965
|
-
|
|
54573
|
+
paymentServiceTokenCreate: PaymentServiceTokenCreate$inboundSchema,
|
|
54574
|
+
paymentMethodId: stringType(),
|
|
53966
54575
|
timeoutInSeconds: numberType().default(1),
|
|
53967
54576
|
merchantAccountId: nullableType(stringType()).optional()
|
|
53968
54577
|
};
|
|
53969
|
-
tool$
|
|
53970
|
-
name: "
|
|
53971
|
-
description: `Create
|
|
54578
|
+
tool$paymentMethodsPaymentServiceTokensCreate = {
|
|
54579
|
+
name: "payment-methods-payment-service-tokens-create",
|
|
54580
|
+
description: `Create payment service token
|
|
53972
54581
|
|
|
53973
|
-
|
|
54582
|
+
Create a gateway tokens for a payment method.`,
|
|
53974
54583
|
args: args49,
|
|
53975
54584
|
tool: async (client, args50, ctx) => {
|
|
53976
|
-
const [result, apiCall] = await
|
|
54585
|
+
const [result, apiCall] = await paymentMethodsPaymentServiceTokensCreate(client, args50.paymentServiceTokenCreate, args50.paymentMethodId, args50.timeoutInSeconds, args50.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
53977
54586
|
if (!result.ok) {
|
|
53978
54587
|
return {
|
|
53979
54588
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -53986,28 +54595,31 @@ Creates a new payout.`,
|
|
|
53986
54595
|
};
|
|
53987
54596
|
});
|
|
53988
54597
|
|
|
53989
|
-
// src/funcs/
|
|
53990
|
-
function
|
|
53991
|
-
return new APIPromise($do50(client,
|
|
54598
|
+
// src/funcs/paymentMethodsPaymentServiceTokensDelete.ts
|
|
54599
|
+
function paymentMethodsPaymentServiceTokensDelete(client, paymentMethodId, paymentServiceTokenId, timeoutInSeconds, merchantAccountId, options) {
|
|
54600
|
+
return new APIPromise($do50(client, paymentMethodId, paymentServiceTokenId, timeoutInSeconds, merchantAccountId, options));
|
|
53992
54601
|
}
|
|
53993
|
-
async function $do50(client,
|
|
54602
|
+
async function $do50(client, paymentMethodId, paymentServiceTokenId, timeoutInSeconds, merchantAccountId, options) {
|
|
53994
54603
|
const input = {
|
|
53995
|
-
|
|
54604
|
+
paymentMethodId,
|
|
54605
|
+
paymentServiceTokenId,
|
|
54606
|
+
timeoutInSeconds,
|
|
53996
54607
|
merchantAccountId
|
|
53997
54608
|
};
|
|
53998
|
-
const parsed = safeParse(input, (value) =>
|
|
54609
|
+
const parsed = safeParse(input, (value) => DeletePaymentMethodPaymentServiceTokenRequest$outboundSchema.parse(value), "Input validation failed");
|
|
53999
54610
|
if (!parsed.ok) {
|
|
54000
54611
|
return [parsed, { status: "invalid" }];
|
|
54001
54612
|
}
|
|
54002
54613
|
const payload = parsed.value;
|
|
54003
54614
|
const body = null;
|
|
54004
54615
|
const pathParams = {
|
|
54005
|
-
|
|
54006
|
-
|
|
54007
|
-
charEncoding: "percent"
|
|
54008
|
-
})
|
|
54616
|
+
payment_method_id: encodeSimple("payment_method_id", payload.payment_method_id, { explode: false, charEncoding: "percent" }),
|
|
54617
|
+
payment_service_token_id: encodeSimple("payment_service_token_id", payload.payment_service_token_id, { explode: false, charEncoding: "percent" })
|
|
54009
54618
|
};
|
|
54010
|
-
const path = pathToFunc("/
|
|
54619
|
+
const path = pathToFunc("/payment-methods/{payment_method_id}/payment-service-tokens/{payment_service_token_id}")(pathParams);
|
|
54620
|
+
const query = encodeFormQuery({
|
|
54621
|
+
timeout_in_seconds: payload.timeout_in_seconds
|
|
54622
|
+
});
|
|
54011
54623
|
const headers = new Headers(compactMap({
|
|
54012
54624
|
Accept: "application/json",
|
|
54013
54625
|
"x-gr4vy-merchant-account-id": encodeSimple("x-gr4vy-merchant-account-id", payload.merchantAccountId ?? client._options.merchantAccountId, { explode: false, charEncoding: "none" })
|
|
@@ -54017,28 +54629,20 @@ async function $do50(client, payoutId, merchantAccountId, options) {
|
|
|
54017
54629
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
54018
54630
|
const context = {
|
|
54019
54631
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
54020
|
-
operationID: "
|
|
54632
|
+
operationID: "delete_payment_method_payment_service_token",
|
|
54021
54633
|
oAuth2Scopes: [],
|
|
54022
54634
|
resolvedSecurity: requestSecurity,
|
|
54023
54635
|
securitySource: client._options.bearerAuth,
|
|
54024
|
-
retryConfig: options?.retries || client._options.retryConfig || {
|
|
54025
|
-
|
|
54026
|
-
backoff: {
|
|
54027
|
-
initialInterval: 200,
|
|
54028
|
-
maxInterval: 200,
|
|
54029
|
-
exponent: 1,
|
|
54030
|
-
maxElapsedTime: 1000
|
|
54031
|
-
},
|
|
54032
|
-
retryConnectionErrors: true
|
|
54033
|
-
},
|
|
54034
|
-
retryCodes: options?.retryCodes || ["5XX"]
|
|
54636
|
+
retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
|
|
54637
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
|
|
54035
54638
|
};
|
|
54036
54639
|
const requestRes = client._createRequest(context, {
|
|
54037
54640
|
security: requestSecurity,
|
|
54038
|
-
method: "
|
|
54641
|
+
method: "DELETE",
|
|
54039
54642
|
baseURL: options?.serverURL,
|
|
54040
54643
|
path,
|
|
54041
54644
|
headers,
|
|
54645
|
+
query,
|
|
54042
54646
|
body,
|
|
54043
54647
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
54044
54648
|
}, options);
|
|
@@ -54074,86 +54678,89 @@ async function $do50(client, payoutId, merchantAccountId, options) {
|
|
|
54074
54678
|
const responseFields = {
|
|
54075
54679
|
HttpMeta: { Response: response, Request: req }
|
|
54076
54680
|
};
|
|
54077
|
-
const [result] = await match(
|
|
54681
|
+
const [result] = await match(nil(204, voidType()), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, DeletePaymentMethodPaymentServiceTokenResponse403DeletePaymentMethodPaymentServiceToken$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 });
|
|
54078
54682
|
if (!result.ok) {
|
|
54079
54683
|
return [result, { status: "complete", request: req, response }];
|
|
54080
54684
|
}
|
|
54081
54685
|
return [result, { status: "complete", request: req, response }];
|
|
54082
54686
|
}
|
|
54083
|
-
var
|
|
54687
|
+
var init_paymentMethodsPaymentServiceTokensDelete = __esm(() => {
|
|
54688
|
+
init_lib();
|
|
54084
54689
|
init_encodings();
|
|
54085
54690
|
init_matchers();
|
|
54086
54691
|
init_primitives();
|
|
54087
54692
|
init_schemas();
|
|
54088
54693
|
init_security();
|
|
54089
54694
|
init_url();
|
|
54090
|
-
init_components();
|
|
54091
54695
|
init_errors();
|
|
54092
54696
|
init_operations();
|
|
54093
54697
|
init_async();
|
|
54094
54698
|
});
|
|
54095
54699
|
|
|
54096
|
-
// src/mcp-server/tools/
|
|
54097
|
-
var args50, tool$
|
|
54098
|
-
var
|
|
54700
|
+
// src/mcp-server/tools/paymentMethodsPaymentServiceTokensDelete.ts
|
|
54701
|
+
var args50, tool$paymentMethodsPaymentServiceTokensDelete;
|
|
54702
|
+
var init_paymentMethodsPaymentServiceTokensDelete2 = __esm(() => {
|
|
54099
54703
|
init_lib();
|
|
54100
|
-
|
|
54704
|
+
init_paymentMethodsPaymentServiceTokensDelete();
|
|
54101
54705
|
init_tools();
|
|
54102
54706
|
args50 = {
|
|
54103
|
-
|
|
54707
|
+
paymentMethodId: stringType(),
|
|
54708
|
+
paymentServiceTokenId: stringType(),
|
|
54709
|
+
timeoutInSeconds: numberType().default(1),
|
|
54104
54710
|
merchantAccountId: nullableType(stringType()).optional()
|
|
54105
54711
|
};
|
|
54106
|
-
tool$
|
|
54107
|
-
name: "
|
|
54108
|
-
description: `
|
|
54712
|
+
tool$paymentMethodsPaymentServiceTokensDelete = {
|
|
54713
|
+
name: "payment-methods-payment-service-tokens-delete",
|
|
54714
|
+
description: `Delete payment service token
|
|
54109
54715
|
|
|
54110
|
-
|
|
54716
|
+
Delete a gateway tokens for a payment method.`,
|
|
54111
54717
|
args: args50,
|
|
54112
54718
|
tool: async (client, args51, ctx) => {
|
|
54113
|
-
const [result, apiCall] = await
|
|
54719
|
+
const [result, apiCall] = await paymentMethodsPaymentServiceTokensDelete(client, args51.paymentMethodId, args51.paymentServiceTokenId, args51.timeoutInSeconds, args51.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
54114
54720
|
if (!result.ok) {
|
|
54115
54721
|
return {
|
|
54116
54722
|
content: [{ type: "text", text: result.error.message }],
|
|
54117
54723
|
isError: true
|
|
54118
54724
|
};
|
|
54119
54725
|
}
|
|
54120
|
-
|
|
54121
|
-
return formatResult(value, apiCall);
|
|
54726
|
+
return formatResult(undefined, apiCall);
|
|
54122
54727
|
}
|
|
54123
54728
|
};
|
|
54124
54729
|
});
|
|
54125
54730
|
|
|
54126
|
-
// src/funcs/
|
|
54127
|
-
function
|
|
54128
|
-
return new APIPromise($do51(client,
|
|
54731
|
+
// src/funcs/paymentMethodsPaymentServiceTokensList.ts
|
|
54732
|
+
function paymentMethodsPaymentServiceTokensList(client, paymentMethodId, paymentServiceId, merchantAccountId, options) {
|
|
54733
|
+
return new APIPromise($do51(client, paymentMethodId, paymentServiceId, merchantAccountId, options));
|
|
54129
54734
|
}
|
|
54130
|
-
async function $do51(client,
|
|
54735
|
+
async function $do51(client, paymentMethodId, paymentServiceId, merchantAccountId, options) {
|
|
54131
54736
|
const input = {
|
|
54132
|
-
|
|
54133
|
-
|
|
54737
|
+
paymentMethodId,
|
|
54738
|
+
paymentServiceId,
|
|
54134
54739
|
merchantAccountId
|
|
54135
54740
|
};
|
|
54136
|
-
const parsed = safeParse(input, (value) =>
|
|
54741
|
+
const parsed = safeParse(input, (value) => ListPaymentMethodPaymentServiceTokensRequest$outboundSchema.parse(value), "Input validation failed");
|
|
54137
54742
|
if (!parsed.ok) {
|
|
54138
|
-
return [
|
|
54743
|
+
return [parsed, { status: "invalid" }];
|
|
54139
54744
|
}
|
|
54140
54745
|
const payload = parsed.value;
|
|
54141
54746
|
const body = null;
|
|
54142
|
-
const
|
|
54747
|
+
const pathParams = {
|
|
54748
|
+
payment_method_id: encodeSimple("payment_method_id", payload.payment_method_id, { explode: false, charEncoding: "percent" })
|
|
54749
|
+
};
|
|
54750
|
+
const path = pathToFunc("/payment-methods/{payment_method_id}/payment-service-tokens")(pathParams);
|
|
54143
54751
|
const query = encodeFormQuery({
|
|
54144
|
-
|
|
54145
|
-
limit: payload?.limit
|
|
54752
|
+
payment_service_id: payload.payment_service_id
|
|
54146
54753
|
});
|
|
54147
54754
|
const headers = new Headers(compactMap({
|
|
54148
54755
|
Accept: "application/json",
|
|
54149
|
-
"x-gr4vy-merchant-account-id": encodeSimple("x-gr4vy-merchant-account-id", payload
|
|
54756
|
+
"x-gr4vy-merchant-account-id": encodeSimple("x-gr4vy-merchant-account-id", payload.merchantAccountId ?? client._options.merchantAccountId, { explode: false, charEncoding: "none" })
|
|
54150
54757
|
}));
|
|
54151
54758
|
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
54152
54759
|
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
54153
54760
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
54154
54761
|
const context = {
|
|
54155
54762
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
54156
|
-
operationID: "
|
|
54763
|
+
operationID: "list_payment_method_payment_service_tokens",
|
|
54157
54764
|
oAuth2Scopes: [],
|
|
54158
54765
|
resolvedSecurity: requestSecurity,
|
|
54159
54766
|
securitySource: client._options.bearerAuth,
|
|
@@ -54180,7 +54787,538 @@ async function $do51(client, cursor, limit, merchantAccountId, options) {
|
|
|
54180
54787
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
54181
54788
|
}, options);
|
|
54182
54789
|
if (!requestRes.ok) {
|
|
54183
|
-
return [
|
|
54790
|
+
return [requestRes, { status: "invalid" }];
|
|
54791
|
+
}
|
|
54792
|
+
const req = requestRes.value;
|
|
54793
|
+
const doResult = await client._do(req, {
|
|
54794
|
+
context,
|
|
54795
|
+
errorCodes: [
|
|
54796
|
+
"400",
|
|
54797
|
+
"401",
|
|
54798
|
+
"403",
|
|
54799
|
+
"404",
|
|
54800
|
+
"405",
|
|
54801
|
+
"409",
|
|
54802
|
+
"422",
|
|
54803
|
+
"425",
|
|
54804
|
+
"429",
|
|
54805
|
+
"4XX",
|
|
54806
|
+
"500",
|
|
54807
|
+
"502",
|
|
54808
|
+
"504",
|
|
54809
|
+
"5XX"
|
|
54810
|
+
],
|
|
54811
|
+
retryConfig: context.retryConfig,
|
|
54812
|
+
retryCodes: context.retryCodes
|
|
54813
|
+
});
|
|
54814
|
+
if (!doResult.ok) {
|
|
54815
|
+
return [doResult, { status: "request-error", request: req }];
|
|
54816
|
+
}
|
|
54817
|
+
const response = doResult.value;
|
|
54818
|
+
const responseFields = {
|
|
54819
|
+
HttpMeta: { Response: response, Request: req }
|
|
54820
|
+
};
|
|
54821
|
+
const [result] = await match(json(200, CollectionNoCursorPaymentServiceToken$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, ListPaymentMethodPaymentServiceTokensResponse403ListPaymentMethodPaymentServiceTokens$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 });
|
|
54822
|
+
if (!result.ok) {
|
|
54823
|
+
return [result, { status: "complete", request: req, response }];
|
|
54824
|
+
}
|
|
54825
|
+
return [result, { status: "complete", request: req, response }];
|
|
54826
|
+
}
|
|
54827
|
+
var init_paymentMethodsPaymentServiceTokensList = __esm(() => {
|
|
54828
|
+
init_encodings();
|
|
54829
|
+
init_matchers();
|
|
54830
|
+
init_primitives();
|
|
54831
|
+
init_schemas();
|
|
54832
|
+
init_security();
|
|
54833
|
+
init_url();
|
|
54834
|
+
init_components();
|
|
54835
|
+
init_errors();
|
|
54836
|
+
init_operations();
|
|
54837
|
+
init_async();
|
|
54838
|
+
});
|
|
54839
|
+
|
|
54840
|
+
// src/mcp-server/tools/paymentMethodsPaymentServiceTokensList.ts
|
|
54841
|
+
var args51, tool$paymentMethodsPaymentServiceTokensList;
|
|
54842
|
+
var init_paymentMethodsPaymentServiceTokensList2 = __esm(() => {
|
|
54843
|
+
init_lib();
|
|
54844
|
+
init_paymentMethodsPaymentServiceTokensList();
|
|
54845
|
+
init_tools();
|
|
54846
|
+
args51 = {
|
|
54847
|
+
paymentMethodId: stringType(),
|
|
54848
|
+
paymentServiceId: nullableType(stringType()).optional(),
|
|
54849
|
+
merchantAccountId: nullableType(stringType()).optional()
|
|
54850
|
+
};
|
|
54851
|
+
tool$paymentMethodsPaymentServiceTokensList = {
|
|
54852
|
+
name: "payment-methods-payment-service-tokens-list",
|
|
54853
|
+
description: `List payment service tokens
|
|
54854
|
+
|
|
54855
|
+
List all gateway tokens stored for a payment method.`,
|
|
54856
|
+
args: args51,
|
|
54857
|
+
tool: async (client, args52, ctx) => {
|
|
54858
|
+
const [result, apiCall] = await paymentMethodsPaymentServiceTokensList(client, args52.paymentMethodId, args52.paymentServiceId, args52.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
54859
|
+
if (!result.ok) {
|
|
54860
|
+
return {
|
|
54861
|
+
content: [{ type: "text", text: result.error.message }],
|
|
54862
|
+
isError: true
|
|
54863
|
+
};
|
|
54864
|
+
}
|
|
54865
|
+
const value = result.value;
|
|
54866
|
+
return formatResult(value, apiCall);
|
|
54867
|
+
}
|
|
54868
|
+
};
|
|
54869
|
+
});
|
|
54870
|
+
|
|
54871
|
+
// src/funcs/paymentOptionsList.ts
|
|
54872
|
+
function paymentOptionsList(client, paymentOptionRequest, merchantAccountId, options) {
|
|
54873
|
+
return new APIPromise($do52(client, paymentOptionRequest, merchantAccountId, options));
|
|
54874
|
+
}
|
|
54875
|
+
async function $do52(client, paymentOptionRequest, merchantAccountId, options) {
|
|
54876
|
+
const input = {
|
|
54877
|
+
paymentOptionRequest,
|
|
54878
|
+
merchantAccountId
|
|
54879
|
+
};
|
|
54880
|
+
const parsed = safeParse(input, (value) => ListPaymentOptionsRequest$outboundSchema.parse(value), "Input validation failed");
|
|
54881
|
+
if (!parsed.ok) {
|
|
54882
|
+
return [parsed, { status: "invalid" }];
|
|
54883
|
+
}
|
|
54884
|
+
const payload = parsed.value;
|
|
54885
|
+
const body = encodeJSON("body", payload.PaymentOptionRequest, {
|
|
54886
|
+
explode: true
|
|
54887
|
+
});
|
|
54888
|
+
const path = pathToFunc("/payment-options")();
|
|
54889
|
+
const headers = new Headers(compactMap({
|
|
54890
|
+
"Content-Type": "application/json",
|
|
54891
|
+
Accept: "application/json",
|
|
54892
|
+
"x-gr4vy-merchant-account-id": encodeSimple("x-gr4vy-merchant-account-id", payload.merchantAccountId ?? client._options.merchantAccountId, { explode: false, charEncoding: "none" })
|
|
54893
|
+
}));
|
|
54894
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
54895
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
54896
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
54897
|
+
const context = {
|
|
54898
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
54899
|
+
operationID: "list_payment_options",
|
|
54900
|
+
oAuth2Scopes: [],
|
|
54901
|
+
resolvedSecurity: requestSecurity,
|
|
54902
|
+
securitySource: client._options.bearerAuth,
|
|
54903
|
+
retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
|
|
54904
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
|
|
54905
|
+
};
|
|
54906
|
+
const requestRes = client._createRequest(context, {
|
|
54907
|
+
security: requestSecurity,
|
|
54908
|
+
method: "POST",
|
|
54909
|
+
baseURL: options?.serverURL,
|
|
54910
|
+
path,
|
|
54911
|
+
headers,
|
|
54912
|
+
body,
|
|
54913
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
54914
|
+
}, options);
|
|
54915
|
+
if (!requestRes.ok) {
|
|
54916
|
+
return [requestRes, { status: "invalid" }];
|
|
54917
|
+
}
|
|
54918
|
+
const req = requestRes.value;
|
|
54919
|
+
const doResult = await client._do(req, {
|
|
54920
|
+
context,
|
|
54921
|
+
errorCodes: [
|
|
54922
|
+
"400",
|
|
54923
|
+
"401",
|
|
54924
|
+
"403",
|
|
54925
|
+
"404",
|
|
54926
|
+
"405",
|
|
54927
|
+
"409",
|
|
54928
|
+
"422",
|
|
54929
|
+
"425",
|
|
54930
|
+
"429",
|
|
54931
|
+
"4XX",
|
|
54932
|
+
"500",
|
|
54933
|
+
"502",
|
|
54934
|
+
"504",
|
|
54935
|
+
"5XX"
|
|
54936
|
+
],
|
|
54937
|
+
retryConfig: context.retryConfig,
|
|
54938
|
+
retryCodes: context.retryCodes
|
|
54939
|
+
});
|
|
54940
|
+
if (!doResult.ok) {
|
|
54941
|
+
return [doResult, { status: "request-error", request: req }];
|
|
54942
|
+
}
|
|
54943
|
+
const response = doResult.value;
|
|
54944
|
+
const responseFields = {
|
|
54945
|
+
HttpMeta: { Response: response, Request: req }
|
|
54946
|
+
};
|
|
54947
|
+
const [result] = await match(json(200, CollectionNoCursorPaymentOption$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, ListPaymentOptionsResponse403ListPaymentOptions$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 });
|
|
54948
|
+
if (!result.ok) {
|
|
54949
|
+
return [result, { status: "complete", request: req, response }];
|
|
54950
|
+
}
|
|
54951
|
+
return [result, { status: "complete", request: req, response }];
|
|
54952
|
+
}
|
|
54953
|
+
var init_paymentOptionsList = __esm(() => {
|
|
54954
|
+
init_encodings();
|
|
54955
|
+
init_matchers();
|
|
54956
|
+
init_primitives();
|
|
54957
|
+
init_schemas();
|
|
54958
|
+
init_security();
|
|
54959
|
+
init_url();
|
|
54960
|
+
init_components();
|
|
54961
|
+
init_errors();
|
|
54962
|
+
init_operations();
|
|
54963
|
+
init_async();
|
|
54964
|
+
});
|
|
54965
|
+
|
|
54966
|
+
// src/mcp-server/tools/paymentOptionsList.ts
|
|
54967
|
+
var args52, tool$paymentOptionsList;
|
|
54968
|
+
var init_paymentOptionsList2 = __esm(() => {
|
|
54969
|
+
init_lib();
|
|
54970
|
+
init_paymentOptionsList();
|
|
54971
|
+
init_components();
|
|
54972
|
+
init_tools();
|
|
54973
|
+
args52 = {
|
|
54974
|
+
paymentOptionRequest: PaymentOptionRequest$inboundSchema,
|
|
54975
|
+
merchantAccountId: nullableType(stringType()).optional()
|
|
54976
|
+
};
|
|
54977
|
+
tool$paymentOptionsList = {
|
|
54978
|
+
name: "payment-options-list",
|
|
54979
|
+
description: `List payment options
|
|
54980
|
+
|
|
54981
|
+
List the payment options available at checkout. filtering by country, currency, and additional fields passed to Flow rules.`,
|
|
54982
|
+
args: args52,
|
|
54983
|
+
tool: async (client, args53, ctx) => {
|
|
54984
|
+
const [result, apiCall] = await paymentOptionsList(client, args53.paymentOptionRequest, args53.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
54985
|
+
if (!result.ok) {
|
|
54986
|
+
return {
|
|
54987
|
+
content: [{ type: "text", text: result.error.message }],
|
|
54988
|
+
isError: true
|
|
54989
|
+
};
|
|
54990
|
+
}
|
|
54991
|
+
const value = result.value;
|
|
54992
|
+
return formatResult(value, apiCall);
|
|
54993
|
+
}
|
|
54994
|
+
};
|
|
54995
|
+
});
|
|
54996
|
+
|
|
54997
|
+
// src/funcs/payoutsCreate.ts
|
|
54998
|
+
function payoutsCreate(client, payoutCreate, timeoutInSeconds, merchantAccountId, options) {
|
|
54999
|
+
return new APIPromise($do53(client, payoutCreate, timeoutInSeconds, merchantAccountId, options));
|
|
55000
|
+
}
|
|
55001
|
+
async function $do53(client, payoutCreate, timeoutInSeconds, merchantAccountId, options) {
|
|
55002
|
+
const input = {
|
|
55003
|
+
payoutCreate,
|
|
55004
|
+
timeoutInSeconds,
|
|
55005
|
+
merchantAccountId
|
|
55006
|
+
};
|
|
55007
|
+
const parsed = safeParse(input, (value) => CreatePayoutRequest$outboundSchema.parse(value), "Input validation failed");
|
|
55008
|
+
if (!parsed.ok) {
|
|
55009
|
+
return [parsed, { status: "invalid" }];
|
|
55010
|
+
}
|
|
55011
|
+
const payload = parsed.value;
|
|
55012
|
+
const body = encodeJSON("body", payload.PayoutCreate, { explode: true });
|
|
55013
|
+
const path = pathToFunc("/payouts")();
|
|
55014
|
+
const query = encodeFormQuery({
|
|
55015
|
+
timeout_in_seconds: payload.timeout_in_seconds
|
|
55016
|
+
});
|
|
55017
|
+
const headers = new Headers(compactMap({
|
|
55018
|
+
"Content-Type": "application/json",
|
|
55019
|
+
Accept: "application/json",
|
|
55020
|
+
"x-gr4vy-merchant-account-id": encodeSimple("x-gr4vy-merchant-account-id", payload.merchantAccountId ?? client._options.merchantAccountId, { explode: false, charEncoding: "none" })
|
|
55021
|
+
}));
|
|
55022
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
55023
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
55024
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
55025
|
+
const context = {
|
|
55026
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
55027
|
+
operationID: "create_payout",
|
|
55028
|
+
oAuth2Scopes: [],
|
|
55029
|
+
resolvedSecurity: requestSecurity,
|
|
55030
|
+
securitySource: client._options.bearerAuth,
|
|
55031
|
+
retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
|
|
55032
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
|
|
55033
|
+
};
|
|
55034
|
+
const requestRes = client._createRequest(context, {
|
|
55035
|
+
security: requestSecurity,
|
|
55036
|
+
method: "POST",
|
|
55037
|
+
baseURL: options?.serverURL,
|
|
55038
|
+
path,
|
|
55039
|
+
headers,
|
|
55040
|
+
query,
|
|
55041
|
+
body,
|
|
55042
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
55043
|
+
}, options);
|
|
55044
|
+
if (!requestRes.ok) {
|
|
55045
|
+
return [requestRes, { status: "invalid" }];
|
|
55046
|
+
}
|
|
55047
|
+
const req = requestRes.value;
|
|
55048
|
+
const doResult = await client._do(req, {
|
|
55049
|
+
context,
|
|
55050
|
+
errorCodes: [
|
|
55051
|
+
"400",
|
|
55052
|
+
"401",
|
|
55053
|
+
"403",
|
|
55054
|
+
"404",
|
|
55055
|
+
"405",
|
|
55056
|
+
"409",
|
|
55057
|
+
"422",
|
|
55058
|
+
"425",
|
|
55059
|
+
"429",
|
|
55060
|
+
"4XX",
|
|
55061
|
+
"500",
|
|
55062
|
+
"502",
|
|
55063
|
+
"504",
|
|
55064
|
+
"5XX"
|
|
55065
|
+
],
|
|
55066
|
+
retryConfig: context.retryConfig,
|
|
55067
|
+
retryCodes: context.retryCodes
|
|
55068
|
+
});
|
|
55069
|
+
if (!doResult.ok) {
|
|
55070
|
+
return [doResult, { status: "request-error", request: req }];
|
|
55071
|
+
}
|
|
55072
|
+
const response = doResult.value;
|
|
55073
|
+
const responseFields = {
|
|
55074
|
+
HttpMeta: { Response: response, Request: req }
|
|
55075
|
+
};
|
|
55076
|
+
const [result] = await match(json(201, PayoutSummary$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, CreatePayoutResponse403CreatePayout$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 });
|
|
55077
|
+
if (!result.ok) {
|
|
55078
|
+
return [result, { status: "complete", request: req, response }];
|
|
55079
|
+
}
|
|
55080
|
+
return [result, { status: "complete", request: req, response }];
|
|
55081
|
+
}
|
|
55082
|
+
var init_payoutsCreate = __esm(() => {
|
|
55083
|
+
init_encodings();
|
|
55084
|
+
init_matchers();
|
|
55085
|
+
init_primitives();
|
|
55086
|
+
init_schemas();
|
|
55087
|
+
init_security();
|
|
55088
|
+
init_url();
|
|
55089
|
+
init_components();
|
|
55090
|
+
init_errors();
|
|
55091
|
+
init_operations();
|
|
55092
|
+
init_async();
|
|
55093
|
+
});
|
|
55094
|
+
|
|
55095
|
+
// src/mcp-server/tools/payoutsCreate.ts
|
|
55096
|
+
var args53, tool$payoutsCreate;
|
|
55097
|
+
var init_payoutsCreate2 = __esm(() => {
|
|
55098
|
+
init_lib();
|
|
55099
|
+
init_payoutsCreate();
|
|
55100
|
+
init_components();
|
|
55101
|
+
init_tools();
|
|
55102
|
+
args53 = {
|
|
55103
|
+
payoutCreate: PayoutCreate$inboundSchema,
|
|
55104
|
+
timeoutInSeconds: numberType().default(1),
|
|
55105
|
+
merchantAccountId: nullableType(stringType()).optional()
|
|
55106
|
+
};
|
|
55107
|
+
tool$payoutsCreate = {
|
|
55108
|
+
name: "payouts-create",
|
|
55109
|
+
description: `Create a payout.
|
|
55110
|
+
|
|
55111
|
+
Creates a new payout.`,
|
|
55112
|
+
args: args53,
|
|
55113
|
+
tool: async (client, args54, ctx) => {
|
|
55114
|
+
const [result, apiCall] = await payoutsCreate(client, args54.payoutCreate, args54.timeoutInSeconds, args54.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
55115
|
+
if (!result.ok) {
|
|
55116
|
+
return {
|
|
55117
|
+
content: [{ type: "text", text: result.error.message }],
|
|
55118
|
+
isError: true
|
|
55119
|
+
};
|
|
55120
|
+
}
|
|
55121
|
+
const value = result.value;
|
|
55122
|
+
return formatResult(value, apiCall);
|
|
55123
|
+
}
|
|
55124
|
+
};
|
|
55125
|
+
});
|
|
55126
|
+
|
|
55127
|
+
// src/funcs/payoutsGet.ts
|
|
55128
|
+
function payoutsGet(client, payoutId, merchantAccountId, options) {
|
|
55129
|
+
return new APIPromise($do54(client, payoutId, merchantAccountId, options));
|
|
55130
|
+
}
|
|
55131
|
+
async function $do54(client, payoutId, merchantAccountId, options) {
|
|
55132
|
+
const input = {
|
|
55133
|
+
payoutId,
|
|
55134
|
+
merchantAccountId
|
|
55135
|
+
};
|
|
55136
|
+
const parsed = safeParse(input, (value) => GetPayoutRequest$outboundSchema.parse(value), "Input validation failed");
|
|
55137
|
+
if (!parsed.ok) {
|
|
55138
|
+
return [parsed, { status: "invalid" }];
|
|
55139
|
+
}
|
|
55140
|
+
const payload = parsed.value;
|
|
55141
|
+
const body = null;
|
|
55142
|
+
const pathParams = {
|
|
55143
|
+
payout_id: encodeSimple("payout_id", payload.payout_id, {
|
|
55144
|
+
explode: false,
|
|
55145
|
+
charEncoding: "percent"
|
|
55146
|
+
})
|
|
55147
|
+
};
|
|
55148
|
+
const path = pathToFunc("/payouts/{payout_id}")(pathParams);
|
|
55149
|
+
const headers = new Headers(compactMap({
|
|
55150
|
+
Accept: "application/json",
|
|
55151
|
+
"x-gr4vy-merchant-account-id": encodeSimple("x-gr4vy-merchant-account-id", payload.merchantAccountId ?? client._options.merchantAccountId, { explode: false, charEncoding: "none" })
|
|
55152
|
+
}));
|
|
55153
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
55154
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
55155
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
55156
|
+
const context = {
|
|
55157
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
55158
|
+
operationID: "get_payout",
|
|
55159
|
+
oAuth2Scopes: [],
|
|
55160
|
+
resolvedSecurity: requestSecurity,
|
|
55161
|
+
securitySource: client._options.bearerAuth,
|
|
55162
|
+
retryConfig: options?.retries || client._options.retryConfig || {
|
|
55163
|
+
strategy: "backoff",
|
|
55164
|
+
backoff: {
|
|
55165
|
+
initialInterval: 200,
|
|
55166
|
+
maxInterval: 200,
|
|
55167
|
+
exponent: 1,
|
|
55168
|
+
maxElapsedTime: 1000
|
|
55169
|
+
},
|
|
55170
|
+
retryConnectionErrors: true
|
|
55171
|
+
},
|
|
55172
|
+
retryCodes: options?.retryCodes || ["5XX"]
|
|
55173
|
+
};
|
|
55174
|
+
const requestRes = client._createRequest(context, {
|
|
55175
|
+
security: requestSecurity,
|
|
55176
|
+
method: "GET",
|
|
55177
|
+
baseURL: options?.serverURL,
|
|
55178
|
+
path,
|
|
55179
|
+
headers,
|
|
55180
|
+
body,
|
|
55181
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
55182
|
+
}, options);
|
|
55183
|
+
if (!requestRes.ok) {
|
|
55184
|
+
return [requestRes, { status: "invalid" }];
|
|
55185
|
+
}
|
|
55186
|
+
const req = requestRes.value;
|
|
55187
|
+
const doResult = await client._do(req, {
|
|
55188
|
+
context,
|
|
55189
|
+
errorCodes: [
|
|
55190
|
+
"400",
|
|
55191
|
+
"401",
|
|
55192
|
+
"403",
|
|
55193
|
+
"404",
|
|
55194
|
+
"405",
|
|
55195
|
+
"409",
|
|
55196
|
+
"422",
|
|
55197
|
+
"425",
|
|
55198
|
+
"429",
|
|
55199
|
+
"4XX",
|
|
55200
|
+
"500",
|
|
55201
|
+
"502",
|
|
55202
|
+
"504",
|
|
55203
|
+
"5XX"
|
|
55204
|
+
],
|
|
55205
|
+
retryConfig: context.retryConfig,
|
|
55206
|
+
retryCodes: context.retryCodes
|
|
55207
|
+
});
|
|
55208
|
+
if (!doResult.ok) {
|
|
55209
|
+
return [doResult, { status: "request-error", request: req }];
|
|
55210
|
+
}
|
|
55211
|
+
const response = doResult.value;
|
|
55212
|
+
const responseFields = {
|
|
55213
|
+
HttpMeta: { Response: response, Request: req }
|
|
55214
|
+
};
|
|
55215
|
+
const [result] = await match(json(200, PayoutSummary$inboundSchema), jsonErr(400, Error400$inboundSchema), jsonErr(401, Error401$inboundSchema), jsonErr(403, GetPayoutResponse403GetPayout$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 });
|
|
55216
|
+
if (!result.ok) {
|
|
55217
|
+
return [result, { status: "complete", request: req, response }];
|
|
55218
|
+
}
|
|
55219
|
+
return [result, { status: "complete", request: req, response }];
|
|
55220
|
+
}
|
|
55221
|
+
var init_payoutsGet = __esm(() => {
|
|
55222
|
+
init_encodings();
|
|
55223
|
+
init_matchers();
|
|
55224
|
+
init_primitives();
|
|
55225
|
+
init_schemas();
|
|
55226
|
+
init_security();
|
|
55227
|
+
init_url();
|
|
55228
|
+
init_components();
|
|
55229
|
+
init_errors();
|
|
55230
|
+
init_operations();
|
|
55231
|
+
init_async();
|
|
55232
|
+
});
|
|
55233
|
+
|
|
55234
|
+
// src/mcp-server/tools/payoutsGet.ts
|
|
55235
|
+
var args54, tool$payoutsGet;
|
|
55236
|
+
var init_payoutsGet2 = __esm(() => {
|
|
55237
|
+
init_lib();
|
|
55238
|
+
init_payoutsGet();
|
|
55239
|
+
init_tools();
|
|
55240
|
+
args54 = {
|
|
55241
|
+
payoutId: stringType(),
|
|
55242
|
+
merchantAccountId: nullableType(stringType()).optional()
|
|
55243
|
+
};
|
|
55244
|
+
tool$payoutsGet = {
|
|
55245
|
+
name: "payouts-get",
|
|
55246
|
+
description: `Get a payout.
|
|
55247
|
+
|
|
55248
|
+
Retreives a payout.`,
|
|
55249
|
+
args: args54,
|
|
55250
|
+
tool: async (client, args55, ctx) => {
|
|
55251
|
+
const [result, apiCall] = await payoutsGet(client, args55.payoutId, args55.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
55252
|
+
if (!result.ok) {
|
|
55253
|
+
return {
|
|
55254
|
+
content: [{ type: "text", text: result.error.message }],
|
|
55255
|
+
isError: true
|
|
55256
|
+
};
|
|
55257
|
+
}
|
|
55258
|
+
const value = result.value;
|
|
55259
|
+
return formatResult(value, apiCall);
|
|
55260
|
+
}
|
|
55261
|
+
};
|
|
55262
|
+
});
|
|
55263
|
+
|
|
55264
|
+
// src/funcs/payoutsList.ts
|
|
55265
|
+
function payoutsList(client, cursor, limit, merchantAccountId, options) {
|
|
55266
|
+
return new APIPromise($do55(client, cursor, limit, merchantAccountId, options));
|
|
55267
|
+
}
|
|
55268
|
+
async function $do55(client, cursor, limit, merchantAccountId, options) {
|
|
55269
|
+
const input = {
|
|
55270
|
+
cursor,
|
|
55271
|
+
limit,
|
|
55272
|
+
merchantAccountId
|
|
55273
|
+
};
|
|
55274
|
+
const parsed = safeParse(input, (value) => ListPayoutsRequest$outboundSchema.optional().parse(value), "Input validation failed");
|
|
55275
|
+
if (!parsed.ok) {
|
|
55276
|
+
return [haltIterator(parsed), { status: "invalid" }];
|
|
55277
|
+
}
|
|
55278
|
+
const payload = parsed.value;
|
|
55279
|
+
const body = null;
|
|
55280
|
+
const path = pathToFunc("/payouts")();
|
|
55281
|
+
const query = encodeFormQuery({
|
|
55282
|
+
cursor: payload?.cursor,
|
|
55283
|
+
limit: payload?.limit
|
|
55284
|
+
});
|
|
55285
|
+
const headers = new Headers(compactMap({
|
|
55286
|
+
Accept: "application/json",
|
|
55287
|
+
"x-gr4vy-merchant-account-id": encodeSimple("x-gr4vy-merchant-account-id", payload?.merchantAccountId ?? client._options.merchantAccountId, { explode: false, charEncoding: "none" })
|
|
55288
|
+
}));
|
|
55289
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
55290
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
55291
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
55292
|
+
const context = {
|
|
55293
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
55294
|
+
operationID: "list_payouts",
|
|
55295
|
+
oAuth2Scopes: [],
|
|
55296
|
+
resolvedSecurity: requestSecurity,
|
|
55297
|
+
securitySource: client._options.bearerAuth,
|
|
55298
|
+
retryConfig: options?.retries || client._options.retryConfig || {
|
|
55299
|
+
strategy: "backoff",
|
|
55300
|
+
backoff: {
|
|
55301
|
+
initialInterval: 200,
|
|
55302
|
+
maxInterval: 200,
|
|
55303
|
+
exponent: 1,
|
|
55304
|
+
maxElapsedTime: 1000
|
|
55305
|
+
},
|
|
55306
|
+
retryConnectionErrors: true
|
|
55307
|
+
},
|
|
55308
|
+
retryCodes: options?.retryCodes || ["5XX"]
|
|
55309
|
+
};
|
|
55310
|
+
const requestRes = client._createRequest(context, {
|
|
55311
|
+
security: requestSecurity,
|
|
55312
|
+
method: "GET",
|
|
55313
|
+
baseURL: options?.serverURL,
|
|
55314
|
+
path,
|
|
55315
|
+
headers,
|
|
55316
|
+
query,
|
|
55317
|
+
body,
|
|
55318
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
55319
|
+
}, options);
|
|
55320
|
+
if (!requestRes.ok) {
|
|
55321
|
+
return [haltIterator(requestRes), { status: "invalid" }];
|
|
54184
55322
|
}
|
|
54185
55323
|
const req = requestRes.value;
|
|
54186
55324
|
const doResult = await client._do(req, {
|
|
@@ -54250,12 +55388,12 @@ var init_payoutsList = __esm(() => {
|
|
|
54250
55388
|
});
|
|
54251
55389
|
|
|
54252
55390
|
// src/mcp-server/tools/payoutsList.ts
|
|
54253
|
-
var
|
|
55391
|
+
var args55, tool$payoutsList;
|
|
54254
55392
|
var init_payoutsList2 = __esm(() => {
|
|
54255
55393
|
init_lib();
|
|
54256
55394
|
init_payoutsList();
|
|
54257
55395
|
init_tools();
|
|
54258
|
-
|
|
55396
|
+
args55 = {
|
|
54259
55397
|
cursor: nullableType(stringType()).optional(),
|
|
54260
55398
|
limit: numberType().int().default(20),
|
|
54261
55399
|
merchantAccountId: nullableType(stringType()).optional()
|
|
@@ -54265,9 +55403,9 @@ var init_payoutsList2 = __esm(() => {
|
|
|
54265
55403
|
description: `List payouts created.
|
|
54266
55404
|
|
|
54267
55405
|
Returns a list of payouts made.`,
|
|
54268
|
-
args:
|
|
54269
|
-
tool: async (client,
|
|
54270
|
-
const [result, apiCall] = await payoutsList(client,
|
|
55406
|
+
args: args55,
|
|
55407
|
+
tool: async (client, args56, ctx) => {
|
|
55408
|
+
const [result, apiCall] = await payoutsList(client, args56.cursor, args56.limit, args56.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
54271
55409
|
if (!result.ok) {
|
|
54272
55410
|
return {
|
|
54273
55411
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -54282,9 +55420,9 @@ Returns a list of payouts made.`,
|
|
|
54282
55420
|
|
|
54283
55421
|
// src/funcs/refundsGet.ts
|
|
54284
55422
|
function refundsGet(client, refundId, merchantAccountId, options) {
|
|
54285
|
-
return new APIPromise($
|
|
55423
|
+
return new APIPromise($do56(client, refundId, merchantAccountId, options));
|
|
54286
55424
|
}
|
|
54287
|
-
async function $
|
|
55425
|
+
async function $do56(client, refundId, merchantAccountId, options) {
|
|
54288
55426
|
const input = {
|
|
54289
55427
|
refundId,
|
|
54290
55428
|
merchantAccountId
|
|
@@ -54388,12 +55526,12 @@ var init_refundsGet = __esm(() => {
|
|
|
54388
55526
|
});
|
|
54389
55527
|
|
|
54390
55528
|
// src/mcp-server/tools/refundsGet.ts
|
|
54391
|
-
var
|
|
55529
|
+
var args56, tool$refundsGet;
|
|
54392
55530
|
var init_refundsGet2 = __esm(() => {
|
|
54393
55531
|
init_lib();
|
|
54394
55532
|
init_refundsGet();
|
|
54395
55533
|
init_tools();
|
|
54396
|
-
|
|
55534
|
+
args56 = {
|
|
54397
55535
|
refundId: stringType(),
|
|
54398
55536
|
merchantAccountId: nullableType(stringType()).optional()
|
|
54399
55537
|
};
|
|
@@ -54402,9 +55540,9 @@ var init_refundsGet2 = __esm(() => {
|
|
|
54402
55540
|
description: `Get refund
|
|
54403
55541
|
|
|
54404
55542
|
Fetch a refund.`,
|
|
54405
|
-
args:
|
|
54406
|
-
tool: async (client,
|
|
54407
|
-
const [result, apiCall] = await refundsGet(client,
|
|
55543
|
+
args: args56,
|
|
55544
|
+
tool: async (client, args57, ctx) => {
|
|
55545
|
+
const [result, apiCall] = await refundsGet(client, args57.refundId, args57.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
54408
55546
|
if (!result.ok) {
|
|
54409
55547
|
return {
|
|
54410
55548
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -54419,9 +55557,9 @@ Fetch a refund.`,
|
|
|
54419
55557
|
|
|
54420
55558
|
// src/funcs/transactionRefundsAllCreate.ts
|
|
54421
55559
|
function transactionRefundsAllCreate(client, transactionId, transactionRefundAllCreate, timeoutInSeconds, merchantAccountId, options) {
|
|
54422
|
-
return new APIPromise($
|
|
55560
|
+
return new APIPromise($do57(client, transactionId, transactionRefundAllCreate, timeoutInSeconds, merchantAccountId, options));
|
|
54423
55561
|
}
|
|
54424
|
-
async function $
|
|
55562
|
+
async function $do57(client, transactionId, transactionRefundAllCreate, timeoutInSeconds, merchantAccountId, options) {
|
|
54425
55563
|
const input = {
|
|
54426
55564
|
transactionId,
|
|
54427
55565
|
transactionRefundAllCreate,
|
|
@@ -54525,13 +55663,13 @@ var init_transactionRefundsAllCreate = __esm(() => {
|
|
|
54525
55663
|
});
|
|
54526
55664
|
|
|
54527
55665
|
// src/mcp-server/tools/transactionRefundsAllCreate.ts
|
|
54528
|
-
var
|
|
55666
|
+
var args57, tool$transactionRefundsAllCreate;
|
|
54529
55667
|
var init_transactionRefundsAllCreate2 = __esm(() => {
|
|
54530
55668
|
init_lib();
|
|
54531
55669
|
init_transactionRefundsAllCreate();
|
|
54532
55670
|
init_components();
|
|
54533
55671
|
init_tools();
|
|
54534
|
-
|
|
55672
|
+
args57 = {
|
|
54535
55673
|
transactionId: stringType(),
|
|
54536
55674
|
transactionRefundAllCreate: nullableType(TransactionRefundAllCreate$inboundSchema).optional(),
|
|
54537
55675
|
timeoutInSeconds: numberType().default(1),
|
|
@@ -54542,9 +55680,9 @@ var init_transactionRefundsAllCreate2 = __esm(() => {
|
|
|
54542
55680
|
description: `Create batch transaction refund
|
|
54543
55681
|
|
|
54544
55682
|
Create a refund for all instruments on a transaction.`,
|
|
54545
|
-
args:
|
|
54546
|
-
tool: async (client,
|
|
54547
|
-
const [result, apiCall] = await transactionRefundsAllCreate(client,
|
|
55683
|
+
args: args57,
|
|
55684
|
+
tool: async (client, args58, ctx) => {
|
|
55685
|
+
const [result, apiCall] = await transactionRefundsAllCreate(client, args58.transactionId, args58.transactionRefundAllCreate, args58.timeoutInSeconds, args58.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
54548
55686
|
if (!result.ok) {
|
|
54549
55687
|
return {
|
|
54550
55688
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -54559,9 +55697,9 @@ Create a refund for all instruments on a transaction.`,
|
|
|
54559
55697
|
|
|
54560
55698
|
// src/funcs/transactionRefundsCreate.ts
|
|
54561
55699
|
function transactionRefundsCreate(client, transactionRefundCreate, transactionId, timeoutInSeconds, merchantAccountId, options) {
|
|
54562
|
-
return new APIPromise($
|
|
55700
|
+
return new APIPromise($do58(client, transactionRefundCreate, transactionId, timeoutInSeconds, merchantAccountId, options));
|
|
54563
55701
|
}
|
|
54564
|
-
async function $
|
|
55702
|
+
async function $do58(client, transactionRefundCreate, transactionId, timeoutInSeconds, merchantAccountId, options) {
|
|
54565
55703
|
const input = {
|
|
54566
55704
|
transactionRefundCreate,
|
|
54567
55705
|
transactionId,
|
|
@@ -54665,13 +55803,13 @@ var init_transactionRefundsCreate = __esm(() => {
|
|
|
54665
55803
|
});
|
|
54666
55804
|
|
|
54667
55805
|
// src/mcp-server/tools/transactionRefundsCreate.ts
|
|
54668
|
-
var
|
|
55806
|
+
var args58, tool$transactionRefundsCreate;
|
|
54669
55807
|
var init_transactionRefundsCreate2 = __esm(() => {
|
|
54670
55808
|
init_lib();
|
|
54671
55809
|
init_transactionRefundsCreate();
|
|
54672
55810
|
init_components();
|
|
54673
55811
|
init_tools();
|
|
54674
|
-
|
|
55812
|
+
args58 = {
|
|
54675
55813
|
transactionRefundCreate: TransactionRefundCreate$inboundSchema,
|
|
54676
55814
|
transactionId: stringType(),
|
|
54677
55815
|
timeoutInSeconds: numberType().default(1),
|
|
@@ -54682,9 +55820,9 @@ var init_transactionRefundsCreate2 = __esm(() => {
|
|
|
54682
55820
|
description: `Create transaction refund
|
|
54683
55821
|
|
|
54684
55822
|
Create a refund for a transaction.`,
|
|
54685
|
-
args:
|
|
54686
|
-
tool: async (client,
|
|
54687
|
-
const [result, apiCall] = await transactionRefundsCreate(client,
|
|
55823
|
+
args: args58,
|
|
55824
|
+
tool: async (client, args59, ctx) => {
|
|
55825
|
+
const [result, apiCall] = await transactionRefundsCreate(client, args59.transactionRefundCreate, args59.transactionId, args59.timeoutInSeconds, args59.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
54688
55826
|
if (!result.ok) {
|
|
54689
55827
|
return {
|
|
54690
55828
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -54699,9 +55837,9 @@ Create a refund for a transaction.`,
|
|
|
54699
55837
|
|
|
54700
55838
|
// src/funcs/transactionsCapture.ts
|
|
54701
55839
|
function transactionsCapture(client, transactionCapture, transactionId, timeoutInSeconds, merchantAccountId, options) {
|
|
54702
|
-
return new APIPromise($
|
|
55840
|
+
return new APIPromise($do59(client, transactionCapture, transactionId, timeoutInSeconds, merchantAccountId, options));
|
|
54703
55841
|
}
|
|
54704
|
-
async function $
|
|
55842
|
+
async function $do59(client, transactionCapture, transactionId, timeoutInSeconds, merchantAccountId, options) {
|
|
54705
55843
|
const input = {
|
|
54706
55844
|
transactionCapture,
|
|
54707
55845
|
transactionId,
|
|
@@ -54805,13 +55943,13 @@ var init_transactionsCapture = __esm(() => {
|
|
|
54805
55943
|
});
|
|
54806
55944
|
|
|
54807
55945
|
// src/mcp-server/tools/transactionsCapture.ts
|
|
54808
|
-
var
|
|
55946
|
+
var args59, tool$transactionsCapture;
|
|
54809
55947
|
var init_transactionsCapture2 = __esm(() => {
|
|
54810
55948
|
init_lib();
|
|
54811
55949
|
init_transactionsCapture();
|
|
54812
55950
|
init_components();
|
|
54813
55951
|
init_tools();
|
|
54814
|
-
|
|
55952
|
+
args59 = {
|
|
54815
55953
|
transactionCapture: TransactionCapture$inboundSchema,
|
|
54816
55954
|
transactionId: stringType(),
|
|
54817
55955
|
timeoutInSeconds: numberType().default(1),
|
|
@@ -54822,9 +55960,9 @@ var init_transactionsCapture2 = __esm(() => {
|
|
|
54822
55960
|
description: `Capture transaction
|
|
54823
55961
|
|
|
54824
55962
|
Capture a previously authorized transaction.`,
|
|
54825
|
-
args:
|
|
54826
|
-
tool: async (client,
|
|
54827
|
-
const [result, apiCall] = await transactionsCapture(client,
|
|
55963
|
+
args: args59,
|
|
55964
|
+
tool: async (client, args60, ctx) => {
|
|
55965
|
+
const [result, apiCall] = await transactionsCapture(client, args60.transactionCapture, args60.transactionId, args60.timeoutInSeconds, args60.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
54828
55966
|
if (!result.ok) {
|
|
54829
55967
|
return {
|
|
54830
55968
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -54839,9 +55977,9 @@ Capture a previously authorized transaction.`,
|
|
|
54839
55977
|
|
|
54840
55978
|
// src/funcs/transactionsCreate.ts
|
|
54841
55979
|
function transactionsCreate(client, transactionCreate, timeoutInSeconds, merchantAccountId, idempotencyKey, options) {
|
|
54842
|
-
return new APIPromise($
|
|
55980
|
+
return new APIPromise($do60(client, transactionCreate, timeoutInSeconds, merchantAccountId, idempotencyKey, options));
|
|
54843
55981
|
}
|
|
54844
|
-
async function $
|
|
55982
|
+
async function $do60(client, transactionCreate, timeoutInSeconds, merchantAccountId, idempotencyKey, options) {
|
|
54845
55983
|
const input = {
|
|
54846
55984
|
transactionCreate,
|
|
54847
55985
|
timeoutInSeconds,
|
|
@@ -54937,13 +56075,13 @@ var init_transactionsCreate = __esm(() => {
|
|
|
54937
56075
|
});
|
|
54938
56076
|
|
|
54939
56077
|
// src/mcp-server/tools/transactionsCreate.ts
|
|
54940
|
-
var
|
|
56078
|
+
var args60, tool$transactionsCreate;
|
|
54941
56079
|
var init_transactionsCreate2 = __esm(() => {
|
|
54942
56080
|
init_lib();
|
|
54943
56081
|
init_transactionsCreate();
|
|
54944
56082
|
init_components();
|
|
54945
56083
|
init_tools();
|
|
54946
|
-
|
|
56084
|
+
args60 = {
|
|
54947
56085
|
transactionCreate: TransactionCreate$inboundSchema,
|
|
54948
56086
|
timeoutInSeconds: numberType().default(1),
|
|
54949
56087
|
merchantAccountId: nullableType(stringType()).optional(),
|
|
@@ -54954,9 +56092,9 @@ var init_transactionsCreate2 = __esm(() => {
|
|
|
54954
56092
|
description: `Create transaction
|
|
54955
56093
|
|
|
54956
56094
|
Create a transaction.`,
|
|
54957
|
-
args:
|
|
54958
|
-
tool: async (client,
|
|
54959
|
-
const [result, apiCall] = await transactionsCreate(client,
|
|
56095
|
+
args: args60,
|
|
56096
|
+
tool: async (client, args61, ctx) => {
|
|
56097
|
+
const [result, apiCall] = await transactionsCreate(client, args61.transactionCreate, args61.timeoutInSeconds, args61.merchantAccountId, args61.idempotencyKey, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
54960
56098
|
if (!result.ok) {
|
|
54961
56099
|
return {
|
|
54962
56100
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -54971,9 +56109,9 @@ Create a transaction.`,
|
|
|
54971
56109
|
|
|
54972
56110
|
// src/funcs/transactionsGet.ts
|
|
54973
56111
|
function transactionsGet(client, transactionId, merchantAccountId, options) {
|
|
54974
|
-
return new APIPromise($
|
|
56112
|
+
return new APIPromise($do61(client, transactionId, merchantAccountId, options));
|
|
54975
56113
|
}
|
|
54976
|
-
async function $
|
|
56114
|
+
async function $do61(client, transactionId, merchantAccountId, options) {
|
|
54977
56115
|
const input = {
|
|
54978
56116
|
transactionId,
|
|
54979
56117
|
merchantAccountId
|
|
@@ -55077,12 +56215,12 @@ var init_transactionsGet = __esm(() => {
|
|
|
55077
56215
|
});
|
|
55078
56216
|
|
|
55079
56217
|
// src/mcp-server/tools/transactionsGet.ts
|
|
55080
|
-
var
|
|
56218
|
+
var args61, tool$transactionsGet;
|
|
55081
56219
|
var init_transactionsGet2 = __esm(() => {
|
|
55082
56220
|
init_lib();
|
|
55083
56221
|
init_transactionsGet();
|
|
55084
56222
|
init_tools();
|
|
55085
|
-
|
|
56223
|
+
args61 = {
|
|
55086
56224
|
transactionId: stringType(),
|
|
55087
56225
|
merchantAccountId: nullableType(stringType()).optional()
|
|
55088
56226
|
};
|
|
@@ -55091,9 +56229,9 @@ var init_transactionsGet2 = __esm(() => {
|
|
|
55091
56229
|
description: `Get transaction
|
|
55092
56230
|
|
|
55093
56231
|
Fetch a single transaction by its ID.`,
|
|
55094
|
-
args:
|
|
55095
|
-
tool: async (client,
|
|
55096
|
-
const [result, apiCall] = await transactionsGet(client,
|
|
56232
|
+
args: args61,
|
|
56233
|
+
tool: async (client, args62, ctx) => {
|
|
56234
|
+
const [result, apiCall] = await transactionsGet(client, args62.transactionId, args62.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
55097
56235
|
if (!result.ok) {
|
|
55098
56236
|
return {
|
|
55099
56237
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -55108,9 +56246,9 @@ Fetch a single transaction by its ID.`,
|
|
|
55108
56246
|
|
|
55109
56247
|
// src/funcs/transactionsList.ts
|
|
55110
56248
|
function transactionsList(client, request, options) {
|
|
55111
|
-
return new APIPromise($
|
|
56249
|
+
return new APIPromise($do62(client, request, options));
|
|
55112
56250
|
}
|
|
55113
|
-
async function $
|
|
56251
|
+
async function $do62(client, request, options) {
|
|
55114
56252
|
const parsed = safeParse(request, (value) => ListTransactionsRequest$outboundSchema.optional().parse(value), "Input validation failed");
|
|
55115
56253
|
if (!parsed.ok) {
|
|
55116
56254
|
return [haltIterator(parsed), { status: "invalid" }];
|
|
@@ -55266,12 +56404,12 @@ var init_transactionsList = __esm(() => {
|
|
|
55266
56404
|
});
|
|
55267
56405
|
|
|
55268
56406
|
// src/mcp-server/tools/transactionsList.ts
|
|
55269
|
-
var
|
|
56407
|
+
var args62, tool$transactionsList;
|
|
55270
56408
|
var init_transactionsList2 = __esm(() => {
|
|
55271
56409
|
init_transactionsList();
|
|
55272
56410
|
init_operations();
|
|
55273
56411
|
init_tools();
|
|
55274
|
-
|
|
56412
|
+
args62 = {
|
|
55275
56413
|
request: ListTransactionsRequest$inboundSchema.optional()
|
|
55276
56414
|
};
|
|
55277
56415
|
tool$transactionsList = {
|
|
@@ -55279,9 +56417,9 @@ var init_transactionsList2 = __esm(() => {
|
|
|
55279
56417
|
description: `List transactions
|
|
55280
56418
|
|
|
55281
56419
|
List all transactions for a specific merchant account sorted by most recently created.`,
|
|
55282
|
-
args:
|
|
55283
|
-
tool: async (client,
|
|
55284
|
-
const [result, apiCall] = await transactionsList(client,
|
|
56420
|
+
args: args62,
|
|
56421
|
+
tool: async (client, args63, ctx) => {
|
|
56422
|
+
const [result, apiCall] = await transactionsList(client, args63.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
55285
56423
|
if (!result.ok) {
|
|
55286
56424
|
return {
|
|
55287
56425
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -55296,9 +56434,9 @@ List all transactions for a specific merchant account sorted by most recently cr
|
|
|
55296
56434
|
|
|
55297
56435
|
// src/funcs/transactionsRefundsGet.ts
|
|
55298
56436
|
function transactionsRefundsGet(client, transactionId, refundId, merchantAccountId, options) {
|
|
55299
|
-
return new APIPromise($
|
|
56437
|
+
return new APIPromise($do63(client, transactionId, refundId, merchantAccountId, options));
|
|
55300
56438
|
}
|
|
55301
|
-
async function $
|
|
56439
|
+
async function $do63(client, transactionId, refundId, merchantAccountId, options) {
|
|
55302
56440
|
const input = {
|
|
55303
56441
|
transactionId,
|
|
55304
56442
|
refundId,
|
|
@@ -55407,12 +56545,12 @@ var init_transactionsRefundsGet = __esm(() => {
|
|
|
55407
56545
|
});
|
|
55408
56546
|
|
|
55409
56547
|
// src/mcp-server/tools/transactionsRefundsGet.ts
|
|
55410
|
-
var
|
|
56548
|
+
var args63, tool$transactionsRefundsGet;
|
|
55411
56549
|
var init_transactionsRefundsGet2 = __esm(() => {
|
|
55412
56550
|
init_lib();
|
|
55413
56551
|
init_transactionsRefundsGet();
|
|
55414
56552
|
init_tools();
|
|
55415
|
-
|
|
56553
|
+
args63 = {
|
|
55416
56554
|
transactionId: stringType(),
|
|
55417
56555
|
refundId: stringType(),
|
|
55418
56556
|
merchantAccountId: nullableType(stringType()).optional()
|
|
@@ -55422,9 +56560,9 @@ var init_transactionsRefundsGet2 = __esm(() => {
|
|
|
55422
56560
|
description: `Get transaction refund
|
|
55423
56561
|
|
|
55424
56562
|
Fetch refund for a transaction.`,
|
|
55425
|
-
args:
|
|
55426
|
-
tool: async (client,
|
|
55427
|
-
const [result, apiCall] = await transactionsRefundsGet(client,
|
|
56563
|
+
args: args63,
|
|
56564
|
+
tool: async (client, args64, ctx) => {
|
|
56565
|
+
const [result, apiCall] = await transactionsRefundsGet(client, args64.transactionId, args64.refundId, args64.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
55428
56566
|
if (!result.ok) {
|
|
55429
56567
|
return {
|
|
55430
56568
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -55439,9 +56577,9 @@ Fetch refund for a transaction.`,
|
|
|
55439
56577
|
|
|
55440
56578
|
// src/funcs/transactionsRefundsList.ts
|
|
55441
56579
|
function transactionsRefundsList(client, transactionId, merchantAccountId, options) {
|
|
55442
|
-
return new APIPromise($
|
|
56580
|
+
return new APIPromise($do64(client, transactionId, merchantAccountId, options));
|
|
55443
56581
|
}
|
|
55444
|
-
async function $
|
|
56582
|
+
async function $do64(client, transactionId, merchantAccountId, options) {
|
|
55445
56583
|
const input = {
|
|
55446
56584
|
transactionId,
|
|
55447
56585
|
merchantAccountId
|
|
@@ -55545,12 +56683,12 @@ var init_transactionsRefundsList = __esm(() => {
|
|
|
55545
56683
|
});
|
|
55546
56684
|
|
|
55547
56685
|
// src/mcp-server/tools/transactionsRefundsList.ts
|
|
55548
|
-
var
|
|
56686
|
+
var args64, tool$transactionsRefundsList;
|
|
55549
56687
|
var init_transactionsRefundsList2 = __esm(() => {
|
|
55550
56688
|
init_lib();
|
|
55551
56689
|
init_transactionsRefundsList();
|
|
55552
56690
|
init_tools();
|
|
55553
|
-
|
|
56691
|
+
args64 = {
|
|
55554
56692
|
transactionId: stringType(),
|
|
55555
56693
|
merchantAccountId: nullableType(stringType()).optional()
|
|
55556
56694
|
};
|
|
@@ -55559,9 +56697,9 @@ var init_transactionsRefundsList2 = __esm(() => {
|
|
|
55559
56697
|
description: `List transaction refunds
|
|
55560
56698
|
|
|
55561
56699
|
List refunds for a transaction.`,
|
|
55562
|
-
args:
|
|
55563
|
-
tool: async (client,
|
|
55564
|
-
const [result, apiCall] = await transactionsRefundsList(client,
|
|
56700
|
+
args: args64,
|
|
56701
|
+
tool: async (client, args65, ctx) => {
|
|
56702
|
+
const [result, apiCall] = await transactionsRefundsList(client, args65.transactionId, args65.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
55565
56703
|
if (!result.ok) {
|
|
55566
56704
|
return {
|
|
55567
56705
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -55576,9 +56714,9 @@ List refunds for a transaction.`,
|
|
|
55576
56714
|
|
|
55577
56715
|
// src/funcs/transactionsSummary.ts
|
|
55578
56716
|
function transactionsSummary(client, transactionId, merchantAccountId, options) {
|
|
55579
|
-
return new APIPromise($
|
|
56717
|
+
return new APIPromise($do65(client, transactionId, merchantAccountId, options));
|
|
55580
56718
|
}
|
|
55581
|
-
async function $
|
|
56719
|
+
async function $do65(client, transactionId, merchantAccountId, options) {
|
|
55582
56720
|
const input = {
|
|
55583
56721
|
transactionId,
|
|
55584
56722
|
merchantAccountId
|
|
@@ -55682,12 +56820,12 @@ var init_transactionsSummary = __esm(() => {
|
|
|
55682
56820
|
});
|
|
55683
56821
|
|
|
55684
56822
|
// src/mcp-server/tools/transactionsSummary.ts
|
|
55685
|
-
var
|
|
56823
|
+
var args65, tool$transactionsSummary;
|
|
55686
56824
|
var init_transactionsSummary2 = __esm(() => {
|
|
55687
56825
|
init_lib();
|
|
55688
56826
|
init_transactionsSummary();
|
|
55689
56827
|
init_tools();
|
|
55690
|
-
|
|
56828
|
+
args65 = {
|
|
55691
56829
|
transactionId: stringType(),
|
|
55692
56830
|
merchantAccountId: nullableType(stringType()).optional()
|
|
55693
56831
|
};
|
|
@@ -55696,9 +56834,9 @@ var init_transactionsSummary2 = __esm(() => {
|
|
|
55696
56834
|
description: `Get transaction summary
|
|
55697
56835
|
|
|
55698
56836
|
Fetch a summary for a transaction.`,
|
|
55699
|
-
args:
|
|
55700
|
-
tool: async (client,
|
|
55701
|
-
const [result, apiCall] = await transactionsSummary(client,
|
|
56837
|
+
args: args65,
|
|
56838
|
+
tool: async (client, args66, ctx) => {
|
|
56839
|
+
const [result, apiCall] = await transactionsSummary(client, args66.transactionId, args66.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
55702
56840
|
if (!result.ok) {
|
|
55703
56841
|
return {
|
|
55704
56842
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -55713,9 +56851,9 @@ Fetch a summary for a transaction.`,
|
|
|
55713
56851
|
|
|
55714
56852
|
// src/funcs/transactionsSync.ts
|
|
55715
56853
|
function transactionsSync(client, transactionId, timeoutInSeconds, merchantAccountId, options) {
|
|
55716
|
-
return new APIPromise($
|
|
56854
|
+
return new APIPromise($do66(client, transactionId, timeoutInSeconds, merchantAccountId, options));
|
|
55717
56855
|
}
|
|
55718
|
-
async function $
|
|
56856
|
+
async function $do66(client, transactionId, timeoutInSeconds, merchantAccountId, options) {
|
|
55719
56857
|
const input = {
|
|
55720
56858
|
transactionId,
|
|
55721
56859
|
timeoutInSeconds,
|
|
@@ -55815,12 +56953,12 @@ var init_transactionsSync = __esm(() => {
|
|
|
55815
56953
|
});
|
|
55816
56954
|
|
|
55817
56955
|
// src/mcp-server/tools/transactionsSync.ts
|
|
55818
|
-
var
|
|
56956
|
+
var args66, tool$transactionsSync;
|
|
55819
56957
|
var init_transactionsSync2 = __esm(() => {
|
|
55820
56958
|
init_lib();
|
|
55821
56959
|
init_transactionsSync();
|
|
55822
56960
|
init_tools();
|
|
55823
|
-
|
|
56961
|
+
args66 = {
|
|
55824
56962
|
transactionId: stringType(),
|
|
55825
56963
|
timeoutInSeconds: numberType().default(1),
|
|
55826
56964
|
merchantAccountId: nullableType(stringType()).optional()
|
|
@@ -55830,9 +56968,9 @@ var init_transactionsSync2 = __esm(() => {
|
|
|
55830
56968
|
description: `Sync transaction
|
|
55831
56969
|
|
|
55832
56970
|
Fetch the latest status for a transaction.`,
|
|
55833
|
-
args:
|
|
55834
|
-
tool: async (client,
|
|
55835
|
-
const [result, apiCall] = await transactionsSync(client,
|
|
56971
|
+
args: args66,
|
|
56972
|
+
tool: async (client, args67, ctx) => {
|
|
56973
|
+
const [result, apiCall] = await transactionsSync(client, args67.transactionId, args67.timeoutInSeconds, args67.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
55836
56974
|
if (!result.ok) {
|
|
55837
56975
|
return {
|
|
55838
56976
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -55847,9 +56985,9 @@ Fetch the latest status for a transaction.`,
|
|
|
55847
56985
|
|
|
55848
56986
|
// src/funcs/transactionsVoid.ts
|
|
55849
56987
|
function transactionsVoid(client, transactionId, timeoutInSeconds, merchantAccountId, options) {
|
|
55850
|
-
return new APIPromise($
|
|
56988
|
+
return new APIPromise($do67(client, transactionId, timeoutInSeconds, merchantAccountId, options));
|
|
55851
56989
|
}
|
|
55852
|
-
async function $
|
|
56990
|
+
async function $do67(client, transactionId, timeoutInSeconds, merchantAccountId, options) {
|
|
55853
56991
|
const input = {
|
|
55854
56992
|
transactionId,
|
|
55855
56993
|
timeoutInSeconds,
|
|
@@ -55949,12 +57087,12 @@ var init_transactionsVoid = __esm(() => {
|
|
|
55949
57087
|
});
|
|
55950
57088
|
|
|
55951
57089
|
// src/mcp-server/tools/transactionsVoid.ts
|
|
55952
|
-
var
|
|
57090
|
+
var args67, tool$transactionsVoid;
|
|
55953
57091
|
var init_transactionsVoid2 = __esm(() => {
|
|
55954
57092
|
init_lib();
|
|
55955
57093
|
init_transactionsVoid();
|
|
55956
57094
|
init_tools();
|
|
55957
|
-
|
|
57095
|
+
args67 = {
|
|
55958
57096
|
transactionId: stringType(),
|
|
55959
57097
|
timeoutInSeconds: numberType().default(1),
|
|
55960
57098
|
merchantAccountId: nullableType(stringType()).optional()
|
|
@@ -55964,9 +57102,9 @@ var init_transactionsVoid2 = __esm(() => {
|
|
|
55964
57102
|
description: `Void transaction
|
|
55965
57103
|
|
|
55966
57104
|
Void a previously authorized transaction.`,
|
|
55967
|
-
args:
|
|
55968
|
-
tool: async (client,
|
|
55969
|
-
const [result, apiCall] = await transactionsVoid(client,
|
|
57105
|
+
args: args67,
|
|
57106
|
+
tool: async (client, args68, ctx) => {
|
|
57107
|
+
const [result, apiCall] = await transactionsVoid(client, args68.transactionId, args68.timeoutInSeconds, args68.merchantAccountId, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
55970
57108
|
if (!result.ok) {
|
|
55971
57109
|
return {
|
|
55972
57110
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -55983,7 +57121,7 @@ Void a previously authorized transaction.`,
|
|
|
55983
57121
|
function createMCPServer(deps) {
|
|
55984
57122
|
const server = new McpServer({
|
|
55985
57123
|
name: "Gr4vy",
|
|
55986
|
-
version: "0.18.
|
|
57124
|
+
version: "0.18.15"
|
|
55987
57125
|
});
|
|
55988
57126
|
const client = new Gr4vyCore({
|
|
55989
57127
|
bearerAuth: deps.bearerAuth,
|
|
@@ -56032,6 +57170,10 @@ function createMCPServer(deps) {
|
|
|
56032
57170
|
tool(tool$checkoutSessionsUpdate);
|
|
56033
57171
|
tool(tool$checkoutSessionsGet);
|
|
56034
57172
|
tool(tool$checkoutSessionsDelete);
|
|
57173
|
+
tool(tool$merchantAccountsList);
|
|
57174
|
+
tool(tool$merchantAccountsCreate);
|
|
57175
|
+
tool(tool$merchantAccountsGet);
|
|
57176
|
+
tool(tool$merchantAccountsUpdate);
|
|
56035
57177
|
tool(tool$payoutsList);
|
|
56036
57178
|
tool(tool$payoutsCreate);
|
|
56037
57179
|
tool(tool$payoutsGet);
|
|
@@ -56103,6 +57245,10 @@ var init_server2 = __esm(() => {
|
|
|
56103
57245
|
init_giftCardsDelete2();
|
|
56104
57246
|
init_giftCardsGet2();
|
|
56105
57247
|
init_giftCardsList2();
|
|
57248
|
+
init_merchantAccountsCreate2();
|
|
57249
|
+
init_merchantAccountsGet2();
|
|
57250
|
+
init_merchantAccountsList2();
|
|
57251
|
+
init_merchantAccountsUpdate2();
|
|
56106
57252
|
init_paymentMethodsCreate2();
|
|
56107
57253
|
init_paymentMethodsDelete2();
|
|
56108
57254
|
init_paymentMethodsGet2();
|
|
@@ -57341,7 +58487,7 @@ var routes = an({
|
|
|
57341
58487
|
var app = He(routes, {
|
|
57342
58488
|
name: "mcp",
|
|
57343
58489
|
versionInfo: {
|
|
57344
|
-
currentVersion: "0.18.
|
|
58490
|
+
currentVersion: "0.18.15"
|
|
57345
58491
|
}
|
|
57346
58492
|
});
|
|
57347
58493
|
zt(app, process3.argv.slice(2), buildContext(process3));
|
|
@@ -57349,5 +58495,5 @@ export {
|
|
|
57349
58495
|
app
|
|
57350
58496
|
};
|
|
57351
58497
|
|
|
57352
|
-
//# debugId=
|
|
58498
|
+
//# debugId=A4330F8F42BB3AF964756E2164756E21
|
|
57353
58499
|
//# sourceMappingURL=mcp-server.js.map
|