@infrab4a/connect 0.5.0 → 0.5.1

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.
@@ -1,5 +1,6 @@
1
- import { plainToClass, classToPlain, Expose } from 'class-transformer';
2
- import { __awaiter, __decorate } from 'tslib';
1
+ import 'reflect-metadata';
2
+ import { plainToClass, classToPlain, Expose, Type } from 'class-transformer';
3
+ import { __decorate, __metadata, __awaiter } from 'tslib';
3
4
  import { isNil, isNumber, isString, isEmpty } from 'lodash';
4
5
  export { chunk, isEmpty, isNil, isNumber, isString } from 'lodash';
5
6
  import { Md5 } from 'ts-md5';
@@ -115,13 +116,238 @@ class Edition extends BaseModel {
115
116
  }
116
117
  }
117
118
 
119
+ class Payment extends BaseModel {
120
+ identifierFields() {
121
+ return ['id'];
122
+ }
123
+ }
124
+ __decorate([
125
+ Expose({ name: 'refuse_reason' }),
126
+ __metadata("design:type", String)
127
+ ], Payment.prototype, "refuseReason", void 0);
128
+ __decorate([
129
+ Expose({ name: 'status_reason' }),
130
+ __metadata("design:type", String)
131
+ ], Payment.prototype, "statusReason", void 0);
132
+ __decorate([
133
+ Expose({ name: 'acquirer_response_code' }),
134
+ __metadata("design:type", String)
135
+ ], Payment.prototype, "acquirerResponseCode", void 0);
136
+ __decorate([
137
+ Expose({ name: 'acquirer_name' }),
138
+ __metadata("design:type", String)
139
+ ], Payment.prototype, "acquirerName", void 0);
140
+ __decorate([
141
+ Expose({ name: 'acquirer_id' }),
142
+ __metadata("design:type", String)
143
+ ], Payment.prototype, "acquirerId", void 0);
144
+ __decorate([
145
+ Expose({ name: 'authorization_code' }),
146
+ __metadata("design:type", String)
147
+ ], Payment.prototype, "authorizationCode", void 0);
148
+ __decorate([
149
+ Expose({ name: 'soft_descriptor' }),
150
+ __metadata("design:type", String)
151
+ ], Payment.prototype, "softDescriptor", void 0);
152
+ __decorate([
153
+ Expose({ name: 'date_created' }),
154
+ __metadata("design:type", String)
155
+ ], Payment.prototype, "dateCreated", void 0);
156
+ __decorate([
157
+ Expose({ name: 'date_updated' }),
158
+ __metadata("design:type", String)
159
+ ], Payment.prototype, "dateUpdated", void 0);
160
+ __decorate([
161
+ Expose({ name: 'authorized_amount' }),
162
+ __metadata("design:type", Number)
163
+ ], Payment.prototype, "authorizedAmount", void 0);
164
+ __decorate([
165
+ Expose({ name: 'paid_amount' }),
166
+ __metadata("design:type", Number)
167
+ ], Payment.prototype, "paidAmount", void 0);
168
+ __decorate([
169
+ Expose({ name: 'refunded_amount' }),
170
+ __metadata("design:type", Number)
171
+ ], Payment.prototype, "refundedAmount", void 0);
172
+ __decorate([
173
+ Expose({ name: 'card_holder_name' }),
174
+ __metadata("design:type", String)
175
+ ], Payment.prototype, "cardHolderName", void 0);
176
+ __decorate([
177
+ Expose({ name: 'card_last_digits' }),
178
+ __metadata("design:type", String)
179
+ ], Payment.prototype, "cardLastDigits", void 0);
180
+ __decorate([
181
+ Expose({ name: 'card_first_digits' }),
182
+ __metadata("design:type", String)
183
+ ], Payment.prototype, "cardFirstDigits", void 0);
184
+ __decorate([
185
+ Expose({ name: 'card_brand' }),
186
+ __metadata("design:type", String)
187
+ ], Payment.prototype, "cardBrand", void 0);
188
+ __decorate([
189
+ Expose({ name: 'card_pin_mode' }),
190
+ __metadata("design:type", String)
191
+ ], Payment.prototype, "cardPinMode", void 0);
192
+ __decorate([
193
+ Expose({ name: 'card_magstripe_fallback' }),
194
+ __metadata("design:type", Boolean)
195
+ ], Payment.prototype, "cardMagstripeFallback", void 0);
196
+ __decorate([
197
+ Expose({ name: 'cvm_pin' }),
198
+ __metadata("design:type", Boolean)
199
+ ], Payment.prototype, "cvmPin", void 0);
200
+ __decorate([
201
+ Expose({ name: 'postback_url' }),
202
+ __metadata("design:type", String)
203
+ ], Payment.prototype, "postbackUrl", void 0);
204
+ __decorate([
205
+ Expose({ name: 'payment_method' }),
206
+ __metadata("design:type", String)
207
+ ], Payment.prototype, "paymentMethod", void 0);
208
+ __decorate([
209
+ Expose({ name: 'capture_method' }),
210
+ __metadata("design:type", String)
211
+ ], Payment.prototype, "captureMethod", void 0);
212
+ __decorate([
213
+ Expose({ name: 'antifraud_score' }),
214
+ __metadata("design:type", String)
215
+ ], Payment.prototype, "antifraudScore", void 0);
216
+ __decorate([
217
+ Expose({ name: 'boleto_url' }),
218
+ __metadata("design:type", String)
219
+ ], Payment.prototype, "boletoUrl", void 0);
220
+ __decorate([
221
+ Expose({ name: 'boleto_barcode' }),
222
+ __metadata("design:type", String)
223
+ ], Payment.prototype, "boletoBarcode", void 0);
224
+ __decorate([
225
+ Expose({ name: 'boleto_expiration_date' }),
226
+ __metadata("design:type", String)
227
+ ], Payment.prototype, "boletoExpirationDate", void 0);
228
+ __decorate([
229
+ Expose({ name: 'subscription_id' }),
230
+ __metadata("design:type", String)
231
+ ], Payment.prototype, "subscriptionId", void 0);
232
+ __decorate([
233
+ Expose({ name: 'split_rules' }),
234
+ __metadata("design:type", String)
235
+ ], Payment.prototype, "splitRules", void 0);
236
+ __decorate([
237
+ Expose({ name: 'antifraud_metadata' }),
238
+ __metadata("design:type", Object)
239
+ ], Payment.prototype, "antifraudMetadata", void 0);
240
+ __decorate([
241
+ Expose({ name: 'reference_key' }),
242
+ __metadata("design:type", String)
243
+ ], Payment.prototype, "referenceKey", void 0);
244
+ __decorate([
245
+ Expose({ name: 'local_transaction_id' }),
246
+ __metadata("design:type", String)
247
+ ], Payment.prototype, "localTransactionId", void 0);
248
+ __decorate([
249
+ Expose({ name: 'local_time' }),
250
+ __metadata("design:type", String)
251
+ ], Payment.prototype, "localTime", void 0);
252
+ __decorate([
253
+ Expose({ name: 'fraud_covered' }),
254
+ __metadata("design:type", Boolean)
255
+ ], Payment.prototype, "fraudCovered", void 0);
256
+ __decorate([
257
+ Expose({ name: 'fraud_reimbursed' }),
258
+ __metadata("design:type", String)
259
+ ], Payment.prototype, "fraudReimbursed", void 0);
260
+ __decorate([
261
+ Expose({ name: 'order_id' }),
262
+ __metadata("design:type", String)
263
+ ], Payment.prototype, "orderId", void 0);
264
+ __decorate([
265
+ Expose({ name: 'risk_level' }),
266
+ __metadata("design:type", String)
267
+ ], Payment.prototype, "riskLevel", void 0);
268
+ __decorate([
269
+ Expose({ name: 'receipt_url' }),
270
+ __metadata("design:type", String)
271
+ ], Payment.prototype, "receiptUrl", void 0);
272
+ __decorate([
273
+ Expose({ name: 'private_label' }),
274
+ __metadata("design:type", String)
275
+ ], Payment.prototype, "privateLabel", void 0);
276
+ __decorate([
277
+ Expose({ name: 'pix_qr_code' }),
278
+ __metadata("design:type", String)
279
+ ], Payment.prototype, "pixQrCode", void 0);
280
+ __decorate([
281
+ Expose({ name: 'pix_expiration_date' }),
282
+ __metadata("design:type", String)
283
+ ], Payment.prototype, "pixExpirationDate", void 0);
284
+
118
285
  class SubscriptionPayment extends BaseModel {
119
286
  identifierFields() {
120
287
  return ['id'];
121
288
  }
122
289
  }
290
+ __decorate([
291
+ Type(() => Payment),
292
+ __metadata("design:type", Payment)
293
+ ], SubscriptionPayment.prototype, "payment", void 0);
123
294
 
124
- class Subscription extends BaseModel {
295
+ class Address extends BaseModel {
296
+ }
297
+
298
+ var CheckoutTypes;
299
+ (function (CheckoutTypes) {
300
+ CheckoutTypes[CheckoutTypes["ECOMMERCE"] = 1] = "ECOMMERCE";
301
+ CheckoutTypes[CheckoutTypes["SUBSCRIPTION"] = 2] = "SUBSCRIPTION";
302
+ })(CheckoutTypes || (CheckoutTypes = {}));
303
+
304
+ var CouponTypes;
305
+ (function (CouponTypes) {
306
+ CouponTypes[CouponTypes["FINANCIAL"] = 1] = "FINANCIAL";
307
+ CouponTypes[CouponTypes["PRODUCT"] = 2] = "PRODUCT";
308
+ CouponTypes[CouponTypes["GIFTCARD"] = 3] = "GIFTCARD";
309
+ CouponTypes[CouponTypes["VOUCHER"] = 4] = "VOUCHER";
310
+ })(CouponTypes || (CouponTypes = {}));
311
+
312
+ var CouponSubtypes;
313
+ (function (CouponSubtypes) {
314
+ CouponSubtypes[CouponSubtypes["ABSOLUTE"] = 1] = "ABSOLUTE";
315
+ CouponSubtypes[CouponSubtypes["PERCENTAGE"] = 2] = "PERCENTAGE";
316
+ })(CouponSubtypes || (CouponSubtypes = {}));
317
+
318
+ var Exclusivities;
319
+ (function (Exclusivities) {
320
+ Exclusivities[Exclusivities["ALL_USERS"] = 1] = "ALL_USERS";
321
+ Exclusivities[Exclusivities["SPECIFIC_USER"] = 2] = "SPECIFIC_USER";
322
+ Exclusivities[Exclusivities["COLLABORATORS"] = 3] = "COLLABORATORS";
323
+ })(Exclusivities || (Exclusivities = {}));
324
+
325
+ class Coupon extends BaseModel {
326
+ identifierFields() {
327
+ return ['id'];
328
+ }
329
+ }
330
+ __decorate([
331
+ Expose({ name: 'checkout_type' }),
332
+ __metadata("design:type", Number)
333
+ ], Coupon.prototype, "checkoutType", void 0);
334
+ __decorate([
335
+ Expose({ name: 'exclusivity_type' }),
336
+ __metadata("design:type", Number)
337
+ ], Coupon.prototype, "exclusivityType", void 0);
338
+
339
+ class SubscriptionPlan extends BaseModel {
340
+ identifierFields() {
341
+ return ['id'];
342
+ }
343
+ }
344
+
345
+ class BeautyProfile extends BaseModel {
346
+ toPlain() {
347
+ const plain = super.toPlain();
348
+ delete plain.id;
349
+ return plain;
350
+ }
125
351
  identifierFields() {
126
352
  return ['id'];
127
353
  }
@@ -142,20 +368,44 @@ class User extends BaseModel {
142
368
  return plain;
143
369
  }
144
370
  }
371
+ __decorate([
372
+ Type(() => BeautyProfile),
373
+ __metadata("design:type", BeautyProfile)
374
+ ], User.prototype, "beautyProfile", void 0);
145
375
 
146
- class BeautyProfile extends BaseModel {
147
- toPlain() {
148
- const plain = super.toPlain();
149
- delete plain.id;
150
- return plain;
151
- }
376
+ class Subscription extends BaseModel {
152
377
  identifierFields() {
153
378
  return ['id'];
154
379
  }
155
380
  }
156
-
157
- class Address extends BaseModel {
158
- }
381
+ __decorate([
382
+ Type(() => User),
383
+ __metadata("design:type", User)
384
+ ], Subscription.prototype, "user", void 0);
385
+ __decorate([
386
+ Type(() => SubscriptionPlan),
387
+ __metadata("design:type", SubscriptionPlan)
388
+ ], Subscription.prototype, "subscriptionPlan", void 0);
389
+ __decorate([
390
+ Type(() => Address),
391
+ __metadata("design:type", Address)
392
+ ], Subscription.prototype, "shippingAddress", void 0);
393
+ __decorate([
394
+ Type(() => Address),
395
+ __metadata("design:type", Address)
396
+ ], Subscription.prototype, "billingAddress", void 0);
397
+ __decorate([
398
+ Type(() => Coupon),
399
+ __metadata("design:type", Coupon)
400
+ ], Subscription.prototype, "coupon", void 0);
401
+ __decorate([
402
+ Type(() => Edition),
403
+ __metadata("design:type", Array)
404
+ ], Subscription.prototype, "editions", void 0);
405
+ __decorate([
406
+ Type(() => SubscriptionPayment),
407
+ __metadata("design:type", Array)
408
+ ], Subscription.prototype, "payment", void 0);
159
409
 
160
410
  class UserAddress extends Address {
161
411
  identifierFields() {
@@ -240,7 +490,8 @@ class Product extends BaseModel {
240
490
  return ['id'];
241
491
  }
242
492
  getInfoByShop(shop) {
243
- return Object.assign(Object.assign({ description: this.description[shop].description }, this.price[shop]), this.stock[shop]);
493
+ var _a, _b, _c, _d, _e, _f;
494
+ return Object.assign(Object.assign(Object.assign({}, (((_b = (_a = this.description) === null || _a === void 0 ? void 0 : _a[shop]) === null || _b === void 0 ? void 0 : _b.description) ? { description: (_d = (_c = this.description) === null || _c === void 0 ? void 0 : _c[shop]) === null || _d === void 0 ? void 0 : _d.description } : {})), (((_e = this.price) === null || _e === void 0 ? void 0 : _e[shop]) || {})), (((_f = this.stock) === null || _f === void 0 ? void 0 : _f[shop]) || {}));
244
495
  }
245
496
  }
246
497
 
@@ -250,45 +501,6 @@ class Variant extends BaseModel {
250
501
  }
251
502
  }
252
503
 
253
- var CouponTypes;
254
- (function (CouponTypes) {
255
- CouponTypes[CouponTypes["FINANCIAL"] = 1] = "FINANCIAL";
256
- CouponTypes[CouponTypes["PRODUCT"] = 2] = "PRODUCT";
257
- CouponTypes[CouponTypes["GIFTCARD"] = 3] = "GIFTCARD";
258
- CouponTypes[CouponTypes["VOUCHER"] = 4] = "VOUCHER";
259
- })(CouponTypes || (CouponTypes = {}));
260
-
261
- var CouponSubtypes;
262
- (function (CouponSubtypes) {
263
- CouponSubtypes[CouponSubtypes["ABSOLUTE"] = 1] = "ABSOLUTE";
264
- CouponSubtypes[CouponSubtypes["PERCENTAGE"] = 2] = "PERCENTAGE";
265
- })(CouponSubtypes || (CouponSubtypes = {}));
266
-
267
- var Exclusivities;
268
- (function (Exclusivities) {
269
- Exclusivities[Exclusivities["ALL_USERS"] = 1] = "ALL_USERS";
270
- Exclusivities[Exclusivities["SPECIFIC_USER"] = 2] = "SPECIFIC_USER";
271
- Exclusivities[Exclusivities["COLLABORATORS"] = 3] = "COLLABORATORS";
272
- })(Exclusivities || (Exclusivities = {}));
273
-
274
- class Coupon extends BaseModel {
275
- identifierFields() {
276
- return ['id'];
277
- }
278
- }
279
- __decorate([
280
- Expose({ name: 'checkout_type' })
281
- ], Coupon.prototype, "checkoutType", void 0);
282
- __decorate([
283
- Expose({ name: 'exclusivity_type' })
284
- ], Coupon.prototype, "exclusivityType", void 0);
285
-
286
- var CheckoutTypes;
287
- (function (CheckoutTypes) {
288
- CheckoutTypes[CheckoutTypes["ECOMMERCE"] = 1] = "ECOMMERCE";
289
- CheckoutTypes[CheckoutTypes["SUBSCRIPTION"] = 2] = "SUBSCRIPTION";
290
- })(CheckoutTypes || (CheckoutTypes = {}));
291
-
292
504
  const COUPON_EXPIRATION = 60 * 60 * 24 * 30;
293
505
  class FinancialCoupon extends Coupon {
294
506
  constructor() {
@@ -325,167 +537,83 @@ var OrderStatus;
325
537
  OrderStatus["CREDIT_CARD"] = "credit_card";
326
538
  })(OrderStatus || (OrderStatus = {}));
327
539
 
328
- class Checkout extends BaseModel {
329
- identifierFields() {
330
- return ['id'];
331
- }
332
- }
333
-
334
540
  class LineItem extends Product {
335
541
  }
336
542
 
337
- class Order extends Checkout {
543
+ class ShippingMethod extends BaseModel {
544
+ identifierFields() {
545
+ return ['id'];
546
+ }
338
547
  }
339
548
 
340
- class Payment extends BaseModel {
549
+ class Checkout extends BaseModel {
341
550
  identifierFields() {
342
551
  return ['id'];
343
552
  }
344
553
  }
345
554
  __decorate([
346
- Expose({ name: 'refuse_reason' })
347
- ], Payment.prototype, "refuseReason", void 0);
348
- __decorate([
349
- Expose({ name: 'status_reason' })
350
- ], Payment.prototype, "statusReason", void 0);
351
- __decorate([
352
- Expose({ name: 'acquirer_response_code' })
353
- ], Payment.prototype, "acquirerResponseCode", void 0);
354
- __decorate([
355
- Expose({ name: 'acquirer_name' })
356
- ], Payment.prototype, "acquirerName", void 0);
357
- __decorate([
358
- Expose({ name: 'acquirer_id' })
359
- ], Payment.prototype, "acquirerId", void 0);
555
+ Type(() => LineItem),
556
+ __metadata("design:type", Array)
557
+ ], Checkout.prototype, "lineItems", void 0);
360
558
  __decorate([
361
- Expose({ name: 'authorization_code' })
362
- ], Payment.prototype, "authorizationCode", void 0);
559
+ Type(() => User),
560
+ __metadata("design:type", User)
561
+ ], Checkout.prototype, "user", void 0);
363
562
  __decorate([
364
- Expose({ name: 'soft_descriptor' })
365
- ], Payment.prototype, "softDescriptor", void 0);
563
+ Type(() => Address),
564
+ __metadata("design:type", Address)
565
+ ], Checkout.prototype, "shippingAddress", void 0);
366
566
  __decorate([
367
- Expose({ name: 'date_created' })
368
- ], Payment.prototype, "dateCreated", void 0);
567
+ Type(() => Address),
568
+ __metadata("design:type", Address)
569
+ ], Checkout.prototype, "billingAddress", void 0);
369
570
  __decorate([
370
- Expose({ name: 'date_updated' })
371
- ], Payment.prototype, "dateUpdated", void 0);
372
- __decorate([
373
- Expose({ name: 'authorized_amount' })
374
- ], Payment.prototype, "authorizedAmount", void 0);
375
- __decorate([
376
- Expose({ name: 'paid_amount' })
377
- ], Payment.prototype, "paidAmount", void 0);
571
+ Type(() => ShippingMethod),
572
+ __metadata("design:type", ShippingMethod)
573
+ ], Checkout.prototype, "shipping", void 0);
378
574
  __decorate([
379
- Expose({ name: 'refunded_amount' })
380
- ], Payment.prototype, "refundedAmount", void 0);
381
- __decorate([
382
- Expose({ name: 'card_holder_name' })
383
- ], Payment.prototype, "cardHolderName", void 0);
384
- __decorate([
385
- Expose({ name: 'card_last_digits' })
386
- ], Payment.prototype, "cardLastDigits", void 0);
387
- __decorate([
388
- Expose({ name: 'card_first_digits' })
389
- ], Payment.prototype, "cardFirstDigits", void 0);
390
- __decorate([
391
- Expose({ name: 'card_brand' })
392
- ], Payment.prototype, "cardBrand", void 0);
393
- __decorate([
394
- Expose({ name: 'card_pin_mode' })
395
- ], Payment.prototype, "cardPinMode", void 0);
396
- __decorate([
397
- Expose({ name: 'card_magstripe_fallback' })
398
- ], Payment.prototype, "cardMagstripeFallback", void 0);
399
- __decorate([
400
- Expose({ name: 'cvm_pin' })
401
- ], Payment.prototype, "cvmPin", void 0);
402
- __decorate([
403
- Expose({ name: 'postback_url' })
404
- ], Payment.prototype, "postbackUrl", void 0);
405
- __decorate([
406
- Expose({ name: 'payment_method' })
407
- ], Payment.prototype, "paymentMethod", void 0);
408
- __decorate([
409
- Expose({ name: 'capture_method' })
410
- ], Payment.prototype, "captureMethod", void 0);
411
- __decorate([
412
- Expose({ name: 'antifraud_score' })
413
- ], Payment.prototype, "antifraudScore", void 0);
414
- __decorate([
415
- Expose({ name: 'boleto_url' })
416
- ], Payment.prototype, "boletoUrl", void 0);
417
- __decorate([
418
- Expose({ name: 'boleto_barcode' })
419
- ], Payment.prototype, "boletoBarcode", void 0);
420
- __decorate([
421
- Expose({ name: 'boleto_expiration_date' })
422
- ], Payment.prototype, "boletoExpirationDate", void 0);
423
- __decorate([
424
- Expose({ name: 'subscription_id' })
425
- ], Payment.prototype, "subscriptionId", void 0);
426
- __decorate([
427
- Expose({ name: 'split_rules' })
428
- ], Payment.prototype, "splitRules", void 0);
429
- __decorate([
430
- Expose({ name: 'antifraud_metadata' })
431
- ], Payment.prototype, "antifraudMetadata", void 0);
432
- __decorate([
433
- Expose({ name: 'reference_key' })
434
- ], Payment.prototype, "referenceKey", void 0);
435
- __decorate([
436
- Expose({ name: 'local_transaction_id' })
437
- ], Payment.prototype, "localTransactionId", void 0);
438
- __decorate([
439
- Expose({ name: 'local_time' })
440
- ], Payment.prototype, "localTime", void 0);
441
- __decorate([
442
- Expose({ name: 'fraud_covered' })
443
- ], Payment.prototype, "fraudCovered", void 0);
444
- __decorate([
445
- Expose({ name: 'fraud_reimbursed' })
446
- ], Payment.prototype, "fraudReimbursed", void 0);
447
- __decorate([
448
- Expose({ name: 'order_id' })
449
- ], Payment.prototype, "orderId", void 0);
450
- __decorate([
451
- Expose({ name: 'risk_level' })
452
- ], Payment.prototype, "riskLevel", void 0);
453
- __decorate([
454
- Expose({ name: 'receipt_url' })
455
- ], Payment.prototype, "receiptUrl", void 0);
456
- __decorate([
457
- Expose({ name: 'private_label' })
458
- ], Payment.prototype, "privateLabel", void 0);
459
- __decorate([
460
- Expose({ name: 'pix_qr_code' })
461
- ], Payment.prototype, "pixQrCode", void 0);
462
- __decorate([
463
- Expose({ name: 'pix_expiration_date' })
464
- ], Payment.prototype, "pixExpirationDate", void 0);
575
+ Type(() => Coupon),
576
+ __metadata("design:type", Coupon)
577
+ ], Checkout.prototype, "coupon", void 0);
465
578
 
466
- class ShippingMethod extends BaseModel {
467
- identifierFields() {
468
- return ['id'];
469
- }
579
+ class Order extends Checkout {
470
580
  }
581
+ __decorate([
582
+ Type(() => Payment),
583
+ __metadata("design:type", Payment)
584
+ ], Order.prototype, "payment", void 0);
471
585
 
472
586
  class CheckoutSubscription extends BaseModel {
473
587
  identifierFields() {
474
588
  return ['id'];
475
589
  }
476
590
  }
477
-
478
- class SubscriptionPlan extends BaseModel {
479
- identifierFields() {
480
- return ['id'];
481
- }
482
- }
591
+ __decorate([
592
+ Type(() => Address),
593
+ __metadata("design:type", Address)
594
+ ], CheckoutSubscription.prototype, "shippingAddress", void 0);
595
+ __decorate([
596
+ Type(() => Address),
597
+ __metadata("design:type", Address)
598
+ ], CheckoutSubscription.prototype, "billingAddress", void 0);
599
+ __decorate([
600
+ Type(() => SubscriptionPlan),
601
+ __metadata("design:type", SubscriptionPlan)
602
+ ], CheckoutSubscription.prototype, "subscriptionPlan", void 0);
603
+ __decorate([
604
+ Type(() => Coupon),
605
+ __metadata("design:type", Coupon)
606
+ ], CheckoutSubscription.prototype, "coupon", void 0);
483
607
 
484
608
  class Buy2Win extends BaseModel {
485
609
  identifierFields() {
486
610
  return ['id'];
487
611
  }
488
612
  }
613
+ __decorate([
614
+ Type(() => Category),
615
+ __metadata("design:type", Array)
616
+ ], Buy2Win.prototype, "categories", void 0);
489
617
 
490
618
  class Home extends BaseModel {
491
619
  identifierFields() {