@betterstore/sdk 0.3.38 → 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,11 @@
1
1
  # @betterstore/sdk
2
2
 
3
+ ## 0.3.39
4
+
5
+ ### Patch Changes
6
+
7
+ - generate secret bug type fix
8
+
3
9
  ## 0.3.38
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -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
@@ -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.38",
3
+ "version": "0.3.39",
4
4
  "description": "E-commerce for Developers",
5
5
  "private": false,
6
6
  "publishConfig": {