@betterstore/sdk 0.3.37 → 0.3.39

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @betterstore/sdk
2
2
 
3
+ ## 0.3.39
4
+
5
+ ### Patch Changes
6
+
7
+ - generate secret bug type fix
8
+
9
+ ## 0.3.38
10
+
11
+ ### Patch Changes
12
+
13
+ - type changed
14
+
3
15
  ## 0.3.37
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -153,7 +153,7 @@ interface CheckoutSession {
153
153
  };
154
154
  }
155
155
  type RecursiveRecord = {
156
- [key: string]: string | number | boolean | null | RecursiveRecord | RecursiveRecord[];
156
+ [key: string]: any;
157
157
  };
158
158
 
159
159
  declare class Checkout {
@@ -178,7 +178,10 @@ declare class Checkout {
178
178
  /**
179
179
  * Generate payment secret for a checkout session
180
180
  */
181
- generatePaymentSecret(checkoutId: string): Promise<string>;
181
+ generatePaymentSecret(checkoutId: string): Promise<{
182
+ paymentSecret: string;
183
+ publicKey: string;
184
+ }>;
182
185
  }
183
186
 
184
187
  declare class Client {
package/dist/index.d.ts CHANGED
@@ -153,7 +153,7 @@ interface CheckoutSession {
153
153
  };
154
154
  }
155
155
  type RecursiveRecord = {
156
- [key: string]: string | number | boolean | null | RecursiveRecord | RecursiveRecord[];
156
+ [key: string]: any;
157
157
  };
158
158
 
159
159
  declare class Checkout {
@@ -178,7 +178,10 @@ declare class Checkout {
178
178
  /**
179
179
  * Generate payment secret for a checkout session
180
180
  */
181
- generatePaymentSecret(checkoutId: string): Promise<string>;
181
+ generatePaymentSecret(checkoutId: string): Promise<{
182
+ paymentSecret: string;
183
+ publicKey: string;
184
+ }>;
182
185
  }
183
186
 
184
187
  declare class Client {
package/dist/index.js CHANGED
@@ -179,10 +179,12 @@ var Checkout = class {
179
179
  */
180
180
  generatePaymentSecret(checkoutId) {
181
181
  return __async(this, null, function* () {
182
- const data = yield this.apiClient.post(
183
- `/checkout/payment/${checkoutId}`
184
- );
185
- return data;
182
+ const data = yield this.apiClient.post(`
183
+ /checkout/payment/${checkoutId}`);
184
+ return {
185
+ paymentSecret: data.paymentSecret,
186
+ publicKey: data.publicKey
187
+ };
186
188
  });
187
189
  }
188
190
  };
package/dist/index.mjs CHANGED
@@ -143,10 +143,12 @@ var Checkout = class {
143
143
  */
144
144
  generatePaymentSecret(checkoutId) {
145
145
  return __async(this, null, function* () {
146
- const data = yield this.apiClient.post(
147
- `/checkout/payment/${checkoutId}`
148
- );
149
- return data;
146
+ const data = yield this.apiClient.post(`
147
+ /checkout/payment/${checkoutId}`);
148
+ return {
149
+ paymentSecret: data.paymentSecret,
150
+ publicKey: data.publicKey
151
+ };
150
152
  });
151
153
  }
152
154
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betterstore/sdk",
3
- "version": "0.3.37",
3
+ "version": "0.3.39",
4
4
  "description": "E-commerce for Developers",
5
5
  "private": false,
6
6
  "publishConfig": {