@infrab4a/connect 4.20.0-beta.8 → 4.20.0
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/index.cjs.js +76 -861
- package/index.esm.js +79 -838
- package/package.json +1 -1
- package/src/domain/catalog/models/product-base.d.ts +2 -0
- package/src/domain/catalog/models/variant.d.ts +2 -0
- package/src/domain/general/models/index.d.ts +0 -1
- package/src/domain/general/repositories/index.d.ts +0 -1
- package/src/domain/shopping/index.d.ts +0 -4
- package/src/domain/shopping/models/index.d.ts +0 -1
- package/src/domain/shopping/models/order-blocked.d.ts +6 -4
- package/src/domain/shopping/models/order.d.ts +2 -2
- package/src/domain/shopping/models/payment.d.ts +63 -10
- package/src/domain/shopping/models/types/index.d.ts +4 -4
- package/src/domain/shopping/types/index.d.ts +0 -8
- package/src/errors/index.d.ts +2 -8
- package/src/infra/elasticsearch/indexes/products-index.d.ts +2 -0
- package/src/infra/firebase/firestore/repositories/general/index.d.ts +0 -1
- package/src/infra/firebase/firestore/repositories/shopping/index.d.ts +1 -1
- package/src/infra/firebase/firestore/repositories/shopping/{order-blocked-firestore.repository.d.ts → order-blocked-firestore.repository.ts.d.ts} +2 -2
- package/src/infra/index.d.ts +0 -2
- package/src/utils/index.d.ts +2 -2
- package/src/domain/general/models/sequences.d.ts +0 -9
- package/src/domain/general/repositories/sequences.repository.d.ts +0 -4
- package/src/domain/shopping/enums/antifraud-providers.enum.d.ts +0 -6
- package/src/domain/shopping/enums/business-unit.enum.d.ts +0 -4
- package/src/domain/shopping/enums/index.d.ts +0 -6
- package/src/domain/shopping/enums/order-blocked.enum.d.ts +0 -5
- package/src/domain/shopping/enums/pagarme-payment-status.enum.d.ts +0 -10
- package/src/domain/shopping/enums/payment-methods.enum.d.ts +0 -6
- package/src/domain/shopping/enums/payment-providers.enum.d.ts +0 -5
- package/src/domain/shopping/factories/adyen-payment-method.factory.d.ts +0 -9
- package/src/domain/shopping/factories/antifraud-provider.factory.d.ts +0 -15
- package/src/domain/shopping/factories/base-payment-method.factory.d.ts +0 -7
- package/src/domain/shopping/factories/glampoints-payment-method.factory.d.ts +0 -8
- package/src/domain/shopping/factories/index.d.ts +0 -5
- package/src/domain/shopping/factories/pagarme-payment-method.factory.d.ts +0 -11
- package/src/domain/shopping/factories/payment-provider.factory.d.ts +0 -15
- package/src/domain/shopping/interfaces/antifraud-method-factory.interface.d.ts +0 -11
- package/src/domain/shopping/interfaces/antifraud-provider.interface.d.ts +0 -5
- package/src/domain/shopping/interfaces/index.d.ts +0 -7
- package/src/domain/shopping/interfaces/payment-method-factory.interface.d.ts +0 -14
- package/src/domain/shopping/interfaces/payment-provider-bank-slip.interface.d.ts +0 -7
- package/src/domain/shopping/interfaces/payment-provider-card.interface.d.ts +0 -13
- package/src/domain/shopping/interfaces/payment-provider-glampoints.interface.d.ts +0 -5
- package/src/domain/shopping/interfaces/payment-provider-pix.interface.d.ts +0 -5
- package/src/domain/shopping/models/payment-transaction.d.ts +0 -67
- package/src/domain/shopping/services/antifraud-bankslip.service.d.ts +0 -9
- package/src/domain/shopping/services/antifraud-card.service.d.ts +0 -18
- package/src/domain/shopping/services/antifraud-glampoints.service.d.ts +0 -6
- package/src/domain/shopping/services/antifraud-pix.service.d.ts +0 -6
- package/src/domain/shopping/services/glampoints-payment.service.d.ts +0 -8
- package/src/domain/shopping/services/index.d.ts +0 -5
- package/src/domain/shopping/types/adyen-card.type.d.ts +0 -3
- package/src/domain/shopping/types/adyen-credentials.type.d.ts +0 -6
- package/src/domain/shopping/types/antifraud-provider.type.d.ts +0 -2
- package/src/domain/shopping/types/base-card.type.d.ts +0 -2
- package/src/domain/shopping/types/card-info.type.d.ts +0 -8
- package/src/domain/shopping/types/pagarme-card-manual-hash.type.d.ts +0 -6
- package/src/domain/shopping/types/pagarme-card.type.d.ts +0 -16
- package/src/domain/shopping/types/pagarme-credentials.type.d.ts +0 -7
- package/src/domain/shopping/types/payment-method.type.d.ts +0 -2
- package/src/domain/shopping/types/payment-provider.type.d.ts +0 -2
- package/src/errors/business.error.d.ts +0 -7
- package/src/errors/fraud-validation.error.d.ts +0 -7
- package/src/errors/payment.error.d.ts +0 -7
- package/src/errors/stock-limit.error.d.ts +0 -5
- package/src/errors/stock-out.error.d.ts +0 -5
- package/src/errors/types/checkout-additional-data-erro.type.d.ts +0 -6
- package/src/errors/types/index.d.ts +0 -2
- package/src/errors/types/pagarme-erros.type.d.ts +0 -9
- package/src/infra/adyen/adapters/adyen-card-payment-axios.adapter.d.ts +0 -17
- package/src/infra/adyen/adapters/index.d.ts +0 -1
- package/src/infra/adyen/index.d.ts +0 -1
- package/src/infra/firebase/firestore/repositories/general/sequences-firestore.repository.d.ts +0 -7
- package/src/infra/pagarme/adapters/index.d.ts +0 -3
- package/src/infra/pagarme/adapters/pagarme-bank-slip-payment-axios.adapter.d.ts +0 -12
- package/src/infra/pagarme/adapters/pagarme-card-payment-axios.adapter.d.ts +0 -17
- package/src/infra/pagarme/adapters/pagarme-pix-payment-axios.adapter.d.ts +0 -11
- package/src/infra/pagarme/index.d.ts +0 -1
package/index.cjs.js
CHANGED
|
@@ -19,90 +19,6 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
19
19
|
|
|
20
20
|
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
|
|
21
21
|
|
|
22
|
-
exports.AntifraudProviders = void 0;
|
|
23
|
-
(function (AntifraudProviders) {
|
|
24
|
-
AntifraudProviders["BANKSLIP"] = "bankSlip";
|
|
25
|
-
AntifraudProviders["CARD"] = "card";
|
|
26
|
-
AntifraudProviders["PIX"] = "pix";
|
|
27
|
-
AntifraudProviders["POINTS"] = "glampoints";
|
|
28
|
-
})(exports.AntifraudProviders || (exports.AntifraudProviders = {}));
|
|
29
|
-
|
|
30
|
-
exports.BusinessUnitEnum = void 0;
|
|
31
|
-
(function (BusinessUnitEnum) {
|
|
32
|
-
BusinessUnitEnum[BusinessUnitEnum["SUBSCRIPTION"] = 1] = "SUBSCRIPTION";
|
|
33
|
-
BusinessUnitEnum[BusinessUnitEnum["SHOP"] = 2] = "SHOP";
|
|
34
|
-
})(exports.BusinessUnitEnum || (exports.BusinessUnitEnum = {}));
|
|
35
|
-
|
|
36
|
-
exports.OrderBlockedType = void 0;
|
|
37
|
-
(function (OrderBlockedType) {
|
|
38
|
-
OrderBlockedType["Checkout"] = "Checkout";
|
|
39
|
-
OrderBlockedType["Card"] = "Card";
|
|
40
|
-
OrderBlockedType["Boleto"] = "Boleto";
|
|
41
|
-
})(exports.OrderBlockedType || (exports.OrderBlockedType = {}));
|
|
42
|
-
|
|
43
|
-
exports.PagarmePaymentStatus = void 0;
|
|
44
|
-
(function (PagarmePaymentStatus) {
|
|
45
|
-
PagarmePaymentStatus["Em processamento"] = "processing";
|
|
46
|
-
PagarmePaymentStatus["Autorizada"] = "authorized";
|
|
47
|
-
PagarmePaymentStatus["Pago"] = "paid";
|
|
48
|
-
PagarmePaymentStatus["Estornada"] = "refunded";
|
|
49
|
-
PagarmePaymentStatus["Aguardando pagamento"] = "waiting_payment";
|
|
50
|
-
PagarmePaymentStatus["Aguardando estorno"] = "pending_refund";
|
|
51
|
-
PagarmePaymentStatus["Recusada/N\u00E3o autorizada"] = "refused";
|
|
52
|
-
PagarmePaymentStatus["Chargedback"] = "chargedback";
|
|
53
|
-
})(exports.PagarmePaymentStatus || (exports.PagarmePaymentStatus = {}));
|
|
54
|
-
|
|
55
|
-
exports.PaymentMethods = void 0;
|
|
56
|
-
(function (PaymentMethods) {
|
|
57
|
-
PaymentMethods["CARD"] = "card";
|
|
58
|
-
PaymentMethods["BANKSLIP"] = "bankSlip";
|
|
59
|
-
PaymentMethods["PIX"] = "pix";
|
|
60
|
-
PaymentMethods["POINTS"] = "glampoints";
|
|
61
|
-
})(exports.PaymentMethods || (exports.PaymentMethods = {}));
|
|
62
|
-
|
|
63
|
-
exports.PaymentProviders = void 0;
|
|
64
|
-
(function (PaymentProviders) {
|
|
65
|
-
PaymentProviders["PAGARME"] = "pagarMe";
|
|
66
|
-
PaymentProviders["ADYEN"] = "adyen";
|
|
67
|
-
PaymentProviders["GLAMPOINTS"] = "glampoints";
|
|
68
|
-
})(exports.PaymentProviders || (exports.PaymentProviders = {}));
|
|
69
|
-
|
|
70
|
-
class BasePaymentMethodFactory {
|
|
71
|
-
constructor(methods) {
|
|
72
|
-
this.methods = methods;
|
|
73
|
-
}
|
|
74
|
-
build(method) {
|
|
75
|
-
return this.methods[method];
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
class AdyenPaymentMethodFactory extends BasePaymentMethodFactory {
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
class AntifraudProviderFactory {
|
|
83
|
-
constructor(antifraudProviders) {
|
|
84
|
-
this.antifraudProviders = antifraudProviders;
|
|
85
|
-
}
|
|
86
|
-
build(provider) {
|
|
87
|
-
return this.antifraudProviders[provider];
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
class GlampointsPaymentMethodFactory extends BasePaymentMethodFactory {
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
class PagarmePaymentMethodFactory extends BasePaymentMethodFactory {
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
class PaymentProviderFactory {
|
|
98
|
-
constructor(paymentProviders) {
|
|
99
|
-
this.paymentProviders = paymentProviders;
|
|
100
|
-
}
|
|
101
|
-
build(provider) {
|
|
102
|
-
return this.paymentProviders[provider];
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
22
|
class BaseModel {
|
|
107
23
|
get identifier() {
|
|
108
24
|
const fields = this.constructor.identifiersFields.filter((field) => field !== 'identifier');
|
|
@@ -649,182 +565,175 @@ exports.Status = void 0;
|
|
|
649
565
|
Status["CANCELLED"] = "Cancelado";
|
|
650
566
|
})(exports.Status || (exports.Status = {}));
|
|
651
567
|
|
|
652
|
-
class
|
|
568
|
+
class Payment extends BaseModel {
|
|
569
|
+
static get identifiersFields() {
|
|
570
|
+
return ['id'];
|
|
571
|
+
}
|
|
653
572
|
}
|
|
654
573
|
tslib.__decorate([
|
|
655
574
|
classTransformer.Expose({ name: 'refuse_reason' }),
|
|
656
575
|
tslib.__metadata("design:type", String)
|
|
657
|
-
],
|
|
576
|
+
], Payment.prototype, "refuseReason", void 0);
|
|
658
577
|
tslib.__decorate([
|
|
659
578
|
classTransformer.Expose({ name: 'status_reason' }),
|
|
660
579
|
tslib.__metadata("design:type", String)
|
|
661
|
-
],
|
|
580
|
+
], Payment.prototype, "statusReason", void 0);
|
|
662
581
|
tslib.__decorate([
|
|
663
582
|
classTransformer.Expose({ name: 'acquirer_response_code' }),
|
|
664
583
|
tslib.__metadata("design:type", String)
|
|
665
|
-
],
|
|
584
|
+
], Payment.prototype, "acquirerResponseCode", void 0);
|
|
666
585
|
tslib.__decorate([
|
|
667
586
|
classTransformer.Expose({ name: 'acquirer_name' }),
|
|
668
587
|
tslib.__metadata("design:type", String)
|
|
669
|
-
],
|
|
588
|
+
], Payment.prototype, "acquirerName", void 0);
|
|
670
589
|
tslib.__decorate([
|
|
671
590
|
classTransformer.Expose({ name: 'acquirer_id' }),
|
|
672
591
|
tslib.__metadata("design:type", String)
|
|
673
|
-
],
|
|
592
|
+
], Payment.prototype, "acquirerId", void 0);
|
|
674
593
|
tslib.__decorate([
|
|
675
594
|
classTransformer.Expose({ name: 'authorization_code' }),
|
|
676
595
|
tslib.__metadata("design:type", String)
|
|
677
|
-
],
|
|
596
|
+
], Payment.prototype, "authorizationCode", void 0);
|
|
678
597
|
tslib.__decorate([
|
|
679
598
|
classTransformer.Expose({ name: 'soft_descriptor' }),
|
|
680
599
|
tslib.__metadata("design:type", String)
|
|
681
|
-
],
|
|
600
|
+
], Payment.prototype, "softDescriptor", void 0);
|
|
682
601
|
tslib.__decorate([
|
|
683
602
|
classTransformer.Expose({ name: 'date_created' }),
|
|
684
603
|
tslib.__metadata("design:type", String)
|
|
685
|
-
],
|
|
604
|
+
], Payment.prototype, "dateCreated", void 0);
|
|
686
605
|
tslib.__decorate([
|
|
687
606
|
classTransformer.Expose({ name: 'date_updated' }),
|
|
688
607
|
tslib.__metadata("design:type", String)
|
|
689
|
-
],
|
|
608
|
+
], Payment.prototype, "dateUpdated", void 0);
|
|
690
609
|
tslib.__decorate([
|
|
691
610
|
classTransformer.Expose({ name: 'authorized_amount' }),
|
|
692
611
|
tslib.__metadata("design:type", Number)
|
|
693
|
-
],
|
|
612
|
+
], Payment.prototype, "authorizedAmount", void 0);
|
|
694
613
|
tslib.__decorate([
|
|
695
614
|
classTransformer.Expose({ name: 'paid_amount' }),
|
|
696
615
|
tslib.__metadata("design:type", Number)
|
|
697
|
-
],
|
|
616
|
+
], Payment.prototype, "paidAmount", void 0);
|
|
698
617
|
tslib.__decorate([
|
|
699
618
|
classTransformer.Expose({ name: 'paid_at' }),
|
|
700
619
|
tslib.__metadata("design:type", String)
|
|
701
|
-
],
|
|
620
|
+
], Payment.prototype, "paidAt", void 0);
|
|
702
621
|
tslib.__decorate([
|
|
703
622
|
classTransformer.Expose({ name: 'refunded_amount' }),
|
|
704
623
|
tslib.__metadata("design:type", Number)
|
|
705
|
-
],
|
|
624
|
+
], Payment.prototype, "refundedAmount", void 0);
|
|
706
625
|
tslib.__decorate([
|
|
707
626
|
classTransformer.Expose({ name: 'card_holder_name' }),
|
|
708
627
|
tslib.__metadata("design:type", String)
|
|
709
|
-
],
|
|
628
|
+
], Payment.prototype, "cardHolderName", void 0);
|
|
710
629
|
tslib.__decorate([
|
|
711
630
|
classTransformer.Expose({ name: 'card_last_digits' }),
|
|
712
631
|
tslib.__metadata("design:type", String)
|
|
713
|
-
],
|
|
632
|
+
], Payment.prototype, "cardLastDigits", void 0);
|
|
714
633
|
tslib.__decorate([
|
|
715
634
|
classTransformer.Expose({ name: 'card_first_digits' }),
|
|
716
635
|
tslib.__metadata("design:type", String)
|
|
717
|
-
],
|
|
636
|
+
], Payment.prototype, "cardFirstDigits", void 0);
|
|
718
637
|
tslib.__decorate([
|
|
719
638
|
classTransformer.Expose({ name: 'card_brand' }),
|
|
720
639
|
tslib.__metadata("design:type", String)
|
|
721
|
-
],
|
|
640
|
+
], Payment.prototype, "cardBrand", void 0);
|
|
722
641
|
tslib.__decorate([
|
|
723
642
|
classTransformer.Expose({ name: 'card_pin_mode' }),
|
|
724
643
|
tslib.__metadata("design:type", String)
|
|
725
|
-
],
|
|
644
|
+
], Payment.prototype, "cardPinMode", void 0);
|
|
726
645
|
tslib.__decorate([
|
|
727
646
|
classTransformer.Expose({ name: 'card_magstripe_fallback' }),
|
|
728
647
|
tslib.__metadata("design:type", Boolean)
|
|
729
|
-
],
|
|
648
|
+
], Payment.prototype, "cardMagstripeFallback", void 0);
|
|
730
649
|
tslib.__decorate([
|
|
731
650
|
classTransformer.Expose({ name: 'cvm_pin' }),
|
|
732
651
|
tslib.__metadata("design:type", Boolean)
|
|
733
|
-
],
|
|
652
|
+
], Payment.prototype, "cvmPin", void 0);
|
|
734
653
|
tslib.__decorate([
|
|
735
654
|
classTransformer.Expose({ name: 'postback_url' }),
|
|
736
655
|
tslib.__metadata("design:type", String)
|
|
737
|
-
],
|
|
656
|
+
], Payment.prototype, "postbackUrl", void 0);
|
|
738
657
|
tslib.__decorate([
|
|
739
658
|
classTransformer.Expose({ name: 'payment_method' }),
|
|
740
659
|
tslib.__metadata("design:type", String)
|
|
741
|
-
],
|
|
660
|
+
], Payment.prototype, "paymentMethod", void 0);
|
|
742
661
|
tslib.__decorate([
|
|
743
662
|
classTransformer.Expose({ name: 'capture_method' }),
|
|
744
663
|
tslib.__metadata("design:type", String)
|
|
745
|
-
],
|
|
664
|
+
], Payment.prototype, "captureMethod", void 0);
|
|
746
665
|
tslib.__decorate([
|
|
747
666
|
classTransformer.Expose({ name: 'antifraud_score' }),
|
|
748
667
|
tslib.__metadata("design:type", String)
|
|
749
|
-
],
|
|
668
|
+
], Payment.prototype, "antifraudScore", void 0);
|
|
750
669
|
tslib.__decorate([
|
|
751
670
|
classTransformer.Expose({ name: 'boleto_url' }),
|
|
752
671
|
tslib.__metadata("design:type", String)
|
|
753
|
-
],
|
|
672
|
+
], Payment.prototype, "boletoUrl", void 0);
|
|
754
673
|
tslib.__decorate([
|
|
755
674
|
classTransformer.Expose({ name: 'boleto_barcode' }),
|
|
756
675
|
tslib.__metadata("design:type", String)
|
|
757
|
-
],
|
|
676
|
+
], Payment.prototype, "boletoBarcode", void 0);
|
|
758
677
|
tslib.__decorate([
|
|
759
678
|
classTransformer.Expose({ name: 'boleto_expiration_date' }),
|
|
760
679
|
tslib.__metadata("design:type", String)
|
|
761
|
-
],
|
|
680
|
+
], Payment.prototype, "boletoExpirationDate", void 0);
|
|
762
681
|
tslib.__decorate([
|
|
763
682
|
classTransformer.Expose({ name: 'subscription_id' }),
|
|
764
683
|
tslib.__metadata("design:type", String)
|
|
765
|
-
],
|
|
684
|
+
], Payment.prototype, "subscriptionId", void 0);
|
|
766
685
|
tslib.__decorate([
|
|
767
686
|
classTransformer.Expose({ name: 'split_rules' }),
|
|
768
687
|
tslib.__metadata("design:type", String)
|
|
769
|
-
],
|
|
688
|
+
], Payment.prototype, "splitRules", void 0);
|
|
770
689
|
tslib.__decorate([
|
|
771
690
|
classTransformer.Expose({ name: 'antifraud_metadata' }),
|
|
772
691
|
tslib.__metadata("design:type", Object)
|
|
773
|
-
],
|
|
692
|
+
], Payment.prototype, "antifraudMetadata", void 0);
|
|
774
693
|
tslib.__decorate([
|
|
775
694
|
classTransformer.Expose({ name: 'reference_key' }),
|
|
776
695
|
tslib.__metadata("design:type", String)
|
|
777
|
-
],
|
|
696
|
+
], Payment.prototype, "referenceKey", void 0);
|
|
778
697
|
tslib.__decorate([
|
|
779
698
|
classTransformer.Expose({ name: 'local_transaction_id' }),
|
|
780
699
|
tslib.__metadata("design:type", String)
|
|
781
|
-
],
|
|
700
|
+
], Payment.prototype, "localTransactionId", void 0);
|
|
782
701
|
tslib.__decorate([
|
|
783
702
|
classTransformer.Expose({ name: 'local_time' }),
|
|
784
703
|
tslib.__metadata("design:type", String)
|
|
785
|
-
],
|
|
704
|
+
], Payment.prototype, "localTime", void 0);
|
|
786
705
|
tslib.__decorate([
|
|
787
706
|
classTransformer.Expose({ name: 'fraud_covered' }),
|
|
788
707
|
tslib.__metadata("design:type", Boolean)
|
|
789
|
-
],
|
|
708
|
+
], Payment.prototype, "fraudCovered", void 0);
|
|
790
709
|
tslib.__decorate([
|
|
791
710
|
classTransformer.Expose({ name: 'fraud_reimbursed' }),
|
|
792
711
|
tslib.__metadata("design:type", String)
|
|
793
|
-
],
|
|
712
|
+
], Payment.prototype, "fraudReimbursed", void 0);
|
|
794
713
|
tslib.__decorate([
|
|
795
714
|
classTransformer.Expose({ name: 'order_id' }),
|
|
796
715
|
tslib.__metadata("design:type", String)
|
|
797
|
-
],
|
|
716
|
+
], Payment.prototype, "orderId", void 0);
|
|
798
717
|
tslib.__decorate([
|
|
799
718
|
classTransformer.Expose({ name: 'risk_level' }),
|
|
800
719
|
tslib.__metadata("design:type", String)
|
|
801
|
-
],
|
|
720
|
+
], Payment.prototype, "riskLevel", void 0);
|
|
802
721
|
tslib.__decorate([
|
|
803
722
|
classTransformer.Expose({ name: 'receipt_url' }),
|
|
804
723
|
tslib.__metadata("design:type", String)
|
|
805
|
-
],
|
|
724
|
+
], Payment.prototype, "receiptUrl", void 0);
|
|
806
725
|
tslib.__decorate([
|
|
807
726
|
classTransformer.Expose({ name: 'private_label' }),
|
|
808
727
|
tslib.__metadata("design:type", String)
|
|
809
|
-
],
|
|
728
|
+
], Payment.prototype, "privateLabel", void 0);
|
|
810
729
|
tslib.__decorate([
|
|
811
730
|
classTransformer.Expose({ name: 'pix_qr_code' }),
|
|
812
731
|
tslib.__metadata("design:type", String)
|
|
813
|
-
],
|
|
732
|
+
], Payment.prototype, "pixQrCode", void 0);
|
|
814
733
|
tslib.__decorate([
|
|
815
734
|
classTransformer.Expose({ name: 'pix_expiration_date' }),
|
|
816
735
|
tslib.__metadata("design:type", String)
|
|
817
|
-
],
|
|
818
|
-
|
|
819
|
-
class Payment extends BaseModel {
|
|
820
|
-
static get identifiersFields() {
|
|
821
|
-
return ['id'];
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
tslib.__decorate([
|
|
825
|
-
classTransformer.Type(() => PaymentTransaction),
|
|
826
|
-
tslib.__metadata("design:type", PaymentTransaction)
|
|
827
|
-
], Payment.prototype, "transaction", void 0);
|
|
736
|
+
], Payment.prototype, "pixExpirationDate", void 0);
|
|
828
737
|
|
|
829
738
|
class SubscriptionPayment extends BaseModel {
|
|
830
739
|
static get identifiersFields() {
|
|
@@ -2326,8 +2235,8 @@ exports.OrderStatus = void 0;
|
|
|
2326
2235
|
class Order extends Checkout {
|
|
2327
2236
|
}
|
|
2328
2237
|
tslib.__decorate([
|
|
2329
|
-
classTransformer.Type(() =>
|
|
2330
|
-
tslib.__metadata("design:type",
|
|
2238
|
+
classTransformer.Type(() => Payment),
|
|
2239
|
+
tslib.__metadata("design:type", Payment)
|
|
2331
2240
|
], Order.prototype, "payment", void 0);
|
|
2332
2241
|
|
|
2333
2242
|
class OrderBlocked extends BaseModel {
|
|
@@ -2358,308 +2267,6 @@ tslib.__decorate([
|
|
|
2358
2267
|
tslib.__metadata("design:type", Coupon)
|
|
2359
2268
|
], CheckoutSubscription.prototype, "coupon", void 0);
|
|
2360
2269
|
|
|
2361
|
-
class BusinessError extends tsCustomError.CustomError {
|
|
2362
|
-
constructor(message, additionalData, type = '') {
|
|
2363
|
-
super(message);
|
|
2364
|
-
this.additionalData = additionalData;
|
|
2365
|
-
this.type = type;
|
|
2366
|
-
}
|
|
2367
|
-
}
|
|
2368
|
-
|
|
2369
|
-
class DuplicatedResultsError extends tsCustomError.CustomError {
|
|
2370
|
-
constructor(message) {
|
|
2371
|
-
super(message);
|
|
2372
|
-
}
|
|
2373
|
-
}
|
|
2374
|
-
|
|
2375
|
-
class FraudValidationError extends tsCustomError.CustomError {
|
|
2376
|
-
constructor(message, additionalData) {
|
|
2377
|
-
super(message);
|
|
2378
|
-
this.additionalData = additionalData;
|
|
2379
|
-
this.type = 'antifraud';
|
|
2380
|
-
}
|
|
2381
|
-
}
|
|
2382
|
-
|
|
2383
|
-
class InvalidArgumentError extends tsCustomError.CustomError {
|
|
2384
|
-
constructor(message) {
|
|
2385
|
-
super(message);
|
|
2386
|
-
}
|
|
2387
|
-
}
|
|
2388
|
-
|
|
2389
|
-
class NotFoundError extends tsCustomError.CustomError {
|
|
2390
|
-
constructor(message) {
|
|
2391
|
-
super(message);
|
|
2392
|
-
}
|
|
2393
|
-
}
|
|
2394
|
-
|
|
2395
|
-
class PaymentError extends tsCustomError.CustomError {
|
|
2396
|
-
constructor(message, additionalData) {
|
|
2397
|
-
super(message);
|
|
2398
|
-
this.additionalData = additionalData;
|
|
2399
|
-
this.type = 'payment';
|
|
2400
|
-
}
|
|
2401
|
-
}
|
|
2402
|
-
|
|
2403
|
-
class RequiredArgumentError extends tsCustomError.CustomError {
|
|
2404
|
-
constructor(args) {
|
|
2405
|
-
super(`Required arguments: ${args.join(', ')}`);
|
|
2406
|
-
this.args = args;
|
|
2407
|
-
this.arguments = args;
|
|
2408
|
-
}
|
|
2409
|
-
}
|
|
2410
|
-
|
|
2411
|
-
class StockLimitError extends BusinessError {
|
|
2412
|
-
constructor(message, additionalData) {
|
|
2413
|
-
super(message, additionalData);
|
|
2414
|
-
this.type = 'stock-limit';
|
|
2415
|
-
}
|
|
2416
|
-
}
|
|
2417
|
-
|
|
2418
|
-
class StockOutError extends BusinessError {
|
|
2419
|
-
constructor(message, additionalData) {
|
|
2420
|
-
super(message, additionalData);
|
|
2421
|
-
this.type = 'stock-out';
|
|
2422
|
-
}
|
|
2423
|
-
}
|
|
2424
|
-
|
|
2425
|
-
class AntifraudBankSlipService {
|
|
2426
|
-
constructor(orderBlockedRepository) {
|
|
2427
|
-
this.orderBlockedRepository = orderBlockedRepository;
|
|
2428
|
-
this.MAX_ORDER_VALUE = 5000;
|
|
2429
|
-
}
|
|
2430
|
-
async validate(checkout) {
|
|
2431
|
-
var _a, _b;
|
|
2432
|
-
if (checkout.totalPrice && checkout.totalPrice > this.MAX_ORDER_VALUE && !((_a = checkout.user) === null || _a === void 0 ? void 0 : _a.isSubscriber)) {
|
|
2433
|
-
await this.orderBlockedRepository.createBlockedOrderOrPayment(checkout, 'Boleto not authorized', 'Boleto', 'day');
|
|
2434
|
-
throw new FraudValidationError('Boleto não autorizado para cliente não assinante', {
|
|
2435
|
-
checkoutId: checkout.id,
|
|
2436
|
-
userEmail: checkout.user.email,
|
|
2437
|
-
info: {
|
|
2438
|
-
isSubscriber: (_b = checkout.user) === null || _b === void 0 ? void 0 : _b.isSubscriber,
|
|
2439
|
-
subtotal: checkout.subTotalPrice,
|
|
2440
|
-
total: checkout.totalPrice,
|
|
2441
|
-
},
|
|
2442
|
-
});
|
|
2443
|
-
}
|
|
2444
|
-
return true;
|
|
2445
|
-
}
|
|
2446
|
-
}
|
|
2447
|
-
|
|
2448
|
-
class AntifraudCardService {
|
|
2449
|
-
constructor(orderRepository, orderBlockedRepository) {
|
|
2450
|
-
this.orderRepository = orderRepository;
|
|
2451
|
-
this.orderBlockedRepository = orderBlockedRepository;
|
|
2452
|
-
this.LIMIT_ORDERS_DAY = 2;
|
|
2453
|
-
this.LIMIT_ORDERS_WEEK = 7;
|
|
2454
|
-
this.LIMIT_BLOCKED_ORDERS_DAY = 5;
|
|
2455
|
-
}
|
|
2456
|
-
async validate(checkout, card) {
|
|
2457
|
-
var _a, _b;
|
|
2458
|
-
if (!(await this.verifyBlockedOrderAttempts(checkout, card)))
|
|
2459
|
-
throw new FraudValidationError('Cliente com mais de 5 compras negadas/bloqueadas no dia', {
|
|
2460
|
-
checkoutId: checkout.id,
|
|
2461
|
-
userEmail: checkout.user.email,
|
|
2462
|
-
info: {
|
|
2463
|
-
isSubscriber: (_a = checkout.user) === null || _a === void 0 ? void 0 : _a.isSubscriber,
|
|
2464
|
-
subtotal: checkout.subTotalPrice,
|
|
2465
|
-
total: checkout.totalPrice,
|
|
2466
|
-
},
|
|
2467
|
-
});
|
|
2468
|
-
if (!(await this.verifyDayAndWeekOrders(checkout, card)))
|
|
2469
|
-
throw new FraudValidationError('Cliente tentando comprar mais de 2 vezes no dia ou 7 vezes na semana', {
|
|
2470
|
-
checkoutId: checkout.id,
|
|
2471
|
-
userEmail: checkout.user.email,
|
|
2472
|
-
info: {
|
|
2473
|
-
isSubscriber: (_b = checkout.user) === null || _b === void 0 ? void 0 : _b.isSubscriber,
|
|
2474
|
-
subtotal: checkout.subTotalPrice,
|
|
2475
|
-
total: checkout.totalPrice,
|
|
2476
|
-
},
|
|
2477
|
-
});
|
|
2478
|
-
return true;
|
|
2479
|
-
}
|
|
2480
|
-
async verifyBlockedOrderAttempts(checkout, card) {
|
|
2481
|
-
var _a, _b, _c, _d;
|
|
2482
|
-
const day = `${dateFns.format(new Date(), 'yyyy-MM-DD')}T00:00:00`;
|
|
2483
|
-
const endOfDay = `${dateFns.format(new Date(), 'yyyy-MM-DD')}T23:59:59`;
|
|
2484
|
-
const ordersBlockedWithCpf = await this.orderBlockedRepository
|
|
2485
|
-
.find({
|
|
2486
|
-
filters: {
|
|
2487
|
-
customer: { cpf: { operator: exports.Where.EQUALS, value: (_a = checkout.user) === null || _a === void 0 ? void 0 : _a.cpf } },
|
|
2488
|
-
date: [
|
|
2489
|
-
{ operator: exports.Where.GTE, value: new Date(day) },
|
|
2490
|
-
{ operator: exports.Where.LTE, value: new Date(endOfDay) },
|
|
2491
|
-
],
|
|
2492
|
-
},
|
|
2493
|
-
})
|
|
2494
|
-
.then((data) => data.data);
|
|
2495
|
-
const ordersBlockedWithEmail = await this.orderBlockedRepository
|
|
2496
|
-
.find({
|
|
2497
|
-
filters: {
|
|
2498
|
-
customer: { email: { operator: exports.Where.EQUALS, value: (_b = checkout.user) === null || _b === void 0 ? void 0 : _b.email } },
|
|
2499
|
-
date: [
|
|
2500
|
-
{ operator: exports.Where.GTE, value: new Date(day) },
|
|
2501
|
-
{ operator: exports.Where.LTE, value: new Date(endOfDay) },
|
|
2502
|
-
],
|
|
2503
|
-
},
|
|
2504
|
-
})
|
|
2505
|
-
.then((data) => data.data);
|
|
2506
|
-
const ordersBlockedWithCep = await this.orderBlockedRepository
|
|
2507
|
-
.find({
|
|
2508
|
-
filters: {
|
|
2509
|
-
customer: { shippingAddress: { zip: { operator: exports.Where.EQUALS, value: (_c = checkout.shippingAddress) === null || _c === void 0 ? void 0 : _c.zip } } },
|
|
2510
|
-
date: [
|
|
2511
|
-
{ operator: exports.Where.GTE, value: new Date(day) },
|
|
2512
|
-
{ operator: exports.Where.LTE, value: new Date(endOfDay) },
|
|
2513
|
-
],
|
|
2514
|
-
},
|
|
2515
|
-
})
|
|
2516
|
-
.then((data) => data.data);
|
|
2517
|
-
const ordersBlockedWithPhone = await this.orderBlockedRepository
|
|
2518
|
-
.find({
|
|
2519
|
-
filters: {
|
|
2520
|
-
customer: { phoneNumber: { operator: exports.Where.EQUALS, value: (_d = checkout.user) === null || _d === void 0 ? void 0 : _d.phone } },
|
|
2521
|
-
date: [
|
|
2522
|
-
{ operator: exports.Where.GTE, value: new Date(day) },
|
|
2523
|
-
{ operator: exports.Where.LTE, value: new Date(endOfDay) },
|
|
2524
|
-
],
|
|
2525
|
-
},
|
|
2526
|
-
})
|
|
2527
|
-
.then((data) => data.data);
|
|
2528
|
-
const blockedUniqueEmails = ordersBlockedWithEmail.filter((e) => {
|
|
2529
|
-
var _a;
|
|
2530
|
-
return e.customer.cpf !== ((_a = checkout.user) === null || _a === void 0 ? void 0 : _a.cpf);
|
|
2531
|
-
});
|
|
2532
|
-
const blockedUniqueCeps = ordersBlockedWithCep.filter((e) => {
|
|
2533
|
-
var _a, _b;
|
|
2534
|
-
return e.customer.cpf !== ((_a = checkout.user) === null || _a === void 0 ? void 0 : _a.cpf) && e.customer.email !== ((_b = checkout.user) === null || _b === void 0 ? void 0 : _b.email);
|
|
2535
|
-
});
|
|
2536
|
-
const blockedUniquePhone = ordersBlockedWithPhone.filter((e) => {
|
|
2537
|
-
var _a, _b, _c, _d, _e, _f;
|
|
2538
|
-
return (e.customer.cpf !== ((_a = checkout.user) === null || _a === void 0 ? void 0 : _a.cpf) &&
|
|
2539
|
-
e.customer.email !== ((_b = checkout.user) === null || _b === void 0 ? void 0 : _b.email) &&
|
|
2540
|
-
((_d = (_c = e.customer.shippingAddress) === null || _c === void 0 ? void 0 : _c.zip) === null || _d === void 0 ? void 0 : _d.toString()) !== ((_f = (_e = checkout.shippingAddress) === null || _e === void 0 ? void 0 : _e.zip) === null || _f === void 0 ? void 0 : _f.toString()));
|
|
2541
|
-
});
|
|
2542
|
-
const blockedAttempts = ordersBlockedWithCpf
|
|
2543
|
-
.concat(blockedUniqueEmails)
|
|
2544
|
-
.concat(blockedUniqueCeps)
|
|
2545
|
-
.concat(blockedUniquePhone);
|
|
2546
|
-
if (blockedAttempts.length >= this.LIMIT_BLOCKED_ORDERS_DAY) {
|
|
2547
|
-
await this.orderBlockedRepository.createBlockedOrderOrPayment(checkout, 'More than 5 attempts have failed', 'Failed attempts', 'day', card || null);
|
|
2548
|
-
return false;
|
|
2549
|
-
}
|
|
2550
|
-
return true;
|
|
2551
|
-
}
|
|
2552
|
-
async verifyDayAndWeekOrders(checkout, card) {
|
|
2553
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
2554
|
-
const ordersPerDay = await this.validateOrdersByRange((_a = checkout.user) === null || _a === void 0 ? void 0 : _a.cpf, (_b = checkout.user) === null || _b === void 0 ? void 0 : _b.email, (_c = checkout.user) === null || _c === void 0 ? void 0 : _c.phone, (_d = checkout.shippingAddress) === null || _d === void 0 ? void 0 : _d.zip, card, this.getDateRange('day'));
|
|
2555
|
-
for (const key in ordersPerDay) {
|
|
2556
|
-
if (ordersPerDay[key] > this.LIMIT_ORDERS_DAY) {
|
|
2557
|
-
await this.orderBlockedRepository.createBlockedOrderOrPayment(checkout, 'Order limit', key, 'day');
|
|
2558
|
-
return false;
|
|
2559
|
-
}
|
|
2560
|
-
}
|
|
2561
|
-
const ordersPerWeek = await this.validateOrdersByRange((_e = checkout.user) === null || _e === void 0 ? void 0 : _e.cpf, (_f = checkout.user) === null || _f === void 0 ? void 0 : _f.email, (_g = checkout.user) === null || _g === void 0 ? void 0 : _g.phone, (_h = checkout.shippingAddress) === null || _h === void 0 ? void 0 : _h.zip, card, this.getDateRange('week'));
|
|
2562
|
-
for (const key in ordersPerWeek) {
|
|
2563
|
-
if (ordersPerDay[key] > this.LIMIT_ORDERS_WEEK) {
|
|
2564
|
-
await this.orderBlockedRepository.createBlockedOrderOrPayment(checkout, 'Order limit', key, 'week');
|
|
2565
|
-
return false;
|
|
2566
|
-
}
|
|
2567
|
-
}
|
|
2568
|
-
return true;
|
|
2569
|
-
}
|
|
2570
|
-
async validateOrdersByRange(cpf, email, phone, zip, card, range) {
|
|
2571
|
-
const ordersCpf = await this.countOrdersByField('user', 'cpf', cpf, range);
|
|
2572
|
-
const ordersByEmail = await this.countOrdersByField('user', 'email', email, range);
|
|
2573
|
-
const ordersByPhone = await this.countOrdersByField('user', 'phone', phone, range);
|
|
2574
|
-
const ordersByZip = await this.countOrdersByField('shippingAddress', 'zip', zip, range);
|
|
2575
|
-
return {
|
|
2576
|
-
cpf: ordersCpf,
|
|
2577
|
-
email: ordersByEmail,
|
|
2578
|
-
phone: ordersByPhone,
|
|
2579
|
-
zip: ordersByZip,
|
|
2580
|
-
};
|
|
2581
|
-
}
|
|
2582
|
-
async countOrdersByField(property, field, value, range) {
|
|
2583
|
-
const filters = {
|
|
2584
|
-
[property]: {
|
|
2585
|
-
[field]: value,
|
|
2586
|
-
},
|
|
2587
|
-
['createdAt']: [
|
|
2588
|
-
{ operator: exports.Where.GTE, value: range.firstDate },
|
|
2589
|
-
{ operator: exports.Where.LTE, value: range.lastDate },
|
|
2590
|
-
],
|
|
2591
|
-
};
|
|
2592
|
-
const docs = await (await this.orderRepository.find({ filters })).count;
|
|
2593
|
-
return docs;
|
|
2594
|
-
}
|
|
2595
|
-
getDateRange(range = 'day') {
|
|
2596
|
-
switch (range) {
|
|
2597
|
-
case 'day':
|
|
2598
|
-
return {
|
|
2599
|
-
firstDate: dateFns.startOfDay(new Date()).getTime(),
|
|
2600
|
-
lastDate: dateFns.endOfDay(new Date()).getTime(),
|
|
2601
|
-
};
|
|
2602
|
-
case 'week':
|
|
2603
|
-
return {
|
|
2604
|
-
firstDate: dateFns.startOfDay(dateFns.subDays(new Date(), 7)).getTime(),
|
|
2605
|
-
lastDate: dateFns.endOfDay(new Date()).getTime(),
|
|
2606
|
-
};
|
|
2607
|
-
default:
|
|
2608
|
-
return {
|
|
2609
|
-
firstDate: dateFns.startOfDay(new Date()).getTime(),
|
|
2610
|
-
lastDate: dateFns.endOfDay(new Date()).getTime(),
|
|
2611
|
-
};
|
|
2612
|
-
}
|
|
2613
|
-
}
|
|
2614
|
-
}
|
|
2615
|
-
|
|
2616
|
-
class AntifraudGlampointsService {
|
|
2617
|
-
constructor() { }
|
|
2618
|
-
async validate(checkout) {
|
|
2619
|
-
return true;
|
|
2620
|
-
}
|
|
2621
|
-
}
|
|
2622
|
-
|
|
2623
|
-
class AntifraudPixService {
|
|
2624
|
-
constructor() { }
|
|
2625
|
-
async validate(checkout) {
|
|
2626
|
-
return true;
|
|
2627
|
-
}
|
|
2628
|
-
}
|
|
2629
|
-
|
|
2630
|
-
class GlampointsPaymentService {
|
|
2631
|
-
constructor(paymentRepository) {
|
|
2632
|
-
this.paymentRepository = paymentRepository;
|
|
2633
|
-
}
|
|
2634
|
-
async pay(checkout) {
|
|
2635
|
-
const payment = await this.paymentRepository.create(Payment.toInstance({
|
|
2636
|
-
createdAt: new Date(),
|
|
2637
|
-
updatedAt: new Date(),
|
|
2638
|
-
userId: checkout.user.id,
|
|
2639
|
-
checkoutId: checkout.id,
|
|
2640
|
-
totalPrice: checkout.totalPrice,
|
|
2641
|
-
paymentProvider: 'glampoints',
|
|
2642
|
-
transaction: {
|
|
2643
|
-
amount: 0,
|
|
2644
|
-
acquirerResponseCode: '0000',
|
|
2645
|
-
acquirerName: 'glampoints',
|
|
2646
|
-
authorizedAmount: 0,
|
|
2647
|
-
captureMethod: 'ecommerce',
|
|
2648
|
-
installments: 1,
|
|
2649
|
-
cost: 0,
|
|
2650
|
-
paidAmount: 0,
|
|
2651
|
-
paidAt: new Date().toISOString(),
|
|
2652
|
-
paymentMethod: 'glampoints',
|
|
2653
|
-
referer: 'api_key',
|
|
2654
|
-
refundedAmount: 0,
|
|
2655
|
-
status: 'paid',
|
|
2656
|
-
statusReason: 'acquirer',
|
|
2657
|
-
},
|
|
2658
|
-
}));
|
|
2659
|
-
return payment;
|
|
2660
|
-
}
|
|
2661
|
-
}
|
|
2662
|
-
|
|
2663
2270
|
class RoundProductPricesHelper {
|
|
2664
2271
|
static roundProductPrices(product) {
|
|
2665
2272
|
product.price.price = Number(product.price.price.toFixed(2));
|
|
@@ -2680,12 +2287,6 @@ class LogDocument extends BaseModel {
|
|
|
2680
2287
|
}
|
|
2681
2288
|
}
|
|
2682
2289
|
|
|
2683
|
-
class Sequence extends BaseModel {
|
|
2684
|
-
static get identifiersFields() {
|
|
2685
|
-
return ['id'];
|
|
2686
|
-
}
|
|
2687
|
-
}
|
|
2688
|
-
|
|
2689
2290
|
exports.FilterType = void 0;
|
|
2690
2291
|
(function (FilterType) {
|
|
2691
2292
|
FilterType["ACCESSORY_IMPORTANCE"] = "accessoryImportance";
|
|
@@ -2824,82 +2425,29 @@ class ShopSettings extends BaseModel {
|
|
|
2824
2425
|
}
|
|
2825
2426
|
}
|
|
2826
2427
|
|
|
2827
|
-
class
|
|
2828
|
-
constructor(
|
|
2829
|
-
|
|
2830
|
-
this.paymentRepository = paymentRepository;
|
|
2831
|
-
this.orderBlockedRepository = orderBlockedRepository;
|
|
2832
|
-
}
|
|
2833
|
-
createCardHash(bu) {
|
|
2834
|
-
throw new Error('Method not implemented.');
|
|
2835
|
-
}
|
|
2836
|
-
async pay(checkout, card) {
|
|
2837
|
-
try {
|
|
2838
|
-
const result = await axios__default["default"]({
|
|
2839
|
-
method: 'POST',
|
|
2840
|
-
url: this.credentials.URL_TRANSACTION,
|
|
2841
|
-
headers: {
|
|
2842
|
-
'x-api-key': this.credentials.API_KEY,
|
|
2843
|
-
'content-type': 'application/json',
|
|
2844
|
-
},
|
|
2845
|
-
data: this.createCardPayment(checkout, card),
|
|
2846
|
-
});
|
|
2847
|
-
if (result.data.resultCode !== 'Authorised') {
|
|
2848
|
-
this.orderBlockedRepository.createBlockedOrderOrPayment(checkout, 'Card not authorized', 'Card', 'day', card);
|
|
2849
|
-
return Promise.reject(new PaymentError(`Seu pagamento com cartão não foi autorizado. Para não perder seus produtos, pague com PIX ou outro cartão de crédito`, {
|
|
2850
|
-
checkoutId: checkout.id,
|
|
2851
|
-
userEmail: checkout.user.email,
|
|
2852
|
-
info: result.data,
|
|
2853
|
-
}));
|
|
2854
|
-
}
|
|
2855
|
-
const payment = await this.paymentRepository.create(Payment.toInstance({
|
|
2856
|
-
createdAt: new Date(),
|
|
2857
|
-
updatedAt: new Date(),
|
|
2858
|
-
userId: checkout.user.id,
|
|
2859
|
-
checkoutId: checkout.id,
|
|
2860
|
-
totalPrice: checkout.totalPrice,
|
|
2861
|
-
paymentProvider: 'adyen',
|
|
2862
|
-
transaction: Object.assign(Object.assign({}, result.data), { status: 'paid' }),
|
|
2863
|
-
}));
|
|
2864
|
-
return payment;
|
|
2865
|
-
}
|
|
2866
|
-
catch (error) {
|
|
2867
|
-
throw new PaymentError('Seu pagamento com cartão não foi autorizado. Para não perder seus produtos, pague com PIX ou outro cartão de crédito', {
|
|
2868
|
-
checkoutId: checkout.id,
|
|
2869
|
-
userEmail: checkout.user.email,
|
|
2870
|
-
info: error.message,
|
|
2871
|
-
});
|
|
2872
|
-
}
|
|
2873
|
-
}
|
|
2874
|
-
createCardPayment(checkout, card) {
|
|
2875
|
-
return {
|
|
2876
|
-
amount: {
|
|
2877
|
-
currency: 'BRL',
|
|
2878
|
-
value: ((checkout === null || checkout === void 0 ? void 0 : checkout.totalPrice) || 0) * 100,
|
|
2879
|
-
},
|
|
2880
|
-
paymentMethod: {
|
|
2881
|
-
type: 'scheme',
|
|
2882
|
-
storedPaymentMethodId: card.cardId,
|
|
2883
|
-
},
|
|
2884
|
-
reference: checkout.id,
|
|
2885
|
-
shopperInteraction: 'Ecommerce',
|
|
2886
|
-
merchantAccount: this.credentials.MERCHANT_ACCOUNT,
|
|
2887
|
-
shopperReference: checkout.user.id,
|
|
2888
|
-
recurringProcessingModel: 'CardOnFile',
|
|
2889
|
-
returnUrl: this.credentials.URL_POSTBACK,
|
|
2890
|
-
installments: {
|
|
2891
|
-
value: card.installments,
|
|
2892
|
-
},
|
|
2893
|
-
};
|
|
2428
|
+
class InvalidArgumentError extends tsCustomError.CustomError {
|
|
2429
|
+
constructor(message) {
|
|
2430
|
+
super(message);
|
|
2894
2431
|
}
|
|
2895
|
-
|
|
2896
|
-
|
|
2432
|
+
}
|
|
2433
|
+
|
|
2434
|
+
class RequiredArgumentError extends tsCustomError.CustomError {
|
|
2435
|
+
constructor(args) {
|
|
2436
|
+
super(`Required arguments: ${args.join(', ')}`);
|
|
2437
|
+
this.args = args;
|
|
2438
|
+
this.arguments = args;
|
|
2897
2439
|
}
|
|
2898
|
-
|
|
2899
|
-
|
|
2440
|
+
}
|
|
2441
|
+
|
|
2442
|
+
class NotFoundError extends tsCustomError.CustomError {
|
|
2443
|
+
constructor(message) {
|
|
2444
|
+
super(message);
|
|
2900
2445
|
}
|
|
2901
|
-
|
|
2902
|
-
|
|
2446
|
+
}
|
|
2447
|
+
|
|
2448
|
+
class DuplicatedResultsError extends tsCustomError.CustomError {
|
|
2449
|
+
constructor(message) {
|
|
2450
|
+
super(message);
|
|
2903
2451
|
}
|
|
2904
2452
|
}
|
|
2905
2453
|
|
|
@@ -3801,17 +3349,6 @@ class LogFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore
|
|
|
3801
3349
|
}
|
|
3802
3350
|
}
|
|
3803
3351
|
|
|
3804
|
-
class SequenceFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
3805
|
-
constructor({ firestore, interceptors }) {
|
|
3806
|
-
super({
|
|
3807
|
-
firestore,
|
|
3808
|
-
collectionName: 'sequences',
|
|
3809
|
-
model: Sequence,
|
|
3810
|
-
interceptors,
|
|
3811
|
-
});
|
|
3812
|
-
}
|
|
3813
|
-
}
|
|
3814
|
-
|
|
3815
3352
|
class HomeFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
3816
3353
|
constructor({ firestore, interceptors }) {
|
|
3817
3354
|
super({
|
|
@@ -4052,7 +3589,11 @@ class OrderBlockedFirestoreRepository extends withCrudFirestore(withHelpers(with
|
|
|
4052
3589
|
limiteRange,
|
|
4053
3590
|
type,
|
|
4054
3591
|
card,
|
|
4055
|
-
checkout
|
|
3592
|
+
checkout: {
|
|
3593
|
+
id: checkout.id,
|
|
3594
|
+
shop: checkout.shop,
|
|
3595
|
+
total: checkout.totalPrice,
|
|
3596
|
+
},
|
|
4056
3597
|
date: new Date(),
|
|
4057
3598
|
}));
|
|
4058
3599
|
}
|
|
@@ -6023,6 +5564,8 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
6023
5564
|
fields: ['id', 'name', 'reference', 'slug'],
|
|
6024
5565
|
},
|
|
6025
5566
|
},
|
|
5567
|
+
'group',
|
|
5568
|
+
'validity',
|
|
6026
5569
|
];
|
|
6027
5570
|
this.fields = [
|
|
6028
5571
|
...commonFields,
|
|
@@ -6595,6 +6138,8 @@ class VariantHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
6595
6138
|
type: HasuraGraphQLColumnType.Jsonb,
|
|
6596
6139
|
},
|
|
6597
6140
|
},
|
|
6141
|
+
'group',
|
|
6142
|
+
'validity',
|
|
6598
6143
|
],
|
|
6599
6144
|
});
|
|
6600
6145
|
}
|
|
@@ -6951,310 +6496,6 @@ tslib.__decorate([
|
|
|
6951
6496
|
tslib.__metadata("design:returntype", Promise)
|
|
6952
6497
|
], WishlistHasuraGraphQLRepository.prototype, "findBfluOrGlamgirlWishlists", null);
|
|
6953
6498
|
|
|
6954
|
-
class PagarmeBankSlipAxiosAdapter {
|
|
6955
|
-
constructor(credentials, paymentRepository) {
|
|
6956
|
-
this.credentials = credentials;
|
|
6957
|
-
this.paymentRepository = paymentRepository;
|
|
6958
|
-
}
|
|
6959
|
-
async pay(checkout) {
|
|
6960
|
-
try {
|
|
6961
|
-
const result = await axios__default["default"]({
|
|
6962
|
-
method: 'POST',
|
|
6963
|
-
url: `${this.credentials.URL}/transactions`,
|
|
6964
|
-
data: this.createBoletoPayment(checkout),
|
|
6965
|
-
});
|
|
6966
|
-
if (result.data.status !== exports.PagarmePaymentStatus['Em processamento']) {
|
|
6967
|
-
return Promise.reject(new PaymentError(`Houve uma falha ao gerar o boleto. Tente novamente`, {
|
|
6968
|
-
checkoutId: checkout.id,
|
|
6969
|
-
userEmail: checkout.user.email,
|
|
6970
|
-
info: result.data,
|
|
6971
|
-
}));
|
|
6972
|
-
}
|
|
6973
|
-
const payment = await this.paymentRepository.create(Payment.toInstance({
|
|
6974
|
-
createdAt: new Date(),
|
|
6975
|
-
updatedAt: new Date(),
|
|
6976
|
-
userId: checkout.user.id,
|
|
6977
|
-
checkoutId: checkout.id,
|
|
6978
|
-
totalPrice: checkout.totalPrice,
|
|
6979
|
-
paymentProvider: 'pagarMe',
|
|
6980
|
-
transaction: result.data,
|
|
6981
|
-
}));
|
|
6982
|
-
return payment;
|
|
6983
|
-
}
|
|
6984
|
-
catch (error) {
|
|
6985
|
-
throw new PaymentError('Houve uma falha ao gerar o boleto. Tente novamente', {
|
|
6986
|
-
checkoutId: checkout.id,
|
|
6987
|
-
userEmail: checkout.user.email,
|
|
6988
|
-
info: error.response.data,
|
|
6989
|
-
});
|
|
6990
|
-
}
|
|
6991
|
-
}
|
|
6992
|
-
async getBoletoTransaction(paymentId) {
|
|
6993
|
-
try {
|
|
6994
|
-
const { data } = await axios__default["default"]({
|
|
6995
|
-
method: 'GET',
|
|
6996
|
-
url: `${this.credentials.URL}/transactions/${paymentId}`,
|
|
6997
|
-
data: {
|
|
6998
|
-
api_key: this.credentials.API_KEY,
|
|
6999
|
-
},
|
|
7000
|
-
});
|
|
7001
|
-
return data;
|
|
7002
|
-
}
|
|
7003
|
-
catch (error) {
|
|
7004
|
-
throw new BusinessError('Houve uma falha buscar o boleto com paymentId: ' + paymentId, {
|
|
7005
|
-
paymentId,
|
|
7006
|
-
info: error.response.data,
|
|
7007
|
-
});
|
|
7008
|
-
}
|
|
7009
|
-
}
|
|
7010
|
-
createBoletoPayment(checkout) {
|
|
7011
|
-
return {
|
|
7012
|
-
api_key: this.credentials.API_KEY,
|
|
7013
|
-
amount: Math.floor(checkout.totalPrice * 100),
|
|
7014
|
-
boleto_rules: ['strict_expiration_date'],
|
|
7015
|
-
boleto_instructions: 'Sr. Caixa, NÃO aceitar o pagamento após o vencimento.',
|
|
7016
|
-
boleto_expiration_date: dateFns.format(dateFns.addDays(new Date(), 3), 'yyyy-MM-dd'),
|
|
7017
|
-
payment_method: 'boleto',
|
|
7018
|
-
postback_url: this.credentials.URL_POSTBACK,
|
|
7019
|
-
customer: {
|
|
7020
|
-
external_id: checkout.user.id,
|
|
7021
|
-
type: 'individual',
|
|
7022
|
-
country: 'br',
|
|
7023
|
-
name: checkout.user.displayName,
|
|
7024
|
-
documents: [
|
|
7025
|
-
{
|
|
7026
|
-
type: 'cpf',
|
|
7027
|
-
number: checkout.user.cpf,
|
|
7028
|
-
},
|
|
7029
|
-
],
|
|
7030
|
-
},
|
|
7031
|
-
};
|
|
7032
|
-
}
|
|
7033
|
-
}
|
|
7034
|
-
|
|
7035
|
-
class PagarmeCardAxiosAdapter {
|
|
7036
|
-
constructor(credentials, paymentRepository, orderBlockedRepository) {
|
|
7037
|
-
this.credentials = credentials;
|
|
7038
|
-
this.paymentRepository = paymentRepository;
|
|
7039
|
-
this.orderBlockedRepository = orderBlockedRepository;
|
|
7040
|
-
}
|
|
7041
|
-
async pay(checkout, card) {
|
|
7042
|
-
var _a;
|
|
7043
|
-
try {
|
|
7044
|
-
const result = await axios__default["default"]({
|
|
7045
|
-
method: 'POST',
|
|
7046
|
-
url: `${this.credentials.URL}/transactions`,
|
|
7047
|
-
data: this.createCardPayment(checkout, card),
|
|
7048
|
-
});
|
|
7049
|
-
if (result.data.status !== exports.PagarmePaymentStatus.Pago) {
|
|
7050
|
-
await this.orderBlockedRepository.createBlockedOrderOrPayment(checkout, 'Card not authorized', 'Card', 'day', card);
|
|
7051
|
-
return Promise.reject(new PaymentError(`Seu pagamento com cartão não foi autorizado. Para não perder seus produtos, pague com PIX ou outro cartão de crédito`, {
|
|
7052
|
-
checkoutId: checkout.id,
|
|
7053
|
-
userEmail: checkout.user.email,
|
|
7054
|
-
info: result.data,
|
|
7055
|
-
}));
|
|
7056
|
-
}
|
|
7057
|
-
const payment = await this.paymentRepository.create(Payment.toInstance({
|
|
7058
|
-
createdAt: new Date(),
|
|
7059
|
-
updatedAt: new Date(),
|
|
7060
|
-
userId: checkout.user.id,
|
|
7061
|
-
checkoutId: checkout.id,
|
|
7062
|
-
totalPrice: checkout.totalPrice,
|
|
7063
|
-
paymentProvider: exports.PaymentProviders.PAGARME,
|
|
7064
|
-
transaction: Object.assign(Object.assign({}, result.data), { paidAt: new Date() }),
|
|
7065
|
-
}));
|
|
7066
|
-
return payment;
|
|
7067
|
-
}
|
|
7068
|
-
catch (error) {
|
|
7069
|
-
throw new PaymentError('Seu pagamento com cartão não foi autorizado. Para não perder seus produtos, pague com PIX ou outro cartão de crédito', {
|
|
7070
|
-
checkoutId: checkout.id,
|
|
7071
|
-
userEmail: checkout.user.email,
|
|
7072
|
-
info: (_a = error.response) === null || _a === void 0 ? void 0 : _a.data,
|
|
7073
|
-
});
|
|
7074
|
-
}
|
|
7075
|
-
}
|
|
7076
|
-
async addCard(card) {
|
|
7077
|
-
try {
|
|
7078
|
-
const { data } = await axios__default["default"]({
|
|
7079
|
-
method: 'POST',
|
|
7080
|
-
url: `${this.credentials.URL}/cards`,
|
|
7081
|
-
data: {
|
|
7082
|
-
api_key: this.credentials.API_KEY,
|
|
7083
|
-
card_number: card.number,
|
|
7084
|
-
card_expiration_date: card.expirationDate.replace('/', ''),
|
|
7085
|
-
card_holder_name: card.name,
|
|
7086
|
-
card_cvv: card.cvv,
|
|
7087
|
-
},
|
|
7088
|
-
});
|
|
7089
|
-
return data;
|
|
7090
|
-
}
|
|
7091
|
-
catch (error) {
|
|
7092
|
-
throw new BusinessError('Houve uma falha adicionar o cartão', {
|
|
7093
|
-
info: error.response.data,
|
|
7094
|
-
});
|
|
7095
|
-
}
|
|
7096
|
-
}
|
|
7097
|
-
async createCardHash(bu) {
|
|
7098
|
-
const key = bu === exports.BusinessUnitEnum.SHOP ? this.credentials.SHOP_API_KEY : this.credentials.SUBSCRIPTION_API_KEY;
|
|
7099
|
-
try {
|
|
7100
|
-
const { data } = await axios__default["default"]({
|
|
7101
|
-
method: 'GET',
|
|
7102
|
-
headers: {
|
|
7103
|
-
'content-type': 'application/json',
|
|
7104
|
-
},
|
|
7105
|
-
url: `${this.credentials.URL}/transactions/card_hash_key`,
|
|
7106
|
-
data: JSON.stringify({
|
|
7107
|
-
api_key: key,
|
|
7108
|
-
}),
|
|
7109
|
-
});
|
|
7110
|
-
return data;
|
|
7111
|
-
}
|
|
7112
|
-
catch (error) {
|
|
7113
|
-
console.log('createCardHash axios error', error);
|
|
7114
|
-
throw new BusinessError('Houve uma falha gerar o hash', {
|
|
7115
|
-
info: error.response.data,
|
|
7116
|
-
});
|
|
7117
|
-
}
|
|
7118
|
-
}
|
|
7119
|
-
async getCardByToken(id) {
|
|
7120
|
-
try {
|
|
7121
|
-
const { data } = await axios__default["default"]({
|
|
7122
|
-
method: 'POST',
|
|
7123
|
-
url: `${this.credentials.URL}/cards/${id}`,
|
|
7124
|
-
data: {
|
|
7125
|
-
api_key: this.credentials.API_KEY,
|
|
7126
|
-
},
|
|
7127
|
-
});
|
|
7128
|
-
return data;
|
|
7129
|
-
}
|
|
7130
|
-
catch (error) {
|
|
7131
|
-
throw new BusinessError('Houve uma falha buscar o cartão com id: ' + id, {
|
|
7132
|
-
info: error.response.data,
|
|
7133
|
-
});
|
|
7134
|
-
}
|
|
7135
|
-
}
|
|
7136
|
-
async createTransaction(info) {
|
|
7137
|
-
try {
|
|
7138
|
-
const { data } = await axios__default["default"]({
|
|
7139
|
-
method: 'POST',
|
|
7140
|
-
url: `${this.credentials.URL}/transactions`,
|
|
7141
|
-
data: Object.assign(Object.assign({}, info), { api_key: this.credentials.API_KEY }),
|
|
7142
|
-
});
|
|
7143
|
-
return data;
|
|
7144
|
-
}
|
|
7145
|
-
catch (error) {
|
|
7146
|
-
throw new BusinessError('Houve uma falha ao criar a transação', {
|
|
7147
|
-
info: error.response.data,
|
|
7148
|
-
});
|
|
7149
|
-
}
|
|
7150
|
-
}
|
|
7151
|
-
createCardPayment(checkout, card) {
|
|
7152
|
-
var _a, _b, _c, _d, _e, _f;
|
|
7153
|
-
return {
|
|
7154
|
-
api_key: this.credentials.API_KEY,
|
|
7155
|
-
amount: Math.floor(checkout.totalPrice * 100),
|
|
7156
|
-
card_id: card.cardId,
|
|
7157
|
-
payment_method: 'credit_card',
|
|
7158
|
-
installments: card.installments,
|
|
7159
|
-
soft_descriptor: checkout.shop === exports.Shops.GLAMSHOP ? 'Glam' : "Men's Market",
|
|
7160
|
-
customer: {
|
|
7161
|
-
external_id: checkout.user.id,
|
|
7162
|
-
name: checkout.user.displayName,
|
|
7163
|
-
type: 'individual',
|
|
7164
|
-
country: 'br',
|
|
7165
|
-
email: checkout.user.email,
|
|
7166
|
-
phone_numbers: checkout.user.phone ? ['+55' + checkout.user.phone] : '',
|
|
7167
|
-
documents: [
|
|
7168
|
-
{
|
|
7169
|
-
type: 'cpf',
|
|
7170
|
-
number: checkout.user.cpf,
|
|
7171
|
-
},
|
|
7172
|
-
],
|
|
7173
|
-
},
|
|
7174
|
-
billing: {
|
|
7175
|
-
name: checkout.user.displayName,
|
|
7176
|
-
address: {
|
|
7177
|
-
country: 'br',
|
|
7178
|
-
state: checkout.billingAddress ? checkout.billingAddress.state : (_a = checkout.shippingAddress) === null || _a === void 0 ? void 0 : _a.state,
|
|
7179
|
-
city: checkout.billingAddress ? checkout.billingAddress.city : (_b = checkout.shippingAddress) === null || _b === void 0 ? void 0 : _b.city,
|
|
7180
|
-
neighborhood: checkout.billingAddress ? checkout.billingAddress.district : (_c = checkout.shippingAddress) === null || _c === void 0 ? void 0 : _c.district,
|
|
7181
|
-
street: checkout.billingAddress ? checkout.billingAddress.street : (_d = checkout.shippingAddress) === null || _d === void 0 ? void 0 : _d.street,
|
|
7182
|
-
street_number: checkout.billingAddress ? checkout.billingAddress.number : (_e = checkout.shippingAddress) === null || _e === void 0 ? void 0 : _e.number,
|
|
7183
|
-
zipcode: checkout.billingAddress
|
|
7184
|
-
? checkout.billingAddress.zip.replace('-', '')
|
|
7185
|
-
: (_f = checkout.shippingAddress) === null || _f === void 0 ? void 0 : _f.zip.replace('-', ''),
|
|
7186
|
-
},
|
|
7187
|
-
},
|
|
7188
|
-
items: checkout.lineItems.map((item) => {
|
|
7189
|
-
return {
|
|
7190
|
-
id: item.id,
|
|
7191
|
-
title: checkout.user.isSubscriber ? `${item.name} - ASSINANTE` : item.name,
|
|
7192
|
-
unit_price: Math.floor(item.pricePaid * 100),
|
|
7193
|
-
quantity: item.quantity,
|
|
7194
|
-
tangible: true,
|
|
7195
|
-
};
|
|
7196
|
-
}),
|
|
7197
|
-
};
|
|
7198
|
-
}
|
|
7199
|
-
}
|
|
7200
|
-
|
|
7201
|
-
class PagarmePixAxiosAdapter {
|
|
7202
|
-
constructor(credentials, paymentRepository) {
|
|
7203
|
-
this.credentials = credentials;
|
|
7204
|
-
this.paymentRepository = paymentRepository;
|
|
7205
|
-
}
|
|
7206
|
-
async pay(checkout) {
|
|
7207
|
-
var _a;
|
|
7208
|
-
try {
|
|
7209
|
-
const result = await axios__default["default"]({
|
|
7210
|
-
method: 'POST',
|
|
7211
|
-
url: `${this.credentials.URL}/transactions`,
|
|
7212
|
-
data: this.createPixPayment(checkout),
|
|
7213
|
-
});
|
|
7214
|
-
const payment = await this.paymentRepository.create(Payment.toInstance({
|
|
7215
|
-
createdAt: new Date(),
|
|
7216
|
-
updatedAt: new Date(),
|
|
7217
|
-
userId: checkout.user.id,
|
|
7218
|
-
checkoutId: checkout.id,
|
|
7219
|
-
totalPrice: checkout.totalPrice,
|
|
7220
|
-
paymentProvider: 'pagarMe',
|
|
7221
|
-
transaction: Object.assign(Object.assign({}, result.data), { paidAt: new Date() }),
|
|
7222
|
-
}));
|
|
7223
|
-
return payment;
|
|
7224
|
-
}
|
|
7225
|
-
catch (error) {
|
|
7226
|
-
throw new PaymentError('Houve uma falha ao processar pagamento com pix', {
|
|
7227
|
-
checkoutId: checkout.id,
|
|
7228
|
-
userEmail: checkout.user.email,
|
|
7229
|
-
info: (_a = error.response) === null || _a === void 0 ? void 0 : _a.data,
|
|
7230
|
-
});
|
|
7231
|
-
}
|
|
7232
|
-
}
|
|
7233
|
-
createPixPayment(checkout) {
|
|
7234
|
-
return {
|
|
7235
|
-
payment_method: 'pix',
|
|
7236
|
-
amount: Math.floor(checkout.totalPrice * 100),
|
|
7237
|
-
api_key: this.credentials.API_KEY,
|
|
7238
|
-
postback_url: this.credentials.URL_POSTBACK,
|
|
7239
|
-
pix_expiration_date: dateFns.format(dateFns.addDays(new Date(), 1), 'yyyy-MM-dd'),
|
|
7240
|
-
customer: {
|
|
7241
|
-
external_id: checkout.user.id,
|
|
7242
|
-
type: 'individual',
|
|
7243
|
-
country: 'br',
|
|
7244
|
-
name: checkout.user.displayName,
|
|
7245
|
-
email: checkout.user.email.trim(),
|
|
7246
|
-
phone_numbers: checkout.user.phone ? ['+55' + checkout.user.phone] : '',
|
|
7247
|
-
documents: [
|
|
7248
|
-
{
|
|
7249
|
-
type: 'cpf',
|
|
7250
|
-
number: checkout.user.cpf,
|
|
7251
|
-
},
|
|
7252
|
-
],
|
|
7253
|
-
},
|
|
7254
|
-
};
|
|
7255
|
-
}
|
|
7256
|
-
}
|
|
7257
|
-
|
|
7258
6499
|
class VertexAxiosAdapter {
|
|
7259
6500
|
constructor(config) {
|
|
7260
6501
|
this.config = config;
|
|
@@ -7452,10 +6693,6 @@ Object.defineProperty(exports, 'sub', {
|
|
|
7452
6693
|
enumerable: true,
|
|
7453
6694
|
get: function () { return dateFns.sub; }
|
|
7454
6695
|
});
|
|
7455
|
-
Object.defineProperty(exports, 'subDays', {
|
|
7456
|
-
enumerable: true,
|
|
7457
|
-
get: function () { return dateFns.subDays; }
|
|
7458
|
-
});
|
|
7459
6696
|
Object.defineProperty(exports, 'chunk', {
|
|
7460
6697
|
enumerable: true,
|
|
7461
6698
|
get: function () { return lodash.chunk; }
|
|
@@ -7529,13 +6766,6 @@ Object.defineProperty(exports, 'unset', {
|
|
|
7529
6766
|
get: function () { return lodash.unset; }
|
|
7530
6767
|
});
|
|
7531
6768
|
exports.Address = Address;
|
|
7532
|
-
exports.AdyenCardAxiosAdapter = AdyenCardAxiosAdapter;
|
|
7533
|
-
exports.AdyenPaymentMethodFactory = AdyenPaymentMethodFactory;
|
|
7534
|
-
exports.AntifraudBankSlipService = AntifraudBankSlipService;
|
|
7535
|
-
exports.AntifraudCardService = AntifraudCardService;
|
|
7536
|
-
exports.AntifraudGlampointsService = AntifraudGlampointsService;
|
|
7537
|
-
exports.AntifraudPixService = AntifraudPixService;
|
|
7538
|
-
exports.AntifraudProviderFactory = AntifraudProviderFactory;
|
|
7539
6769
|
exports.Authentication = Authentication;
|
|
7540
6770
|
exports.AuthenticationFirebaseAuthService = AuthenticationFirebaseAuthService;
|
|
7541
6771
|
exports.AxiosAdapter = AxiosAdapter;
|
|
@@ -7543,7 +6773,6 @@ exports.Base = Base;
|
|
|
7543
6773
|
exports.BaseModel = BaseModel;
|
|
7544
6774
|
exports.BeautyProfile = BeautyProfile;
|
|
7545
6775
|
exports.BeautyQuestionsHelper = BeautyQuestionsHelper;
|
|
7546
|
-
exports.BusinessError = BusinessError;
|
|
7547
6776
|
exports.Buy2Win = Buy2Win;
|
|
7548
6777
|
exports.Buy2WinFirestoreRepository = Buy2WinFirestoreRepository;
|
|
7549
6778
|
exports.Campaign = Campaign;
|
|
@@ -7581,9 +6810,6 @@ exports.FilterHasuraGraphQLRepository = FilterHasuraGraphQLRepository;
|
|
|
7581
6810
|
exports.FilterOption = FilterOption;
|
|
7582
6811
|
exports.FilterOptionHasuraGraphQLRepository = FilterOptionHasuraGraphQLRepository;
|
|
7583
6812
|
exports.FirebaseFileUploaderService = FirebaseFileUploaderService;
|
|
7584
|
-
exports.FraudValidationError = FraudValidationError;
|
|
7585
|
-
exports.GlampointsPaymentMethodFactory = GlampointsPaymentMethodFactory;
|
|
7586
|
-
exports.GlampointsPaymentService = GlampointsPaymentService;
|
|
7587
6813
|
exports.Home = Home;
|
|
7588
6814
|
exports.HomeFirestoreRepository = HomeFirestoreRepository;
|
|
7589
6815
|
exports.InvalidArgumentError = InvalidArgumentError;
|
|
@@ -7602,15 +6828,8 @@ exports.Order = Order;
|
|
|
7602
6828
|
exports.OrderBlocked = OrderBlocked;
|
|
7603
6829
|
exports.OrderBlockedFirestoreRepository = OrderBlockedFirestoreRepository;
|
|
7604
6830
|
exports.OrderFirestoreRepository = OrderFirestoreRepository;
|
|
7605
|
-
exports.PagarmeBankSlipAxiosAdapter = PagarmeBankSlipAxiosAdapter;
|
|
7606
|
-
exports.PagarmeCardAxiosAdapter = PagarmeCardAxiosAdapter;
|
|
7607
|
-
exports.PagarmePaymentMethodFactory = PagarmePaymentMethodFactory;
|
|
7608
|
-
exports.PagarmePixAxiosAdapter = PagarmePixAxiosAdapter;
|
|
7609
6831
|
exports.Payment = Payment;
|
|
7610
|
-
exports.PaymentError = PaymentError;
|
|
7611
6832
|
exports.PaymentFirestoreRepository = PaymentFirestoreRepository;
|
|
7612
|
-
exports.PaymentProviderFactory = PaymentProviderFactory;
|
|
7613
|
-
exports.PaymentTransaction = PaymentTransaction;
|
|
7614
6833
|
exports.Product = Product;
|
|
7615
6834
|
exports.ProductFirestoreRepository = ProductFirestoreRepository;
|
|
7616
6835
|
exports.ProductHasuraGraphQL = ProductHasuraGraphQL;
|
|
@@ -7628,16 +6847,12 @@ exports.Register = Register;
|
|
|
7628
6847
|
exports.RegisterFirebaseAuthService = RegisterFirebaseAuthService;
|
|
7629
6848
|
exports.RequiredArgumentError = RequiredArgumentError;
|
|
7630
6849
|
exports.RoundProductPricesHelper = RoundProductPricesHelper;
|
|
7631
|
-
exports.Sequence = Sequence;
|
|
7632
|
-
exports.SequenceFirestoreRepository = SequenceFirestoreRepository;
|
|
7633
6850
|
exports.ShippingMethod = ShippingMethod;
|
|
7634
6851
|
exports.ShopMenu = ShopMenu;
|
|
7635
6852
|
exports.ShopMenuFirestoreRepository = ShopMenuFirestoreRepository;
|
|
7636
6853
|
exports.ShopSettings = ShopSettings;
|
|
7637
6854
|
exports.ShopSettingsFirestoreRepository = ShopSettingsFirestoreRepository;
|
|
7638
6855
|
exports.SignOut = SignOut;
|
|
7639
|
-
exports.StockLimitError = StockLimitError;
|
|
7640
|
-
exports.StockOutError = StockOutError;
|
|
7641
6856
|
exports.Subscription = Subscription;
|
|
7642
6857
|
exports.SubscriptionEditionFirestoreRepository = SubscriptionEditionFirestoreRepository;
|
|
7643
6858
|
exports.SubscriptionFirestoreRepository = SubscriptionFirestoreRepository;
|