@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.
Files changed (54) hide show
  1. package/examples/package-lock.json +1 -1
  2. package/jsr.json +1 -1
  3. package/lib/config.d.ts +3 -3
  4. package/lib/config.js +3 -3
  5. package/models/components/index.d.ts +1 -0
  6. package/models/components/index.d.ts.map +1 -1
  7. package/models/components/index.js +1 -0
  8. package/models/components/index.js.map +1 -1
  9. package/models/components/monatospeioptions.d.ts +32 -0
  10. package/models/components/monatospeioptions.d.ts.map +1 -0
  11. package/models/components/monatospeioptions.js +78 -0
  12. package/models/components/monatospeioptions.js.map +1 -0
  13. package/models/components/transactionconnectionoptions.d.ts +6 -0
  14. package/models/components/transactionconnectionoptions.d.ts.map +1 -1
  15. package/models/components/transactionconnectionoptions.js +5 -0
  16. package/models/components/transactionconnectionoptions.js.map +1 -1
  17. package/package.json +1 -1
  18. package/src/lib/config.ts +3 -3
  19. package/src/models/components/index.ts +1 -0
  20. package/src/models/components/monatospeioptions.ts +78 -0
  21. package/src/models/components/transactionconnectionoptions.ts +15 -0
  22. package/docs/sdks/all/README.md +0 -98
  23. package/docs/sdks/auditlogs/README.md +0 -100
  24. package/docs/sdks/balances/README.md +0 -123
  25. package/docs/sdks/buyers/README.md +0 -461
  26. package/docs/sdks/cardschemedefinitions/README.md +0 -96
  27. package/docs/sdks/checkoutsessions/README.md +0 -367
  28. package/docs/sdks/cryptogram/README.md +0 -103
  29. package/docs/sdks/digitalwallets/README.md +0 -465
  30. package/docs/sdks/domains/README.md +0 -197
  31. package/docs/sdks/events/README.md +0 -99
  32. package/docs/sdks/executions/README.md +0 -285
  33. package/docs/sdks/giftcards/README.md +0 -376
  34. package/docs/sdks/gr4vygiftcards/README.md +0 -98
  35. package/docs/sdks/gr4vypaymentmethods/README.md +0 -96
  36. package/docs/sdks/gr4vyrefunds/README.md +0 -279
  37. package/docs/sdks/jobs/README.md +0 -107
  38. package/docs/sdks/merchantaccounts/README.md +0 -382
  39. package/docs/sdks/networktokens/README.md +0 -467
  40. package/docs/sdks/paymentlinks/README.md +0 -381
  41. package/docs/sdks/paymentmethods/README.md +0 -376
  42. package/docs/sdks/paymentoptions/README.md +0 -97
  43. package/docs/sdks/paymentservicedefinitions/README.md +0 -281
  44. package/docs/sdks/paymentservices/README.md +0 -706
  45. package/docs/sdks/paymentservicetokens/README.md +0 -286
  46. package/docs/sdks/payouts/README.md +0 -298
  47. package/docs/sdks/refunds/README.md +0 -97
  48. package/docs/sdks/reportexecutions/README.md +0 -100
  49. package/docs/sdks/reports/README.md +0 -403
  50. package/docs/sdks/sessions/README.md +0 -289
  51. package/docs/sdks/settlements/README.md +0 -188
  52. package/docs/sdks/shippingdetails/README.md +0 -462
  53. package/docs/sdks/transactions/README.md +0 -752
  54. package/examples/README.md +0 -31
@@ -1,279 +0,0 @@
1
- # Gr4vyRefunds
2
- (*transactions.refunds*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [list](#list) - List transaction refunds
9
- * [create](#create) - Create transaction refund
10
- * [get](#get) - Get transaction refund
11
-
12
- ## list
13
-
14
- List refunds for a transaction.
15
-
16
- ### Example Usage
17
-
18
- <!-- UsageSnippet language="typescript" operationID="list_transaction_refunds" method="get" path="/transactions/{transaction_id}/refunds" -->
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.transactions.refunds.list("7099948d-7286-47e4-aad8-b68f7eb44591");
34
-
35
- console.log(result);
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 { transactionsRefundsList } from "@gr4vy/sdk/funcs/transactionsRefundsList.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 transactionsRefundsList(gr4vy, "7099948d-7286-47e4-aad8-b68f7eb44591");
58
- if (res.ok) {
59
- const { value: result } = res;
60
- console.log(result);
61
- } else {
62
- console.log("transactionsRefundsList failed:", res.error);
63
- }
64
- }
65
-
66
- run();
67
- ```
68
-
69
- ### Parameters
70
-
71
- | Parameter | Type | Required | Description | Example |
72
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
73
- | `transactionId` | *string* | :heavy_check_mark: | The ID of the transaction | [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.Refunds](../../models/components/refunds.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 | \*/\* |
100
-
101
- ## create
102
-
103
- Create a refund for a transaction.
104
-
105
- ### Example Usage
106
-
107
- <!-- UsageSnippet language="typescript" operationID="create_transaction_refund" method="post" path="/transactions/{transaction_id}/refunds" -->
108
- ```typescript
109
- import { Gr4vy, withToken } from "@gr4vy/sdk";
110
- import fs from "fs";
111
-
112
- const gr4vy = new Gr4vy({
113
- id: "example",
114
- server: "sandbox",
115
- merchantAccountId: "default",
116
- bearerAuth: withToken({
117
- privateKey: fs.readFileSync("private_key.pem", "utf8"),
118
- }),
119
- });
120
-
121
- async function run() {
122
- const result = await gr4vy.transactions.refunds.create({}, "7099948d-7286-47e4-aad8-b68f7eb44591");
123
-
124
- console.log(result);
125
- }
126
-
127
- run();
128
- ```
129
-
130
- ### Standalone function
131
-
132
- The standalone function version of this method:
133
-
134
- ```typescript
135
- import { Gr4vyCore } from "@gr4vy/sdk/core.js";
136
- import { transactionsRefundsCreate } from "@gr4vy/sdk/funcs/transactionsRefundsCreate.js";
137
-
138
- // Use `Gr4vyCore` for best tree-shaking performance.
139
- // You can create one instance of it to use across an application.
140
- const gr4vy = new Gr4vyCore({
141
- merchantAccountId: "<id>",
142
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
143
- });
144
-
145
- async function run() {
146
- const res = await transactionsRefundsCreate(gr4vy, {}, "7099948d-7286-47e4-aad8-b68f7eb44591");
147
- if (res.ok) {
148
- const { value: result } = res;
149
- console.log(result);
150
- } else {
151
- console.log("transactionsRefundsCreate failed:", res.error);
152
- }
153
- }
154
-
155
- run();
156
- ```
157
-
158
- ### Parameters
159
-
160
- | Parameter | Type | Required | Description | Example |
161
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
162
- | `transactionId` | *string* | :heavy_check_mark: | The ID of the transaction | [object Object] |
163
- | `transactionRefundCreate` | [components.TransactionRefundCreate](../../models/components/transactionrefundcreate.md) | :heavy_check_mark: | N/A | |
164
- | `merchantAccountId` | *string* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | |
165
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
166
- | `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. | |
167
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
168
-
169
- ### Response
170
-
171
- **Promise\<[components.Refund](../../models/components/refund.md)\>**
172
-
173
- ### Errors
174
-
175
- | Error Type | Status Code | Content Type |
176
- | -------------------------- | -------------------------- | -------------------------- |
177
- | errors.Error400 | 400 | application/json |
178
- | errors.Error401 | 401 | application/json |
179
- | errors.Error403 | 403 | application/json |
180
- | errors.Error404 | 404 | application/json |
181
- | errors.Error405 | 405 | application/json |
182
- | errors.Error409 | 409 | application/json |
183
- | errors.HTTPValidationError | 422 | application/json |
184
- | errors.Error425 | 425 | application/json |
185
- | errors.Error429 | 429 | application/json |
186
- | errors.Error500 | 500 | application/json |
187
- | errors.Error502 | 502 | application/json |
188
- | errors.Error504 | 504 | application/json |
189
- | errors.SDKError | 4XX, 5XX | \*/\* |
190
-
191
- ## get
192
-
193
- Fetch refund for a transaction.
194
-
195
- ### Example Usage
196
-
197
- <!-- UsageSnippet language="typescript" operationID="get_transaction_refund" method="get" path="/transactions/{transaction_id}/refunds/{refund_id}" -->
198
- ```typescript
199
- import { Gr4vy, withToken } from "@gr4vy/sdk";
200
- import fs from "fs";
201
-
202
- const gr4vy = new Gr4vy({
203
- id: "example",
204
- server: "sandbox",
205
- merchantAccountId: "default",
206
- bearerAuth: withToken({
207
- privateKey: fs.readFileSync("private_key.pem", "utf8"),
208
- }),
209
- });
210
-
211
- async function run() {
212
- const result = await gr4vy.transactions.refunds.get("7099948d-7286-47e4-aad8-b68f7eb44591", "6a1d4e46-14ed-4fe1-a45f-eff4e025d211");
213
-
214
- console.log(result);
215
- }
216
-
217
- run();
218
- ```
219
-
220
- ### Standalone function
221
-
222
- The standalone function version of this method:
223
-
224
- ```typescript
225
- import { Gr4vyCore } from "@gr4vy/sdk/core.js";
226
- import { transactionsRefundsGet } from "@gr4vy/sdk/funcs/transactionsRefundsGet.js";
227
-
228
- // Use `Gr4vyCore` for best tree-shaking performance.
229
- // You can create one instance of it to use across an application.
230
- const gr4vy = new Gr4vyCore({
231
- merchantAccountId: "<id>",
232
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
233
- });
234
-
235
- async function run() {
236
- const res = await transactionsRefundsGet(gr4vy, "7099948d-7286-47e4-aad8-b68f7eb44591", "6a1d4e46-14ed-4fe1-a45f-eff4e025d211");
237
- if (res.ok) {
238
- const { value: result } = res;
239
- console.log(result);
240
- } else {
241
- console.log("transactionsRefundsGet failed:", res.error);
242
- }
243
- }
244
-
245
- run();
246
- ```
247
-
248
- ### Parameters
249
-
250
- | Parameter | Type | Required | Description | Example |
251
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
252
- | `transactionId` | *string* | :heavy_check_mark: | The ID of the transaction | [object Object] |
253
- | `refundId` | *string* | :heavy_check_mark: | The ID of the refund | [object Object] |
254
- | `merchantAccountId` | *string* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | |
255
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
256
- | `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. | |
257
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
258
-
259
- ### Response
260
-
261
- **Promise\<[components.Refund](../../models/components/refund.md)\>**
262
-
263
- ### Errors
264
-
265
- | Error Type | Status Code | Content Type |
266
- | -------------------------- | -------------------------- | -------------------------- |
267
- | errors.Error400 | 400 | application/json |
268
- | errors.Error401 | 401 | application/json |
269
- | errors.Error403 | 403 | application/json |
270
- | errors.Error404 | 404 | application/json |
271
- | errors.Error405 | 405 | application/json |
272
- | errors.Error409 | 409 | application/json |
273
- | errors.HTTPValidationError | 422 | application/json |
274
- | errors.Error425 | 425 | application/json |
275
- | errors.Error429 | 429 | application/json |
276
- | errors.Error500 | 500 | application/json |
277
- | errors.Error502 | 502 | application/json |
278
- | errors.Error504 | 504 | application/json |
279
- | errors.SDKError | 4XX, 5XX | \*/\* |
@@ -1,107 +0,0 @@
1
- # Jobs
2
- (*accountUpdater.jobs*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [create](#create) - Create account updater job
9
-
10
- ## create
11
-
12
- Schedule one or more stored cards for an account update.
13
-
14
- ### Example Usage
15
-
16
- <!-- UsageSnippet language="typescript" operationID="create_account_updater_job" method="post" path="/account-updater/jobs" -->
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.accountUpdater.jobs.create({
32
- paymentMethodIds: [
33
- "ef9496d8-53a5-4aad-8ca2-00eb68334389",
34
- "f29e886e-93cc-4714-b4a3-12b7a718e595",
35
- ],
36
- });
37
-
38
- console.log(result);
39
- }
40
-
41
- run();
42
- ```
43
-
44
- ### Standalone function
45
-
46
- The standalone function version of this method:
47
-
48
- ```typescript
49
- import { Gr4vyCore } from "@gr4vy/sdk/core.js";
50
- import { accountUpdaterJobsCreate } from "@gr4vy/sdk/funcs/accountUpdaterJobsCreate.js";
51
-
52
- // Use `Gr4vyCore` for best tree-shaking performance.
53
- // You can create one instance of it to use across an application.
54
- const gr4vy = new Gr4vyCore({
55
- merchantAccountId: "<id>",
56
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
57
- });
58
-
59
- async function run() {
60
- const res = await accountUpdaterJobsCreate(gr4vy, {
61
- paymentMethodIds: [
62
- "ef9496d8-53a5-4aad-8ca2-00eb68334389",
63
- "f29e886e-93cc-4714-b4a3-12b7a718e595",
64
- ],
65
- });
66
- if (res.ok) {
67
- const { value: result } = res;
68
- console.log(result);
69
- } else {
70
- console.log("accountUpdaterJobsCreate failed:", res.error);
71
- }
72
- }
73
-
74
- run();
75
- ```
76
-
77
- ### Parameters
78
-
79
- | Parameter | Type | Required | Description |
80
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
81
- | `accountUpdaterJobCreate` | [components.AccountUpdaterJobCreate](../../models/components/accountupdaterjobcreate.md) | :heavy_check_mark: | N/A |
82
- | `merchantAccountId` | *string* | :heavy_minus_sign: | The ID of the merchant account to use for this request. |
83
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
84
- | `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. |
85
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
86
-
87
- ### Response
88
-
89
- **Promise\<[components.AccountUpdaterJob](../../models/components/accountupdaterjob.md)\>**
90
-
91
- ### Errors
92
-
93
- | Error Type | Status Code | Content Type |
94
- | -------------------------- | -------------------------- | -------------------------- |
95
- | errors.Error400 | 400 | application/json |
96
- | errors.Error401 | 401 | application/json |
97
- | errors.Error403 | 403 | application/json |
98
- | errors.Error404 | 404 | application/json |
99
- | errors.Error405 | 405 | application/json |
100
- | errors.Error409 | 409 | application/json |
101
- | errors.HTTPValidationError | 422 | application/json |
102
- | errors.Error425 | 425 | application/json |
103
- | errors.Error429 | 429 | application/json |
104
- | errors.Error500 | 500 | application/json |
105
- | errors.Error502 | 502 | application/json |
106
- | errors.Error504 | 504 | application/json |
107
- | errors.SDKError | 4XX, 5XX | \*/\* |