@gr4vy/sdk 1.5.8 → 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 (39) 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/package.json +1 -1
  6. package/src/lib/config.ts +3 -3
  7. package/docs/sdks/all/README.md +0 -98
  8. package/docs/sdks/auditlogs/README.md +0 -100
  9. package/docs/sdks/balances/README.md +0 -123
  10. package/docs/sdks/buyers/README.md +0 -461
  11. package/docs/sdks/cardschemedefinitions/README.md +0 -96
  12. package/docs/sdks/checkoutsessions/README.md +0 -367
  13. package/docs/sdks/cryptogram/README.md +0 -103
  14. package/docs/sdks/digitalwallets/README.md +0 -465
  15. package/docs/sdks/domains/README.md +0 -197
  16. package/docs/sdks/events/README.md +0 -99
  17. package/docs/sdks/executions/README.md +0 -285
  18. package/docs/sdks/giftcards/README.md +0 -376
  19. package/docs/sdks/gr4vygiftcards/README.md +0 -98
  20. package/docs/sdks/gr4vypaymentmethods/README.md +0 -96
  21. package/docs/sdks/gr4vyrefunds/README.md +0 -279
  22. package/docs/sdks/jobs/README.md +0 -107
  23. package/docs/sdks/merchantaccounts/README.md +0 -382
  24. package/docs/sdks/networktokens/README.md +0 -467
  25. package/docs/sdks/paymentlinks/README.md +0 -381
  26. package/docs/sdks/paymentmethods/README.md +0 -376
  27. package/docs/sdks/paymentoptions/README.md +0 -97
  28. package/docs/sdks/paymentservicedefinitions/README.md +0 -281
  29. package/docs/sdks/paymentservices/README.md +0 -706
  30. package/docs/sdks/paymentservicetokens/README.md +0 -286
  31. package/docs/sdks/payouts/README.md +0 -298
  32. package/docs/sdks/refunds/README.md +0 -97
  33. package/docs/sdks/reportexecutions/README.md +0 -100
  34. package/docs/sdks/reports/README.md +0 -403
  35. package/docs/sdks/sessions/README.md +0 -289
  36. package/docs/sdks/settlements/README.md +0 -188
  37. package/docs/sdks/shippingdetails/README.md +0 -462
  38. package/docs/sdks/transactions/README.md +0 -752
  39. package/examples/README.md +0 -31
@@ -1,465 +0,0 @@
1
- # DigitalWallets
2
- (*digitalWallets*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [create](#create) - Register digital wallet
9
- * [list](#list) - List digital wallets
10
- * [get](#get) - Get digital wallet
11
- * [delete](#delete) - Delete digital wallet
12
- * [update](#update) - Update digital wallet
13
-
14
- ## create
15
-
16
- Register a digital wallet like Apple Pay, Google Pay, or Click to Pay.
17
-
18
- ### Example Usage
19
-
20
- <!-- UsageSnippet language="typescript" operationID="configure_digital_wallet" method="post" path="/digital-wallets" -->
21
- ```typescript
22
- import { Gr4vy, withToken } from "@gr4vy/sdk";
23
- import fs from "fs";
24
-
25
- const gr4vy = new Gr4vy({
26
- id: "example",
27
- server: "sandbox",
28
- merchantAccountId: "default",
29
- bearerAuth: withToken({
30
- privateKey: fs.readFileSync("private_key.pem", "utf8"),
31
- }),
32
- });
33
-
34
- async function run() {
35
- const result = await gr4vy.digitalWallets.create({
36
- provider: "click-to-pay",
37
- merchantName: "<value>",
38
- acceptTermsAndConditions: false,
39
- });
40
-
41
- console.log(result);
42
- }
43
-
44
- run();
45
- ```
46
-
47
- ### Standalone function
48
-
49
- The standalone function version of this method:
50
-
51
- ```typescript
52
- import { Gr4vyCore } from "@gr4vy/sdk/core.js";
53
- import { digitalWalletsCreate } from "@gr4vy/sdk/funcs/digitalWalletsCreate.js";
54
-
55
- // Use `Gr4vyCore` for best tree-shaking performance.
56
- // You can create one instance of it to use across an application.
57
- const gr4vy = new Gr4vyCore({
58
- merchantAccountId: "<id>",
59
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
60
- });
61
-
62
- async function run() {
63
- const res = await digitalWalletsCreate(gr4vy, {
64
- provider: "click-to-pay",
65
- merchantName: "<value>",
66
- acceptTermsAndConditions: false,
67
- });
68
- if (res.ok) {
69
- const { value: result } = res;
70
- console.log(result);
71
- } else {
72
- console.log("digitalWalletsCreate failed:", res.error);
73
- }
74
- }
75
-
76
- run();
77
- ```
78
-
79
- ### Parameters
80
-
81
- | Parameter | Type | Required | Description |
82
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
83
- | `digitalWalletCreate` | [components.DigitalWalletCreate](../../models/components/digitalwalletcreate.md) | :heavy_check_mark: | N/A |
84
- | `merchantAccountId` | *string* | :heavy_minus_sign: | The ID of the merchant account to use for this request. |
85
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
86
- | `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. |
87
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
88
-
89
- ### Response
90
-
91
- **Promise\<[components.DigitalWallet](../../models/components/digitalwallet.md)\>**
92
-
93
- ### Errors
94
-
95
- | Error Type | Status Code | Content Type |
96
- | -------------------------- | -------------------------- | -------------------------- |
97
- | errors.Error400 | 400 | application/json |
98
- | errors.Error401 | 401 | application/json |
99
- | errors.Error403 | 403 | application/json |
100
- | errors.Error404 | 404 | application/json |
101
- | errors.Error405 | 405 | application/json |
102
- | errors.Error409 | 409 | application/json |
103
- | errors.HTTPValidationError | 422 | application/json |
104
- | errors.Error425 | 425 | application/json |
105
- | errors.Error429 | 429 | application/json |
106
- | errors.Error500 | 500 | application/json |
107
- | errors.Error502 | 502 | application/json |
108
- | errors.Error504 | 504 | application/json |
109
- | errors.SDKError | 4XX, 5XX | \*/\* |
110
-
111
- ## list
112
-
113
- List configured digital wallets.
114
-
115
- ### Example Usage
116
-
117
- <!-- UsageSnippet language="typescript" operationID="list_digital_wallets" method="get" path="/digital-wallets" -->
118
- ```typescript
119
- import { Gr4vy, withToken } from "@gr4vy/sdk";
120
- import fs from "fs";
121
-
122
- const gr4vy = new Gr4vy({
123
- id: "example",
124
- server: "sandbox",
125
- merchantAccountId: "default",
126
- bearerAuth: withToken({
127
- privateKey: fs.readFileSync("private_key.pem", "utf8"),
128
- }),
129
- });
130
-
131
- async function run() {
132
- const result = await gr4vy.digitalWallets.list();
133
-
134
- console.log(result);
135
- }
136
-
137
- run();
138
- ```
139
-
140
- ### Standalone function
141
-
142
- The standalone function version of this method:
143
-
144
- ```typescript
145
- import { Gr4vyCore } from "@gr4vy/sdk/core.js";
146
- import { digitalWalletsList } from "@gr4vy/sdk/funcs/digitalWalletsList.js";
147
-
148
- // Use `Gr4vyCore` for best tree-shaking performance.
149
- // You can create one instance of it to use across an application.
150
- const gr4vy = new Gr4vyCore({
151
- merchantAccountId: "<id>",
152
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
153
- });
154
-
155
- async function run() {
156
- const res = await digitalWalletsList(gr4vy);
157
- if (res.ok) {
158
- const { value: result } = res;
159
- console.log(result);
160
- } else {
161
- console.log("digitalWalletsList failed:", res.error);
162
- }
163
- }
164
-
165
- run();
166
- ```
167
-
168
- ### Parameters
169
-
170
- | Parameter | Type | Required | Description |
171
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
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\<[components.DigitalWallets](../../models/components/digitalwallets.md)\>**
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 | \*/\* |
198
-
199
- ## get
200
-
201
- Fetch the details a digital wallet.
202
-
203
- ### Example Usage
204
-
205
- <!-- UsageSnippet language="typescript" operationID="get_digital_wallet" method="get" path="/digital-wallets/{digital_wallet_id}" -->
206
- ```typescript
207
- import { Gr4vy, withToken } from "@gr4vy/sdk";
208
- import fs from "fs";
209
-
210
- const gr4vy = new Gr4vy({
211
- id: "example",
212
- server: "sandbox",
213
- merchantAccountId: "default",
214
- bearerAuth: withToken({
215
- privateKey: fs.readFileSync("private_key.pem", "utf8"),
216
- }),
217
- });
218
-
219
- async function run() {
220
- const result = await gr4vy.digitalWallets.get("1808f5e6-b49c-4db9-94fa-22371ea352f5");
221
-
222
- console.log(result);
223
- }
224
-
225
- run();
226
- ```
227
-
228
- ### Standalone function
229
-
230
- The standalone function version of this method:
231
-
232
- ```typescript
233
- import { Gr4vyCore } from "@gr4vy/sdk/core.js";
234
- import { digitalWalletsGet } from "@gr4vy/sdk/funcs/digitalWalletsGet.js";
235
-
236
- // Use `Gr4vyCore` for best tree-shaking performance.
237
- // You can create one instance of it to use across an application.
238
- const gr4vy = new Gr4vyCore({
239
- merchantAccountId: "<id>",
240
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
241
- });
242
-
243
- async function run() {
244
- const res = await digitalWalletsGet(gr4vy, "1808f5e6-b49c-4db9-94fa-22371ea352f5");
245
- if (res.ok) {
246
- const { value: result } = res;
247
- console.log(result);
248
- } else {
249
- console.log("digitalWalletsGet failed:", res.error);
250
- }
251
- }
252
-
253
- run();
254
- ```
255
-
256
- ### Parameters
257
-
258
- | Parameter | Type | Required | Description | Example |
259
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
260
- | `digitalWalletId` | *string* | :heavy_check_mark: | The ID of the digital wallet to read. | [object Object] |
261
- | `merchantAccountId` | *string* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | |
262
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
263
- | `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. | |
264
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
265
-
266
- ### Response
267
-
268
- **Promise\<[components.DigitalWallet](../../models/components/digitalwallet.md)\>**
269
-
270
- ### Errors
271
-
272
- | Error Type | Status Code | Content Type |
273
- | -------------------------- | -------------------------- | -------------------------- |
274
- | errors.Error400 | 400 | application/json |
275
- | errors.Error401 | 401 | application/json |
276
- | errors.Error403 | 403 | application/json |
277
- | errors.Error404 | 404 | application/json |
278
- | errors.Error405 | 405 | application/json |
279
- | errors.Error409 | 409 | application/json |
280
- | errors.HTTPValidationError | 422 | application/json |
281
- | errors.Error425 | 425 | application/json |
282
- | errors.Error429 | 429 | application/json |
283
- | errors.Error500 | 500 | application/json |
284
- | errors.Error502 | 502 | application/json |
285
- | errors.Error504 | 504 | application/json |
286
- | errors.SDKError | 4XX, 5XX | \*/\* |
287
-
288
- ## delete
289
-
290
- Delete a configured digital wallet.
291
-
292
- ### Example Usage
293
-
294
- <!-- UsageSnippet language="typescript" operationID="delete_digital_wallet" method="delete" path="/digital-wallets/{digital_wallet_id}" -->
295
- ```typescript
296
- import { Gr4vy, withToken } from "@gr4vy/sdk";
297
- import fs from "fs";
298
-
299
- const gr4vy = new Gr4vy({
300
- id: "example",
301
- server: "sandbox",
302
- merchantAccountId: "default",
303
- bearerAuth: withToken({
304
- privateKey: fs.readFileSync("private_key.pem", "utf8"),
305
- }),
306
- });
307
-
308
- async function run() {
309
- await gr4vy.digitalWallets.delete("1808f5e6-b49c-4db9-94fa-22371ea352f5");
310
-
311
-
312
- }
313
-
314
- run();
315
- ```
316
-
317
- ### Standalone function
318
-
319
- The standalone function version of this method:
320
-
321
- ```typescript
322
- import { Gr4vyCore } from "@gr4vy/sdk/core.js";
323
- import { digitalWalletsDelete } from "@gr4vy/sdk/funcs/digitalWalletsDelete.js";
324
-
325
- // Use `Gr4vyCore` for best tree-shaking performance.
326
- // You can create one instance of it to use across an application.
327
- const gr4vy = new Gr4vyCore({
328
- merchantAccountId: "<id>",
329
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
330
- });
331
-
332
- async function run() {
333
- const res = await digitalWalletsDelete(gr4vy, "1808f5e6-b49c-4db9-94fa-22371ea352f5");
334
- if (res.ok) {
335
- const { value: result } = res;
336
-
337
- } else {
338
- console.log("digitalWalletsDelete failed:", res.error);
339
- }
340
- }
341
-
342
- run();
343
- ```
344
-
345
- ### Parameters
346
-
347
- | Parameter | Type | Required | Description | Example |
348
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
349
- | `digitalWalletId` | *string* | :heavy_check_mark: | The ID of the digital wallet to delete. | [object Object] |
350
- | `merchantAccountId` | *string* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | |
351
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
352
- | `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. | |
353
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
354
-
355
- ### Response
356
-
357
- **Promise\<void\>**
358
-
359
- ### Errors
360
-
361
- | Error Type | Status Code | Content Type |
362
- | -------------------------- | -------------------------- | -------------------------- |
363
- | errors.Error400 | 400 | application/json |
364
- | errors.Error401 | 401 | application/json |
365
- | errors.Error403 | 403 | application/json |
366
- | errors.Error404 | 404 | application/json |
367
- | errors.Error405 | 405 | application/json |
368
- | errors.Error409 | 409 | application/json |
369
- | errors.HTTPValidationError | 422 | application/json |
370
- | errors.Error425 | 425 | application/json |
371
- | errors.Error429 | 429 | application/json |
372
- | errors.Error500 | 500 | application/json |
373
- | errors.Error502 | 502 | application/json |
374
- | errors.Error504 | 504 | application/json |
375
- | errors.SDKError | 4XX, 5XX | \*/\* |
376
-
377
- ## update
378
-
379
- Update a digital wallet.
380
-
381
- ### Example Usage
382
-
383
- <!-- UsageSnippet language="typescript" operationID="update_digital_wallet" method="put" path="/digital-wallets/{digital_wallet_id}" -->
384
- ```typescript
385
- import { Gr4vy, withToken } from "@gr4vy/sdk";
386
- import fs from "fs";
387
-
388
- const gr4vy = new Gr4vy({
389
- id: "example",
390
- server: "sandbox",
391
- merchantAccountId: "default",
392
- bearerAuth: withToken({
393
- privateKey: fs.readFileSync("private_key.pem", "utf8"),
394
- }),
395
- });
396
-
397
- async function run() {
398
- const result = await gr4vy.digitalWallets.update({}, "1808f5e6-b49c-4db9-94fa-22371ea352f5");
399
-
400
- console.log(result);
401
- }
402
-
403
- run();
404
- ```
405
-
406
- ### Standalone function
407
-
408
- The standalone function version of this method:
409
-
410
- ```typescript
411
- import { Gr4vyCore } from "@gr4vy/sdk/core.js";
412
- import { digitalWalletsUpdate } from "@gr4vy/sdk/funcs/digitalWalletsUpdate.js";
413
-
414
- // Use `Gr4vyCore` for best tree-shaking performance.
415
- // You can create one instance of it to use across an application.
416
- const gr4vy = new Gr4vyCore({
417
- merchantAccountId: "<id>",
418
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
419
- });
420
-
421
- async function run() {
422
- const res = await digitalWalletsUpdate(gr4vy, {}, "1808f5e6-b49c-4db9-94fa-22371ea352f5");
423
- if (res.ok) {
424
- const { value: result } = res;
425
- console.log(result);
426
- } else {
427
- console.log("digitalWalletsUpdate failed:", res.error);
428
- }
429
- }
430
-
431
- run();
432
- ```
433
-
434
- ### Parameters
435
-
436
- | Parameter | Type | Required | Description | Example |
437
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
438
- | `digitalWalletId` | *string* | :heavy_check_mark: | The ID of the digital wallet to edit. | [object Object] |
439
- | `digitalWalletUpdate` | [components.DigitalWalletUpdate](../../models/components/digitalwalletupdate.md) | :heavy_check_mark: | N/A | |
440
- | `merchantAccountId` | *string* | :heavy_minus_sign: | The ID of the merchant account to use for this request. | |
441
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | |
442
- | `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. | |
443
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | |
444
-
445
- ### Response
446
-
447
- **Promise\<[components.DigitalWallet](../../models/components/digitalwallet.md)\>**
448
-
449
- ### Errors
450
-
451
- | Error Type | Status Code | Content Type |
452
- | -------------------------- | -------------------------- | -------------------------- |
453
- | errors.Error400 | 400 | application/json |
454
- | errors.Error401 | 401 | application/json |
455
- | errors.Error403 | 403 | application/json |
456
- | errors.Error404 | 404 | application/json |
457
- | errors.Error405 | 405 | application/json |
458
- | errors.Error409 | 409 | application/json |
459
- | errors.HTTPValidationError | 422 | application/json |
460
- | errors.Error425 | 425 | application/json |
461
- | errors.Error429 | 429 | application/json |
462
- | errors.Error500 | 500 | application/json |
463
- | errors.Error502 | 502 | application/json |
464
- | errors.Error504 | 504 | application/json |
465
- | errors.SDKError | 4XX, 5XX | \*/\* |