@getivy/node-sdk 0.1.0-alpha.30 → 0.1.0-alpha.32
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/CHANGELOG.md +26 -0
- package/README.md +13 -25
- package/package.json +1 -1
- package/resources/charges.d.ts +2 -2
- package/resources/checkoutsession.d.ts +25 -344
- package/resources/checkoutsession.d.ts.map +1 -1
- package/resources/data/session.d.ts +9 -8
- package/resources/data/session.d.ts.map +1 -1
- package/resources/orders.d.ts +16 -312
- package/resources/orders.d.ts.map +1 -1
- package/src/resources/charges.ts +2 -2
- package/src/resources/checkoutsession.ts +258 -2164
- package/src/resources/data/session.ts +9 -8
- package/src/resources/orders.ts +608 -1940
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.32 (2025-06-12)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.1.0-alpha.31...v0.1.0-alpha.32](https://github.com/getivy/node-sdk/compare/v0.1.0-alpha.31...v0.1.0-alpha.32)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([a41fa1a](https://github.com/getivy/node-sdk/commit/a41fa1a41128b4b62eb2e423432523ac442d0b8b))
|
|
10
|
+
|
|
11
|
+
## 0.1.0-alpha.31 (2025-06-10)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.1.0-alpha.30...v0.1.0-alpha.31](https://github.com/getivy/node-sdk/compare/v0.1.0-alpha.30...v0.1.0-alpha.31)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **api:** api update ([87883f0](https://github.com/getivy/node-sdk/commit/87883f0415d82d4b13b056cb394dff8ec5413b4e))
|
|
18
|
+
* **api:** api update ([2d49abe](https://github.com/getivy/node-sdk/commit/2d49abedbbc96bfd37e34cb915b3f402986271bb))
|
|
19
|
+
* **api:** api update ([dde0722](https://github.com/getivy/node-sdk/commit/dde07222f71089c0a105554f4271ad19603f619c))
|
|
20
|
+
* **api:** api update ([937e7f4](https://github.com/getivy/node-sdk/commit/937e7f406235c6b5151dc3cde621a5bd1fd3c5c1))
|
|
21
|
+
* **api:** api update ([65b50a3](https://github.com/getivy/node-sdk/commit/65b50a36fc71894f5e98d4c9d3b53084954b7a80))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Chores
|
|
25
|
+
|
|
26
|
+
* **docs:** use top-level-await in example snippets ([2b50055](https://github.com/getivy/node-sdk/commit/2b50055e3e062813fcfc94eba70bd6bdfeb5a80d))
|
|
27
|
+
* improve publish-npm script --latest tag logic ([1a25e56](https://github.com/getivy/node-sdk/commit/1a25e567236e112f03c5cd41095a77fcc0a03980))
|
|
28
|
+
|
|
3
29
|
## 0.1.0-alpha.30 (2025-05-22)
|
|
4
30
|
|
|
5
31
|
Full Changelog: [v0.1.0-alpha.29...v0.1.0-alpha.30](https://github.com/getivy/node-sdk/compare/v0.1.0-alpha.29...v0.1.0-alpha.30)
|
package/README.md
CHANGED
|
@@ -26,13 +26,9 @@ const client = new Ivy({
|
|
|
26
26
|
environment: 'sandbox', // defaults to 'production'
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
const customer = await client.customers.create({ email: 'REPLACE_ME' });
|
|
29
|
+
const customer = await client.customers.create({ email: 'REPLACE_ME' });
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
main();
|
|
31
|
+
console.log(customer.id);
|
|
36
32
|
```
|
|
37
33
|
|
|
38
34
|
### Request & Response types
|
|
@@ -47,12 +43,8 @@ const client = new Ivy({
|
|
|
47
43
|
environment: 'sandbox', // defaults to 'production'
|
|
48
44
|
});
|
|
49
45
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const customer: Ivy.CustomerCreateResponse = await client.customers.create(params);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
main();
|
|
46
|
+
const params: Ivy.CustomerCreateParams = { email: 'REPLACE_ME' };
|
|
47
|
+
const customer: Ivy.CustomerCreateResponse = await client.customers.create(params);
|
|
56
48
|
```
|
|
57
49
|
|
|
58
50
|
Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
|
|
@@ -65,19 +57,15 @@ a subclass of `APIError` will be thrown:
|
|
|
65
57
|
|
|
66
58
|
<!-- prettier-ignore -->
|
|
67
59
|
```ts
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
main();
|
|
60
|
+
const customer = await client.customers.create({ email: 'REPLACE_ME' }).catch(async (err) => {
|
|
61
|
+
if (err instanceof Ivy.APIError) {
|
|
62
|
+
console.log(err.status); // 400
|
|
63
|
+
console.log(err.name); // BadRequestError
|
|
64
|
+
console.log(err.headers); // {server: 'nginx', ...}
|
|
65
|
+
} else {
|
|
66
|
+
throw err;
|
|
67
|
+
}
|
|
68
|
+
});
|
|
81
69
|
```
|
|
82
70
|
|
|
83
71
|
Error codes are as follows:
|
package/package.json
CHANGED
package/resources/charges.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export interface ChargeCreateParams {
|
|
|
33
33
|
*/
|
|
34
34
|
referenceId: string;
|
|
35
35
|
/**
|
|
36
|
-
* Additional data to be stored with the charge.
|
|
36
|
+
* @deprecated Additional data to be stored with the charge.
|
|
37
37
|
*/
|
|
38
38
|
metadata?: ChargeCreateParams.Metadata;
|
|
39
39
|
/**
|
|
@@ -57,7 +57,7 @@ export declare namespace ChargeCreateParams {
|
|
|
57
57
|
vat?: number;
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
|
-
* Additional data to be stored with the charge.
|
|
60
|
+
* @deprecated Additional data to be stored with the charge.
|
|
61
61
|
*/
|
|
62
62
|
interface Metadata {
|
|
63
63
|
/**
|