oneentry 1.0.172 → 1.0.173
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/changelog.md +25 -0
- package/dist/auth-provider/authProviderApi.d.ts +2 -2
- package/dist/auth-provider/authProviderApi.js +2 -2
- package/dist/auth-provider/authProvidersInterfaces.d.ts +3 -3
- package/dist/base/utils.d.ts +1 -1
- package/dist/file-uploading/fileUploadingApi.d.ts +10 -10
- package/dist/file-uploading/fileUploadingApi.js +8 -11
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +14 -14
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/integration-collections/integrationCollectionsApi.d.ts +12 -16
- package/dist/integration-collections/integrationCollectionsApi.js +10 -14
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +24 -23
- package/dist/orders/ordersInterfaces.d.ts +2 -2
- package/dist/product-statuses/productStatusesApi.d.ts +2 -2
- package/dist/product-statuses/productStatusesApi.js +2 -2
- package/dist/product-statuses/productStatusesInterfaces.d.ts +2 -2
- package/dist/products/productsInterfaces.d.ts +4 -4
- package/dist/system/systemApi.d.ts +4 -4
- package/dist/system/systemApi.js +2 -2
- package/dist/system/systemInterfaces.d.ts +11 -5
- package/dist/templates/templatesApi.d.ts +3 -3
- package/dist/templates/templatesApi.js +3 -3
- package/dist/templates/templatesInterfaces.d.ts +3 -3
- package/esm/auth-provider/authProviderApi.d.ts +2 -2
- package/esm/auth-provider/authProviderApi.js +2 -2
- package/esm/auth-provider/authProvidersInterfaces.d.ts +3 -3
- package/esm/base/utils.d.ts +1 -1
- package/esm/file-uploading/fileUploadingApi.d.ts +10 -10
- package/esm/file-uploading/fileUploadingApi.js +8 -11
- package/esm/file-uploading/fileUploadingInterfaces.d.ts +14 -14
- package/esm/index.d.ts +1 -1
- package/esm/index.js +1 -1
- package/esm/integration-collections/integrationCollectionsApi.d.ts +12 -16
- package/esm/integration-collections/integrationCollectionsApi.js +10 -14
- package/esm/integration-collections/integrationCollectionsInterfaces.d.ts +24 -23
- package/esm/orders/ordersInterfaces.d.ts +2 -2
- package/esm/product-statuses/productStatusesApi.d.ts +2 -2
- package/esm/product-statuses/productStatusesApi.js +2 -2
- package/esm/product-statuses/productStatusesInterfaces.d.ts +2 -2
- package/esm/products/productsInterfaces.d.ts +4 -4
- package/esm/system/systemApi.d.ts +4 -4
- package/esm/system/systemApi.js +2 -2
- package/esm/system/systemInterfaces.d.ts +11 -5
- package/esm/templates/templatesApi.d.ts +3 -3
- package/esm/templates/templatesApi.js +3 -3
- package/esm/templates/templatesInterfaces.d.ts +3 -3
- package/package.json +2 -2
|
@@ -211,7 +211,7 @@ interface IOrdersVectorSearch {
|
|
|
211
211
|
"formData": [
|
|
212
212
|
{
|
|
213
213
|
"marker": "order_name",
|
|
214
|
-
"value": "
|
|
214
|
+
"value": "John",
|
|
215
215
|
"type": "string"
|
|
216
216
|
}
|
|
217
217
|
],
|
|
@@ -578,7 +578,7 @@ interface IOrderSplit {
|
|
|
578
578
|
[
|
|
579
579
|
{
|
|
580
580
|
"marker": "order_name",
|
|
581
|
-
"value": "
|
|
581
|
+
"value": "John",
|
|
582
582
|
"type": "string"
|
|
583
583
|
}
|
|
584
584
|
]
|
|
@@ -29,7 +29,7 @@ export default class ProductStatusesApi extends AsyncModules implements IProduct
|
|
|
29
29
|
/**
|
|
30
30
|
* Search for a product status object by its textual identifier (marker).
|
|
31
31
|
* @handleName getProductsByStatusMarker
|
|
32
|
-
* @param {string} marker - Product marker. Example: "in_stock".
|
|
32
|
+
* @param {string} marker - Product status marker. Example: "in_stock".
|
|
33
33
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
34
34
|
* @returns {Promise<IProductStatusEntity | IError>} Returns a product status object.
|
|
35
35
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -40,7 +40,7 @@ export default class ProductStatusesApi extends AsyncModules implements IProduct
|
|
|
40
40
|
/**
|
|
41
41
|
* Check the existence of a textual identifier.
|
|
42
42
|
* @handleName validateMarker
|
|
43
|
-
* @param {string} marker - Product marker. Example: "in_stock".
|
|
43
|
+
* @param {string} marker - Product status marker. Example: "in_stock".
|
|
44
44
|
* @returns {Promise<boolean | IError>} Returns true if the textual identifier (marker) exists or false if it doesn't.
|
|
45
45
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
46
46
|
* @description Check the existence of a textual identifier.
|
|
@@ -34,7 +34,7 @@ export default class ProductStatusesApi extends AsyncModules {
|
|
|
34
34
|
/**
|
|
35
35
|
* Search for a product status object by its textual identifier (marker).
|
|
36
36
|
* @handleName getProductsByStatusMarker
|
|
37
|
-
* @param {string} marker - Product marker. Example: "in_stock".
|
|
37
|
+
* @param {string} marker - Product status marker. Example: "in_stock".
|
|
38
38
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
39
39
|
* @returns {Promise<IProductStatusEntity | IError>} Returns a product status object.
|
|
40
40
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -50,7 +50,7 @@ export default class ProductStatusesApi extends AsyncModules {
|
|
|
50
50
|
/**
|
|
51
51
|
* Check the existence of a textual identifier.
|
|
52
52
|
* @handleName validateMarker
|
|
53
|
-
* @param {string} marker - Product marker. Example: "in_stock".
|
|
53
|
+
* @param {string} marker - Product status marker. Example: "in_stock".
|
|
54
54
|
* @returns {Promise<boolean | IError>} Returns true if the textual identifier (marker) exists or false if it doesn't.
|
|
55
55
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
56
56
|
* @description Check the existence of a textual identifier.
|
|
@@ -16,7 +16,7 @@ interface IProductStatusesApi {
|
|
|
16
16
|
/**
|
|
17
17
|
* Search for a product status object by its textual identifier (marker).
|
|
18
18
|
* @handleName getProductsByStatusMarker
|
|
19
|
-
* @param {string} marker - Product marker. Example: "in_stock".
|
|
19
|
+
* @param {string} marker - Product status marker. Example: "in_stock".
|
|
20
20
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
21
21
|
* @returns {IProductStatusEntity} Returns a product status object.
|
|
22
22
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
@@ -26,7 +26,7 @@ interface IProductStatusesApi {
|
|
|
26
26
|
/**
|
|
27
27
|
* Check the existence of a textual identifier.
|
|
28
28
|
* @handleName validateMarker
|
|
29
|
-
* @param {string} marker - Product marker. Example: "in_stock".
|
|
29
|
+
* @param {string} marker - Product status marker. Example: "in_stock".
|
|
30
30
|
* @returns {boolean} Returns true if the textual identifier (marker) exists or false if it doesn't.
|
|
31
31
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
32
32
|
* @description This method checks the existence of a textual identifier.
|
|
@@ -367,9 +367,9 @@ type IProductsByIdsQuery = Pick<IProductsQueryBase, 'signPrice'>;
|
|
|
367
367
|
type IProductsQuery = IProductsQueryBase;
|
|
368
368
|
/**
|
|
369
369
|
* @interface IFilterParams
|
|
370
|
-
* @property {string
|
|
370
|
+
* @property {string} [attributeMarker] - The text identifier of the indexed attribute by which values are filtered. Example: "color". Optional: a filter entry may select by `statusMarker` (or `pageUrls`, `title`) alone, e.g. `{ statusMarker: "in_stock" }`.
|
|
371
371
|
* @property {string | null} [conditionMarker] - Id of the filter condition by which the values are filtered. Default: null. Example: "eq".
|
|
372
|
-
* @property {number | string | null} conditionValue - The value that is being searched for, default null. Example: "new".
|
|
372
|
+
* @property {number | string | null} [conditionValue] - The value that is being searched for, default null. Example: "new". Needed together with `attributeMarker`.
|
|
373
373
|
* @property {string | null} [pageUrl] - Url of the category page object. Example: ["23-laminat-floorwood-maxima"].
|
|
374
374
|
* @property {string[] | null} [pageUrls] - Url of the category page object. Example: ["23-laminat-floorwood-maxima"].
|
|
375
375
|
* @property {string | null} [statusMarker] - Text identifier of the product page status (default not set). Example: "in_stock".
|
|
@@ -378,9 +378,9 @@ type IProductsQuery = IProductsQueryBase;
|
|
|
378
378
|
* @description This interface defines the structure of filter parameters used for querying products, including conditions, attributes, and pagination.
|
|
379
379
|
*/
|
|
380
380
|
interface IFilterParams {
|
|
381
|
-
attributeMarker
|
|
381
|
+
attributeMarker?: string;
|
|
382
382
|
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 */ | 'pat' /** 'pat' - Matches pattern */ | 'same' /** 'same' - Matches the value exactly */ | 'same_part' /** 'same_part' - Matches a part of the value exactly */ | null;
|
|
383
|
-
conditionValue
|
|
383
|
+
conditionValue?: number | string | null;
|
|
384
384
|
pageUrl?: string | null;
|
|
385
385
|
pageUrls?: string[] | null;
|
|
386
386
|
statusMarker?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import AsyncModules from '../base/asyncModules.js';
|
|
2
2
|
import type StateModule from '../base/stateModule.js';
|
|
3
3
|
import type { IError } from '../base/utils.js';
|
|
4
|
-
import type { ISystemApi } from './systemInterfaces.js';
|
|
4
|
+
import type { IApiStatEntry, ISystemApi } from './systemInterfaces.js';
|
|
5
5
|
/**
|
|
6
6
|
* Controllers for working with system components
|
|
7
7
|
* @handle /api/content/system
|
|
@@ -37,10 +37,10 @@ export default class SystemApi extends AsyncModules implements ISystemApi {
|
|
|
37
37
|
/**
|
|
38
38
|
* Getting the number of requests to API.
|
|
39
39
|
* @handleName getApiStat
|
|
40
|
-
* @returns {Promise<
|
|
40
|
+
* @returns {Promise<IApiStatEntry[] | IError>} Array of one-key objects `{ [YYYY-MM-DD]: count }`, one per day. Example: `[{ "2026-10-25": 17280 }, { "2026-10-26": 13671 }]`.
|
|
41
41
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
42
|
-
* @description Getting the number of requests to API.
|
|
42
|
+
* @description Getting the number of requests to API, per day.
|
|
43
43
|
* @see {@link https://js-sdk.oneentry.cloud/docs/system/getApiStat getApiStat} documentation.
|
|
44
44
|
*/
|
|
45
|
-
getApiStat(): Promise<
|
|
45
|
+
getApiStat(): Promise<IApiStatEntry[] | IError>;
|
|
46
46
|
}
|
package/esm/system/systemApi.js
CHANGED
|
@@ -41,9 +41,9 @@ export default class SystemApi extends AsyncModules {
|
|
|
41
41
|
/**
|
|
42
42
|
* Getting the number of requests to API.
|
|
43
43
|
* @handleName getApiStat
|
|
44
|
-
* @returns {Promise<
|
|
44
|
+
* @returns {Promise<IApiStatEntry[] | IError>} Array of one-key objects `{ [YYYY-MM-DD]: count }`, one per day. Example: `[{ "2026-10-25": 17280 }, { "2026-10-26": 13671 }]`.
|
|
45
45
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
46
|
-
* @description Getting the number of requests to API.
|
|
46
|
+
* @description Getting the number of requests to API, per day.
|
|
47
47
|
* @see {@link https://js-sdk.oneentry.cloud/docs/system/getApiStat getApiStat} documentation.
|
|
48
48
|
*/
|
|
49
49
|
async getApiStat() {
|
|
@@ -19,11 +19,17 @@ interface ISystemApi {
|
|
|
19
19
|
*/
|
|
20
20
|
test500(): Promise<unknown | IError>;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Getting the number of requests to API.
|
|
23
23
|
* @handleName getApiStat
|
|
24
|
-
* @returns {
|
|
25
|
-
* @description
|
|
24
|
+
* @returns {Promise<IApiStatEntry[] | IError>} Array of one-key objects `{ [YYYY-MM-DD]: count }`, one per day. Example: `[{ "2026-10-25": 17280 }, { "2026-10-26": 13671 }]`.
|
|
25
|
+
* @description Getting the number of requests to API, per day.
|
|
26
26
|
*/
|
|
27
|
-
getApiStat(): Promise<
|
|
27
|
+
getApiStat(): Promise<IApiStatEntry[] | IError>;
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
/**
|
|
30
|
+
* One day of API request statistics: a single key — the date `YYYY-MM-DD` — holding the number of requests.
|
|
31
|
+
* @typedef {Record<string, number>} IApiStatEntry
|
|
32
|
+
* @description Element of the array returned by getApiStat. Example: `{ "2026-10-26": 13671 }`.
|
|
33
|
+
*/
|
|
34
|
+
type IApiStatEntry = Record<string, number>;
|
|
35
|
+
export type { IApiStatEntry, ISystemApi };
|
|
@@ -22,7 +22,7 @@ export default class TemplatesPreviewApi extends AsyncModules implements ITempla
|
|
|
22
22
|
* Get all template objects grouped by types.
|
|
23
23
|
* @handleName getAllTemplates
|
|
24
24
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
25
|
-
* @returns {Promise<Record<BlockType, ITemplateEntity[]> | IError>}
|
|
25
|
+
* @returns {Promise<Record<BlockType, ITemplateEntity[]> | IError>} Object keyed by `BlockType`; each value is an array of `ITemplateEntity` of that type.
|
|
26
26
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
27
27
|
* @description This function is designed to fetch organized template objects in groups based on their types.
|
|
28
28
|
* @see {@link https://js-sdk.oneentry.cloud/docs/templates/getAllTemplates getAllTemplates} documentation.
|
|
@@ -33,7 +33,7 @@ export default class TemplatesPreviewApi extends AsyncModules implements ITempla
|
|
|
33
33
|
* @handleName getTemplateByType
|
|
34
34
|
* @param {BlockType} type - The type of templates to retrieve. This parameter specifies the category or classification of templates being requested. Example: "product".
|
|
35
35
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
36
|
-
* @returns {Promise<ITemplateEntity[] | IError>}
|
|
36
|
+
* @returns {Promise<ITemplateEntity[] | IError>} Array of `ITemplateEntity` objects of the given type.
|
|
37
37
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
38
38
|
* @description Fetch template objects that belong to a specific type, with an optional filter by language.
|
|
39
39
|
* @see {@link https://js-sdk.oneentry.cloud/docs/templates/getTemplateByType getTemplateByType} documentation.
|
|
@@ -44,7 +44,7 @@ export default class TemplatesPreviewApi extends AsyncModules implements ITempla
|
|
|
44
44
|
* @handleName getTemplateByMarker
|
|
45
45
|
* @param {string} marker - The unique marker of the template to retrieve. Example: "template_12345".
|
|
46
46
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
47
|
-
* @returns {Promise<ITemplateEntity | IError>} Returns
|
|
47
|
+
* @returns {Promise<ITemplateEntity | IError>} Returns an `ITemplateEntity` object
|
|
48
48
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
49
49
|
* @description Fetch a specific template object based on its unique marker.
|
|
50
50
|
* @see {@link https://js-sdk.oneentry.cloud/docs/templates/getTemplateByMarker getTemplateByMarker} documentation.
|
|
@@ -22,7 +22,7 @@ export default class TemplatesPreviewApi extends AsyncModules {
|
|
|
22
22
|
* Get all template objects grouped by types.
|
|
23
23
|
* @handleName getAllTemplates
|
|
24
24
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
25
|
-
* @returns {Promise<Record<BlockType, ITemplateEntity[]> | IError>}
|
|
25
|
+
* @returns {Promise<Record<BlockType, ITemplateEntity[]> | IError>} Object keyed by `BlockType`; each value is an array of `ITemplateEntity` of that type.
|
|
26
26
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
27
27
|
* @description This function is designed to fetch organized template objects in groups based on their types.
|
|
28
28
|
* @see {@link https://js-sdk.oneentry.cloud/docs/templates/getAllTemplates getAllTemplates} documentation.
|
|
@@ -48,7 +48,7 @@ export default class TemplatesPreviewApi extends AsyncModules {
|
|
|
48
48
|
* @handleName getTemplateByType
|
|
49
49
|
* @param {BlockType} type - The type of templates to retrieve. This parameter specifies the category or classification of templates being requested. Example: "product".
|
|
50
50
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
51
|
-
* @returns {Promise<ITemplateEntity[] | IError>}
|
|
51
|
+
* @returns {Promise<ITemplateEntity[] | IError>} Array of `ITemplateEntity` objects of the given type.
|
|
52
52
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
53
53
|
* @description Fetch template objects that belong to a specific type, with an optional filter by language.
|
|
54
54
|
* @see {@link https://js-sdk.oneentry.cloud/docs/templates/getTemplateByType getTemplateByType} documentation.
|
|
@@ -64,7 +64,7 @@ export default class TemplatesPreviewApi extends AsyncModules {
|
|
|
64
64
|
* @handleName getTemplateByMarker
|
|
65
65
|
* @param {string} marker - The unique marker of the template to retrieve. Example: "template_12345".
|
|
66
66
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
67
|
-
* @returns {Promise<ITemplateEntity | IError>} Returns
|
|
67
|
+
* @returns {Promise<ITemplateEntity | IError>} Returns an `ITemplateEntity` object
|
|
68
68
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
69
69
|
* @description Fetch a specific template object based on its unique marker.
|
|
70
70
|
* @see {@link https://js-sdk.oneentry.cloud/docs/templates/getTemplateByMarker getTemplateByMarker} documentation.
|
|
@@ -9,7 +9,7 @@ interface ITemplatesApi {
|
|
|
9
9
|
* Get all template objects grouped by types.
|
|
10
10
|
* @handleName getAllTemplates
|
|
11
11
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
12
|
-
* @returns {Record<BlockType, ITemplateEntity[]>}
|
|
12
|
+
* @returns {Record<BlockType, ITemplateEntity[]>} Object keyed by `BlockType`; each value is an array of `ITemplateEntity` of that type.
|
|
13
13
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
14
14
|
* @description This method gets all template objects grouped by types.
|
|
15
15
|
*/
|
|
@@ -19,7 +19,7 @@ interface ITemplatesApi {
|
|
|
19
19
|
* @handleName getTemplateByType
|
|
20
20
|
* @param {BlockType} type - The type of templates to retrieve. This parameter specifies the category or classification of templates being requested. Example: "product".
|
|
21
21
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
22
|
-
* @returns {ITemplateEntity[]}
|
|
22
|
+
* @returns {ITemplateEntity[]} Array of `ITemplateEntity` objects of the given type.
|
|
23
23
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
24
24
|
* @description This method gets template objects by type.
|
|
25
25
|
*/
|
|
@@ -29,7 +29,7 @@ interface ITemplatesApi {
|
|
|
29
29
|
* @handleName getTemplateByMarker
|
|
30
30
|
* @param {string} marker - The unique marker of the template to retrieve. Example: "template_12345".
|
|
31
31
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
32
|
-
* @returns {ITemplateEntity} Returns
|
|
32
|
+
* @returns {ITemplateEntity} Returns an `ITemplateEntity` object
|
|
33
33
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
34
34
|
* @description This method gets one template object by id.
|
|
35
35
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oneentry",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.173",
|
|
4
4
|
"description": "OneEntry NPM package",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "esm/index.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"prepublishOnly": "node ../scripts/smoke-pack.js --files-only",
|
|
51
|
-
"postpublish": "node ../scripts/verify-published.js --named defineOneEntry --expect 1.0.
|
|
51
|
+
"postpublish": "node ../scripts/verify-published.js --named defineOneEntry --expect 1.0.173"
|
|
52
52
|
},
|
|
53
53
|
"sideEffects": false,
|
|
54
54
|
"files": [
|