@infrab4a/connect 4.7.0-beta.1 → 4.7.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 +3 -44
- package/index.esm.js +4 -43
- package/package.json +1 -1
- package/src/domain/catalog/models/index.d.ts +0 -1
- package/src/domain/catalog/repositories/index.d.ts +0 -1
- package/src/domain/shopping/models/line-item.d.ts +2 -0
- package/src/infra/hasura-graphql/repositories/catalog/index.d.ts +0 -1
- package/src/domain/catalog/models/product-stock-notification.d.ts +0 -12
- package/src/domain/catalog/repositories/product-stock-notification.repository.d.ts +0 -5
- package/src/infra/hasura-graphql/repositories/catalog/product-stock-notification-hasura-graphql.repository.d.ts +0 -11
package/index.cjs.js
CHANGED
|
@@ -220,12 +220,6 @@ class ProductReviews extends BaseModel {
|
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
class ProductStockNotification extends BaseModel {
|
|
224
|
-
static get identifiersFields() {
|
|
225
|
-
return ['id'];
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
223
|
class Variant extends BaseModel {
|
|
230
224
|
static get identifiersFields() {
|
|
231
225
|
return ['id', 'productId'];
|
|
@@ -2255,6 +2249,9 @@ class UpdateUserImage {
|
|
|
2255
2249
|
}
|
|
2256
2250
|
|
|
2257
2251
|
class LineItem extends Product {
|
|
2252
|
+
get pricePaidWithDiscount() {
|
|
2253
|
+
return this.pricePaid - this.discount;
|
|
2254
|
+
}
|
|
2258
2255
|
}
|
|
2259
2256
|
|
|
2260
2257
|
class ShippingMethod extends BaseModel {
|
|
@@ -5650,42 +5647,6 @@ class ProductReviewsHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHa
|
|
|
5650
5647
|
}
|
|
5651
5648
|
}
|
|
5652
5649
|
|
|
5653
|
-
class ProductStockNotificationHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
|
|
5654
|
-
constructor({ endpoint, authOptions, interceptors, }) {
|
|
5655
|
-
super({
|
|
5656
|
-
tableName: 'product_stock_notification',
|
|
5657
|
-
model: ProductStockNotification,
|
|
5658
|
-
endpoint,
|
|
5659
|
-
authOptions,
|
|
5660
|
-
interceptors,
|
|
5661
|
-
fields: [
|
|
5662
|
-
'id',
|
|
5663
|
-
{ productId: { columnName: 'product_id' } },
|
|
5664
|
-
'name',
|
|
5665
|
-
'email',
|
|
5666
|
-
'shop',
|
|
5667
|
-
{ createdAt: { columnName: 'created_at' } },
|
|
5668
|
-
{ updatedAt: { columnName: 'updated_at' } },
|
|
5669
|
-
],
|
|
5670
|
-
});
|
|
5671
|
-
}
|
|
5672
|
-
async addCustomerEmail(shop, productId, name, email) {
|
|
5673
|
-
const notification = await this.find({
|
|
5674
|
-
filters: {
|
|
5675
|
-
productId,
|
|
5676
|
-
email,
|
|
5677
|
-
},
|
|
5678
|
-
}).then((data) => data.data.shift());
|
|
5679
|
-
if (!notification)
|
|
5680
|
-
this.create({
|
|
5681
|
-
shop,
|
|
5682
|
-
productId,
|
|
5683
|
-
name,
|
|
5684
|
-
email,
|
|
5685
|
-
});
|
|
5686
|
-
}
|
|
5687
|
-
}
|
|
5688
|
-
|
|
5689
5650
|
class VariantHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
|
|
5690
5651
|
constructor({ endpoint, authOptions, interceptors, }) {
|
|
5691
5652
|
super({
|
|
@@ -6205,8 +6166,6 @@ exports.ProductHasuraGraphQL = ProductHasuraGraphQL;
|
|
|
6205
6166
|
exports.ProductHasuraGraphQLRepository = ProductHasuraGraphQLRepository;
|
|
6206
6167
|
exports.ProductReviews = ProductReviews;
|
|
6207
6168
|
exports.ProductReviewsHasuraGraphQLRepository = ProductReviewsHasuraGraphQLRepository;
|
|
6208
|
-
exports.ProductStockNotification = ProductStockNotification;
|
|
6209
|
-
exports.ProductStockNotificationHasuraGraphQLRepository = ProductStockNotificationHasuraGraphQLRepository;
|
|
6210
6169
|
exports.ProductVariantFirestoreRepository = ProductVariantFirestoreRepository;
|
|
6211
6170
|
exports.ProductsIndex = ProductsIndex;
|
|
6212
6171
|
exports.RecoveryPassword = RecoveryPassword;
|
package/index.esm.js
CHANGED
|
@@ -196,12 +196,6 @@ class ProductReviews extends BaseModel {
|
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
-
class ProductStockNotification extends BaseModel {
|
|
200
|
-
static get identifiersFields() {
|
|
201
|
-
return ['id'];
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
199
|
class Variant extends BaseModel {
|
|
206
200
|
static get identifiersFields() {
|
|
207
201
|
return ['id', 'productId'];
|
|
@@ -2231,6 +2225,9 @@ class UpdateUserImage {
|
|
|
2231
2225
|
}
|
|
2232
2226
|
|
|
2233
2227
|
class LineItem extends Product {
|
|
2228
|
+
get pricePaidWithDiscount() {
|
|
2229
|
+
return this.pricePaid - this.discount;
|
|
2230
|
+
}
|
|
2234
2231
|
}
|
|
2235
2232
|
|
|
2236
2233
|
class ShippingMethod extends BaseModel {
|
|
@@ -5626,42 +5623,6 @@ class ProductReviewsHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHa
|
|
|
5626
5623
|
}
|
|
5627
5624
|
}
|
|
5628
5625
|
|
|
5629
|
-
class ProductStockNotificationHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
|
|
5630
|
-
constructor({ endpoint, authOptions, interceptors, }) {
|
|
5631
|
-
super({
|
|
5632
|
-
tableName: 'product_stock_notification',
|
|
5633
|
-
model: ProductStockNotification,
|
|
5634
|
-
endpoint,
|
|
5635
|
-
authOptions,
|
|
5636
|
-
interceptors,
|
|
5637
|
-
fields: [
|
|
5638
|
-
'id',
|
|
5639
|
-
{ productId: { columnName: 'product_id' } },
|
|
5640
|
-
'name',
|
|
5641
|
-
'email',
|
|
5642
|
-
'shop',
|
|
5643
|
-
{ createdAt: { columnName: 'created_at' } },
|
|
5644
|
-
{ updatedAt: { columnName: 'updated_at' } },
|
|
5645
|
-
],
|
|
5646
|
-
});
|
|
5647
|
-
}
|
|
5648
|
-
async addCustomerEmail(shop, productId, name, email) {
|
|
5649
|
-
const notification = await this.find({
|
|
5650
|
-
filters: {
|
|
5651
|
-
productId,
|
|
5652
|
-
email,
|
|
5653
|
-
},
|
|
5654
|
-
}).then((data) => data.data.shift());
|
|
5655
|
-
if (!notification)
|
|
5656
|
-
this.create({
|
|
5657
|
-
shop,
|
|
5658
|
-
productId,
|
|
5659
|
-
name,
|
|
5660
|
-
email,
|
|
5661
|
-
});
|
|
5662
|
-
}
|
|
5663
|
-
}
|
|
5664
|
-
|
|
5665
5626
|
class VariantHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
|
|
5666
5627
|
constructor({ endpoint, authOptions, interceptors, }) {
|
|
5667
5628
|
super({
|
|
@@ -5998,4 +5959,4 @@ class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
|
|
|
5998
5959
|
}
|
|
5999
5960
|
}
|
|
6000
5961
|
|
|
6001
|
-
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,
|
|
5962
|
+
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, 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
|
@@ -7,7 +7,6 @@ export * from './filter-option';
|
|
|
7
7
|
export * from './kit-product';
|
|
8
8
|
export * from './product';
|
|
9
9
|
export * from './product-reviews';
|
|
10
|
-
export * from './product-stock-notification';
|
|
11
10
|
export * from './types';
|
|
12
11
|
export * from './variant';
|
|
13
12
|
export * from './wishlist';
|
|
@@ -4,7 +4,6 @@ export * from './category.repository';
|
|
|
4
4
|
export * from './filter-option.repository';
|
|
5
5
|
export * from './filter.repository';
|
|
6
6
|
export * from './product-reviews.repository';
|
|
7
|
-
export * from './product-stock-notification.repository';
|
|
8
7
|
export * from './product.repository';
|
|
9
8
|
export * from './subscription-product.repository';
|
|
10
9
|
export * from './variant.repository';
|
|
@@ -5,6 +5,5 @@ export * from './filter-hasura-graphql.repository';
|
|
|
5
5
|
export * from './filter-option-hasura-graphql.repository';
|
|
6
6
|
export * from './product-hasura-graphql.repository';
|
|
7
7
|
export * from './product-review-hasura-graphql.repository';
|
|
8
|
-
export * from './product-stock-notification-hasura-graphql.repository';
|
|
9
8
|
export * from './variant-hasura-graphql.repository';
|
|
10
9
|
export * from './wishlist-hasura-graphql.repository';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { BaseModel, GenericIdentifier } from '../../generic/model';
|
|
2
|
-
import { Shops } from './enums';
|
|
3
|
-
export declare class ProductStockNotification extends BaseModel<ProductStockNotification> {
|
|
4
|
-
id: number;
|
|
5
|
-
productId: string;
|
|
6
|
-
name: string;
|
|
7
|
-
email: string;
|
|
8
|
-
shop: Shops;
|
|
9
|
-
createdAt?: Date;
|
|
10
|
-
updatedAt?: Date;
|
|
11
|
-
static get identifiersFields(): GenericIdentifier[];
|
|
12
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { CrudRepository } from '../../generic/repository/crud.repository';
|
|
2
|
-
import { ProductStockNotification, Shops } from '../models';
|
|
3
|
-
export interface ProductStockNotificationRepository extends CrudRepository<ProductStockNotification> {
|
|
4
|
-
addCustomerEmail(shop: Shops, productId: string, name: string, email: string): Promise<void>;
|
|
5
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Filter, ProductStockNotification, Shops } from '../../../../domain';
|
|
2
|
-
import { ProductStockNotificationRepository } from '../../../../domain/catalog/repositories';
|
|
3
|
-
import { HasuraConstructorParams } from '../../mixins';
|
|
4
|
-
declare const ProductStockNotificationHasuraGraphQLRepository_base: import("../../../../utils").MixinCtor<import("../..").GraphQLRepository<ProductStockNotification> & import("../../../../domain").CrudRepository<ProductStockNotification, import("../../../../domain").CrudParams<ProductStockNotification>> & import("../../../../domain").UpdateRepository<ProductStockNotification, import("../../../../domain").RepositoryUpdateParams<ProductStockNotification>> & {
|
|
5
|
-
paramsToPlain(params: import("../../../../domain").RepositoryUpdateParams<ProductStockNotification>): Partial<ProductStockNotification>;
|
|
6
|
-
}, [HasuraConstructorParams<ProductStockNotification> & import("../../mixins").CreateConstructorParams & import("../../mixins").DeleteConstructorParams & import("../../mixins").GetConstructorParams & import("../../mixins").UpdateConstructorParams, ...any[]]>;
|
|
7
|
-
export declare class ProductStockNotificationHasuraGraphQLRepository extends ProductStockNotificationHasuraGraphQLRepository_base implements ProductStockNotificationRepository {
|
|
8
|
-
constructor({ endpoint, authOptions, interceptors, }: Pick<HasuraConstructorParams<Filter>, 'endpoint' | 'authOptions' | 'interceptors'>);
|
|
9
|
-
addCustomerEmail(shop: Shops, productId: string, name: string, email: string): Promise<void>;
|
|
10
|
-
}
|
|
11
|
-
export {};
|