@betterstore/sdk 0.3.38 → 0.3.40

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.40
4
+
5
+ ### Patch Changes
6
+
7
+ - bug type fix
8
+
9
+ ## 0.3.39
10
+
11
+ ### Patch Changes
12
+
13
+ - generate secret bug type fix
14
+
3
15
  ## 0.3.38
4
16
 
5
17
  ### 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 {
@@ -199,7 +202,10 @@ declare class Client {
199
202
  /**
200
203
  * Generate payment secret for a checkout session
201
204
  */
202
- generateCheckoutsPaymentSecret(clientSecret: string, checkoutId: string): Promise<string>;
205
+ generateCheckoutsPaymentSecret(clientSecret: string, checkoutId: string): Promise<{
206
+ paymentSecret: string;
207
+ publicKey: string;
208
+ }>;
203
209
  /**
204
210
  * Create a new customer
205
211
  */
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 {
@@ -199,7 +202,10 @@ declare class Client {
199
202
  /**
200
203
  * Generate payment secret for a checkout session
201
204
  */
202
- generateCheckoutsPaymentSecret(clientSecret: string, checkoutId: string): Promise<string>;
205
+ generateCheckoutsPaymentSecret(clientSecret: string, checkoutId: string): Promise<{
206
+ paymentSecret: string;
207
+ publicKey: string;
208
+ }>;
203
209
  /**
204
210
  * Create a new customer
205
211
  */
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
  };
@@ -236,10 +238,11 @@ var Client = class {
236
238
  generateCheckoutsPaymentSecret(clientSecret, checkoutId) {
237
239
  return __async(this, null, function* () {
238
240
  const apiClient = createApiClient(clientSecret, this.proxy);
239
- const data = yield apiClient.post(
240
- `/checkout/payment/${checkoutId}`
241
- );
242
- return data;
241
+ const data = yield apiClient.post(`/checkout/payment/${checkoutId}`);
242
+ return {
243
+ paymentSecret: data.paymentSecret,
244
+ publicKey: data.publicKey
245
+ };
243
246
  });
244
247
  }
245
248
  /**
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
  };
@@ -200,10 +202,11 @@ var Client = class {
200
202
  generateCheckoutsPaymentSecret(clientSecret, checkoutId) {
201
203
  return __async(this, null, function* () {
202
204
  const apiClient = createApiClient(clientSecret, this.proxy);
203
- const data = yield apiClient.post(
204
- `/checkout/payment/${checkoutId}`
205
- );
206
- return data;
205
+ const data = yield apiClient.post(`/checkout/payment/${checkoutId}`);
206
+ return {
207
+ paymentSecret: data.paymentSecret,
208
+ publicKey: data.publicKey
209
+ };
207
210
  });
208
211
  }
209
212
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betterstore/sdk",
3
- "version": "0.3.38",
3
+ "version": "0.3.40",
4
4
  "description": "E-commerce for Developers",
5
5
  "private": false,
6
6
  "publishConfig": {