oneentry 1.0.146 → 1.0.147

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.
Files changed (35) hide show
  1. package/dist/admins/adminsApi.d.ts +4 -3
  2. package/dist/admins/adminsApi.js +1 -1
  3. package/dist/admins/adminsInterfaces.d.ts +4 -4
  4. package/dist/admins/adminsSchemas.d.ts +24 -8
  5. package/dist/admins/adminsSchemas.js +11 -5
  6. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +121 -24
  7. package/dist/auth-provider/authProvidersInterfaces.d.ts +34 -25
  8. package/dist/base/utils.d.ts +155 -63
  9. package/dist/blocks/blocksApi.d.ts +3 -3
  10. package/dist/blocks/blocksApi.js +1 -1
  11. package/dist/blocks/blocksInterfaces.d.ts +7 -7
  12. package/dist/blocks/blocksSchemas.d.ts +52 -8
  13. package/dist/discounts/discountsInterfaces.d.ts +53 -19
  14. package/dist/forms/formsInterfaces.d.ts +84 -14
  15. package/dist/forms-data/formsDataInterfaces.d.ts +140 -65
  16. package/dist/menus/menusInterfaces.d.ts +1 -1
  17. package/dist/orders/ordersInterfaces.d.ts +81 -19
  18. package/dist/orders/ordersSchemas.d.ts +73 -2
  19. package/dist/orders/ordersSchemas.js +32 -3
  20. package/dist/pages/pagesApi.js +1 -1
  21. package/dist/pages/pagesInterfaces.d.ts +8 -8
  22. package/dist/payments/paymentsInterfaces.d.ts +41 -16
  23. package/dist/products/productsApi.d.ts +26 -19
  24. package/dist/products/productsApi.js +27 -20
  25. package/dist/products/productsInterfaces.d.ts +109 -33
  26. package/dist/products/productsSchemas.d.ts +52 -8
  27. package/dist/products/productsSchemas.js +15 -2
  28. package/dist/sitemap/sitemapApi.d.ts +4 -4
  29. package/dist/sitemap/sitemapApi.js +2 -2
  30. package/dist/sitemap/sitemapInterfaces.d.ts +13 -11
  31. package/dist/templates/templatesApi.js +8 -3
  32. package/dist/templates/templatesInterfaces.d.ts +3 -3
  33. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +22 -8
  34. package/dist/users/usersInterfaces.d.ts +4 -8
  35. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import type { AttributeType, IError, ILocalizeInfo, Types } from '../base/utils';
1
+ import type { AttributeType, IError, ILocalizeInfo, IRating, Types } from '../base/utils';
2
2
  import type { IFormConfig } from '../forms/formsInterfaces';
3
3
  /**
4
4
  * @interface IProductsApi
@@ -332,11 +332,15 @@ interface IProductsApi {
332
332
  * @property {string | null} [conditionValue] - The value that is being searched for, default null. Example: "new".
333
333
  * @property {string | null} [attributeMarker] - The text identifier of the indexed attribute by which values are filtered, default null. Example: "color".
334
334
  * @property {string | null} [conditionMarker] - Marker of the filter condition by which the values are filtered, default null. Example: "equals".
335
+ * @property {string} [langCode] - Language code. Default: "en_US".
336
+ * @property {string} [ids] - Comma-separated list of product ids — used by `getProductsByIds`. Example: "1,2,3".
335
337
  * @description This interface defines the structure of a query for retrieving products, including pagination, sorting, and filtering parameters.
336
338
  */
337
339
  interface IProductsQuery {
338
340
  offset?: number;
339
341
  limit?: number;
342
+ langCode?: string;
343
+ ids?: string;
340
344
  sortOrder?: 'DESC' | 'ASC' | null;
341
345
  sortKey?: 'id' | 'position' | 'title' | 'date' | 'price' | null;
342
346
  signPrice?: string;
@@ -345,7 +349,6 @@ interface IProductsQuery {
345
349
  conditionValue?: string | null;
346
350
  attributeMarker?: string | null;
347
351
  conditionMarker?: 'in' /** in - Contains */ | 'nin' /** nin - Does not contain */ | 'eq' /** 'eq' - Equal */ | 'neq' /** 'neq' - Not equal */ | 'mth' /** 'mth' - Greater than */ | 'lth' /** 'lth' - Less than */ | 'exs' /** 'exs' - Exists */ | 'nexs' /** 'nexs' - Does not exist */ | null;
348
- [key: string]: unknown;
349
352
  }
350
353
  /**
351
354
  * @interface IFilterParams
@@ -369,20 +372,58 @@ interface IFilterParams {
369
372
  title?: string;
370
373
  isNested?: boolean;
371
374
  }
375
+ /**
376
+ * @interface IProductAdditional
377
+ * @property {object} prices - Aggregated price range for the product across all variants.
378
+ * @property {number} prices.min - Minimum price value. Example: 5.
379
+ * @property {number} prices.max - Maximum price value. Example: 150.
380
+ * @description Additional indexed values attached to a product entity.
381
+ */
382
+ interface IProductAdditional {
383
+ prices: IProductPriceRange;
384
+ }
385
+ /**
386
+ * @interface IProductPriceRange
387
+ * @property {number} min - Minimum price across product variants. Example: 5.
388
+ * @property {number} max - Maximum price across product variants. Example: 150.
389
+ * @description Aggregated price range for a product, computed from all its variants.
390
+ */
391
+ interface IProductPriceRange {
392
+ min: number;
393
+ max: number;
394
+ }
395
+ /**
396
+ * @interface IProductPageRef
397
+ * @property {number} id - Unique identifier of the product-to-page link record. Example: 16.
398
+ * @property {number} pageId - Identifier of the page the product is linked to. Example: 4.
399
+ * @property {number} productId - Identifier of the product. Example: 15.
400
+ * @property {number} positionId - Sorting position identifier within the page. Example: 244.
401
+ * @property {string} categoryPath - Category path of the page the product belongs to. Example: "products".
402
+ * @description Reference linking a product to one of the pages it is published on.
403
+ */
404
+ interface IProductPageRef {
405
+ id: number;
406
+ pageId: number;
407
+ productId: number;
408
+ positionId: number;
409
+ categoryPath: string;
410
+ }
372
411
  /**
373
412
  * @interface IProductsEntity
374
413
  * @property {number} id - The unique identifier. Example: 12345.
375
414
  * @property {ILocalizeInfo} localizeInfos - The name of the products, taking into account localization. Example: {}.
376
415
  * @property {string | null} statusIdentifier - Product page status identifiers (may be null). Example: "in_stock".
377
- * @property {Record<string, unknown>} statusLocalizeInfos - JSON description of the item status object, taking into account the language. Example: {}.
416
+ * @property {ILocalizeInfo} statusLocalizeInfos - Localized status name for the product. Example: { "title": "Sale" }.
378
417
  * @property {string | null} attributeSetIdentifier - Set of attributes id. Example: "set_12345".
379
418
  * @property {number} position - Item number (for sorting). Example: 1.
380
419
  * @property {number | null} price - The value of the product page price taken from the index. Example: 150.00.
381
420
  * @property {object} additional - Additional value from the index.
382
421
  * @example
383
422
  {
384
- "en": "In Stock",
385
- "de": "Auf Lager"
423
+ prices: {
424
+ min: 5
425
+ max: 150
426
+ }
386
427
  }
387
428
  * @property {string | null} sku - Product SKU (Stock Keeping Unit), may be null. Example: "SKU_12345".
388
429
  * @property {boolean} isSync - Indication of page indexing. Example: true.
@@ -403,7 +444,7 @@ interface IFilterParams {
403
444
  ]
404
445
  * @property {boolean} isVisible - A sign of page visibility. Example: true.
405
446
  * @property {Array<IFormConfig>} [moduleFormConfigs] - Module form configurations (optional).
406
- * @property {Record<string, unknown>} [rating] - Rating data.
447
+ * @property {IRating} [rating] - Rating data.
407
448
  * @property {boolean} isPositionLocked - Sorting position lock indicator (optional). Example: false.
408
449
  * @property {number[]} relatedIds - Ids of related product pages.
409
450
  * @example
@@ -416,7 +457,17 @@ interface IFilterParams {
416
457
  * @property {string | null} [templateIdentifier] - User id of the linked template. Example: "template_12345".
417
458
  * @property {string | null} [shortDescTemplateIdentifier] - User id of the linked template for a short description. Example: "short_desc_template_12345".
418
459
  * @property {string} [signedPrice] - Price sign.
419
- * @property {Array<Record<string, unknown>> | Record<string, unknown>} [productPages] - Array of product pages or a single product page object. Example: [].
460
+ * @property {IProductPageRef[]} [productPages] - Array of product page references linking the product to its pages.
461
+ * @example
462
+ [
463
+ {
464
+ "id": 16,
465
+ "pageId": 4,
466
+ "productId": 15,
467
+ "positionId": 244,
468
+ "categoryPath": "products"
469
+ }
470
+ ]
420
471
  * @property {string[]} [blocks] - Array of block identifiers.
421
472
  * @example
422
473
  [
@@ -429,27 +480,22 @@ interface IProductsEntity {
429
480
  id: number;
430
481
  localizeInfos: ILocalizeInfo;
431
482
  statusIdentifier: string | null;
432
- statusLocalizeInfos: Record<string, unknown>;
483
+ statusLocalizeInfos: ILocalizeInfo;
433
484
  attributeSetIdentifier: string | null;
434
485
  position: number;
435
486
  price: number | null;
436
- additional: {
437
- prices: {
438
- min: number;
439
- max: number;
440
- };
441
- };
487
+ additional: IProductAdditional;
442
488
  sku: string | null;
443
489
  isSync: boolean;
444
490
  attributeValues: AttributeType;
445
491
  categories: string[];
446
492
  isVisible: boolean;
447
493
  moduleFormConfigs?: Array<IFormConfig>;
448
- rating?: Record<string, unknown>;
494
+ rating?: IRating;
449
495
  templateIdentifier?: string | null;
450
496
  shortDescTemplateIdentifier?: string | null;
451
497
  signedPrice?: string;
452
- productPages?: Array<Record<string, unknown>> | Record<string, unknown>;
498
+ productPages?: IProductPageRef[];
453
499
  blocks?: string[];
454
500
  isPositionLocked?: boolean;
455
501
  relatedIds?: number[];
@@ -547,6 +593,52 @@ interface IProductInfo {
547
593
  ]
548
594
  * @description This interface defines the structure of a product block entity, including its identifiers, attributes, and custom settings.
549
595
  */
596
+ /**
597
+ * @interface IProductBlockSettings
598
+ * @property {number | null} sliderDelay - Slider auto-advance delay. Example: 5000.
599
+ * @property {string | null} sliderDelayType - Unit of `sliderDelay` (e.g. "ms", "s"). Example: "ms".
600
+ * @property {IProductBlockProductConfig} productConfig - Layout configuration for products inside the block.
601
+ * @property {IProductBlockSimilarRule[]} similarProductRules - Rules used to find similar products.
602
+ * @property {Record<string, unknown>} condition - Filter condition applied to products in the block; field set varies by condition type (e.g. `{ name: "cost", costFrom: 0, costTo: 130 }`).
603
+ * @property {Record<string, unknown> | null} [frequentlyOrderedConfig] - Configuration for the frequently-ordered products feature, or null when not configured.
604
+ * @description Custom settings of a product block — controls layout, sorting and similarity rules.
605
+ */
606
+ interface IProductBlockSettings {
607
+ sliderDelay: number | null;
608
+ sliderDelayType: string | null;
609
+ productConfig: IProductBlockProductConfig;
610
+ similarProductRules: IProductBlockSimilarRule[];
611
+ condition: Record<string, unknown>;
612
+ frequentlyOrderedConfig?: Record<string, unknown> | null;
613
+ }
614
+ /**
615
+ * @interface IProductBlockProductConfig
616
+ * @property {string | number} quantity - Number of products to render. Example: 9.
617
+ * @property {string | number} countElementsPerRow - Products per row. Example: 3.
618
+ * @property {string | number} [sortType] - Sort field. Example: "price".
619
+ * @property {string | number} [sortOrder] - Sort direction. Example: "ASC".
620
+ * @description Layout config for products inside a {@link IProductBlock}.
621
+ */
622
+ interface IProductBlockProductConfig {
623
+ quantity: string | number;
624
+ countElementsPerRow: string | number;
625
+ sortType?: string | number;
626
+ sortOrder?: string | number;
627
+ }
628
+ /**
629
+ * @interface IProductBlockSimilarRule
630
+ * @property {string} property - Product property to match on. Example: "categories".
631
+ * @property {string} includes - Match strategy (e.g. "any", "all"). Example: "any".
632
+ * @property {string} keywords - Keywords used for the match. Example: "foo,bar".
633
+ * @property {string} strict - Strictness flag ("true"/"false") of the match. Example: "false".
634
+ * @description Single rule used to compute similar products for a {@link IProductBlock}.
635
+ */
636
+ interface IProductBlockSimilarRule {
637
+ property: string;
638
+ includes: string;
639
+ keywords: string;
640
+ strict: string;
641
+ }
550
642
  interface IProductBlock {
551
643
  id: number;
552
644
  attributeSetIdentifier: string | null;
@@ -555,23 +647,7 @@ interface IProductBlock {
555
647
  position: number;
556
648
  identifier: string;
557
649
  type: Types;
558
- customSettings: {
559
- sliderDelay: number | null;
560
- sliderDelayType: string | null;
561
- productConfig: {
562
- quantity: string | number;
563
- countElementsPerRow: string | number;
564
- sortType?: string | number;
565
- sortOrder?: string | number;
566
- };
567
- similarProductRules: Array<{
568
- property: string;
569
- includes: string;
570
- keywords: string;
571
- strict: string;
572
- }>;
573
- condition: Record<string, unknown>;
574
- };
650
+ customSettings: IProductBlockSettings;
575
651
  templateIdentifier: string | null;
576
652
  isVisible: boolean;
577
653
  isSync: boolean;
@@ -33,7 +33,12 @@ export declare const ProductEntitySchema: z.ZodObject<{
33
33
  attributeSetIdentifier: z.ZodNullable<z.ZodString>;
34
34
  position: z.ZodNumber;
35
35
  price: z.ZodNullable<z.ZodNumber>;
36
- additional: z.ZodRecord<z.ZodString, z.ZodAny>;
36
+ additional: z.ZodObject<{
37
+ prices: z.ZodObject<{
38
+ min: z.ZodNumber;
39
+ max: z.ZodNumber;
40
+ }, z.core.$strip>;
41
+ }, z.core.$strip>;
37
42
  sku: z.ZodNullable<z.ZodString>;
38
43
  isSync: z.ZodBoolean;
39
44
  attributeValues: z.ZodRecord<z.ZodString, z.ZodAny>;
@@ -44,7 +49,13 @@ export declare const ProductEntitySchema: z.ZodObject<{
44
49
  templateIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
45
50
  shortDescTemplateIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
46
51
  signedPrice: z.ZodOptional<z.ZodString>;
47
- productPages: z.ZodOptional<z.ZodArray<z.ZodAny>>;
52
+ productPages: z.ZodOptional<z.ZodArray<z.ZodObject<{
53
+ id: z.ZodNumber;
54
+ pageId: z.ZodNumber;
55
+ productId: z.ZodNumber;
56
+ positionId: z.ZodNumber;
57
+ categoryPath: z.ZodString;
58
+ }, z.core.$strip>>>;
48
59
  blocks: z.ZodOptional<z.ZodArray<z.ZodString>>;
49
60
  isPositionLocked: z.ZodOptional<z.ZodBoolean>;
50
61
  relatedIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
@@ -63,7 +74,12 @@ export declare const ProductsResponseSchema: z.ZodObject<{
63
74
  attributeSetIdentifier: z.ZodNullable<z.ZodString>;
64
75
  position: z.ZodNumber;
65
76
  price: z.ZodNullable<z.ZodNumber>;
66
- additional: z.ZodRecord<z.ZodString, z.ZodAny>;
77
+ additional: z.ZodObject<{
78
+ prices: z.ZodObject<{
79
+ min: z.ZodNumber;
80
+ max: z.ZodNumber;
81
+ }, z.core.$strip>;
82
+ }, z.core.$strip>;
67
83
  sku: z.ZodNullable<z.ZodString>;
68
84
  isSync: z.ZodBoolean;
69
85
  attributeValues: z.ZodRecord<z.ZodString, z.ZodAny>;
@@ -74,7 +90,13 @@ export declare const ProductsResponseSchema: z.ZodObject<{
74
90
  templateIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
75
91
  shortDescTemplateIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
76
92
  signedPrice: z.ZodOptional<z.ZodString>;
77
- productPages: z.ZodOptional<z.ZodArray<z.ZodAny>>;
93
+ productPages: z.ZodOptional<z.ZodArray<z.ZodObject<{
94
+ id: z.ZodNumber;
95
+ pageId: z.ZodNumber;
96
+ productId: z.ZodNumber;
97
+ positionId: z.ZodNumber;
98
+ categoryPath: z.ZodString;
99
+ }, z.core.$strip>>>;
78
100
  blocks: z.ZodOptional<z.ZodArray<z.ZodString>>;
79
101
  isPositionLocked: z.ZodOptional<z.ZodBoolean>;
80
102
  relatedIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
@@ -94,7 +116,12 @@ export declare const SingleProductSchema: z.ZodObject<{
94
116
  attributeSetIdentifier: z.ZodNullable<z.ZodString>;
95
117
  position: z.ZodNumber;
96
118
  price: z.ZodNullable<z.ZodNumber>;
97
- additional: z.ZodRecord<z.ZodString, z.ZodAny>;
119
+ additional: z.ZodObject<{
120
+ prices: z.ZodObject<{
121
+ min: z.ZodNumber;
122
+ max: z.ZodNumber;
123
+ }, z.core.$strip>;
124
+ }, z.core.$strip>;
98
125
  sku: z.ZodNullable<z.ZodString>;
99
126
  isSync: z.ZodBoolean;
100
127
  attributeValues: z.ZodRecord<z.ZodString, z.ZodAny>;
@@ -105,7 +132,13 @@ export declare const SingleProductSchema: z.ZodObject<{
105
132
  templateIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
106
133
  shortDescTemplateIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
107
134
  signedPrice: z.ZodOptional<z.ZodString>;
108
- productPages: z.ZodOptional<z.ZodArray<z.ZodAny>>;
135
+ productPages: z.ZodOptional<z.ZodArray<z.ZodObject<{
136
+ id: z.ZodNumber;
137
+ pageId: z.ZodNumber;
138
+ productId: z.ZodNumber;
139
+ positionId: z.ZodNumber;
140
+ categoryPath: z.ZodString;
141
+ }, z.core.$strip>>>;
109
142
  blocks: z.ZodOptional<z.ZodArray<z.ZodString>>;
110
143
  isPositionLocked: z.ZodOptional<z.ZodBoolean>;
111
144
  relatedIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
@@ -148,7 +181,12 @@ export declare const RelatedProductsSchema: z.ZodArray<z.ZodObject<{
148
181
  attributeSetIdentifier: z.ZodNullable<z.ZodString>;
149
182
  position: z.ZodNumber;
150
183
  price: z.ZodNullable<z.ZodNumber>;
151
- additional: z.ZodRecord<z.ZodString, z.ZodAny>;
184
+ additional: z.ZodObject<{
185
+ prices: z.ZodObject<{
186
+ min: z.ZodNumber;
187
+ max: z.ZodNumber;
188
+ }, z.core.$strip>;
189
+ }, z.core.$strip>;
152
190
  sku: z.ZodNullable<z.ZodString>;
153
191
  isSync: z.ZodBoolean;
154
192
  attributeValues: z.ZodRecord<z.ZodString, z.ZodAny>;
@@ -159,7 +197,13 @@ export declare const RelatedProductsSchema: z.ZodArray<z.ZodObject<{
159
197
  templateIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
160
198
  shortDescTemplateIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
161
199
  signedPrice: z.ZodOptional<z.ZodString>;
162
- productPages: z.ZodOptional<z.ZodArray<z.ZodAny>>;
200
+ productPages: z.ZodOptional<z.ZodArray<z.ZodObject<{
201
+ id: z.ZodNumber;
202
+ pageId: z.ZodNumber;
203
+ productId: z.ZodNumber;
204
+ positionId: z.ZodNumber;
205
+ categoryPath: z.ZodString;
206
+ }, z.core.$strip>>>;
163
207
  blocks: z.ZodOptional<z.ZodArray<z.ZodString>>;
164
208
  isPositionLocked: z.ZodOptional<z.ZodBoolean>;
165
209
  relatedIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
@@ -36,7 +36,12 @@ exports.ProductEntitySchema = zod_1.z.object({
36
36
  attributeSetIdentifier: zod_1.z.string().nullable(),
37
37
  position: zod_1.z.number(),
38
38
  price: zod_1.z.number().nullable(),
39
- additional: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
39
+ additional: zod_1.z.object({
40
+ prices: zod_1.z.object({
41
+ min: zod_1.z.number(),
42
+ max: zod_1.z.number(),
43
+ }),
44
+ }),
40
45
  sku: zod_1.z.string().nullable(),
41
46
  isSync: zod_1.z.boolean(),
42
47
  attributeValues: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
@@ -47,7 +52,15 @@ exports.ProductEntitySchema = zod_1.z.object({
47
52
  templateIdentifier: zod_1.z.string().optional().nullable(),
48
53
  shortDescTemplateIdentifier: zod_1.z.string().optional().nullable(),
49
54
  signedPrice: zod_1.z.string().optional(),
50
- productPages: zod_1.z.array(zod_1.z.any()).optional(),
55
+ productPages: zod_1.z
56
+ .array(zod_1.z.object({
57
+ id: zod_1.z.number(),
58
+ pageId: zod_1.z.number(),
59
+ productId: zod_1.z.number(),
60
+ positionId: zod_1.z.number(),
61
+ categoryPath: zod_1.z.string(),
62
+ }))
63
+ .optional(),
51
64
  blocks: zod_1.z.array(zod_1.z.string()).optional(),
52
65
  isPositionLocked: zod_1.z.boolean().optional(),
53
66
  relatedIds: zod_1.z.array(zod_1.z.number()).optional(),
@@ -1,7 +1,7 @@
1
1
  import AsyncModules from '../base/asyncModules';
2
2
  import type StateModule from '../base/stateModule';
3
3
  import type { IError } from '../base/utils';
4
- import type { ISitemapApi, ISitemapEntity } from './sitemapInterfaces';
4
+ import type { ISitemapApi, ISitemapQuery } from './sitemapInterfaces';
5
5
  /**
6
6
  * Controllers for working with sitemaps.
7
7
  * @handle /api/content/sitemap
@@ -27,9 +27,9 @@ export default class SitemapApi extends AsyncModules implements ISitemapApi {
27
27
  /**
28
28
  * Generates a new set of sitemaps.
29
29
  * @handleName updateSitemap
30
- * @param {Array<ISitemapEntity>} body - Sitemap body params.
31
- * @returns {Promise<string[] | IError>} Returns an array of sitemap URLs.
30
+ * @param {ISitemapQuery} body - Sitemap body params (e.g. `{ baseUrls: { en_US: "https://…" } }`).
31
+ * @returns {Promise<string[] | IError>} Returns an array of generated sitemap URLs.
32
32
  * @throws {IError} When isShell=false and an error occurs during the fetch
33
33
  */
34
- updateSitemap(body: Array<ISitemapEntity>): Promise<Array<ISitemapEntity> | IError>;
34
+ updateSitemap(body: ISitemapQuery): Promise<string[] | IError>;
35
35
  }
@@ -33,8 +33,8 @@ class SitemapApi extends asyncModules_1.default {
33
33
  /**
34
34
  * Generates a new set of sitemaps.
35
35
  * @handleName updateSitemap
36
- * @param {Array<ISitemapEntity>} body - Sitemap body params.
37
- * @returns {Promise<string[] | IError>} Returns an array of sitemap URLs.
36
+ * @param {ISitemapQuery} body - Sitemap body params (e.g. `{ baseUrls: { en_US: "https://…" } }`).
37
+ * @returns {Promise<string[] | IError>} Returns an array of generated sitemap URLs.
38
38
  * @throws {IError} When isShell=false and an error occurs during the fetch
39
39
  */
40
40
  async updateSitemap(body) {
@@ -13,24 +13,26 @@ interface ISitemapApi {
13
13
  /**
14
14
  * Generates a new set of sitemaps.
15
15
  * @handleName updateSitemap
16
- * @param {Array<ISitemapQuery>} body - Sitemap body params.
17
- * @returns {Promise<Array<ISitemapEntity> | IError>}
16
+ * @param {ISitemapQuery} body - Sitemap body params.
17
+ * @returns {Promise<string[] | IError>} Returns an array of generated sitemap URLs.
18
18
  */
19
- updateSitemap(body: Array<ISitemapQuery>): Promise<Array<ISitemapEntity> | IError>;
19
+ updateSitemap(body: ISitemapQuery): Promise<string[] | IError>;
20
20
  }
21
21
  /**
22
22
  * Query parameters for sitemap requests.
23
23
  * @interface ISitemapQuery
24
- * @property {string} url - URL of the sitemap entry.
25
- * @property {string} lastmod - Last modification date.
26
- * @property {string} changefreq - Frequency of changes.
27
- * @property {number} priority - Priority of the entry.
24
+ * @property {Record<string, string>} [baseUrls] - Base URLs per language for sitemap generation. Example: `{ "en_US": "https://example.com/" }`.
25
+ * @property {string} [url] - URL of a single sitemap entry.
26
+ * @property {string} [lastmod] - Last modification date of the entry.
27
+ * @property {string} [changefreq] - Frequency of changes for the entry.
28
+ * @property {number} [priority] - Priority of the entry.
28
29
  */
29
30
  interface ISitemapQuery {
30
- url: string;
31
- lastmod: string;
32
- changefreq: string;
33
- priority: number;
31
+ baseUrls?: Record<string, string>;
32
+ url?: string;
33
+ lastmod?: string;
34
+ changefreq?: string;
35
+ priority?: number;
34
36
  }
35
37
  /**
36
38
  * Entity interface for sitemap.
@@ -35,9 +35,14 @@ class TemplatesPreviewApi extends asyncModules_1.default {
35
35
  // Validate response if validation is enabled
36
36
  const validated = this._validateResponse(response, templatesSchemas_1.GroupedTemplatesResponseSchema);
37
37
  const result = {};
38
- // eslint-disable-next-line no-restricted-syntax
39
- for (const item in validated) {
40
- result[item] = this._normalizeData(validated[item], langCode);
38
+ if (validated &&
39
+ typeof validated === 'object' &&
40
+ !('statusCode' in validated)) {
41
+ const grouped = validated;
42
+ // eslint-disable-next-line no-restricted-syntax
43
+ for (const item in grouped) {
44
+ result[item] = this._normalizeData(grouped[item], langCode);
45
+ }
41
46
  }
42
47
  return result;
43
48
  }
@@ -1,4 +1,4 @@
1
- import type { AttributeType, IError, Types } from '../base/utils';
1
+ import type { IAttributeValues, IError, Types } from '../base/utils';
2
2
  /**
3
3
  * @interface ITemplatesApi
4
4
  * @description This interface defines methods for retrieving templates in the system, including fetching all templates, specific templates by type or ID, and by marker.
@@ -44,7 +44,7 @@ interface ITemplatesApi {
44
44
  * @property {string} identifier - The textual identifier for the record field. Example: "template_12345".
45
45
  * @property {number} version - The version number of the object. Example: 1.
46
46
  * @property {Types} generalTypeName - General type name. Example: "product".
47
- * @property {AttributeType} attributeValues - Attribute values from the index (represented as a pair of user attribute id: attribute value).
47
+ * @property {IAttributeValues} attributeValues - Map of attribute values keyed by marker; empty object when none.
48
48
  * @example
49
49
  {
50
50
  "id": 1,
@@ -61,7 +61,7 @@ interface ITemplateEntity {
61
61
  identifier: string;
62
62
  version: number;
63
63
  generalTypeName: Types;
64
- attributeValues: AttributeType;
64
+ attributeValues: IAttributeValues;
65
65
  position: number;
66
66
  }
67
67
  export type { ITemplateEntity, ITemplatesApi };
@@ -78,13 +78,7 @@ interface ITemplatesPreviewApi {
78
78
  interface ITemplatesPreviewEntity {
79
79
  id: number;
80
80
  title: string;
81
- proportions: {
82
- default: {
83
- horizontal: IProportion | null;
84
- vertical: IProportion | null;
85
- square: ISquare;
86
- };
87
- };
81
+ proportions: ITemplatesPreviewProportions;
88
82
  identifier: string;
89
83
  version: number;
90
84
  attributeValues: AttributeType;
@@ -92,6 +86,26 @@ interface ITemplatesPreviewEntity {
92
86
  isUsed: boolean;
93
87
  attributeSetIdentifier?: string | null;
94
88
  }
89
+ /**
90
+ * @interface ITemplatesPreviewProportions
91
+ * @property {ITemplatesPreviewProportionVariants} default - Default proportion variants for horizontal, vertical, and square layouts.
92
+ * @description Container for proportion variants of a template preview.
93
+ */
94
+ interface ITemplatesPreviewProportions {
95
+ default: ITemplatesPreviewProportionVariants;
96
+ }
97
+ /**
98
+ * @interface ITemplatesPreviewProportionVariants
99
+ * @property {IProportion | null} horizontal - Horizontal layout proportion, or null when not configured.
100
+ * @property {IProportion | null} vertical - Vertical layout proportion, or null when not configured.
101
+ * @property {ISquare} square - Square layout proportion.
102
+ * @description Layout proportion variants of a template preview.
103
+ */
104
+ interface ITemplatesPreviewProportionVariants {
105
+ horizontal: IProportion | null;
106
+ vertical: IProportion | null;
107
+ square: ISquare;
108
+ }
95
109
  /**
96
110
  * The `IProportion` interface defines the structure of a proportion object used in template previews.
97
111
  * @interface IProportion
@@ -116,4 +130,4 @@ interface ISquare {
116
130
  side: number | string;
117
131
  alignmentType: string;
118
132
  }
119
- export type { IProportion, ISquare, ITemplatesPreviewApi, ITemplatesPreviewEntity, };
133
+ export type { IProportion, ISquare, ITemplatesPreviewApi, ITemplatesPreviewEntity, ITemplatesPreviewProportions, ITemplatesPreviewProportionVariants, };
@@ -1,4 +1,4 @@
1
- import type { IAuthData, IAuthFormData } from '../auth-provider/authProvidersInterfaces';
1
+ import type { IAuthData, IAuthFormData, INotificationData } from '../auth-provider/authProvidersInterfaces';
2
2
  import type { IError, IRating } from '../base/utils';
3
3
  import type { IFormConfig } from '../forms/formsInterfaces';
4
4
  import type { FormDataType } from '../forms-data/formsDataInterfaces';
@@ -172,7 +172,7 @@ interface IUserEntity {
172
172
  formIdentifier: string;
173
173
  total: string;
174
174
  groups: Array<string | number>;
175
- state: Record<string, any>;
175
+ state: Record<string, unknown>;
176
176
  moduleFormConfigs?: Array<IFormConfig>;
177
177
  rating?: IRating;
178
178
  }
@@ -221,11 +221,7 @@ interface IUserBody {
221
221
  langCode?: string;
222
222
  authData?: IAuthData[];
223
223
  formData?: IAuthFormData | IAuthFormData[];
224
- notificationData?: {
225
- email: string;
226
- phonePush: string[];
227
- phoneSMS?: string;
228
- };
229
- state?: Record<string, any>;
224
+ notificationData?: INotificationData;
225
+ state?: Record<string, unknown>;
230
226
  }
231
227
  export type { IUserBody, IUserEntity, IUsersApi };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oneentry",
3
- "version": "1.0.146",
3
+ "version": "1.0.147",
4
4
  "description": "OneEntry NPM package",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -10,7 +10,7 @@
10
10
  "bin": {
11
11
  "oneentry": "./configure.js"
12
12
  },
13
- "author": "ONEENTRY PORTAL LLC",
13
+ "author": "ONEENTRY PORTAL CO.",
14
14
  "license": "ISC",
15
15
  "dependencies": {
16
16
  "socket.io-client": "^4.8.3",