oneentry 1.0.160 → 1.0.162
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/README.md +2 -0
- package/changelog.md +61 -0
- package/dist/admins/adminsApi.d.ts +15 -1
- package/dist/admins/adminsApi.js +29 -0
- package/dist/admins/adminsInterfaces.d.ts +39 -1
- package/dist/admins/adminsSchemas.d.ts +2 -0
- package/dist/admins/adminsSchemas.js +1 -0
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +2 -0
- package/dist/auth-provider/authProviderSchemas.d.ts +1 -0
- package/dist/base/lazySchema.d.ts +15 -0
- package/dist/base/lazySchema.js +20 -0
- package/dist/base/validation.d.ts +1 -0
- package/dist/base/validation.js +1 -0
- package/dist/blocks/blocksApi.d.ts +16 -8
- package/dist/blocks/blocksApi.js +24 -15
- package/dist/blocks/blocksInterfaces.d.ts +16 -8
- package/dist/discounts/discountsApi.d.ts +14 -1
- package/dist/discounts/discountsApi.js +21 -0
- package/dist/discounts/discountsInterfaces.d.ts +29 -1
- package/dist/filters/filtersInterfaces.d.ts +2 -2
- package/dist/filters/filtersSchemas.d.ts +1 -1
- package/dist/filters/filtersSchemas.js +4 -1
- package/dist/forms-data/formsDataApi.d.ts +14 -1
- package/dist/forms-data/formsDataApi.js +21 -0
- package/dist/forms-data/formsDataInterfaces.d.ts +78 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +3 -0
- package/dist/menus/menusInterfaces.d.ts +4 -0
- package/dist/menus/menusSchemas.js +2 -0
- package/dist/orders/ordersApi.d.ts +15 -1
- package/dist/orders/ordersApi.js +22 -0
- package/dist/orders/ordersInterfaces.d.ts +29 -1
- package/dist/orders/ordersSchemas.d.ts +2 -0
- package/dist/orders/ordersSchemas.js +1 -0
- package/dist/pages/pagesApi.d.ts +14 -11
- package/dist/pages/pagesApi.js +21 -17
- package/dist/pages/pagesInterfaces.d.ts +37 -17
- package/dist/pages/pagesSchemas.d.ts +3 -7
- package/dist/pages/pagesSchemas.js +2 -8
- package/dist/payments/paymentsInterfaces.d.ts +2 -2
- package/dist/products/productsInterfaces.d.ts +1 -1
- package/dist/search/searchApi.d.ts +35 -0
- package/dist/search/searchApi.js +86 -0
- package/dist/search/searchInterfaces.d.ts +94 -0
- package/dist/search/searchInterfaces.js +2 -0
- package/dist/search/searchSchemas.d.ts +73 -0
- package/dist/search/searchSchemas.js +44 -0
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +0 -2
- package/dist/templates-preview/templatesPreviewSchemas.d.ts +0 -2
- package/dist/templates-preview/templatesPreviewSchemas.js +0 -1
- package/dist/types.d.ts +35 -0
- package/dist/types.js +2 -0
- package/dist/users/usersApi.d.ts +15 -1
- package/dist/users/usersApi.js +22 -0
- package/dist/users/usersInterfaces.d.ts +41 -1
- package/dist/users/usersSchemas.d.ts +1 -0
- package/dist/web-socket/lazySocket.d.ts +18 -0
- package/dist/web-socket/lazySocket.js +70 -0
- package/esm/admins/adminsApi.d.ts +66 -0
- package/esm/admins/adminsApi.js +90 -0
- package/esm/admins/adminsInterfaces.d.ts +139 -0
- package/esm/admins/adminsInterfaces.js +1 -0
- package/esm/admins/adminsSchemas.d.ts +50 -0
- package/esm/admins/adminsSchemas.js +32 -0
- package/esm/attribute-sets/attributeSetsApi.d.ts +67 -0
- package/esm/attribute-sets/attributeSetsApi.js +97 -0
- package/esm/attribute-sets/attributeSetsInterfaces.d.ts +287 -0
- package/esm/attribute-sets/attributeSetsInterfaces.js +1 -0
- package/esm/attribute-sets/attributeSetsSchemas.d.ts +84 -0
- package/esm/attribute-sets/attributeSetsSchemas.js +66 -0
- package/esm/auth-provider/authProviderApi.d.ts +262 -0
- package/esm/auth-provider/authProviderApi.js +362 -0
- package/esm/auth-provider/authProviderSchemas.d.ts +125 -0
- package/esm/auth-provider/authProviderSchemas.js +92 -0
- package/esm/auth-provider/authProvidersInterfaces.d.ts +430 -0
- package/esm/auth-provider/authProvidersInterfaces.js +1 -0
- package/esm/base/asyncModules.d.ts +123 -0
- package/esm/base/asyncModules.js +382 -0
- package/esm/base/lazySchema.d.ts +15 -0
- package/esm/base/lazySchema.js +17 -0
- package/esm/base/stateModule.d.ts +35 -0
- package/esm/base/stateModule.js +51 -0
- package/esm/base/syncModules.d.ts +245 -0
- package/esm/base/syncModules.js +555 -0
- package/esm/base/timeIntervals.d.ts +95 -0
- package/esm/base/timeIntervals.js +317 -0
- package/esm/base/utils.d.ts +354 -0
- package/esm/base/utils.js +1 -0
- package/esm/base/validation.d.ts +99 -0
- package/esm/base/validation.js +119 -0
- package/esm/blocks/blocksApi.d.ts +260 -0
- package/esm/blocks/blocksApi.js +403 -0
- package/esm/blocks/blocksInterfaces.d.ts +369 -0
- package/esm/blocks/blocksInterfaces.js +1 -0
- package/esm/blocks/blocksSchemas.d.ts +213 -0
- package/esm/blocks/blocksSchemas.js +40 -0
- package/esm/discounts/discountsApi.d.ts +94 -0
- package/esm/discounts/discountsApi.js +136 -0
- package/esm/discounts/discountsInterfaces.d.ts +295 -0
- package/esm/discounts/discountsInterfaces.js +1 -0
- package/esm/events/eventsApi.d.ts +108 -0
- package/esm/events/eventsApi.js +141 -0
- package/esm/events/eventsInterfaces.d.ts +176 -0
- package/esm/events/eventsInterfaces.js +1 -0
- package/esm/file-uploading/fileUploadingApi.d.ts +91 -0
- package/esm/file-uploading/fileUploadingApi.js +127 -0
- package/esm/file-uploading/fileUploadingInterfaces.d.ts +116 -0
- package/esm/file-uploading/fileUploadingInterfaces.js +1 -0
- package/esm/file-uploading/fileUploadingSchemas.d.ts +24 -0
- package/esm/file-uploading/fileUploadingSchemas.js +19 -0
- package/esm/filters/filtersApi.d.ts +32 -0
- package/esm/filters/filtersApi.js +36 -0
- package/esm/filters/filtersInterfaces.d.ts +56 -0
- package/esm/filters/filtersInterfaces.js +1 -0
- package/esm/filters/filtersSchemas.d.ts +32 -0
- package/esm/filters/filtersSchemas.js +29 -0
- package/esm/forms/formsApi.d.ts +44 -0
- package/esm/forms/formsApi.js +54 -0
- package/esm/forms/formsInterfaces.d.ts +237 -0
- package/esm/forms/formsInterfaces.js +1 -0
- package/esm/forms/formsSchemas.d.ts +56 -0
- package/esm/forms/formsSchemas.js +32 -0
- package/esm/forms-data/formsDataApi.d.ts +124 -0
- package/esm/forms-data/formsDataApi.js +210 -0
- package/esm/forms-data/formsDataInterfaces.d.ts +674 -0
- package/esm/forms-data/formsDataInterfaces.js +1 -0
- package/esm/forms-data/formsDataSchemas.d.ts +107 -0
- package/esm/forms-data/formsDataSchemas.js +83 -0
- package/esm/general-types/generalTypesApi.d.ts +29 -0
- package/esm/general-types/generalTypesApi.js +34 -0
- package/esm/general-types/generalTypesInterfaces.d.ts +29 -0
- package/esm/general-types/generalTypesInterfaces.js +1 -0
- package/esm/general-types/generalTypesSchemas.d.ts +68 -0
- package/esm/general-types/generalTypesSchemas.js +42 -0
- package/esm/index.d.ts +143 -0
- package/esm/index.js +124 -0
- package/esm/integration-collections/integrationCollectionsApi.d.ts +172 -0
- package/esm/integration-collections/integrationCollectionsApi.js +224 -0
- package/esm/integration-collections/integrationCollectionsInterfaces.d.ts +317 -0
- package/esm/integration-collections/integrationCollectionsInterfaces.js +1 -0
- package/esm/integration-collections/integrationCollectionsSchemas.d.ts +84 -0
- package/esm/integration-collections/integrationCollectionsSchemas.js +60 -0
- package/esm/locales/localesApi.d.ts +28 -0
- package/esm/locales/localesApi.js +33 -0
- package/esm/locales/localesInterfaces.d.ts +40 -0
- package/esm/locales/localesInterfaces.js +1 -0
- package/esm/locales/localesSchemas.d.ts +32 -0
- package/esm/locales/localesSchemas.js +23 -0
- package/esm/menus/menusApi.d.ts +30 -0
- package/esm/menus/menusApi.js +35 -0
- package/esm/menus/menusInterfaces.d.ts +91 -0
- package/esm/menus/menusInterfaces.js +2 -0
- package/esm/menus/menusSchemas.d.ts +16 -0
- package/esm/menus/menusSchemas.js +27 -0
- package/esm/orders/ordersApi.d.ts +213 -0
- package/esm/orders/ordersApi.js +288 -0
- package/esm/orders/ordersInterfaces.d.ts +765 -0
- package/esm/orders/ordersInterfaces.js +1 -0
- package/esm/orders/ordersSchemas.d.ts +314 -0
- package/esm/orders/ordersSchemas.js +172 -0
- package/esm/package.json +4 -0
- package/esm/pages/pagesApi.d.ts +163 -0
- package/esm/pages/pagesApi.js +397 -0
- package/esm/pages/pagesInterfaces.d.ts +327 -0
- package/esm/pages/pagesInterfaces.js +1 -0
- package/esm/pages/pagesSchemas.d.ts +117 -0
- package/esm/pages/pagesSchemas.js +54 -0
- package/esm/payments/paymentsApi.d.ts +88 -0
- package/esm/payments/paymentsApi.js +122 -0
- package/esm/payments/paymentsInterfaces.d.ts +189 -0
- package/esm/payments/paymentsInterfaces.js +1 -0
- package/esm/payments/paymentsSchemas.d.ts +94 -0
- package/esm/payments/paymentsSchemas.js +53 -0
- package/esm/product-statuses/productStatusesApi.d.ts +50 -0
- package/esm/product-statuses/productStatusesApi.js +68 -0
- package/esm/product-statuses/productStatusesInterfaces.d.ts +62 -0
- package/esm/product-statuses/productStatusesInterfaces.js +1 -0
- package/esm/product-statuses/productStatusesSchemas.d.ts +34 -0
- package/esm/product-statuses/productStatusesSchemas.js +27 -0
- package/esm/products/productsApi.d.ts +366 -0
- package/esm/products/productsApi.js +468 -0
- package/esm/products/productsInterfaces.d.ts +723 -0
- package/esm/products/productsInterfaces.js +1 -0
- package/esm/products/productsSchemas.d.ts +234 -0
- package/esm/products/productsSchemas.js +121 -0
- package/esm/search/searchApi.d.ts +35 -0
- package/esm/search/searchApi.js +47 -0
- package/esm/search/searchInterfaces.d.ts +94 -0
- package/esm/search/searchInterfaces.js +1 -0
- package/esm/search/searchSchemas.d.ts +73 -0
- package/esm/search/searchSchemas.js +41 -0
- package/esm/sitemap/sitemapApi.d.ts +37 -0
- package/esm/sitemap/sitemapApi.js +41 -0
- package/esm/sitemap/sitemapInterfaces.d.ts +51 -0
- package/esm/sitemap/sitemapInterfaces.js +1 -0
- package/esm/subscriptions/subscriptionsApi.d.ts +74 -0
- package/esm/subscriptions/subscriptionsApi.js +90 -0
- package/esm/subscriptions/subscriptionsInterfaces.d.ts +111 -0
- package/esm/subscriptions/subscriptionsInterfaces.js +1 -0
- package/esm/subscriptions/subscriptionsSchemas.d.ts +46 -0
- package/esm/subscriptions/subscriptionsSchemas.js +38 -0
- package/esm/system/systemApi.d.ts +46 -0
- package/esm/system/systemApi.js +53 -0
- package/esm/system/systemInterfaces.d.ts +29 -0
- package/esm/system/systemInterfaces.js +1 -0
- package/esm/templates/templatesApi.d.ts +53 -0
- package/esm/templates/templatesApi.js +78 -0
- package/esm/templates/templatesInterfaces.d.ts +68 -0
- package/esm/templates/templatesInterfaces.js +1 -0
- package/esm/templates/templatesSchemas.d.ts +48 -0
- package/esm/templates/templatesSchemas.js +28 -0
- package/esm/templates-preview/templatesPreviewApi.d.ts +40 -0
- package/esm/templates-preview/templatesPreviewApi.js +50 -0
- package/esm/templates-preview/templatesPreviewInterfaces.d.ts +129 -0
- package/esm/templates-preview/templatesPreviewInterfaces.js +1 -0
- package/esm/templates-preview/templatesPreviewSchemas.d.ts +79 -0
- package/esm/templates-preview/templatesPreviewSchemas.js +43 -0
- package/esm/types.d.ts +35 -0
- package/esm/types.js +1 -0
- package/esm/user-activity/userActivityApi.d.ts +31 -0
- package/esm/user-activity/userActivityApi.js +37 -0
- package/esm/user-activity/userActivityInterfaces.d.ts +42 -0
- package/esm/user-activity/userActivityInterfaces.js +1 -0
- package/esm/users/usersApi.d.ts +249 -0
- package/esm/users/usersApi.js +312 -0
- package/esm/users/usersInterfaces.d.ts +421 -0
- package/esm/users/usersInterfaces.js +1 -0
- package/esm/users/usersSchemas.d.ts +73 -0
- package/esm/users/usersSchemas.js +55 -0
- package/esm/web-socket/lazySocket.d.ts +18 -0
- package/esm/web-socket/lazySocket.js +67 -0
- package/esm/web-socket/wsApi.d.ts +27 -0
- package/esm/web-socket/wsApi.js +43 -0
- package/esm/web-socket/wsInterfaces.d.ts +16 -0
- package/esm/web-socket/wsInterfaces.js +1 -0
- package/package.json +5 -1
- package/types.d.ts +1 -0
- package/types.js +1 -0
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
import type { IAttributes, IAttributeValues, IError, ILocalizeInfo, IRating, LangType } from '../base/utils.js';
|
|
2
|
+
import type { BlockType, IBlockEntity } from '../blocks/blocksInterfaces.js';
|
|
3
|
+
import type { IFormConfig } from '../forms/formsInterfaces.js';
|
|
4
|
+
import type { IProductsEntity, IProductsResponse } from '../products/productsInterfaces.js';
|
|
5
|
+
import type { ITemplateEntity } from '../templates/templatesInterfaces.js';
|
|
6
|
+
/**
|
|
7
|
+
* @interface IPagesApi
|
|
8
|
+
* @description This interface defines methods for retrieving and managing pages in the system.
|
|
9
|
+
*/
|
|
10
|
+
interface IPagesApi {
|
|
11
|
+
/**
|
|
12
|
+
* Get all top-level page objects.
|
|
13
|
+
* @handleName getRootPages
|
|
14
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
15
|
+
* @returns {IPagesEntity[]} Returns all created pages without parents as an array of PageEntity objects or an empty array [] (if there is no data)
|
|
16
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
17
|
+
* @description This method gets all top-level page objects.
|
|
18
|
+
*/
|
|
19
|
+
getRootPages(langCode?: LangType): Promise<IPagesEntity[] | IError>;
|
|
20
|
+
/**
|
|
21
|
+
* Get all page objects with product information as an array.
|
|
22
|
+
* @handleName getPages
|
|
23
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
24
|
+
* @returns {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data).
|
|
25
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
26
|
+
* @description This method gets all page objects with product information as an array.
|
|
27
|
+
*/
|
|
28
|
+
getPages(langCode?: LangType): Promise<IPagesEntity[] | IError>;
|
|
29
|
+
/**
|
|
30
|
+
* Get page object with information about forms, blocks, menus, linked to the page.
|
|
31
|
+
* @handleName getPageById
|
|
32
|
+
* @param {number} id - The unique identifier of the page to be fetched. Example: 123.
|
|
33
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
34
|
+
* @returns {IPagesEntity} Returns PageEntity object
|
|
35
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
36
|
+
* @description This method gets a page object with information about forms, blocks, menus, linked to the page.
|
|
37
|
+
*/
|
|
38
|
+
getPageById(id: number, langCode?: LangType): Promise<IPagesEntity | IError>;
|
|
39
|
+
/**
|
|
40
|
+
* Get page object with information about forms, blocks, menus, linked to the page by URL.
|
|
41
|
+
* @handleName getPageByUrl
|
|
42
|
+
* @param {string} url - Page URL. Example: "about".
|
|
43
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
44
|
+
* @returns {IPagesEntity} Returns PageEntity object
|
|
45
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
46
|
+
* @description This method gets a page object with information about forms, blocks, menus, linked to the page by URL.
|
|
47
|
+
*/
|
|
48
|
+
getPageByUrl(url: string, langCode?: LangType): Promise<IPagesEntity | IError>;
|
|
49
|
+
/**
|
|
50
|
+
* Get child pages object with information as an array.
|
|
51
|
+
* @handleName getChildPagesByParentUrl
|
|
52
|
+
* @param {string} url - The URL of the parent page for which child pages are to be fetched. Example: "about".
|
|
53
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
54
|
+
* @returns {IPagesEntity} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data) for the selected parent
|
|
55
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
56
|
+
* @description This method gets child pages object with information as an array.
|
|
57
|
+
*/
|
|
58
|
+
getChildPagesByParentUrl(url: string, langCode?: LangType): Promise<IPagesEntity[] | IError>;
|
|
59
|
+
/**
|
|
60
|
+
* Get all blocks by page url.
|
|
61
|
+
* @handleName getBlocksByPageUrl
|
|
62
|
+
* @param {string} url - Page URL. Example: "about".
|
|
63
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
64
|
+
* @returns {IPositionBlock[]} Returns all blocks as an array of PositionBlock objects or an empty array [] (if there is no data) for the selected parent
|
|
65
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
66
|
+
* @description This method gets all blocks by page url.
|
|
67
|
+
*/
|
|
68
|
+
getBlocksByPageUrl(url: string, langCode?: LangType): Promise<IPositionBlock[] | IError>;
|
|
69
|
+
/**
|
|
70
|
+
* Quick search for page objects with limited output.
|
|
71
|
+
* @handleName searchPage
|
|
72
|
+
* @param {string} name - Text for searching page objects (search is performed on the title field of the localizeInfos object with the language taken into account). Example: "About Us".
|
|
73
|
+
* @param {string} [url] - Optional page URL to filter search results. Example: "catalog".
|
|
74
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
75
|
+
* @returns {IPagesEntity[] | IPageSearchResult[]} Returns found pages as an array of PageEntity objects, an array of short PageSearchResult cards when the traficLimit config option is enabled, or an empty array [] (if there is no data)
|
|
76
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
77
|
+
* @description This method performs a quick search for page objects with limited output. With traficLimit enabled the raw quick search response is returned as short cards; otherwise full page entities are fetched for the found ids.
|
|
78
|
+
*/
|
|
79
|
+
searchPage(name: string, url?: string, langCode?: LangType): Promise<IPagesEntity[] | IPageSearchResult[] | IError>;
|
|
80
|
+
/**
|
|
81
|
+
* Semantic (vector) search for pages.
|
|
82
|
+
* @handleName getPagesByVectorSearch
|
|
83
|
+
* @param {IPagesVectorSearch} body - Vector search body. Example: `{ queryText: "winter sale" }`.
|
|
84
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
85
|
+
* @param {number} [offset] - Parameter for pagination. Default: 0.
|
|
86
|
+
* @param {number} [limit] - Parameter for pagination. Default: 30.
|
|
87
|
+
* @returns {IPagesResponse} A promise that resolves to a pages response (items + total) or an error.
|
|
88
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
89
|
+
* @description This method performs a semantic (vector) search for pages.
|
|
90
|
+
*/
|
|
91
|
+
getPagesByVectorSearch(body: IPagesVectorSearch, langCode?: string, offset?: number, limit?: number): Promise<IPagesResponse | IError>;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Body for semantic (vector) page search.
|
|
95
|
+
* @interface IPagesVectorSearch
|
|
96
|
+
* @property {string} queryText - Natural-language search query. Example: "winter sale".
|
|
97
|
+
* @property {number} [vectorDistanceThreshold] - Override of the cosine distance threshold (0..2). Example: 0.3.
|
|
98
|
+
* @property {number} [maxHits] - Top-K candidates fetched before pagination. Default: 100. Max: 500. Example: 10.
|
|
99
|
+
* @property {boolean} [debug] - When true, each returned item gets a `distance` field. Example: false.
|
|
100
|
+
* @description Body for the pages vector/search endpoint.
|
|
101
|
+
*/
|
|
102
|
+
interface IPagesVectorSearch {
|
|
103
|
+
queryText: string;
|
|
104
|
+
vectorDistanceThreshold?: number;
|
|
105
|
+
maxHits?: number;
|
|
106
|
+
debug?: boolean;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* @interface IPagesResponse
|
|
110
|
+
* @property {IPagesEntity[]} items - Array of found page objects.
|
|
111
|
+
* @property {number} total - Total number of found records. Example: 100.
|
|
112
|
+
* @description This interface defines the structure of a response containing multiple page entities, including the total count and an array of page items.
|
|
113
|
+
*/
|
|
114
|
+
interface IPagesResponse {
|
|
115
|
+
items: IPagesEntity[];
|
|
116
|
+
total: number;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* @interface IPositionForm
|
|
120
|
+
* @property {number} id - The identifier of the object. Example: 1764.
|
|
121
|
+
* @property {number} version - The version number of the object. Example: 10.
|
|
122
|
+
* @property {string} identifier - The textual identifier for the record field. Example: "catalog".
|
|
123
|
+
* @property {number} attributeSetId - The identifier of the attribute set being used. Example: 0.
|
|
124
|
+
* @property {string} processingType - Type of form processing. Example: "email".
|
|
125
|
+
* @property {ILocalizeInfo} localizeInfos - The name of the page, taking into account localization.
|
|
126
|
+
* @example
|
|
127
|
+
{
|
|
128
|
+
"title": "Blog",
|
|
129
|
+
"menuTitle": "Blog",
|
|
130
|
+
"htmlContent": "",
|
|
131
|
+
"plainContent": ""
|
|
132
|
+
}
|
|
133
|
+
* @property {object} processingData - Form data. Example: {}.
|
|
134
|
+
* @property {number} position - The position of the object. Example: 0.
|
|
135
|
+
* @property {IAttributes[]} attributes - Array of attribute values from the used attribute set for displaying the form (taking into account the specified language).
|
|
136
|
+
* @example
|
|
137
|
+
[
|
|
138
|
+
{
|
|
139
|
+
"type": "list",
|
|
140
|
+
"marker": "list_marker",
|
|
141
|
+
"position": 2,
|
|
142
|
+
"listTitles": [
|
|
143
|
+
{
|
|
144
|
+
"title": "red",
|
|
145
|
+
"value": 1,
|
|
146
|
+
"position": 1,
|
|
147
|
+
"extendedValue": null,
|
|
148
|
+
"extendedValueType": null
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"title": "yellow",
|
|
152
|
+
"value": 2,
|
|
153
|
+
"position": 2,
|
|
154
|
+
"extendedValue": null,
|
|
155
|
+
"extendedValueType": null
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
"validators": {},
|
|
159
|
+
"localizeInfos": {
|
|
160
|
+
"title": "l1"
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
* @description This interface defines the structure of a position form entity, including its identifiers, attributes, and processing data.
|
|
164
|
+
*/
|
|
165
|
+
interface IPositionForm {
|
|
166
|
+
id: number;
|
|
167
|
+
version: number;
|
|
168
|
+
identifier: string;
|
|
169
|
+
attributeSetId: number;
|
|
170
|
+
processingType: string;
|
|
171
|
+
localizeInfos: ILocalizeInfo;
|
|
172
|
+
processingData: Record<string, any>;
|
|
173
|
+
position: number;
|
|
174
|
+
attributes: IAttributes[] | IAttributes;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* @interface IPositionBlock
|
|
178
|
+
* @property {number} id - The identifier of the object. Example: 1.
|
|
179
|
+
* @property {string | null} attributeSetIdentifier - Set of attributes id. Example: "block".
|
|
180
|
+
* @property {ILocalizeInfo} localizeInfos - The name of the page, taking into account localization.
|
|
181
|
+
* @example
|
|
182
|
+
{
|
|
183
|
+
"title": "Blog",
|
|
184
|
+
"menuTitle": "Blog",
|
|
185
|
+
"htmlContent": "",
|
|
186
|
+
"plainContent": ""
|
|
187
|
+
}
|
|
188
|
+
* @property {number} version - The version number of the object. Example: 0.
|
|
189
|
+
* @property {number} position - The position of the object. Example: 1.
|
|
190
|
+
* @property {string} identifier - The textual identifier for the record field. Example: "product_block".
|
|
191
|
+
* @property {BlockType} type - Block type. Example: "product".
|
|
192
|
+
* @property {string | null} templateIdentifier - User id of the linked template. Example: null.
|
|
193
|
+
* @property {boolean} isVisible - A sign of page visibility. Example: true.
|
|
194
|
+
* @property {boolean} isSync - Indication of page indexing. Example: false.
|
|
195
|
+
* @property {IAttributeValues} attributeValues - Map of attribute values keyed by marker; empty object when none.
|
|
196
|
+
* @example
|
|
197
|
+
{
|
|
198
|
+
"block-text": {
|
|
199
|
+
"type": "string",
|
|
200
|
+
"value": "some text",
|
|
201
|
+
"position": 0,
|
|
202
|
+
"additionalFields": []
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
* @property {number} [countElementsPerRow] - Number of elements displayed per row in the block, if applicable. Example: 3.
|
|
206
|
+
* @property {number} [quantity] - Quantity pages in block. Example: 1.
|
|
207
|
+
* @property {IProductsResponse} [similarProducts] - Similar products response (total + items). Present only for "similar_products_block" blocks and only when traffic-saving mode is off.
|
|
208
|
+
* @property {IProductsEntity[]} [products] - Array of products associated with the block. Present only for "product_block" blocks and only when traffic-saving mode is off.
|
|
209
|
+
* @description This interface defines the structure of a position block entity, including its identifiers, attributes, and visibility.
|
|
210
|
+
*/
|
|
211
|
+
interface IPositionBlock {
|
|
212
|
+
id: number;
|
|
213
|
+
attributeSetIdentifier: string | null;
|
|
214
|
+
localizeInfos: ILocalizeInfo;
|
|
215
|
+
version: number;
|
|
216
|
+
position: number;
|
|
217
|
+
identifier: string;
|
|
218
|
+
type: BlockType;
|
|
219
|
+
templateIdentifier: string | null;
|
|
220
|
+
isVisible: boolean;
|
|
221
|
+
isSync: boolean;
|
|
222
|
+
attributeValues: IAttributeValues;
|
|
223
|
+
countElementsPerRow?: number;
|
|
224
|
+
quantity?: number;
|
|
225
|
+
similarProducts?: IProductsResponse;
|
|
226
|
+
products?: IProductsEntity[];
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* PageType
|
|
230
|
+
* @type {PageType}
|
|
231
|
+
* @description This type defines the possible values for page types used in the system. It is a page-specific subset of {@link BlockType}.
|
|
232
|
+
*/
|
|
233
|
+
type PageType = 'catalog_page' | 'common_page' | 'error_page' | 'external_page';
|
|
234
|
+
/**
|
|
235
|
+
* @interface IPagesEntity
|
|
236
|
+
* @property {number} id - The identifier of the object. Example: 8.
|
|
237
|
+
* @property {number | null} parentId - The id of the parent page, if it contains null, then it is the top-level page. Example: 10.
|
|
238
|
+
* @property {string} pageUrl - Unique page Url. Example: "blog".
|
|
239
|
+
* @property {number} depth - Page nesting depth relative to parentId. Example: 10.
|
|
240
|
+
* @property {ILocalizeInfo} localizeInfos - The name of the page, taking into account localization.
|
|
241
|
+
* @example
|
|
242
|
+
{
|
|
243
|
+
"title": "Blog",
|
|
244
|
+
"menuTitle": "Blog",
|
|
245
|
+
"htmlContent": "",
|
|
246
|
+
"plainContent": ""
|
|
247
|
+
}
|
|
248
|
+
* @property {boolean} isVisible - A sign of page visibility. Example: true.
|
|
249
|
+
* @property {PageType} type - Page type. Example: "common_page".
|
|
250
|
+
* @property {string | null} templateIdentifier - User id of the linked template. Example: "template".
|
|
251
|
+
* @property {string | null} attributeSetIdentifier - Set of attributes id. Example: "page".
|
|
252
|
+
* @property {IAttributeValues} attributeValues - Map of attribute values keyed by marker; empty object when none.
|
|
253
|
+
* @example
|
|
254
|
+
{
|
|
255
|
+
"text": {
|
|
256
|
+
"type": "string",
|
|
257
|
+
"value": "some text",
|
|
258
|
+
"position": 0,
|
|
259
|
+
"additionalFields": []
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
* @property {boolean} isSync - Indication of page indexing. Example: true.
|
|
263
|
+
* @property {object} [template] - Template object. Example: {}.
|
|
264
|
+
* @property {number} [position] - Item number (for sorting). Example: 2.
|
|
265
|
+
* @property {Record<string, number>} [config] - Output settings for catalog pages.
|
|
266
|
+
* @example
|
|
267
|
+
{
|
|
268
|
+
"rowsPerPage": 1,
|
|
269
|
+
"productsPerRow": 1
|
|
270
|
+
}
|
|
271
|
+
* @property {number} [products] - The number of products linked to the page. Example: 0.
|
|
272
|
+
* @property {number} [childrenCount] - Children count. Example: 1.
|
|
273
|
+
* @property {IBlockEntity[] | string[]} [blocks] - blocks.
|
|
274
|
+
* @example
|
|
275
|
+
{
|
|
276
|
+
"id": 4,
|
|
277
|
+
"attributeSetIdentifier": null,
|
|
278
|
+
"title": "Template",
|
|
279
|
+
"generalTypeId": 4,
|
|
280
|
+
"identifier": "template",
|
|
281
|
+
"version": 0,
|
|
282
|
+
"generalTypeName": "catalog_page",
|
|
283
|
+
"attributeValues": {},
|
|
284
|
+
"position": 1
|
|
285
|
+
}
|
|
286
|
+
* @property {Array<IFormConfig>} [moduleFormConfigs] - Module form configurations linked to the page.
|
|
287
|
+
* @property {IRating} [rating] - Rating data.
|
|
288
|
+
* @property {string} [total] - Total number of products linked to the page. Example: "10".
|
|
289
|
+
* @property {string | null} [categoryPath] - Category path string; null for nested pages that have no own category path. Example: "catalog".
|
|
290
|
+
* @property {number} [distance] - Cosine distance to the query. Returned only by the semantic (vector) search endpoint when `debug: true` is passed in the search body. Example: 0.12.
|
|
291
|
+
* @description This interface defines the structure of a page entity, including its identifiers, attributes, and hierarchical relationships.
|
|
292
|
+
*/
|
|
293
|
+
interface IPagesEntity {
|
|
294
|
+
id: number;
|
|
295
|
+
parentId: number | null;
|
|
296
|
+
pageUrl: string;
|
|
297
|
+
depth: number;
|
|
298
|
+
localizeInfos: ILocalizeInfo;
|
|
299
|
+
isVisible: boolean;
|
|
300
|
+
type: PageType;
|
|
301
|
+
templateIdentifier: string | null;
|
|
302
|
+
attributeSetIdentifier: string | null;
|
|
303
|
+
attributeValues: IAttributeValues;
|
|
304
|
+
moduleFormConfigs?: IFormConfig[];
|
|
305
|
+
rating?: IRating;
|
|
306
|
+
isSync: boolean;
|
|
307
|
+
template?: ITemplateEntity;
|
|
308
|
+
blocks?: IBlockEntity[] | string[];
|
|
309
|
+
position?: number;
|
|
310
|
+
config?: Record<string, number>;
|
|
311
|
+
products?: number;
|
|
312
|
+
childrenCount?: number;
|
|
313
|
+
total?: string;
|
|
314
|
+
categoryPath?: string | null;
|
|
315
|
+
distance?: number;
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* @interface IPageSearchResult
|
|
319
|
+
* @property {number} id - The identifier of the page. Example: 10.
|
|
320
|
+
* @property {string} title - Page title in the requested language. Example: "Catalog".
|
|
321
|
+
* @description This interface defines the short page card returned by the quick search endpoint when the traficLimit config option is enabled. It contains only identification fields, without attributeValues, localizeInfos, blocks and other fields of a full page entity.
|
|
322
|
+
*/
|
|
323
|
+
interface IPageSearchResult {
|
|
324
|
+
id: number;
|
|
325
|
+
title: string;
|
|
326
|
+
}
|
|
327
|
+
export type { IPagesApi, IPageSearchResult, IPagesEntity, IPagesResponse, IPagesVectorSearch, IPositionBlock, IPositionForm, PageType, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validation schemas for Pages module
|
|
3
|
+
* @description Zod schemas for validating pages-related API responses
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
/**
|
|
7
|
+
* Page entity schema
|
|
8
|
+
* Includes all fields returned by the API
|
|
9
|
+
*/
|
|
10
|
+
export declare const PageEntitySchema: z.ZodObject<{
|
|
11
|
+
id: z.ZodNumber;
|
|
12
|
+
parentId: z.ZodNullable<z.ZodNumber>;
|
|
13
|
+
pageUrl: z.ZodString;
|
|
14
|
+
depth: z.ZodNumber;
|
|
15
|
+
localizeInfos: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
16
|
+
isVisible: z.ZodBoolean;
|
|
17
|
+
type: z.ZodEnum<{
|
|
18
|
+
error_page: "error_page";
|
|
19
|
+
catalog_page: "catalog_page";
|
|
20
|
+
common_page: "common_page";
|
|
21
|
+
external_page: "external_page";
|
|
22
|
+
}>;
|
|
23
|
+
templateIdentifier: z.ZodNullable<z.ZodString>;
|
|
24
|
+
attributeSetIdentifier: z.ZodNullable<z.ZodString>;
|
|
25
|
+
attributeValues: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
26
|
+
moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
27
|
+
rating: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
28
|
+
isSync: z.ZodBoolean;
|
|
29
|
+
template: z.ZodOptional<z.ZodAny>;
|
|
30
|
+
blocks: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodArray<z.ZodString>]>>;
|
|
31
|
+
position: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
33
|
+
products: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
childrenCount: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
total: z.ZodOptional<z.ZodString>;
|
|
36
|
+
categoryPath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
37
|
+
distance: z.ZodOptional<z.ZodNumber>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
/**
|
|
40
|
+
* Pages response schema (array of pages)
|
|
41
|
+
*/
|
|
42
|
+
export declare const PagesResponseSchema: z.ZodArray<z.ZodObject<{
|
|
43
|
+
id: z.ZodNumber;
|
|
44
|
+
parentId: z.ZodNullable<z.ZodNumber>;
|
|
45
|
+
pageUrl: z.ZodString;
|
|
46
|
+
depth: z.ZodNumber;
|
|
47
|
+
localizeInfos: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
48
|
+
isVisible: z.ZodBoolean;
|
|
49
|
+
type: z.ZodEnum<{
|
|
50
|
+
error_page: "error_page";
|
|
51
|
+
catalog_page: "catalog_page";
|
|
52
|
+
common_page: "common_page";
|
|
53
|
+
external_page: "external_page";
|
|
54
|
+
}>;
|
|
55
|
+
templateIdentifier: z.ZodNullable<z.ZodString>;
|
|
56
|
+
attributeSetIdentifier: z.ZodNullable<z.ZodString>;
|
|
57
|
+
attributeValues: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
58
|
+
moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
59
|
+
rating: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
60
|
+
isSync: z.ZodBoolean;
|
|
61
|
+
template: z.ZodOptional<z.ZodAny>;
|
|
62
|
+
blocks: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodArray<z.ZodString>]>>;
|
|
63
|
+
position: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
65
|
+
products: z.ZodOptional<z.ZodNumber>;
|
|
66
|
+
childrenCount: z.ZodOptional<z.ZodNumber>;
|
|
67
|
+
total: z.ZodOptional<z.ZodString>;
|
|
68
|
+
categoryPath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
69
|
+
distance: z.ZodOptional<z.ZodNumber>;
|
|
70
|
+
}, z.core.$strip>>;
|
|
71
|
+
/**
|
|
72
|
+
* Page search result schema
|
|
73
|
+
* Short card returned by the quick search endpoint
|
|
74
|
+
*/
|
|
75
|
+
export declare const PageSearchResultSchema: z.ZodObject<{
|
|
76
|
+
id: z.ZodNumber;
|
|
77
|
+
title: z.ZodString;
|
|
78
|
+
}, z.core.$strip>;
|
|
79
|
+
/**
|
|
80
|
+
* Page search response schema (array of short cards)
|
|
81
|
+
*/
|
|
82
|
+
export declare const PageSearchResponseSchema: z.ZodArray<z.ZodObject<{
|
|
83
|
+
id: z.ZodNumber;
|
|
84
|
+
title: z.ZodString;
|
|
85
|
+
}, z.core.$strip>>;
|
|
86
|
+
/**
|
|
87
|
+
* Single page response schema
|
|
88
|
+
*/
|
|
89
|
+
export declare const SinglePageSchema: z.ZodObject<{
|
|
90
|
+
id: z.ZodNumber;
|
|
91
|
+
parentId: z.ZodNullable<z.ZodNumber>;
|
|
92
|
+
pageUrl: z.ZodString;
|
|
93
|
+
depth: z.ZodNumber;
|
|
94
|
+
localizeInfos: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
95
|
+
isVisible: z.ZodBoolean;
|
|
96
|
+
type: z.ZodEnum<{
|
|
97
|
+
error_page: "error_page";
|
|
98
|
+
catalog_page: "catalog_page";
|
|
99
|
+
common_page: "common_page";
|
|
100
|
+
external_page: "external_page";
|
|
101
|
+
}>;
|
|
102
|
+
templateIdentifier: z.ZodNullable<z.ZodString>;
|
|
103
|
+
attributeSetIdentifier: z.ZodNullable<z.ZodString>;
|
|
104
|
+
attributeValues: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
105
|
+
moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
106
|
+
rating: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
107
|
+
isSync: z.ZodBoolean;
|
|
108
|
+
template: z.ZodOptional<z.ZodAny>;
|
|
109
|
+
blocks: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodArray<z.ZodString>]>>;
|
|
110
|
+
position: z.ZodOptional<z.ZodNumber>;
|
|
111
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
112
|
+
products: z.ZodOptional<z.ZodNumber>;
|
|
113
|
+
childrenCount: z.ZodOptional<z.ZodNumber>;
|
|
114
|
+
total: z.ZodOptional<z.ZodString>;
|
|
115
|
+
categoryPath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
116
|
+
distance: z.ZodOptional<z.ZodNumber>;
|
|
117
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validation schemas for Pages module
|
|
3
|
+
* @description Zod schemas for validating pages-related API responses
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
/**
|
|
7
|
+
* Page entity schema
|
|
8
|
+
* Includes all fields returned by the API
|
|
9
|
+
*/
|
|
10
|
+
export const PageEntitySchema = z.object({
|
|
11
|
+
id: z.number(),
|
|
12
|
+
parentId: z.number().nullable(),
|
|
13
|
+
pageUrl: z.string(),
|
|
14
|
+
depth: z.number(),
|
|
15
|
+
localizeInfos: z.record(z.string(), z.any()),
|
|
16
|
+
isVisible: z.boolean(),
|
|
17
|
+
// Must stay in sync with PageType in src/pages/pagesInterfaces.ts
|
|
18
|
+
type: z.enum(['catalog_page', 'common_page', 'error_page', 'external_page']),
|
|
19
|
+
templateIdentifier: z.string().nullable(),
|
|
20
|
+
attributeSetIdentifier: z.string().nullable(),
|
|
21
|
+
attributeValues: z.record(z.string(), z.any()),
|
|
22
|
+
moduleFormConfigs: z.array(z.any()).optional(),
|
|
23
|
+
rating: z.record(z.string(), z.unknown()).optional(),
|
|
24
|
+
isSync: z.boolean(),
|
|
25
|
+
template: z.any().optional(),
|
|
26
|
+
blocks: z.union([z.array(z.any()), z.array(z.string())]).optional(),
|
|
27
|
+
position: z.number().optional(),
|
|
28
|
+
config: z.record(z.string(), z.number()).optional(),
|
|
29
|
+
products: z.number().optional(),
|
|
30
|
+
childrenCount: z.number().optional(),
|
|
31
|
+
total: z.string().optional(),
|
|
32
|
+
categoryPath: z.string().nullable().optional(),
|
|
33
|
+
distance: z.number().optional(),
|
|
34
|
+
});
|
|
35
|
+
/**
|
|
36
|
+
* Pages response schema (array of pages)
|
|
37
|
+
*/
|
|
38
|
+
export const PagesResponseSchema = z.array(PageEntitySchema);
|
|
39
|
+
/**
|
|
40
|
+
* Page search result schema
|
|
41
|
+
* Short card returned by the quick search endpoint
|
|
42
|
+
*/
|
|
43
|
+
export const PageSearchResultSchema = z.object({
|
|
44
|
+
id: z.number(),
|
|
45
|
+
title: z.string(),
|
|
46
|
+
});
|
|
47
|
+
/**
|
|
48
|
+
* Page search response schema (array of short cards)
|
|
49
|
+
*/
|
|
50
|
+
export const PageSearchResponseSchema = z.array(PageSearchResultSchema);
|
|
51
|
+
/**
|
|
52
|
+
* Single page response schema
|
|
53
|
+
*/
|
|
54
|
+
export const SinglePageSchema = PageEntitySchema;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import AsyncModules from '../base/asyncModules.js';
|
|
2
|
+
import type StateModule from '../base/stateModule.js';
|
|
3
|
+
import type { IError } from '../base/utils.js';
|
|
4
|
+
import type { IAccountsEntity, IPaymentsApi, ISessionEntity, ISessionsEntity } from './paymentsInterfaces.js';
|
|
5
|
+
/**
|
|
6
|
+
* Controllers for working with payments
|
|
7
|
+
* @handle /api/content/payments
|
|
8
|
+
* @description Controllers for working with payments
|
|
9
|
+
*/
|
|
10
|
+
export default class PaymentsApi extends AsyncModules implements IPaymentsApi {
|
|
11
|
+
protected state: StateModule;
|
|
12
|
+
protected _url: string;
|
|
13
|
+
/**
|
|
14
|
+
* Constructor
|
|
15
|
+
* @param {StateModule} state - StateModule instance
|
|
16
|
+
* @description Constructor initializes the PaymentsApi with a given state.
|
|
17
|
+
*/
|
|
18
|
+
constructor(state: StateModule);
|
|
19
|
+
/**
|
|
20
|
+
* Get list of payment sessions.
|
|
21
|
+
* @handleName getSessions
|
|
22
|
+
* @param {number} [offset] - Optional parameter for pagination. Default: 0.
|
|
23
|
+
* @param {number} [limit] - Optional parameter for pagination. Default: 30.
|
|
24
|
+
* @returns {Promise<ISessionsEntity | IError>} Returns an array of SessionEntity objects.
|
|
25
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
26
|
+
* @description This method gets list of payment sessions. This method requires user authorization.
|
|
27
|
+
* @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
|
|
28
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/payments/getSessions getSessions} documentation.
|
|
29
|
+
*/
|
|
30
|
+
getSessions(offset?: number, limit?: number): Promise<ISessionsEntity | IError>;
|
|
31
|
+
/**
|
|
32
|
+
* Get a single payment session object by its identifier.
|
|
33
|
+
* @handleName getSessionById
|
|
34
|
+
* @param {number} id - Identifier of the retrieved payment session object. Example: 12345.
|
|
35
|
+
* @returns {Promise<ISessionEntity | IError>} Returns a single payment session object.
|
|
36
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
37
|
+
* @description This method gets a single payment session object by its identifier. This method requires user authorization.
|
|
38
|
+
* @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
|
|
39
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/payments/getSessionById getSessionById} documentation.
|
|
40
|
+
*/
|
|
41
|
+
getSessionById(id: number): Promise<ISessionEntity | IError>;
|
|
42
|
+
/**
|
|
43
|
+
* Get one payment session object by order identifier
|
|
44
|
+
* @handleName getSessionByOrderId
|
|
45
|
+
* @param {number} id - Order identifier. Example: 12345.
|
|
46
|
+
* @returns {Promise<IAccountsEntity | IError>} Returns a single payment account object.
|
|
47
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
48
|
+
* @description This method gets one payment session object by order identifier. This method requires user authorization.
|
|
49
|
+
* @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
|
|
50
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/payments/getSessionByOrderId getSessionByOrderId} documentation.
|
|
51
|
+
*/
|
|
52
|
+
getSessionByOrderId(id: number): Promise<ISessionEntity | ISessionEntity[] | IError>;
|
|
53
|
+
/**
|
|
54
|
+
* Creation of payment session.
|
|
55
|
+
* @handleName createSession
|
|
56
|
+
* @param {number} orderId - Order identifier. Example: 12345.
|
|
57
|
+
* @param {'session' | 'intent'} type - Session type. Possible values: "session" or "intent". Example: 'session'.
|
|
58
|
+
* @param {boolean} [automaticTaxEnabled] - Automatic calculation of the tax rate. Default: false.
|
|
59
|
+
* @returns {Promise<ISessionEntity | IError>} Returns a single payment session object.
|
|
60
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
61
|
+
* @description This method creates a payment session. This method requires user authorization.
|
|
62
|
+
* @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
|
|
63
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/payments/createSession createSession} documentation.
|
|
64
|
+
*/
|
|
65
|
+
createSession(orderId: number, type: 'session' | 'intent', automaticTaxEnabled?: boolean): Promise<ISessionEntity | IError>;
|
|
66
|
+
/**
|
|
67
|
+
* Get all payment accounts as an array.
|
|
68
|
+
* @handleName getAccounts
|
|
69
|
+
* @returns {Promise<IAccountsEntity | IError>} Returns all created payment accounts as an array of PaymentAccountEntity objects.
|
|
70
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
71
|
+
* @description This method gets all payment accounts as an array. This method requires user authorization.
|
|
72
|
+
* @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
|
|
73
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/payments/getAccounts getAccounts} documentation.
|
|
74
|
+
*/
|
|
75
|
+
getAccounts(): Promise<IAccountsEntity[] | IError>;
|
|
76
|
+
/**
|
|
77
|
+
* Get a single payment account object by its identifier.
|
|
78
|
+
* @handleName getAccountById
|
|
79
|
+
* @param {number} id - Identifier of the retrieved payment account object. Example: 12345.
|
|
80
|
+
* @returns {Promise<IAccountsEntity | IError>} Returns a single payment account object.
|
|
81
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
82
|
+
* @description Get a single payment account object by its identifier.
|
|
83
|
+
* @description This method requires user authorization.
|
|
84
|
+
* @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
|
|
85
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/payments/getAccountById getAccountById} documentation.
|
|
86
|
+
*/
|
|
87
|
+
getAccountById(id: number): Promise<IAccountsEntity | IError>;
|
|
88
|
+
}
|