@gr4vy/sdk 1.5.7 → 1.6.0
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/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/components/monatospeioptions.d.ts +32 -0
- package/models/components/monatospeioptions.d.ts.map +1 -0
- package/models/components/monatospeioptions.js +78 -0
- package/models/components/monatospeioptions.js.map +1 -0
- package/models/components/transactionconnectionoptions.d.ts +6 -0
- package/models/components/transactionconnectionoptions.d.ts.map +1 -1
- package/models/components/transactionconnectionoptions.js +5 -0
- package/models/components/transactionconnectionoptions.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/models/components/index.ts +1 -0
- package/src/models/components/monatospeioptions.ts +78 -0
- package/src/models/components/transactionconnectionoptions.ts +15 -0
- package/docs/sdks/all/README.md +0 -98
- package/docs/sdks/auditlogs/README.md +0 -100
- package/docs/sdks/balances/README.md +0 -123
- package/docs/sdks/buyers/README.md +0 -461
- package/docs/sdks/cardschemedefinitions/README.md +0 -96
- package/docs/sdks/checkoutsessions/README.md +0 -367
- package/docs/sdks/cryptogram/README.md +0 -103
- package/docs/sdks/digitalwallets/README.md +0 -465
- package/docs/sdks/domains/README.md +0 -197
- package/docs/sdks/events/README.md +0 -99
- package/docs/sdks/executions/README.md +0 -285
- package/docs/sdks/giftcards/README.md +0 -376
- package/docs/sdks/gr4vygiftcards/README.md +0 -98
- package/docs/sdks/gr4vypaymentmethods/README.md +0 -96
- package/docs/sdks/gr4vyrefunds/README.md +0 -279
- package/docs/sdks/jobs/README.md +0 -107
- package/docs/sdks/merchantaccounts/README.md +0 -382
- package/docs/sdks/networktokens/README.md +0 -467
- package/docs/sdks/paymentlinks/README.md +0 -381
- package/docs/sdks/paymentmethods/README.md +0 -376
- package/docs/sdks/paymentoptions/README.md +0 -97
- package/docs/sdks/paymentservicedefinitions/README.md +0 -281
- package/docs/sdks/paymentservices/README.md +0 -706
- package/docs/sdks/paymentservicetokens/README.md +0 -286
- package/docs/sdks/payouts/README.md +0 -298
- package/docs/sdks/refunds/README.md +0 -97
- package/docs/sdks/reportexecutions/README.md +0 -100
- package/docs/sdks/reports/README.md +0 -403
- package/docs/sdks/sessions/README.md +0 -289
- package/docs/sdks/settlements/README.md +0 -188
- package/docs/sdks/shippingdetails/README.md +0 -462
- package/docs/sdks/transactions/README.md +0 -752
- package/examples/README.md +0 -31
package/docs/sdks/all/README.md
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
# All
|
|
2
|
-
(*transactions.refunds.all*)
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
### Available Operations
|
|
7
|
-
|
|
8
|
-
* [create](#create) - Create batch transaction refund
|
|
9
|
-
|
|
10
|
-
## create
|
|
11
|
-
|
|
12
|
-
Create a refund for all instruments on a transaction.
|
|
13
|
-
|
|
14
|
-
### Example Usage
|
|
15
|
-
|
|
16
|
-
<!-- UsageSnippet language="typescript" operationID="create_full_transaction_refund" method="post" path="/transactions/{transaction_id}/refunds/all" -->
|
|
17
|
-
```typescript
|
|
18
|
-
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
19
|
-
import fs from "fs";
|
|
20
|
-
|
|
21
|
-
const gr4vy = new Gr4vy({
|
|
22
|
-
id: "example",
|
|
23
|
-
server: "sandbox",
|
|
24
|
-
merchantAccountId: "default",
|
|
25
|
-
bearerAuth: withToken({
|
|
26
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
27
|
-
}),
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
async function run() {
|
|
31
|
-
const result = await gr4vy.transactions.refunds.all.create("7099948d-7286-47e4-aad8-b68f7eb44591");
|
|
32
|
-
|
|
33
|
-
console.log(result);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
run();
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
### Standalone function
|
|
40
|
-
|
|
41
|
-
The standalone function version of this method:
|
|
42
|
-
|
|
43
|
-
```typescript
|
|
44
|
-
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
45
|
-
import { transactionsRefundsAllCreate } from "@gr4vy/sdk/funcs/transactionsRefundsAllCreate.js";
|
|
46
|
-
|
|
47
|
-
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
48
|
-
// You can create one instance of it to use across an application.
|
|
49
|
-
const gr4vy = new Gr4vyCore({
|
|
50
|
-
merchantAccountId: "<id>",
|
|
51
|
-
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
async function run() {
|
|
55
|
-
const res = await transactionsRefundsAllCreate(gr4vy, "7099948d-7286-47e4-aad8-b68f7eb44591");
|
|
56
|
-
if (res.ok) {
|
|
57
|
-
const { value: result } = res;
|
|
58
|
-
console.log(result);
|
|
59
|
-
} else {
|
|
60
|
-
console.log("transactionsRefundsAllCreate failed:", res.error);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
run();
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### Parameters
|
|
68
|
-
|
|
69
|
-
| Parameter | Type | Required | Description | Example |
|
|
70
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
71
|
-
| `transactionId` | *string* | :heavy_check_mark: | The ID of the transaction | [object Object] |
|
|
72
|
-
| `merchantAccountId` | *string* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | |
|
|
73
|
-
| `transactionRefundAllCreate` | [components.TransactionRefundAllCreate](../../models/components/transactionrefundallcreate.md) | :heavy_minus_sign: | N/A | |
|
|
74
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
|
|
75
|
-
| `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. | |
|
|
76
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
|
|
77
|
-
|
|
78
|
-
### Response
|
|
79
|
-
|
|
80
|
-
**Promise\<[components.Refunds](../../models/components/refunds.md)\>**
|
|
81
|
-
|
|
82
|
-
### Errors
|
|
83
|
-
|
|
84
|
-
| Error Type | Status Code | Content Type |
|
|
85
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
86
|
-
| errors.Error400 | 400 | application/json |
|
|
87
|
-
| errors.Error401 | 401 | application/json |
|
|
88
|
-
| errors.Error403 | 403 | application/json |
|
|
89
|
-
| errors.Error404 | 404 | application/json |
|
|
90
|
-
| errors.Error405 | 405 | application/json |
|
|
91
|
-
| errors.Error409 | 409 | application/json |
|
|
92
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
93
|
-
| errors.Error425 | 425 | application/json |
|
|
94
|
-
| errors.Error429 | 429 | application/json |
|
|
95
|
-
| errors.Error500 | 500 | application/json |
|
|
96
|
-
| errors.Error502 | 502 | application/json |
|
|
97
|
-
| errors.Error504 | 504 | application/json |
|
|
98
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
# AuditLogs
|
|
2
|
-
(*auditLogs*)
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
### Available Operations
|
|
7
|
-
|
|
8
|
-
* [list](#list) - List audit log entries
|
|
9
|
-
|
|
10
|
-
## list
|
|
11
|
-
|
|
12
|
-
Returns a list of activity by dashboard users.
|
|
13
|
-
|
|
14
|
-
### Example Usage
|
|
15
|
-
|
|
16
|
-
<!-- UsageSnippet language="typescript" operationID="list_audit_logs" method="get" path="/audit-logs" -->
|
|
17
|
-
```typescript
|
|
18
|
-
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
19
|
-
import fs from "fs";
|
|
20
|
-
|
|
21
|
-
const gr4vy = new Gr4vy({
|
|
22
|
-
id: "example",
|
|
23
|
-
server: "sandbox",
|
|
24
|
-
merchantAccountId: "default",
|
|
25
|
-
bearerAuth: withToken({
|
|
26
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
27
|
-
}),
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
async function run() {
|
|
31
|
-
const result = await gr4vy.auditLogs.list();
|
|
32
|
-
|
|
33
|
-
for await (const page of result) {
|
|
34
|
-
console.log(page);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
run();
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### Standalone function
|
|
42
|
-
|
|
43
|
-
The standalone function version of this method:
|
|
44
|
-
|
|
45
|
-
```typescript
|
|
46
|
-
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
47
|
-
import { auditLogsList } from "@gr4vy/sdk/funcs/auditLogsList.js";
|
|
48
|
-
|
|
49
|
-
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
50
|
-
// You can create one instance of it to use across an application.
|
|
51
|
-
const gr4vy = new Gr4vyCore({
|
|
52
|
-
merchantAccountId: "<id>",
|
|
53
|
-
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
async function run() {
|
|
57
|
-
const res = await auditLogsList(gr4vy);
|
|
58
|
-
if (res.ok) {
|
|
59
|
-
const { value: result } = res;
|
|
60
|
-
for await (const page of result) {
|
|
61
|
-
console.log(page);
|
|
62
|
-
}
|
|
63
|
-
} else {
|
|
64
|
-
console.log("auditLogsList failed:", res.error);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
run();
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### Parameters
|
|
72
|
-
|
|
73
|
-
| Parameter | Type | Required | Description |
|
|
74
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
75
|
-
| `request` | [operations.ListAuditLogsRequest](../../models/operations/listauditlogsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
76
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
77
|
-
| `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. |
|
|
78
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
79
|
-
|
|
80
|
-
### Response
|
|
81
|
-
|
|
82
|
-
**Promise\<[operations.ListAuditLogsResponse](../../models/operations/listauditlogsresponse.md)\>**
|
|
83
|
-
|
|
84
|
-
### Errors
|
|
85
|
-
|
|
86
|
-
| Error Type | Status Code | Content Type |
|
|
87
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
88
|
-
| errors.Error400 | 400 | application/json |
|
|
89
|
-
| errors.Error401 | 401 | application/json |
|
|
90
|
-
| errors.Error403 | 403 | application/json |
|
|
91
|
-
| errors.Error404 | 404 | application/json |
|
|
92
|
-
| errors.Error405 | 405 | application/json |
|
|
93
|
-
| errors.Error409 | 409 | application/json |
|
|
94
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
95
|
-
| errors.Error425 | 425 | application/json |
|
|
96
|
-
| errors.Error429 | 429 | application/json |
|
|
97
|
-
| errors.Error500 | 500 | application/json |
|
|
98
|
-
| errors.Error502 | 502 | application/json |
|
|
99
|
-
| errors.Error504 | 504 | application/json |
|
|
100
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
# Balances
|
|
2
|
-
(*giftCards.balances*)
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
### Available Operations
|
|
7
|
-
|
|
8
|
-
* [list](#list) - List gift card balances
|
|
9
|
-
|
|
10
|
-
## list
|
|
11
|
-
|
|
12
|
-
Fetch the balances for one or more gift cards.
|
|
13
|
-
|
|
14
|
-
### Example Usage
|
|
15
|
-
|
|
16
|
-
<!-- UsageSnippet language="typescript" operationID="list_gift_card_balances" method="post" path="/gift-cards/balances" -->
|
|
17
|
-
```typescript
|
|
18
|
-
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
19
|
-
import fs from "fs";
|
|
20
|
-
|
|
21
|
-
const gr4vy = new Gr4vy({
|
|
22
|
-
id: "example",
|
|
23
|
-
server: "sandbox",
|
|
24
|
-
merchantAccountId: "default",
|
|
25
|
-
bearerAuth: withToken({
|
|
26
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
27
|
-
}),
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
async function run() {
|
|
31
|
-
const result = await gr4vy.giftCards.balances.list({
|
|
32
|
-
items: [
|
|
33
|
-
{
|
|
34
|
-
id: "356d56e5-fe16-42ae-97ee-8d55d846ae2e",
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
id: "356d56e5-fe16-42ae-97ee-8d55d846ae2e",
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
number: "4123455541234561234",
|
|
41
|
-
pin: "1234",
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
console.log(result);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
run();
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### Standalone function
|
|
53
|
-
|
|
54
|
-
The standalone function version of this method:
|
|
55
|
-
|
|
56
|
-
```typescript
|
|
57
|
-
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
58
|
-
import { giftCardsBalancesList } from "@gr4vy/sdk/funcs/giftCardsBalancesList.js";
|
|
59
|
-
|
|
60
|
-
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
61
|
-
// You can create one instance of it to use across an application.
|
|
62
|
-
const gr4vy = new Gr4vyCore({
|
|
63
|
-
merchantAccountId: "<id>",
|
|
64
|
-
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
async function run() {
|
|
68
|
-
const res = await giftCardsBalancesList(gr4vy, {
|
|
69
|
-
items: [
|
|
70
|
-
{
|
|
71
|
-
id: "356d56e5-fe16-42ae-97ee-8d55d846ae2e",
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
id: "356d56e5-fe16-42ae-97ee-8d55d846ae2e",
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
number: "4123455541234561234",
|
|
78
|
-
pin: "1234",
|
|
79
|
-
},
|
|
80
|
-
],
|
|
81
|
-
});
|
|
82
|
-
if (res.ok) {
|
|
83
|
-
const { value: result } = res;
|
|
84
|
-
console.log(result);
|
|
85
|
-
} else {
|
|
86
|
-
console.log("giftCardsBalancesList failed:", res.error);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
run();
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### Parameters
|
|
94
|
-
|
|
95
|
-
| Parameter | Type | Required | Description |
|
|
96
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
97
|
-
| `giftCardBalanceRequest` | [components.GiftCardBalanceRequest](../../models/components/giftcardbalancerequest.md) | :heavy_check_mark: | N/A |
|
|
98
|
-
| `merchantAccountId` | *string* | :heavy_minus_sign: | The ID of the merchant account to use for this request. |
|
|
99
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
100
|
-
| `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. |
|
|
101
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
102
|
-
|
|
103
|
-
### Response
|
|
104
|
-
|
|
105
|
-
**Promise\<[components.GiftCardSummaries](../../models/components/giftcardsummaries.md)\>**
|
|
106
|
-
|
|
107
|
-
### Errors
|
|
108
|
-
|
|
109
|
-
| Error Type | Status Code | Content Type |
|
|
110
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
111
|
-
| errors.Error400 | 400 | application/json |
|
|
112
|
-
| errors.Error401 | 401 | application/json |
|
|
113
|
-
| errors.Error403 | 403 | application/json |
|
|
114
|
-
| errors.Error404 | 404 | application/json |
|
|
115
|
-
| errors.Error405 | 405 | application/json |
|
|
116
|
-
| errors.Error409 | 409 | application/json |
|
|
117
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
118
|
-
| errors.Error425 | 425 | application/json |
|
|
119
|
-
| errors.Error429 | 429 | application/json |
|
|
120
|
-
| errors.Error500 | 500 | application/json |
|
|
121
|
-
| errors.Error502 | 502 | application/json |
|
|
122
|
-
| errors.Error504 | 504 | application/json |
|
|
123
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|