@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.
- package/bundles/infrab4a-connect.umd.js +326 -199
- package/bundles/infrab4a-connect.umd.js.map +1 -1
- package/esm2015/lib/domain/catalog/models/product.js +3 -2
- package/esm2015/lib/domain/shopping/models/buy-2-win.js +8 -1
- package/esm2015/lib/domain/shopping/models/checkout.js +32 -1
- package/esm2015/lib/domain/shopping/models/coupons/coupon.js +8 -4
- package/esm2015/lib/domain/shopping/models/order.js +8 -1
- package/esm2015/lib/domain/shopping/models/payment.js +82 -42
- package/esm2015/lib/domain/shopping/models/subscription/checkout.js +22 -1
- package/esm2015/lib/domain/users/models/subscription/payment.js +8 -1
- package/esm2015/lib/domain/users/models/subscription/subscription.js +37 -1
- package/esm2015/lib/domain/users/models/user.js +8 -1
- package/esm2015/public-api.js +2 -1
- package/fesm2015/infrab4a-connect.js +312 -184
- package/fesm2015/infrab4a-connect.js.map +1 -1
- package/lib/domain/shopping/models/buy-2-win.d.ts +1 -1
- package/lib/domain/shopping/models/checkout.d.ts +6 -6
- package/lib/domain/shopping/models/subscription/checkout.d.ts +4 -4
- package/lib/domain/users/models/subscription/payment.d.ts +1 -1
- package/lib/domain/users/models/subscription/subscription.d.ts +6 -6
- package/lib/domain/users/models/user.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('class-transformer'), require('lodash'), require('ts-md5'), require('firebase'), require('firebase/app')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@infrab4a/connect', ['exports', 'class-transformer', 'lodash', 'ts-md5', 'firebase', 'firebase/app'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.infrab4a = global.infrab4a || {}, global.infrab4a.connect = {}), global["class-transformer"], global.lodash, global.tsMd5, global.firebase, global.firebase$1));
|
|
5
|
-
})(this, (function (exports, classTransformer, lodash, tsMd5, firebase, firebase$1) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('reflect-metadata'), require('class-transformer'), require('lodash'), require('ts-md5'), require('firebase'), require('firebase/app')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@infrab4a/connect', ['exports', 'reflect-metadata', 'class-transformer', 'lodash', 'ts-md5', 'firebase', 'firebase/app'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.infrab4a = global.infrab4a || {}, global.infrab4a.connect = {}), null, global["class-transformer"], global.lodash, global.tsMd5, global.firebase, global.firebase$1));
|
|
5
|
+
})(this, (function (exports, reflectMetadata, classTransformer, lodash, tsMd5, firebase, firebase$1) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -442,6 +442,177 @@
|
|
|
442
442
|
return Edition;
|
|
443
443
|
}(BaseModel));
|
|
444
444
|
|
|
445
|
+
var Payment = /** @class */ (function (_super) {
|
|
446
|
+
__extends(Payment, _super);
|
|
447
|
+
function Payment() {
|
|
448
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
449
|
+
}
|
|
450
|
+
Payment.prototype.identifierFields = function () {
|
|
451
|
+
return ['id'];
|
|
452
|
+
};
|
|
453
|
+
return Payment;
|
|
454
|
+
}(BaseModel));
|
|
455
|
+
__decorate([
|
|
456
|
+
classTransformer.Expose({ name: 'refuse_reason' }),
|
|
457
|
+
__metadata("design:type", String)
|
|
458
|
+
], Payment.prototype, "refuseReason", void 0);
|
|
459
|
+
__decorate([
|
|
460
|
+
classTransformer.Expose({ name: 'status_reason' }),
|
|
461
|
+
__metadata("design:type", String)
|
|
462
|
+
], Payment.prototype, "statusReason", void 0);
|
|
463
|
+
__decorate([
|
|
464
|
+
classTransformer.Expose({ name: 'acquirer_response_code' }),
|
|
465
|
+
__metadata("design:type", String)
|
|
466
|
+
], Payment.prototype, "acquirerResponseCode", void 0);
|
|
467
|
+
__decorate([
|
|
468
|
+
classTransformer.Expose({ name: 'acquirer_name' }),
|
|
469
|
+
__metadata("design:type", String)
|
|
470
|
+
], Payment.prototype, "acquirerName", void 0);
|
|
471
|
+
__decorate([
|
|
472
|
+
classTransformer.Expose({ name: 'acquirer_id' }),
|
|
473
|
+
__metadata("design:type", String)
|
|
474
|
+
], Payment.prototype, "acquirerId", void 0);
|
|
475
|
+
__decorate([
|
|
476
|
+
classTransformer.Expose({ name: 'authorization_code' }),
|
|
477
|
+
__metadata("design:type", String)
|
|
478
|
+
], Payment.prototype, "authorizationCode", void 0);
|
|
479
|
+
__decorate([
|
|
480
|
+
classTransformer.Expose({ name: 'soft_descriptor' }),
|
|
481
|
+
__metadata("design:type", String)
|
|
482
|
+
], Payment.prototype, "softDescriptor", void 0);
|
|
483
|
+
__decorate([
|
|
484
|
+
classTransformer.Expose({ name: 'date_created' }),
|
|
485
|
+
__metadata("design:type", String)
|
|
486
|
+
], Payment.prototype, "dateCreated", void 0);
|
|
487
|
+
__decorate([
|
|
488
|
+
classTransformer.Expose({ name: 'date_updated' }),
|
|
489
|
+
__metadata("design:type", String)
|
|
490
|
+
], Payment.prototype, "dateUpdated", void 0);
|
|
491
|
+
__decorate([
|
|
492
|
+
classTransformer.Expose({ name: 'authorized_amount' }),
|
|
493
|
+
__metadata("design:type", Number)
|
|
494
|
+
], Payment.prototype, "authorizedAmount", void 0);
|
|
495
|
+
__decorate([
|
|
496
|
+
classTransformer.Expose({ name: 'paid_amount' }),
|
|
497
|
+
__metadata("design:type", Number)
|
|
498
|
+
], Payment.prototype, "paidAmount", void 0);
|
|
499
|
+
__decorate([
|
|
500
|
+
classTransformer.Expose({ name: 'refunded_amount' }),
|
|
501
|
+
__metadata("design:type", Number)
|
|
502
|
+
], Payment.prototype, "refundedAmount", void 0);
|
|
503
|
+
__decorate([
|
|
504
|
+
classTransformer.Expose({ name: 'card_holder_name' }),
|
|
505
|
+
__metadata("design:type", String)
|
|
506
|
+
], Payment.prototype, "cardHolderName", void 0);
|
|
507
|
+
__decorate([
|
|
508
|
+
classTransformer.Expose({ name: 'card_last_digits' }),
|
|
509
|
+
__metadata("design:type", String)
|
|
510
|
+
], Payment.prototype, "cardLastDigits", void 0);
|
|
511
|
+
__decorate([
|
|
512
|
+
classTransformer.Expose({ name: 'card_first_digits' }),
|
|
513
|
+
__metadata("design:type", String)
|
|
514
|
+
], Payment.prototype, "cardFirstDigits", void 0);
|
|
515
|
+
__decorate([
|
|
516
|
+
classTransformer.Expose({ name: 'card_brand' }),
|
|
517
|
+
__metadata("design:type", String)
|
|
518
|
+
], Payment.prototype, "cardBrand", void 0);
|
|
519
|
+
__decorate([
|
|
520
|
+
classTransformer.Expose({ name: 'card_pin_mode' }),
|
|
521
|
+
__metadata("design:type", String)
|
|
522
|
+
], Payment.prototype, "cardPinMode", void 0);
|
|
523
|
+
__decorate([
|
|
524
|
+
classTransformer.Expose({ name: 'card_magstripe_fallback' }),
|
|
525
|
+
__metadata("design:type", Boolean)
|
|
526
|
+
], Payment.prototype, "cardMagstripeFallback", void 0);
|
|
527
|
+
__decorate([
|
|
528
|
+
classTransformer.Expose({ name: 'cvm_pin' }),
|
|
529
|
+
__metadata("design:type", Boolean)
|
|
530
|
+
], Payment.prototype, "cvmPin", void 0);
|
|
531
|
+
__decorate([
|
|
532
|
+
classTransformer.Expose({ name: 'postback_url' }),
|
|
533
|
+
__metadata("design:type", String)
|
|
534
|
+
], Payment.prototype, "postbackUrl", void 0);
|
|
535
|
+
__decorate([
|
|
536
|
+
classTransformer.Expose({ name: 'payment_method' }),
|
|
537
|
+
__metadata("design:type", String)
|
|
538
|
+
], Payment.prototype, "paymentMethod", void 0);
|
|
539
|
+
__decorate([
|
|
540
|
+
classTransformer.Expose({ name: 'capture_method' }),
|
|
541
|
+
__metadata("design:type", String)
|
|
542
|
+
], Payment.prototype, "captureMethod", void 0);
|
|
543
|
+
__decorate([
|
|
544
|
+
classTransformer.Expose({ name: 'antifraud_score' }),
|
|
545
|
+
__metadata("design:type", String)
|
|
546
|
+
], Payment.prototype, "antifraudScore", void 0);
|
|
547
|
+
__decorate([
|
|
548
|
+
classTransformer.Expose({ name: 'boleto_url' }),
|
|
549
|
+
__metadata("design:type", String)
|
|
550
|
+
], Payment.prototype, "boletoUrl", void 0);
|
|
551
|
+
__decorate([
|
|
552
|
+
classTransformer.Expose({ name: 'boleto_barcode' }),
|
|
553
|
+
__metadata("design:type", String)
|
|
554
|
+
], Payment.prototype, "boletoBarcode", void 0);
|
|
555
|
+
__decorate([
|
|
556
|
+
classTransformer.Expose({ name: 'boleto_expiration_date' }),
|
|
557
|
+
__metadata("design:type", String)
|
|
558
|
+
], Payment.prototype, "boletoExpirationDate", void 0);
|
|
559
|
+
__decorate([
|
|
560
|
+
classTransformer.Expose({ name: 'subscription_id' }),
|
|
561
|
+
__metadata("design:type", String)
|
|
562
|
+
], Payment.prototype, "subscriptionId", void 0);
|
|
563
|
+
__decorate([
|
|
564
|
+
classTransformer.Expose({ name: 'split_rules' }),
|
|
565
|
+
__metadata("design:type", String)
|
|
566
|
+
], Payment.prototype, "splitRules", void 0);
|
|
567
|
+
__decorate([
|
|
568
|
+
classTransformer.Expose({ name: 'antifraud_metadata' }),
|
|
569
|
+
__metadata("design:type", Object)
|
|
570
|
+
], Payment.prototype, "antifraudMetadata", void 0);
|
|
571
|
+
__decorate([
|
|
572
|
+
classTransformer.Expose({ name: 'reference_key' }),
|
|
573
|
+
__metadata("design:type", String)
|
|
574
|
+
], Payment.prototype, "referenceKey", void 0);
|
|
575
|
+
__decorate([
|
|
576
|
+
classTransformer.Expose({ name: 'local_transaction_id' }),
|
|
577
|
+
__metadata("design:type", String)
|
|
578
|
+
], Payment.prototype, "localTransactionId", void 0);
|
|
579
|
+
__decorate([
|
|
580
|
+
classTransformer.Expose({ name: 'local_time' }),
|
|
581
|
+
__metadata("design:type", String)
|
|
582
|
+
], Payment.prototype, "localTime", void 0);
|
|
583
|
+
__decorate([
|
|
584
|
+
classTransformer.Expose({ name: 'fraud_covered' }),
|
|
585
|
+
__metadata("design:type", Boolean)
|
|
586
|
+
], Payment.prototype, "fraudCovered", void 0);
|
|
587
|
+
__decorate([
|
|
588
|
+
classTransformer.Expose({ name: 'fraud_reimbursed' }),
|
|
589
|
+
__metadata("design:type", String)
|
|
590
|
+
], Payment.prototype, "fraudReimbursed", void 0);
|
|
591
|
+
__decorate([
|
|
592
|
+
classTransformer.Expose({ name: 'order_id' }),
|
|
593
|
+
__metadata("design:type", String)
|
|
594
|
+
], Payment.prototype, "orderId", void 0);
|
|
595
|
+
__decorate([
|
|
596
|
+
classTransformer.Expose({ name: 'risk_level' }),
|
|
597
|
+
__metadata("design:type", String)
|
|
598
|
+
], Payment.prototype, "riskLevel", void 0);
|
|
599
|
+
__decorate([
|
|
600
|
+
classTransformer.Expose({ name: 'receipt_url' }),
|
|
601
|
+
__metadata("design:type", String)
|
|
602
|
+
], Payment.prototype, "receiptUrl", void 0);
|
|
603
|
+
__decorate([
|
|
604
|
+
classTransformer.Expose({ name: 'private_label' }),
|
|
605
|
+
__metadata("design:type", String)
|
|
606
|
+
], Payment.prototype, "privateLabel", void 0);
|
|
607
|
+
__decorate([
|
|
608
|
+
classTransformer.Expose({ name: 'pix_qr_code' }),
|
|
609
|
+
__metadata("design:type", String)
|
|
610
|
+
], Payment.prototype, "pixQrCode", void 0);
|
|
611
|
+
__decorate([
|
|
612
|
+
classTransformer.Expose({ name: 'pix_expiration_date' }),
|
|
613
|
+
__metadata("design:type", String)
|
|
614
|
+
], Payment.prototype, "pixExpirationDate", void 0);
|
|
615
|
+
|
|
445
616
|
var SubscriptionPayment = /** @class */ (function (_super) {
|
|
446
617
|
__extends(SubscriptionPayment, _super);
|
|
447
618
|
function SubscriptionPayment() {
|
|
@@ -452,16 +623,63 @@
|
|
|
452
623
|
};
|
|
453
624
|
return SubscriptionPayment;
|
|
454
625
|
}(BaseModel));
|
|
626
|
+
__decorate([
|
|
627
|
+
classTransformer.Type(function () { return Payment; }),
|
|
628
|
+
__metadata("design:type", Payment)
|
|
629
|
+
], SubscriptionPayment.prototype, "payment", void 0);
|
|
455
630
|
|
|
456
|
-
var
|
|
457
|
-
__extends(
|
|
458
|
-
function
|
|
631
|
+
var Address = /** @class */ (function (_super) {
|
|
632
|
+
__extends(Address, _super);
|
|
633
|
+
function Address() {
|
|
459
634
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
460
635
|
}
|
|
461
|
-
|
|
636
|
+
return Address;
|
|
637
|
+
}(BaseModel));
|
|
638
|
+
|
|
639
|
+
var Coupon = /** @class */ (function (_super) {
|
|
640
|
+
__extends(Coupon, _super);
|
|
641
|
+
function Coupon() {
|
|
642
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
643
|
+
}
|
|
644
|
+
Coupon.prototype.identifierFields = function () {
|
|
462
645
|
return ['id'];
|
|
463
646
|
};
|
|
464
|
-
return
|
|
647
|
+
return Coupon;
|
|
648
|
+
}(BaseModel));
|
|
649
|
+
__decorate([
|
|
650
|
+
classTransformer.Expose({ name: 'checkout_type' }),
|
|
651
|
+
__metadata("design:type", Number)
|
|
652
|
+
], Coupon.prototype, "checkoutType", void 0);
|
|
653
|
+
__decorate([
|
|
654
|
+
classTransformer.Expose({ name: 'exclusivity_type' }),
|
|
655
|
+
__metadata("design:type", Number)
|
|
656
|
+
], Coupon.prototype, "exclusivityType", void 0);
|
|
657
|
+
|
|
658
|
+
var SubscriptionPlan = /** @class */ (function (_super) {
|
|
659
|
+
__extends(SubscriptionPlan, _super);
|
|
660
|
+
function SubscriptionPlan() {
|
|
661
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
662
|
+
}
|
|
663
|
+
SubscriptionPlan.prototype.identifierFields = function () {
|
|
664
|
+
return ['id'];
|
|
665
|
+
};
|
|
666
|
+
return SubscriptionPlan;
|
|
667
|
+
}(BaseModel));
|
|
668
|
+
|
|
669
|
+
var BeautyProfile = /** @class */ (function (_super) {
|
|
670
|
+
__extends(BeautyProfile, _super);
|
|
671
|
+
function BeautyProfile() {
|
|
672
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
673
|
+
}
|
|
674
|
+
BeautyProfile.prototype.toPlain = function () {
|
|
675
|
+
var plain = _super.prototype.toPlain.call(this);
|
|
676
|
+
delete plain.id;
|
|
677
|
+
return plain;
|
|
678
|
+
};
|
|
679
|
+
BeautyProfile.prototype.identifierFields = function () {
|
|
680
|
+
return ['id'];
|
|
681
|
+
};
|
|
682
|
+
return BeautyProfile;
|
|
465
683
|
}(BaseModel));
|
|
466
684
|
|
|
467
685
|
var User = /** @class */ (function (_super) {
|
|
@@ -484,30 +702,49 @@
|
|
|
484
702
|
};
|
|
485
703
|
return User;
|
|
486
704
|
}(BaseModel));
|
|
705
|
+
__decorate([
|
|
706
|
+
classTransformer.Type(function () { return BeautyProfile; }),
|
|
707
|
+
__metadata("design:type", BeautyProfile)
|
|
708
|
+
], User.prototype, "beautyProfile", void 0);
|
|
487
709
|
|
|
488
|
-
var
|
|
489
|
-
__extends(
|
|
490
|
-
function
|
|
710
|
+
var Subscription = /** @class */ (function (_super) {
|
|
711
|
+
__extends(Subscription, _super);
|
|
712
|
+
function Subscription() {
|
|
491
713
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
492
714
|
}
|
|
493
|
-
|
|
494
|
-
var plain = _super.prototype.toPlain.call(this);
|
|
495
|
-
delete plain.id;
|
|
496
|
-
return plain;
|
|
497
|
-
};
|
|
498
|
-
BeautyProfile.prototype.identifierFields = function () {
|
|
715
|
+
Subscription.prototype.identifierFields = function () {
|
|
499
716
|
return ['id'];
|
|
500
717
|
};
|
|
501
|
-
return
|
|
502
|
-
}(BaseModel));
|
|
503
|
-
|
|
504
|
-
var Address = /** @class */ (function (_super) {
|
|
505
|
-
__extends(Address, _super);
|
|
506
|
-
function Address() {
|
|
507
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
508
|
-
}
|
|
509
|
-
return Address;
|
|
718
|
+
return Subscription;
|
|
510
719
|
}(BaseModel));
|
|
720
|
+
__decorate([
|
|
721
|
+
classTransformer.Type(function () { return User; }),
|
|
722
|
+
__metadata("design:type", User)
|
|
723
|
+
], Subscription.prototype, "user", void 0);
|
|
724
|
+
__decorate([
|
|
725
|
+
classTransformer.Type(function () { return SubscriptionPlan; }),
|
|
726
|
+
__metadata("design:type", SubscriptionPlan)
|
|
727
|
+
], Subscription.prototype, "subscriptionPlan", void 0);
|
|
728
|
+
__decorate([
|
|
729
|
+
classTransformer.Type(function () { return Address; }),
|
|
730
|
+
__metadata("design:type", Address)
|
|
731
|
+
], Subscription.prototype, "shippingAddress", void 0);
|
|
732
|
+
__decorate([
|
|
733
|
+
classTransformer.Type(function () { return Address; }),
|
|
734
|
+
__metadata("design:type", Address)
|
|
735
|
+
], Subscription.prototype, "billingAddress", void 0);
|
|
736
|
+
__decorate([
|
|
737
|
+
classTransformer.Type(function () { return Coupon; }),
|
|
738
|
+
__metadata("design:type", Coupon)
|
|
739
|
+
], Subscription.prototype, "coupon", void 0);
|
|
740
|
+
__decorate([
|
|
741
|
+
classTransformer.Type(function () { return Edition; }),
|
|
742
|
+
__metadata("design:type", Array)
|
|
743
|
+
], Subscription.prototype, "editions", void 0);
|
|
744
|
+
__decorate([
|
|
745
|
+
classTransformer.Type(function () { return SubscriptionPayment; }),
|
|
746
|
+
__metadata("design:type", Array)
|
|
747
|
+
], Subscription.prototype, "payment", void 0);
|
|
511
748
|
|
|
512
749
|
var UserAddress = /** @class */ (function (_super) {
|
|
513
750
|
__extends(UserAddress, _super);
|
|
@@ -635,7 +872,8 @@
|
|
|
635
872
|
return ['id'];
|
|
636
873
|
};
|
|
637
874
|
Product.prototype.getInfoByShop = function (shop) {
|
|
638
|
-
|
|
875
|
+
var _a, _b, _c, _d, _e, _f;
|
|
876
|
+
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]) || {}));
|
|
639
877
|
};
|
|
640
878
|
return Product;
|
|
641
879
|
}(BaseModel));
|
|
@@ -672,23 +910,6 @@
|
|
|
672
910
|
Exclusivities[Exclusivities["COLLABORATORS"] = 3] = "COLLABORATORS";
|
|
673
911
|
})(exports.Exclusivities || (exports.Exclusivities = {}));
|
|
674
912
|
|
|
675
|
-
var Coupon = /** @class */ (function (_super) {
|
|
676
|
-
__extends(Coupon, _super);
|
|
677
|
-
function Coupon() {
|
|
678
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
679
|
-
}
|
|
680
|
-
Coupon.prototype.identifierFields = function () {
|
|
681
|
-
return ['id'];
|
|
682
|
-
};
|
|
683
|
-
return Coupon;
|
|
684
|
-
}(BaseModel));
|
|
685
|
-
__decorate([
|
|
686
|
-
classTransformer.Expose({ name: 'checkout_type' })
|
|
687
|
-
], Coupon.prototype, "checkoutType", void 0);
|
|
688
|
-
__decorate([
|
|
689
|
-
classTransformer.Expose({ name: 'exclusivity_type' })
|
|
690
|
-
], Coupon.prototype, "exclusivityType", void 0);
|
|
691
|
-
|
|
692
913
|
exports.CheckoutTypes = void 0;
|
|
693
914
|
(function (CheckoutTypes) {
|
|
694
915
|
CheckoutTypes[CheckoutTypes["ECOMMERCE"] = 1] = "ECOMMERCE";
|
|
@@ -734,17 +955,6 @@
|
|
|
734
955
|
OrderStatus["CREDIT_CARD"] = "credit_card";
|
|
735
956
|
})(exports.OrderStatus || (exports.OrderStatus = {}));
|
|
736
957
|
|
|
737
|
-
var Checkout = /** @class */ (function (_super) {
|
|
738
|
-
__extends(Checkout, _super);
|
|
739
|
-
function Checkout() {
|
|
740
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
741
|
-
}
|
|
742
|
-
Checkout.prototype.identifierFields = function () {
|
|
743
|
-
return ['id'];
|
|
744
|
-
};
|
|
745
|
-
return Checkout;
|
|
746
|
-
}(BaseModel));
|
|
747
|
-
|
|
748
958
|
var LineItem = /** @class */ (function (_super) {
|
|
749
959
|
__extends(LineItem, _super);
|
|
750
960
|
function LineItem() {
|
|
@@ -753,155 +963,63 @@
|
|
|
753
963
|
return LineItem;
|
|
754
964
|
}(Product));
|
|
755
965
|
|
|
756
|
-
var
|
|
757
|
-
__extends(
|
|
758
|
-
function
|
|
966
|
+
var ShippingMethod = /** @class */ (function (_super) {
|
|
967
|
+
__extends(ShippingMethod, _super);
|
|
968
|
+
function ShippingMethod() {
|
|
759
969
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
760
970
|
}
|
|
761
|
-
|
|
762
|
-
|
|
971
|
+
ShippingMethod.prototype.identifierFields = function () {
|
|
972
|
+
return ['id'];
|
|
973
|
+
};
|
|
974
|
+
return ShippingMethod;
|
|
975
|
+
}(BaseModel));
|
|
763
976
|
|
|
764
|
-
var
|
|
765
|
-
__extends(
|
|
766
|
-
function
|
|
977
|
+
var Checkout = /** @class */ (function (_super) {
|
|
978
|
+
__extends(Checkout, _super);
|
|
979
|
+
function Checkout() {
|
|
767
980
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
768
981
|
}
|
|
769
|
-
|
|
982
|
+
Checkout.prototype.identifierFields = function () {
|
|
770
983
|
return ['id'];
|
|
771
984
|
};
|
|
772
|
-
return
|
|
985
|
+
return Checkout;
|
|
773
986
|
}(BaseModel));
|
|
774
987
|
__decorate([
|
|
775
|
-
classTransformer.
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
classTransformer.Expose({ name: 'status_reason' })
|
|
779
|
-
], Payment.prototype, "statusReason", void 0);
|
|
780
|
-
__decorate([
|
|
781
|
-
classTransformer.Expose({ name: 'acquirer_response_code' })
|
|
782
|
-
], Payment.prototype, "acquirerResponseCode", void 0);
|
|
783
|
-
__decorate([
|
|
784
|
-
classTransformer.Expose({ name: 'acquirer_name' })
|
|
785
|
-
], Payment.prototype, "acquirerName", void 0);
|
|
786
|
-
__decorate([
|
|
787
|
-
classTransformer.Expose({ name: 'acquirer_id' })
|
|
788
|
-
], Payment.prototype, "acquirerId", void 0);
|
|
789
|
-
__decorate([
|
|
790
|
-
classTransformer.Expose({ name: 'authorization_code' })
|
|
791
|
-
], Payment.prototype, "authorizationCode", void 0);
|
|
792
|
-
__decorate([
|
|
793
|
-
classTransformer.Expose({ name: 'soft_descriptor' })
|
|
794
|
-
], Payment.prototype, "softDescriptor", void 0);
|
|
795
|
-
__decorate([
|
|
796
|
-
classTransformer.Expose({ name: 'date_created' })
|
|
797
|
-
], Payment.prototype, "dateCreated", void 0);
|
|
798
|
-
__decorate([
|
|
799
|
-
classTransformer.Expose({ name: 'date_updated' })
|
|
800
|
-
], Payment.prototype, "dateUpdated", void 0);
|
|
801
|
-
__decorate([
|
|
802
|
-
classTransformer.Expose({ name: 'authorized_amount' })
|
|
803
|
-
], Payment.prototype, "authorizedAmount", void 0);
|
|
804
|
-
__decorate([
|
|
805
|
-
classTransformer.Expose({ name: 'paid_amount' })
|
|
806
|
-
], Payment.prototype, "paidAmount", void 0);
|
|
807
|
-
__decorate([
|
|
808
|
-
classTransformer.Expose({ name: 'refunded_amount' })
|
|
809
|
-
], Payment.prototype, "refundedAmount", void 0);
|
|
810
|
-
__decorate([
|
|
811
|
-
classTransformer.Expose({ name: 'card_holder_name' })
|
|
812
|
-
], Payment.prototype, "cardHolderName", void 0);
|
|
988
|
+
classTransformer.Type(function () { return LineItem; }),
|
|
989
|
+
__metadata("design:type", Array)
|
|
990
|
+
], Checkout.prototype, "lineItems", void 0);
|
|
813
991
|
__decorate([
|
|
814
|
-
classTransformer.
|
|
815
|
-
|
|
992
|
+
classTransformer.Type(function () { return User; }),
|
|
993
|
+
__metadata("design:type", User)
|
|
994
|
+
], Checkout.prototype, "user", void 0);
|
|
816
995
|
__decorate([
|
|
817
|
-
classTransformer.
|
|
818
|
-
|
|
996
|
+
classTransformer.Type(function () { return Address; }),
|
|
997
|
+
__metadata("design:type", Address)
|
|
998
|
+
], Checkout.prototype, "shippingAddress", void 0);
|
|
819
999
|
__decorate([
|
|
820
|
-
classTransformer.
|
|
821
|
-
|
|
1000
|
+
classTransformer.Type(function () { return Address; }),
|
|
1001
|
+
__metadata("design:type", Address)
|
|
1002
|
+
], Checkout.prototype, "billingAddress", void 0);
|
|
822
1003
|
__decorate([
|
|
823
|
-
classTransformer.
|
|
824
|
-
|
|
1004
|
+
classTransformer.Type(function () { return ShippingMethod; }),
|
|
1005
|
+
__metadata("design:type", ShippingMethod)
|
|
1006
|
+
], Checkout.prototype, "shipping", void 0);
|
|
825
1007
|
__decorate([
|
|
826
|
-
classTransformer.
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
classTransformer.Expose({ name: 'cvm_pin' })
|
|
830
|
-
], Payment.prototype, "cvmPin", void 0);
|
|
831
|
-
__decorate([
|
|
832
|
-
classTransformer.Expose({ name: 'postback_url' })
|
|
833
|
-
], Payment.prototype, "postbackUrl", void 0);
|
|
834
|
-
__decorate([
|
|
835
|
-
classTransformer.Expose({ name: 'payment_method' })
|
|
836
|
-
], Payment.prototype, "paymentMethod", void 0);
|
|
837
|
-
__decorate([
|
|
838
|
-
classTransformer.Expose({ name: 'capture_method' })
|
|
839
|
-
], Payment.prototype, "captureMethod", void 0);
|
|
840
|
-
__decorate([
|
|
841
|
-
classTransformer.Expose({ name: 'antifraud_score' })
|
|
842
|
-
], Payment.prototype, "antifraudScore", void 0);
|
|
843
|
-
__decorate([
|
|
844
|
-
classTransformer.Expose({ name: 'boleto_url' })
|
|
845
|
-
], Payment.prototype, "boletoUrl", void 0);
|
|
846
|
-
__decorate([
|
|
847
|
-
classTransformer.Expose({ name: 'boleto_barcode' })
|
|
848
|
-
], Payment.prototype, "boletoBarcode", void 0);
|
|
849
|
-
__decorate([
|
|
850
|
-
classTransformer.Expose({ name: 'boleto_expiration_date' })
|
|
851
|
-
], Payment.prototype, "boletoExpirationDate", void 0);
|
|
852
|
-
__decorate([
|
|
853
|
-
classTransformer.Expose({ name: 'subscription_id' })
|
|
854
|
-
], Payment.prototype, "subscriptionId", void 0);
|
|
855
|
-
__decorate([
|
|
856
|
-
classTransformer.Expose({ name: 'split_rules' })
|
|
857
|
-
], Payment.prototype, "splitRules", void 0);
|
|
858
|
-
__decorate([
|
|
859
|
-
classTransformer.Expose({ name: 'antifraud_metadata' })
|
|
860
|
-
], Payment.prototype, "antifraudMetadata", void 0);
|
|
861
|
-
__decorate([
|
|
862
|
-
classTransformer.Expose({ name: 'reference_key' })
|
|
863
|
-
], Payment.prototype, "referenceKey", void 0);
|
|
864
|
-
__decorate([
|
|
865
|
-
classTransformer.Expose({ name: 'local_transaction_id' })
|
|
866
|
-
], Payment.prototype, "localTransactionId", void 0);
|
|
867
|
-
__decorate([
|
|
868
|
-
classTransformer.Expose({ name: 'local_time' })
|
|
869
|
-
], Payment.prototype, "localTime", void 0);
|
|
870
|
-
__decorate([
|
|
871
|
-
classTransformer.Expose({ name: 'fraud_covered' })
|
|
872
|
-
], Payment.prototype, "fraudCovered", void 0);
|
|
873
|
-
__decorate([
|
|
874
|
-
classTransformer.Expose({ name: 'fraud_reimbursed' })
|
|
875
|
-
], Payment.prototype, "fraudReimbursed", void 0);
|
|
876
|
-
__decorate([
|
|
877
|
-
classTransformer.Expose({ name: 'order_id' })
|
|
878
|
-
], Payment.prototype, "orderId", void 0);
|
|
879
|
-
__decorate([
|
|
880
|
-
classTransformer.Expose({ name: 'risk_level' })
|
|
881
|
-
], Payment.prototype, "riskLevel", void 0);
|
|
882
|
-
__decorate([
|
|
883
|
-
classTransformer.Expose({ name: 'receipt_url' })
|
|
884
|
-
], Payment.prototype, "receiptUrl", void 0);
|
|
885
|
-
__decorate([
|
|
886
|
-
classTransformer.Expose({ name: 'private_label' })
|
|
887
|
-
], Payment.prototype, "privateLabel", void 0);
|
|
888
|
-
__decorate([
|
|
889
|
-
classTransformer.Expose({ name: 'pix_qr_code' })
|
|
890
|
-
], Payment.prototype, "pixQrCode", void 0);
|
|
891
|
-
__decorate([
|
|
892
|
-
classTransformer.Expose({ name: 'pix_expiration_date' })
|
|
893
|
-
], Payment.prototype, "pixExpirationDate", void 0);
|
|
1008
|
+
classTransformer.Type(function () { return Coupon; }),
|
|
1009
|
+
__metadata("design:type", Coupon)
|
|
1010
|
+
], Checkout.prototype, "coupon", void 0);
|
|
894
1011
|
|
|
895
|
-
var
|
|
896
|
-
__extends(
|
|
897
|
-
function
|
|
1012
|
+
var Order = /** @class */ (function (_super) {
|
|
1013
|
+
__extends(Order, _super);
|
|
1014
|
+
function Order() {
|
|
898
1015
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
899
1016
|
}
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
return
|
|
904
|
-
|
|
1017
|
+
return Order;
|
|
1018
|
+
}(Checkout));
|
|
1019
|
+
__decorate([
|
|
1020
|
+
classTransformer.Type(function () { return Payment; }),
|
|
1021
|
+
__metadata("design:type", Payment)
|
|
1022
|
+
], Order.prototype, "payment", void 0);
|
|
905
1023
|
|
|
906
1024
|
var CheckoutSubscription = /** @class */ (function (_super) {
|
|
907
1025
|
__extends(CheckoutSubscription, _super);
|
|
@@ -913,17 +1031,22 @@
|
|
|
913
1031
|
};
|
|
914
1032
|
return CheckoutSubscription;
|
|
915
1033
|
}(BaseModel));
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
return SubscriptionPlan;
|
|
926
|
-
|
|
1034
|
+
__decorate([
|
|
1035
|
+
classTransformer.Type(function () { return Address; }),
|
|
1036
|
+
__metadata("design:type", Address)
|
|
1037
|
+
], CheckoutSubscription.prototype, "shippingAddress", void 0);
|
|
1038
|
+
__decorate([
|
|
1039
|
+
classTransformer.Type(function () { return Address; }),
|
|
1040
|
+
__metadata("design:type", Address)
|
|
1041
|
+
], CheckoutSubscription.prototype, "billingAddress", void 0);
|
|
1042
|
+
__decorate([
|
|
1043
|
+
classTransformer.Type(function () { return SubscriptionPlan; }),
|
|
1044
|
+
__metadata("design:type", SubscriptionPlan)
|
|
1045
|
+
], CheckoutSubscription.prototype, "subscriptionPlan", void 0);
|
|
1046
|
+
__decorate([
|
|
1047
|
+
classTransformer.Type(function () { return Coupon; }),
|
|
1048
|
+
__metadata("design:type", Coupon)
|
|
1049
|
+
], CheckoutSubscription.prototype, "coupon", void 0);
|
|
927
1050
|
|
|
928
1051
|
var Buy2Win = /** @class */ (function (_super) {
|
|
929
1052
|
__extends(Buy2Win, _super);
|
|
@@ -935,6 +1058,10 @@
|
|
|
935
1058
|
};
|
|
936
1059
|
return Buy2Win;
|
|
937
1060
|
}(BaseModel));
|
|
1061
|
+
__decorate([
|
|
1062
|
+
classTransformer.Type(function () { return Category; }),
|
|
1063
|
+
__metadata("design:type", Array)
|
|
1064
|
+
], Buy2Win.prototype, "categories", void 0);
|
|
938
1065
|
|
|
939
1066
|
var Home = /** @class */ (function (_super) {
|
|
940
1067
|
__extends(Home, _super);
|