oneentry 1.0.137 → 1.0.138
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/dist/admins/adminsApi.d.ts +2 -2
- package/dist/admins/adminsApi.js +2 -2
- package/dist/admins/adminsInterfaces.d.ts +1 -1
- package/dist/attribute-sets/attributeSetsApi.d.ts +8 -8
- package/dist/attribute-sets/attributeSetsApi.js +8 -8
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +3 -3
- package/dist/auth-provider/authProviderApi.d.ts +33 -33
- package/dist/auth-provider/authProviderApi.js +33 -33
- package/dist/auth-provider/authProvidersInterfaces.d.ts +12 -62
- package/dist/base/asyncModules.js +4 -50
- package/dist/base/stateModule.d.ts +1 -0
- package/dist/base/stateModule.js +16 -15
- package/dist/base/syncModules.d.ts +6 -0
- package/dist/base/syncModules.js +48 -5
- package/dist/base/utils.d.ts +15 -8
- package/dist/blocks/blocksApi.d.ts +10 -10
- package/dist/blocks/blocksApi.js +10 -10
- package/dist/blocks/blocksInterfaces.d.ts +1 -0
- package/dist/events/eventsApi.d.ts +5 -5
- package/dist/events/eventsApi.js +5 -5
- package/dist/events/eventsInterfaces.d.ts +25 -15
- package/dist/file-uploading/fileUploadingApi.d.ts +6 -6
- package/dist/file-uploading/fileUploadingApi.js +6 -6
- package/dist/forms/formsApi.d.ts +4 -4
- package/dist/forms/formsApi.js +4 -4
- package/dist/forms/formsInterfaces.d.ts +1 -0
- package/dist/forms-data/formsDataApi.d.ts +10 -10
- package/dist/forms-data/formsDataApi.js +10 -10
- package/dist/forms-data/formsDataInterfaces.d.ts +24 -24
- package/dist/forms-data/formsDataSchemas.d.ts +36 -28
- package/dist/forms-data/formsDataSchemas.js +16 -13
- package/dist/general-types/generalTypesApi.d.ts +2 -2
- package/dist/general-types/generalTypesApi.js +2 -2
- package/dist/index.d.ts +23 -1
- package/dist/integration-collections/integrationCollectionsApi.d.ts +17 -17
- package/dist/integration-collections/integrationCollectionsApi.js +17 -17
- package/dist/locales/localesApi.d.ts +2 -2
- package/dist/locales/localesApi.js +2 -2
- package/dist/menus/menusApi.d.ts +2 -2
- package/dist/menus/menusApi.js +2 -2
- package/dist/menus/menusInterfaces.d.ts +2 -2
- package/dist/orders/ordersApi.d.ts +12 -12
- package/dist/orders/ordersApi.js +12 -12
- package/dist/orders/ordersInterfaces.d.ts +2 -1
- package/dist/pages/pagesApi.d.ts +20 -20
- package/dist/pages/pagesApi.js +20 -20
- package/dist/pages/pagesInterfaces.d.ts +10 -7
- package/dist/payments/paymentsApi.d.ts +13 -13
- package/dist/payments/paymentsApi.js +12 -12
- package/dist/payments/paymentsInterfaces.d.ts +8 -2
- package/dist/payments/paymentsSchemas.d.ts +22 -6
- package/dist/payments/paymentsSchemas.js +6 -3
- package/dist/product-statuses/productStatusesApi.d.ts +6 -6
- package/dist/product-statuses/productStatusesApi.js +6 -6
- package/dist/products/productsApi.d.ts +29 -28
- package/dist/products/productsApi.js +31 -30
- package/dist/products/productsInterfaces.d.ts +26 -21
- package/dist/system/systemApi.d.ts +10 -10
- package/dist/system/systemApi.js +10 -10
- package/dist/templates/templatesApi.d.ts +6 -6
- package/dist/templates/templatesApi.js +6 -6
- package/dist/templates-preview/templatesPreviewApi.d.ts +3 -3
- package/dist/templates-preview/templatesPreviewApi.js +3 -3
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +1 -0
- package/dist/users/usersApi.d.ts +18 -18
- package/dist/users/usersApi.js +18 -18
- package/dist/users/usersInterfaces.d.ts +8 -10
- package/package.json +34 -11
- package/dist/config.d.ts +0 -21
- package/dist/config.js +0 -48
|
@@ -21,8 +21,8 @@ export default class PaymentsApi extends AsyncModules implements IPaymentsApi {
|
|
|
21
21
|
* @handleName getSessions
|
|
22
22
|
* @param {number} [offset] - Optional parameter for pagination. Default: 0.
|
|
23
23
|
* @param {number} [limit] - Optional parameter for pagination. Default: 30.
|
|
24
|
-
* @returns {ISessionsEntity} Returns an array of SessionEntity objects.
|
|
25
|
-
* @throws {IError}
|
|
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
26
|
* @description This method gets list of payment sessions. This method requires user authorization.
|
|
27
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
28
|
*/
|
|
@@ -31,8 +31,8 @@ export default class PaymentsApi extends AsyncModules implements IPaymentsApi {
|
|
|
31
31
|
* Get a single payment session object by its identifier.
|
|
32
32
|
* @handleName getSessionById
|
|
33
33
|
* @param {number} id - Identifier of the retrieved payment session object. Example: 12345.
|
|
34
|
-
* @returns {ISessionEntity} Returns a single payment session object.
|
|
35
|
-
* @throws {IError}
|
|
34
|
+
* @returns {Promise<ISessionEntity | IError>} Returns a single payment session object.
|
|
35
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
36
36
|
* @description This method gets a single payment session object by its identifier. This method requires user authorization.
|
|
37
37
|
* @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}.
|
|
38
38
|
*/
|
|
@@ -41,20 +41,20 @@ export default class PaymentsApi extends AsyncModules implements IPaymentsApi {
|
|
|
41
41
|
* Get one payment session object by order identifier
|
|
42
42
|
* @handleName getSessionByOrderId
|
|
43
43
|
* @param {number} id - Order identifier. Example: 12345.
|
|
44
|
-
* @returns {IAccountsEntity} Returns a single payment account object.
|
|
45
|
-
* @throws {IError}
|
|
44
|
+
* @returns {Promise<IAccountsEntity | IError>} Returns a single payment account object.
|
|
45
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
46
46
|
* @description This method gets one payment session object by order identifier. This method requires user authorization.
|
|
47
47
|
* @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}.
|
|
48
48
|
*/
|
|
49
|
-
getSessionByOrderId(id: number): Promise<ISessionEntity | IError>;
|
|
49
|
+
getSessionByOrderId(id: number): Promise<ISessionEntity | ISessionEntity[] | IError>;
|
|
50
50
|
/**
|
|
51
51
|
* Creation of payment session.
|
|
52
52
|
* @handleName createSession
|
|
53
53
|
* @param {number} orderId - Order identifier. Example: 12345.
|
|
54
54
|
* @param {'session' | 'intent'} type - Session type. Possible values: "session" or "intent". Example: 'session'.
|
|
55
55
|
* @param {boolean} [automaticTaxEnabled] - Automatic calculation of the tax rate. Default: false.
|
|
56
|
-
* @returns {ICreateSessionEntity} Returns a single payment session object.
|
|
57
|
-
* @throws {IError}
|
|
56
|
+
* @returns {Promise<ICreateSessionEntity | IError>} Returns a single payment session object.
|
|
57
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
58
58
|
* @description This method creates a payment session. This method requires user authorization.
|
|
59
59
|
* @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}.
|
|
60
60
|
*/
|
|
@@ -62,8 +62,8 @@ export default class PaymentsApi extends AsyncModules implements IPaymentsApi {
|
|
|
62
62
|
/**
|
|
63
63
|
* Get all payment accounts as an array.
|
|
64
64
|
* @handleName getAccounts
|
|
65
|
-
* @returns {IAccountsEntity} Returns all created payment accounts as an array of PaymentAccountEntity objects.
|
|
66
|
-
* @throws {IError}
|
|
65
|
+
* @returns {Promise<IAccountsEntity | IError>} Returns all created payment accounts as an array of PaymentAccountEntity objects.
|
|
66
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
67
67
|
* @description This method gets all payment accounts as an array. This method requires user authorization.
|
|
68
68
|
* @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}.
|
|
69
69
|
*/
|
|
@@ -72,8 +72,8 @@ export default class PaymentsApi extends AsyncModules implements IPaymentsApi {
|
|
|
72
72
|
* Get a single payment account object by its identifier.
|
|
73
73
|
* @handleName getAccountById
|
|
74
74
|
* @param {number} id - Identifier of the retrieved payment account object. Example: 12345.
|
|
75
|
-
* @returns {IAccountsEntity} Returns a single payment account object.
|
|
76
|
-
* @throws {IError}
|
|
75
|
+
* @returns {Promise<IAccountsEntity | IError>} Returns a single payment account object.
|
|
76
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
77
77
|
* @description Get a single payment account object by its identifier.
|
|
78
78
|
* @description This method requires user authorization.
|
|
79
79
|
* @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}.
|
|
@@ -25,8 +25,8 @@ class PaymentsApi extends asyncModules_1.default {
|
|
|
25
25
|
* @handleName getSessions
|
|
26
26
|
* @param {number} [offset] - Optional parameter for pagination. Default: 0.
|
|
27
27
|
* @param {number} [limit] - Optional parameter for pagination. Default: 30.
|
|
28
|
-
* @returns {ISessionsEntity} Returns an array of SessionEntity objects.
|
|
29
|
-
* @throws {IError}
|
|
28
|
+
* @returns {Promise<ISessionsEntity | IError>} Returns an array of SessionEntity objects.
|
|
29
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
30
30
|
* @description This method gets list of payment sessions. This method requires user authorization.
|
|
31
31
|
* @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}.
|
|
32
32
|
*/
|
|
@@ -44,8 +44,8 @@ class PaymentsApi extends asyncModules_1.default {
|
|
|
44
44
|
* Get a single payment session object by its identifier.
|
|
45
45
|
* @handleName getSessionById
|
|
46
46
|
* @param {number} id - Identifier of the retrieved payment session object. Example: 12345.
|
|
47
|
-
* @returns {ISessionEntity} Returns a single payment session object.
|
|
48
|
-
* @throws {IError}
|
|
47
|
+
* @returns {Promise<ISessionEntity | IError>} Returns a single payment session object.
|
|
48
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
49
49
|
* @description This method gets a single payment session object by its identifier. This method requires user authorization.
|
|
50
50
|
* @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}.
|
|
51
51
|
*/
|
|
@@ -57,8 +57,8 @@ class PaymentsApi extends asyncModules_1.default {
|
|
|
57
57
|
* Get one payment session object by order identifier
|
|
58
58
|
* @handleName getSessionByOrderId
|
|
59
59
|
* @param {number} id - Order identifier. Example: 12345.
|
|
60
|
-
* @returns {IAccountsEntity} Returns a single payment account object.
|
|
61
|
-
* @throws {IError}
|
|
60
|
+
* @returns {Promise<IAccountsEntity | IError>} Returns a single payment account object.
|
|
61
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
62
62
|
* @description This method gets one payment session object by order identifier. This method requires user authorization.
|
|
63
63
|
* @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}.
|
|
64
64
|
*/
|
|
@@ -74,8 +74,8 @@ class PaymentsApi extends asyncModules_1.default {
|
|
|
74
74
|
* @param {number} orderId - Order identifier. Example: 12345.
|
|
75
75
|
* @param {'session' | 'intent'} type - Session type. Possible values: "session" or "intent". Example: 'session'.
|
|
76
76
|
* @param {boolean} [automaticTaxEnabled] - Automatic calculation of the tax rate. Default: false.
|
|
77
|
-
* @returns {ICreateSessionEntity} Returns a single payment session object.
|
|
78
|
-
* @throws {IError}
|
|
77
|
+
* @returns {Promise<ICreateSessionEntity | IError>} Returns a single payment session object.
|
|
78
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
79
79
|
* @description This method creates a payment session. This method requires user authorization.
|
|
80
80
|
* @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}.
|
|
81
81
|
*/
|
|
@@ -92,8 +92,8 @@ class PaymentsApi extends asyncModules_1.default {
|
|
|
92
92
|
/**
|
|
93
93
|
* Get all payment accounts as an array.
|
|
94
94
|
* @handleName getAccounts
|
|
95
|
-
* @returns {IAccountsEntity} Returns all created payment accounts as an array of PaymentAccountEntity objects.
|
|
96
|
-
* @throws {IError}
|
|
95
|
+
* @returns {Promise<IAccountsEntity | IError>} Returns all created payment accounts as an array of PaymentAccountEntity objects.
|
|
96
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
97
97
|
* @description This method gets all payment accounts as an array. This method requires user authorization.
|
|
98
98
|
* @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}.
|
|
99
99
|
*/
|
|
@@ -107,8 +107,8 @@ class PaymentsApi extends asyncModules_1.default {
|
|
|
107
107
|
* Get a single payment account object by its identifier.
|
|
108
108
|
* @handleName getAccountById
|
|
109
109
|
* @param {number} id - Identifier of the retrieved payment account object. Example: 12345.
|
|
110
|
-
* @returns {IAccountsEntity} Returns a single payment account object.
|
|
111
|
-
* @throws {IError}
|
|
110
|
+
* @returns {Promise<IAccountsEntity | IError>} Returns a single payment account object.
|
|
111
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
112
112
|
* @description Get a single payment account object by its identifier.
|
|
113
113
|
* @description This method requires user authorization.
|
|
114
114
|
* @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}.
|
|
@@ -40,7 +40,7 @@ interface IPaymentsApi {
|
|
|
40
40
|
* @description This method gets one payment session object by order identifier. This method requires user authorization.
|
|
41
41
|
* @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}.
|
|
42
42
|
*/
|
|
43
|
-
getSessionByOrderId(id: number): Promise<ISessionEntity | IError>;
|
|
43
|
+
getSessionByOrderId(id: number): Promise<ISessionEntity | ISessionEntity[] | IError>;
|
|
44
44
|
/**
|
|
45
45
|
* Creation of payment session.
|
|
46
46
|
* @handleName createSession
|
|
@@ -106,6 +106,7 @@ interface ISessionsEntity {
|
|
|
106
106
|
* @property {number} paymentAccountId - Payment ID from an external provider. Example: "9BE88048TU058770M".
|
|
107
107
|
* @property {number} orderId - Order identifier. Example: 1.
|
|
108
108
|
* @property {string | null} paymentUrl - payment link. Example: " https://www.sandbox.paypal.com/checkoutnow?token=9BE88048TU058770M".
|
|
109
|
+
* @property {number | null} [amount] - Amount of the payment session. Example: 100.
|
|
109
110
|
* @description This interface defines the structure of a session entity, including its quantity, amount, currency, name, and description.
|
|
110
111
|
*/
|
|
111
112
|
interface ISessionEntity {
|
|
@@ -117,6 +118,7 @@ interface ISessionEntity {
|
|
|
117
118
|
paymentAccountId: number;
|
|
118
119
|
orderId: number;
|
|
119
120
|
paymentUrl: string | null;
|
|
121
|
+
amount?: number | null;
|
|
120
122
|
}
|
|
121
123
|
/**
|
|
122
124
|
* @interface IIntent
|
|
@@ -174,6 +176,10 @@ interface ICreateSessionEntity {
|
|
|
174
176
|
* @property {'stripe' | 'custom'} type - Type may be 'stripe' or 'custom'. Example: 'stripe'.
|
|
175
177
|
* @property {boolean} isVisible - Visibility indicator of the payment account. Example: true.
|
|
176
178
|
* @property {boolean} isUsed - Usage indicator of the payment account. Example: false.
|
|
179
|
+
* @property {boolean} testMode - Indicates whether the payment account is in test mode. Example: true.
|
|
180
|
+
* @property {object} settings - Payment account settings. Example: {}.
|
|
181
|
+
* @property {object} [testSettings] - Test mode settings for the payment account. Example: {}.
|
|
182
|
+
* @property {string} updatedDate - Object modification date. Example: "2025-02-26T10:13:16.839Z".
|
|
177
183
|
* @description This interface defines the structure of a payment account entity, including its identifiers, localization information, type, visibility, and usage status.
|
|
178
184
|
*/
|
|
179
185
|
interface IAccountsEntity {
|
|
@@ -184,7 +190,7 @@ interface IAccountsEntity {
|
|
|
184
190
|
isVisible: boolean;
|
|
185
191
|
isUsed: boolean;
|
|
186
192
|
testMode: boolean;
|
|
187
|
-
settings:
|
|
193
|
+
settings: object;
|
|
188
194
|
testSettings?: {
|
|
189
195
|
cancelUrl?: string;
|
|
190
196
|
successUrl?: string;
|
|
@@ -7,7 +7,7 @@ export declare const PaymentSessionSchema: z.ZodObject<{
|
|
|
7
7
|
id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
8
8
|
orderId: z.ZodOptional<z.ZodNumber>;
|
|
9
9
|
orderIdentifier: z.ZodOptional<z.ZodString>;
|
|
10
|
-
amount: z.ZodOptional<z.ZodNumber
|
|
10
|
+
amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
11
11
|
currency: z.ZodOptional<z.ZodString>;
|
|
12
12
|
status: z.ZodString;
|
|
13
13
|
paymentMethod: z.ZodOptional<z.ZodString>;
|
|
@@ -29,7 +29,7 @@ export declare const PaymentSessionsResponseSchema: z.ZodObject<{
|
|
|
29
29
|
id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
30
30
|
orderId: z.ZodOptional<z.ZodNumber>;
|
|
31
31
|
orderIdentifier: z.ZodOptional<z.ZodString>;
|
|
32
|
-
amount: z.ZodOptional<z.ZodNumber
|
|
32
|
+
amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
33
33
|
currency: z.ZodOptional<z.ZodString>;
|
|
34
34
|
status: z.ZodString;
|
|
35
35
|
paymentMethod: z.ZodOptional<z.ZodString>;
|
|
@@ -46,13 +46,13 @@ export declare const PaymentSessionsResponseSchema: z.ZodObject<{
|
|
|
46
46
|
}, z.core.$strip>;
|
|
47
47
|
/**
|
|
48
48
|
* Single payment session response schema
|
|
49
|
-
* @description Schema for a single payment session
|
|
49
|
+
* @description Schema for a single payment session or array of sessions by order
|
|
50
50
|
*/
|
|
51
|
-
export declare const SinglePaymentSessionSchema: z.ZodObject<{
|
|
51
|
+
export declare const SinglePaymentSessionSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
52
52
|
id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
53
53
|
orderId: z.ZodOptional<z.ZodNumber>;
|
|
54
54
|
orderIdentifier: z.ZodOptional<z.ZodString>;
|
|
55
|
-
amount: z.ZodOptional<z.ZodNumber
|
|
55
|
+
amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
56
56
|
currency: z.ZodOptional<z.ZodString>;
|
|
57
57
|
status: z.ZodString;
|
|
58
58
|
paymentMethod: z.ZodOptional<z.ZodString>;
|
|
@@ -64,7 +64,23 @@ export declare const SinglePaymentSessionSchema: z.ZodObject<{
|
|
|
64
64
|
type: z.ZodOptional<z.ZodString>;
|
|
65
65
|
paymentAccountId: z.ZodOptional<z.ZodNumber>;
|
|
66
66
|
paymentUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
67
|
-
}, z.core.$strip
|
|
67
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
68
|
+
id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
69
|
+
orderId: z.ZodOptional<z.ZodNumber>;
|
|
70
|
+
orderIdentifier: z.ZodOptional<z.ZodString>;
|
|
71
|
+
amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
72
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
73
|
+
status: z.ZodString;
|
|
74
|
+
paymentMethod: z.ZodOptional<z.ZodString>;
|
|
75
|
+
createdDate: z.ZodOptional<z.ZodString>;
|
|
76
|
+
updatedDate: z.ZodOptional<z.ZodString>;
|
|
77
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
78
|
+
expiresAt: z.ZodOptional<z.ZodString>;
|
|
79
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
80
|
+
type: z.ZodOptional<z.ZodString>;
|
|
81
|
+
paymentAccountId: z.ZodOptional<z.ZodNumber>;
|
|
82
|
+
paymentUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
83
|
+
}, z.core.$strip>>]>;
|
|
68
84
|
/**
|
|
69
85
|
* Payment account schema
|
|
70
86
|
* @description Schema for a payment account
|
|
@@ -10,7 +10,7 @@ exports.PaymentSessionSchema = zod_1.z.object({
|
|
|
10
10
|
id: zod_1.z.union([zod_1.z.string(), zod_1.z.number()]),
|
|
11
11
|
orderId: zod_1.z.number().optional(),
|
|
12
12
|
orderIdentifier: zod_1.z.string().optional(),
|
|
13
|
-
amount: zod_1.z.number().optional(),
|
|
13
|
+
amount: zod_1.z.number().nullable().optional(),
|
|
14
14
|
currency: zod_1.z.string().optional(),
|
|
15
15
|
status: zod_1.z.string(),
|
|
16
16
|
paymentMethod: zod_1.z.string().optional(),
|
|
@@ -33,9 +33,12 @@ exports.PaymentSessionsResponseSchema = zod_1.z.object({
|
|
|
33
33
|
});
|
|
34
34
|
/**
|
|
35
35
|
* Single payment session response schema
|
|
36
|
-
* @description Schema for a single payment session
|
|
36
|
+
* @description Schema for a single payment session or array of sessions by order
|
|
37
37
|
*/
|
|
38
|
-
exports.SinglePaymentSessionSchema =
|
|
38
|
+
exports.SinglePaymentSessionSchema = zod_1.z.union([
|
|
39
|
+
exports.PaymentSessionSchema,
|
|
40
|
+
zod_1.z.array(exports.PaymentSessionSchema),
|
|
41
|
+
]);
|
|
39
42
|
/**
|
|
40
43
|
* Payment account schema
|
|
41
44
|
* @description Schema for a payment account
|
|
@@ -20,8 +20,8 @@ export default class ProductStatusesApi extends AsyncModules implements IProduct
|
|
|
20
20
|
* Search for all product status objects.
|
|
21
21
|
* @handleName getProductStatuses
|
|
22
22
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
23
|
-
* @returns {IProductStatusEntity[]} Returns an array of product status objects.
|
|
24
|
-
* @throws {IError}
|
|
23
|
+
* @returns {Promise<IProductStatusEntity[] | IError>} Returns an array of product status objects.
|
|
24
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
25
25
|
* @description Search for all product status objects.
|
|
26
26
|
*/
|
|
27
27
|
getProductStatuses(langCode?: string): Promise<IProductStatusEntity[] | IError>;
|
|
@@ -30,8 +30,8 @@ export default class ProductStatusesApi extends AsyncModules implements IProduct
|
|
|
30
30
|
* @handleName getProductsByStatusMarker
|
|
31
31
|
* @param {string} marker - Product marker. Example: "in_stock".
|
|
32
32
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
33
|
-
* @returns {IProductStatusEntity} Returns a product status object.
|
|
34
|
-
* @throws {IError}
|
|
33
|
+
* @returns {Promise<IProductStatusEntity | IError>} Returns a product status object.
|
|
34
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
35
35
|
* @description Search for a product status object by its textual identifier (marker).
|
|
36
36
|
*/
|
|
37
37
|
getProductsByStatusMarker(marker: string, langCode?: string): Promise<IProductStatusEntity | IError>;
|
|
@@ -39,8 +39,8 @@ export default class ProductStatusesApi extends AsyncModules implements IProduct
|
|
|
39
39
|
* Check the existence of a textual identifier.
|
|
40
40
|
* @handleName validateMarker
|
|
41
41
|
* @param {string} marker - Product marker. Example: "in_stock".
|
|
42
|
-
* @returns {boolean} Returns true if the textual identifier (marker) exists or false if it doesn't.
|
|
43
|
-
* @throws {IError}
|
|
42
|
+
* @returns {Promise<boolean | IError>} Returns true if the textual identifier (marker) exists or false if it doesn't.
|
|
43
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
44
44
|
* @description Check the existence of a textual identifier.
|
|
45
45
|
*/
|
|
46
46
|
validateMarker(marker: string): Promise<boolean | IError>;
|
|
@@ -24,8 +24,8 @@ class ProductStatusesApi extends asyncModules_1.default {
|
|
|
24
24
|
* Search for all product status objects.
|
|
25
25
|
* @handleName getProductStatuses
|
|
26
26
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
27
|
-
* @returns {IProductStatusEntity[]} Returns an array of product status objects.
|
|
28
|
-
* @throws {IError}
|
|
27
|
+
* @returns {Promise<IProductStatusEntity[] | IError>} Returns an array of product status objects.
|
|
28
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
29
29
|
* @description Search for all product status objects.
|
|
30
30
|
*/
|
|
31
31
|
async getProductStatuses(langCode = this.state.lang) {
|
|
@@ -39,8 +39,8 @@ class ProductStatusesApi extends asyncModules_1.default {
|
|
|
39
39
|
* @handleName getProductsByStatusMarker
|
|
40
40
|
* @param {string} marker - Product marker. Example: "in_stock".
|
|
41
41
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
42
|
-
* @returns {IProductStatusEntity} Returns a product status object.
|
|
43
|
-
* @throws {IError}
|
|
42
|
+
* @returns {Promise<IProductStatusEntity | IError>} Returns a product status object.
|
|
43
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
44
44
|
* @description Search for a product status object by its textual identifier (marker).
|
|
45
45
|
*/
|
|
46
46
|
async getProductsByStatusMarker(marker, langCode = this.state.lang) {
|
|
@@ -53,8 +53,8 @@ class ProductStatusesApi extends asyncModules_1.default {
|
|
|
53
53
|
* Check the existence of a textual identifier.
|
|
54
54
|
* @handleName validateMarker
|
|
55
55
|
* @param {string} marker - Product marker. Example: "in_stock".
|
|
56
|
-
* @returns {boolean} Returns true if the textual identifier (marker) exists or false if it doesn't.
|
|
57
|
-
* @throws {IError}
|
|
56
|
+
* @returns {Promise<boolean | IError>} Returns true if the textual identifier (marker) exists or false if it doesn't.
|
|
57
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
58
58
|
* @description Check the existence of a textual identifier.
|
|
59
59
|
*/
|
|
60
60
|
async validateMarker(marker) {
|
|
@@ -49,18 +49,19 @@ export default class ProductApi extends AsyncModules implements IProductApi {
|
|
|
49
49
|
* @param {IProductsQuery} [userQuery] - Optional set query parameters.
|
|
50
50
|
* @example
|
|
51
51
|
{
|
|
52
|
-
"
|
|
53
|
-
"offset": 0,
|
|
52
|
+
"signPrice": "orders",
|
|
54
53
|
"sortOrder": "DESC",
|
|
55
54
|
"sortKey": "id",
|
|
55
|
+
"limit": 30,
|
|
56
|
+
"offset": 0,
|
|
56
57
|
"statusId": 123,
|
|
57
58
|
"statusMarker": "in_stock",
|
|
58
59
|
"conditionValue": "new",
|
|
59
60
|
"conditionMarker": "equals",
|
|
60
61
|
"attributeMarker": "color"
|
|
61
62
|
}
|
|
62
|
-
* @returns {IProductsResponse}
|
|
63
|
-
* @throws {IError}
|
|
63
|
+
* @returns {Promise<IProductsResponse | IError>} Products response, or IError when isShell=true
|
|
64
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
64
65
|
* @description Fetch products with optional filters and pagination.
|
|
65
66
|
*/
|
|
66
67
|
getProducts(body?: IFilterParams[], langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
|
|
@@ -81,8 +82,8 @@ export default class ProductApi extends AsyncModules implements IProductApi {
|
|
|
81
82
|
"conditionMarker": "equals",
|
|
82
83
|
"attributeMarker": "color"
|
|
83
84
|
}
|
|
84
|
-
* @returns {IProductsResponse} Array with ProductEntity objects.
|
|
85
|
-
* @throws {IError}
|
|
85
|
+
* @returns {Promise<IProductsResponse | IError>} Array with ProductEntity objects.
|
|
86
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
86
87
|
* @description Search for all product page objects with pagination that do not have a category.
|
|
87
88
|
*/
|
|
88
89
|
getProductsEmptyPage(langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
|
|
@@ -129,8 +130,8 @@ export default class ProductApi extends AsyncModules implements IProductApi {
|
|
|
129
130
|
"conditionMarker": "equals",
|
|
130
131
|
"attributeMarker": "color"
|
|
131
132
|
}
|
|
132
|
-
* @returns {IProductsResponse} Array with ProductEntity objects
|
|
133
|
-
* @throws {IError}
|
|
133
|
+
* @returns {Promise<IProductsResponse | IError>} Array with ProductEntity objects
|
|
134
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
134
135
|
* @description Fetch products by page ID with optional filters and pagination.
|
|
135
136
|
*/
|
|
136
137
|
getProductsByPageId(id: number, body?: IFilterParams[], langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
|
|
@@ -152,8 +153,8 @@ export default class ProductApi extends AsyncModules implements IProductApi {
|
|
|
152
153
|
"conditionMarker": "equals",
|
|
153
154
|
"attributeMarker": "color"
|
|
154
155
|
}
|
|
155
|
-
* @returns {IProductsInfo} Array with ProductInformation objects.
|
|
156
|
-
* @throws {IError}
|
|
156
|
+
* @returns {Promise<IProductsInfo | IError>} Array with ProductInformation objects.
|
|
157
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
157
158
|
* @description Search for information about products and prices for the selected category.
|
|
158
159
|
*/
|
|
159
160
|
getProductsPriceByPageUrl(url: string, langCode?: string, userQuery?: IProductsQuery): Promise<IProductsInfo | IError>;
|
|
@@ -200,8 +201,8 @@ export default class ProductApi extends AsyncModules implements IProductApi {
|
|
|
200
201
|
"conditionMarker": "equals",
|
|
201
202
|
"attributeMarker": "color"
|
|
202
203
|
}
|
|
203
|
-
* @returns {IProductsResponse} Array with ProductEntity objects.
|
|
204
|
-
* @throws {IError}
|
|
204
|
+
* @returns {Promise<IProductsResponse | IError>} Array with ProductEntity objects.
|
|
205
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
205
206
|
* @description Search for all products with pagination for the selected category.
|
|
206
207
|
*/
|
|
207
208
|
getProductsByPageUrl(url: string, body?: IFilterParams[], langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
|
|
@@ -227,8 +228,8 @@ export default class ProductApi extends AsyncModules implements IProductApi {
|
|
|
227
228
|
* @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 0.
|
|
228
229
|
* @param {string} [userQuery.sortOrder] - Optional sorting order "DESC" | "ASC". Example: "DESC".
|
|
229
230
|
* @param {string} [userQuery.sortKey] - Optional field to sort by ("id", "title", "date", "price", "position", "status"). Example: "id".
|
|
230
|
-
* @returns {IProductsResponse} Array with ProductEntity objects
|
|
231
|
-
* @throws {IError}
|
|
231
|
+
* @returns {Promise<IProductsResponse | IError>} Array with ProductEntity objects
|
|
232
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
232
233
|
* @description Find all related product page objects.
|
|
233
234
|
*/
|
|
234
235
|
getRelatedProductsById(id: number, langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
|
|
@@ -259,8 +260,8 @@ export default class ProductApi extends AsyncModules implements IProductApi {
|
|
|
259
260
|
* @param {string} [userQuery.conditionValue] - Optional value that is being searched. Example: "new".
|
|
260
261
|
* @param {string} [userQuery.conditionMarker] - Optional identifier of the filter condition by which values are filtered. Example: "equals".
|
|
261
262
|
* @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered. Example: "color".
|
|
262
|
-
* @returns {IProductsEntity[]} Array with ProductEntity objects
|
|
263
|
-
* @throws {IError}
|
|
263
|
+
* @returns {Promise<IProductsEntity[] | IError>} Array with ProductEntity objects
|
|
264
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
264
265
|
* @description Find products by its ids.
|
|
265
266
|
*/
|
|
266
267
|
getProductsByIds(ids: string, langCode?: string, userQuery?: IProductsQuery): Promise<IProductsEntity[] | IError>;
|
|
@@ -269,8 +270,8 @@ export default class ProductApi extends AsyncModules implements IProductApi {
|
|
|
269
270
|
* @handleName getProductById
|
|
270
271
|
* @param {number} id - Product id. Example: 12345.
|
|
271
272
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
272
|
-
* @returns {IProductsEntity} ProductEntity object.
|
|
273
|
-
* @throws {IError}
|
|
273
|
+
* @returns {Promise<IProductsEntity | IError>} ProductEntity object.
|
|
274
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
274
275
|
* @description Retrieve one product object.
|
|
275
276
|
*/
|
|
276
277
|
getProductById(id: number, langCode?: string): Promise<IProductsEntity | IError>;
|
|
@@ -278,8 +279,8 @@ export default class ProductApi extends AsyncModules implements IProductApi {
|
|
|
278
279
|
* Getting a product block object by product id.
|
|
279
280
|
* @handleName getProductBlockById
|
|
280
281
|
* @param {number} id - Product id. Example: 12345.
|
|
281
|
-
* @returns {IProductBlock} - Product block object.
|
|
282
|
-
* @throws {IError}
|
|
282
|
+
* @returns {Promise<IProductBlock | IError>} - Product block object.
|
|
283
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
283
284
|
* @description Getting a product block object by product id.
|
|
284
285
|
*/
|
|
285
286
|
getProductBlockById(id: number): Promise<IProductBlock[] | IError>;
|
|
@@ -288,8 +289,8 @@ export default class ProductApi extends AsyncModules implements IProductApi {
|
|
|
288
289
|
* @handleName searchProduct
|
|
289
290
|
* @param {string} name - Text to search product page objects (search is based on the title field of the localizeInfos object with language consideration). Example: "laminat".
|
|
290
291
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
291
|
-
* @returns {IProductsEntity[]} Array with ProductEntity objects
|
|
292
|
-
* @throws {IError}
|
|
292
|
+
* @returns {Promise<IProductsEntity[] | IError>} Array with ProductEntity objects
|
|
293
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
293
294
|
* @description Quick search for product page objects with limited output.
|
|
294
295
|
*/
|
|
295
296
|
searchProduct(name: string, langCode?: string): Promise<IProductsEntity[] | IError>;
|
|
@@ -310,8 +311,8 @@ export default class ProductApi extends AsyncModules implements IProductApi {
|
|
|
310
311
|
"title": "Iphone 17 Pro"
|
|
311
312
|
}
|
|
312
313
|
]
|
|
313
|
-
* @returns {IProductsCount} Object with product items count.
|
|
314
|
-
* @throws {IError}
|
|
314
|
+
* @returns {Promise<IProductsCount | IError>} Object with product items count.
|
|
315
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
315
316
|
* @description This method calculates and returns the total number of products present across the entire catalog, optionally applying specified filters.
|
|
316
317
|
*/
|
|
317
318
|
getProductsCount(body?: any[]): Promise<IProductsCount | IError>;
|
|
@@ -333,8 +334,8 @@ export default class ProductApi extends AsyncModules implements IProductApi {
|
|
|
333
334
|
"title": "Iphone 17 Pro"
|
|
334
335
|
}
|
|
335
336
|
]
|
|
336
|
-
* @returns {IProductsCount} Object with product items count.
|
|
337
|
-
* @throws {IError}
|
|
337
|
+
* @returns {Promise<IProductsCount | IError>} Object with product items count.
|
|
338
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
338
339
|
* @description This method calculates and returns the number of products available on a given catalog page, identified by its page ID, with optional filtering.
|
|
339
340
|
*/
|
|
340
341
|
getProductsCountByPageId(id: string, body?: any[]): Promise<IProductsCount | IError>;
|
|
@@ -356,8 +357,8 @@ export default class ProductApi extends AsyncModules implements IProductApi {
|
|
|
356
357
|
"title": "Iphone 17 Pro"
|
|
357
358
|
}
|
|
358
359
|
]
|
|
359
|
-
* @returns {IProductsCount} Object with product items count.
|
|
360
|
-
* @throws {IError}
|
|
360
|
+
* @returns {Promise<IProductsCount | IError>} Object with product items count.
|
|
361
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
361
362
|
* @description This method calculates and returns the number of products available on a given catalog page, identified by its URL, with optional filtering.
|
|
362
363
|
*/
|
|
363
364
|
getProductsCountByPageUrl(url: string, body?: any[]): Promise<IProductsCount | IError>;
|