@gr4vy/sdk 1.5.8 → 1.6.1
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/checkoutsession.d.ts +15 -0
- package/models/components/checkoutsession.d.ts.map +1 -1
- package/models/components/checkoutsession.js +8 -0
- package/models/components/checkoutsession.js.map +1 -1
- package/models/components/checkoutsessioncreate.d.ts +15 -0
- package/models/components/checkoutsessioncreate.d.ts.map +1 -1
- package/models/components/checkoutsessioncreate.js +8 -0
- package/models/components/checkoutsessioncreate.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/models/components/checkoutsession.ts +23 -0
- package/src/models/components/checkoutsessioncreate.ts +23 -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
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
# Domains
|
|
2
|
-
(*digitalWallets.domains*)
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
### Available Operations
|
|
7
|
-
|
|
8
|
-
* [create](#create) - Register a digital wallet domain
|
|
9
|
-
* [delete](#delete) - Remove a digital wallet domain
|
|
10
|
-
|
|
11
|
-
## create
|
|
12
|
-
|
|
13
|
-
Register a digital wallet domain (Apple Pay only).
|
|
14
|
-
|
|
15
|
-
### Example Usage
|
|
16
|
-
|
|
17
|
-
<!-- UsageSnippet language="typescript" operationID="register_digital_wallet_domain" method="post" path="/digital-wallets/{digital_wallet_id}/domains" -->
|
|
18
|
-
```typescript
|
|
19
|
-
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
20
|
-
import fs from "fs";
|
|
21
|
-
|
|
22
|
-
const gr4vy = new Gr4vy({
|
|
23
|
-
id: "example",
|
|
24
|
-
server: "sandbox",
|
|
25
|
-
merchantAccountId: "default",
|
|
26
|
-
bearerAuth: withToken({
|
|
27
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
28
|
-
}),
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
async function run() {
|
|
32
|
-
const result = await gr4vy.digitalWallets.domains.create({
|
|
33
|
-
domainName: "example.com",
|
|
34
|
-
}, "1808f5e6-b49c-4db9-94fa-22371ea352f5");
|
|
35
|
-
|
|
36
|
-
console.log(result);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
run();
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### Standalone function
|
|
43
|
-
|
|
44
|
-
The standalone function version of this method:
|
|
45
|
-
|
|
46
|
-
```typescript
|
|
47
|
-
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
48
|
-
import { digitalWalletsDomainsCreate } from "@gr4vy/sdk/funcs/digitalWalletsDomainsCreate.js";
|
|
49
|
-
|
|
50
|
-
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
51
|
-
// You can create one instance of it to use across an application.
|
|
52
|
-
const gr4vy = new Gr4vyCore({
|
|
53
|
-
merchantAccountId: "<id>",
|
|
54
|
-
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
async function run() {
|
|
58
|
-
const res = await digitalWalletsDomainsCreate(gr4vy, {
|
|
59
|
-
domainName: "example.com",
|
|
60
|
-
}, "1808f5e6-b49c-4db9-94fa-22371ea352f5");
|
|
61
|
-
if (res.ok) {
|
|
62
|
-
const { value: result } = res;
|
|
63
|
-
console.log(result);
|
|
64
|
-
} else {
|
|
65
|
-
console.log("digitalWalletsDomainsCreate failed:", res.error);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
run();
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
### Parameters
|
|
73
|
-
|
|
74
|
-
| Parameter | Type | Required | Description | Example |
|
|
75
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
76
|
-
| `digitalWalletId` | *string* | :heavy_check_mark: | The ID of the digital wallet to remove a domain for. | [object Object] |
|
|
77
|
-
| `digitalWalletDomain` | [components.DigitalWalletDomain](../../models/components/digitalwalletdomain.md) | :heavy_check_mark: | N/A | |
|
|
78
|
-
| `merchantAccountId` | *string* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | |
|
|
79
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
|
|
80
|
-
| `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. | |
|
|
81
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
|
|
82
|
-
|
|
83
|
-
### Response
|
|
84
|
-
|
|
85
|
-
**Promise\<[any](../../models/.md)\>**
|
|
86
|
-
|
|
87
|
-
### Errors
|
|
88
|
-
|
|
89
|
-
| Error Type | Status Code | Content Type |
|
|
90
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
91
|
-
| errors.Error400 | 400 | application/json |
|
|
92
|
-
| errors.Error401 | 401 | application/json |
|
|
93
|
-
| errors.Error403 | 403 | application/json |
|
|
94
|
-
| errors.Error404 | 404 | application/json |
|
|
95
|
-
| errors.Error405 | 405 | application/json |
|
|
96
|
-
| errors.Error409 | 409 | application/json |
|
|
97
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
98
|
-
| errors.Error425 | 425 | application/json |
|
|
99
|
-
| errors.Error429 | 429 | application/json |
|
|
100
|
-
| errors.Error500 | 500 | application/json |
|
|
101
|
-
| errors.Error502 | 502 | application/json |
|
|
102
|
-
| errors.Error504 | 504 | application/json |
|
|
103
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
104
|
-
|
|
105
|
-
## delete
|
|
106
|
-
|
|
107
|
-
Remove a digital wallet domain (Apple Pay only).
|
|
108
|
-
|
|
109
|
-
### Example Usage
|
|
110
|
-
|
|
111
|
-
<!-- UsageSnippet language="typescript" operationID="unregister_digital_wallet_domain" method="delete" path="/digital-wallets/{digital_wallet_id}/domains" -->
|
|
112
|
-
```typescript
|
|
113
|
-
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
114
|
-
import fs from "fs";
|
|
115
|
-
|
|
116
|
-
const gr4vy = new Gr4vy({
|
|
117
|
-
id: "example",
|
|
118
|
-
server: "sandbox",
|
|
119
|
-
merchantAccountId: "default",
|
|
120
|
-
bearerAuth: withToken({
|
|
121
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
122
|
-
}),
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
async function run() {
|
|
126
|
-
await gr4vy.digitalWallets.domains.delete({
|
|
127
|
-
domainName: "example.com",
|
|
128
|
-
}, "");
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
run();
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
### Standalone function
|
|
137
|
-
|
|
138
|
-
The standalone function version of this method:
|
|
139
|
-
|
|
140
|
-
```typescript
|
|
141
|
-
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
142
|
-
import { digitalWalletsDomainsDelete } from "@gr4vy/sdk/funcs/digitalWalletsDomainsDelete.js";
|
|
143
|
-
|
|
144
|
-
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
145
|
-
// You can create one instance of it to use across an application.
|
|
146
|
-
const gr4vy = new Gr4vyCore({
|
|
147
|
-
merchantAccountId: "<id>",
|
|
148
|
-
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
async function run() {
|
|
152
|
-
const res = await digitalWalletsDomainsDelete(gr4vy, {
|
|
153
|
-
domainName: "example.com",
|
|
154
|
-
}, "");
|
|
155
|
-
if (res.ok) {
|
|
156
|
-
const { value: result } = res;
|
|
157
|
-
|
|
158
|
-
} else {
|
|
159
|
-
console.log("digitalWalletsDomainsDelete failed:", res.error);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
run();
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
### Parameters
|
|
167
|
-
|
|
168
|
-
| Parameter | Type | Required | Description | Example |
|
|
169
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
170
|
-
| `digitalWalletId` | *string* | :heavy_check_mark: | N/A | [object Object] |
|
|
171
|
-
| `digitalWalletDomain` | [components.DigitalWalletDomain](../../models/components/digitalwalletdomain.md) | :heavy_check_mark: | N/A | |
|
|
172
|
-
| `merchantAccountId` | *string* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | |
|
|
173
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
|
|
174
|
-
| `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. | |
|
|
175
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
|
|
176
|
-
|
|
177
|
-
### Response
|
|
178
|
-
|
|
179
|
-
**Promise\<void\>**
|
|
180
|
-
|
|
181
|
-
### Errors
|
|
182
|
-
|
|
183
|
-
| Error Type | Status Code | Content Type |
|
|
184
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
185
|
-
| errors.Error400 | 400 | application/json |
|
|
186
|
-
| errors.Error401 | 401 | application/json |
|
|
187
|
-
| errors.Error403 | 403 | application/json |
|
|
188
|
-
| errors.Error404 | 404 | application/json |
|
|
189
|
-
| errors.Error405 | 405 | application/json |
|
|
190
|
-
| errors.Error409 | 409 | application/json |
|
|
191
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
192
|
-
| errors.Error425 | 425 | application/json |
|
|
193
|
-
| errors.Error429 | 429 | application/json |
|
|
194
|
-
| errors.Error500 | 500 | application/json |
|
|
195
|
-
| errors.Error502 | 502 | application/json |
|
|
196
|
-
| errors.Error504 | 504 | application/json |
|
|
197
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
# Events
|
|
2
|
-
(*transactions.events*)
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
### Available Operations
|
|
7
|
-
|
|
8
|
-
* [list](#list) - List transaction events
|
|
9
|
-
|
|
10
|
-
## list
|
|
11
|
-
|
|
12
|
-
Retrieve a paginated list of events related to processing a transaction, including status changes, API requests, and webhook delivery attempts. Events are listed in chronological order, with the most recent events first.
|
|
13
|
-
|
|
14
|
-
### Example Usage
|
|
15
|
-
|
|
16
|
-
<!-- UsageSnippet language="typescript" operationID="list_transaction_events" method="get" path="/transactions/{transaction_id}/events" -->
|
|
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.events.list("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 { transactionsEventsList } from "@gr4vy/sdk/funcs/transactionsEventsList.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 transactionsEventsList(gr4vy, "7099948d-7286-47e4-aad8-b68f7eb44591");
|
|
56
|
-
if (res.ok) {
|
|
57
|
-
const { value: result } = res;
|
|
58
|
-
console.log(result);
|
|
59
|
-
} else {
|
|
60
|
-
console.log("transactionsEventsList 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
|
-
| `cursor` | *string* | :heavy_minus_sign: | A pointer to the page of results to return. | [object Object] |
|
|
73
|
-
| `limit` | *number* | :heavy_minus_sign: | The maximum number of items that are at returned. | [object Object] |
|
|
74
|
-
| `merchantAccountId` | *string* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | |
|
|
75
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
|
|
76
|
-
| `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. | |
|
|
77
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
|
|
78
|
-
|
|
79
|
-
### Response
|
|
80
|
-
|
|
81
|
-
**Promise\<[components.TransactionEvents](../../models/components/transactionevents.md)\>**
|
|
82
|
-
|
|
83
|
-
### Errors
|
|
84
|
-
|
|
85
|
-
| Error Type | Status Code | Content Type |
|
|
86
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
87
|
-
| errors.Error400 | 400 | application/json |
|
|
88
|
-
| errors.Error401 | 401 | application/json |
|
|
89
|
-
| errors.Error403 | 403 | application/json |
|
|
90
|
-
| errors.Error404 | 404 | application/json |
|
|
91
|
-
| errors.Error405 | 405 | application/json |
|
|
92
|
-
| errors.Error409 | 409 | application/json |
|
|
93
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
94
|
-
| errors.Error425 | 425 | application/json |
|
|
95
|
-
| errors.Error429 | 429 | application/json |
|
|
96
|
-
| errors.Error500 | 500 | application/json |
|
|
97
|
-
| errors.Error502 | 502 | application/json |
|
|
98
|
-
| errors.Error504 | 504 | application/json |
|
|
99
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
@@ -1,285 +0,0 @@
|
|
|
1
|
-
# Executions
|
|
2
|
-
(*reports.executions*)
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
### Available Operations
|
|
7
|
-
|
|
8
|
-
* [list](#list) - List executions for report
|
|
9
|
-
* [url](#url) - Create URL for executed report
|
|
10
|
-
* [get](#get) - Get executed report
|
|
11
|
-
|
|
12
|
-
## list
|
|
13
|
-
|
|
14
|
-
List all executions of a specific report.
|
|
15
|
-
|
|
16
|
-
### Example Usage
|
|
17
|
-
|
|
18
|
-
<!-- UsageSnippet language="typescript" operationID="list_report_executions" method="get" path="/reports/{report_id}/executions" -->
|
|
19
|
-
```typescript
|
|
20
|
-
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
21
|
-
import fs from "fs";
|
|
22
|
-
|
|
23
|
-
const gr4vy = new Gr4vy({
|
|
24
|
-
id: "example",
|
|
25
|
-
server: "sandbox",
|
|
26
|
-
merchantAccountId: "default",
|
|
27
|
-
bearerAuth: withToken({
|
|
28
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
29
|
-
}),
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
async function run() {
|
|
33
|
-
const result = await gr4vy.reports.executions.list("4d4c7123-b794-4fad-b1b9-5ab2606e6bbe");
|
|
34
|
-
|
|
35
|
-
for await (const page of result) {
|
|
36
|
-
console.log(page);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
run();
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### Standalone function
|
|
44
|
-
|
|
45
|
-
The standalone function version of this method:
|
|
46
|
-
|
|
47
|
-
```typescript
|
|
48
|
-
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
49
|
-
import { reportsExecutionsList } from "@gr4vy/sdk/funcs/reportsExecutionsList.js";
|
|
50
|
-
|
|
51
|
-
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
52
|
-
// You can create one instance of it to use across an application.
|
|
53
|
-
const gr4vy = new Gr4vyCore({
|
|
54
|
-
merchantAccountId: "<id>",
|
|
55
|
-
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
async function run() {
|
|
59
|
-
const res = await reportsExecutionsList(gr4vy, "4d4c7123-b794-4fad-b1b9-5ab2606e6bbe");
|
|
60
|
-
if (res.ok) {
|
|
61
|
-
const { value: result } = res;
|
|
62
|
-
for await (const page of result) {
|
|
63
|
-
console.log(page);
|
|
64
|
-
}
|
|
65
|
-
} else {
|
|
66
|
-
console.log("reportsExecutionsList failed:", res.error);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
run();
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### Parameters
|
|
74
|
-
|
|
75
|
-
| Parameter | Type | Required | Description | Example |
|
|
76
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
77
|
-
| `reportId` | *string* | :heavy_check_mark: | The ID of the report to retrieve details for. | [object Object] |
|
|
78
|
-
| `cursor` | *string* | :heavy_minus_sign: | A pointer to the page of results to return. | [object Object] |
|
|
79
|
-
| `limit` | *number* | :heavy_minus_sign: | The maximum number of items that are at returned. | [object Object] |
|
|
80
|
-
| `merchantAccountId` | *string* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | |
|
|
81
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
|
|
82
|
-
| `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. | |
|
|
83
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
|
|
84
|
-
|
|
85
|
-
### Response
|
|
86
|
-
|
|
87
|
-
**Promise\<[operations.ListReportExecutionsResponse](../../models/operations/listreportexecutionsresponse.md)\>**
|
|
88
|
-
|
|
89
|
-
### Errors
|
|
90
|
-
|
|
91
|
-
| Error Type | Status Code | Content Type |
|
|
92
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
93
|
-
| errors.Error400 | 400 | application/json |
|
|
94
|
-
| errors.Error401 | 401 | application/json |
|
|
95
|
-
| errors.Error403 | 403 | application/json |
|
|
96
|
-
| errors.Error404 | 404 | application/json |
|
|
97
|
-
| errors.Error405 | 405 | application/json |
|
|
98
|
-
| errors.Error409 | 409 | application/json |
|
|
99
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
100
|
-
| errors.Error425 | 425 | application/json |
|
|
101
|
-
| errors.Error429 | 429 | application/json |
|
|
102
|
-
| errors.Error500 | 500 | application/json |
|
|
103
|
-
| errors.Error502 | 502 | application/json |
|
|
104
|
-
| errors.Error504 | 504 | application/json |
|
|
105
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
106
|
-
|
|
107
|
-
## url
|
|
108
|
-
|
|
109
|
-
Creates a download URL for a specific execution of a report.
|
|
110
|
-
|
|
111
|
-
### Example Usage
|
|
112
|
-
|
|
113
|
-
<!-- UsageSnippet language="typescript" operationID="create_report_execution_url" method="post" path="/reports/{report_id}/executions/{report_execution_id}/url" -->
|
|
114
|
-
```typescript
|
|
115
|
-
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
116
|
-
import fs from "fs";
|
|
117
|
-
|
|
118
|
-
const gr4vy = new Gr4vy({
|
|
119
|
-
id: "example",
|
|
120
|
-
server: "sandbox",
|
|
121
|
-
merchantAccountId: "default",
|
|
122
|
-
bearerAuth: withToken({
|
|
123
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
124
|
-
}),
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
async function run() {
|
|
128
|
-
const result = await gr4vy.reports.executions.url("4d4c7123-b794-4fad-b1b9-5ab2606e6bbe", "003bc416-f32a-420c-8eb2-062a386e1fb0");
|
|
129
|
-
|
|
130
|
-
console.log(result);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
run();
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
### Standalone function
|
|
137
|
-
|
|
138
|
-
The standalone function version of this method:
|
|
139
|
-
|
|
140
|
-
```typescript
|
|
141
|
-
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
142
|
-
import { reportsExecutionsUrl } from "@gr4vy/sdk/funcs/reportsExecutionsUrl.js";
|
|
143
|
-
|
|
144
|
-
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
145
|
-
// You can create one instance of it to use across an application.
|
|
146
|
-
const gr4vy = new Gr4vyCore({
|
|
147
|
-
merchantAccountId: "<id>",
|
|
148
|
-
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
async function run() {
|
|
152
|
-
const res = await reportsExecutionsUrl(gr4vy, "4d4c7123-b794-4fad-b1b9-5ab2606e6bbe", "003bc416-f32a-420c-8eb2-062a386e1fb0");
|
|
153
|
-
if (res.ok) {
|
|
154
|
-
const { value: result } = res;
|
|
155
|
-
console.log(result);
|
|
156
|
-
} else {
|
|
157
|
-
console.log("reportsExecutionsUrl failed:", res.error);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
run();
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
### Parameters
|
|
165
|
-
|
|
166
|
-
| Parameter | Type | Required | Description | Example |
|
|
167
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
168
|
-
| `reportId` | *string* | :heavy_check_mark: | The ID of the report to retrieve a URL for. | [object Object] |
|
|
169
|
-
| `reportExecutionId` | *string* | :heavy_check_mark: | The ID of the execution of a report to retrieve a URL for. | [object Object] |
|
|
170
|
-
| `merchantAccountId` | *string* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | |
|
|
171
|
-
| `reportExecutionUrlGenerate` | [components.ReportExecutionUrlGenerate](../../models/components/reportexecutionurlgenerate.md) | :heavy_minus_sign: | N/A | |
|
|
172
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
|
|
173
|
-
| `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. | |
|
|
174
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
|
|
175
|
-
|
|
176
|
-
### Response
|
|
177
|
-
|
|
178
|
-
**Promise\<[components.ReportExecutionUrl](../../models/components/reportexecutionurl.md)\>**
|
|
179
|
-
|
|
180
|
-
### Errors
|
|
181
|
-
|
|
182
|
-
| Error Type | Status Code | Content Type |
|
|
183
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
184
|
-
| errors.Error400 | 400 | application/json |
|
|
185
|
-
| errors.Error401 | 401 | application/json |
|
|
186
|
-
| errors.Error403 | 403 | application/json |
|
|
187
|
-
| errors.Error404 | 404 | application/json |
|
|
188
|
-
| errors.Error405 | 405 | application/json |
|
|
189
|
-
| errors.Error409 | 409 | application/json |
|
|
190
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
191
|
-
| errors.Error425 | 425 | application/json |
|
|
192
|
-
| errors.Error429 | 429 | application/json |
|
|
193
|
-
| errors.Error500 | 500 | application/json |
|
|
194
|
-
| errors.Error502 | 502 | application/json |
|
|
195
|
-
| errors.Error504 | 504 | application/json |
|
|
196
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
197
|
-
|
|
198
|
-
## get
|
|
199
|
-
|
|
200
|
-
Fetch a specific executed report.
|
|
201
|
-
|
|
202
|
-
### Example Usage
|
|
203
|
-
|
|
204
|
-
<!-- UsageSnippet language="typescript" operationID="get_report_execution" method="get" path="/report-executions/{report_execution_id}" -->
|
|
205
|
-
```typescript
|
|
206
|
-
import { Gr4vy, withToken } from "@gr4vy/sdk";
|
|
207
|
-
import fs from "fs";
|
|
208
|
-
|
|
209
|
-
const gr4vy = new Gr4vy({
|
|
210
|
-
id: "example",
|
|
211
|
-
server: "sandbox",
|
|
212
|
-
merchantAccountId: "default",
|
|
213
|
-
bearerAuth: withToken({
|
|
214
|
-
privateKey: fs.readFileSync("private_key.pem", "utf8"),
|
|
215
|
-
}),
|
|
216
|
-
});
|
|
217
|
-
|
|
218
|
-
async function run() {
|
|
219
|
-
const result = await gr4vy.reports.executions.get("003bc416-f32a-420c-8eb2-062a386e1fb0");
|
|
220
|
-
|
|
221
|
-
console.log(result);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
run();
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
### Standalone function
|
|
228
|
-
|
|
229
|
-
The standalone function version of this method:
|
|
230
|
-
|
|
231
|
-
```typescript
|
|
232
|
-
import { Gr4vyCore } from "@gr4vy/sdk/core.js";
|
|
233
|
-
import { reportsExecutionsGet } from "@gr4vy/sdk/funcs/reportsExecutionsGet.js";
|
|
234
|
-
|
|
235
|
-
// Use `Gr4vyCore` for best tree-shaking performance.
|
|
236
|
-
// You can create one instance of it to use across an application.
|
|
237
|
-
const gr4vy = new Gr4vyCore({
|
|
238
|
-
merchantAccountId: "<id>",
|
|
239
|
-
bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
|
|
240
|
-
});
|
|
241
|
-
|
|
242
|
-
async function run() {
|
|
243
|
-
const res = await reportsExecutionsGet(gr4vy, "003bc416-f32a-420c-8eb2-062a386e1fb0");
|
|
244
|
-
if (res.ok) {
|
|
245
|
-
const { value: result } = res;
|
|
246
|
-
console.log(result);
|
|
247
|
-
} else {
|
|
248
|
-
console.log("reportsExecutionsGet failed:", res.error);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
run();
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
### Parameters
|
|
256
|
-
|
|
257
|
-
| Parameter | Type | Required | Description | Example |
|
|
258
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
259
|
-
| `reportExecutionId` | *string* | :heavy_check_mark: | The ID of the execution of a report to retrieve details for. | [object Object] |
|
|
260
|
-
| `merchantAccountId` | *string* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | |
|
|
261
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
|
|
262
|
-
| `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. | |
|
|
263
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
|
|
264
|
-
|
|
265
|
-
### Response
|
|
266
|
-
|
|
267
|
-
**Promise\<[components.ReportExecution](../../models/components/reportexecution.md)\>**
|
|
268
|
-
|
|
269
|
-
### Errors
|
|
270
|
-
|
|
271
|
-
| Error Type | Status Code | Content Type |
|
|
272
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
273
|
-
| errors.Error400 | 400 | application/json |
|
|
274
|
-
| errors.Error401 | 401 | application/json |
|
|
275
|
-
| errors.Error403 | 403 | application/json |
|
|
276
|
-
| errors.Error404 | 404 | application/json |
|
|
277
|
-
| errors.Error405 | 405 | application/json |
|
|
278
|
-
| errors.Error409 | 409 | application/json |
|
|
279
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
280
|
-
| errors.Error425 | 425 | application/json |
|
|
281
|
-
| errors.Error429 | 429 | application/json |
|
|
282
|
-
| errors.Error500 | 500 | application/json |
|
|
283
|
-
| errors.Error502 | 502 | application/json |
|
|
284
|
-
| errors.Error504 | 504 | application/json |
|
|
285
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|