wabe 0.5.12 → 0.5.13
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/dist/index.d.ts +25 -7
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1208,7 +1208,10 @@ export interface PaymentAdapter {
|
|
|
1208
1208
|
* @param options CreateCouponOptions
|
|
1209
1209
|
* @returns id The coupon id
|
|
1210
1210
|
*/
|
|
1211
|
-
createCoupon: (options: CreateCouponOptions) => Promise<
|
|
1211
|
+
createCoupon: (options: CreateCouponOptions) => Promise<{
|
|
1212
|
+
code: string;
|
|
1213
|
+
id: string;
|
|
1214
|
+
}>;
|
|
1212
1215
|
/**
|
|
1213
1216
|
* Disable a promotion code
|
|
1214
1217
|
* @param options DeletePromotionCodeOptions
|
|
@@ -1217,9 +1220,12 @@ export interface PaymentAdapter {
|
|
|
1217
1220
|
/**
|
|
1218
1221
|
* Create a promotion code from a coupon
|
|
1219
1222
|
* @param options CreatePromotionCodeOptions
|
|
1220
|
-
* @returns code The promotion code
|
|
1223
|
+
* @returns code, id The promotion code and the stripe id
|
|
1221
1224
|
*/
|
|
1222
|
-
createPromotionCode: (options: CreatePromotionCodeOptions) => Promise<
|
|
1225
|
+
createPromotionCode: (options: CreatePromotionCodeOptions) => Promise<{
|
|
1226
|
+
id: string;
|
|
1227
|
+
code: string;
|
|
1228
|
+
}>;
|
|
1223
1229
|
/**
|
|
1224
1230
|
* Get a customer by id
|
|
1225
1231
|
* @param id The customer id
|
|
@@ -1281,8 +1287,14 @@ declare class PaymentController implements PaymentAdapter {
|
|
|
1281
1287
|
constructor(paymentConfig: PaymentConfig);
|
|
1282
1288
|
deleteCoupon(options: DeleteCouponOptions): Promise<void>;
|
|
1283
1289
|
updatePromotionCode(options: UpdatePromotionCodeOptions): Promise<void>;
|
|
1284
|
-
createCoupon(options: CreateCouponOptions): Promise<
|
|
1285
|
-
|
|
1290
|
+
createCoupon(options: CreateCouponOptions): Promise<{
|
|
1291
|
+
code: string;
|
|
1292
|
+
id: string;
|
|
1293
|
+
}>;
|
|
1294
|
+
createPromotionCode(options: CreatePromotionCodeOptions): Promise<{
|
|
1295
|
+
id: string;
|
|
1296
|
+
code: string;
|
|
1297
|
+
}>;
|
|
1286
1298
|
getCustomerById(options: GetCustomerByIdOptions): Promise<{
|
|
1287
1299
|
email: string | null;
|
|
1288
1300
|
}>;
|
|
@@ -1427,8 +1439,14 @@ export declare class PaymentDevAdapter implements PaymentAdapter {
|
|
|
1427
1439
|
}>;
|
|
1428
1440
|
deleteCoupon(): Promise<void>;
|
|
1429
1441
|
updatePromotionCode(): Promise<void>;
|
|
1430
|
-
createCoupon(): Promise<
|
|
1431
|
-
|
|
1442
|
+
createCoupon(): Promise<{
|
|
1443
|
+
code: string;
|
|
1444
|
+
id: string;
|
|
1445
|
+
}>;
|
|
1446
|
+
createPromotionCode(): Promise<{
|
|
1447
|
+
code: string;
|
|
1448
|
+
id: string;
|
|
1449
|
+
}>;
|
|
1432
1450
|
validateWebhook(): Promise<{
|
|
1433
1451
|
isValid: boolean;
|
|
1434
1452
|
payload: {};
|
package/dist/index.js
CHANGED
|
@@ -61419,10 +61419,10 @@ class PaymentDevAdapter {
|
|
|
61419
61419
|
async updatePromotionCode() {
|
|
61420
61420
|
}
|
|
61421
61421
|
async createCoupon() {
|
|
61422
|
-
return "";
|
|
61422
|
+
return { code: "", id: "" };
|
|
61423
61423
|
}
|
|
61424
61424
|
async createPromotionCode() {
|
|
61425
|
-
return "";
|
|
61425
|
+
return { code: "", id: "" };
|
|
61426
61426
|
}
|
|
61427
61427
|
async validateWebhook() {
|
|
61428
61428
|
return { isValid: true, payload: {}, type: "" };
|