@gr4vy/sdk 1.1.37 → 1.1.39
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 +2 -0
- package/docs/sdks/transactions/README.md +94 -0
- package/funcs/transactionsCancel.d.ts +18 -0
- package/funcs/transactionsCancel.d.ts.map +1 -0
- package/funcs/transactionsCancel.js +144 -0
- package/funcs/transactionsCancel.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/models/components/braintreedynamicdatafieldsoptions.d.ts +25 -0
- package/models/components/braintreedynamicdatafieldsoptions.d.ts.map +1 -1
- package/models/components/braintreedynamicdatafieldsoptions.js +32 -1
- package/models/components/braintreedynamicdatafieldsoptions.js.map +1 -1
- package/models/components/cancelstatus.d.ts +23 -0
- package/models/components/cancelstatus.d.ts.map +1 -0
- package/models/components/cancelstatus.js +69 -0
- package/models/components/cancelstatus.js.map +1 -0
- package/models/components/index.d.ts +2 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +2 -0
- package/models/components/index.js.map +1 -1
- package/models/components/transactioncancel.d.ts +56 -0
- package/models/components/transactioncancel.d.ts.map +1 -0
- package/models/components/transactioncancel.js +92 -0
- package/models/components/transactioncancel.js.map +1 -0
- package/models/components/transactionevent.d.ts +1 -0
- package/models/components/transactionevent.d.ts.map +1 -1
- package/models/components/transactionevent.js +1 -0
- package/models/components/transactionevent.js.map +1 -1
- package/models/operations/canceltransaction.d.ts +62 -0
- package/models/operations/canceltransaction.d.ts.map +1 -0
- package/models/operations/canceltransaction.js +107 -0
- package/models/operations/canceltransaction.js.map +1 -0
- package/models/operations/index.d.ts +1 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -0
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/transactions.d.ts +7 -0
- package/sdk/transactions.d.ts.map +1 -1
- package/sdk/transactions.js +10 -0
- package/sdk/transactions.js.map +1 -1
- package/src/funcs/transactionsCancel.ts +248 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/braintreedynamicdatafieldsoptions.ts +58 -0
- package/src/models/components/cancelstatus.ts +49 -0
- package/src/models/components/index.ts +2 -0
- package/src/models/components/transactioncancel.ts +123 -0
- package/src/models/components/transactionevent.ts +2 -0
- package/src/models/operations/canceltransaction.ts +143 -0
- package/src/models/operations/index.ts +1 -0
- package/src/sdk/transactions.ts +20 -0
package/README.md
CHANGED
|
@@ -410,6 +410,7 @@ try {
|
|
|
410
410
|
* [update](docs/sdks/transactions/README.md#update) - Manually update a transaction
|
|
411
411
|
* [capture](docs/sdks/transactions/README.md#capture) - Capture transaction
|
|
412
412
|
* [void](docs/sdks/transactions/README.md#void) - Void transaction
|
|
413
|
+
* [cancel](docs/sdks/transactions/README.md#cancel) - Cancel transaction
|
|
413
414
|
* [sync](docs/sdks/transactions/README.md#sync) - Sync transaction
|
|
414
415
|
|
|
415
416
|
#### [transactions.events](docs/sdks/events/README.md)
|
|
@@ -1015,6 +1016,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
|
1015
1016
|
- [`reportsGet`](docs/sdks/reports/README.md#get) - Get a report
|
|
1016
1017
|
- [`reportsList`](docs/sdks/reports/README.md#list) - List configured reports
|
|
1017
1018
|
- [`reportsPut`](docs/sdks/reports/README.md#put) - Update a report
|
|
1019
|
+
- [`transactionsCancel`](docs/sdks/transactions/README.md#cancel) - Cancel transaction
|
|
1018
1020
|
- [`transactionsCapture`](docs/sdks/transactions/README.md#capture) - Capture transaction
|
|
1019
1021
|
- [`transactionsCreate`](docs/sdks/transactions/README.md#create) - Create transaction
|
|
1020
1022
|
- [`transactionsEventsList`](docs/sdks/events/README.md#list) - List transaction events
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* [update](#update) - Manually update a transaction
|
|
12
12
|
* [capture](#capture) - Capture transaction
|
|
13
13
|
* [void](#void) - Void transaction
|
|
14
|
+
* [cancel](#cancel) - Cancel transaction
|
|
14
15
|
* [sync](#sync) - Sync transaction
|
|
15
16
|
|
|
16
17
|
## list
|
|
@@ -596,6 +597,99 @@ run();
|
|
|
596
597
|
| errors.Error504 | 504 | application/json |
|
|
597
598
|
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
598
599
|
|
|
600
|
+
## cancel
|
|
601
|
+
|
|
602
|
+
Cancels a pending transaction. If the transaction was successfully authorized, or was already captured, the cancel will not be processed.
|
|
603
|
+
|
|
604
|
+
### Example Usage
|
|
605
|
+
|
|
606
|
+
<!-- UsageSnippet language="typescript" operationID="cancel_transaction" method="post" path="/transactions/{transaction_id}/cancel" -->
|
|
607
|
+
```typescript
|
|
608
|
+
import { Gr4vy } from "@gr4vy/sdk";
|
|
609
|
+
|
|
610
|
+
const gr4vy = new Gr4vy({
|
|
611
|
+
merchantAccountId: "<id>",
|
|
612
|
+
server: "sandbox",
|
|
613
|
+
id: "example",
|
|
614
|
+
bearerAuth: withToken({
|
|
615
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
616
|
+
}),
|
|
617
|
+
});
|
|
618
|
+
|
|
619
|
+
async function run() {
|
|
620
|
+
const result = await gr4vy.transactions.cancel("7099948d-7286-47e4-aad8-b68f7eb44591");
|
|
621
|
+
|
|
622
|
+
console.log(result);
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
run();
|
|
626
|
+
```
|
|
627
|
+
|
|
628
|
+
### Standalone function
|
|
629
|
+
|
|
630
|
+
The standalone function version of this method:
|
|
631
|
+
|
|
632
|
+
```typescript
|
|
633
|
+
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
634
|
+
import { withToken } from "@gr4vy/sdk/lib/auth.js";
|
|
635
|
+
import { transactionsCancel } from "@gr4vy/sdk/funcs/transactionsCancel.js";
|
|
636
|
+
|
|
637
|
+
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
638
|
+
// You can create one instance of it to use across an application.
|
|
639
|
+
const gr4vy = new Gr4vyCore({
|
|
640
|
+
merchantAccountId: "<id>",
|
|
641
|
+
server: "sandbox",
|
|
642
|
+
id: "example",
|
|
643
|
+
bearerAuth: withToken({
|
|
644
|
+
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
645
|
+
}),
|
|
646
|
+
});
|
|
647
|
+
|
|
648
|
+
async function run() {
|
|
649
|
+
const res = await transactionsCancel(gr4vy, "7099948d-7286-47e4-aad8-b68f7eb44591");
|
|
650
|
+
if (res.ok) {
|
|
651
|
+
const { value: result } = res;
|
|
652
|
+
console.log(result);
|
|
653
|
+
} else {
|
|
654
|
+
console.log("transactionsCancel failed:", res.error);
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
run();
|
|
659
|
+
```
|
|
660
|
+
|
|
661
|
+
### Parameters
|
|
662
|
+
|
|
663
|
+
| Parameter | Type | Required | Description | Example |
|
|
664
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
665
|
+
| `transactionId` | *string* | :heavy_check_mark: | The ID of the transaction | [object Object] |
|
|
666
|
+
| `merchantAccountId` | *string* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | |
|
|
667
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
|
|
668
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | |
|
|
669
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
|
|
670
|
+
|
|
671
|
+
### Response
|
|
672
|
+
|
|
673
|
+
**Promise\<[components.TransactionCancel](../../models/components/transactioncancel.md)\>**
|
|
674
|
+
|
|
675
|
+
### Errors
|
|
676
|
+
|
|
677
|
+
| Error Type | Status Code | Content Type |
|
|
678
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
679
|
+
| errors.Error400 | 400 | application/json |
|
|
680
|
+
| errors.Error401 | 401 | application/json |
|
|
681
|
+
| errors.Error403 | 403 | application/json |
|
|
682
|
+
| errors.Error404 | 404 | application/json |
|
|
683
|
+
| errors.Error405 | 405 | application/json |
|
|
684
|
+
| errors.Error409 | 409 | application/json |
|
|
685
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
686
|
+
| errors.Error425 | 425 | application/json |
|
|
687
|
+
| errors.Error429 | 429 | application/json |
|
|
688
|
+
| errors.Error500 | 500 | application/json |
|
|
689
|
+
| errors.Error502 | 502 | application/json |
|
|
690
|
+
| errors.Error504 | 504 | application/json |
|
|
691
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
692
|
+
|
|
599
693
|
## sync
|
|
600
694
|
|
|
601
695
|
Synchronizes the status of a transaction with the underlying payment service provider. This is useful for transactions in a pending state to check if they've been completed or failed. Only available for some payment service providers.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Gr4vyCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import * as components from "../models/components/index.js";
|
|
4
|
+
import { Gr4vyError } from "../models/errors/gr4vyerror.js";
|
|
5
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
6
|
+
import * as errors from "../models/errors/index.js";
|
|
7
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
8
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
9
|
+
import { APIPromise } from "../types/async.js";
|
|
10
|
+
import { Result } from "../types/fp.js";
|
|
11
|
+
/**
|
|
12
|
+
* Cancel transaction
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Cancels a pending transaction. If the transaction was successfully authorized, or was already captured, the cancel will not be processed.
|
|
16
|
+
*/
|
|
17
|
+
export declare function transactionsCancel(client: Gr4vyCore, transactionId: string, merchantAccountId?: string | null | undefined, options?: RequestOptions): APIPromise<Result<components.TransactionCancel, errors.Error400 | errors.Error401 | errors.Error403 | errors.Error404 | errors.Error405 | errors.Error409 | errors.HTTPValidationError | errors.Error425 | errors.Error429 | errors.Error500 | errors.Error502 | errors.Error504 | Gr4vyError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
|
+
//# sourceMappingURL=transactionsCancel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transactionsCancel.d.ts","sourceRoot":"","sources":["../src/funcs/transactionsCancel.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAKvC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAE5E,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,SAAS,EACjB,aAAa,EAAE,MAAM,EACrB,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,iBAAiB,EAC1B,MAAM,CAAC,QAAQ,GACf,MAAM,CAAC,QAAQ,GACf,MAAM,CAAC,QAAQ,GACf,MAAM,CAAC,QAAQ,GACf,MAAM,CAAC,QAAQ,GACf,MAAM,CAAC,QAAQ,GACf,MAAM,CAAC,mBAAmB,GAC1B,MAAM,CAAC,QAAQ,GACf,MAAM,CAAC,QAAQ,GACf,MAAM,CAAC,QAAQ,GACf,MAAM,CAAC,QAAQ,GACf,MAAM,CAAC,QAAQ,GACf,UAAU,GACV,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAOA"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.transactionsCancel = transactionsCancel;
|
|
40
|
+
const encodings_js_1 = require("../lib/encodings.js");
|
|
41
|
+
const M = __importStar(require("../lib/matchers.js"));
|
|
42
|
+
const primitives_js_1 = require("../lib/primitives.js");
|
|
43
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
44
|
+
const security_js_1 = require("../lib/security.js");
|
|
45
|
+
const url_js_1 = require("../lib/url.js");
|
|
46
|
+
const components = __importStar(require("../models/components/index.js"));
|
|
47
|
+
const errors = __importStar(require("../models/errors/index.js"));
|
|
48
|
+
const operations = __importStar(require("../models/operations/index.js"));
|
|
49
|
+
const async_js_1 = require("../types/async.js");
|
|
50
|
+
/**
|
|
51
|
+
* Cancel transaction
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* Cancels a pending transaction. If the transaction was successfully authorized, or was already captured, the cancel will not be processed.
|
|
55
|
+
*/
|
|
56
|
+
function transactionsCancel(client, transactionId, merchantAccountId, options) {
|
|
57
|
+
return new async_js_1.APIPromise($do(client, transactionId, merchantAccountId, options));
|
|
58
|
+
}
|
|
59
|
+
async function $do(client, transactionId, merchantAccountId, options) {
|
|
60
|
+
const input = {
|
|
61
|
+
transactionId: transactionId,
|
|
62
|
+
merchantAccountId: merchantAccountId,
|
|
63
|
+
};
|
|
64
|
+
const parsed = (0, schemas_js_1.safeParse)(input, (value) => operations.CancelTransactionRequest$outboundSchema.parse(value), "Input validation failed");
|
|
65
|
+
if (!parsed.ok) {
|
|
66
|
+
return [parsed, { status: "invalid" }];
|
|
67
|
+
}
|
|
68
|
+
const payload = parsed.value;
|
|
69
|
+
const body = null;
|
|
70
|
+
const pathParams = {
|
|
71
|
+
transaction_id: (0, encodings_js_1.encodeSimple)("transaction_id", payload.transaction_id, {
|
|
72
|
+
explode: false,
|
|
73
|
+
charEncoding: "percent",
|
|
74
|
+
}),
|
|
75
|
+
};
|
|
76
|
+
const path = (0, url_js_1.pathToFunc)("/transactions/{transaction_id}/cancel")(pathParams);
|
|
77
|
+
const headers = new Headers((0, primitives_js_1.compactMap)({
|
|
78
|
+
Accept: "application/json",
|
|
79
|
+
"x-gr4vy-merchant-account-id": (0, encodings_js_1.encodeSimple)("x-gr4vy-merchant-account-id", payload.merchantAccountId ?? client._options.merchantAccountId, { explode: false, charEncoding: "none" }),
|
|
80
|
+
}));
|
|
81
|
+
const secConfig = await (0, security_js_1.extractSecurity)(client._options.bearerAuth);
|
|
82
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
83
|
+
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
84
|
+
const context = {
|
|
85
|
+
options: client._options,
|
|
86
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
87
|
+
operationID: "cancel_transaction",
|
|
88
|
+
oAuth2Scopes: [],
|
|
89
|
+
resolvedSecurity: requestSecurity,
|
|
90
|
+
securitySource: client._options.bearerAuth,
|
|
91
|
+
retryConfig: options?.retries
|
|
92
|
+
|| client._options.retryConfig
|
|
93
|
+
|| { strategy: "none" },
|
|
94
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
95
|
+
};
|
|
96
|
+
const requestRes = client._createRequest(context, {
|
|
97
|
+
security: requestSecurity,
|
|
98
|
+
method: "POST",
|
|
99
|
+
baseURL: options?.serverURL,
|
|
100
|
+
path: path,
|
|
101
|
+
headers: headers,
|
|
102
|
+
body: body,
|
|
103
|
+
userAgent: client._options.userAgent,
|
|
104
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
105
|
+
}, options);
|
|
106
|
+
if (!requestRes.ok) {
|
|
107
|
+
return [requestRes, { status: "invalid" }];
|
|
108
|
+
}
|
|
109
|
+
const req = requestRes.value;
|
|
110
|
+
const doResult = await client._do(req, {
|
|
111
|
+
context,
|
|
112
|
+
errorCodes: [
|
|
113
|
+
"400",
|
|
114
|
+
"401",
|
|
115
|
+
"403",
|
|
116
|
+
"404",
|
|
117
|
+
"405",
|
|
118
|
+
"409",
|
|
119
|
+
"422",
|
|
120
|
+
"425",
|
|
121
|
+
"429",
|
|
122
|
+
"4XX",
|
|
123
|
+
"500",
|
|
124
|
+
"502",
|
|
125
|
+
"504",
|
|
126
|
+
"5XX",
|
|
127
|
+
],
|
|
128
|
+
retryConfig: context.retryConfig,
|
|
129
|
+
retryCodes: context.retryCodes,
|
|
130
|
+
});
|
|
131
|
+
if (!doResult.ok) {
|
|
132
|
+
return [doResult, { status: "request-error", request: req }];
|
|
133
|
+
}
|
|
134
|
+
const response = doResult.value;
|
|
135
|
+
const responseFields = {
|
|
136
|
+
HttpMeta: { Response: response, Request: req },
|
|
137
|
+
};
|
|
138
|
+
const [result] = await M.match(M.json(200, components.TransactionCancel$inboundSchema), M.jsonErr(400, errors.Error400$inboundSchema), M.jsonErr(401, errors.Error401$inboundSchema), M.jsonErr(403, errors.Error403$inboundSchema), M.jsonErr(404, errors.Error404$inboundSchema), M.jsonErr(405, errors.Error405$inboundSchema), M.jsonErr(409, errors.Error409$inboundSchema), M.jsonErr(422, errors.HTTPValidationError$inboundSchema), M.jsonErr(425, errors.Error425$inboundSchema), M.jsonErr(429, errors.Error429$inboundSchema), M.jsonErr(500, errors.Error500$inboundSchema), M.jsonErr(502, errors.Error502$inboundSchema), M.jsonErr(504, errors.Error504$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
139
|
+
if (!result.ok) {
|
|
140
|
+
return [result, { status: "complete", request: req, response }];
|
|
141
|
+
}
|
|
142
|
+
return [result, { status: "complete", request: req, response }];
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=transactionsCancel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transactionsCancel.js","sourceRoot":"","sources":["../src/funcs/transactionsCancel.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCH,gDAoCC;AAjED,sDAAmD;AACnD,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAC3C,0EAA4D;AAS5D,kEAAoD;AAGpD,0EAA4D;AAC5D,gDAAwD;AAGxD;;;;;GAKG;AACH,SAAgB,kBAAkB,CAChC,MAAiB,EACjB,aAAqB,EACrB,iBAA6C,EAC7C,OAAwB;IA0BxB,OAAO,IAAI,qBAAU,CAAC,GAAG,CACvB,MAAM,EACN,aAAa,EACb,iBAAiB,EACjB,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,MAAiB,EACjB,aAAqB,EACrB,iBAA6C,EAC7C,OAAwB;IA6BxB,MAAM,KAAK,GAAwC;QACjD,aAAa,EAAE,aAAa;QAC5B,iBAAiB,EAAE,iBAAiB;KACrC,CAAC;IAEF,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,KAAK,EACL,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,uCAAuC,CAAC,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,CAAC,sBAAsB,CAAC,EAC7C,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,sBAAsB,CAAC,EAC7C,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
package/jsr.json
CHANGED
package/lib/config.d.ts
CHANGED
|
@@ -44,8 +44,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
44
44
|
export declare const SDK_METADATA: {
|
|
45
45
|
readonly language: "typescript";
|
|
46
46
|
readonly openapiDocVersion: "1.0.0";
|
|
47
|
-
readonly sdkVersion: "1.1.
|
|
48
|
-
readonly genVersion: "2.
|
|
49
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.1.
|
|
47
|
+
readonly sdkVersion: "1.1.39";
|
|
48
|
+
readonly genVersion: "2.687.13";
|
|
49
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.1.39 2.687.13 1.0.0 @gr4vy/sdk";
|
|
50
50
|
};
|
|
51
51
|
//# sourceMappingURL=config.d.ts.map
|
package/lib/config.js
CHANGED
|
@@ -37,8 +37,8 @@ function serverURLFromOptions(options) {
|
|
|
37
37
|
exports.SDK_METADATA = {
|
|
38
38
|
language: "typescript",
|
|
39
39
|
openapiDocVersion: "1.0.0",
|
|
40
|
-
sdkVersion: "1.1.
|
|
41
|
-
genVersion: "2.
|
|
42
|
-
userAgent: "speakeasy-sdk/typescript 1.1.
|
|
40
|
+
sdkVersion: "1.1.39",
|
|
41
|
+
genVersion: "2.687.13",
|
|
42
|
+
userAgent: "speakeasy-sdk/typescript 1.1.39 2.687.13 1.0.0 @gr4vy/sdk",
|
|
43
43
|
};
|
|
44
44
|
//# sourceMappingURL=config.js.map
|
package/lib/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/lib/config.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAkDH,oDAsBC;AAnED,qCAA8C;AAEjC,QAAA,aAAa,GAAG,SAAS,CAAC;AAC1B,QAAA,gBAAgB,GAAG,YAAY,CAAC;AAC7C;;GAEG;AACU,QAAA,UAAU,GAAG;IACxB,CAAC,qBAAa,CAAC,EAAE,oCAAoC;IACrD,CAAC,wBAAgB,CAAC,EAAE,4BAA4B;CACxC,CAAC;AAmCX,SAAgB,oBAAoB,CAAC,OAAmB;IACtD,IAAI,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;IAElC,MAAM,YAAY,GAA2B;QAC3C,SAAS,EAAE;YACT,IAAI,EAAE,OAAO,CAAC,EAAE,IAAI,SAAS;SAC9B;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,OAAO,CAAC,EAAE,IAAI,SAAS;SAC9B;KACF,CAAC;IAEF,IAAI,MAAM,GAAW,EAAE,CAAC;IAExB,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,qBAAa,CAAC;QAC/C,SAAS,GAAG,kBAAU,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QACrC,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACtC,CAAC;IAED,MAAM,CAAC,GAAG,IAAA,mBAAU,EAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;IACxC,OAAO,IAAI,GAAG,CAAC,CAAC,CAA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AE,QAAQ;IACpB,UAAU,EAAE,UAAU;IACtB,SAAS,EAAE,2DAA2D;CAC9D,CAAC"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
2
3
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
4
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
5
|
+
export declare const VaultPaymentMethodCriteria: {
|
|
6
|
+
readonly Always: "ALWAYS";
|
|
7
|
+
readonly OnSuccessfulTransaction: "ON_SUCCESSFUL_TRANSACTION";
|
|
8
|
+
};
|
|
9
|
+
export type VaultPaymentMethodCriteria = OpenEnum<typeof VaultPaymentMethodCriteria>;
|
|
4
10
|
export type BraintreeDynamicDataFieldsOptions = {
|
|
5
11
|
/**
|
|
6
12
|
* Passes the 3DS status to the Braintree API using `customFields` with the key set to the value of `three_ds_auth_status`
|
|
@@ -10,13 +16,32 @@ export type BraintreeDynamicDataFieldsOptions = {
|
|
|
10
16
|
* Passes the `transaction.purchaseOrderNumber` field when creating a new transaction.
|
|
11
17
|
*/
|
|
12
18
|
purchaseOrderNumber?: string | null | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Passes the `vaultPaymentMethodCriteria` field when creating a new transaction.
|
|
21
|
+
*/
|
|
22
|
+
vaultPaymentMethodCriteria?: VaultPaymentMethodCriteria | null | undefined;
|
|
13
23
|
};
|
|
14
24
|
/** @internal */
|
|
25
|
+
export declare const VaultPaymentMethodCriteria$inboundSchema: z.ZodType<VaultPaymentMethodCriteria, z.ZodTypeDef, unknown>;
|
|
26
|
+
/** @internal */
|
|
27
|
+
export declare const VaultPaymentMethodCriteria$outboundSchema: z.ZodType<VaultPaymentMethodCriteria, z.ZodTypeDef, VaultPaymentMethodCriteria>;
|
|
28
|
+
/**
|
|
29
|
+
* @internal
|
|
30
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
31
|
+
*/
|
|
32
|
+
export declare namespace VaultPaymentMethodCriteria$ {
|
|
33
|
+
/** @deprecated use `VaultPaymentMethodCriteria$inboundSchema` instead. */
|
|
34
|
+
const inboundSchema: z.ZodType<VaultPaymentMethodCriteria, z.ZodTypeDef, unknown>;
|
|
35
|
+
/** @deprecated use `VaultPaymentMethodCriteria$outboundSchema` instead. */
|
|
36
|
+
const outboundSchema: z.ZodType<VaultPaymentMethodCriteria, z.ZodTypeDef, VaultPaymentMethodCriteria>;
|
|
37
|
+
}
|
|
38
|
+
/** @internal */
|
|
15
39
|
export declare const BraintreeDynamicDataFieldsOptions$inboundSchema: z.ZodType<BraintreeDynamicDataFieldsOptions, z.ZodTypeDef, unknown>;
|
|
16
40
|
/** @internal */
|
|
17
41
|
export type BraintreeDynamicDataFieldsOptions$Outbound = {
|
|
18
42
|
three_ds_auth_status?: string | null | undefined;
|
|
19
43
|
purchase_order_number?: string | null | undefined;
|
|
44
|
+
vault_payment_method_criteria?: string | null | undefined;
|
|
20
45
|
};
|
|
21
46
|
/** @internal */
|
|
22
47
|
export declare const BraintreeDynamicDataFieldsOptions$outboundSchema: z.ZodType<BraintreeDynamicDataFieldsOptions$Outbound, z.ZodTypeDef, BraintreeDynamicDataFieldsOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"braintreedynamicdatafieldsoptions.d.ts","sourceRoot":"","sources":["../../src/models/components/braintreedynamicdatafieldsoptions.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,iCAAiC,GAAG;IAC9C;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC9C;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"braintreedynamicdatafieldsoptions.d.ts","sourceRoot":"","sources":["../../src/models/components/braintreedynamicdatafieldsoptions.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAEL,QAAQ,EAET,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,eAAO,MAAM,0BAA0B;;;CAG7B,CAAC;AACX,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAC/C,OAAO,0BAA0B,CAClC,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG;IAC9C;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC9C;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChD;;OAEG;IACH,0BAA0B,CAAC,EAAE,0BAA0B,GAAG,IAAI,GAAG,SAAS,CAAC;CAC5E,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,wCAAwC,EAAE,CAAC,CAAC,OAAO,CAC9D,0BAA0B,EAC1B,CAAC,CAAC,UAAU,EACZ,OAAO,CAKL,CAAC;AAEL,gBAAgB;AAChB,eAAO,MAAM,yCAAyC,EAAE,CAAC,CAAC,OAAO,CAC/D,0BAA0B,EAC1B,CAAC,CAAC,UAAU,EACZ,0BAA0B,CAI1B,CAAC;AAEH;;;GAGG;AACH,yBAAiB,2BAA2B,CAAC;IAC3C,0EAA0E;IACnE,MAAM,aAAa,8DAA2C,CAAC;IACtE,2EAA2E;IACpE,MAAM,cAAc,iFAA4C,CAAC;CACzE;AAED,gBAAgB;AAChB,eAAO,MAAM,+CAA+C,EAAE,CAAC,CAAC,OAAO,CACrE,iCAAiC,EACjC,CAAC,CAAC,UAAU,EACZ,OAAO,CAaP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,0CAA0C,GAAG;IACvD,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACjD,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClD,6BAA6B,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAC3D,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,gDAAgD,EAAE,CAAC,CAAC,OAAO,CACtE,0CAA0C,EAC1C,CAAC,CAAC,UAAU,EACZ,iCAAiC,CAajC,CAAC;AAEH;;;GAGG;AACH,yBAAiB,kCAAkC,CAAC;IAClD,iFAAiF;IAC1E,MAAM,aAAa,qEAAkD,CAAC;IAC7E,kFAAkF;IAC3E,MAAM,cAAc,wGACuB,CAAC;IACnD,4EAA4E;IAC5E,KAAY,QAAQ,GAAG,0CAA0C,CAAC;CACnE;AAED,wBAAgB,uCAAuC,CACrD,iCAAiC,EAAE,iCAAiC,GACnE,MAAM,CAMR;AAED,wBAAgB,yCAAyC,CACvD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,iCAAiC,EAAE,kBAAkB,CAAC,CAMxE"}
|
|
@@ -36,30 +36,61 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.BraintreeDynamicDataFieldsOptions$ = exports.BraintreeDynamicDataFieldsOptions$outboundSchema = exports.BraintreeDynamicDataFieldsOptions$inboundSchema = void 0;
|
|
39
|
+
exports.BraintreeDynamicDataFieldsOptions$ = exports.BraintreeDynamicDataFieldsOptions$outboundSchema = exports.BraintreeDynamicDataFieldsOptions$inboundSchema = exports.VaultPaymentMethodCriteria$ = exports.VaultPaymentMethodCriteria$outboundSchema = exports.VaultPaymentMethodCriteria$inboundSchema = exports.VaultPaymentMethodCriteria = void 0;
|
|
40
40
|
exports.braintreeDynamicDataFieldsOptionsToJSON = braintreeDynamicDataFieldsOptionsToJSON;
|
|
41
41
|
exports.braintreeDynamicDataFieldsOptionsFromJSON = braintreeDynamicDataFieldsOptionsFromJSON;
|
|
42
42
|
const z = __importStar(require("zod"));
|
|
43
43
|
const primitives_js_1 = require("../../lib/primitives.js");
|
|
44
44
|
const schemas_js_1 = require("../../lib/schemas.js");
|
|
45
|
+
const enums_js_1 = require("../../types/enums.js");
|
|
46
|
+
exports.VaultPaymentMethodCriteria = {
|
|
47
|
+
Always: "ALWAYS",
|
|
48
|
+
OnSuccessfulTransaction: "ON_SUCCESSFUL_TRANSACTION",
|
|
49
|
+
};
|
|
50
|
+
/** @internal */
|
|
51
|
+
exports.VaultPaymentMethodCriteria$inboundSchema = z
|
|
52
|
+
.union([
|
|
53
|
+
z.nativeEnum(exports.VaultPaymentMethodCriteria),
|
|
54
|
+
z.string().transform(enums_js_1.catchUnrecognizedEnum),
|
|
55
|
+
]);
|
|
56
|
+
/** @internal */
|
|
57
|
+
exports.VaultPaymentMethodCriteria$outboundSchema = z.union([
|
|
58
|
+
z.nativeEnum(exports.VaultPaymentMethodCriteria),
|
|
59
|
+
z.string().and(z.custom()),
|
|
60
|
+
]);
|
|
61
|
+
/**
|
|
62
|
+
* @internal
|
|
63
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
64
|
+
*/
|
|
65
|
+
var VaultPaymentMethodCriteria$;
|
|
66
|
+
(function (VaultPaymentMethodCriteria$) {
|
|
67
|
+
/** @deprecated use `VaultPaymentMethodCriteria$inboundSchema` instead. */
|
|
68
|
+
VaultPaymentMethodCriteria$.inboundSchema = exports.VaultPaymentMethodCriteria$inboundSchema;
|
|
69
|
+
/** @deprecated use `VaultPaymentMethodCriteria$outboundSchema` instead. */
|
|
70
|
+
VaultPaymentMethodCriteria$.outboundSchema = exports.VaultPaymentMethodCriteria$outboundSchema;
|
|
71
|
+
})(VaultPaymentMethodCriteria$ || (exports.VaultPaymentMethodCriteria$ = VaultPaymentMethodCriteria$ = {}));
|
|
45
72
|
/** @internal */
|
|
46
73
|
exports.BraintreeDynamicDataFieldsOptions$inboundSchema = z.object({
|
|
47
74
|
three_ds_auth_status: z.nullable(z.string()).optional(),
|
|
48
75
|
purchase_order_number: z.nullable(z.string()).optional(),
|
|
76
|
+
vault_payment_method_criteria: z.nullable(exports.VaultPaymentMethodCriteria$inboundSchema).optional(),
|
|
49
77
|
}).transform((v) => {
|
|
50
78
|
return (0, primitives_js_1.remap)(v, {
|
|
51
79
|
"three_ds_auth_status": "threeDsAuthStatus",
|
|
52
80
|
"purchase_order_number": "purchaseOrderNumber",
|
|
81
|
+
"vault_payment_method_criteria": "vaultPaymentMethodCriteria",
|
|
53
82
|
});
|
|
54
83
|
});
|
|
55
84
|
/** @internal */
|
|
56
85
|
exports.BraintreeDynamicDataFieldsOptions$outboundSchema = z.object({
|
|
57
86
|
threeDsAuthStatus: z.nullable(z.string()).optional(),
|
|
58
87
|
purchaseOrderNumber: z.nullable(z.string()).optional(),
|
|
88
|
+
vaultPaymentMethodCriteria: z.nullable(exports.VaultPaymentMethodCriteria$outboundSchema).optional(),
|
|
59
89
|
}).transform((v) => {
|
|
60
90
|
return (0, primitives_js_1.remap)(v, {
|
|
61
91
|
threeDsAuthStatus: "three_ds_auth_status",
|
|
62
92
|
purchaseOrderNumber: "purchase_order_number",
|
|
93
|
+
vaultPaymentMethodCriteria: "vault_payment_method_criteria",
|
|
63
94
|
});
|
|
64
95
|
});
|
|
65
96
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"braintreedynamicdatafieldsoptions.js","sourceRoot":"","sources":["../../src/models/components/braintreedynamicdatafieldsoptions.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"braintreedynamicdatafieldsoptions.js","sourceRoot":"","sources":["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uDAA+C,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC3E,+DAA+D,CAChE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
3
|
+
export declare const CancelStatus: {
|
|
4
|
+
readonly Succeeded: "succeeded";
|
|
5
|
+
readonly Pending: "pending";
|
|
6
|
+
readonly Failed: "failed";
|
|
7
|
+
};
|
|
8
|
+
export type CancelStatus = OpenEnum<typeof CancelStatus>;
|
|
9
|
+
/** @internal */
|
|
10
|
+
export declare const CancelStatus$inboundSchema: z.ZodType<CancelStatus, z.ZodTypeDef, unknown>;
|
|
11
|
+
/** @internal */
|
|
12
|
+
export declare const CancelStatus$outboundSchema: z.ZodType<CancelStatus, z.ZodTypeDef, CancelStatus>;
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
16
|
+
*/
|
|
17
|
+
export declare namespace CancelStatus$ {
|
|
18
|
+
/** @deprecated use `CancelStatus$inboundSchema` instead. */
|
|
19
|
+
const inboundSchema: z.ZodType<CancelStatus, z.ZodTypeDef, unknown>;
|
|
20
|
+
/** @deprecated use `CancelStatus$outboundSchema` instead. */
|
|
21
|
+
const outboundSchema: z.ZodType<CancelStatus, z.ZodTypeDef, CancelStatus>;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=cancelstatus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancelstatus.d.ts","sourceRoot":"","sources":["../../src/models/components/cancelstatus.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAEL,QAAQ,EAET,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,YAAY;;;;CAIf,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;AAEzD,gBAAgB;AAChB,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAChD,YAAY,EACZ,CAAC,CAAC,UAAU,EACZ,OAAO,CAKL,CAAC;AAEL,gBAAgB;AAChB,eAAO,MAAM,2BAA2B,EAAE,CAAC,CAAC,OAAO,CACjD,YAAY,EACZ,CAAC,CAAC,UAAU,EACZ,YAAY,CAIZ,CAAC;AAEH;;;GAGG;AACH,yBAAiB,aAAa,CAAC;IAC7B,4DAA4D;IACrD,MAAM,aAAa,gDAA6B,CAAC;IACxD,6DAA6D;IACtD,MAAM,cAAc,qDAA8B,CAAC;CAC3D"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.CancelStatus$ = exports.CancelStatus$outboundSchema = exports.CancelStatus$inboundSchema = exports.CancelStatus = void 0;
|
|
40
|
+
const z = __importStar(require("zod"));
|
|
41
|
+
const enums_js_1 = require("../../types/enums.js");
|
|
42
|
+
exports.CancelStatus = {
|
|
43
|
+
Succeeded: "succeeded",
|
|
44
|
+
Pending: "pending",
|
|
45
|
+
Failed: "failed",
|
|
46
|
+
};
|
|
47
|
+
/** @internal */
|
|
48
|
+
exports.CancelStatus$inboundSchema = z
|
|
49
|
+
.union([
|
|
50
|
+
z.nativeEnum(exports.CancelStatus),
|
|
51
|
+
z.string().transform(enums_js_1.catchUnrecognizedEnum),
|
|
52
|
+
]);
|
|
53
|
+
/** @internal */
|
|
54
|
+
exports.CancelStatus$outboundSchema = z.union([
|
|
55
|
+
z.nativeEnum(exports.CancelStatus),
|
|
56
|
+
z.string().and(z.custom()),
|
|
57
|
+
]);
|
|
58
|
+
/**
|
|
59
|
+
* @internal
|
|
60
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
61
|
+
*/
|
|
62
|
+
var CancelStatus$;
|
|
63
|
+
(function (CancelStatus$) {
|
|
64
|
+
/** @deprecated use `CancelStatus$inboundSchema` instead. */
|
|
65
|
+
CancelStatus$.inboundSchema = exports.CancelStatus$inboundSchema;
|
|
66
|
+
/** @deprecated use `CancelStatus$outboundSchema` instead. */
|
|
67
|
+
CancelStatus$.outboundSchema = exports.CancelStatus$outboundSchema;
|
|
68
|
+
})(CancelStatus$ || (exports.CancelStatus$ = CancelStatus$ = {}));
|
|
69
|
+
//# sourceMappingURL=cancelstatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancelstatus.js","sourceRoot":"","sources":["../../src/models/components/cancelstatus.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,mDAI8B;AAEjB,QAAA,YAAY,GAAG;IAC1B,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACR,CAAC;AAGX,gBAAgB;AACH,QAAA,0BAA0B,GAInC,CAAC;KACF,KAAK,CAAC;IACL,CAAC,CAAC,UAAU,CAAC,oBAAY,CAAC;IAC1B,CAAC,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,gCAAqB,CAAC;CAC5C,CAAC,CAAC;AAEL,gBAAgB;AACH,QAAA,2BAA2B,GAIpC,CAAC,CAAC,KAAK,CAAC;IACV,CAAC,CAAC,UAAU,CAAC,oBAAY,CAAC;IAC1B,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAwB,CAAC;CACjD,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,aAAa,CAK7B;AALD,WAAiB,aAAa;IAC5B,4DAA4D;IAC/C,2BAAa,GAAG,kCAA0B,CAAC;IACxD,6DAA6D;IAChD,4BAAc,GAAG,mCAA2B,CAAC;AAC5D,CAAC,EALgB,aAAa,6BAAb,aAAa,QAK7B"}
|
|
@@ -34,6 +34,7 @@ export * from "./buyer.js";
|
|
|
34
34
|
export * from "./buyercreate.js";
|
|
35
35
|
export * from "./buyers.js";
|
|
36
36
|
export * from "./buyerupdate.js";
|
|
37
|
+
export * from "./cancelstatus.js";
|
|
37
38
|
export * from "./capturestatus.js";
|
|
38
39
|
export * from "./cardpaymentmethodcreate.js";
|
|
39
40
|
export * from "./cardscheme.js";
|
|
@@ -216,6 +217,7 @@ export * from "./threedsecurev2.js";
|
|
|
216
217
|
export * from "./tokenpaymentmethodcreate.js";
|
|
217
218
|
export * from "./transaction.js";
|
|
218
219
|
export * from "./transactionbuyer.js";
|
|
220
|
+
export * from "./transactioncancel.js";
|
|
219
221
|
export * from "./transactioncapture.js";
|
|
220
222
|
export * from "./transactioncapturecreate.js";
|
|
221
223
|
export * from "./transactionconnectionoptions.js";
|