@infrab4a/connect 5.5.6-beta.5 → 5.5.6-beta.6
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 +82 -25
- package/index.esm.js +80 -7
- package/package.json +1 -1
- package/src/domain/catalog/models/category.d.ts +12 -0
- package/src/domain/shopping/models/line-item.d.ts +1 -0
- package/src/domain/shopping/models/recurrence/index.d.ts +1 -0
- package/src/domain/shopping/models/recurrence/shopping-recurrence-error-log.d.ts +9 -0
- package/src/domain/shopping/repositories/recurrence/index.d.ts +1 -0
- package/src/domain/shopping/repositories/recurrence/shopping-recurrence-error-log.repository.d.ts +4 -0
- package/src/domain/shopping/types/create-recurrency-payload.type.d.ts +1 -1
- package/src/infra/firebase/firestore/repositories/shopping/index.d.ts +1 -0
- package/src/infra/firebase/firestore/repositories/shopping/shopping-recurrence-error-log-firestore.repository.d.ts +7 -0
- package/src/utils/index.d.ts +1 -0
- package/src/utils/to-cents.d.ts +5 -0
package/index.cjs.js
CHANGED
|
@@ -16,25 +16,6 @@ var gqlQueryBuilder = require('gql-query-builder');
|
|
|
16
16
|
var firestore = require('firebase/firestore');
|
|
17
17
|
var storage = require('firebase/storage');
|
|
18
18
|
|
|
19
|
-
function _interopNamespaceDefault(e) {
|
|
20
|
-
var n = Object.create(null);
|
|
21
|
-
if (e) {
|
|
22
|
-
Object.keys(e).forEach(function (k) {
|
|
23
|
-
if (k !== 'default') {
|
|
24
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
25
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
get: function () { return e[k]; }
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
n.default = e;
|
|
33
|
-
return Object.freeze(n);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
var serializeJavascript__namespace = /*#__PURE__*/_interopNamespaceDefault(serializeJavascript);
|
|
37
|
-
|
|
38
19
|
exports.AntifraudProviders = void 0;
|
|
39
20
|
(function (AntifraudProviders) {
|
|
40
21
|
AntifraudProviders["BANKSLIP"] = "bankSlip";
|
|
@@ -654,9 +635,22 @@ const deserialize = (data) => {
|
|
|
654
635
|
return eval('(' + data + ')');
|
|
655
636
|
};
|
|
656
637
|
const serialize = (data) => {
|
|
657
|
-
return
|
|
638
|
+
return serializeJavascript(data);
|
|
658
639
|
};
|
|
659
640
|
|
|
641
|
+
/**
|
|
642
|
+
* Converts a BRL major-unit amount (e.g. 10.5) to integer cents (1050).
|
|
643
|
+
* Uses fixed 2-decimal normalization to avoid IEEE-754 artifacts like 19.99 * 100.
|
|
644
|
+
*/
|
|
645
|
+
function toCents(amount) {
|
|
646
|
+
if (!Number.isFinite(amount)) {
|
|
647
|
+
throw new Error(`Invalid amount: ${amount}`);
|
|
648
|
+
}
|
|
649
|
+
const sign = amount < 0 ? -1 : 1;
|
|
650
|
+
const [whole, fraction = '0'] = Math.abs(amount).toFixed(2).split('.');
|
|
651
|
+
return sign * (Number(whole) * 100 + Number(fraction));
|
|
652
|
+
}
|
|
653
|
+
|
|
660
654
|
class BaseModel {
|
|
661
655
|
get identifier() {
|
|
662
656
|
const fields = this.constructor.identifiersFields.filter((field) => field !== 'identifier');
|
|
@@ -745,12 +739,36 @@ class Category extends BaseModel {
|
|
|
745
739
|
image: null,
|
|
746
740
|
};
|
|
747
741
|
}
|
|
742
|
+
get glamBeautyImages() {
|
|
743
|
+
return this.images?.[exports.Shops.GLAMBEAUTY]
|
|
744
|
+
? this.images[exports.Shops.GLAMBEAUTY]
|
|
745
|
+
: {
|
|
746
|
+
brandBanner: null,
|
|
747
|
+
brandBannerMobile: null,
|
|
748
|
+
image: null,
|
|
749
|
+
};
|
|
750
|
+
}
|
|
751
|
+
get ellaImages() {
|
|
752
|
+
return this.images?.[exports.Shops.ELLA]
|
|
753
|
+
? this.images[exports.Shops.ELLA]
|
|
754
|
+
: {
|
|
755
|
+
brandBanner: null,
|
|
756
|
+
brandBannerMobile: null,
|
|
757
|
+
image: null,
|
|
758
|
+
};
|
|
759
|
+
}
|
|
748
760
|
get glamMetadata() {
|
|
749
761
|
return this.metadatas.find((metadata) => metadata.shop === exports.Shops.GLAMSHOP);
|
|
750
762
|
}
|
|
751
763
|
get mensMetadata() {
|
|
752
764
|
return this.metadatas.find((metadata) => metadata.shop === exports.Shops.MENSMARKET);
|
|
753
765
|
}
|
|
766
|
+
get glamBeautyMetadata() {
|
|
767
|
+
return this.metadatas.find((metadata) => metadata.shop === exports.Shops.GLAMBEAUTY);
|
|
768
|
+
}
|
|
769
|
+
get ellaMetadata() {
|
|
770
|
+
return this.metadatas.find((metadata) => metadata.shop === exports.Shops.ELLA);
|
|
771
|
+
}
|
|
754
772
|
getMostRelevantByShop(shop) {
|
|
755
773
|
return this.mostRelevants?.[shop] || [];
|
|
756
774
|
}
|
|
@@ -1764,6 +1782,12 @@ class ShoppingRecurrenceEdition extends BaseModel {
|
|
|
1764
1782
|
}
|
|
1765
1783
|
}
|
|
1766
1784
|
|
|
1785
|
+
class ShoppingRecurrenceErrorLog extends BaseModel {
|
|
1786
|
+
static get identifiersFields() {
|
|
1787
|
+
return ['id'];
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1767
1791
|
class CheckoutSubscription extends BaseModel {
|
|
1768
1792
|
static get identifiersFields() {
|
|
1769
1793
|
return ['id'];
|
|
@@ -5576,6 +5600,18 @@ class ShoppingRecurrenceEditionFirestoreRepository extends withCrudFirestore(wit
|
|
|
5576
5600
|
}
|
|
5577
5601
|
}
|
|
5578
5602
|
|
|
5603
|
+
class ShoppingRecurrenceErrorLogFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5604
|
+
constructor({ firestore, interceptors, cache, }) {
|
|
5605
|
+
super({
|
|
5606
|
+
firestore,
|
|
5607
|
+
collectionName: 'shoppingRecurrenceErrorLogs',
|
|
5608
|
+
model: ShoppingRecurrenceErrorLog,
|
|
5609
|
+
interceptors,
|
|
5610
|
+
cache,
|
|
5611
|
+
});
|
|
5612
|
+
}
|
|
5613
|
+
}
|
|
5614
|
+
|
|
5579
5615
|
class ShoppingRecurrenceFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5580
5616
|
constructor({ firestore, interceptors, cache, }) {
|
|
5581
5617
|
super({
|
|
@@ -7112,6 +7148,8 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
|
|
|
7112
7148
|
mostRelevants: mostRelevants || {
|
|
7113
7149
|
[exports.Shops.GLAMSHOP]: null,
|
|
7114
7150
|
[exports.Shops.MENSMARKET]: null,
|
|
7151
|
+
[exports.Shops.GLAMBEAUTY]: null,
|
|
7152
|
+
[exports.Shops.ELLA]: null,
|
|
7115
7153
|
},
|
|
7116
7154
|
images: images || {
|
|
7117
7155
|
[exports.Shops.GLAMSHOP]: {
|
|
@@ -7124,6 +7162,16 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
|
|
|
7124
7162
|
brandBannerMobile: null,
|
|
7125
7163
|
image: null,
|
|
7126
7164
|
},
|
|
7165
|
+
[exports.Shops.GLAMBEAUTY]: {
|
|
7166
|
+
brandBanner: null,
|
|
7167
|
+
brandBannerMobile: null,
|
|
7168
|
+
image: null,
|
|
7169
|
+
},
|
|
7170
|
+
[exports.Shops.ELLA]: {
|
|
7171
|
+
brandBanner: null,
|
|
7172
|
+
brandBannerMobile: null,
|
|
7173
|
+
image: null,
|
|
7174
|
+
},
|
|
7127
7175
|
},
|
|
7128
7176
|
});
|
|
7129
7177
|
}
|
|
@@ -11071,9 +11119,9 @@ class PagarmeV5BaseAxiosAdapter {
|
|
|
11071
11119
|
}
|
|
11072
11120
|
async refund(order, amount) {
|
|
11073
11121
|
try {
|
|
11074
|
-
console.warn('[PAGARME REFUND] Starting refund process for order', order.id, order.payment, 'with amount', amount);
|
|
11075
|
-
const
|
|
11076
|
-
console.warn('[PAGARME REFUND] Amount to send in cents',
|
|
11122
|
+
console.warn('[PAGARME REFUND] Starting refund process for order', order.id, order.payment.payment_method, order.payment.amount, 'to refund with amount', amount);
|
|
11123
|
+
const amountInCents = toCents(amount);
|
|
11124
|
+
console.warn('[PAGARME REFUND] Amount to send in cents', amountInCents);
|
|
11077
11125
|
const { data } = await axios({
|
|
11078
11126
|
method: 'DELETE',
|
|
11079
11127
|
url: `${this.credentials.URL}/charges/${order.payment.charger_id}`,
|
|
@@ -11082,7 +11130,7 @@ class PagarmeV5BaseAxiosAdapter {
|
|
|
11082
11130
|
'Content-Type': 'application/json',
|
|
11083
11131
|
},
|
|
11084
11132
|
data: {
|
|
11085
|
-
amount:
|
|
11133
|
+
amount: amountInCents,
|
|
11086
11134
|
},
|
|
11087
11135
|
});
|
|
11088
11136
|
console.warn('[RESPONSE PAGARME REFUND]', JSON.stringify(data));
|
|
@@ -11098,7 +11146,13 @@ class PagarmeV5BaseAxiosAdapter {
|
|
|
11098
11146
|
});
|
|
11099
11147
|
return {
|
|
11100
11148
|
status: this.getRefundStatus(data.status),
|
|
11101
|
-
success: [
|
|
11149
|
+
success: [
|
|
11150
|
+
exports.PagarMeV5OrderStatus.Pago,
|
|
11151
|
+
exports.PagarMeV5OrderStatus.Cancelado,
|
|
11152
|
+
exports.PagarMeV5PaymentStatus['Em processamento'],
|
|
11153
|
+
].includes(data.status)
|
|
11154
|
+
? true
|
|
11155
|
+
: false,
|
|
11102
11156
|
};
|
|
11103
11157
|
}
|
|
11104
11158
|
catch (error) {
|
|
@@ -11757,6 +11811,8 @@ exports.ShopSettingsFirestoreRepository = ShopSettingsFirestoreRepository;
|
|
|
11757
11811
|
exports.ShoppingRecurrence = ShoppingRecurrence;
|
|
11758
11812
|
exports.ShoppingRecurrenceEdition = ShoppingRecurrenceEdition;
|
|
11759
11813
|
exports.ShoppingRecurrenceEditionFirestoreRepository = ShoppingRecurrenceEditionFirestoreRepository;
|
|
11814
|
+
exports.ShoppingRecurrenceErrorLog = ShoppingRecurrenceErrorLog;
|
|
11815
|
+
exports.ShoppingRecurrenceErrorLogFirestoreRepository = ShoppingRecurrenceErrorLogFirestoreRepository;
|
|
11760
11816
|
exports.ShoppingRecurrenceFirestoreRepository = ShoppingRecurrenceFirestoreRepository;
|
|
11761
11817
|
exports.SignOut = SignOut;
|
|
11762
11818
|
exports.StockLimitError = StockLimitError;
|
|
@@ -11800,6 +11856,7 @@ exports.parseDateTime = parseDateTime;
|
|
|
11800
11856
|
exports.registerClass = registerClass;
|
|
11801
11857
|
exports.resolveClass = resolveClass;
|
|
11802
11858
|
exports.serialize = serialize;
|
|
11859
|
+
exports.toCents = toCents;
|
|
11803
11860
|
exports.withCreateFirestore = withCreateFirestore;
|
|
11804
11861
|
exports.withCreateHasuraGraphQL = withCreateHasuraGraphQL;
|
|
11805
11862
|
exports.withCrudFirestore = withCrudFirestore;
|
package/index.esm.js
CHANGED
|
@@ -8,7 +8,7 @@ export { formatInTimeZone } from 'date-fns-tz';
|
|
|
8
8
|
import { compact, get, isNil, isArray, first, last, flatten, isString, omit, each, unset, isObject, isEmpty, isDate, isBoolean, isInteger, isNumber, isNaN as isNaN$1, set, chunk, sortBy } from 'lodash';
|
|
9
9
|
export { chunk, each, get, isBoolean, isDate, isEmpty, isInteger, isNaN, isNil, isNumber, isObject, isString, now, omit, pick, set, sortBy, unset } from 'lodash';
|
|
10
10
|
import { debug } from 'debug';
|
|
11
|
-
import
|
|
11
|
+
import serializeJavascript from 'serialize-javascript';
|
|
12
12
|
import { CustomError } from 'ts-custom-error';
|
|
13
13
|
import axios, { AxiosError } from 'axios';
|
|
14
14
|
import { signInWithEmailAndPassword, signInWithPopup, GoogleAuthProvider, browserPopupRedirectResolver, signInAnonymously, sendPasswordResetEmail, createUserWithEmailAndPassword, sendEmailVerification } from 'firebase/auth';
|
|
@@ -639,6 +639,19 @@ const serialize = (data) => {
|
|
|
639
639
|
return serializeJavascript(data);
|
|
640
640
|
};
|
|
641
641
|
|
|
642
|
+
/**
|
|
643
|
+
* Converts a BRL major-unit amount (e.g. 10.5) to integer cents (1050).
|
|
644
|
+
* Uses fixed 2-decimal normalization to avoid IEEE-754 artifacts like 19.99 * 100.
|
|
645
|
+
*/
|
|
646
|
+
function toCents(amount) {
|
|
647
|
+
if (!Number.isFinite(amount)) {
|
|
648
|
+
throw new Error(`Invalid amount: ${amount}`);
|
|
649
|
+
}
|
|
650
|
+
const sign = amount < 0 ? -1 : 1;
|
|
651
|
+
const [whole, fraction = '0'] = Math.abs(amount).toFixed(2).split('.');
|
|
652
|
+
return sign * (Number(whole) * 100 + Number(fraction));
|
|
653
|
+
}
|
|
654
|
+
|
|
642
655
|
class BaseModel {
|
|
643
656
|
get identifier() {
|
|
644
657
|
const fields = this.constructor.identifiersFields.filter((field) => field !== 'identifier');
|
|
@@ -727,12 +740,36 @@ class Category extends BaseModel {
|
|
|
727
740
|
image: null,
|
|
728
741
|
};
|
|
729
742
|
}
|
|
743
|
+
get glamBeautyImages() {
|
|
744
|
+
return this.images?.[Shops.GLAMBEAUTY]
|
|
745
|
+
? this.images[Shops.GLAMBEAUTY]
|
|
746
|
+
: {
|
|
747
|
+
brandBanner: null,
|
|
748
|
+
brandBannerMobile: null,
|
|
749
|
+
image: null,
|
|
750
|
+
};
|
|
751
|
+
}
|
|
752
|
+
get ellaImages() {
|
|
753
|
+
return this.images?.[Shops.ELLA]
|
|
754
|
+
? this.images[Shops.ELLA]
|
|
755
|
+
: {
|
|
756
|
+
brandBanner: null,
|
|
757
|
+
brandBannerMobile: null,
|
|
758
|
+
image: null,
|
|
759
|
+
};
|
|
760
|
+
}
|
|
730
761
|
get glamMetadata() {
|
|
731
762
|
return this.metadatas.find((metadata) => metadata.shop === Shops.GLAMSHOP);
|
|
732
763
|
}
|
|
733
764
|
get mensMetadata() {
|
|
734
765
|
return this.metadatas.find((metadata) => metadata.shop === Shops.MENSMARKET);
|
|
735
766
|
}
|
|
767
|
+
get glamBeautyMetadata() {
|
|
768
|
+
return this.metadatas.find((metadata) => metadata.shop === Shops.GLAMBEAUTY);
|
|
769
|
+
}
|
|
770
|
+
get ellaMetadata() {
|
|
771
|
+
return this.metadatas.find((metadata) => metadata.shop === Shops.ELLA);
|
|
772
|
+
}
|
|
736
773
|
getMostRelevantByShop(shop) {
|
|
737
774
|
return this.mostRelevants?.[shop] || [];
|
|
738
775
|
}
|
|
@@ -1746,6 +1783,12 @@ class ShoppingRecurrenceEdition extends BaseModel {
|
|
|
1746
1783
|
}
|
|
1747
1784
|
}
|
|
1748
1785
|
|
|
1786
|
+
class ShoppingRecurrenceErrorLog extends BaseModel {
|
|
1787
|
+
static get identifiersFields() {
|
|
1788
|
+
return ['id'];
|
|
1789
|
+
}
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1749
1792
|
class CheckoutSubscription extends BaseModel {
|
|
1750
1793
|
static get identifiersFields() {
|
|
1751
1794
|
return ['id'];
|
|
@@ -5558,6 +5601,18 @@ class ShoppingRecurrenceEditionFirestoreRepository extends withCrudFirestore(wit
|
|
|
5558
5601
|
}
|
|
5559
5602
|
}
|
|
5560
5603
|
|
|
5604
|
+
class ShoppingRecurrenceErrorLogFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5605
|
+
constructor({ firestore, interceptors, cache, }) {
|
|
5606
|
+
super({
|
|
5607
|
+
firestore,
|
|
5608
|
+
collectionName: 'shoppingRecurrenceErrorLogs',
|
|
5609
|
+
model: ShoppingRecurrenceErrorLog,
|
|
5610
|
+
interceptors,
|
|
5611
|
+
cache,
|
|
5612
|
+
});
|
|
5613
|
+
}
|
|
5614
|
+
}
|
|
5615
|
+
|
|
5561
5616
|
class ShoppingRecurrenceFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5562
5617
|
constructor({ firestore, interceptors, cache, }) {
|
|
5563
5618
|
super({
|
|
@@ -7094,6 +7149,8 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
|
|
|
7094
7149
|
mostRelevants: mostRelevants || {
|
|
7095
7150
|
[Shops.GLAMSHOP]: null,
|
|
7096
7151
|
[Shops.MENSMARKET]: null,
|
|
7152
|
+
[Shops.GLAMBEAUTY]: null,
|
|
7153
|
+
[Shops.ELLA]: null,
|
|
7097
7154
|
},
|
|
7098
7155
|
images: images || {
|
|
7099
7156
|
[Shops.GLAMSHOP]: {
|
|
@@ -7106,6 +7163,16 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
|
|
|
7106
7163
|
brandBannerMobile: null,
|
|
7107
7164
|
image: null,
|
|
7108
7165
|
},
|
|
7166
|
+
[Shops.GLAMBEAUTY]: {
|
|
7167
|
+
brandBanner: null,
|
|
7168
|
+
brandBannerMobile: null,
|
|
7169
|
+
image: null,
|
|
7170
|
+
},
|
|
7171
|
+
[Shops.ELLA]: {
|
|
7172
|
+
brandBanner: null,
|
|
7173
|
+
brandBannerMobile: null,
|
|
7174
|
+
image: null,
|
|
7175
|
+
},
|
|
7109
7176
|
},
|
|
7110
7177
|
});
|
|
7111
7178
|
}
|
|
@@ -11053,9 +11120,9 @@ class PagarmeV5BaseAxiosAdapter {
|
|
|
11053
11120
|
}
|
|
11054
11121
|
async refund(order, amount) {
|
|
11055
11122
|
try {
|
|
11056
|
-
console.warn('[PAGARME REFUND] Starting refund process for order', order.id, order.payment, 'with amount', amount);
|
|
11057
|
-
const
|
|
11058
|
-
console.warn('[PAGARME REFUND] Amount to send in cents',
|
|
11123
|
+
console.warn('[PAGARME REFUND] Starting refund process for order', order.id, order.payment.payment_method, order.payment.amount, 'to refund with amount', amount);
|
|
11124
|
+
const amountInCents = toCents(amount);
|
|
11125
|
+
console.warn('[PAGARME REFUND] Amount to send in cents', amountInCents);
|
|
11059
11126
|
const { data } = await axios({
|
|
11060
11127
|
method: 'DELETE',
|
|
11061
11128
|
url: `${this.credentials.URL}/charges/${order.payment.charger_id}`,
|
|
@@ -11064,7 +11131,7 @@ class PagarmeV5BaseAxiosAdapter {
|
|
|
11064
11131
|
'Content-Type': 'application/json',
|
|
11065
11132
|
},
|
|
11066
11133
|
data: {
|
|
11067
|
-
amount:
|
|
11134
|
+
amount: amountInCents,
|
|
11068
11135
|
},
|
|
11069
11136
|
});
|
|
11070
11137
|
console.warn('[RESPONSE PAGARME REFUND]', JSON.stringify(data));
|
|
@@ -11080,7 +11147,13 @@ class PagarmeV5BaseAxiosAdapter {
|
|
|
11080
11147
|
});
|
|
11081
11148
|
return {
|
|
11082
11149
|
status: this.getRefundStatus(data.status),
|
|
11083
|
-
success: [
|
|
11150
|
+
success: [
|
|
11151
|
+
PagarMeV5OrderStatus.Pago,
|
|
11152
|
+
PagarMeV5OrderStatus.Cancelado,
|
|
11153
|
+
PagarMeV5PaymentStatus['Em processamento'],
|
|
11154
|
+
].includes(data.status)
|
|
11155
|
+
? true
|
|
11156
|
+
: false,
|
|
11084
11157
|
};
|
|
11085
11158
|
}
|
|
11086
11159
|
catch (error) {
|
|
@@ -11467,4 +11540,4 @@ class ProductsVertexSearch {
|
|
|
11467
11540
|
}
|
|
11468
11541
|
}
|
|
11469
11542
|
|
|
11470
|
-
export { AccessoryImportances, Address, AdyenCardAxiosAdapter, AdyenPaymentMethodFactory, AntifraudBankSlipService, AntifraudCardService, AntifraudGlampointsService, AntifraudPixService, AntifraudProviderFactory, AntifraudProviders, Area, Authentication, AuthenticationFirebaseAuthService, AxiosAdapter, Base, BaseModel, BeardProblems, BeardSizes, BeautyProductImportances, BeautyProfile, BeautyQuestionsHelper, BillingStatus, BodyProblems, BodyShapes, BodyTattoos, BrandCategory, BrandCategoryFirestoreRepository, BrandEquityOptions, BusinessError, BusinessUnitEnum, Buy2Win, Buy2WinFirestoreRepository, Campaign, CampaignBanner, CampaignDashboard, CampaignDashboardFirestoreRepository, CampaignHashtag, CampaignHashtagFirestoreRepository, Category, CategoryCollectionChildren, CategoryCollectionChildrenHasuraGraphQLRepository, CategoryFilter, CategoryFilterHasuraGraphQLRepository, CategoryFirestoreRepository, CategoryHasuraGraphQL, CategoryHasuraGraphQLRepository, CategoryProduct, CategoryProductHasuraGraphQLRepository, Checkout, CheckoutFirestoreRepository, CheckoutSubscription, CheckoutSubscriptionFirestoreRepository, CheckoutTypes, ClassNameHelper, ConnectBaseDocumentSnapshot, ConnectCollectionService, ConnectDocumentService, ConnectFirestoreService, Coupon, CouponCategories, CouponCategory, CouponChannels, CouponFirestoreRepository, CouponOldCategories, CouponSubtypes, CouponTypes, Debug, DebugDecoratorHelper, DebugHelper, DebugNamespaces, DuplicatedResultsError, Edition, EditionStatus, ErrorsCode, Exclusivities, FaceSkinOilinesses, FaceSkinProblems, FaceSkinTones, FamilyIncomes, Filter, FilterHasuraGraphQLRepository, FilterOption, FilterOptionHasuraGraphQLRepository, FilterType, FirebaseFileUploaderService, FragranceImportances, FraudValidationError, GenderDestination, GlampointsPaymentMethodFactory, GlampointsPaymentService, Group, GroupFirestoreRepository, HairColors, HairProblems, HairStrands, HairTypes, Home, HomeFirestoreRepository, InvalidArgumentError, InvalidCheckoutError, KitProduct, KitProductHasuraGraphQL, Lead, LeadFirestoreRepository, LegacyOrderFirestoreRepository, LineItem, Log, LogDocument, LogFirestoreRepository, Logger, MercadoPagoBankSlipAxiosAdapter, MercadoPagoCardAxiosAdapter, MercadoPagoErrorHelper, MercadoPagoPaymentMethodFactory, MercadoPagoPixAxiosAdapter, MercadoPagoRequestHelper, MercadoPagoResponseHelper, MercadoPagoStatusDetailEnum, MercadoPagoStatusEnum, NotFoundError, ObsEmitter, OfficePosition, Order, OrderBlocked, OrderBlockedFirestoreRepository, OrderBlockedType, OrderFirestoreRepository, OrderPaymentStatus, OrderStatus, PagarMeV5OrderStatus, PagarMeV5PaymentStatus, PagarmeBankSlipAxiosAdapter, PagarmeCardAxiosAdapter, PagarmePaymentMethodFactory, PagarmePaymentStatus, PagarmePixAxiosAdapter, PagarmeV5BankSlipAxiosAdapter, PagarmeV5BaseAxiosAdapter, PagarmeV5CardAxiosAdapter, PagarmeV5PixAxiosAdapter, Payment, PaymentError, PaymentFirestoreRepository, PaymentMethods, PaymentProviderFactory, PaymentProviders, PaymentTransaction, PaymentType, PersonTypes, Plans, Product, ProductCatalogHasuraGraphQL, ProductCatalogHasuraGraphQLRepository, ProductErrors, ProductErrorsHasuraGraphQL, ProductErrorsHasuraGraphQLRepository, ProductFirestoreRepository, ProductGroup, ProductGroupHasuraGraphQLRepository, ProductHasuraGraphQL, ProductHasuraGraphQLRepository, ProductLabelEnum, ProductPriceLog, ProductPriceLogHasuraGraphQLRepository, ProductReview, ProductReviewHasuraGraphQLRepository, ProductSpents, ProductStockEntry, ProductStockEntryHasuraGraphQL, ProductStockEntryHasuraGraphQLRepository, ProductStockNotification, ProductStockNotificationHasuraGraphQLRepository, ProductVariantFirestoreRepository, ProductsIndex, ProductsVertexSearch, QuestionsFilters, RecoveryPassword, ReflectHelper, Register, RegisterFirebaseAuthService, RequiredArgumentError, RestCacheAdapter, RoundProductPricesHelper, Sequence, SequenceFirestoreRepository, ShippingMethod, ShopConfigs, ShopConfigsFirestoreRepository, ShopMenu, ShopMenuFirestoreRepository, ShopPageName, ShopSettings, ShopSettingsFirestoreRepository, ShoppingRecurrence, ShoppingRecurrenceCycle, ShoppingRecurrenceEdition, ShoppingRecurrenceEditionFirestoreRepository, ShoppingRecurrenceEditionStatus, ShoppingRecurrenceFirestoreRepository, ShoppingRecurrenceStatus, Shops, SignInMethods, SignOut, Status, StockLimitError, StockOutError, Subscription, SubscriptionEditionFirestoreRepository, SubscriptionFirestoreRepository, SubscriptionMaterialization, SubscriptionMaterializationFirestoreRepository, SubscriptionPayment, SubscriptionPaymentFirestoreRepository, SubscriptionPlan, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, SubscriptionSummary, SubscriptionSummaryFirestoreRepository, Trace, TransactionPaymentMethods, UnauthorizedError, UpdateOptionActions, UpdateUserImage, User, UserAddress, UserAddressFirestoreRepository, UserAlreadyRegisteredError, UserBeautyProfileFirestoreRepository, UserFirestoreRepository, UserPaymentMethod, UserPaymentMethodFirestoreRepository, UserType, Variant, VariantHasuraGraphQL, VariantHasuraGraphQLRepository, VertexAxiosAdapter, WeakPasswordError, Where, Wishlist, WishlistHasuraGraphQLRepository, WishlistLogType, deserialize, getClass, is, isDebuggable, isUUID, parseDateTime, registerClass, resolveClass, serialize, withCreateFirestore, withCreateHasuraGraphQL, withCrudFirestore, withCrudHasuraGraphQL, withDeleteFirestore, withDeleteHasuraGraphQL, withFindFirestore, withFindHasuraGraphQL, withFirestore, withGetFirestore, withGetHasuraGraphQL, withHasuraGraphQL, withHelpers, withSubCollection, withUpdateFirestore, withUpdateHasuraGraphQL };
|
|
11543
|
+
export { AccessoryImportances, Address, AdyenCardAxiosAdapter, AdyenPaymentMethodFactory, AntifraudBankSlipService, AntifraudCardService, AntifraudGlampointsService, AntifraudPixService, AntifraudProviderFactory, AntifraudProviders, Area, Authentication, AuthenticationFirebaseAuthService, AxiosAdapter, Base, BaseModel, BeardProblems, BeardSizes, BeautyProductImportances, BeautyProfile, BeautyQuestionsHelper, BillingStatus, BodyProblems, BodyShapes, BodyTattoos, BrandCategory, BrandCategoryFirestoreRepository, BrandEquityOptions, BusinessError, BusinessUnitEnum, Buy2Win, Buy2WinFirestoreRepository, Campaign, CampaignBanner, CampaignDashboard, CampaignDashboardFirestoreRepository, CampaignHashtag, CampaignHashtagFirestoreRepository, Category, CategoryCollectionChildren, CategoryCollectionChildrenHasuraGraphQLRepository, CategoryFilter, CategoryFilterHasuraGraphQLRepository, CategoryFirestoreRepository, CategoryHasuraGraphQL, CategoryHasuraGraphQLRepository, CategoryProduct, CategoryProductHasuraGraphQLRepository, Checkout, CheckoutFirestoreRepository, CheckoutSubscription, CheckoutSubscriptionFirestoreRepository, CheckoutTypes, ClassNameHelper, ConnectBaseDocumentSnapshot, ConnectCollectionService, ConnectDocumentService, ConnectFirestoreService, Coupon, CouponCategories, CouponCategory, CouponChannels, CouponFirestoreRepository, CouponOldCategories, CouponSubtypes, CouponTypes, Debug, DebugDecoratorHelper, DebugHelper, DebugNamespaces, DuplicatedResultsError, Edition, EditionStatus, ErrorsCode, Exclusivities, FaceSkinOilinesses, FaceSkinProblems, FaceSkinTones, FamilyIncomes, Filter, FilterHasuraGraphQLRepository, FilterOption, FilterOptionHasuraGraphQLRepository, FilterType, FirebaseFileUploaderService, FragranceImportances, FraudValidationError, GenderDestination, GlampointsPaymentMethodFactory, GlampointsPaymentService, Group, GroupFirestoreRepository, HairColors, HairProblems, HairStrands, HairTypes, Home, HomeFirestoreRepository, InvalidArgumentError, InvalidCheckoutError, KitProduct, KitProductHasuraGraphQL, Lead, LeadFirestoreRepository, LegacyOrderFirestoreRepository, LineItem, Log, LogDocument, LogFirestoreRepository, Logger, MercadoPagoBankSlipAxiosAdapter, MercadoPagoCardAxiosAdapter, MercadoPagoErrorHelper, MercadoPagoPaymentMethodFactory, MercadoPagoPixAxiosAdapter, MercadoPagoRequestHelper, MercadoPagoResponseHelper, MercadoPagoStatusDetailEnum, MercadoPagoStatusEnum, NotFoundError, ObsEmitter, OfficePosition, Order, OrderBlocked, OrderBlockedFirestoreRepository, OrderBlockedType, OrderFirestoreRepository, OrderPaymentStatus, OrderStatus, PagarMeV5OrderStatus, PagarMeV5PaymentStatus, PagarmeBankSlipAxiosAdapter, PagarmeCardAxiosAdapter, PagarmePaymentMethodFactory, PagarmePaymentStatus, PagarmePixAxiosAdapter, PagarmeV5BankSlipAxiosAdapter, PagarmeV5BaseAxiosAdapter, PagarmeV5CardAxiosAdapter, PagarmeV5PixAxiosAdapter, Payment, PaymentError, PaymentFirestoreRepository, PaymentMethods, PaymentProviderFactory, PaymentProviders, PaymentTransaction, PaymentType, PersonTypes, Plans, Product, ProductCatalogHasuraGraphQL, ProductCatalogHasuraGraphQLRepository, ProductErrors, ProductErrorsHasuraGraphQL, ProductErrorsHasuraGraphQLRepository, ProductFirestoreRepository, ProductGroup, ProductGroupHasuraGraphQLRepository, ProductHasuraGraphQL, ProductHasuraGraphQLRepository, ProductLabelEnum, ProductPriceLog, ProductPriceLogHasuraGraphQLRepository, ProductReview, ProductReviewHasuraGraphQLRepository, ProductSpents, ProductStockEntry, ProductStockEntryHasuraGraphQL, ProductStockEntryHasuraGraphQLRepository, ProductStockNotification, ProductStockNotificationHasuraGraphQLRepository, ProductVariantFirestoreRepository, ProductsIndex, ProductsVertexSearch, QuestionsFilters, RecoveryPassword, ReflectHelper, Register, RegisterFirebaseAuthService, RequiredArgumentError, RestCacheAdapter, RoundProductPricesHelper, Sequence, SequenceFirestoreRepository, ShippingMethod, ShopConfigs, ShopConfigsFirestoreRepository, ShopMenu, ShopMenuFirestoreRepository, ShopPageName, ShopSettings, ShopSettingsFirestoreRepository, ShoppingRecurrence, ShoppingRecurrenceCycle, ShoppingRecurrenceEdition, ShoppingRecurrenceEditionFirestoreRepository, ShoppingRecurrenceEditionStatus, ShoppingRecurrenceErrorLog, ShoppingRecurrenceErrorLogFirestoreRepository, ShoppingRecurrenceFirestoreRepository, ShoppingRecurrenceStatus, Shops, SignInMethods, SignOut, Status, StockLimitError, StockOutError, Subscription, SubscriptionEditionFirestoreRepository, SubscriptionFirestoreRepository, SubscriptionMaterialization, SubscriptionMaterializationFirestoreRepository, SubscriptionPayment, SubscriptionPaymentFirestoreRepository, SubscriptionPlan, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, SubscriptionSummary, SubscriptionSummaryFirestoreRepository, Trace, TransactionPaymentMethods, UnauthorizedError, UpdateOptionActions, UpdateUserImage, User, UserAddress, UserAddressFirestoreRepository, UserAlreadyRegisteredError, UserBeautyProfileFirestoreRepository, UserFirestoreRepository, UserPaymentMethod, UserPaymentMethodFirestoreRepository, UserType, Variant, VariantHasuraGraphQL, VariantHasuraGraphQLRepository, VertexAxiosAdapter, WeakPasswordError, Where, Wishlist, WishlistHasuraGraphQLRepository, WishlistLogType, deserialize, getClass, is, isDebuggable, isUUID, parseDateTime, registerClass, resolveClass, serialize, toCents, withCreateFirestore, withCreateHasuraGraphQL, withCrudFirestore, withCrudHasuraGraphQL, withDeleteFirestore, withDeleteHasuraGraphQL, withFindFirestore, withFindHasuraGraphQL, withFirestore, withGetFirestore, withGetHasuraGraphQL, withHasuraGraphQL, withHelpers, withSubCollection, withUpdateFirestore, withUpdateHasuraGraphQL };
|
package/package.json
CHANGED
|
@@ -46,7 +46,19 @@ export declare class Category extends BaseModel<Category> {
|
|
|
46
46
|
brandBanner: string;
|
|
47
47
|
brandBannerMobile: string;
|
|
48
48
|
};
|
|
49
|
+
get glamBeautyImages(): {
|
|
50
|
+
image: string;
|
|
51
|
+
brandBanner: string;
|
|
52
|
+
brandBannerMobile: string;
|
|
53
|
+
};
|
|
54
|
+
get ellaImages(): {
|
|
55
|
+
image: string;
|
|
56
|
+
brandBanner: string;
|
|
57
|
+
brandBannerMobile: string;
|
|
58
|
+
};
|
|
49
59
|
get glamMetadata(): CategoryMetadata;
|
|
50
60
|
get mensMetadata(): CategoryMetadata;
|
|
61
|
+
get glamBeautyMetadata(): CategoryMetadata;
|
|
62
|
+
get ellaMetadata(): CategoryMetadata;
|
|
51
63
|
getMostRelevantByShop(shop: Shops): string[];
|
|
52
64
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseModel, GenericIdentifier } from '../../../generic/model/base.model';
|
|
2
|
+
import { CreateShoppingRecurrencyPayload } from '../../types/create-recurrency-payload.type';
|
|
3
|
+
export declare class ShoppingRecurrenceErrorLog extends BaseModel<ShoppingRecurrenceErrorLog> {
|
|
4
|
+
id: string;
|
|
5
|
+
payload: CreateShoppingRecurrencyPayload;
|
|
6
|
+
error?: unknown;
|
|
7
|
+
createdAt: Date;
|
|
8
|
+
static get identifiersFields(): GenericIdentifier[];
|
|
9
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ShoppingRecurrenceCycle } from '../models';
|
|
1
|
+
import { ShoppingRecurrenceCycle } from '../models/enums/shopping-recurrence-cycle.enum';
|
|
2
2
|
import { PaymentCardInfo } from './payment-card-info.type';
|
|
3
3
|
export type CreateShoppingRecurrencyPayload = {
|
|
4
4
|
shopId: string;
|
|
@@ -9,5 +9,6 @@ export * from './order-blocked-firestore.repository';
|
|
|
9
9
|
export * from './order-firestore.repository';
|
|
10
10
|
export * from './payment-firestore.repository';
|
|
11
11
|
export * from './shopping-recurrence-edition-firestore.repository';
|
|
12
|
+
export * from './shopping-recurrence-error-log-firestore.repository';
|
|
12
13
|
export * from './shopping-recurrence-firestore.repository';
|
|
13
14
|
export * from './subscription-plan-firestore.repository';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ShoppingRecurrenceErrorLog, ShoppingRecurrenceErrorLogRepository } from '../../../../../domain';
|
|
2
|
+
import { FirestoreConstructorParams } from '../../mixins';
|
|
3
|
+
declare const ShoppingRecurrenceErrorLogFirestoreRepository_base: import("../../../../..").MixinCtor<import("../..").FirestoreRepository<ShoppingRecurrenceErrorLog> & import("../../../../..").CrudRepository<ShoppingRecurrenceErrorLog, import("../../../../..").CrudParams<ShoppingRecurrenceErrorLog>> & import("../..").FirestoreHelpers, [FirestoreConstructorParams<ShoppingRecurrenceErrorLog>, ...any[]]>;
|
|
4
|
+
export declare class ShoppingRecurrenceErrorLogFirestoreRepository extends ShoppingRecurrenceErrorLogFirestoreRepository_base implements ShoppingRecurrenceErrorLogRepository {
|
|
5
|
+
constructor({ firestore, interceptors, cache, }: Pick<FirestoreConstructorParams<ShoppingRecurrenceErrorLog>, 'firestore' | 'interceptors' | 'cache'>);
|
|
6
|
+
}
|
|
7
|
+
export {};
|
package/src/utils/index.d.ts
CHANGED
|
@@ -13,5 +13,6 @@ export * from './mixins';
|
|
|
13
13
|
export * from './obs-emitter';
|
|
14
14
|
export * from './parse-datetime';
|
|
15
15
|
export * from './serialize';
|
|
16
|
+
export * from './to-cents';
|
|
16
17
|
export * from './types';
|
|
17
18
|
export { add, addBusinessDays, addHours, addDays, addMonths, addYears, formatInTimeZone, chunk, each, endOfDay, format, formatISO9075, get, isBoolean, isDate, isEmpty, isInteger, isNaN, isNil, isNumber, isObject, isString, now, omit, parseISO, pick, set, sortBy, startOfDay, sub, subDays, unset, };
|