@infrab4a/connect 4.9.13 → 4.10.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +42 -20
- package/index.esm.js +43 -21
- package/package.json +2 -2
- package/src/domain/catalog/models/wishlist.d.ts +3 -0
- package/src/domain/catalog/repositories/wishlist.repository.d.ts +3 -0
- package/src/domain/users/models/enums/index.d.ts +1 -0
- package/src/domain/users/models/enums/person-types.enum.d.ts +5 -0
- package/src/domain/users/models/index.d.ts +3 -2
- package/src/domain/users/models/types/index.d.ts +1 -0
- package/src/domain/users/models/types/person.type.d.ts +2 -0
- package/src/infra/hasura-graphql/models/wishlist-hasura-graphql.d.ts +4 -0
- package/src/infra/hasura-graphql/repositories/catalog/wishlist-hasura-graphql.repository.d.ts +11 -9
package/index.cjs.js
CHANGED
|
@@ -271,6 +271,17 @@ class CampaignHashtag extends BaseModel {
|
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
+
class BeautyProfile extends BaseModel {
|
|
275
|
+
toPlain() {
|
|
276
|
+
const plain = super.toPlain();
|
|
277
|
+
delete plain.id;
|
|
278
|
+
return plain;
|
|
279
|
+
}
|
|
280
|
+
static get identifiersFields() {
|
|
281
|
+
return ['id', 'userId'];
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
274
285
|
exports.AccessoryImportances = void 0;
|
|
275
286
|
(function (AccessoryImportances) {
|
|
276
287
|
AccessoryImportances["NOT_INTERESTED"] = "N\u00E3o tenho interesse";
|
|
@@ -447,6 +458,13 @@ exports.OfficePosition = void 0;
|
|
|
447
458
|
OfficePosition["Director"] = "Diretor";
|
|
448
459
|
})(exports.OfficePosition || (exports.OfficePosition = {}));
|
|
449
460
|
|
|
461
|
+
exports.PersonTypes = void 0;
|
|
462
|
+
(function (PersonTypes) {
|
|
463
|
+
PersonTypes["GLAMGIRL"] = "glamgirl";
|
|
464
|
+
PersonTypes["BFLU"] = "bflu";
|
|
465
|
+
PersonTypes["NONE"] = "none";
|
|
466
|
+
})(exports.PersonTypes || (exports.PersonTypes = {}));
|
|
467
|
+
|
|
450
468
|
exports.ProductSpents = void 0;
|
|
451
469
|
(function (ProductSpents) {
|
|
452
470
|
ProductSpents["UNTIL_50"] = "At\u00E9 R$50";
|
|
@@ -467,6 +485,12 @@ exports.UserType = void 0;
|
|
|
467
485
|
UserType["Influencer"] = "Influencer";
|
|
468
486
|
})(exports.UserType || (exports.UserType = {}));
|
|
469
487
|
|
|
488
|
+
class Lead extends BaseModel {
|
|
489
|
+
static get identifiersFields() {
|
|
490
|
+
return ['id'];
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
|
|
470
494
|
class Edition extends BaseModel {
|
|
471
495
|
static get identifiersFields() {
|
|
472
496
|
return ['id', 'subscriptionId'];
|
|
@@ -1865,17 +1889,6 @@ class SubscriptionPlan extends BaseModel {
|
|
|
1865
1889
|
}
|
|
1866
1890
|
}
|
|
1867
1891
|
|
|
1868
|
-
class BeautyProfile extends BaseModel {
|
|
1869
|
-
toPlain() {
|
|
1870
|
-
const plain = super.toPlain();
|
|
1871
|
-
delete plain.id;
|
|
1872
|
-
return plain;
|
|
1873
|
-
}
|
|
1874
|
-
static get identifiersFields() {
|
|
1875
|
-
return ['id', 'userId'];
|
|
1876
|
-
}
|
|
1877
|
-
}
|
|
1878
|
-
|
|
1879
1892
|
class User extends BaseModel {
|
|
1880
1893
|
static toInstance(data) {
|
|
1881
1894
|
const instance = super.toInstance(data);
|
|
@@ -1989,12 +2002,6 @@ class UserPaymentMethod extends BaseModel {
|
|
|
1989
2002
|
}
|
|
1990
2003
|
}
|
|
1991
2004
|
|
|
1992
|
-
class Lead extends BaseModel {
|
|
1993
|
-
static get identifiersFields() {
|
|
1994
|
-
return ['id'];
|
|
1995
|
-
}
|
|
1996
|
-
}
|
|
1997
|
-
|
|
1998
2005
|
class UnauthorizedError extends tsCustomError.CustomError {
|
|
1999
2006
|
constructor(message) {
|
|
2000
2007
|
super(message);
|
|
@@ -5921,11 +5928,14 @@ class VariantHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
5921
5928
|
}
|
|
5922
5929
|
}
|
|
5923
5930
|
|
|
5931
|
+
class WishlistHasuraGraphQL extends Wishlist {
|
|
5932
|
+
}
|
|
5933
|
+
|
|
5924
5934
|
class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
|
|
5925
5935
|
constructor({ endpoint, authOptions, interceptors, }, categoryFilterRepository) {
|
|
5926
5936
|
super({
|
|
5927
5937
|
tableName: 'category',
|
|
5928
|
-
model:
|
|
5938
|
+
model: WishlistHasuraGraphQL,
|
|
5929
5939
|
endpoint,
|
|
5930
5940
|
authOptions,
|
|
5931
5941
|
interceptors,
|
|
@@ -6006,8 +6016,11 @@ class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
|
|
|
6006
6016
|
{ personId: { columnName: 'person_id' } },
|
|
6007
6017
|
{ personName: { columnName: 'person_name' } },
|
|
6008
6018
|
{ personPhoto: { columnName: 'person_photo' } },
|
|
6019
|
+
{ personType: { columnName: 'person_type' } },
|
|
6020
|
+
{ personIsSubscriber: { columnName: 'person_is_subscriber' } },
|
|
6009
6021
|
'theme',
|
|
6010
6022
|
{ bannerUrl: { columnName: 'banner_url' } },
|
|
6023
|
+
{ personHasPhoto: { columnName: 'person_has_photo' } },
|
|
6011
6024
|
],
|
|
6012
6025
|
});
|
|
6013
6026
|
this.categoryFilterRepository = categoryFilterRepository;
|
|
@@ -6069,7 +6082,7 @@ class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
|
|
|
6069
6082
|
throw new NotFoundError(`Wishlists from person ${personId} not found`);
|
|
6070
6083
|
return data;
|
|
6071
6084
|
}
|
|
6072
|
-
getCategoryBySlug(slug, _shop) {
|
|
6085
|
+
async getCategoryBySlug(slug, _shop) {
|
|
6073
6086
|
return this.getWishlistBySlug(slug);
|
|
6074
6087
|
}
|
|
6075
6088
|
async getCategoryByShop(shop) {
|
|
@@ -6087,6 +6100,9 @@ class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
|
|
|
6087
6100
|
});
|
|
6088
6101
|
return data;
|
|
6089
6102
|
}
|
|
6103
|
+
async findBfluOrGlamgirlWishlists(params, shops) {
|
|
6104
|
+
return this.find(Object.assign(Object.assign({}, params), { filters: Object.assign(Object.assign({}, params.filters), { published: true, shops: { operator: exports.Where.LIKE, value: shops }, personType: { operator: exports.Where.IN, value: [exports.PersonTypes.BFLU, exports.PersonTypes.GLAMGIRL] } }), orderBy: Object.assign({ personHasPhoto: 'desc' }, lodash.omit(params.orderBy, ['personHasPhoto'])) }));
|
|
6105
|
+
}
|
|
6090
6106
|
getCategoriesForHome(categoryIds, limit, gender) {
|
|
6091
6107
|
return;
|
|
6092
6108
|
}
|
|
@@ -6173,7 +6189,13 @@ tslib.__decorate([
|
|
|
6173
6189
|
tslib.__metadata("design:type", Function),
|
|
6174
6190
|
tslib.__metadata("design:paramtypes", [String]),
|
|
6175
6191
|
tslib.__metadata("design:returntype", Promise)
|
|
6176
|
-
], WishlistHasuraGraphQLRepository.prototype, "getCategoryByShop", null);
|
|
6192
|
+
], WishlistHasuraGraphQLRepository.prototype, "getCategoryByShop", null);
|
|
6193
|
+
tslib.__decorate([
|
|
6194
|
+
Log(),
|
|
6195
|
+
tslib.__metadata("design:type", Function),
|
|
6196
|
+
tslib.__metadata("design:paramtypes", [Object, Array]),
|
|
6197
|
+
tslib.__metadata("design:returntype", Promise)
|
|
6198
|
+
], WishlistHasuraGraphQLRepository.prototype, "findBfluOrGlamgirlWishlists", null);
|
|
6177
6199
|
|
|
6178
6200
|
Object.defineProperty(exports, 'add', {
|
|
6179
6201
|
enumerable: true,
|
package/index.esm.js
CHANGED
|
@@ -265,6 +265,17 @@ class CampaignHashtag extends BaseModel {
|
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
+
class BeautyProfile extends BaseModel {
|
|
269
|
+
toPlain() {
|
|
270
|
+
const plain = super.toPlain();
|
|
271
|
+
delete plain.id;
|
|
272
|
+
return plain;
|
|
273
|
+
}
|
|
274
|
+
static get identifiersFields() {
|
|
275
|
+
return ['id', 'userId'];
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
268
279
|
var AccessoryImportances;
|
|
269
280
|
(function (AccessoryImportances) {
|
|
270
281
|
AccessoryImportances["NOT_INTERESTED"] = "N\u00E3o tenho interesse";
|
|
@@ -441,6 +452,13 @@ var OfficePosition;
|
|
|
441
452
|
OfficePosition["Director"] = "Diretor";
|
|
442
453
|
})(OfficePosition || (OfficePosition = {}));
|
|
443
454
|
|
|
455
|
+
var PersonTypes;
|
|
456
|
+
(function (PersonTypes) {
|
|
457
|
+
PersonTypes["GLAMGIRL"] = "glamgirl";
|
|
458
|
+
PersonTypes["BFLU"] = "bflu";
|
|
459
|
+
PersonTypes["NONE"] = "none";
|
|
460
|
+
})(PersonTypes || (PersonTypes = {}));
|
|
461
|
+
|
|
444
462
|
var ProductSpents;
|
|
445
463
|
(function (ProductSpents) {
|
|
446
464
|
ProductSpents["UNTIL_50"] = "At\u00E9 R$50";
|
|
@@ -461,6 +479,12 @@ var UserType;
|
|
|
461
479
|
UserType["Influencer"] = "Influencer";
|
|
462
480
|
})(UserType || (UserType = {}));
|
|
463
481
|
|
|
482
|
+
class Lead extends BaseModel {
|
|
483
|
+
static get identifiersFields() {
|
|
484
|
+
return ['id'];
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
|
|
464
488
|
class Edition extends BaseModel {
|
|
465
489
|
static get identifiersFields() {
|
|
466
490
|
return ['id', 'subscriptionId'];
|
|
@@ -1859,17 +1883,6 @@ class SubscriptionPlan extends BaseModel {
|
|
|
1859
1883
|
}
|
|
1860
1884
|
}
|
|
1861
1885
|
|
|
1862
|
-
class BeautyProfile extends BaseModel {
|
|
1863
|
-
toPlain() {
|
|
1864
|
-
const plain = super.toPlain();
|
|
1865
|
-
delete plain.id;
|
|
1866
|
-
return plain;
|
|
1867
|
-
}
|
|
1868
|
-
static get identifiersFields() {
|
|
1869
|
-
return ['id', 'userId'];
|
|
1870
|
-
}
|
|
1871
|
-
}
|
|
1872
|
-
|
|
1873
1886
|
class User extends BaseModel {
|
|
1874
1887
|
static toInstance(data) {
|
|
1875
1888
|
const instance = super.toInstance(data);
|
|
@@ -1983,12 +1996,6 @@ class UserPaymentMethod extends BaseModel {
|
|
|
1983
1996
|
}
|
|
1984
1997
|
}
|
|
1985
1998
|
|
|
1986
|
-
class Lead extends BaseModel {
|
|
1987
|
-
static get identifiersFields() {
|
|
1988
|
-
return ['id'];
|
|
1989
|
-
}
|
|
1990
|
-
}
|
|
1991
|
-
|
|
1992
1999
|
class UnauthorizedError extends CustomError {
|
|
1993
2000
|
constructor(message) {
|
|
1994
2001
|
super(message);
|
|
@@ -5915,11 +5922,14 @@ class VariantHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
5915
5922
|
}
|
|
5916
5923
|
}
|
|
5917
5924
|
|
|
5925
|
+
class WishlistHasuraGraphQL extends Wishlist {
|
|
5926
|
+
}
|
|
5927
|
+
|
|
5918
5928
|
class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
|
|
5919
5929
|
constructor({ endpoint, authOptions, interceptors, }, categoryFilterRepository) {
|
|
5920
5930
|
super({
|
|
5921
5931
|
tableName: 'category',
|
|
5922
|
-
model:
|
|
5932
|
+
model: WishlistHasuraGraphQL,
|
|
5923
5933
|
endpoint,
|
|
5924
5934
|
authOptions,
|
|
5925
5935
|
interceptors,
|
|
@@ -6000,8 +6010,11 @@ class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
|
|
|
6000
6010
|
{ personId: { columnName: 'person_id' } },
|
|
6001
6011
|
{ personName: { columnName: 'person_name' } },
|
|
6002
6012
|
{ personPhoto: { columnName: 'person_photo' } },
|
|
6013
|
+
{ personType: { columnName: 'person_type' } },
|
|
6014
|
+
{ personIsSubscriber: { columnName: 'person_is_subscriber' } },
|
|
6003
6015
|
'theme',
|
|
6004
6016
|
{ bannerUrl: { columnName: 'banner_url' } },
|
|
6017
|
+
{ personHasPhoto: { columnName: 'person_has_photo' } },
|
|
6005
6018
|
],
|
|
6006
6019
|
});
|
|
6007
6020
|
this.categoryFilterRepository = categoryFilterRepository;
|
|
@@ -6063,7 +6076,7 @@ class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
|
|
|
6063
6076
|
throw new NotFoundError(`Wishlists from person ${personId} not found`);
|
|
6064
6077
|
return data;
|
|
6065
6078
|
}
|
|
6066
|
-
getCategoryBySlug(slug, _shop) {
|
|
6079
|
+
async getCategoryBySlug(slug, _shop) {
|
|
6067
6080
|
return this.getWishlistBySlug(slug);
|
|
6068
6081
|
}
|
|
6069
6082
|
async getCategoryByShop(shop) {
|
|
@@ -6081,6 +6094,9 @@ class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
|
|
|
6081
6094
|
});
|
|
6082
6095
|
return data;
|
|
6083
6096
|
}
|
|
6097
|
+
async findBfluOrGlamgirlWishlists(params, shops) {
|
|
6098
|
+
return this.find(Object.assign(Object.assign({}, params), { filters: Object.assign(Object.assign({}, params.filters), { published: true, shops: { operator: Where.LIKE, value: shops }, personType: { operator: Where.IN, value: [PersonTypes.BFLU, PersonTypes.GLAMGIRL] } }), orderBy: Object.assign({ personHasPhoto: 'desc' }, omit(params.orderBy, ['personHasPhoto'])) }));
|
|
6099
|
+
}
|
|
6084
6100
|
getCategoriesForHome(categoryIds, limit, gender) {
|
|
6085
6101
|
return;
|
|
6086
6102
|
}
|
|
@@ -6167,6 +6183,12 @@ __decorate([
|
|
|
6167
6183
|
__metadata("design:type", Function),
|
|
6168
6184
|
__metadata("design:paramtypes", [String]),
|
|
6169
6185
|
__metadata("design:returntype", Promise)
|
|
6170
|
-
], WishlistHasuraGraphQLRepository.prototype, "getCategoryByShop", null);
|
|
6186
|
+
], WishlistHasuraGraphQLRepository.prototype, "getCategoryByShop", null);
|
|
6187
|
+
__decorate([
|
|
6188
|
+
Log(),
|
|
6189
|
+
__metadata("design:type", Function),
|
|
6190
|
+
__metadata("design:paramtypes", [Object, Array]),
|
|
6191
|
+
__metadata("design:returntype", Promise)
|
|
6192
|
+
], WishlistHasuraGraphQLRepository.prototype, "findBfluOrGlamgirlWishlists", null);
|
|
6171
6193
|
|
|
6172
|
-
export { AccessoryImportances, Address, Area, Authentication, AuthenticationFirebaseAuthService, AxiosAdapter, Base, BaseModel, BeardProblems, BeardSizes, BeautyProductImportances, BeautyProfile, BeautyQuestionsHelper, BillingStatus, BodyProblems, BodyShapes, BodyTattoos, Buy2Win, Buy2WinFirestoreRepository, Campaign, CampaignBanner, CampaignDashboard, CampaignDashboardFirestoreRepository, CampaignHashtag, CampaignHashtagFirestoreRepository, Category, CategoryCollectionChildren, CategoryCollectionChildrenHasuraGraphQLRepository, CategoryFilter, CategoryFilterHasuraGraphQLRepository, CategoryFirestoreRepository, CategoryHasuraGraphQL, CategoryHasuraGraphQLRepository, Checkout, CheckoutFirestoreRepository, CheckoutSubscription, CheckoutSubscriptionFirestoreRepository, CheckoutTypes, ClassNameHelper, ConnectBaseDocumentSnapshot, ConnectCollectionService, ConnectDocumentService, ConnectFirestoreService, Coupon, CouponFirestoreRepository, CouponSubtypes, CouponTypes, Debug, DebugDecoratorHelper, DebugHelper, DebugNamespaces, DuplicatedResultsError, Edition, EditionStatus, Exclusivities, FaceSkinOilinesses, FaceSkinProblems, FaceSkinTones, FamilyIncomes, Filter, FilterHasuraGraphQLRepository, FilterOption, FilterOptionHasuraGraphQLRepository, FilterType, FirebaseFileUploaderService, FragranceImportances, GenderDestination, HairColors, HairProblems, HairStrands, HairTypes, Home, HomeFirestoreRepository, InvalidArgumentError, KitProduct, KitProductHasuraGraphQL, Lead, LeadFirestoreRepository, LegacyOrderFirestoreRepository, LineItem, Log, Logger, NotFoundError, OfficePosition, Order, OrderFirestoreRepository, OrderStatus, Payment, PaymentFirestoreRepository, PaymentType, Plans, Product, ProductFirestoreRepository, ProductHasuraGraphQL, ProductHasuraGraphQLRepository, ProductReviews, ProductReviewsHasuraGraphQLRepository, ProductSpents, ProductStockNotification, ProductStockNotificationHasuraGraphQLRepository, ProductVariantFirestoreRepository, ProductsIndex, QuestionsFilters, RecoveryPassword, ReflectHelper, Register, RegisterFirebaseAuthService, RequiredArgumentError, RoundProductPricesHelper, ShippingMethod, ShopMenu, ShopMenuFirestoreRepository, ShopPageName, ShopSettings, ShopSettingsFirestoreRepository, Shops, SignInMethods, SignOut, Status, Subscription, SubscriptionEditionFirestoreRepository, SubscriptionFirestoreRepository, SubscriptionMaterialization, SubscriptionMaterializationFirestoreRepository, SubscriptionPayment, SubscriptionPaymentFirestoreRepository, SubscriptionPlan, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, SubscriptionSummary, SubscriptionSummaryFirestoreRepository, Trace, UnauthorizedError, UpdateOptionActions, UpdateUserImage, User, UserAddress, UserAddressFirestoreRepository, UserAlreadyRegisteredError, UserBeautyProfileFirestoreRepository, UserFirestoreRepository, UserPaymentMethod, UserPaymentMethodFirestoreRepository, UserType, Variant, VariantHasuraGraphQL, VariantHasuraGraphQLRepository, WeakPasswordError, Where, Wishlist, WishlistHasuraGraphQLRepository, is, isDebuggable, isUUID, parseDateTime, withCreateFirestore, withCreateHasuraGraphQL, withCrudFirestore, withCrudHasuraGraphQL, withDeleteFirestore, withDeleteHasuraGraphQL, withFindFirestore, withFindHasuraGraphQL, withFirestore, withGetFirestore, withGetHasuraGraphQL, withHasuraGraphQL, withHelpers, withSubCollection, withUpdateFirestore, withUpdateHasuraGraphQL };
|
|
6194
|
+
export { AccessoryImportances, Address, Area, Authentication, AuthenticationFirebaseAuthService, AxiosAdapter, Base, BaseModel, BeardProblems, BeardSizes, BeautyProductImportances, BeautyProfile, BeautyQuestionsHelper, BillingStatus, BodyProblems, BodyShapes, BodyTattoos, Buy2Win, Buy2WinFirestoreRepository, Campaign, CampaignBanner, CampaignDashboard, CampaignDashboardFirestoreRepository, CampaignHashtag, CampaignHashtagFirestoreRepository, Category, CategoryCollectionChildren, CategoryCollectionChildrenHasuraGraphQLRepository, CategoryFilter, CategoryFilterHasuraGraphQLRepository, CategoryFirestoreRepository, CategoryHasuraGraphQL, CategoryHasuraGraphQLRepository, Checkout, CheckoutFirestoreRepository, CheckoutSubscription, CheckoutSubscriptionFirestoreRepository, CheckoutTypes, ClassNameHelper, ConnectBaseDocumentSnapshot, ConnectCollectionService, ConnectDocumentService, ConnectFirestoreService, Coupon, CouponFirestoreRepository, CouponSubtypes, CouponTypes, Debug, DebugDecoratorHelper, DebugHelper, DebugNamespaces, DuplicatedResultsError, Edition, EditionStatus, Exclusivities, FaceSkinOilinesses, FaceSkinProblems, FaceSkinTones, FamilyIncomes, Filter, FilterHasuraGraphQLRepository, FilterOption, FilterOptionHasuraGraphQLRepository, FilterType, FirebaseFileUploaderService, FragranceImportances, GenderDestination, HairColors, HairProblems, HairStrands, HairTypes, Home, HomeFirestoreRepository, InvalidArgumentError, KitProduct, KitProductHasuraGraphQL, Lead, LeadFirestoreRepository, LegacyOrderFirestoreRepository, LineItem, Log, Logger, NotFoundError, OfficePosition, Order, OrderFirestoreRepository, OrderStatus, Payment, PaymentFirestoreRepository, PaymentType, PersonTypes, Plans, Product, ProductFirestoreRepository, ProductHasuraGraphQL, ProductHasuraGraphQLRepository, ProductReviews, ProductReviewsHasuraGraphQLRepository, ProductSpents, ProductStockNotification, ProductStockNotificationHasuraGraphQLRepository, ProductVariantFirestoreRepository, ProductsIndex, QuestionsFilters, RecoveryPassword, ReflectHelper, Register, RegisterFirebaseAuthService, RequiredArgumentError, RoundProductPricesHelper, ShippingMethod, ShopMenu, ShopMenuFirestoreRepository, ShopPageName, ShopSettings, ShopSettingsFirestoreRepository, Shops, SignInMethods, SignOut, Status, Subscription, SubscriptionEditionFirestoreRepository, SubscriptionFirestoreRepository, SubscriptionMaterialization, SubscriptionMaterializationFirestoreRepository, SubscriptionPayment, SubscriptionPaymentFirestoreRepository, SubscriptionPlan, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, SubscriptionSummary, SubscriptionSummaryFirestoreRepository, Trace, UnauthorizedError, UpdateOptionActions, UpdateUserImage, User, UserAddress, UserAddressFirestoreRepository, UserAlreadyRegisteredError, UserBeautyProfileFirestoreRepository, UserFirestoreRepository, UserPaymentMethod, UserPaymentMethodFirestoreRepository, UserType, Variant, VariantHasuraGraphQL, VariantHasuraGraphQLRepository, WeakPasswordError, Where, Wishlist, WishlistHasuraGraphQLRepository, is, isDebuggable, isUUID, parseDateTime, withCreateFirestore, withCreateHasuraGraphQL, withCrudFirestore, withCrudHasuraGraphQL, withDeleteFirestore, withDeleteHasuraGraphQL, withFindFirestore, withFindHasuraGraphQL, withFirestore, withGetFirestore, withGetHasuraGraphQL, withHasuraGraphQL, withHelpers, withSubCollection, withUpdateFirestore, withUpdateHasuraGraphQL };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infrab4a/connect",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.10.0-beta.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org"
|
|
6
6
|
},
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"class-transformer": "^0.5.1",
|
|
14
14
|
"date-fns": "^2.28.0",
|
|
15
15
|
"debug": "^4.3.4",
|
|
16
|
-
"firebase": "^9.
|
|
16
|
+
"firebase": "^9.22.0",
|
|
17
17
|
"gql-query-builder": "3.7.0",
|
|
18
18
|
"lodash": "^4.17.21",
|
|
19
19
|
"reflect-metadata": "^0.1.13",
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { GenericIdentifier } from '../../generic/model';
|
|
2
|
+
import { PersonType } from '../../users';
|
|
2
3
|
import { Category } from './category';
|
|
3
4
|
export declare class Wishlist extends Category {
|
|
4
5
|
personId?: string;
|
|
5
6
|
personName?: string;
|
|
6
7
|
personPhoto?: string;
|
|
8
|
+
personType?: PersonType;
|
|
9
|
+
personIsSubscriber?: boolean;
|
|
7
10
|
static get identifiersFields(): GenericIdentifier[];
|
|
8
11
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { CategoryRepository } from '.';
|
|
2
|
+
import { FindRepositoryParams, RepositoryFindResult } from '../../generic';
|
|
3
|
+
import { Shops } from '../models';
|
|
2
4
|
import { Wishlist } from '../models/wishlist';
|
|
3
5
|
export interface WishlistRepository extends CategoryRepository {
|
|
4
6
|
getWishlistBySlug(slug: string): Promise<Wishlist>;
|
|
5
7
|
getWishlistByPerson(personId: string): Promise<Wishlist[]>;
|
|
8
|
+
findBfluOrGlamgirlWishlists(params: FindRepositoryParams<Wishlist>, shops: Shops[]): Promise<RepositoryFindResult<Wishlist>>;
|
|
6
9
|
}
|
|
@@ -16,5 +16,6 @@ export * from './hair-problems.enum';
|
|
|
16
16
|
export * from './hair-strands.enum';
|
|
17
17
|
export * from './hair-types.enum';
|
|
18
18
|
export * from './office-position.enum';
|
|
19
|
+
export * from './person-types.enum';
|
|
19
20
|
export * from './product-spents.enum';
|
|
20
21
|
export * from './user-type.enum';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
export * from './beauty-profile';
|
|
1
2
|
export * from './enums';
|
|
3
|
+
export * from './lead';
|
|
2
4
|
export * from './subscription';
|
|
5
|
+
export * from './types';
|
|
3
6
|
export * from './user';
|
|
4
|
-
export * from './beauty-profile';
|
|
5
7
|
export * from './user-address';
|
|
6
8
|
export * from './user-payment-method';
|
|
7
|
-
export * from './lead';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './person.type';
|
package/src/infra/hasura-graphql/repositories/catalog/wishlist-hasura-graphql.repository.d.ts
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { Category, CreateRepositoryParams, FindRepositoryParams, GetRepositoryParams, Product, RepositoryFindResult, Shops, UpdateRepositoryParams, Wishlist, WishlistRepository } from '../../../../domain';
|
|
2
2
|
import { HasuraConstructorParams } from '../../mixins';
|
|
3
|
+
import { WishlistHasuraGraphQL } from '../../models/wishlist-hasura-graphql';
|
|
3
4
|
import { CategoryFilterHasuraGraphQLRepository } from './category-filter-hasura-graphql.repository';
|
|
4
|
-
declare const WishlistHasuraGraphQLRepository_base: import("../../../../utils").MixinCtor<import("../..").GraphQLRepository<
|
|
5
|
-
paramsToPlain(params: import("../../../../domain").RepositoryUpdateParams<
|
|
6
|
-
}, [HasuraConstructorParams<
|
|
5
|
+
declare const WishlistHasuraGraphQLRepository_base: import("../../../../utils").MixinCtor<import("../..").GraphQLRepository<WishlistHasuraGraphQL> & import("../../../../domain").CrudRepository<WishlistHasuraGraphQL, import("../../../../domain").CrudParams<WishlistHasuraGraphQL>> & import("../../../../domain").UpdateRepository<WishlistHasuraGraphQL, import("../../../../domain").RepositoryUpdateParams<WishlistHasuraGraphQL>> & {
|
|
6
|
+
paramsToPlain(params: import("../../../../domain").RepositoryUpdateParams<WishlistHasuraGraphQL>): Partial<WishlistHasuraGraphQL>;
|
|
7
|
+
}, [HasuraConstructorParams<WishlistHasuraGraphQL> & import("../../mixins").CreateConstructorParams & import("../../mixins").DeleteConstructorParams & import("../../mixins").GetConstructorParams & import("../../mixins").UpdateConstructorParams, ...any[]]>;
|
|
7
8
|
export declare class WishlistHasuraGraphQLRepository extends WishlistHasuraGraphQLRepository_base implements WishlistRepository {
|
|
8
9
|
private readonly categoryFilterRepository;
|
|
9
10
|
constructor({ endpoint, authOptions, interceptors, }: Pick<HasuraConstructorParams<Wishlist>, 'endpoint' | 'authOptions' | 'interceptors'>, categoryFilterRepository: CategoryFilterHasuraGraphQLRepository);
|
|
10
|
-
create(params: CreateRepositoryParams<
|
|
11
|
-
get(identifiers: GetRepositoryParams<
|
|
12
|
-
find(params?: FindRepositoryParams<
|
|
13
|
-
update(params: UpdateRepositoryParams<
|
|
14
|
-
getWishlistBySlug(slug: string): Promise<
|
|
15
|
-
getWishlistByPerson(personId: string): Promise<
|
|
11
|
+
create(params: CreateRepositoryParams<WishlistHasuraGraphQL>): Promise<WishlistHasuraGraphQL>;
|
|
12
|
+
get(identifiers: GetRepositoryParams<WishlistHasuraGraphQL>): Promise<WishlistHasuraGraphQL>;
|
|
13
|
+
find(params?: FindRepositoryParams<WishlistHasuraGraphQL>): Promise<RepositoryFindResult<WishlistHasuraGraphQL>>;
|
|
14
|
+
update(params: UpdateRepositoryParams<WishlistHasuraGraphQL>): Promise<WishlistHasuraGraphQL>;
|
|
15
|
+
getWishlistBySlug(slug: string): Promise<WishlistHasuraGraphQL>;
|
|
16
|
+
getWishlistByPerson(personId: string): Promise<WishlistHasuraGraphQL[]>;
|
|
16
17
|
getCategoryBySlug(slug: string, _shop: Shops): Promise<Wishlist>;
|
|
17
18
|
getCategoryByShop(shop: string): Promise<any>;
|
|
19
|
+
findBfluOrGlamgirlWishlists(params: FindRepositoryParams<WishlistHasuraGraphQL>, shops: Shops[]): Promise<RepositoryFindResult<WishlistHasuraGraphQL>>;
|
|
18
20
|
getCategoriesForHome(categoryIds: string[], limit?: number, gender?: string): any;
|
|
19
21
|
mountCategory(category: Category, options?: {
|
|
20
22
|
limit?: number;
|