@infrab4a/connect 4.1.5-beta.2 → 4.1.6-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 CHANGED
@@ -2140,6 +2140,12 @@ tslib_1.__decorate([
2140
2140
  tslib_1.__metadata("design:type", Array)
2141
2141
  ], Product.prototype, "kitProducts", void 0);
2142
2142
 
2143
+ class ProductReviews extends BaseModel {
2144
+ static get identifiersFields() {
2145
+ return ['id'];
2146
+ }
2147
+ }
2148
+
2143
2149
  class Variant extends BaseModel {
2144
2150
  static get identifiersFields() {
2145
2151
  return ['id', 'productId'];
@@ -4792,10 +4798,9 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
4792
4798
  howToUse: data.how_to_use,
4793
4799
  brand: data.brand_description,
4794
4800
  ingredients: data.ingredients,
4795
- purpose: data.purpose,
4796
4801
  }),
4797
4802
  bindFindFilter: (filters) => {
4798
- return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, ((filters === null || filters === void 0 ? void 0 : filters.description) && { description: filters.description })), (filters.differentials && { differentials: filters.differentials })), (filters.whoMustUse && {
4803
+ return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, ((filters === null || filters === void 0 ? void 0 : filters.description) && { description: filters.description })), (filters.differentials && { differentials: filters.differentials })), (filters.whoMustUse && {
4799
4804
  who_must_use: filters.whoMustUse,
4800
4805
  })), (filters.howToUse && {
4801
4806
  how_to_use: filters.howToUse,
@@ -4803,13 +4808,11 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
4803
4808
  brand_description: filters.brand,
4804
4809
  })), (filters.ingredients && {
4805
4810
  ingredients: filters.ingredients,
4806
- })), (filters.purpose && {
4807
- purpose: filters.purpose,
4808
4811
  }));
4809
4812
  },
4810
- bindPersistData: (descriptionData) => (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, ((descriptionData === null || descriptionData === void 0 ? void 0 : descriptionData.description) && { description: descriptionData.description })), (descriptionData.differentials && { differentials: descriptionData.differentials })), (descriptionData.whoMustUse && {
4813
+ bindPersistData: (descriptionData) => (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, ((descriptionData === null || descriptionData === void 0 ? void 0 : descriptionData.description) && { description: descriptionData.description })), (descriptionData.differentials && { differentials: descriptionData.differentials })), (descriptionData.whoMustUse && {
4811
4814
  who_must_use: descriptionData.whoMustUse,
4812
- })), (descriptionData.howToUse && { how_to_use: descriptionData.howToUse })), (descriptionData.brand && { brand_description: descriptionData.brand })), (descriptionData.ingredients && { ingredients: descriptionData.ingredients })), (descriptionData.purpose && { ingredients: descriptionData.purpose }))),
4815
+ })), (descriptionData.howToUse && { how_to_use: descriptionData.howToUse })), (descriptionData.brand && { brand_description: descriptionData.brand })), (descriptionData.ingredients && { ingredients: descriptionData.ingredients }))),
4813
4816
  },
4814
4817
  },
4815
4818
  { differentials: { columnName: 'differentials' } },
@@ -4817,7 +4820,6 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
4817
4820
  { howToUse: { columnName: 'how_to_use' } },
4818
4821
  { brandDescription: { columnName: 'brand_description' } },
4819
4822
  { ingredients: { columnName: 'ingredients' } },
4820
- { purpose: { columnName: 'purpose' } },
4821
4823
  { hasVariants: { columnName: 'has_variants' } },
4822
4824
  {
4823
4825
  images: {
@@ -5201,6 +5203,35 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
5201
5203
  }
5202
5204
  }
5203
5205
 
5206
+ class ProductReviewsHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
5207
+ constructor({ endpoint, authOptions, interceptors, }) {
5208
+ super({
5209
+ tableName: 'product_review',
5210
+ model: ProductReviews,
5211
+ endpoint,
5212
+ authOptions,
5213
+ interceptors,
5214
+ fields: [
5215
+ 'id',
5216
+ { productId: { columnName: 'product_id' } },
5217
+ 'shop',
5218
+ 'rate',
5219
+ 'author',
5220
+ 'email',
5221
+ 'location',
5222
+ 'review',
5223
+ 'status',
5224
+ 'title',
5225
+ { personId: { columnName: 'person_id' } },
5226
+ 'points',
5227
+ { orderId: { columnName: 'order_id' } },
5228
+ { createdAt: { columnName: 'created_at' } },
5229
+ { updatedAt: { columnName: 'updated_at' } },
5230
+ ],
5231
+ });
5232
+ }
5233
+ }
5234
+
5204
5235
  class VariantHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
5205
5236
  constructor({ endpoint, authOptions, interceptors, }) {
5206
5237
  super({
@@ -5697,6 +5728,8 @@ exports.Product = Product;
5697
5728
  exports.ProductFirestoreRepository = ProductFirestoreRepository;
5698
5729
  exports.ProductHasuraGraphQL = ProductHasuraGraphQL;
5699
5730
  exports.ProductHasuraGraphQLRepository = ProductHasuraGraphQLRepository;
5731
+ exports.ProductReviews = ProductReviews;
5732
+ exports.ProductReviewsHasuraGraphQLRepository = ProductReviewsHasuraGraphQLRepository;
5700
5733
  exports.ProductVariantFirestoreRepository = ProductVariantFirestoreRepository;
5701
5734
  exports.ProductsIndex = ProductsIndex;
5702
5735
  exports.RecoveryPassword = RecoveryPassword;
package/index.esm.js CHANGED
@@ -2116,6 +2116,12 @@ __decorate([
2116
2116
  __metadata("design:type", Array)
2117
2117
  ], Product.prototype, "kitProducts", void 0);
2118
2118
 
2119
+ class ProductReviews extends BaseModel {
2120
+ static get identifiersFields() {
2121
+ return ['id'];
2122
+ }
2123
+ }
2124
+
2119
2125
  class Variant extends BaseModel {
2120
2126
  static get identifiersFields() {
2121
2127
  return ['id', 'productId'];
@@ -4768,10 +4774,9 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
4768
4774
  howToUse: data.how_to_use,
4769
4775
  brand: data.brand_description,
4770
4776
  ingredients: data.ingredients,
4771
- purpose: data.purpose,
4772
4777
  }),
4773
4778
  bindFindFilter: (filters) => {
4774
- return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, ((filters === null || filters === void 0 ? void 0 : filters.description) && { description: filters.description })), (filters.differentials && { differentials: filters.differentials })), (filters.whoMustUse && {
4779
+ return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, ((filters === null || filters === void 0 ? void 0 : filters.description) && { description: filters.description })), (filters.differentials && { differentials: filters.differentials })), (filters.whoMustUse && {
4775
4780
  who_must_use: filters.whoMustUse,
4776
4781
  })), (filters.howToUse && {
4777
4782
  how_to_use: filters.howToUse,
@@ -4779,13 +4784,11 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
4779
4784
  brand_description: filters.brand,
4780
4785
  })), (filters.ingredients && {
4781
4786
  ingredients: filters.ingredients,
4782
- })), (filters.purpose && {
4783
- purpose: filters.purpose,
4784
4787
  }));
4785
4788
  },
4786
- bindPersistData: (descriptionData) => (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, ((descriptionData === null || descriptionData === void 0 ? void 0 : descriptionData.description) && { description: descriptionData.description })), (descriptionData.differentials && { differentials: descriptionData.differentials })), (descriptionData.whoMustUse && {
4789
+ bindPersistData: (descriptionData) => (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, ((descriptionData === null || descriptionData === void 0 ? void 0 : descriptionData.description) && { description: descriptionData.description })), (descriptionData.differentials && { differentials: descriptionData.differentials })), (descriptionData.whoMustUse && {
4787
4790
  who_must_use: descriptionData.whoMustUse,
4788
- })), (descriptionData.howToUse && { how_to_use: descriptionData.howToUse })), (descriptionData.brand && { brand_description: descriptionData.brand })), (descriptionData.ingredients && { ingredients: descriptionData.ingredients })), (descriptionData.purpose && { ingredients: descriptionData.purpose }))),
4791
+ })), (descriptionData.howToUse && { how_to_use: descriptionData.howToUse })), (descriptionData.brand && { brand_description: descriptionData.brand })), (descriptionData.ingredients && { ingredients: descriptionData.ingredients }))),
4789
4792
  },
4790
4793
  },
4791
4794
  { differentials: { columnName: 'differentials' } },
@@ -4793,7 +4796,6 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
4793
4796
  { howToUse: { columnName: 'how_to_use' } },
4794
4797
  { brandDescription: { columnName: 'brand_description' } },
4795
4798
  { ingredients: { columnName: 'ingredients' } },
4796
- { purpose: { columnName: 'purpose' } },
4797
4799
  { hasVariants: { columnName: 'has_variants' } },
4798
4800
  {
4799
4801
  images: {
@@ -5177,6 +5179,35 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
5177
5179
  }
5178
5180
  }
5179
5181
 
5182
+ class ProductReviewsHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
5183
+ constructor({ endpoint, authOptions, interceptors, }) {
5184
+ super({
5185
+ tableName: 'product_review',
5186
+ model: ProductReviews,
5187
+ endpoint,
5188
+ authOptions,
5189
+ interceptors,
5190
+ fields: [
5191
+ 'id',
5192
+ { productId: { columnName: 'product_id' } },
5193
+ 'shop',
5194
+ 'rate',
5195
+ 'author',
5196
+ 'email',
5197
+ 'location',
5198
+ 'review',
5199
+ 'status',
5200
+ 'title',
5201
+ { personId: { columnName: 'person_id' } },
5202
+ 'points',
5203
+ { orderId: { columnName: 'order_id' } },
5204
+ { createdAt: { columnName: 'created_at' } },
5205
+ { updatedAt: { columnName: 'updated_at' } },
5206
+ ],
5207
+ });
5208
+ }
5209
+ }
5210
+
5180
5211
  class VariantHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
5181
5212
  constructor({ endpoint, authOptions, interceptors, }) {
5182
5213
  super({
@@ -5501,4 +5532,4 @@ class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
5501
5532
  }
5502
5533
  }
5503
5534
 
5504
- 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, Coupon, CouponFirestoreRepository, CouponSubtypes, CouponTypes, Debug, DebugDecoratorHelper, DebugHelper, DebugNamespaces, DuplicatedResultsError, Edition, EditionStatus, Exclusivities, FaceSkinOilinesses, FaceSkinProblems, FaceSkinTones, FamilyIncomes, Filter, FilterHasuraGraphQLRepository, FilterOption, FilterOptionHasuraGraphQLRepository, FilterType, 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, Product, ProductFirestoreRepository, ProductHasuraGraphQL, ProductHasuraGraphQLRepository, ProductSpents, ProductVariantFirestoreRepository, ProductsIndex, QuestionsFilters, RecoveryPassword, ReflectHelper, Register, RegisterFirebaseAuthService, RequiredArgumentError, RoundProductPricesHelper, ShippingMethod, ShopMenu, ShopMenuFirestoreRepository, ShopPageName, ShopSettings, ShopSettingsFirestoreRepository, Shops, SignInMethods, SignOut, Status, Subscription, SubscriptionEditionFirestoreRepository, SubscriptionFirestoreRepository, SubscriptionPayment, SubscriptionPaymentFirestoreRepository, SubscriptionPlan, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, Trace, UnauthorizedError, UpdateOptionActions, 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 };
5535
+ 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, Coupon, CouponFirestoreRepository, CouponSubtypes, CouponTypes, Debug, DebugDecoratorHelper, DebugHelper, DebugNamespaces, DuplicatedResultsError, Edition, EditionStatus, Exclusivities, FaceSkinOilinesses, FaceSkinProblems, FaceSkinTones, FamilyIncomes, Filter, FilterHasuraGraphQLRepository, FilterOption, FilterOptionHasuraGraphQLRepository, FilterType, 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, Product, ProductFirestoreRepository, ProductHasuraGraphQL, ProductHasuraGraphQLRepository, ProductReviews, ProductReviewsHasuraGraphQLRepository, ProductSpents, ProductVariantFirestoreRepository, ProductsIndex, QuestionsFilters, RecoveryPassword, ReflectHelper, Register, RegisterFirebaseAuthService, RequiredArgumentError, RoundProductPricesHelper, ShippingMethod, ShopMenu, ShopMenuFirestoreRepository, ShopPageName, ShopSettings, ShopSettingsFirestoreRepository, Shops, SignInMethods, SignOut, Status, Subscription, SubscriptionEditionFirestoreRepository, SubscriptionFirestoreRepository, SubscriptionPayment, SubscriptionPaymentFirestoreRepository, SubscriptionPlan, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, Trace, UnauthorizedError, UpdateOptionActions, 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.1.5-beta.2",
3
+ "version": "4.1.6-beta-0",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },
@@ -6,6 +6,7 @@ export * from './filter';
6
6
  export * from './filter-option';
7
7
  export * from './kit-product';
8
8
  export * from './product';
9
+ export * from './product-reviews';
9
10
  export * from './types';
10
11
  export * from './variant';
11
12
  export * from './wishlist';
@@ -0,0 +1,20 @@
1
+ import { BaseModel, GenericIdentifier } from '../../generic/model';
2
+ import { Shops } from './enums';
3
+ export declare class ProductReviews extends BaseModel<ProductReviews> {
4
+ id: number;
5
+ productId: number;
6
+ shop: Shops;
7
+ rate: number;
8
+ author?: string;
9
+ email?: string;
10
+ location?: string;
11
+ review?: string;
12
+ status?: boolean;
13
+ title?: string;
14
+ personId?: number;
15
+ points?: number;
16
+ orderId?: string;
17
+ createdAt?: Date;
18
+ updatedAt?: Date;
19
+ static get identifiersFields(): GenericIdentifier[];
20
+ }
@@ -5,5 +5,4 @@ export type ShopDescription = {
5
5
  howToUse?: string;
6
6
  brand?: string;
7
7
  ingredients?: string;
8
- purpose?: string;
9
8
  };
@@ -3,6 +3,7 @@ export * from './category-filter.repository';
3
3
  export * from './category.repository';
4
4
  export * from './filter-option.repository';
5
5
  export * from './filter.repository';
6
+ export * from './product-reviews.repository';
6
7
  export * from './product.repository';
7
8
  export * from './subscription-product.repository';
8
9
  export * from './variant.repository';
@@ -0,0 +1,4 @@
1
+ import { CrudRepository } from '../../generic/repository/crud.repository';
2
+ import { ProductReviews } from '../models';
3
+ export interface ProductReviewsRepository extends CrudRepository<ProductReviews> {
4
+ }
@@ -4,5 +4,6 @@ export * from './category-hasura-graphql.repository';
4
4
  export * from './filter-hasura-graphql.repository';
5
5
  export * from './filter-option-hasura-graphql.repository';
6
6
  export * from './product-hasura-graphql.repository';
7
+ export * from './product-review-hasura-graphql.repository';
7
8
  export * from './variant-hasura-graphql.repository';
8
9
  export * from './wishlist-hasura-graphql.repository';
@@ -0,0 +1,10 @@
1
+ import { ProductReviews } from '../../../../domain';
2
+ import { ProductReviewsRepository } from '../../../../domain/catalog/repositories';
3
+ import { HasuraConstructorParams } from '../../mixins';
4
+ declare const ProductReviewsHasuraGraphQLRepository_base: import("../../../../utils").MixinCtor<import("../..").GraphQLRepository<ProductReviews> & import("../../../../domain").CrudRepository<ProductReviews, import("../../../../domain").CrudParams<ProductReviews>> & import("../../../../domain").UpdateRepository<ProductReviews, import("../../../../domain").RepositoryUpdateParams<ProductReviews>> & {
5
+ paramsToPlain(params: import("../../../../domain").RepositoryUpdateParams<ProductReviews>): Partial<ProductReviews>;
6
+ }, [HasuraConstructorParams<ProductReviews> & import("../../mixins").CreateConstructorParams & import("../../mixins").DeleteConstructorParams & import("../../mixins").GetConstructorParams & import("../../mixins").UpdateConstructorParams, ...any[]]>;
7
+ export declare class ProductReviewsHasuraGraphQLRepository extends ProductReviewsHasuraGraphQLRepository_base implements ProductReviewsRepository {
8
+ constructor({ endpoint, authOptions, interceptors, }: Pick<HasuraConstructorParams<ProductReviews>, 'endpoint' | 'authOptions' | 'interceptors'>);
9
+ }
10
+ export {};