@doany-ai/sdk 0.2.2 → 0.2.3

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.
@@ -9,9 +9,12 @@
9
9
  * @internal
10
10
  */
11
11
  export function createPaymentsModule(axios, appId) {
12
+ // This client's response interceptor resolves requests to the response body.
13
+ // Axios's declared return type does not reflect that, so the results below
14
+ // are cast through `unknown`.
12
15
  return {
13
16
  async createCheckoutSession(params) {
14
- const { data } = await axios.request({
17
+ const data = await axios.request({
15
18
  method: "POST",
16
19
  url: `/apps/${appId}/payments/checkout-session`,
17
20
  data: params,
@@ -19,14 +22,14 @@ export function createPaymentsModule(axios, appId) {
19
22
  return data;
20
23
  },
21
24
  async getSubscription(subscriptionId) {
22
- const { data } = await axios.request({
25
+ const data = await axios.request({
23
26
  method: "GET",
24
27
  url: `/apps/${appId}/payments/subscription/${encodeURIComponent(subscriptionId)}`,
25
28
  });
26
29
  return data;
27
30
  },
28
31
  async createBillingPortalSession(params) {
29
- const { data } = await axios.request({
32
+ const data = await axios.request({
30
33
  method: "POST",
31
34
  url: `/apps/${appId}/payments/billing-portal`,
32
35
  data: params,
@@ -34,7 +37,7 @@ export function createPaymentsModule(axios, appId) {
34
37
  return data;
35
38
  },
36
39
  async getCheckoutSession(sessionId) {
37
- const { data } = await axios.request({
40
+ const data = await axios.request({
38
41
  method: "GET",
39
42
  url: `/apps/${appId}/payments/checkout-session/${encodeURIComponent(sessionId)}`,
40
43
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doany-ai/sdk",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "JavaScript SDK for the doany app platform (API-compatible fork of @base44/sdk)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",