@infrab4a/connect 0.7.3 → 0.7.5

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.
@@ -16,4 +16,4 @@ __decorate([
16
16
  Expose({ name: 'exclusivity_type' }),
17
17
  __metadata("design:type", Number)
18
18
  ], Coupon.prototype, "exclusivityType", void 0);
19
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY291cG9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29ubmVjdC9zcmMvbGliL2RvbWFpbi9zaG9wcGluZy9tb2RlbHMvY291cG9ucy9jb3Vwb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQTtBQUUxQyxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sbUNBQW1DLENBQUE7QUFDN0QsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLDhCQUE4QixDQUFBO0FBSzVELE9BQU8sRUFBZSxhQUFhLEVBQUUsTUFBTSxTQUFTLENBQUE7QUFFcEQsTUFBTSxPQUFPLE1BQU8sU0FBUSxTQUFpQjtJQXFCM0MsZ0JBQWdCO1FBQ2QsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFBO0lBQ2YsQ0FBQztDQUNGO0FBUEM7SUFEQyxNQUFNLENBQUMsRUFBRSxJQUFJLEVBQUUsZUFBZSxFQUFFLENBQUM7OzRDQUNQO0FBRTNCO0lBREMsTUFBTSxDQUFDLEVBQUUsSUFBSSxFQUFFLGtCQUFrQixFQUFFLENBQUM7OytDQUNOIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgRXhwb3NlIH0gZnJvbSAnY2xhc3MtdHJhbnNmb3JtZXInXG5cbmltcG9ydCB7IEJh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VhblxuXG4gIEBFeHBvc2UoeyBuYW1lOiAnY2hlY2tvdXRfdHlwZScgfSlcbiAgY2hlY2tvdXRUeXBlOiBDaGVja291dFR5cGVzXG4gIEBFeHBvc2UoeyBuYW1lOiAnZXhjbHVzaXZpdHlfdHlwZScgfSlcbiAgZXhjbHVzaXZpdHlUeXBlPzogRXhjbHVzaXZpdGllc1xuXG4gIGlkZW50aWZpZXJGaWVsZHMoKTogTm9uRnVuY3Rpb25Qcm9wZXJ0eU5hbWVzPENvdXBvbj5bXSB7XG4gICAgcmV0dXJuIFsnaWQnXVxuICB9XG59XG4iXX0=
@@ -61,8 +61,12 @@ export class CategoryFirestoreRepository extends withCrudFirestore(withHelpers(w
61
61
  return resultArray;
62
62
  }, []);
63
63
  const products = [];
64
+ const publishedField = category.shop === Shops.GLAMSHOP ? 'publishedGlam' : 'published';
64
65
  for (const productIds of chunks) {
65
- const productSnap = yield this.collection('products').where('id', 'in', productIds).get();
66
+ const productSnap = yield this.collection('products')
67
+ .where(publishedField, '==', true)
68
+ .where('id', 'in', productIds)
69
+ .get();
66
70
  if (productSnap.empty)
67
71
  continue;
68
72
  products.push(...productSnap.docs.map((doc) => doc.data()));
@@ -71,4 +75,4 @@ export class CategoryFirestoreRepository extends withCrudFirestore(withHelpers(w
71
75
  });
72
76
  }
73
77
  }
74
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2F0ZWdvcnktZmlyZXN0b3JlLnJlcG9zaXRvcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb25uZWN0L3NyYy9saWIvaW5mcmEvZmlyZWJhc2UvZmlyZXN0b3JlL3JlcG9zaXRvcmllcy9jYXRhbG9nL2NhdGVnb3J5LWZpcmVzdG9yZS5yZXBvc2l0b3J5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFFQSxP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yA6ICdwdWJsaXNoZWQnXG5cbiAgICBmb3IgKGNvbnN0IHByb2R1Y3RJZHMgb2YgY2h1bmtzKSB7XG4gICAgICBjb25zdCBwcm9kdWN0U25hcCA9IGF3YWl0IHRoaXMuY29sbGVjdGlvbigncHJvZHVjdHMnKVxuICAgICAgICAud2hlcmUocHVibGlzaGVkRmllbGQsICc9PScsIHRydWUpXG4gICAgICAgIC53aGVyZSgnaWQnLCAnaW4nLCBwcm9kdWN0SWRzKVxuICAgICAgICAuZ2V0KClcblxuICAgICAgaWYgKHByb2R1Y3RTbmFwLmVtcHR5KSBjb250aW51ZVxuXG4gICAgICBwcm9kdWN0cy5wdXNoKC4uLnByb2R1Y3RTbmFwLmRvY3MubWFwKChkb2MpID0+IGRvYy5kYXRhKCkpKVxuICAgIH1cblxuICAgIHJldHVybiBwcm9kdWN0c1xuICB9XG59XG4iXX0=
@@ -1057,8 +1057,12 @@ class CategoryFirestoreRepository extends withCrudFirestore(withHelpers(withFire
1057
1057
  return resultArray;
1058
1058
  }, []);
1059
1059
  const products = [];
1060
+ const publishedField = category.shop === Shops.GLAMSHOP ? 'publishedGlam' : 'published';
1060
1061
  for (const productIds of chunks) {
1061
- const productSnap = yield this.collection('products').where('id', 'in', productIds).get();
1062
+ const productSnap = yield this.collection('products')
1063
+ .where(publishedField, '==', true)
1064
+ .where('id', 'in', productIds)
1065
+ .get();
1062
1066
  if (productSnap.empty)
1063
1067
  continue;
1064
1068
  products.push(...productSnap.docs.map((doc) => doc.data()));
@@ -1 +1 @@
1
- {"version":3,"file":"infrab4a-connect.js","sources":["../../../projects/connect/src/lib/domain/general/model/base.model.ts","../../../projects/connect/src/lib/domain/general/repository/enums/where.enum.ts","../../../projects/connect/src/lib/domain/general/repository/enums/update-option-actions.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/user-type.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/beard-sizes.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/hair-types.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/area.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/office-position.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/enums/billing-status.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/enums/edition-status.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/enums/payment-type.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/enums/status.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/edition.ts","../../../projects/connect/src/lib/domain/shopping/models/payment.ts","../../../projects/connect/src/lib/domain/users/models/subscription/payment.ts","../../../projects/connect/src/lib/domain/location/models/address.ts","../../../projects/connect/src/lib/domain/shopping/models/enums/checkout-types.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/enums/coupon-types.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/enums/coupon-subtypes.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/enums/exclusivities.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/coupon.ts","../../../projects/connect/src/lib/domain/shopping/models/subscription/plan.ts","../../../projects/connect/src/lib/utils/mixins/base.mixin.ts","../../../projects/connect/src/lib/domain/users/models/beauty-profile.ts","../../../projects/connect/src/lib/domain/users/models/user.ts","../../../projects/connect/src/lib/domain/users/models/subscription/subscription.ts","../../../projects/connect/src/lib/domain/users/models/user-address.ts","../../../projects/connect/src/lib/domain/users/errors/unauthorized.error.ts","../../../projects/connect/src/lib/domain/users/use-cases/authentication.ts","../../../projects/connect/src/lib/domain/users/use-cases/signout.ts","../../../projects/connect/src/lib/domain/catalog/models/enums/shops.enum.ts","../../../projects/connect/src/lib/domain/catalog/models/category.ts","../../../projects/connect/src/lib/domain/catalog/models/product.ts","../../../projects/connect/src/lib/domain/catalog/models/variant.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/financial-coupon.ts","../../../projects/connect/src/lib/domain/shopping/models/enums/order-status.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/line-item.ts","../../../projects/connect/src/lib/domain/shopping/models/shipping-method.ts","../../../projects/connect/src/lib/domain/shopping/models/checkout.ts","../../../projects/connect/src/lib/domain/shopping/models/order.ts","../../../projects/connect/src/lib/domain/shopping/models/subscription/checkout.ts","../../../projects/connect/src/lib/domain/shopping/models/buy-2-win.ts","../../../projects/connect/src/lib/domain/shop-settings/models/home.ts","../../../projects/connect/src/lib/domain/shop-settings/models/shop-menu.ts","../../../projects/connect/src/lib/errors/invalid-argument.error.ts","../../../projects/connect/src/lib/errors/required-argument.error.ts","../../../projects/connect/src/lib/errors/not-found.error.ts","../../../projects/connect/src/lib/errors/duplicated-results.error.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-helpers.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-get-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-find-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-create-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-update-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-delete-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-sub-collection.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-crud-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/subscription-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/user-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/subscription-edition-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/user-beauty-profile-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/user-address-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/subscription-payment-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/catalog/category-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/catalog/product-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/catalog/product-variant-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/checkout-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/coupon-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/order-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/payment-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/checkout-subscription-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/subscription-plan-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shop-settings/home-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shop-settings/shop-menu-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/auth/authentication-firebase-auth.service.ts","../../../projects/connect/src/infrab4a-connect.ts"],"sourcesContent":["import { plainToClass, classToPlain } from 'class-transformer'\n\nimport { NonFunctionProperties } from './types/non-function-properties.type'\n\nexport class BaseModel<Model> {\n constructor(args?: Partial<Model>) {\n Object.assign(this, args)\n }\n\n static toInstance<T>(this: new () => Partial<T>, data: NonFunctionProperties<T>): T {\n return plainToClass(this, data) as any\n }\n\n toPlain(): any {\n return classToPlain(this, { exposeUnsetFields: false })\n }\n}\n","export enum Where {\n EQUALS = '==',\n GT = '>',\n GTE = '>=',\n IN = 'in',\n LT = '<',\n LTE = '<=',\n LIKE = 'like',\n}\n","export enum UpdateOptionActions {\n UPDATE = 'update',\n MERGE = 'merge',\n REMOVE = 'remove',\n REMOVE_FIELD = 'removeField',\n NULL = 'null',\n}\n","export enum UserType {\n B2C = 'Cliente Transacional',\n GlamGirl = 'Glamgirl',\n MensBoy = 'Mensboy',\n B2B = 'Company',\n Collaborator = 'Funcionário',\n Influencer = 'Influencer',\n}\n","export enum BeardSizes {\n BIG = 'Grande',\n MEDIUM = 'Média',\n SHORT = 'Curta',\n MUSTACHE = 'Bigode',\n NOTHING = 'Sem Barba',\n}\n","export enum HairTypes {\n Smooth = 'Liso',\n WAVY = 'Ondulado',\n CURLY = 'Cacheado',\n FRIZZY = 'Crespo',\n BALD = 'Sou careca',\n}\n","export enum Area {\n GP = 'Geral',\n CRM = 'CRM',\n MediaProd = 'Media Production',\n Tech = 'Tecnologia',\n Transactional = 'Transacional',\n Operations = 'Opera\\u00E7\\u00F5es',\n Sales = 'Comercial',\n Finantial = 'Financeiro',\n HR = 'RH',\n}\n","export enum OfficePosition {\n Intern = 'Estagi\\u00E1rio',\n Analyst = 'Analista',\n Manager = 'Gerente',\n Director = 'Diretor',\n}\n","export enum BillingStatus {\n PAYED = 'PAGO',\n}\n","export enum EditionStatus {\n ALLOCATION_WAITING = 'Aguardando alocação',\n}\n","export enum PaymentType {\n AQUISITION = 'Aquisição',\n RENEWAL = 'Renovação',\n FREIGHT = 'mudança de endereço, Frete',\n}\n","export enum Status {\n ACTIVE = 'active',\n}\n","import { BaseModel } from '../../../general/model/base.model'\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../../general/model/types/non-function-property-name.type'\n\nimport { EditionStatus, BillingStatus } from './enums'\n\nexport class Edition extends BaseModel<Edition> implements IdentifierFields<Edition> {\n id: string\n subscriptionId: string\n billingStatus: BillingStatus\n editionId: number\n editionStatus: EditionStatus\n installment: number\n paymentId: string\n draftId?: string\n\n identifierFields(): NonFunctionPropertyNames<Edition>[] {\n return ['id']\n }\n}\n","import { Expose } from 'class-transformer'\n\nimport { BaseModel } from '../../general/model/base.model'\nimport { IdentifierFields } from '../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../general/model/types'\n\nimport { PaymentBilling, PaymentCard, PaymentCustomer, PaymentItem, PaymentShipping } from './types'\n\nexport class Payment extends BaseModel<Payment> implements IdentifierFields<Payment> {\n id: number\n object: string\n status: string\n tid: number\n nsu: number\n amount: number\n cost: number\n installments: number\n referer: string\n ip: string\n phone: string\n address: string\n metadata: any\n device: string\n payment: string\n addition: string\n discount: string\n customer: PaymentCustomer\n billing: PaymentBilling\n shipping: PaymentShipping\n items: PaymentItem[]\n card: PaymentCard\n\n @Expose({ name: 'refuse_reason' })\n refuseReason: string\n @Expose({ name: 'status_reason' })\n statusReason: string\n @Expose({ name: 'acquirer_response_code' })\n acquirerResponseCode: string\n @Expose({ name: 'acquirer_name' })\n acquirerName: string\n @Expose({ name: 'acquirer_id' })\n acquirerId: string\n @Expose({ name: 'authorization_code' })\n authorizationCode: string\n @Expose({ name: 'soft_descriptor' })\n softDescriptor: string\n @Expose({ name: 'date_created' })\n dateCreated: string\n @Expose({ name: 'date_updated' })\n dateUpdated: string\n @Expose({ name: 'authorized_amount' })\n authorizedAmount: number\n @Expose({ name: 'paid_amount' })\n paidAmount: number\n @Expose({ name: 'refunded_amount' })\n refundedAmount: number\n @Expose({ name: 'card_holder_name' })\n cardHolderName: string\n @Expose({ name: 'card_last_digits' })\n cardLastDigits: string\n @Expose({ name: 'card_first_digits' })\n cardFirstDigits: string\n @Expose({ name: 'card_brand' })\n cardBrand: string\n @Expose({ name: 'card_pin_mode' })\n cardPinMode: string\n @Expose({ name: 'card_magstripe_fallback' })\n cardMagstripeFallback: boolean\n @Expose({ name: 'cvm_pin' })\n cvmPin: boolean\n @Expose({ name: 'postback_url' })\n postbackUrl: string\n @Expose({ name: 'payment_method' })\n paymentMethod: string\n @Expose({ name: 'capture_method' })\n captureMethod: string\n @Expose({ name: 'antifraud_score' })\n antifraudScore: string\n @Expose({ name: 'boleto_url' })\n boletoUrl: string\n @Expose({ name: 'boleto_barcode' })\n boletoBarcode: string\n @Expose({ name: 'boleto_expiration_date' })\n boletoExpirationDate: string\n @Expose({ name: 'subscription_id' })\n subscriptionId: string\n @Expose({ name: 'split_rules' })\n splitRules: string\n @Expose({ name: 'antifraud_metadata' })\n antifraudMetadata: any\n @Expose({ name: 'reference_key' })\n referenceKey: string\n @Expose({ name: 'local_transaction_id' })\n localTransactionId: string\n @Expose({ name: 'local_time' })\n localTime: string\n @Expose({ name: 'fraud_covered' })\n fraudCovered: boolean\n @Expose({ name: 'fraud_reimbursed' })\n fraudReimbursed: string\n @Expose({ name: 'order_id' })\n orderId: string\n @Expose({ name: 'risk_level' })\n riskLevel: string\n @Expose({ name: 'receipt_url' })\n receiptUrl: string\n @Expose({ name: 'private_label' })\n privateLabel: string\n @Expose({ name: 'pix_qr_code' })\n pixQrCode: string\n @Expose({ name: 'pix_expiration_date' })\n pixExpirationDate: string\n\n identifierFields(): NonFunctionPropertyNames<Payment>[] {\n return ['id']\n }\n}\n","import { Type } from 'class-transformer'\n\nimport { BaseModel } from '../../../general/model/base.model'\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../../general/model/types'\nimport { Payment } from '../../../shopping/models/payment'\n\nimport { PaymentType } from './enums/payment-type.enum'\n\nexport class SubscriptionPayment\n extends BaseModel<SubscriptionPayment>\n implements IdentifierFields<SubscriptionPayment>\n{\n id: string\n subscriptionId: string\n paymentType: PaymentType\n createdAt: Date\n attempts?: number\n\n @Type(() => Payment)\n payment: Payment\n\n identifierFields(): NonFunctionPropertyNames<SubscriptionPayment>[] {\n return ['id']\n }\n}\n","import { BaseModel } from '../../general/model/base.model'\n\nimport { LocationGeometry } from './types/location-geometry.type'\n\nexport abstract class Address extends BaseModel<Address> {\n default?: boolean\n recipient?: string\n zip?: string\n street?: string\n number?: string\n extension?: string\n district?: string\n city?: string\n regionalPole?: string\n region?: string\n state?: string\n country?: string\n mailbox?: boolean\n mailboxNumber?: string\n formattedAddress?: string\n placeId?: string\n geometry?: LocationGeometry\n}\n","export enum CheckoutTypes {\n ECOMMERCE = 1,\n SUBSCRIPTION = 2,\n}\n","export enum CouponTypes {\n FINANCIAL = 1,\n PRODUCT,\n GIFTCARD,\n VOUCHER,\n}\n","export enum CouponSubtypes {\n ABSOLUTE = 1,\n PERCENTAGE,\n}\n","export enum Exclusivities {\n ALL_USERS = 1,\n SPECIFIC_USER = 2,\n COLLABORATORS = 3,\n}\n","import { Expose } from 'class-transformer'\n\nimport { BaseModel } from '../../../general/model/base.model'\nimport { CheckoutTypes } from '../enums/checkout-types.enum'\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../../general/model/types'\nimport { Shops } from '../../../catalog/models/enums/shops.enum'\n\nimport { CouponTypes, Exclusivities } from './enums'\n\nexport class Coupon extends BaseModel<Coupon> implements IdentifierFields<Coupon> {\n id: string\n type: CouponTypes\n discount?: number\n user?: string\n recipient?: string\n store?: Shops\n campaign?: string\n name: string\n nickname: string\n expiresIn?: Date\n useLimit?: number\n createdAt: Date\n updatedAt?: Date\n shopAvailability: Shops\n\n @Expose({ name: 'checkout_type' })\n checkoutType: CheckoutTypes\n @Expose({ name: 'exclusivity_type' })\n exclusivityType?: Exclusivities\n\n identifierFields(): NonFunctionPropertyNames<Coupon>[] {\n return ['id']\n }\n}\n","import { BaseModel } from '../../../general/model/base.model'\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../../general/model/types'\n\nexport class SubscriptionPlan extends BaseModel<SubscriptionPlan> implements IdentifierFields<SubscriptionPlan> {\n id: string\n name: string\n billingPrice: number\n recurrencePrice: number\n recurrenceCycle: number\n maxAttempts: number\n\n identifierFields(): NonFunctionPropertyNames<SubscriptionPlan>[] {\n return ['id']\n }\n}\n","export class Base {\n constructor(...args: Array<any>) {\n Object.assign(this, ...args)\n }\n}\n","import { BaseModel } from '../../general/model/base.model'\nimport { IdentifierFields } from '../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../general/model/types/non-function-property-name.type'\n\nimport { BeardSizes, HairTypes } from './enums'\n\nexport class BeautyProfile extends BaseModel<BeautyProfile> implements IdentifierFields<BeautyProfile> {\n id: string\n userId: string\n beardSize?: BeardSizes\n hairType?: HairTypes\n\n toPlain(): any {\n const plain = super.toPlain()\n\n delete plain.id\n\n return plain\n }\n\n identifierFields(): NonFunctionPropertyNames<BeautyProfile>[] {\n return ['id']\n }\n}\n","import { Type } from 'class-transformer'\n\nimport { BaseModel } from '../../general/model/base.model'\nimport { IdentifierFields } from '../../general/model/identifier-fields'\nimport { isNil } from '../../..//utils'\nimport { NonFunctionProperties, NonFunctionPropertyNames } from '../../general/model/types'\n\nimport { Area, OfficePosition, UserType } from './enums'\nimport { BeautyProfile } from './beauty-profile'\n\nexport class User extends BaseModel<User> implements IdentifierFields<User> {\n id: string\n cpf?: string\n email: string\n firstName: string\n lastName: string\n displayName?: string\n phone: string\n birthday?: Date\n acceptsNewsletter: boolean\n type?: UserType\n area?: Area\n officePosition?: OfficePosition\n isSubscriber?: boolean\n\n @Type(() => BeautyProfile)\n beautyProfile?: BeautyProfile\n\n static toInstance<T>(this: new () => Partial<T>, data: NonFunctionProperties<T> & NonFunctionProperties<User>): T {\n const instance = super.toInstance<User>(data)\n\n if (!isNil(data.firstName))\n instance.displayName = `${data.firstName}${!isNil(data.lastName) ? ` ${data.lastName}` : ''}`\n\n return instance as any\n }\n\n identifierFields(): NonFunctionPropertyNames<User>[] {\n return ['id']\n }\n\n toPlain(): any {\n const plain = super.toPlain()\n\n delete plain.beautyProfile\n\n return plain\n }\n}\n","import { Type } from 'class-transformer'\n\nimport { Address } from '../../../location/models/address'\nimport { BaseModel } from '../../../general/model/base.model'\nimport { Coupon } from '../../../shopping/models/coupons/coupon'\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../../general/model/types/non-function-property-name.type'\nimport { SubscriptionPlan } from '../../../shopping/models/subscription/plan'\nimport { User } from '../user'\n\nimport { Edition } from './edition'\nimport { Status } from './enums/status.enum'\nimport { SubscriptionPayment } from './payment'\n\nexport class Subscription extends BaseModel<Subscription> implements IdentifierFields<Subscription> {\n id: string\n nextPayment: Date\n recurrence: boolean\n status: Status\n cardToken: string\n subtotalPrice?: number\n discount?: number\n totalPrice?: number\n createdAt: Date\n updatedAt: Date\n\n @Type(() => User)\n user: User\n @Type(() => SubscriptionPlan)\n subscriptionPlan: SubscriptionPlan\n @Type(() => Address)\n shippingAddress: Address\n @Type(() => Address)\n billingAddress?: Address\n @Type(() => Coupon)\n coupon?: Coupon\n @Type(() => Edition)\n editions: Edition[]\n @Type(() => SubscriptionPayment)\n payment?: SubscriptionPayment[]\n\n identifierFields(): NonFunctionPropertyNames<Subscription>[] {\n return ['id']\n }\n}\n","import { Address } from '../../location/models/address'\nimport { NonFunctionPropertyNames } from '../../general/model/types/non-function-property-name.type'\n\nexport class UserAddress extends Address {\n id: string\n userId: string\n\n identifierFields(): NonFunctionPropertyNames<UserAddress>[] {\n return ['id']\n }\n}\n","export class UnauthorizedError extends Error {\n constructor(readonly message) {\n super(message)\n }\n}\n","import { Area, OfficePosition, User, UserType } from '../models'\nimport { AuthenticationService } from '../services/authentication.service'\nimport { isNil } from '../../../utils'\nimport { UnauthorizedError } from '../errors/unauthorized.error'\nimport { UserRepository } from '../repositories/user.repository'\n\nexport enum SignInMethods {\n EMAIL_PASSWORD = 'email_password',\n GOOGLE = 'google',\n}\n\ntype SignInMethod = Lowercase<keyof typeof SignInMethods>\n\ntype SignInParams = {\n email?: string\n password?: string\n}\n\nexport class Authentication {\n constructor(private readonly authService: AuthenticationService, private readonly userRepository: UserRepository) {}\n\n async signIn({ email, password }: SignInParams, signInMethod: SignInMethod): Promise<User> {\n const method = this.getServiceByMethod(signInMethod)\n const userAuth = await this.authService[method]({ email, password })\n const user = this.userRepository.get(userAuth)\n\n if (!isNil(user)) return user\n if (/^.+@b4a.com.br$/.test(userAuth.email)) return this.createsUserByCredential(userAuth)\n\n throw new UnauthorizedError('Invalid credentials')\n }\n\n private getServiceByMethod(signInMethod: SignInMethod): string {\n return signInMethod === SignInMethods.EMAIL_PASSWORD ? 'signInWithEmailAndPassword' : 'signInWithGoogle'\n }\n\n private async createsUserByCredential(user: Partial<User>): Promise<User> {\n const [firstName, lastName] = user.displayName?.split(/\\s/)\n const person = User.toInstance({\n ...user,\n cpf: '',\n birthday: new Date(),\n firstName,\n lastName,\n acceptsNewsletter: false,\n area: Area.Transactional,\n officePosition: OfficePosition.Intern,\n type: UserType.Collaborator,\n })\n\n return this.userRepository.create(person)\n }\n}\n","import { AuthenticationService } from '../services/authentication.service'\n\nexport class SignOut {\n constructor(private readonly authService: AuthenticationService) {}\n\n async signOut(): Promise<void> {\n await this.authService.signOut()\n }\n}\n","export enum Shops {\n MENSMARKET = `mensmarket`,\n GLAMSHOP = 'Glamshop',\n}\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\nimport { Shops } from './enums'\n\nimport { CategoryCondition, CategoryFilter } from './types'\n\nexport class Category extends BaseModel<Category> implements IdentifierFields<Category> {\n id: string\n brandCategory: boolean\n brandLogo?: string\n name: string\n slug: string\n image?: string\n brandCategoryBanner?: string\n description: string\n conditions?: CategoryCondition\n products?: string[]\n filters?: CategoryFilter[]\n createdAt: Date\n updatedAt: Date\n shop: Shops\n\n identifierFields(): NonFunctionPropertyNames<Category>[] {\n return ['id']\n }\n}\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\n\nimport { Shops } from './enums/shops.enum'\nimport { ProductReview, ShopDescription, ShopPrice, ShopsDescription, ShopsPrice, Stock } from './types'\nimport { Variant } from './variant'\n\nexport class Product extends BaseModel<Product> implements IdentifierFields<Product> {\n id: string\n name: string\n slug: string\n shopAvailability: Shops[]\n description: ShopsDescription\n sku: string\n price: ShopsPrice\n hasVariants: boolean\n NCM: string\n EAN: string\n CEST: string\n weight: number\n stock: Stock\n costPrice: number\n images?: string[]\n published: boolean\n publishedGlam: boolean\n createdAt: Date\n updatedAt: Date\n brand: string\n tags?: string[]\n type?: string\n categories?: string[]\n reviews?: ProductReview[]\n variant?: Variant\n\n identifierFields(): NonFunctionPropertyNames<Product>[] {\n return ['id']\n }\n\n getInfoByShop(shop: Shops): ShopDescription & ShopPrice & Stock {\n return {\n ...(this.description?.[shop]?.description ? { description: this.description?.[shop]?.description } : {}),\n ...(this.price?.[shop] || {}),\n ...(this.stock?.[shop] || {}),\n }\n }\n}\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\n\nimport { ShopsPrice, Stock, VariantGrade } from './types'\n\nexport class Variant extends BaseModel<Variant> implements IdentifierFields<Variant> {\n id: string\n productId: string\n sku: string\n price: ShopsPrice\n EAN: string\n stock: Stock\n grade: VariantGrade[]\n\n identifierFields(): NonFunctionPropertyNames<Variant>[] {\n return ['id']\n }\n}\n","import { Md5 } from 'ts-md5'\n\nimport { CheckoutTypes } from '../enums/checkout-types.enum'\n\nimport { Coupon } from './coupon'\nimport { CouponTypes, CouponSubtypes } from './enums'\n\nconst COUPON_EXPIRATION = 60 * 60 * 24 * 30\n\nexport class FinancialCoupon extends Coupon {\n type = CouponTypes.FINANCIAL\n subtype: CouponSubtypes\n\n static isFinancialCoupon(coupon: Partial<FinancialCoupon>): coupon is FinancialCoupon {\n return coupon.type === CouponTypes.FINANCIAL && !!coupon.subtype\n }\n\n static createCoupon(userId: string): FinancialCoupon {\n return this.toInstance({\n name: Md5.hashStr(`${userId}_${Date.now}`).toString(),\n nickname: `${Date.now()}`,\n type: CouponTypes.FINANCIAL,\n subtype: CouponSubtypes.PERCENTAGE,\n checkoutType: CheckoutTypes.ECOMMERCE,\n discount: 30,\n user: userId,\n createdAt: new Date(Date.now()),\n expiresIn: new Date(Date.now() + COUPON_EXPIRATION),\n })\n }\n}\n","export enum OrderStatus {\n AGUARDANDO_PAGAMENTO = 'Aguardando pagamento',\n EM_PREPARO = 'Preparando pedido',\n NF_EMITIDA = 'Nota Fiscal Emitida',\n AGUARDANDO_ENVIO = 'Aguardando Transaportadora',\n ENVIADO = 'Pedido Enviado',\n ENTREGUE = 'Pedido entregue',\n CANCELADO = 'Cancelado',\n CREDIT_CARD = 'credit_card',\n}\n","import { Product } from '../../catalog/models/product'\n\nexport class LineItem extends Product {\n parentId?: string\n quantity: number\n isGift?: boolean\n pricePaid?: number\n image?: string\n}\n","import { BaseModel } from '../../general/model/base.model'\nimport { IdentifierFields } from '../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../general/model/types'\n\nexport class ShippingMethod extends BaseModel<ShippingMethod> implements IdentifierFields<ShippingMethod> {\n id: string\n CNPJ: string\n DaysToDelivery: number\n MaxGrams: number\n MinGrams: number\n ServiceCompanyRangeId: number\n ShippingCompanyId: number\n ShippingCompanyName: string\n ShippingPrice: number\n State: string\n ZipEnd: number\n ZipStart: number\n\n identifierFields(): NonFunctionPropertyNames<ShippingMethod>[] {\n return ['id']\n }\n}\n","import { Type } from 'class-transformer'\n\nimport { Address } from '../../location/models/address'\nimport { BaseModel } from '../../general/model/base.model'\nimport { IdentifierFields } from '../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../general/model/types'\nimport { User } from '../../users/models/user'\n\nimport { Coupon } from './coupons/coupon'\nimport { LineItem } from './line-item'\nimport { ShippingMethod } from './shipping-method'\nimport { Shops } from '../../catalog/models/enums/shops.enum'\n\nexport class Checkout extends BaseModel<Checkout> implements IdentifierFields<Checkout> {\n id?: string\n paymentId?: string\n status?: string\n createdAt?: Date\n updatedAt?: Date\n completedAt?: Date\n discount?: number\n subTotalPrice?: number\n totalPrice?: number\n shop: Shops\n\n @Type(() => LineItem)\n lineItems?: LineItem[]\n @Type(() => User)\n user?: User\n @Type(() => Address)\n shippingAddress?: Address\n @Type(() => Address)\n billingAddress?: Address\n @Type(() => ShippingMethod)\n shipping?: ShippingMethod\n @Type(() => Coupon)\n coupon?: Coupon\n\n identifierFields(): NonFunctionPropertyNames<Checkout>[] {\n return ['id']\n }\n}\n","import { Type } from 'class-transformer'\n\nimport { Checkout } from './checkout'\nimport { OrderStatus } from './enums/order-status.enum'\nimport { Payment } from './payment'\n\nexport class Order extends Checkout {\n status: OrderStatus\n trackingCode?: string\n trackingUrl?: string\n\n @Type(() => Payment)\n payment: Payment\n}\n","import { Type } from 'class-transformer'\n\nimport { Address } from '../../../location/models/address'\nimport { BaseModel } from '../../../general/model/base.model'\nimport { Coupon } from '../coupons/coupon'\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../../general/model/types'\nimport { User } from '../../../users/models/user'\n\nimport { SubscriptionPlan } from './plan'\n\nexport class CheckoutSubscription\n extends BaseModel<CheckoutSubscription>\n implements IdentifierFields<CheckoutSubscription>\n{\n id?: string\n user: User\n createdAt: Date\n updatedAt: Date\n completedAt?: Date\n userId?: string\n discount?: number\n subTotalPrice?: number\n totalPrice?: number\n\n @Type(() => Address)\n shippingAddress: Address\n @Type(() => Address)\n billingAddress?: Address\n @Type(() => SubscriptionPlan)\n subscriptionPlan: SubscriptionPlan\n @Type(() => Coupon)\n coupon?: Coupon\n\n identifierFields(): NonFunctionPropertyNames<CheckoutSubscription>[] {\n return ['id']\n }\n}\n","import { Type } from 'class-transformer'\n\nimport { BaseModel } from '../../general/model/base.model'\nimport { IdentifierFields } from '../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../general/model/types'\nimport { Shops, Category } from '../../catalog/models'\n\nexport class Buy2Win extends BaseModel<Buy2Win> implements IdentifierFields<Buy2Win> {\n active: boolean\n cartValue: number\n createdAt: Date\n endDate: Date\n id?: string\n name: string\n products?: string[]\n shop: Shops\n startDate: Date\n updatedAt?: Date\n\n @Type(() => Category)\n categories: Category[]\n\n identifierFields(): NonFunctionPropertyNames<Buy2Win>[] {\n return ['id']\n }\n}\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\nimport { Banner } from './types/banner.type'\nimport { Benefit } from './types/benefit.type'\n\nexport class Home extends BaseModel<Home> implements IdentifierFields<Home> {\n benefitsSection: Benefit\n blockBanners: Banner[]\n blogBanner: Banner\n brandsCarousel: Banner[]\n buyToWinBanner: Banner\n discoverCategories: string[]\n featuredCampaignBanner: Banner\n featuredCategories: string[]\n heroCarousel: Banner[]\n verticalCarousels: string[]\n id: string\n\n identifierFields(): NonFunctionPropertyNames<Home>[] {\n return ['id']\n }\n}\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\nimport { MenuNav } from './types/menu-nav.type'\n\nexport class ShopMenu extends BaseModel<ShopMenu> implements IdentifierFields<ShopMenu> {\n menuNav: MenuNav[]\n id: string\n\n identifierFields(): NonFunctionPropertyNames<ShopMenu>[] {\n return ['id']\n }\n}\n","export class InvalidArgumentError extends Error {\n constructor(readonly message) {\n super(message)\n }\n}\n","export class RequiredArgumentError extends Error {\n arguments: string[]\n\n constructor(readonly args: string[]) {\n super(`Required arguments: ${args.join(', ')}`)\n\n this.arguments = args\n }\n}\n","export class NotFoundError extends Error {\n constructor(readonly message) {\n super(message)\n }\n}\n","export class DuplicatedResultsError extends Error {\n constructor(readonly message) {\n super(message)\n }\n}\n","import { CollectionReference, DocumentData, FirebaseFirestore, QueryDocumentSnapshot } from '@firebase/firestore-types'\nimport firebase from 'firebase'\n\nimport { BaseModelBuilder, BaseModelWithIdentifier } from '../../../../domain'\nimport { FirestoreRepository } from '../types'\nimport { MixinCtor } from '../../../../utils'\n\nexport const withFirestore = <TBase extends BaseModelWithIdentifier<TBase>>(MixinBase: MixinCtor) => {\n return class extends MixinBase implements FirestoreRepository<TBase> {\n readonly firestore?: FirebaseFirestore\n collectionName: string\n model: BaseModelBuilder<TBase>\n\n constructor(...args: Array<any>) {\n super(args)\n }\n\n collection(path?: string): CollectionReference<TBase> {\n return this.firestore.collection(path || this.collectionName).withConverter(this.buildModelInstance())\n }\n\n buildModelInstance(): {\n toFirestore: (data: TBase) => DocumentData\n fromFirestore: (snap: QueryDocumentSnapshot<TBase>) => TBase\n } {\n return {\n toFirestore: (data: TBase): DocumentData => data.toPlain(),\n fromFirestore: (snap: QueryDocumentSnapshot<TBase>): TBase => {\n const data = snap.data()\n\n Object.keys(data).forEach((key) => {\n if (data[key] instanceof firebase.firestore.Timestamp) {\n data[key] = data[key].toDate()\n }\n })\n\n return this.model.toInstance({ id: snap.id, ...data })\n },\n }\n }\n }\n}\n","import { QuerySnapshot, QueryDocumentSnapshot } from '@firebase/firestore-types'\n\nimport { BaseModelWithIdentifier } from '../../../../domain'\n\nimport { FirestoreHelpers, FirestoreRepository, FirestoreSubRepository } from '../types'\nimport { isNil, MixinCtor } from '../../../../utils'\n\nexport const withHelpers = <Model extends BaseModelWithIdentifier<Model>, TMixinBase extends MixinCtor>(\n MixinBase: MixinCtor & TMixinBase,\n) => {\n return class extends MixinBase implements FirestoreHelpers {\n toArray<T extends BaseModelWithIdentifier<T>>(snapShot: QuerySnapshot<T> | QueryDocumentSnapshot<T>[]): T[] {\n if (Array.isArray(snapShot)) {\n return snapShot.map((doc: QueryDocumentSnapshot<T>) => doc.data())\n } else {\n return snapShot.docs.map((doc: QueryDocumentSnapshot<T>) => doc.data())\n }\n }\n\n isSubCollection<T extends BaseModelWithIdentifier<T>>(\n repository: FirestoreRepository<T>,\n ): repository is FirestoreSubRepository<T> {\n return !isNil(Object.keys(this).find((key) => key === 'parentRepository'))\n }\n }\n}\n","import { BaseModelWithIdentifier, GetRepository, NonFunctionProperties } from '../../../../domain'\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\nimport { isNil, MixinCtor } from '../../../../utils'\nimport { NotFoundError } from '../../../../errors'\n\nexport const withGetFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\n) => {\n return class GetFirestore extends MixinBase implements GetRepository<TBase> {\n async get(identifiers: NonFunctionProperties<TBase>): Promise<TBase> {\n const doc = await this.collection(this.buildCollectionPathForGet(identifiers))\n .doc(Object.values(identifiers).shift().toString())\n .get()\n const data = doc.data()\n\n if (isNil(data)) throw new NotFoundError(`Document ${JSON.stringify(identifiers)} not found`)\n\n return data\n }\n\n buildCollectionPathForGet(identifiers: NonFunctionProperties<TBase>): string {\n return this.isSubCollection(this)\n ? `${this.parentRepository.collectionName}/${identifiers[this.parentIdField]}/${this.collectionName}`\n : this.collectionName\n }\n }\n}\n","import { CollectionReference, Query, WhereFilterOp } from '@firebase/firestore-types'\n\nimport {\n BaseModelWithIdentifier,\n FindRepository,\n NonFunctionPropertyNames,\n RepositoryFindField,\n RepositoryFindFielters,\n RepositoryFindFieltersOptions,\n RepositoryFindResult,\n RepositoryLimitOptions,\n RepositoryOrderByList,\n Where,\n} from '../../../../domain'\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\nimport { MixinCtor, isNil, isNumber, isObject, isString } from '../../../../utils'\n\nexport const withFindFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\n) => {\n const checkIfIsFilterOption = (filter: any): filter is RepositoryFindFieltersOptions<TBase, any> =>\n !isNil(filter?.operator)\n const getValueFromFilter = (filter: RepositoryFindField<TBase, any>): any => {\n return checkIfIsFilterOption(filter) ? filter.value : filter\n }\n\n return class FindFirestore extends MixinBase implements FindRepository<TBase> {\n async find(\n filters?: RepositoryFindFielters<TBase>[],\n limits?: RepositoryLimitOptions<TBase>,\n orderBy?: RepositoryOrderByList<TBase>,\n ): Promise<RepositoryFindResult<TBase>> {\n let query: CollectionReference<TBase> | Query<TBase> = this.collection(this.buildCollectionPathForFind(filters))\n\n filters?.forEach((filterer) => (query = this.makeFirestoreWhere(query, filterer)))\n\n orderBy?.forEach((orderer) =>\n Object.keys(orderer).forEach((fieldName) => (query = query.orderBy(fieldName, orderer[fieldName]))),\n )\n\n query = this.defineLimits(query, filters, limits)\n\n const docs = await query.get()\n const data = docs.docs.map((doc) => doc.data())\n\n return {\n data,\n count: this.calculateCount(data, limits),\n }\n }\n\n buildCollectionPathForFind(filters: RepositoryFindFielters<TBase>[]): string {\n if (!this.isSubCollection<TBase>(this)) return this.collectionName\n\n const parentIdField = this.parentIdField\n const parentId = getValueFromFilter(\n filters.find((groupFilter) => Boolean(getValueFromFilter(groupFilter[parentIdField])))?.[parentIdField],\n )\n\n return `${this.parentRepository.collectionName}/${parentId}/${this.collectionName}`\n }\n\n makeFirestoreWhere = (\n queryReference: CollectionReference<TBase> | Query<TBase>,\n filter: RepositoryFindFielters<TBase>,\n ): Query<TBase> =>\n Object.keys(filter).reduce(\n (query: Query<TBase>, fieldName: string) => this.buildWhereSentence(query, fieldName, filter[fieldName]),\n queryReference,\n )\n\n buildWhereSentence = (\n queryReference: CollectionReference<TBase> | Query<TBase>,\n fieldName: NonFunctionPropertyNames<TBase> | string,\n options: RepositoryFindFieltersOptions<TBase, NonFunctionPropertyNames<TBase>>,\n ): Query<TBase> => {\n if (this.isSubCollection<TBase>(this) && fieldName === this.parentIdField) return queryReference\n if (options?.operator === Where.LIKE) {\n queryReference = queryReference.where(fieldName.toString(), '>=', options.value)\n queryReference = queryReference.where(fieldName.toString(), '<=', `${options.value}~`)\n\n return queryReference\n }\n if (options?.operator === Where.IN && Array.isArray(options?.value))\n return queryReference.where(fieldName.toString(), 'array-contains-any', options.value)\n if (isObject(options) && isNil(options?.operator) && isNil(options?.value))\n return Object.keys(options).reduce(\n (queryReferenceWithWhere, key) =>\n this.buildWhereSentence(queryReferenceWithWhere, `${fieldName}.${key}`, options[key]),\n queryReference,\n )\n\n return queryReference.where(fieldName.toString(), options?.operator || '==', options?.value || options)\n }\n\n defineLimits(\n query: CollectionReference<TBase> | Query<TBase>,\n filters: RepositoryFindFielters<TBase>[],\n limits: RepositoryLimitOptions<TBase>,\n ): Query<TBase> {\n if (limits?.offset) {\n if (limits.offset instanceof this.model)\n query = query.startAfter(\n this.collection(this.buildCollectionPathForFind(filters)).doc(\n limits.offset[limits.offset.identifierFields().shift() as string],\n ),\n )\n if (isNumber(limits.offset) || isString(limits.offset)) query = query.startAt(limits.offset)\n }\n if (limits?.limit) query = query.limit(limits.limit)\n\n return query\n }\n\n calculateCount(data: TBase[], limits: RepositoryLimitOptions<TBase>): number {\n if (data.length <= 0) return 0\n if (data.length < limits?.limit) return data.length\n\n return Infinity\n }\n }\n}\n","import { DocumentReference } from '@firebase/firestore-types'\n\nimport { CreateRepository, BaseModelWithIdentifier } from '../../../../domain'\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\nimport { isEmpty, MixinCtor } from '../../../../utils'\n\nexport const withCreateFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\n) => {\n return class CreateFirestore extends MixinBase implements CreateRepository<TBase> {\n async create(data: Partial<TBase>): Promise<TBase> {\n const docRef = await this.save(this.model.toInstance(data))\n const doc = await docRef.get()\n\n return doc.data()\n }\n\n async save(data: TBase): Promise<DocumentReference<TBase>> {\n const id = data[data.identifierFields().shift()]?.toString()\n\n if (isEmpty(id)) return this.collection(this.buildCollectionPathForAdd(data)).add(data)\n\n const docRef = this.collection().doc(id)\n await docRef.set(data)\n\n return docRef\n }\n\n buildCollectionPathForAdd(identifiers: Partial<TBase>): string {\n return this.isSubCollection(this)\n ? `${this.parentRepository.collectionName}/${identifiers[this.parentIdField]}/${this.collectionName}`\n : this.collectionName\n }\n }\n}\n","import firebase from 'firebase'\n\nimport {\n BaseModelWithIdentifier,\n NonFunctionPropertyNames,\n RepositoryUpdateParams,\n UpdateOptionActions,\n UpdateOptions,\n UpdateRepository,\n} from '../../../../domain'\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\nimport { isNil, MixinCtor, PropType } from '../../../../utils'\n\nexport const withUpdateFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\n) => {\n const getValueFromParams = (\n params: RepositoryUpdateParams<TBase>,\n field: NonFunctionPropertyNames<TBase>,\n ): PropType<TBase, NonFunctionPropertyNames<TBase>> =>\n (isNil(params[field as string]?.value) ? params[field as string] : params[field as string].value) || null\n const getValueByAction = (options: UpdateOptions<TBase>): firebase.firestore.FieldValue | unknown => {\n const fieldValues = firebase.firestore.FieldValue\n\n if (isNil(options.action)) return options\n if (options.action === UpdateOptionActions.REMOVE_FIELD) return fieldValues.delete()\n if (Array.isArray(options.value)) {\n if (options.action === UpdateOptionActions.MERGE) return fieldValues.arrayUnion(...options.value)\n if (options.action === UpdateOptionActions.REMOVE) return fieldValues.arrayRemove(...options.value)\n }\n\n return options.value\n }\n\n return class UpdateFirestore extends MixinBase implements UpdateRepository<TBase> {\n async update(data: RepositoryUpdateParams<TBase>): Promise<TBase> {\n const model = new this.model()\n const keyField = model.identifierFields().shift()\n const docRef = this.collection(this.buildCollectionPathForUpdate(data)).doc(\n getValueFromParams(data, keyField).toString(),\n )\n\n await docRef.set(this.paramsToPlain(data), { merge: true })\n\n const doc = await docRef.get()\n\n return doc.data()\n }\n\n buildCollectionPathForUpdate(identifiers: RepositoryUpdateParams<TBase>): string {\n return this.isSubCollection(this)\n ? `${this.parentRepository.collectionName}/${getValueFromParams(identifiers, this.parentIdField)}/${\n this.collectionName\n }`\n : this.collectionName\n }\n\n paramsToPlain(params: RepositoryUpdateParams<TBase>): Partial<TBase> {\n const model = this.model\n\n if (params instanceof model) return params\n\n return new model(\n Object.keys(params).reduce(\n (data, currentKey) => ({ ...data, [currentKey]: getValueByAction(params[currentKey]) }),\n {},\n ),\n )\n }\n }\n}\n","import { BaseModelWithIdentifier, NonFunctionProperties, DeleteRepository } from '../../../../domain'\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\nimport { MixinCtor } from '../../../../utils'\n\nexport const withDeleteFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\n) => {\n return class DeleteFirestore extends MixinBase implements DeleteRepository<TBase> {\n async delete(identifiers: NonFunctionProperties<TBase>): Promise<void> {\n await this.collection(this.buildCollectionPathForRemove(identifiers))\n .doc(Object.values(identifiers).shift().toString())\n .delete()\n }\n\n buildCollectionPathForRemove(identifiers: NonFunctionProperties<TBase>): string {\n return this.isSubCollection(this)\n ? `${this.parentRepository.collectionName}/${identifiers[this.parentIdField]}/${this.collectionName}`\n : this.collectionName\n }\n }\n}\n","import { CollectionReference, DocumentData, FirebaseFirestore, QueryDocumentSnapshot } from '@firebase/firestore-types'\n\nimport { BaseModelWithIdentifier, NonFunctionPropertyNames } from '../../../../domain'\nimport { FirestoreRepository, FirestoreSubRepository } from '../types'\nimport { MixinCtor } from '../../../../utils'\n\nexport const withSubCollection = <\n TBase extends BaseModelWithIdentifier<TBase>,\n TBaseParent extends BaseModelWithIdentifier<TBaseParent>,\n TMixinBase extends MixinCtor,\n>(\n MixinBase: MixinCtor<FirestoreRepository<TBase>> & TMixinBase,\n ParentModel: new () => TBaseParent,\n) => {\n return class SubCollectionMix\n extends MixinBase\n implements FirestoreSubRepository<TBase, InstanceType<typeof ParentModel>>\n {\n readonly parentRepository: FirestoreRepository<InstanceType<typeof ParentModel>>\n parentIdField: NonFunctionPropertyNames<TBase>\n\n constructor(...args: Array<any>) {\n super(args)\n }\n\n collection(path?: string): CollectionReference<TBase> {\n return super.collection(path)\n }\n }\n}\n","import { BaseModelWithIdentifier, CrudRepository } from '../../../../domain'\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\nimport { MixinCtor } from '../../../../utils'\n\nimport { withCreateFirestore } from './with-create-firestore.mixin'\nimport { withDeleteFirestore } from './with-delete-firestore.mixin'\nimport { withFindFirestore } from './with-find-firestore.mixin'\nimport { withGetFirestore } from './with-get-firestore.mixin'\nimport { withUpdateFirestore } from './with-update-firestore.mixin'\n\nexport const withCrudFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\n) => {\n return class CrudFirestore\n extends withUpdateFirestore(\n withGetFirestore(withFindFirestore(withDeleteFirestore(withCreateFirestore(MixinBase)))),\n )\n implements CrudRepository<TBase> {}\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Subscription, SubscriptionRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class SubscriptionFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<Subscription>(Base)))\n implements SubscriptionRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'subscription'\n this.model = Subscription\n }\n}\n","import { DocumentData, FirebaseFirestore, QueryDocumentSnapshot } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { BeautyProfile, User, UserRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class UserFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<User>(Base)))\n implements UserRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'users'\n this.model = User\n }\n\n async get(identifiers: Partial<User>): Promise<User> {\n const user = await super.get({ id: identifiers.id })\n\n user.beautyProfile = await this.getBeautyProfile(user.id)\n user.isSubscriber = await this.checkIfIsSubscriber(user.id)\n\n return user\n }\n\n buildModelInstance(): {\n toFirestore: (data: User) => DocumentData\n fromFirestore: (snap: QueryDocumentSnapshot<User>) => User\n } {\n const { fromFirestore, toFirestore } = super.buildModelInstance()\n\n return {\n toFirestore: (data: User): DocumentData => {\n const plain = toFirestore(data)\n\n delete plain.isSubscriber\n\n return plain\n },\n fromFirestore,\n }\n }\n\n private async getBeautyProfile(userId: string): Promise<BeautyProfile> {\n const beautyProfile = await this.collection()\n .doc(userId)\n .collection('CX')\n .withConverter(this.buildBeautyProfileModelInstance())\n .doc('beautyProfile')\n .get()\n\n return beautyProfile.data()\n }\n\n private async checkIfIsSubscriber(userId: string): Promise<boolean> {\n const docs = await this.firestore\n .collection('subscription')\n .where('user.id', '==', userId)\n .where('status', '==', 'active')\n .get()\n\n return !!docs && !!docs.size\n }\n\n private buildBeautyProfileModelInstance(): {\n toFirestore: (data: BeautyProfile) => DocumentData\n fromFirestore: (snap: QueryDocumentSnapshot<BeautyProfile>) => BeautyProfile\n } {\n return {\n toFirestore: (data: BeautyProfile): DocumentData => data.toPlain(),\n fromFirestore: (snap: QueryDocumentSnapshot<BeautyProfile>): BeautyProfile =>\n BeautyProfile.toInstance(snap.data()),\n }\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Edition, Subscription, EditionRepository } from '../../../../../domain'\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\n\nimport { SubscriptionFirestoreRepository } from './subscription-firestore.repository'\n\nexport class SubscriptionEditionFirestoreRepository\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<Edition>(Base))), Subscription)\n implements EditionRepository\n{\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: SubscriptionFirestoreRepository) {\n super()\n this.collectionName = 'editions'\n this.parentIdField = 'subscriptionId'\n this.model = Edition\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { BeautyProfile, BeautyProfileRepository, User } from '../../../../../domain'\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\n\nimport { UserFirestoreRepository } from './user-firestore.repository'\n\nexport class UserBeautyProfileFirestoreRepository\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<BeautyProfile>(Base))), User)\n implements BeautyProfileRepository\n{\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: UserFirestoreRepository) {\n super()\n this.collectionName = 'CX'\n this.parentIdField = 'userId'\n this.model = BeautyProfile\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { User, UserAddress, UserAddressRepository } from '../../../../../domain'\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\n\nimport { UserFirestoreRepository } from './user-firestore.repository'\n\nexport class UserAddressFirestoreRepository\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<UserAddress>(Base))), User)\n implements UserAddressRepository\n{\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: UserFirestoreRepository) {\n super()\n this.collectionName = 'address'\n this.parentIdField = 'userId'\n this.model = UserAddress\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { SubscriptionPayment, Subscription, SubscriptionPaymentRepository } from '../../../../../domain'\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\n\nimport { SubscriptionFirestoreRepository } from './subscription-firestore.repository'\n\nexport class SubscriptionPaymentFirestoreRepository\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<SubscriptionPayment>(Base))), Subscription)\n implements SubscriptionPaymentRepository\n{\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: SubscriptionFirestoreRepository) {\n super()\n this.collectionName = 'Payments'\n this.parentIdField = 'subscriptionId'\n this.model = SubscriptionPayment\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Category, CategoryRepository, Product, Shops } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\nimport { DuplicatedResultsError, NotFoundError, RequiredArgumentError } from '../../../../../errors'\n\nexport class CategoryFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<Category>(Base)))\n implements CategoryRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'categories'\n this.model = Category\n }\n\n getCategoryBySlug(slug: string, shop: Shops): Promise<Category> {\n return this.collection(this.collectionName)\n .where('slug', '==', slug)\n .where('shop', '==', shop)\n .where('published', '==', true)\n .get()\n .then((snap) => {\n if (snap.size > 1) throw new DuplicatedResultsError('Query returned duplicated values')\n\n if (snap.empty) throw new NotFoundError(`Document with slug ${slug} not found`)\n\n return snap.docs[0].data()\n })\n .catch((error) => error)\n }\n\n async getCategoriesForHome(categoryIds: string[]): Promise<{ category: Category; products: Product[] }[]> {\n const categorySnap = await this.collection(this.collectionName)\n .where('id', 'in', categoryIds)\n .where('published', '==', true)\n .get()\n\n if (categorySnap.empty) throw new NotFoundError('Categories not found')\n\n const categories = categorySnap.docs.map((doc) => doc.data())\n const homeSections = []\n\n for (const category of categories) {\n const publishedField = category.shop === Shops.GLAMSHOP ? 'publishedGlam' : 'published'\n const productSnap = await this.collection('products')\n .where('categories', 'array-contains', category.id)\n .where(publishedField, '==', true)\n .where('stock.quantity', '>', 1)\n .limit(4)\n .get()\n\n const products = productSnap.docs.map((doc) => doc.data())\n\n homeSections.push({ category, products })\n }\n\n return homeSections\n }\n\n async mountCategory(category: Category): Promise<Product[]> {\n if (!category.products) throw new RequiredArgumentError(['Category products is empty'])\n\n const chunks = category.products.reduce((resultArray, item, index) => {\n const chunkIndex = Math.floor(index / 10)\n\n if (!resultArray[chunkIndex]) resultArray[chunkIndex] = []\n\n resultArray[chunkIndex].push(item)\n\n return resultArray\n }, [])\n\n const products = []\n\n for (const productIds of chunks) {\n const productSnap = await this.collection('products').where('id', 'in', productIds).get()\n\n if (productSnap.empty) continue\n\n products.push(...productSnap.docs.map((doc) => doc.data()))\n }\n\n return products\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Product, ProductRepository, Shops, Where } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class ProductFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<Product>(Base)))\n implements ProductRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'products'\n this.model = Product\n }\n\n async getBySlug(slug: string, shop: Shops): Promise<Product> {\n const result = await this.find([\n { slug: { operator: Where.EQUALS, value: slug } },\n { shopAvailability: { operator: Where.IN, value: [shop] } },\n ])\n\n return result?.data?.shift()\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Product, Variant, VariantRepository } from '../../../../../domain'\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\n\nimport { ProductFirestoreRepository } from './product-firestore.repository'\n\nexport class ProductVariantFirestoreRepository\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<Variant>(Base))), Product)\n implements VariantRepository\n{\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: ProductFirestoreRepository) {\n super()\n this.collectionName = 'variants'\n this.parentIdField = 'productId'\n this.model = Variant\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Checkout, CheckoutRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class CheckoutFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<Checkout>(Base)))\n implements CheckoutRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'checkouts'\n this.model = Checkout\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Coupon, CouponRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class CouponFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<Coupon>(Base)))\n implements CouponRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'coupons'\n this.model = Coupon\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Order, OrderRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class OrderFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<Order>(Base)))\n implements OrderRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'orders'\n this.model = Order\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Payment, PaymentRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class PaymentFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<Payment>(Base)))\n implements PaymentRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'payments'\n this.model = Payment\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { CheckoutSubscription, CheckoutSubscriptionRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class CheckoutSubscriptionFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<CheckoutSubscription>(Base)))\n implements CheckoutSubscriptionRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'checkoutsSubscription'\n this.model = CheckoutSubscription\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { SubscriptionPlan, SubscriptionPlanRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class SubscriptionPlanFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<SubscriptionPlan>(Base)))\n implements SubscriptionPlanRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'subscriptionPlans'\n this.model = SubscriptionPlan\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Buy2Win, Buy2WinRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class Buy2WinFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<Buy2Win>(Base)))\n implements Buy2WinRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'buy2win'\n this.model = Buy2Win\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Home, HomeRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class HomeFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<Home>(Base)))\n implements HomeRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'dms'\n this.model = Home\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\nimport { ShopMenu, ShopMenuRepository } from '../../../../../domain'\n\nimport { Base } from '../../../../../utils'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class ShopMenuFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<ShopMenu>(Base)))\n implements ShopMenuRepository {\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'shopMenus'\n this.model = ShopMenu\n }\n}\n","import firebase from 'firebase/app'\n\nimport { AuthenticationService, LoginAndPasswordParams, User } from '../../../domain'\n\nexport class AuthenticationFirebaseAuthService implements AuthenticationService {\n constructor(private readonly firebaseAuth: firebase.auth.Auth) {}\n\n async signInWithEmailAndPassword(data: LoginAndPasswordParams): Promise<Partial<User>> {\n const credentials = await this.firebaseAuth.signInWithEmailAndPassword(data.email, data.password)\n const user = credentials.user\n\n return { id: user.uid, displayName: user.displayName, email: user.email, phone: user.phoneNumber }\n }\n\n async signInWithGoogle(): Promise<Partial<User>> {\n const credentials = await this.firebaseAuth.signInWithPopup(new firebase.auth.GoogleAuthProvider())\n const user = credentials.user\n\n return { id: user.uid, displayName: user.displayName, email: user.email, phone: user.phoneNumber }\n }\n\n async signOut(): Promise<void> {\n this.firebaseAuth.signOut()\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["firebase"],"mappings":";;;;;;;;;MAIa,SAAS;IACpB,YAAY,IAAqB;QAC/B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;KAC1B;IAED,OAAO,UAAU,CAAgC,IAA8B;QAC7E,OAAO,YAAY,CAAC,IAAI,EAAE,IAAI,CAAQ,CAAA;KACvC;IAED,OAAO;QACL,OAAO,YAAY,CAAC,IAAI,EAAE,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAAC,CAAA;KACxD;;;ICfS;AAAZ,WAAY,KAAK;IACf,sBAAa,CAAA;IACb,iBAAQ,CAAA;IACR,mBAAU,CAAA;IACV,kBAAS,CAAA;IACT,iBAAQ,CAAA;IACR,mBAAU,CAAA;IACV,sBAAa,CAAA;AACf,CAAC,EARW,KAAK,KAAL,KAAK;;ICAL;AAAZ,WAAY,mBAAmB;IAC7B,wCAAiB,CAAA;IACjB,sCAAe,CAAA;IACf,wCAAiB,CAAA;IACjB,mDAA4B,CAAA;IAC5B,oCAAa,CAAA;AACf,CAAC,EANW,mBAAmB,KAAnB,mBAAmB;;ICAnB;AAAZ,WAAY,QAAQ;IAClB,wCAA4B,CAAA;IAC5B,iCAAqB,CAAA;IACrB,+BAAmB,CAAA;IACnB,2BAAe,CAAA;IACf,6CAA4B,CAAA;IAC5B,qCAAyB,CAAA;AAC3B,CAAC,EAPW,QAAQ,KAAR,QAAQ;;ICAR;AAAZ,WAAY,UAAU;IACpB,4BAAc,CAAA;IACd,mCAAgB,CAAA;IAChB,6BAAe,CAAA;IACf,iCAAmB,CAAA;IACnB,mCAAqB,CAAA;AACvB,CAAC,EANW,UAAU,KAAV,UAAU;;ICAV;AAAZ,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,8BAAiB,CAAA;IACjB,+BAAkB,CAAA;IAClB,8BAAiB,CAAA;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E,IAAI,CAAC,WAAW,EAAE,CAAA;SACnG;KAAA;IAEK,OAAO;;YACX,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAA;SAC5B;KAAA;;;ACvBH;;;;;;"}
1
+ {"version":3,"file":"infrab4a-connect.js","sources":["../../../projects/connect/src/lib/domain/general/model/base.model.ts","../../../projects/connect/src/lib/domain/general/repository/enums/where.enum.ts","../../../projects/connect/src/lib/domain/general/repository/enums/update-option-actions.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/user-type.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/beard-sizes.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/hair-types.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/area.enum.ts","../../../projects/connect/src/lib/domain/users/models/enums/office-position.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/enums/billing-status.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/enums/edition-status.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/enums/payment-type.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/enums/status.enum.ts","../../../projects/connect/src/lib/domain/users/models/subscription/edition.ts","../../../projects/connect/src/lib/domain/shopping/models/payment.ts","../../../projects/connect/src/lib/domain/users/models/subscription/payment.ts","../../../projects/connect/src/lib/domain/location/models/address.ts","../../../projects/connect/src/lib/domain/shopping/models/enums/checkout-types.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/enums/coupon-types.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/enums/coupon-subtypes.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/enums/exclusivities.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/coupon.ts","../../../projects/connect/src/lib/domain/shopping/models/subscription/plan.ts","../../../projects/connect/src/lib/utils/mixins/base.mixin.ts","../../../projects/connect/src/lib/domain/users/models/beauty-profile.ts","../../../projects/connect/src/lib/domain/users/models/user.ts","../../../projects/connect/src/lib/domain/users/models/subscription/subscription.ts","../../../projects/connect/src/lib/domain/users/models/user-address.ts","../../../projects/connect/src/lib/domain/users/errors/unauthorized.error.ts","../../../projects/connect/src/lib/domain/users/use-cases/authentication.ts","../../../projects/connect/src/lib/domain/users/use-cases/signout.ts","../../../projects/connect/src/lib/domain/catalog/models/enums/shops.enum.ts","../../../projects/connect/src/lib/domain/catalog/models/category.ts","../../../projects/connect/src/lib/domain/catalog/models/product.ts","../../../projects/connect/src/lib/domain/catalog/models/variant.ts","../../../projects/connect/src/lib/domain/shopping/models/coupons/financial-coupon.ts","../../../projects/connect/src/lib/domain/shopping/models/enums/order-status.enum.ts","../../../projects/connect/src/lib/domain/shopping/models/line-item.ts","../../../projects/connect/src/lib/domain/shopping/models/shipping-method.ts","../../../projects/connect/src/lib/domain/shopping/models/checkout.ts","../../../projects/connect/src/lib/domain/shopping/models/order.ts","../../../projects/connect/src/lib/domain/shopping/models/subscription/checkout.ts","../../../projects/connect/src/lib/domain/shopping/models/buy-2-win.ts","../../../projects/connect/src/lib/domain/shop-settings/models/home.ts","../../../projects/connect/src/lib/domain/shop-settings/models/shop-menu.ts","../../../projects/connect/src/lib/errors/invalid-argument.error.ts","../../../projects/connect/src/lib/errors/required-argument.error.ts","../../../projects/connect/src/lib/errors/not-found.error.ts","../../../projects/connect/src/lib/errors/duplicated-results.error.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-helpers.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-get-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-find-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-create-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-update-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-delete-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-sub-collection.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/mixins/with-crud-firestore.mixin.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/subscription-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/user-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/subscription-edition-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/user-beauty-profile-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/user-address-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/users/subscription-payment-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/catalog/category-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/catalog/product-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/catalog/product-variant-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/checkout-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/coupon-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/order-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/payment-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/checkout-subscription-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/subscription-plan-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shop-settings/home-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/firestore/repositories/shop-settings/shop-menu-firestore.repository.ts","../../../projects/connect/src/lib/infra/firebase/auth/authentication-firebase-auth.service.ts","../../../projects/connect/src/infrab4a-connect.ts"],"sourcesContent":["import { plainToClass, classToPlain } from 'class-transformer'\n\nimport { NonFunctionProperties } from './types/non-function-properties.type'\n\nexport class BaseModel<Model> {\n constructor(args?: Partial<Model>) {\n Object.assign(this, args)\n }\n\n static toInstance<T>(this: new () => Partial<T>, data: NonFunctionProperties<T>): T {\n return plainToClass(this, data) as any\n }\n\n toPlain(): any {\n return classToPlain(this, { exposeUnsetFields: false })\n }\n}\n","export enum Where {\n EQUALS = '==',\n GT = '>',\n GTE = '>=',\n IN = 'in',\n LT = '<',\n LTE = '<=',\n LIKE = 'like',\n}\n","export enum UpdateOptionActions {\n UPDATE = 'update',\n MERGE = 'merge',\n REMOVE = 'remove',\n REMOVE_FIELD = 'removeField',\n NULL = 'null',\n}\n","export enum UserType {\n B2C = 'Cliente Transacional',\n GlamGirl = 'Glamgirl',\n MensBoy = 'Mensboy',\n B2B = 'Company',\n Collaborator = 'Funcionário',\n Influencer = 'Influencer',\n}\n","export enum BeardSizes {\n BIG = 'Grande',\n MEDIUM = 'Média',\n SHORT = 'Curta',\n MUSTACHE = 'Bigode',\n NOTHING = 'Sem Barba',\n}\n","export enum HairTypes {\n Smooth = 'Liso',\n WAVY = 'Ondulado',\n CURLY = 'Cacheado',\n FRIZZY = 'Crespo',\n BALD = 'Sou careca',\n}\n","export enum Area {\n GP = 'Geral',\n CRM = 'CRM',\n MediaProd = 'Media Production',\n Tech = 'Tecnologia',\n Transactional = 'Transacional',\n Operations = 'Opera\\u00E7\\u00F5es',\n Sales = 'Comercial',\n Finantial = 'Financeiro',\n HR = 'RH',\n}\n","export enum OfficePosition {\n Intern = 'Estagi\\u00E1rio',\n Analyst = 'Analista',\n Manager = 'Gerente',\n Director = 'Diretor',\n}\n","export enum BillingStatus {\n PAYED = 'PAGO',\n}\n","export enum EditionStatus {\n ALLOCATION_WAITING = 'Aguardando alocação',\n}\n","export enum PaymentType {\n AQUISITION = 'Aquisição',\n RENEWAL = 'Renovação',\n FREIGHT = 'mudança de endereço, Frete',\n}\n","export enum Status {\n ACTIVE = 'active',\n}\n","import { BaseModel } from '../../../general/model/base.model'\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../../general/model/types/non-function-property-name.type'\n\nimport { EditionStatus, BillingStatus } from './enums'\n\nexport class Edition extends BaseModel<Edition> implements IdentifierFields<Edition> {\n id: string\n subscriptionId: string\n billingStatus: BillingStatus\n editionId: number\n editionStatus: EditionStatus\n installment: number\n paymentId: string\n draftId?: string\n\n identifierFields(): NonFunctionPropertyNames<Edition>[] {\n return ['id']\n }\n}\n","import { Expose } from 'class-transformer'\n\nimport { BaseModel } from '../../general/model/base.model'\nimport { IdentifierFields } from '../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../general/model/types'\n\nimport { PaymentBilling, PaymentCard, PaymentCustomer, PaymentItem, PaymentShipping } from './types'\n\nexport class Payment extends BaseModel<Payment> implements IdentifierFields<Payment> {\n id: number\n object: string\n status: string\n tid: number\n nsu: number\n amount: number\n cost: number\n installments: number\n referer: string\n ip: string\n phone: string\n address: string\n metadata: any\n device: string\n payment: string\n addition: string\n discount: string\n customer: PaymentCustomer\n billing: PaymentBilling\n shipping: PaymentShipping\n items: PaymentItem[]\n card: PaymentCard\n\n @Expose({ name: 'refuse_reason' })\n refuseReason: string\n @Expose({ name: 'status_reason' })\n statusReason: string\n @Expose({ name: 'acquirer_response_code' })\n acquirerResponseCode: string\n @Expose({ name: 'acquirer_name' })\n acquirerName: string\n @Expose({ name: 'acquirer_id' })\n acquirerId: string\n @Expose({ name: 'authorization_code' })\n authorizationCode: string\n @Expose({ name: 'soft_descriptor' })\n softDescriptor: string\n @Expose({ name: 'date_created' })\n dateCreated: string\n @Expose({ name: 'date_updated' })\n dateUpdated: string\n @Expose({ name: 'authorized_amount' })\n authorizedAmount: number\n @Expose({ name: 'paid_amount' })\n paidAmount: number\n @Expose({ name: 'refunded_amount' })\n refundedAmount: number\n @Expose({ name: 'card_holder_name' })\n cardHolderName: string\n @Expose({ name: 'card_last_digits' })\n cardLastDigits: string\n @Expose({ name: 'card_first_digits' })\n cardFirstDigits: string\n @Expose({ name: 'card_brand' })\n cardBrand: string\n @Expose({ name: 'card_pin_mode' })\n cardPinMode: string\n @Expose({ name: 'card_magstripe_fallback' })\n cardMagstripeFallback: boolean\n @Expose({ name: 'cvm_pin' })\n cvmPin: boolean\n @Expose({ name: 'postback_url' })\n postbackUrl: string\n @Expose({ name: 'payment_method' })\n paymentMethod: string\n @Expose({ name: 'capture_method' })\n captureMethod: string\n @Expose({ name: 'antifraud_score' })\n antifraudScore: string\n @Expose({ name: 'boleto_url' })\n boletoUrl: string\n @Expose({ name: 'boleto_barcode' })\n boletoBarcode: string\n @Expose({ name: 'boleto_expiration_date' })\n boletoExpirationDate: string\n @Expose({ name: 'subscription_id' })\n subscriptionId: string\n @Expose({ name: 'split_rules' })\n splitRules: string\n @Expose({ name: 'antifraud_metadata' })\n antifraudMetadata: any\n @Expose({ name: 'reference_key' })\n referenceKey: string\n @Expose({ name: 'local_transaction_id' })\n localTransactionId: string\n @Expose({ name: 'local_time' })\n localTime: string\n @Expose({ name: 'fraud_covered' })\n fraudCovered: boolean\n @Expose({ name: 'fraud_reimbursed' })\n fraudReimbursed: string\n @Expose({ name: 'order_id' })\n orderId: string\n @Expose({ name: 'risk_level' })\n riskLevel: string\n @Expose({ name: 'receipt_url' })\n receiptUrl: string\n @Expose({ name: 'private_label' })\n privateLabel: string\n @Expose({ name: 'pix_qr_code' })\n pixQrCode: string\n @Expose({ name: 'pix_expiration_date' })\n pixExpirationDate: string\n\n identifierFields(): NonFunctionPropertyNames<Payment>[] {\n return ['id']\n }\n}\n","import { Type } from 'class-transformer'\n\nimport { BaseModel } from '../../../general/model/base.model'\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../../general/model/types'\nimport { Payment } from '../../../shopping/models/payment'\n\nimport { PaymentType } from './enums/payment-type.enum'\n\nexport class SubscriptionPayment\n extends BaseModel<SubscriptionPayment>\n implements IdentifierFields<SubscriptionPayment>\n{\n id: string\n subscriptionId: string\n paymentType: PaymentType\n createdAt: Date\n attempts?: number\n\n @Type(() => Payment)\n payment: Payment\n\n identifierFields(): NonFunctionPropertyNames<SubscriptionPayment>[] {\n return ['id']\n }\n}\n","import { BaseModel } from '../../general/model/base.model'\n\nimport { LocationGeometry } from './types/location-geometry.type'\n\nexport abstract class Address extends BaseModel<Address> {\n default?: boolean\n recipient?: string\n zip?: string\n street?: string\n number?: string\n extension?: string\n district?: string\n city?: string\n regionalPole?: string\n region?: string\n state?: string\n country?: string\n mailbox?: boolean\n mailboxNumber?: string\n formattedAddress?: string\n placeId?: string\n geometry?: LocationGeometry\n}\n","export enum CheckoutTypes {\n ECOMMERCE = 1,\n SUBSCRIPTION = 2,\n}\n","export enum CouponTypes {\n FINANCIAL = 1,\n PRODUCT,\n GIFTCARD,\n VOUCHER,\n}\n","export enum CouponSubtypes {\n ABSOLUTE = 1,\n PERCENTAGE,\n}\n","export enum Exclusivities {\n ALL_USERS = 1,\n SPECIFIC_USER = 2,\n COLLABORATORS = 3,\n}\n","import { Expose } from 'class-transformer'\n\nimport { BaseModel } from '../../../general/model/base.model'\nimport { CheckoutTypes } from '../enums/checkout-types.enum'\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../../general/model/types'\nimport { Shops } from '../../../catalog/models/enums/shops.enum'\n\nimport { CouponTypes, Exclusivities } from './enums'\n\nexport class Coupon extends BaseModel<Coupon> implements IdentifierFields<Coupon> {\n id: string\n type: CouponTypes\n discount?: number\n user?: string\n recipient?: string\n store?: Shops\n campaign?: string\n name: string\n nickname: string\n expiresIn?: Date\n useLimit?: number\n createdAt: Date\n updatedAt?: Date\n shopAvailability: Shops\n isInfluencer: boolean\n\n @Expose({ name: 'checkout_type' })\n checkoutType: CheckoutTypes\n @Expose({ name: 'exclusivity_type' })\n exclusivityType?: Exclusivities\n\n identifierFields(): NonFunctionPropertyNames<Coupon>[] {\n return ['id']\n }\n}\n","import { BaseModel } from '../../../general/model/base.model'\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../../general/model/types'\n\nexport class SubscriptionPlan extends BaseModel<SubscriptionPlan> implements IdentifierFields<SubscriptionPlan> {\n id: string\n name: string\n billingPrice: number\n recurrencePrice: number\n recurrenceCycle: number\n maxAttempts: number\n\n identifierFields(): NonFunctionPropertyNames<SubscriptionPlan>[] {\n return ['id']\n }\n}\n","export class Base {\n constructor(...args: Array<any>) {\n Object.assign(this, ...args)\n }\n}\n","import { BaseModel } from '../../general/model/base.model'\nimport { IdentifierFields } from '../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../general/model/types/non-function-property-name.type'\n\nimport { BeardSizes, HairTypes } from './enums'\n\nexport class BeautyProfile extends BaseModel<BeautyProfile> implements IdentifierFields<BeautyProfile> {\n id: string\n userId: string\n beardSize?: BeardSizes\n hairType?: HairTypes\n\n toPlain(): any {\n const plain = super.toPlain()\n\n delete plain.id\n\n return plain\n }\n\n identifierFields(): NonFunctionPropertyNames<BeautyProfile>[] {\n return ['id']\n }\n}\n","import { Type } from 'class-transformer'\n\nimport { BaseModel } from '../../general/model/base.model'\nimport { IdentifierFields } from '../../general/model/identifier-fields'\nimport { isNil } from '../../..//utils'\nimport { NonFunctionProperties, NonFunctionPropertyNames } from '../../general/model/types'\n\nimport { Area, OfficePosition, UserType } from './enums'\nimport { BeautyProfile } from './beauty-profile'\n\nexport class User extends BaseModel<User> implements IdentifierFields<User> {\n id: string\n cpf?: string\n email: string\n firstName: string\n lastName: string\n displayName?: string\n phone: string\n birthday?: Date\n acceptsNewsletter: boolean\n type?: UserType\n area?: Area\n officePosition?: OfficePosition\n isSubscriber?: boolean\n\n @Type(() => BeautyProfile)\n beautyProfile?: BeautyProfile\n\n static toInstance<T>(this: new () => Partial<T>, data: NonFunctionProperties<T> & NonFunctionProperties<User>): T {\n const instance = super.toInstance<User>(data)\n\n if (!isNil(data.firstName))\n instance.displayName = `${data.firstName}${!isNil(data.lastName) ? ` ${data.lastName}` : ''}`\n\n return instance as any\n }\n\n identifierFields(): NonFunctionPropertyNames<User>[] {\n return ['id']\n }\n\n toPlain(): any {\n const plain = super.toPlain()\n\n delete plain.beautyProfile\n\n return plain\n }\n}\n","import { Type } from 'class-transformer'\n\nimport { Address } from '../../../location/models/address'\nimport { BaseModel } from '../../../general/model/base.model'\nimport { Coupon } from '../../../shopping/models/coupons/coupon'\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../../general/model/types/non-function-property-name.type'\nimport { SubscriptionPlan } from '../../../shopping/models/subscription/plan'\nimport { User } from '../user'\n\nimport { Edition } from './edition'\nimport { Status } from './enums/status.enum'\nimport { SubscriptionPayment } from './payment'\n\nexport class Subscription extends BaseModel<Subscription> implements IdentifierFields<Subscription> {\n id: string\n nextPayment: Date\n recurrence: boolean\n status: Status\n cardToken: string\n subtotalPrice?: number\n discount?: number\n totalPrice?: number\n createdAt: Date\n updatedAt: Date\n\n @Type(() => User)\n user: User\n @Type(() => SubscriptionPlan)\n subscriptionPlan: SubscriptionPlan\n @Type(() => Address)\n shippingAddress: Address\n @Type(() => Address)\n billingAddress?: Address\n @Type(() => Coupon)\n coupon?: Coupon\n @Type(() => Edition)\n editions: Edition[]\n @Type(() => SubscriptionPayment)\n payment?: SubscriptionPayment[]\n\n identifierFields(): NonFunctionPropertyNames<Subscription>[] {\n return ['id']\n }\n}\n","import { Address } from '../../location/models/address'\nimport { NonFunctionPropertyNames } from '../../general/model/types/non-function-property-name.type'\n\nexport class UserAddress extends Address {\n id: string\n userId: string\n\n identifierFields(): NonFunctionPropertyNames<UserAddress>[] {\n return ['id']\n }\n}\n","export class UnauthorizedError extends Error {\n constructor(readonly message) {\n super(message)\n }\n}\n","import { Area, OfficePosition, User, UserType } from '../models'\nimport { AuthenticationService } from '../services/authentication.service'\nimport { isNil } from '../../../utils'\nimport { UnauthorizedError } from '../errors/unauthorized.error'\nimport { UserRepository } from '../repositories/user.repository'\n\nexport enum SignInMethods {\n EMAIL_PASSWORD = 'email_password',\n GOOGLE = 'google',\n}\n\ntype SignInMethod = Lowercase<keyof typeof SignInMethods>\n\ntype SignInParams = {\n email?: string\n password?: string\n}\n\nexport class Authentication {\n constructor(private readonly authService: AuthenticationService, private readonly userRepository: UserRepository) {}\n\n async signIn({ email, password }: SignInParams, signInMethod: SignInMethod): Promise<User> {\n const method = this.getServiceByMethod(signInMethod)\n const userAuth = await this.authService[method]({ email, password })\n const user = this.userRepository.get(userAuth)\n\n if (!isNil(user)) return user\n if (/^.+@b4a.com.br$/.test(userAuth.email)) return this.createsUserByCredential(userAuth)\n\n throw new UnauthorizedError('Invalid credentials')\n }\n\n private getServiceByMethod(signInMethod: SignInMethod): string {\n return signInMethod === SignInMethods.EMAIL_PASSWORD ? 'signInWithEmailAndPassword' : 'signInWithGoogle'\n }\n\n private async createsUserByCredential(user: Partial<User>): Promise<User> {\n const [firstName, lastName] = user.displayName?.split(/\\s/)\n const person = User.toInstance({\n ...user,\n cpf: '',\n birthday: new Date(),\n firstName,\n lastName,\n acceptsNewsletter: false,\n area: Area.Transactional,\n officePosition: OfficePosition.Intern,\n type: UserType.Collaborator,\n })\n\n return this.userRepository.create(person)\n }\n}\n","import { AuthenticationService } from '../services/authentication.service'\n\nexport class SignOut {\n constructor(private readonly authService: AuthenticationService) {}\n\n async signOut(): Promise<void> {\n await this.authService.signOut()\n }\n}\n","export enum Shops {\n MENSMARKET = `mensmarket`,\n GLAMSHOP = 'Glamshop',\n}\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\nimport { Shops } from './enums'\n\nimport { CategoryCondition, CategoryFilter } from './types'\n\nexport class Category extends BaseModel<Category> implements IdentifierFields<Category> {\n id: string\n brandCategory: boolean\n brandLogo?: string\n name: string\n slug: string\n image?: string\n brandCategoryBanner?: string\n description: string\n conditions?: CategoryCondition\n products?: string[]\n filters?: CategoryFilter[]\n createdAt: Date\n updatedAt: Date\n shop: Shops\n\n identifierFields(): NonFunctionPropertyNames<Category>[] {\n return ['id']\n }\n}\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\n\nimport { Shops } from './enums/shops.enum'\nimport { ProductReview, ShopDescription, ShopPrice, ShopsDescription, ShopsPrice, Stock } from './types'\nimport { Variant } from './variant'\n\nexport class Product extends BaseModel<Product> implements IdentifierFields<Product> {\n id: string\n name: string\n slug: string\n shopAvailability: Shops[]\n description: ShopsDescription\n sku: string\n price: ShopsPrice\n hasVariants: boolean\n NCM: string\n EAN: string\n CEST: string\n weight: number\n stock: Stock\n costPrice: number\n images?: string[]\n published: boolean\n publishedGlam: boolean\n createdAt: Date\n updatedAt: Date\n brand: string\n tags?: string[]\n type?: string\n categories?: string[]\n reviews?: ProductReview[]\n variant?: Variant\n\n identifierFields(): NonFunctionPropertyNames<Product>[] {\n return ['id']\n }\n\n getInfoByShop(shop: Shops): ShopDescription & ShopPrice & Stock {\n return {\n ...(this.description?.[shop]?.description ? { description: this.description?.[shop]?.description } : {}),\n ...(this.price?.[shop] || {}),\n ...(this.stock?.[shop] || {}),\n }\n }\n}\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\n\nimport { ShopsPrice, Stock, VariantGrade } from './types'\n\nexport class Variant extends BaseModel<Variant> implements IdentifierFields<Variant> {\n id: string\n productId: string\n sku: string\n price: ShopsPrice\n EAN: string\n stock: Stock\n grade: VariantGrade[]\n\n identifierFields(): NonFunctionPropertyNames<Variant>[] {\n return ['id']\n }\n}\n","import { Md5 } from 'ts-md5'\n\nimport { CheckoutTypes } from '../enums/checkout-types.enum'\n\nimport { Coupon } from './coupon'\nimport { CouponTypes, CouponSubtypes } from './enums'\n\nconst COUPON_EXPIRATION = 60 * 60 * 24 * 30\n\nexport class FinancialCoupon extends Coupon {\n type = CouponTypes.FINANCIAL\n subtype: CouponSubtypes\n\n static isFinancialCoupon(coupon: Partial<FinancialCoupon>): coupon is FinancialCoupon {\n return coupon.type === CouponTypes.FINANCIAL && !!coupon.subtype\n }\n\n static createCoupon(userId: string): FinancialCoupon {\n return this.toInstance({\n name: Md5.hashStr(`${userId}_${Date.now}`).toString(),\n nickname: `${Date.now()}`,\n type: CouponTypes.FINANCIAL,\n subtype: CouponSubtypes.PERCENTAGE,\n checkoutType: CheckoutTypes.ECOMMERCE,\n discount: 30,\n user: userId,\n createdAt: new Date(Date.now()),\n expiresIn: new Date(Date.now() + COUPON_EXPIRATION),\n })\n }\n}\n","export enum OrderStatus {\n AGUARDANDO_PAGAMENTO = 'Aguardando pagamento',\n EM_PREPARO = 'Preparando pedido',\n NF_EMITIDA = 'Nota Fiscal Emitida',\n AGUARDANDO_ENVIO = 'Aguardando Transaportadora',\n ENVIADO = 'Pedido Enviado',\n ENTREGUE = 'Pedido entregue',\n CANCELADO = 'Cancelado',\n CREDIT_CARD = 'credit_card',\n}\n","import { Product } from '../../catalog/models/product'\n\nexport class LineItem extends Product {\n parentId?: string\n quantity: number\n isGift?: boolean\n pricePaid?: number\n image?: string\n}\n","import { BaseModel } from '../../general/model/base.model'\nimport { IdentifierFields } from '../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../general/model/types'\n\nexport class ShippingMethod extends BaseModel<ShippingMethod> implements IdentifierFields<ShippingMethod> {\n id: string\n CNPJ: string\n DaysToDelivery: number\n MaxGrams: number\n MinGrams: number\n ServiceCompanyRangeId: number\n ShippingCompanyId: number\n ShippingCompanyName: string\n ShippingPrice: number\n State: string\n ZipEnd: number\n ZipStart: number\n\n identifierFields(): NonFunctionPropertyNames<ShippingMethod>[] {\n return ['id']\n }\n}\n","import { Type } from 'class-transformer'\n\nimport { Address } from '../../location/models/address'\nimport { BaseModel } from '../../general/model/base.model'\nimport { IdentifierFields } from '../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../general/model/types'\nimport { User } from '../../users/models/user'\n\nimport { Coupon } from './coupons/coupon'\nimport { LineItem } from './line-item'\nimport { ShippingMethod } from './shipping-method'\nimport { Shops } from '../../catalog/models/enums/shops.enum'\n\nexport class Checkout extends BaseModel<Checkout> implements IdentifierFields<Checkout> {\n id?: string\n paymentId?: string\n status?: string\n createdAt?: Date\n updatedAt?: Date\n completedAt?: Date\n discount?: number\n subTotalPrice?: number\n totalPrice?: number\n shop: Shops\n\n @Type(() => LineItem)\n lineItems?: LineItem[]\n @Type(() => User)\n user?: User\n @Type(() => Address)\n shippingAddress?: Address\n @Type(() => Address)\n billingAddress?: Address\n @Type(() => ShippingMethod)\n shipping?: ShippingMethod\n @Type(() => Coupon)\n coupon?: Coupon\n\n identifierFields(): NonFunctionPropertyNames<Checkout>[] {\n return ['id']\n }\n}\n","import { Type } from 'class-transformer'\n\nimport { Checkout } from './checkout'\nimport { OrderStatus } from './enums/order-status.enum'\nimport { Payment } from './payment'\n\nexport class Order extends Checkout {\n status: OrderStatus\n trackingCode?: string\n trackingUrl?: string\n\n @Type(() => Payment)\n payment: Payment\n}\n","import { Type } from 'class-transformer'\n\nimport { Address } from '../../../location/models/address'\nimport { BaseModel } from '../../../general/model/base.model'\nimport { Coupon } from '../coupons/coupon'\nimport { IdentifierFields } from '../../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../../general/model/types'\nimport { User } from '../../../users/models/user'\n\nimport { SubscriptionPlan } from './plan'\n\nexport class CheckoutSubscription\n extends BaseModel<CheckoutSubscription>\n implements IdentifierFields<CheckoutSubscription>\n{\n id?: string\n user: User\n createdAt: Date\n updatedAt: Date\n completedAt?: Date\n userId?: string\n discount?: number\n subTotalPrice?: number\n totalPrice?: number\n\n @Type(() => Address)\n shippingAddress: Address\n @Type(() => Address)\n billingAddress?: Address\n @Type(() => SubscriptionPlan)\n subscriptionPlan: SubscriptionPlan\n @Type(() => Coupon)\n coupon?: Coupon\n\n identifierFields(): NonFunctionPropertyNames<CheckoutSubscription>[] {\n return ['id']\n }\n}\n","import { Type } from 'class-transformer'\n\nimport { BaseModel } from '../../general/model/base.model'\nimport { IdentifierFields } from '../../general/model/identifier-fields'\nimport { NonFunctionPropertyNames } from '../../general/model/types'\nimport { Shops, Category } from '../../catalog/models'\n\nexport class Buy2Win extends BaseModel<Buy2Win> implements IdentifierFields<Buy2Win> {\n active: boolean\n cartValue: number\n createdAt: Date\n endDate: Date\n id?: string\n name: string\n products?: string[]\n shop: Shops\n startDate: Date\n updatedAt?: Date\n\n @Type(() => Category)\n categories: Category[]\n\n identifierFields(): NonFunctionPropertyNames<Buy2Win>[] {\n return ['id']\n }\n}\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\nimport { Banner } from './types/banner.type'\nimport { Benefit } from './types/benefit.type'\n\nexport class Home extends BaseModel<Home> implements IdentifierFields<Home> {\n benefitsSection: Benefit\n blockBanners: Banner[]\n blogBanner: Banner\n brandsCarousel: Banner[]\n buyToWinBanner: Banner\n discoverCategories: string[]\n featuredCampaignBanner: Banner\n featuredCategories: string[]\n heroCarousel: Banner[]\n verticalCarousels: string[]\n id: string\n\n identifierFields(): NonFunctionPropertyNames<Home>[] {\n return ['id']\n }\n}\n","import { BaseModel, IdentifierFields, NonFunctionPropertyNames } from '../../general/model'\nimport { MenuNav } from './types/menu-nav.type'\n\nexport class ShopMenu extends BaseModel<ShopMenu> implements IdentifierFields<ShopMenu> {\n menuNav: MenuNav[]\n id: string\n\n identifierFields(): NonFunctionPropertyNames<ShopMenu>[] {\n return ['id']\n }\n}\n","export class InvalidArgumentError extends Error {\n constructor(readonly message) {\n super(message)\n }\n}\n","export class RequiredArgumentError extends Error {\n arguments: string[]\n\n constructor(readonly args: string[]) {\n super(`Required arguments: ${args.join(', ')}`)\n\n this.arguments = args\n }\n}\n","export class NotFoundError extends Error {\n constructor(readonly message) {\n super(message)\n }\n}\n","export class DuplicatedResultsError extends Error {\n constructor(readonly message) {\n super(message)\n }\n}\n","import { CollectionReference, DocumentData, FirebaseFirestore, QueryDocumentSnapshot } from '@firebase/firestore-types'\nimport firebase from 'firebase'\n\nimport { BaseModelBuilder, BaseModelWithIdentifier } from '../../../../domain'\nimport { FirestoreRepository } from '../types'\nimport { MixinCtor } from '../../../../utils'\n\nexport const withFirestore = <TBase extends BaseModelWithIdentifier<TBase>>(MixinBase: MixinCtor) => {\n return class extends MixinBase implements FirestoreRepository<TBase> {\n readonly firestore?: FirebaseFirestore\n collectionName: string\n model: BaseModelBuilder<TBase>\n\n constructor(...args: Array<any>) {\n super(args)\n }\n\n collection(path?: string): CollectionReference<TBase> {\n return this.firestore.collection(path || this.collectionName).withConverter(this.buildModelInstance())\n }\n\n buildModelInstance(): {\n toFirestore: (data: TBase) => DocumentData\n fromFirestore: (snap: QueryDocumentSnapshot<TBase>) => TBase\n } {\n return {\n toFirestore: (data: TBase): DocumentData => data.toPlain(),\n fromFirestore: (snap: QueryDocumentSnapshot<TBase>): TBase => {\n const data = snap.data()\n\n Object.keys(data).forEach((key) => {\n if (data[key] instanceof firebase.firestore.Timestamp) {\n data[key] = data[key].toDate()\n }\n })\n\n return this.model.toInstance({ id: snap.id, ...data })\n },\n }\n }\n }\n}\n","import { QuerySnapshot, QueryDocumentSnapshot } from '@firebase/firestore-types'\n\nimport { BaseModelWithIdentifier } from '../../../../domain'\n\nimport { FirestoreHelpers, FirestoreRepository, FirestoreSubRepository } from '../types'\nimport { isNil, MixinCtor } from '../../../../utils'\n\nexport const withHelpers = <Model extends BaseModelWithIdentifier<Model>, TMixinBase extends MixinCtor>(\n MixinBase: MixinCtor & TMixinBase,\n) => {\n return class extends MixinBase implements FirestoreHelpers {\n toArray<T extends BaseModelWithIdentifier<T>>(snapShot: QuerySnapshot<T> | QueryDocumentSnapshot<T>[]): T[] {\n if (Array.isArray(snapShot)) {\n return snapShot.map((doc: QueryDocumentSnapshot<T>) => doc.data())\n } else {\n return snapShot.docs.map((doc: QueryDocumentSnapshot<T>) => doc.data())\n }\n }\n\n isSubCollection<T extends BaseModelWithIdentifier<T>>(\n repository: FirestoreRepository<T>,\n ): repository is FirestoreSubRepository<T> {\n return !isNil(Object.keys(this).find((key) => key === 'parentRepository'))\n }\n }\n}\n","import { BaseModelWithIdentifier, GetRepository, NonFunctionProperties } from '../../../../domain'\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\nimport { isNil, MixinCtor } from '../../../../utils'\nimport { NotFoundError } from '../../../../errors'\n\nexport const withGetFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\n) => {\n return class GetFirestore extends MixinBase implements GetRepository<TBase> {\n async get(identifiers: NonFunctionProperties<TBase>): Promise<TBase> {\n const doc = await this.collection(this.buildCollectionPathForGet(identifiers))\n .doc(Object.values(identifiers).shift().toString())\n .get()\n const data = doc.data()\n\n if (isNil(data)) throw new NotFoundError(`Document ${JSON.stringify(identifiers)} not found`)\n\n return data\n }\n\n buildCollectionPathForGet(identifiers: NonFunctionProperties<TBase>): string {\n return this.isSubCollection(this)\n ? `${this.parentRepository.collectionName}/${identifiers[this.parentIdField]}/${this.collectionName}`\n : this.collectionName\n }\n }\n}\n","import { CollectionReference, Query, WhereFilterOp } from '@firebase/firestore-types'\n\nimport {\n BaseModelWithIdentifier,\n FindRepository,\n NonFunctionPropertyNames,\n RepositoryFindField,\n RepositoryFindFielters,\n RepositoryFindFieltersOptions,\n RepositoryFindResult,\n RepositoryLimitOptions,\n RepositoryOrderByList,\n Where,\n} from '../../../../domain'\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\nimport { MixinCtor, isNil, isNumber, isObject, isString } from '../../../../utils'\n\nexport const withFindFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\n) => {\n const checkIfIsFilterOption = (filter: any): filter is RepositoryFindFieltersOptions<TBase, any> =>\n !isNil(filter?.operator)\n const getValueFromFilter = (filter: RepositoryFindField<TBase, any>): any => {\n return checkIfIsFilterOption(filter) ? filter.value : filter\n }\n\n return class FindFirestore extends MixinBase implements FindRepository<TBase> {\n async find(\n filters?: RepositoryFindFielters<TBase>[],\n limits?: RepositoryLimitOptions<TBase>,\n orderBy?: RepositoryOrderByList<TBase>,\n ): Promise<RepositoryFindResult<TBase>> {\n let query: CollectionReference<TBase> | Query<TBase> = this.collection(this.buildCollectionPathForFind(filters))\n\n filters?.forEach((filterer) => (query = this.makeFirestoreWhere(query, filterer)))\n\n orderBy?.forEach((orderer) =>\n Object.keys(orderer).forEach((fieldName) => (query = query.orderBy(fieldName, orderer[fieldName]))),\n )\n\n query = this.defineLimits(query, filters, limits)\n\n const docs = await query.get()\n const data = docs.docs.map((doc) => doc.data())\n\n return {\n data,\n count: this.calculateCount(data, limits),\n }\n }\n\n buildCollectionPathForFind(filters: RepositoryFindFielters<TBase>[]): string {\n if (!this.isSubCollection<TBase>(this)) return this.collectionName\n\n const parentIdField = this.parentIdField\n const parentId = getValueFromFilter(\n filters.find((groupFilter) => Boolean(getValueFromFilter(groupFilter[parentIdField])))?.[parentIdField],\n )\n\n return `${this.parentRepository.collectionName}/${parentId}/${this.collectionName}`\n }\n\n makeFirestoreWhere = (\n queryReference: CollectionReference<TBase> | Query<TBase>,\n filter: RepositoryFindFielters<TBase>,\n ): Query<TBase> =>\n Object.keys(filter).reduce(\n (query: Query<TBase>, fieldName: string) => this.buildWhereSentence(query, fieldName, filter[fieldName]),\n queryReference,\n )\n\n buildWhereSentence = (\n queryReference: CollectionReference<TBase> | Query<TBase>,\n fieldName: NonFunctionPropertyNames<TBase> | string,\n options: RepositoryFindFieltersOptions<TBase, NonFunctionPropertyNames<TBase>>,\n ): Query<TBase> => {\n if (this.isSubCollection<TBase>(this) && fieldName === this.parentIdField) return queryReference\n if (options?.operator === Where.LIKE) {\n queryReference = queryReference.where(fieldName.toString(), '>=', options.value)\n queryReference = queryReference.where(fieldName.toString(), '<=', `${options.value}~`)\n\n return queryReference\n }\n if (options?.operator === Where.IN && Array.isArray(options?.value))\n return queryReference.where(fieldName.toString(), 'array-contains-any', options.value)\n if (isObject(options) && isNil(options?.operator) && isNil(options?.value))\n return Object.keys(options).reduce(\n (queryReferenceWithWhere, key) =>\n this.buildWhereSentence(queryReferenceWithWhere, `${fieldName}.${key}`, options[key]),\n queryReference,\n )\n\n return queryReference.where(fieldName.toString(), options?.operator || '==', options?.value || options)\n }\n\n defineLimits(\n query: CollectionReference<TBase> | Query<TBase>,\n filters: RepositoryFindFielters<TBase>[],\n limits: RepositoryLimitOptions<TBase>,\n ): Query<TBase> {\n if (limits?.offset) {\n if (limits.offset instanceof this.model)\n query = query.startAfter(\n this.collection(this.buildCollectionPathForFind(filters)).doc(\n limits.offset[limits.offset.identifierFields().shift() as string],\n ),\n )\n if (isNumber(limits.offset) || isString(limits.offset)) query = query.startAt(limits.offset)\n }\n if (limits?.limit) query = query.limit(limits.limit)\n\n return query\n }\n\n calculateCount(data: TBase[], limits: RepositoryLimitOptions<TBase>): number {\n if (data.length <= 0) return 0\n if (data.length < limits?.limit) return data.length\n\n return Infinity\n }\n }\n}\n","import { DocumentReference } from '@firebase/firestore-types'\n\nimport { CreateRepository, BaseModelWithIdentifier } from '../../../../domain'\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\nimport { isEmpty, MixinCtor } from '../../../../utils'\n\nexport const withCreateFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\n) => {\n return class CreateFirestore extends MixinBase implements CreateRepository<TBase> {\n async create(data: Partial<TBase>): Promise<TBase> {\n const docRef = await this.save(this.model.toInstance(data))\n const doc = await docRef.get()\n\n return doc.data()\n }\n\n async save(data: TBase): Promise<DocumentReference<TBase>> {\n const id = data[data.identifierFields().shift()]?.toString()\n\n if (isEmpty(id)) return this.collection(this.buildCollectionPathForAdd(data)).add(data)\n\n const docRef = this.collection().doc(id)\n await docRef.set(data)\n\n return docRef\n }\n\n buildCollectionPathForAdd(identifiers: Partial<TBase>): string {\n return this.isSubCollection(this)\n ? `${this.parentRepository.collectionName}/${identifiers[this.parentIdField]}/${this.collectionName}`\n : this.collectionName\n }\n }\n}\n","import firebase from 'firebase'\n\nimport {\n BaseModelWithIdentifier,\n NonFunctionPropertyNames,\n RepositoryUpdateParams,\n UpdateOptionActions,\n UpdateOptions,\n UpdateRepository,\n} from '../../../../domain'\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\nimport { isNil, MixinCtor, PropType } from '../../../../utils'\n\nexport const withUpdateFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\n) => {\n const getValueFromParams = (\n params: RepositoryUpdateParams<TBase>,\n field: NonFunctionPropertyNames<TBase>,\n ): PropType<TBase, NonFunctionPropertyNames<TBase>> =>\n (isNil(params[field as string]?.value) ? params[field as string] : params[field as string].value) || null\n const getValueByAction = (options: UpdateOptions<TBase>): firebase.firestore.FieldValue | unknown => {\n const fieldValues = firebase.firestore.FieldValue\n\n if (isNil(options.action)) return options\n if (options.action === UpdateOptionActions.REMOVE_FIELD) return fieldValues.delete()\n if (Array.isArray(options.value)) {\n if (options.action === UpdateOptionActions.MERGE) return fieldValues.arrayUnion(...options.value)\n if (options.action === UpdateOptionActions.REMOVE) return fieldValues.arrayRemove(...options.value)\n }\n\n return options.value\n }\n\n return class UpdateFirestore extends MixinBase implements UpdateRepository<TBase> {\n async update(data: RepositoryUpdateParams<TBase>): Promise<TBase> {\n const model = new this.model()\n const keyField = model.identifierFields().shift()\n const docRef = this.collection(this.buildCollectionPathForUpdate(data)).doc(\n getValueFromParams(data, keyField).toString(),\n )\n\n await docRef.set(this.paramsToPlain(data), { merge: true })\n\n const doc = await docRef.get()\n\n return doc.data()\n }\n\n buildCollectionPathForUpdate(identifiers: RepositoryUpdateParams<TBase>): string {\n return this.isSubCollection(this)\n ? `${this.parentRepository.collectionName}/${getValueFromParams(identifiers, this.parentIdField)}/${\n this.collectionName\n }`\n : this.collectionName\n }\n\n paramsToPlain(params: RepositoryUpdateParams<TBase>): Partial<TBase> {\n const model = this.model\n\n if (params instanceof model) return params\n\n return new model(\n Object.keys(params).reduce(\n (data, currentKey) => ({ ...data, [currentKey]: getValueByAction(params[currentKey]) }),\n {},\n ),\n )\n }\n }\n}\n","import { BaseModelWithIdentifier, NonFunctionProperties, DeleteRepository } from '../../../../domain'\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\nimport { MixinCtor } from '../../../../utils'\n\nexport const withDeleteFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\n) => {\n return class DeleteFirestore extends MixinBase implements DeleteRepository<TBase> {\n async delete(identifiers: NonFunctionProperties<TBase>): Promise<void> {\n await this.collection(this.buildCollectionPathForRemove(identifiers))\n .doc(Object.values(identifiers).shift().toString())\n .delete()\n }\n\n buildCollectionPathForRemove(identifiers: NonFunctionProperties<TBase>): string {\n return this.isSubCollection(this)\n ? `${this.parentRepository.collectionName}/${identifiers[this.parentIdField]}/${this.collectionName}`\n : this.collectionName\n }\n }\n}\n","import { CollectionReference, DocumentData, FirebaseFirestore, QueryDocumentSnapshot } from '@firebase/firestore-types'\n\nimport { BaseModelWithIdentifier, NonFunctionPropertyNames } from '../../../../domain'\nimport { FirestoreRepository, FirestoreSubRepository } from '../types'\nimport { MixinCtor } from '../../../../utils'\n\nexport const withSubCollection = <\n TBase extends BaseModelWithIdentifier<TBase>,\n TBaseParent extends BaseModelWithIdentifier<TBaseParent>,\n TMixinBase extends MixinCtor,\n>(\n MixinBase: MixinCtor<FirestoreRepository<TBase>> & TMixinBase,\n ParentModel: new () => TBaseParent,\n) => {\n return class SubCollectionMix\n extends MixinBase\n implements FirestoreSubRepository<TBase, InstanceType<typeof ParentModel>>\n {\n readonly parentRepository: FirestoreRepository<InstanceType<typeof ParentModel>>\n parentIdField: NonFunctionPropertyNames<TBase>\n\n constructor(...args: Array<any>) {\n super(args)\n }\n\n collection(path?: string): CollectionReference<TBase> {\n return super.collection(path)\n }\n }\n}\n","import { BaseModelWithIdentifier, CrudRepository } from '../../../../domain'\nimport { FirestoreHelpers, FirestoreRepository } from '../types'\nimport { MixinCtor } from '../../../../utils'\n\nimport { withCreateFirestore } from './with-create-firestore.mixin'\nimport { withDeleteFirestore } from './with-delete-firestore.mixin'\nimport { withFindFirestore } from './with-find-firestore.mixin'\nimport { withGetFirestore } from './with-get-firestore.mixin'\nimport { withUpdateFirestore } from './with-update-firestore.mixin'\n\nexport const withCrudFirestore = <TBase extends BaseModelWithIdentifier<TBase>, TMixinBase extends MixinCtor>(\n MixinBase: MixinCtor<FirestoreRepository<TBase> & FirestoreHelpers> & TMixinBase,\n) => {\n return class CrudFirestore\n extends withUpdateFirestore(\n withGetFirestore(withFindFirestore(withDeleteFirestore(withCreateFirestore(MixinBase)))),\n )\n implements CrudRepository<TBase> {}\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Subscription, SubscriptionRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class SubscriptionFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<Subscription>(Base)))\n implements SubscriptionRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'subscription'\n this.model = Subscription\n }\n}\n","import { DocumentData, FirebaseFirestore, QueryDocumentSnapshot } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { BeautyProfile, User, UserRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class UserFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<User>(Base)))\n implements UserRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'users'\n this.model = User\n }\n\n async get(identifiers: Partial<User>): Promise<User> {\n const user = await super.get({ id: identifiers.id })\n\n user.beautyProfile = await this.getBeautyProfile(user.id)\n user.isSubscriber = await this.checkIfIsSubscriber(user.id)\n\n return user\n }\n\n buildModelInstance(): {\n toFirestore: (data: User) => DocumentData\n fromFirestore: (snap: QueryDocumentSnapshot<User>) => User\n } {\n const { fromFirestore, toFirestore } = super.buildModelInstance()\n\n return {\n toFirestore: (data: User): DocumentData => {\n const plain = toFirestore(data)\n\n delete plain.isSubscriber\n\n return plain\n },\n fromFirestore,\n }\n }\n\n private async getBeautyProfile(userId: string): Promise<BeautyProfile> {\n const beautyProfile = await this.collection()\n .doc(userId)\n .collection('CX')\n .withConverter(this.buildBeautyProfileModelInstance())\n .doc('beautyProfile')\n .get()\n\n return beautyProfile.data()\n }\n\n private async checkIfIsSubscriber(userId: string): Promise<boolean> {\n const docs = await this.firestore\n .collection('subscription')\n .where('user.id', '==', userId)\n .where('status', '==', 'active')\n .get()\n\n return !!docs && !!docs.size\n }\n\n private buildBeautyProfileModelInstance(): {\n toFirestore: (data: BeautyProfile) => DocumentData\n fromFirestore: (snap: QueryDocumentSnapshot<BeautyProfile>) => BeautyProfile\n } {\n return {\n toFirestore: (data: BeautyProfile): DocumentData => data.toPlain(),\n fromFirestore: (snap: QueryDocumentSnapshot<BeautyProfile>): BeautyProfile =>\n BeautyProfile.toInstance(snap.data()),\n }\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Edition, Subscription, EditionRepository } from '../../../../../domain'\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\n\nimport { SubscriptionFirestoreRepository } from './subscription-firestore.repository'\n\nexport class SubscriptionEditionFirestoreRepository\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<Edition>(Base))), Subscription)\n implements EditionRepository\n{\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: SubscriptionFirestoreRepository) {\n super()\n this.collectionName = 'editions'\n this.parentIdField = 'subscriptionId'\n this.model = Edition\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { BeautyProfile, BeautyProfileRepository, User } from '../../../../../domain'\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\n\nimport { UserFirestoreRepository } from './user-firestore.repository'\n\nexport class UserBeautyProfileFirestoreRepository\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<BeautyProfile>(Base))), User)\n implements BeautyProfileRepository\n{\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: UserFirestoreRepository) {\n super()\n this.collectionName = 'CX'\n this.parentIdField = 'userId'\n this.model = BeautyProfile\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { User, UserAddress, UserAddressRepository } from '../../../../../domain'\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\n\nimport { UserFirestoreRepository } from './user-firestore.repository'\n\nexport class UserAddressFirestoreRepository\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<UserAddress>(Base))), User)\n implements UserAddressRepository\n{\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: UserFirestoreRepository) {\n super()\n this.collectionName = 'address'\n this.parentIdField = 'userId'\n this.model = UserAddress\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { SubscriptionPayment, Subscription, SubscriptionPaymentRepository } from '../../../../../domain'\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\n\nimport { SubscriptionFirestoreRepository } from './subscription-firestore.repository'\n\nexport class SubscriptionPaymentFirestoreRepository\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<SubscriptionPayment>(Base))), Subscription)\n implements SubscriptionPaymentRepository\n{\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: SubscriptionFirestoreRepository) {\n super()\n this.collectionName = 'Payments'\n this.parentIdField = 'subscriptionId'\n this.model = SubscriptionPayment\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Category, CategoryRepository, Product, Shops } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\nimport { DuplicatedResultsError, NotFoundError, RequiredArgumentError } from '../../../../../errors'\n\nexport class CategoryFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<Category>(Base)))\n implements CategoryRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'categories'\n this.model = Category\n }\n\n getCategoryBySlug(slug: string, shop: Shops): Promise<Category> {\n return this.collection(this.collectionName)\n .where('slug', '==', slug)\n .where('shop', '==', shop)\n .where('published', '==', true)\n .get()\n .then((snap) => {\n if (snap.size > 1) throw new DuplicatedResultsError('Query returned duplicated values')\n\n if (snap.empty) throw new NotFoundError(`Document with slug ${slug} not found`)\n\n return snap.docs[0].data()\n })\n .catch((error) => error)\n }\n\n async getCategoriesForHome(categoryIds: string[]): Promise<{ category: Category; products: Product[] }[]> {\n const categorySnap = await this.collection(this.collectionName)\n .where('id', 'in', categoryIds)\n .where('published', '==', true)\n .get()\n\n if (categorySnap.empty) throw new NotFoundError('Categories not found')\n\n const categories = categorySnap.docs.map((doc) => doc.data())\n const homeSections = []\n\n for (const category of categories) {\n const publishedField = category.shop === Shops.GLAMSHOP ? 'publishedGlam' : 'published'\n const productSnap = await this.collection('products')\n .where('categories', 'array-contains', category.id)\n .where(publishedField, '==', true)\n .where('stock.quantity', '>', 1)\n .limit(4)\n .get()\n\n const products = productSnap.docs.map((doc) => doc.data())\n\n homeSections.push({ category, products })\n }\n\n return homeSections\n }\n\n async mountCategory(category: Category): Promise<Product[]> {\n if (!category.products) throw new RequiredArgumentError(['Category products is empty'])\n\n const chunks = category.products.reduce((resultArray, item, index) => {\n const chunkIndex = Math.floor(index / 10)\n\n if (!resultArray[chunkIndex]) resultArray[chunkIndex] = []\n\n resultArray[chunkIndex].push(item)\n\n return resultArray\n }, [])\n\n const products = []\n const publishedField = category.shop === Shops.GLAMSHOP ? 'publishedGlam' : 'published'\n\n for (const productIds of chunks) {\n const productSnap = await this.collection('products')\n .where(publishedField, '==', true)\n .where('id', 'in', productIds)\n .get()\n\n if (productSnap.empty) continue\n\n products.push(...productSnap.docs.map((doc) => doc.data()))\n }\n\n return products\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Product, ProductRepository, Shops, Where } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class ProductFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<Product>(Base)))\n implements ProductRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'products'\n this.model = Product\n }\n\n async getBySlug(slug: string, shop: Shops): Promise<Product> {\n const result = await this.find([\n { slug: { operator: Where.EQUALS, value: slug } },\n { shopAvailability: { operator: Where.IN, value: [shop] } },\n ])\n\n return result?.data?.shift()\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Product, Variant, VariantRepository } from '../../../../../domain'\nimport { withCrudFirestore, withFirestore, withHelpers, withSubCollection } from '../../mixins'\n\nimport { ProductFirestoreRepository } from './product-firestore.repository'\n\nexport class ProductVariantFirestoreRepository\n extends withSubCollection(withCrudFirestore(withHelpers(withFirestore<Variant>(Base))), Product)\n implements VariantRepository\n{\n constructor(readonly firestore: FirebaseFirestore, readonly parentRepository: ProductFirestoreRepository) {\n super()\n this.collectionName = 'variants'\n this.parentIdField = 'productId'\n this.model = Variant\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Checkout, CheckoutRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class CheckoutFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<Checkout>(Base)))\n implements CheckoutRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'checkouts'\n this.model = Checkout\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Coupon, CouponRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class CouponFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<Coupon>(Base)))\n implements CouponRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'coupons'\n this.model = Coupon\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Order, OrderRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class OrderFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<Order>(Base)))\n implements OrderRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'orders'\n this.model = Order\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Payment, PaymentRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class PaymentFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<Payment>(Base)))\n implements PaymentRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'payments'\n this.model = Payment\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { CheckoutSubscription, CheckoutSubscriptionRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class CheckoutSubscriptionFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<CheckoutSubscription>(Base)))\n implements CheckoutSubscriptionRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'checkoutsSubscription'\n this.model = CheckoutSubscription\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { SubscriptionPlan, SubscriptionPlanRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class SubscriptionPlanFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<SubscriptionPlan>(Base)))\n implements SubscriptionPlanRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'subscriptionPlans'\n this.model = SubscriptionPlan\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Buy2Win, Buy2WinRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class Buy2WinFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<Buy2Win>(Base)))\n implements Buy2WinRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'buy2win'\n this.model = Buy2Win\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\n\nimport { Base } from '../../../../../utils'\nimport { Home, HomeRepository } from '../../../../../domain'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class HomeFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<Home>(Base)))\n implements HomeRepository\n{\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'dms'\n this.model = Home\n }\n}\n","import { FirebaseFirestore } from '@firebase/firestore-types'\nimport { ShopMenu, ShopMenuRepository } from '../../../../../domain'\n\nimport { Base } from '../../../../../utils'\n\nimport { withCrudFirestore, withFirestore, withHelpers } from '../../mixins'\n\nexport class ShopMenuFirestoreRepository\n extends withCrudFirestore(withHelpers(withFirestore<ShopMenu>(Base)))\n implements ShopMenuRepository {\n constructor(readonly firestore: FirebaseFirestore) {\n super()\n this.collectionName = 'shopMenus'\n this.model = ShopMenu\n }\n}\n","import firebase from 'firebase/app'\n\nimport { AuthenticationService, LoginAndPasswordParams, User } from '../../../domain'\n\nexport class AuthenticationFirebaseAuthService implements AuthenticationService {\n constructor(private readonly firebaseAuth: firebase.auth.Auth) {}\n\n async signInWithEmailAndPassword(data: LoginAndPasswordParams): Promise<Partial<User>> {\n const credentials = await this.firebaseAuth.signInWithEmailAndPassword(data.email, data.password)\n const user = credentials.user\n\n return { id: user.uid, displayName: user.displayName, email: user.email, phone: user.phoneNumber }\n }\n\n async signInWithGoogle(): Promise<Partial<User>> {\n const credentials = await this.firebaseAuth.signInWithPopup(new firebase.auth.GoogleAuthProvider())\n const user = credentials.user\n\n return { id: user.uid, displayName: user.displayName, email: user.email, phone: user.phoneNumber }\n }\n\n async signOut(): Promise<void> {\n this.firebaseAuth.signOut()\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["firebase"],"mappings":";;;;;;;;;MAIa,SAAS;IACpB,YAAY,IAAqB;QAC/B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;KAC1B;IAED,OAAO,UAAU,CAAgC,IAA8B;QAC7E,OAAO,YAAY,CAAC,IAAI,EAAE,IAAI,CAAQ,CAAA;KACvC;IAED,OAAO;QACL,OAAO,YAAY,CAAC,IAAI,EAAE,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAAC,CAAA;KACxD;;;ICfS;AAAZ,WAAY,KAAK;IACf,sBAAa,CAAA;IACb,iBAAQ,CAAA;IACR,mBAAU,CAAA;IACV,kBAAS,CAAA;IACT,iBAAQ,CAAA;IACR,mBAAU,CAAA;IACV,sBAAa,CAAA;AACf,CAAC,EARW,KAAK,KAAL,KAAK;;ICAL;AAAZ,WAAY,mBAAmB;IAC7B,wCAAiB,CAAA;IACjB,sCAAe,CAAA;IACf,wCAAiB,CAAA;IACjB,mDAA4B,CAAA;IAC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