@infrab4a/connect 5.6.0-beta.4 → 5.6.1

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
@@ -2340,6 +2340,7 @@ exports.ShopPageName = void 0;
2340
2340
  ShopPageName["LP_GLAMQUEENS"] = "LP_GLAMQUEENS";
2341
2341
  ShopPageName["LP_INVITE"] = "LP_INVITE";
2342
2342
  ShopPageName["LP_LIVELO"] = "LP_LIVELO";
2343
+ ShopPageName["GLAM_NEW_HOME"] = "GLAM_NEW_HOME";
2343
2344
  })(exports.ShopPageName || (exports.ShopPageName = {}));
2344
2345
 
2345
2346
  class BeautyQuestionsHelper {
@@ -2417,10 +2418,88 @@ class ShopMenu extends BaseModel {
2417
2418
  }
2418
2419
  }
2419
2420
 
2421
+ var ShopPageSectionType;
2422
+ (function (ShopPageSectionType) {
2423
+ ShopPageSectionType["LIVE"] = "LIVE";
2424
+ ShopPageSectionType["CAROUSEL"] = "CAROUSEL";
2425
+ ShopPageSectionType["BANNER"] = "BANNER";
2426
+ ShopPageSectionType["INFOBARS"] = "INFOBARS";
2427
+ ShopPageSectionType["HIGHLIGHTS"] = "HIGHLIGHTS";
2428
+ ShopPageSectionType["SUBSCRIBER_INFO"] = "SUBSCRIBER_INFO";
2429
+ ShopPageSectionType["COLLECTION"] = "COLLECTION";
2430
+ ShopPageSectionType["BEAUTY_PROFILE_COLLECTION"] = "BEAUTY_PROFILE_COLLECTION";
2431
+ ShopPageSectionType["PLANS"] = "PLANS";
2432
+ ShopPageSectionType["SINGLE_PLAN"] = "SINGLE_PLAN";
2433
+ ShopPageSectionType["BRANDS"] = "BRANDS";
2434
+ ShopPageSectionType["NEWSLETTER"] = "NEWSLETTER";
2435
+ })(ShopPageSectionType || (ShopPageSectionType = {}));
2436
+
2437
+ /* eslint-disable max-lines-per-function */
2420
2438
  class ShopSettings extends BaseModel {
2421
2439
  static get identifiersFields() {
2422
2440
  return ['id'];
2423
2441
  }
2442
+ getPageSections(displayRules) {
2443
+ const now = new Date();
2444
+ return (Array.isArray(this.sections) ? this.sections : [])
2445
+ .map((section) => {
2446
+ // Filtra banners dentro de carrousel
2447
+ if (section.type === ShopPageSectionType.CAROUSEL && Array.isArray(section.banners)) {
2448
+ const filteredBanners = section.banners.filter((banner) => {
2449
+ // Filtra por displayRules
2450
+ const rulesMatch = banner.displayRules.length
2451
+ ? banner.displayRules.some((rule) => Object.keys(rule).every((key) => rule[key] === displayRules[key]))
2452
+ : true;
2453
+ // Filtra por publishDate e expirationDate
2454
+ const publishOk = !banner.publishDate || now >= new Date(banner.publishDate);
2455
+ const expireOk = !banner.expirationDate || now <= new Date(banner.expirationDate);
2456
+ return rulesMatch && publishOk && expireOk;
2457
+ });
2458
+ return { ...section, banners: filteredBanners };
2459
+ }
2460
+ // Filtra highlights
2461
+ if (section.type === ShopPageSectionType.HIGHLIGHTS && Array.isArray(section.highlights)) {
2462
+ const filteredHighlights = section.highlights.filter((highlight) => {
2463
+ // Filtra por displayRules
2464
+ const rulesMatch = highlight.displayRules.length
2465
+ ? highlight.displayRules.some((rule) => Object.keys(rule).every((key) => rule[key] === displayRules[key]))
2466
+ : true;
2467
+ return rulesMatch;
2468
+ });
2469
+ const sortedHighlights = !displayRules.beautyProfile
2470
+ ? filteredHighlights.sort((a, b) => (a.starred === b.starred ? 0 : a.starred ? -1 : 1))
2471
+ : filteredHighlights;
2472
+ return { ...section, highlights: sortedHighlights };
2473
+ }
2474
+ // Filtra collections
2475
+ if (section.type === ShopPageSectionType.COLLECTION) {
2476
+ const rulesMatch = section.displayRules.length
2477
+ ? section.displayRules.some((rule) => Object.keys(rule).every((key) => rule[key] === displayRules[key]))
2478
+ : true;
2479
+ const publishOk = !section.publishDate || now >= new Date(section.publishDate);
2480
+ const expireOk = !section.expirationDate || now <= new Date(section.expirationDate);
2481
+ return rulesMatch && publishOk && expireOk ? section : null;
2482
+ }
2483
+ // Filtra banners
2484
+ if (section.type === ShopPageSectionType.BANNER) {
2485
+ const rulesMatch = section.displayRules.length
2486
+ ? section.displayRules.some((rule) => Object.keys(rule).every((key) => rule[key] === displayRules[key]))
2487
+ : true;
2488
+ const publishOk = !section.publishDate || now >= new Date(section.publishDate);
2489
+ const expireOk = !section.expirationDate || now <= new Date(section.expirationDate);
2490
+ return rulesMatch && publishOk && expireOk ? section : null;
2491
+ }
2492
+ if (section.type === ShopPageSectionType.LIVE) {
2493
+ return section.active ? section : null;
2494
+ }
2495
+ if (section.type === ShopPageSectionType.PLANS || section.type === ShopPageSectionType.SINGLE_PLAN) {
2496
+ return displayRules.notSubscriber ? section : null;
2497
+ }
2498
+ // Demais seções retornam normalmente
2499
+ return section;
2500
+ })
2501
+ .filter(Boolean);
2502
+ }
2424
2503
  }
2425
2504
 
2426
2505
  class AdyenBlockedOrderHelper {
@@ -7231,6 +7310,26 @@ class CategoryProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withH
7231
7310
  },
7232
7311
  });
7233
7312
  }
7313
+ async removeProductFromAllCategories(productId) {
7314
+ this.logger = DebugHelper.from(this, 'removeProductFromAllCategories');
7315
+ await this.mutation('delete_category_product', ['affected_rows'], {
7316
+ where: {
7317
+ type: 'category_product_bool_exp',
7318
+ required: true,
7319
+ value: { product_id: { _eq: productId } },
7320
+ },
7321
+ });
7322
+ }
7323
+ async removeCategoryFromAllProducts(categoryId) {
7324
+ this.logger = DebugHelper.from(this, 'removeCategoryFromAllProducts');
7325
+ await this.mutation('delete_category_product', ['affected_rows'], {
7326
+ where: {
7327
+ type: 'category_product_bool_exp',
7328
+ required: true,
7329
+ value: { category_id: { _eq: categoryId } },
7330
+ },
7331
+ });
7332
+ }
7234
7333
  }
7235
7334
 
7236
7335
  const fieldsConfiguration$3 = [
@@ -10121,6 +10220,14 @@ class PagarMeErrorHelper {
10121
10220
  case '1070':
10122
10221
  case '2001':
10123
10222
  case '2004':
10223
+ case '5025':
10224
+ case '9124':
10225
+ return exports.ErrorsCode.invalidCardError;
10226
+ // Dados obrigatórios ausentes
10227
+ case '1044':
10228
+ case '5034':
10229
+ case '5047':
10230
+ case '5061':
10124
10231
  return exports.ErrorsCode.invalidCardError;
10125
10232
  // Suspeita de fraude, prevenção do banco
10126
10233
  case '1002':
@@ -10132,6 +10239,7 @@ class PagarMeErrorHelper {
10132
10239
  case '2008':
10133
10240
  case '2009':
10134
10241
  case '2010':
10242
+ case '9201':
10135
10243
  return exports.ErrorsCode.fraudPreventionExternal;
10136
10244
  // Recusado pelo banco/emissor
10137
10245
  case '1007':
@@ -10149,19 +10257,10 @@ class PagarMeErrorHelper {
10149
10257
  case '5087':
10150
10258
  return exports.ErrorsCode.insufficientFundsError;
10151
10259
  // Valor solicitado inválido
10260
+ case '5094':
10152
10261
  case '5016':
10153
10262
  case '5092':
10154
10263
  return exports.ErrorsCode.paymentError;
10155
- // Código de segurança inválido ou não enviado
10156
- case '5025':
10157
- case '9124':
10158
- return exports.ErrorsCode.paymentError;
10159
- // Dados obrigatórios ausentes
10160
- case '1044':
10161
- case '5034':
10162
- case '5047':
10163
- case '5061':
10164
- return exports.ErrorsCode.paymentError;
10165
10264
  // Erros internos ou genéricos
10166
10265
  case '5000':
10167
10266
  case '5001':
@@ -10251,10 +10350,9 @@ class PagarMeErrorHelper {
10251
10350
  // Transação não suportada para o banco/emissor
10252
10351
  case '1061':
10253
10352
  return exports.ErrorsCode.paymentError;
10254
- case '5094':
10255
10353
  case '1010':
10256
10354
  case '1046':
10257
- return exports.ErrorsCode.businessError;
10355
+ return exports.ErrorsCode.invalidCheckoutError;
10258
10356
  default:
10259
10357
  return exports.ErrorsCode.paymentError;
10260
10358
  }
@@ -10432,7 +10530,7 @@ class PagarMeV5ResponseHelper {
10432
10530
  const charger = response.charges.at(0);
10433
10531
  const transaction = charger.last_transaction;
10434
10532
  return PaymentTransaction.toInstance({
10435
- acquirer_name: 'pagar_me',
10533
+ acquirer_name: exports.PaymentProviders.PAGARME,
10436
10534
  amount: charger.amount,
10437
10535
  currency: charger.currency,
10438
10536
  gateway_id: charger.gateway_id,
package/index.esm.js CHANGED
@@ -2316,6 +2316,7 @@ var ShopPageName;
2316
2316
  ShopPageName["LP_GLAMQUEENS"] = "LP_GLAMQUEENS";
2317
2317
  ShopPageName["LP_INVITE"] = "LP_INVITE";
2318
2318
  ShopPageName["LP_LIVELO"] = "LP_LIVELO";
2319
+ ShopPageName["GLAM_NEW_HOME"] = "GLAM_NEW_HOME";
2319
2320
  })(ShopPageName || (ShopPageName = {}));
2320
2321
 
2321
2322
  class BeautyQuestionsHelper {
@@ -2393,10 +2394,88 @@ class ShopMenu extends BaseModel {
2393
2394
  }
2394
2395
  }
2395
2396
 
2397
+ var ShopPageSectionType;
2398
+ (function (ShopPageSectionType) {
2399
+ ShopPageSectionType["LIVE"] = "LIVE";
2400
+ ShopPageSectionType["CAROUSEL"] = "CAROUSEL";
2401
+ ShopPageSectionType["BANNER"] = "BANNER";
2402
+ ShopPageSectionType["INFOBARS"] = "INFOBARS";
2403
+ ShopPageSectionType["HIGHLIGHTS"] = "HIGHLIGHTS";
2404
+ ShopPageSectionType["SUBSCRIBER_INFO"] = "SUBSCRIBER_INFO";
2405
+ ShopPageSectionType["COLLECTION"] = "COLLECTION";
2406
+ ShopPageSectionType["BEAUTY_PROFILE_COLLECTION"] = "BEAUTY_PROFILE_COLLECTION";
2407
+ ShopPageSectionType["PLANS"] = "PLANS";
2408
+ ShopPageSectionType["SINGLE_PLAN"] = "SINGLE_PLAN";
2409
+ ShopPageSectionType["BRANDS"] = "BRANDS";
2410
+ ShopPageSectionType["NEWSLETTER"] = "NEWSLETTER";
2411
+ })(ShopPageSectionType || (ShopPageSectionType = {}));
2412
+
2413
+ /* eslint-disable max-lines-per-function */
2396
2414
  class ShopSettings extends BaseModel {
2397
2415
  static get identifiersFields() {
2398
2416
  return ['id'];
2399
2417
  }
2418
+ getPageSections(displayRules) {
2419
+ const now = new Date();
2420
+ return (Array.isArray(this.sections) ? this.sections : [])
2421
+ .map((section) => {
2422
+ // Filtra banners dentro de carrousel
2423
+ if (section.type === ShopPageSectionType.CAROUSEL && Array.isArray(section.banners)) {
2424
+ const filteredBanners = section.banners.filter((banner) => {
2425
+ // Filtra por displayRules
2426
+ const rulesMatch = banner.displayRules.length
2427
+ ? banner.displayRules.some((rule) => Object.keys(rule).every((key) => rule[key] === displayRules[key]))
2428
+ : true;
2429
+ // Filtra por publishDate e expirationDate
2430
+ const publishOk = !banner.publishDate || now >= new Date(banner.publishDate);
2431
+ const expireOk = !banner.expirationDate || now <= new Date(banner.expirationDate);
2432
+ return rulesMatch && publishOk && expireOk;
2433
+ });
2434
+ return { ...section, banners: filteredBanners };
2435
+ }
2436
+ // Filtra highlights
2437
+ if (section.type === ShopPageSectionType.HIGHLIGHTS && Array.isArray(section.highlights)) {
2438
+ const filteredHighlights = section.highlights.filter((highlight) => {
2439
+ // Filtra por displayRules
2440
+ const rulesMatch = highlight.displayRules.length
2441
+ ? highlight.displayRules.some((rule) => Object.keys(rule).every((key) => rule[key] === displayRules[key]))
2442
+ : true;
2443
+ return rulesMatch;
2444
+ });
2445
+ const sortedHighlights = !displayRules.beautyProfile
2446
+ ? filteredHighlights.sort((a, b) => (a.starred === b.starred ? 0 : a.starred ? -1 : 1))
2447
+ : filteredHighlights;
2448
+ return { ...section, highlights: sortedHighlights };
2449
+ }
2450
+ // Filtra collections
2451
+ if (section.type === ShopPageSectionType.COLLECTION) {
2452
+ const rulesMatch = section.displayRules.length
2453
+ ? section.displayRules.some((rule) => Object.keys(rule).every((key) => rule[key] === displayRules[key]))
2454
+ : true;
2455
+ const publishOk = !section.publishDate || now >= new Date(section.publishDate);
2456
+ const expireOk = !section.expirationDate || now <= new Date(section.expirationDate);
2457
+ return rulesMatch && publishOk && expireOk ? section : null;
2458
+ }
2459
+ // Filtra banners
2460
+ if (section.type === ShopPageSectionType.BANNER) {
2461
+ const rulesMatch = section.displayRules.length
2462
+ ? section.displayRules.some((rule) => Object.keys(rule).every((key) => rule[key] === displayRules[key]))
2463
+ : true;
2464
+ const publishOk = !section.publishDate || now >= new Date(section.publishDate);
2465
+ const expireOk = !section.expirationDate || now <= new Date(section.expirationDate);
2466
+ return rulesMatch && publishOk && expireOk ? section : null;
2467
+ }
2468
+ if (section.type === ShopPageSectionType.LIVE) {
2469
+ return section.active ? section : null;
2470
+ }
2471
+ if (section.type === ShopPageSectionType.PLANS || section.type === ShopPageSectionType.SINGLE_PLAN) {
2472
+ return displayRules.notSubscriber ? section : null;
2473
+ }
2474
+ // Demais seções retornam normalmente
2475
+ return section;
2476
+ })
2477
+ .filter(Boolean);
2478
+ }
2400
2479
  }
2401
2480
 
2402
2481
  class AdyenBlockedOrderHelper {
@@ -7207,6 +7286,26 @@ class CategoryProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withH
7207
7286
  },
7208
7287
  });
7209
7288
  }
7289
+ async removeProductFromAllCategories(productId) {
7290
+ this.logger = DebugHelper.from(this, 'removeProductFromAllCategories');
7291
+ await this.mutation('delete_category_product', ['affected_rows'], {
7292
+ where: {
7293
+ type: 'category_product_bool_exp',
7294
+ required: true,
7295
+ value: { product_id: { _eq: productId } },
7296
+ },
7297
+ });
7298
+ }
7299
+ async removeCategoryFromAllProducts(categoryId) {
7300
+ this.logger = DebugHelper.from(this, 'removeCategoryFromAllProducts');
7301
+ await this.mutation('delete_category_product', ['affected_rows'], {
7302
+ where: {
7303
+ type: 'category_product_bool_exp',
7304
+ required: true,
7305
+ value: { category_id: { _eq: categoryId } },
7306
+ },
7307
+ });
7308
+ }
7210
7309
  }
7211
7310
 
7212
7311
  const fieldsConfiguration$3 = [
@@ -10097,6 +10196,14 @@ class PagarMeErrorHelper {
10097
10196
  case '1070':
10098
10197
  case '2001':
10099
10198
  case '2004':
10199
+ case '5025':
10200
+ case '9124':
10201
+ return ErrorsCode.invalidCardError;
10202
+ // Dados obrigatórios ausentes
10203
+ case '1044':
10204
+ case '5034':
10205
+ case '5047':
10206
+ case '5061':
10100
10207
  return ErrorsCode.invalidCardError;
10101
10208
  // Suspeita de fraude, prevenção do banco
10102
10209
  case '1002':
@@ -10108,6 +10215,7 @@ class PagarMeErrorHelper {
10108
10215
  case '2008':
10109
10216
  case '2009':
10110
10217
  case '2010':
10218
+ case '9201':
10111
10219
  return ErrorsCode.fraudPreventionExternal;
10112
10220
  // Recusado pelo banco/emissor
10113
10221
  case '1007':
@@ -10125,19 +10233,10 @@ class PagarMeErrorHelper {
10125
10233
  case '5087':
10126
10234
  return ErrorsCode.insufficientFundsError;
10127
10235
  // Valor solicitado inválido
10236
+ case '5094':
10128
10237
  case '5016':
10129
10238
  case '5092':
10130
10239
  return ErrorsCode.paymentError;
10131
- // Código de segurança inválido ou não enviado
10132
- case '5025':
10133
- case '9124':
10134
- return ErrorsCode.paymentError;
10135
- // Dados obrigatórios ausentes
10136
- case '1044':
10137
- case '5034':
10138
- case '5047':
10139
- case '5061':
10140
- return ErrorsCode.paymentError;
10141
10240
  // Erros internos ou genéricos
10142
10241
  case '5000':
10143
10242
  case '5001':
@@ -10227,10 +10326,9 @@ class PagarMeErrorHelper {
10227
10326
  // Transação não suportada para o banco/emissor
10228
10327
  case '1061':
10229
10328
  return ErrorsCode.paymentError;
10230
- case '5094':
10231
10329
  case '1010':
10232
10330
  case '1046':
10233
- return ErrorsCode.businessError;
10331
+ return ErrorsCode.invalidCheckoutError;
10234
10332
  default:
10235
10333
  return ErrorsCode.paymentError;
10236
10334
  }
@@ -10408,7 +10506,7 @@ class PagarMeV5ResponseHelper {
10408
10506
  const charger = response.charges.at(0);
10409
10507
  const transaction = charger.last_transaction;
10410
10508
  return PaymentTransaction.toInstance({
10411
- acquirer_name: 'pagar_me',
10509
+ acquirer_name: PaymentProviders.PAGARME,
10412
10510
  amount: charger.amount,
10413
10511
  currency: charger.currency,
10414
10512
  gateway_id: charger.gateway_id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infrab4a/connect",
3
- "version": "5.6.0-beta.4",
3
+ "version": "5.6.1",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },
@@ -18,8 +18,8 @@ export declare class ProductPriceLog extends BaseModel<ProductPriceLog> {
18
18
  groupId?: string;
19
19
  competitorsAndPrices?: ProductCompetitorsPrice[];
20
20
  competitorsPrices?: number[];
21
- competitorsSellerMinPrice?: string;
22
21
  competitorsMinPrice?: number;
22
+ competitorsSellerMinPrice?: string;
23
23
  statusPrecificacao: string;
24
24
  static get identifiersFields(): GenericIdentifier[];
25
25
  }
@@ -1,5 +1,6 @@
1
1
  export type ProductCompetitorsPrice = {
2
2
  competitorId: string;
3
- price: number;
4
- offerPrice: number;
3
+ competitorUrl?: string;
4
+ price?: number;
5
+ offerPrice?: number;
5
6
  };
@@ -8,4 +8,6 @@ export interface CategoryProductRepository extends CrudRepository<CategoryProduc
8
8
  order: number;
9
9
  }[]): Promise<void>;
10
10
  addProductToCategories(productId: string, categoryIds: string[]): Promise<void>;
11
+ removeProductFromAllCategories(productId: string): Promise<void>;
12
+ removeCategoryFromAllProducts(categoryId: string): Promise<void>;
11
13
  }
@@ -15,5 +15,6 @@ export declare enum ShopPageName {
15
15
  LP_GLAMPARTNER_PROMOTION = "LP_GLAMPARTNER_PROMOTION",
16
16
  LP_GLAMQUEENS = "LP_GLAMQUEENS",
17
17
  LP_INVITE = "LP_INVITE",
18
- LP_LIVELO = "LP_LIVELO"
18
+ LP_LIVELO = "LP_LIVELO",
19
+ GLAM_NEW_HOME = "GLAM_NEW_HOME"
19
20
  }
@@ -1,15 +1,18 @@
1
1
  import { BaseModel, GenericIdentifier } from '../../generic/model';
2
2
  import { ShopPageName } from '../enums';
3
3
  import { Section } from './types';
4
+ import { DisplayRules, SectionUnion, ShopPageSection } from './types/shop-page-section.type';
4
5
  export declare class ShopSettings extends BaseModel<ShopSettings> {
5
6
  id: string | ShopPageName;
6
7
  name: string;
7
8
  shop: string;
8
- sections: Section<any>;
9
+ preview?: string;
10
+ sections: Section<any> | ShopPageSection[];
9
11
  descriptionMeta?: string;
10
12
  titleMeta?: string;
11
13
  imageMeta?: string;
12
14
  hasMultiples?: boolean;
13
15
  pagePath?: string;
14
16
  static get identifiersFields(): GenericIdentifier[];
17
+ getPageSections(displayRules: DisplayRules): SectionUnion[];
15
18
  }
@@ -0,0 +1,140 @@
1
+ export type ShopPageSection = Array<SectionUnion>;
2
+ export type SectionUnion = SectionLive | SectionCarousel | SectionBanner | SectionInfobars | SectionHighlights | SectionSubscriberInfo | SectionCollection | SectionBeautyProfileCollection | SectionPlans | SectionSinglePlan | SectionBrands | SectionNewsletter;
3
+ export declare enum ShopPageSectionType {
4
+ LIVE = "LIVE",
5
+ CAROUSEL = "CAROUSEL",
6
+ BANNER = "BANNER",
7
+ INFOBARS = "INFOBARS",
8
+ HIGHLIGHTS = "HIGHLIGHTS",
9
+ SUBSCRIBER_INFO = "SUBSCRIBER_INFO",
10
+ COLLECTION = "COLLECTION",
11
+ BEAUTY_PROFILE_COLLECTION = "BEAUTY_PROFILE_COLLECTION",
12
+ PLANS = "PLANS",
13
+ SINGLE_PLAN = "SINGLE_PLAN",
14
+ BRANDS = "BRANDS",
15
+ NEWSLETTER = "NEWSLETTER"
16
+ }
17
+ export type SectionLive = {
18
+ id: string;
19
+ type: ShopPageSectionType.LIVE;
20
+ fixed: boolean;
21
+ editable: boolean;
22
+ title: string;
23
+ link: string;
24
+ active: boolean;
25
+ };
26
+ export type SectionCarousel = {
27
+ id: string;
28
+ type: ShopPageSectionType.CAROUSEL;
29
+ fixed: boolean;
30
+ editable: boolean;
31
+ banners: Banner[];
32
+ };
33
+ export type SectionInfobars = {
34
+ id: string;
35
+ type: ShopPageSectionType.INFOBARS;
36
+ fixed: boolean;
37
+ editable: boolean;
38
+ infobars: Infobar[];
39
+ };
40
+ export type Infobar = {
41
+ id: string;
42
+ link: string;
43
+ text: string;
44
+ active: boolean;
45
+ };
46
+ export type SectionHighlights = {
47
+ id: string;
48
+ type: ShopPageSectionType.HIGHLIGHTS;
49
+ fixed: boolean;
50
+ editable: boolean;
51
+ highlights: Highlight[];
52
+ };
53
+ export type Highlight = {
54
+ id: string;
55
+ title: string;
56
+ subtitle: string;
57
+ link: string;
58
+ image: string;
59
+ altText: string;
60
+ highlighted: boolean;
61
+ starred: boolean;
62
+ displayRules?: Array<Partial<DisplayRules>>;
63
+ };
64
+ export type SectionSubscriberInfo = {
65
+ id: string;
66
+ type: ShopPageSectionType.SUBSCRIBER_INFO;
67
+ fixed: boolean;
68
+ editable: boolean;
69
+ };
70
+ export type Banner = {
71
+ id: string;
72
+ mobileImage: string;
73
+ desktopImage: string;
74
+ link: string;
75
+ altText: string;
76
+ countdown?: string;
77
+ displayRules?: Array<Partial<DisplayRules>>;
78
+ publishDate?: Date;
79
+ expirationDate?: Date;
80
+ };
81
+ export type SectionBanner = Banner & {
82
+ type: ShopPageSectionType.BANNER;
83
+ fixed: boolean;
84
+ editable: boolean;
85
+ };
86
+ export type SectionCollection = {
87
+ id: string;
88
+ type: ShopPageSectionType.COLLECTION;
89
+ fixed: boolean;
90
+ editable: boolean;
91
+ slug: string;
92
+ title: string;
93
+ categoryId: number;
94
+ displayRules?: Array<Partial<DisplayRules>>;
95
+ publishDate?: Date;
96
+ expirationDate?: Date;
97
+ };
98
+ export type SectionBeautyProfileCollection = {
99
+ id: string;
100
+ type: ShopPageSectionType.BEAUTY_PROFILE_COLLECTION;
101
+ fixed: boolean;
102
+ editable: boolean;
103
+ };
104
+ export type DisplayRules = {
105
+ subscriberBuyer: boolean;
106
+ notSubscriber: boolean;
107
+ subscriberNotBuyer: boolean;
108
+ topBadgeSubscriber: boolean;
109
+ beautyProfile?: boolean;
110
+ };
111
+ export type SectionPlans = {
112
+ id: string;
113
+ type: ShopPageSectionType.PLANS;
114
+ fixed: boolean;
115
+ editable: boolean;
116
+ };
117
+ export type SectionSinglePlan = {
118
+ id: string;
119
+ type: ShopPageSectionType.SINGLE_PLAN;
120
+ fixed: boolean;
121
+ editable: boolean;
122
+ };
123
+ export type Brand = {
124
+ slug: string;
125
+ image: string;
126
+ brandName: string;
127
+ };
128
+ export type SectionBrands = {
129
+ id: string;
130
+ type: ShopPageSectionType.BRANDS;
131
+ fixed: boolean;
132
+ editable: boolean;
133
+ brands: Brand[];
134
+ };
135
+ export type SectionNewsletter = {
136
+ id: string;
137
+ type: ShopPageSectionType.NEWSLETTER;
138
+ fixed: boolean;
139
+ editable: boolean;
140
+ };
@@ -12,6 +12,7 @@ export declare class Order extends Checkout {
12
12
  trackingEvents?: OrderTrackingEvent[];
13
13
  payment: PaymentTransaction;
14
14
  pedidov?: number;
15
+ isEditionOrder?: boolean;
15
16
  reshipmentOrderId?: string;
16
17
  isChange?: boolean;
17
18
  isReshipment?: boolean;
@@ -10,5 +10,7 @@ export declare class CategoryProductHasuraGraphQLRepository extends CategoryProd
10
10
  order: number;
11
11
  }[]): Promise<void>;
12
12
  addProductToCategories(productId: string, categoryIds: string[]): Promise<void>;
13
+ removeProductFromAllCategories(productId: string): Promise<void>;
14
+ removeCategoryFromAllProducts(categoryId: string): Promise<void>;
13
15
  }
14
16
  export {};