oneentry 1.0.123 → 1.0.124
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 +16 -8
- package/dist/admins/adminsApi.js +17 -9
- package/dist/admins/adminsInterfaces.d.ts +49 -25
- package/dist/attribute-sets/attributeSetsApi.d.ts +43 -21
- package/dist/attribute-sets/attributeSetsApi.js +49 -25
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +70 -24
- package/dist/auth-provider/authProviderApi.d.ts +94 -83
- package/dist/auth-provider/authProviderApi.js +96 -83
- package/dist/auth-provider/authProvidersInterfaces.d.ts +188 -10
- package/dist/base/asyncModules.d.ts +32 -28
- package/dist/base/asyncModules.js +61 -36
- package/dist/base/syncModules.d.ts +44 -44
- package/dist/base/syncModules.js +65 -63
- package/dist/blocks/blocksApi.d.ts +56 -25
- package/dist/blocks/blocksApi.js +56 -25
- package/dist/blocks/blocksInterfaces.d.ts +71 -22
- package/dist/events/eventsApi.d.ts +45 -11
- package/dist/events/eventsApi.js +47 -17
- package/dist/events/eventsInterfaces.d.ts +44 -2
- package/dist/file-uploading/fileUploadingApi.d.ts +44 -24
- package/dist/file-uploading/fileUploadingApi.js +46 -27
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +63 -14
- package/dist/forms/formsApi.d.ts +23 -8
- package/dist/forms/formsApi.js +23 -8
- package/dist/forms/formsInterfaces.d.ts +62 -15
- package/dist/formsData/formsDataApi.d.ts +33 -33
- package/dist/formsData/formsDataApi.js +33 -33
- package/dist/formsData/formsDataInterfaces.d.ts +123 -35
- package/dist/general-types/generalTypesApi.d.ts +12 -1
- package/dist/general-types/generalTypesApi.js +12 -1
- package/dist/general-types/generalTypesInterfaces.d.ts +18 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/integration-collections/integrationCollectionsApi.d.ts +96 -70
- package/dist/integration-collections/integrationCollectionsApi.js +114 -81
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +152 -30
- package/dist/locales/localesApi.d.ts +6 -1
- package/dist/locales/localesApi.js +6 -1
- package/dist/locales/localesInterfaces.d.ts +20 -11
- package/dist/menus/menusApi.d.ts +8 -3
- package/dist/menus/menusApi.js +8 -3
- package/dist/menus/menusInterfaces.d.ts +30 -17
- package/dist/orders/ordersApi.d.ts +64 -64
- package/dist/orders/ordersApi.js +67 -65
- package/dist/orders/ordersInterfaces.d.ts +174 -60
- package/dist/pages/pagesApi.d.ts +87 -28
- package/dist/pages/pagesApi.js +87 -28
- package/dist/pages/pagesInterfaces.d.ts +117 -23
- package/dist/payments/paymentsApi.d.ts +56 -22
- package/dist/payments/paymentsApi.js +56 -22
- package/dist/payments/paymentsInterfaces.d.ts +119 -36
- package/dist/product-statuses/productStatusesApi.d.ts +21 -15
- package/dist/product-statuses/productStatusesApi.js +21 -18
- package/dist/product-statuses/productStatusesInterfaces.d.ts +37 -9
- package/dist/products/productsApi.d.ts +137 -157
- package/dist/products/productsApi.js +137 -157
- package/dist/products/productsInterfaces.d.ts +240 -57
- package/dist/system/systemApi.d.ts +29 -10
- package/dist/system/systemApi.js +29 -10
- package/dist/system/systemInterfaces.d.ts +8 -0
- package/dist/templates/templatesApi.d.ts +26 -16
- package/dist/templates/templatesApi.js +26 -19
- package/dist/templates/templatesInterfaces.d.ts +40 -14
- package/dist/templates-preview/templatesPreviewApi.d.ts +18 -14
- package/dist/templates-preview/templatesPreviewApi.js +18 -17
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +54 -26
- package/dist/users/usersApi.d.ts +37 -33
- package/dist/users/usersApi.js +37 -33
- package/dist/users/usersInterfaces.d.ts +80 -9
- package/dist/web-socket/wsApi.d.ts +6 -3
- package/dist/web-socket/wsApi.js +6 -3
- package/dist/web-socket/wsInterfaces.d.ts +3 -1
- package/package.json +11 -11
|
@@ -16,11 +16,15 @@ class PaymentsApi extends asyncModules_1.default {
|
|
|
16
16
|
/**
|
|
17
17
|
* Get list of payment sessions.
|
|
18
18
|
*
|
|
19
|
-
* @
|
|
20
|
-
*
|
|
21
|
-
* @param {number} [
|
|
19
|
+
* @handleName getSessions
|
|
20
|
+
*
|
|
21
|
+
* @param {number} [offset] - Optional parameter for pagination. Default: 0.
|
|
22
|
+
* @param {number} [limit] - Optional parameter for pagination. Default: 30.
|
|
22
23
|
*
|
|
23
|
-
* @
|
|
24
|
+
* @return {ISessionsEntity} Returns an array of SessionEntity objects.
|
|
25
|
+
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
26
|
+
*
|
|
27
|
+
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
24
28
|
*/
|
|
25
29
|
async getSessions(offset = 0, limit = 30) {
|
|
26
30
|
const query = {
|
|
@@ -32,11 +36,15 @@ class PaymentsApi extends asyncModules_1.default {
|
|
|
32
36
|
}
|
|
33
37
|
/**
|
|
34
38
|
* Get a single payment session object by its identifier.
|
|
35
|
-
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
36
39
|
*
|
|
37
|
-
* @
|
|
40
|
+
* @handleName getSessionById
|
|
41
|
+
*
|
|
42
|
+
* @param {number} id - Identifier of the retrieved payment session object. Example: 12345.
|
|
38
43
|
*
|
|
39
|
-
* @
|
|
44
|
+
* @return {ISessionEntity} Returns a single payment session object.
|
|
45
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
46
|
+
*
|
|
47
|
+
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
40
48
|
*/
|
|
41
49
|
async getSessionById(id) {
|
|
42
50
|
const result = await this._fetchGet(`/sessions/${id}`);
|
|
@@ -45,8 +53,14 @@ class PaymentsApi extends asyncModules_1.default {
|
|
|
45
53
|
/**
|
|
46
54
|
* Get one payment session object by order identifier 🔐
|
|
47
55
|
*
|
|
48
|
-
* @
|
|
49
|
-
*
|
|
56
|
+
* @handleName getSessionByOrderId
|
|
57
|
+
*
|
|
58
|
+
* @param {number} id - Order identifier. Example: 12345.
|
|
59
|
+
*
|
|
60
|
+
* @return {IAccountsEntity}
|
|
61
|
+
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
62
|
+
*
|
|
63
|
+
* @description
|
|
50
64
|
*/
|
|
51
65
|
async getSessionByOrderId(id) {
|
|
52
66
|
const result = await this._fetchGet(`/sessions/order/${id}`);
|
|
@@ -54,13 +68,17 @@ class PaymentsApi extends asyncModules_1.default {
|
|
|
54
68
|
}
|
|
55
69
|
/**
|
|
56
70
|
* Creation of payment session.
|
|
57
|
-
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
58
71
|
*
|
|
59
|
-
* @
|
|
60
|
-
* @param {'session' | 'intent'} [type] - Session type
|
|
61
|
-
* @param {boolean} [automaticTaxEnabled] - Automatic calculation of the tax rate
|
|
72
|
+
* @handleName createSession
|
|
62
73
|
*
|
|
63
|
-
* @
|
|
74
|
+
* @param {number} orderId - Order identifier. Example: 12345.
|
|
75
|
+
* @param {'session' | 'intent'} type - Session type. Possible values: 'session' or 'intent'. Example: 'session'.
|
|
76
|
+
* @param {boolean} [automaticTaxEnabled] - Automatic calculation of the tax rate. Default: false.
|
|
77
|
+
*
|
|
78
|
+
* @return {ICreateSessionEntity} Returns a single payment session object.
|
|
79
|
+
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
80
|
+
*
|
|
81
|
+
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
64
82
|
*/
|
|
65
83
|
async createSession(orderId, type, automaticTaxEnabled = false) {
|
|
66
84
|
const result = await this._fetchPost('/sessions', {
|
|
@@ -72,9 +90,13 @@ class PaymentsApi extends asyncModules_1.default {
|
|
|
72
90
|
}
|
|
73
91
|
/**
|
|
74
92
|
* Get payment settings.
|
|
75
|
-
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
76
93
|
*
|
|
77
|
-
* @
|
|
94
|
+
* @handleName getConnected
|
|
95
|
+
*
|
|
96
|
+
* @return {IConnectedEntity} Returns object PaymentsConnected or null.
|
|
97
|
+
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
98
|
+
*
|
|
99
|
+
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
78
100
|
*/
|
|
79
101
|
async getConnected() {
|
|
80
102
|
const result = await this._fetchGet('/connected');
|
|
@@ -82,9 +104,13 @@ class PaymentsApi extends asyncModules_1.default {
|
|
|
82
104
|
}
|
|
83
105
|
/**
|
|
84
106
|
* Get all payment accounts as an array.
|
|
85
|
-
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
86
107
|
*
|
|
87
|
-
* @
|
|
108
|
+
* @handleName getAccounts
|
|
109
|
+
*
|
|
110
|
+
* @return {IAccountsEntity} Returns all created payment accounts as an array of PaymentAccountEntity objects.
|
|
111
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
112
|
+
*
|
|
113
|
+
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
88
114
|
*/
|
|
89
115
|
async getAccounts() {
|
|
90
116
|
const result = await this._fetchGet('/accounts');
|
|
@@ -92,11 +118,15 @@ class PaymentsApi extends asyncModules_1.default {
|
|
|
92
118
|
}
|
|
93
119
|
/**
|
|
94
120
|
* Get a single payment account object by its identifier.
|
|
121
|
+
*
|
|
122
|
+
* @handleName getAccountById
|
|
123
|
+
*
|
|
95
124
|
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
96
125
|
*
|
|
97
|
-
* @param {number} id - Identifier of the retrieved payment account object
|
|
126
|
+
* @param {number} id - Identifier of the retrieved payment account object. Example: 12345.
|
|
98
127
|
*
|
|
99
|
-
* @
|
|
128
|
+
* @return {IAccountsEntity} Returns a single payment account object.
|
|
129
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
100
130
|
*/
|
|
101
131
|
async getAccountById(id) {
|
|
102
132
|
const result = await this._fetchGet(`/accounts/${id}`);
|
|
@@ -104,9 +134,13 @@ class PaymentsApi extends asyncModules_1.default {
|
|
|
104
134
|
}
|
|
105
135
|
/**
|
|
106
136
|
* Webhook for Stripe.
|
|
107
|
-
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
108
137
|
*
|
|
109
|
-
* @
|
|
138
|
+
* @handleName webhookStripe
|
|
139
|
+
*
|
|
140
|
+
* @return {boolean} Returns true (in case of successful execution) or false (in case of unsuccessful execution)
|
|
141
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
142
|
+
*
|
|
143
|
+
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
110
144
|
*/
|
|
111
145
|
async webhookStripe() {
|
|
112
146
|
const result = await this._fetchPost('/webhook/stripe', {});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IError } from '../base/utils';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* @interface IPaymentsApi
|
|
4
4
|
*
|
|
5
5
|
* @property {function} getSessions - Get list of payment sessions.
|
|
6
6
|
* @property {function} getSessionById - Get a single payment session object by its identifier.
|
|
@@ -10,32 +10,102 @@ import type { IError } from '../base/utils';
|
|
|
10
10
|
* @property {function} getAccountById - Get a single payment account object by its identifier.
|
|
11
11
|
* @property {function} webhookStripe - Webhook for Stripe.
|
|
12
12
|
* @property {function} setAccessToken - Only for custom authorization. An intermediate method for setting up an access token.
|
|
13
|
+
*
|
|
14
|
+
* @description This interface defines methods for managing payment sessions, accounts, and connected payment settings in the system.
|
|
13
15
|
*/
|
|
14
16
|
interface IPaymentsApi {
|
|
17
|
+
/**
|
|
18
|
+
* Get list of payment sessions.
|
|
19
|
+
*
|
|
20
|
+
* @param {number} [offset] - Optional parameter for pagination. Default: 0.
|
|
21
|
+
* @param {number} [limit] - Optional parameter for pagination. Default: 30.
|
|
22
|
+
*
|
|
23
|
+
* @return {ISessionsEntity} Returns an array of SessionEntity objects.
|
|
24
|
+
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
25
|
+
*/
|
|
15
26
|
getSessions(offset: number, limit: number): Promise<ISessionsEntity | IError>;
|
|
27
|
+
/**
|
|
28
|
+
* Get a single payment session object by its identifier.
|
|
29
|
+
*
|
|
30
|
+
* @param {number} id - Identifier of the retrieved payment session object. Example: 12345.
|
|
31
|
+
*
|
|
32
|
+
* @return {ISessionEntity} Returns a single payment session object.
|
|
33
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
34
|
+
*/
|
|
16
35
|
getSessionById(id: number): Promise<ISessionEntity | IError>;
|
|
36
|
+
/**
|
|
37
|
+
* Get one payment session object by order identifier 🔐
|
|
38
|
+
*
|
|
39
|
+
* @param {number} id - Order identifier. Example: 12345.
|
|
40
|
+
*
|
|
41
|
+
* @return {IAccountsEntity}
|
|
42
|
+
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
43
|
+
*/
|
|
44
|
+
getSessionByOrderId(id: number): Promise<IAccountsEntity | IError>;
|
|
45
|
+
/**
|
|
46
|
+
* Creation of payment session.
|
|
47
|
+
*
|
|
48
|
+
* @param {number} orderId - Order identifier. Example: 12345.
|
|
49
|
+
* @param {'session' | 'intent'} type - Session type. Possible values: 'session' or 'intent'. Example: 'session'.
|
|
50
|
+
* @param {boolean} [automaticTaxEnabled] - Automatic calculation of the tax rate. Default: false.
|
|
51
|
+
*
|
|
52
|
+
* @return {ICreateSessionEntity} Returns a single payment session object.
|
|
53
|
+
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
54
|
+
*/
|
|
17
55
|
createSession(orderId: number, type: 'session' | 'intent', automaticTaxEnabled?: boolean): Promise<ICreateSessionEntity | IError>;
|
|
56
|
+
/**
|
|
57
|
+
* Get payment settings.
|
|
58
|
+
*
|
|
59
|
+
* @return {IConnectedEntity} Returns object PaymentsConnected or null.
|
|
60
|
+
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
61
|
+
*/
|
|
18
62
|
getConnected(): Promise<IConnectedEntity | null | IError>;
|
|
63
|
+
/**
|
|
64
|
+
* Get all payment accounts as an array.
|
|
65
|
+
*
|
|
66
|
+
* @return {IAccountsEntity} Returns all created payment accounts as an array of PaymentAccountEntity objects.
|
|
67
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
68
|
+
*/
|
|
19
69
|
getAccounts(): Promise<Array<IAccountsEntity> | IError>;
|
|
70
|
+
/**
|
|
71
|
+
* Get a single payment account object by its identifier.
|
|
72
|
+
*
|
|
73
|
+
* @param {number} id - Identifier of the retrieved payment account object. Example: 12345.
|
|
74
|
+
*
|
|
75
|
+
* @return {IAccountsEntity} Returns a single payment account object.
|
|
76
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
77
|
+
*/
|
|
20
78
|
getAccountById(id: number): Promise<IAccountsEntity | IError>;
|
|
79
|
+
/**
|
|
80
|
+
* Webhook for Stripe.
|
|
81
|
+
*
|
|
82
|
+
* @return {boolean} Returns true (in case of successful execution) or false (in case of unsuccessful execution)
|
|
83
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
84
|
+
*/
|
|
21
85
|
webhookStripe(): Promise<boolean | IError>;
|
|
22
86
|
}
|
|
23
87
|
/**
|
|
24
|
-
* ISessionsEntity
|
|
88
|
+
* @interface ISessionsEntity
|
|
89
|
+
*
|
|
90
|
+
* @property {number} total - Total number of found records. Example: 100.
|
|
91
|
+
* @property {ISessionEntity} items - Array of session objects. Example: .
|
|
92
|
+
*
|
|
93
|
+
* @description Represents a response from the payments API containing a total count and an array of session entities.
|
|
25
94
|
*/
|
|
26
95
|
interface ISessionsEntity {
|
|
27
96
|
total: number;
|
|
28
97
|
items: ISessionEntity;
|
|
29
98
|
}
|
|
30
99
|
/**
|
|
31
|
-
* ISessionEntity
|
|
32
|
-
*
|
|
33
|
-
* @
|
|
34
|
-
* @property {number}
|
|
35
|
-
* @property {
|
|
36
|
-
* @property {string}
|
|
37
|
-
* @property {string}
|
|
38
|
-
*
|
|
100
|
+
* @interface ISessionEntity
|
|
101
|
+
*
|
|
102
|
+
* @property {number} quantity - Quantity information. Example: 2.
|
|
103
|
+
* @property {number} amount - Amount information. Example: 100.00.
|
|
104
|
+
* @property {string} currency - Currency information. Example: "USD".
|
|
105
|
+
* @property {string} name - Name of the session. Example: "Checkout Session".
|
|
106
|
+
* @property {string} description - Description. Example: "Payment for order #12345".
|
|
107
|
+
*
|
|
108
|
+
* @description This interface defines the structure of a session entity, including its quantity, amount, currency, name, and description.
|
|
39
109
|
*/
|
|
40
110
|
interface ISessionEntity {
|
|
41
111
|
quantity: number;
|
|
@@ -45,28 +115,30 @@ interface ISessionEntity {
|
|
|
45
115
|
description: string;
|
|
46
116
|
}
|
|
47
117
|
/**
|
|
48
|
-
* IIntent
|
|
118
|
+
* @interface IIntent
|
|
119
|
+
*
|
|
120
|
+
* @property {number} amount - Amount of the payment intent. Example: 100.00.
|
|
121
|
+
* @property {string} currency - Currency of the payment intent. Example: "USD".
|
|
49
122
|
*
|
|
50
|
-
* @interface
|
|
51
|
-
* @property {number} amount
|
|
52
|
-
* @property {string} currency
|
|
123
|
+
* @description This interface defines the structure of a payment intent, including its amount and currency.
|
|
53
124
|
*/
|
|
54
125
|
interface IIntent {
|
|
55
126
|
amount: number;
|
|
56
127
|
currency: string;
|
|
57
128
|
}
|
|
58
129
|
/**
|
|
59
|
-
* ISessionItem
|
|
60
|
-
*
|
|
61
|
-
* @
|
|
62
|
-
* @property {
|
|
63
|
-
* @property {string}
|
|
64
|
-
* @property {
|
|
65
|
-
* @property {
|
|
66
|
-
* @property {
|
|
67
|
-
* @property {
|
|
68
|
-
* @property {string}
|
|
69
|
-
*
|
|
130
|
+
* @interface ISessionItem
|
|
131
|
+
*
|
|
132
|
+
* @property {number} id - Object identifier. Example: 12345.
|
|
133
|
+
* @property {string} updatedDate - Object modification date. Example: "2023-10-01T12:00:00Z".
|
|
134
|
+
* @property {string} type - Type may be 'session' or 'intent'. Example: 'session'.
|
|
135
|
+
* @property {number} orderId - Order identifier. Example: 12345.
|
|
136
|
+
* @property {number} paymentAccountId - Payment account object identifier. Example: 12345.
|
|
137
|
+
* @property {string} paymentUrl - Payment link. Example: "https://example.com/payment/12345".
|
|
138
|
+
* @property {string} clientSecret - Client secret key. Example: "sk_test_4eC39HqLyjWDarjtT1zdp7dc".
|
|
139
|
+
* @property {string} status - payment status. Example: "pending".
|
|
140
|
+
*
|
|
141
|
+
* @description This interface defines the structure of a session item, which includes identifiers, payment details, and status information.
|
|
70
142
|
*/
|
|
71
143
|
interface ISessionItem {
|
|
72
144
|
id: number;
|
|
@@ -79,7 +151,15 @@ interface ISessionItem {
|
|
|
79
151
|
status: string;
|
|
80
152
|
}
|
|
81
153
|
/**
|
|
82
|
-
* ICreateSessionEntity
|
|
154
|
+
* @interface ICreateSessionEntity
|
|
155
|
+
*
|
|
156
|
+
* @property {number} id - Object identifier. Example: 12345.
|
|
157
|
+
* @property {string} updatedDate - Object modification date. Example: "2023-10-01T12:00:00Z".
|
|
158
|
+
* @property {number} version - Version of the object. Example: 1.
|
|
159
|
+
* @property {string} identifier - Text identifier for the recording field. Example: "payment_12345".
|
|
160
|
+
* @property {string} paymentUrl - Payment link. Example: "https://example.com/payment/12345".
|
|
161
|
+
*
|
|
162
|
+
* @description This interface defines the structure of a session entity created during the payment process, including its identifiers, version, and payment URL.
|
|
83
163
|
*/
|
|
84
164
|
interface ICreateSessionEntity {
|
|
85
165
|
id: number;
|
|
@@ -89,25 +169,28 @@ interface ICreateSessionEntity {
|
|
|
89
169
|
paymentUrl: string;
|
|
90
170
|
}
|
|
91
171
|
/**
|
|
92
|
-
* IConnectedEntity
|
|
172
|
+
* @interface IConnectedEntity
|
|
173
|
+
*
|
|
174
|
+
* @property {string} stripeAccountId - Identifier of connected Stripe account. Example: "acct_12345".
|
|
175
|
+
* @property {string} stripePublishableKey - Stripe Connect public key. Example: "pk_test_4eC39HqLyjWDarjtT1zdp7dc".
|
|
93
176
|
*
|
|
94
|
-
* @interface
|
|
95
|
-
* @property {string} [stripeAccountId] - Identifier of connected Stripe account.
|
|
96
|
-
* @property {string} [stripePublishableKey] - Stripe Connect public key.
|
|
177
|
+
* @description This interface defines the structure of a connected entity, which includes identifiers for a Stripe account and its publishable key.
|
|
97
178
|
*/
|
|
98
179
|
interface IConnectedEntity {
|
|
99
180
|
stripeAccountId: string | null;
|
|
100
181
|
stripePublishableKey: string | null;
|
|
101
182
|
}
|
|
102
183
|
/**
|
|
103
|
-
* IAccountsEntity
|
|
184
|
+
* @interface IAccountsEntity
|
|
104
185
|
*
|
|
105
|
-
* @
|
|
106
|
-
* @property {
|
|
107
|
-
* @property {string} identifier - Text identifier for the recording field.
|
|
186
|
+
* @property {number} id - Object identifier. Example: 12345.
|
|
187
|
+
* @property {string} identifier - Text identifier for the recording field. Example: "payment_12345".
|
|
108
188
|
* @property {Record<string, any>} localizeInfos - Json description of the payment account object.
|
|
109
|
-
* @property {'stripe' | 'custom'} type - Type may be 'stripe' or 'custom'.
|
|
110
|
-
* @property {boolean} isVisible - Visibility indicator of the payment account.
|
|
189
|
+
* @property {'stripe' | 'custom'} type - Type may be 'stripe' or 'custom'. Example: 'stripe'.
|
|
190
|
+
* @property {boolean} isVisible - Visibility indicator of the payment account. Example: true.
|
|
191
|
+
* @property {boolean} isUsed - Usage indicator of the payment account. Example: false.
|
|
192
|
+
*
|
|
193
|
+
* @description This interface defines the structure of a payment account entity, including its identifiers, localization information, type, visibility, and usage status.
|
|
111
194
|
*/
|
|
112
195
|
interface IAccountsEntity {
|
|
113
196
|
id: number;
|
|
@@ -13,35 +13,41 @@ export default class ProductStatusesApi extends AsyncModules implements IProduct
|
|
|
13
13
|
/**
|
|
14
14
|
* Search for all product status objects.
|
|
15
15
|
*
|
|
16
|
-
* @
|
|
16
|
+
* @handleName getProductStatuses
|
|
17
17
|
*
|
|
18
|
-
* @
|
|
19
|
-
*/
|
|
20
|
-
getProductStatuses(langCode?: string): Promise<Array<IProductStatusEntity> | IError>;
|
|
21
|
-
/**
|
|
22
|
-
* Search for a product status object by identifier.
|
|
18
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
23
19
|
*
|
|
24
|
-
* @
|
|
25
|
-
* @
|
|
20
|
+
* @return {IProductStatusEntity[]} Returns an array of product status objects.
|
|
21
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
26
22
|
*
|
|
27
|
-
* @
|
|
23
|
+
* @description
|
|
28
24
|
*/
|
|
29
|
-
|
|
25
|
+
getProductStatuses(langCode?: string): Promise<Array<IProductStatusEntity> | IError>;
|
|
30
26
|
/**
|
|
31
27
|
* Search for a product status object by its textual identifier (marker).
|
|
32
28
|
*
|
|
33
|
-
* @
|
|
34
|
-
* @param {string} [langCode] - language code
|
|
29
|
+
* @handleName getProductsByStatusMarker
|
|
35
30
|
*
|
|
36
|
-
* @
|
|
31
|
+
* @param {string} marker - Product marker. Example: 'in_stock'.
|
|
32
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
33
|
+
*
|
|
34
|
+
* @return {IProductStatusEntity} Returns a product status object.
|
|
35
|
+
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
36
|
+
*
|
|
37
|
+
* @description
|
|
37
38
|
*/
|
|
38
39
|
getProductsByStatusMarker(marker: string, langCode?: string): Promise<IProductStatusEntity | IError>;
|
|
39
40
|
/**
|
|
40
41
|
* Check the existence of a textual identifier.
|
|
41
42
|
*
|
|
42
|
-
* @
|
|
43
|
+
* @handleName validateMarker
|
|
44
|
+
*
|
|
45
|
+
* @param {string} marker - Product marker. Example: 'in_stock'.
|
|
46
|
+
*
|
|
47
|
+
* @return {boolean} Returns true if the textual identifier (marker) exists or false if it doesn't.
|
|
48
|
+
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
43
49
|
*
|
|
44
|
-
* @
|
|
50
|
+
* @description
|
|
45
51
|
*/
|
|
46
52
|
validateMarker(marker: string): Promise<boolean | IError>;
|
|
47
53
|
}
|
|
@@ -16,33 +16,31 @@ class ProductStatusesApi extends asyncModules_1.default {
|
|
|
16
16
|
/**
|
|
17
17
|
* Search for all product status objects.
|
|
18
18
|
*
|
|
19
|
-
* @
|
|
19
|
+
* @handleName getProductStatuses
|
|
20
20
|
*
|
|
21
|
-
* @
|
|
21
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
22
|
+
*
|
|
23
|
+
* @return {IProductStatusEntity[]} Returns an array of product status objects.
|
|
24
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
25
|
+
*
|
|
26
|
+
* @description
|
|
22
27
|
*/
|
|
23
28
|
async getProductStatuses(langCode = this.state.lang) {
|
|
24
29
|
const result = await this._fetchGet('');
|
|
25
30
|
return this._normalizeData(result, langCode);
|
|
26
31
|
}
|
|
27
32
|
/**
|
|
28
|
-
* Search for a product status object by identifier.
|
|
33
|
+
* Search for a product status object by its textual identifier (marker).
|
|
29
34
|
*
|
|
30
|
-
* @
|
|
31
|
-
* @param {string} [langCode] - language code
|
|
35
|
+
* @handleName getProductsByStatusMarker
|
|
32
36
|
*
|
|
33
|
-
* @
|
|
34
|
-
|
|
35
|
-
async getProductStatusesById(id, langCode = this.state.lang) {
|
|
36
|
-
const result = await this._fetchGet(`/${id}`);
|
|
37
|
-
return this._normalizeData(result, langCode);
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Search for a product status object by its textual identifier (marker).
|
|
37
|
+
* @param {string} marker - Product marker. Example: 'in_stock'.
|
|
38
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
41
39
|
*
|
|
42
|
-
* @
|
|
43
|
-
* @
|
|
40
|
+
* @return {IProductStatusEntity} Returns a product status object.
|
|
41
|
+
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
44
42
|
*
|
|
45
|
-
* @
|
|
43
|
+
* @description
|
|
46
44
|
*/
|
|
47
45
|
async getProductsByStatusMarker(marker, langCode = this.state.lang) {
|
|
48
46
|
const result = await this._fetchGet(`/marker/${marker}`);
|
|
@@ -51,9 +49,14 @@ class ProductStatusesApi extends asyncModules_1.default {
|
|
|
51
49
|
/**
|
|
52
50
|
* Check the existence of a textual identifier.
|
|
53
51
|
*
|
|
54
|
-
* @
|
|
52
|
+
* @handleName validateMarker
|
|
53
|
+
*
|
|
54
|
+
* @param {string} marker - Product marker. Example: 'in_stock'.
|
|
55
|
+
*
|
|
56
|
+
* @return {boolean} Returns true if the textual identifier (marker) exists or false if it doesn't.
|
|
57
|
+
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
55
58
|
*
|
|
56
|
-
* @
|
|
59
|
+
* @description
|
|
57
60
|
*/
|
|
58
61
|
async validateMarker(marker) {
|
|
59
62
|
const result = await this._fetchGet(`/marker-validation/${marker}`);
|
|
@@ -1,27 +1,55 @@
|
|
|
1
1
|
import type { IError } from '../base/utils';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* @interface IProductStatuses
|
|
4
4
|
*
|
|
5
5
|
* @property {function} getProductStatuses - Search for all product status objects.
|
|
6
6
|
* @property {function} getProductStatusesById - Search for a product status object by identifier.
|
|
7
7
|
* @property {function} getProductsByStatusMarker - Search for a product status object by its textual identifier (marker).
|
|
8
8
|
* @property {function} validateMarker - Check the existence of a textual identifier.
|
|
9
|
+
*
|
|
10
|
+
* @description This interface defines methods for retrieving and managing product statuses in the system.
|
|
9
11
|
*/
|
|
10
12
|
interface IProductStatuses {
|
|
13
|
+
/**
|
|
14
|
+
* Search for all product status objects.
|
|
15
|
+
*
|
|
16
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
17
|
+
*
|
|
18
|
+
* @return {IProductStatusEntity[]} Returns an array of product status objects.
|
|
19
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
20
|
+
*/
|
|
11
21
|
getProductStatuses(langCode: string): Promise<Array<IProductStatusEntity> | IError>;
|
|
12
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Search for a product status object by its textual identifier (marker).
|
|
24
|
+
*
|
|
25
|
+
* @param {string} marker - Product marker. Example: 'in_stock'.
|
|
26
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
27
|
+
*
|
|
28
|
+
* @return {IProductStatusEntity} Returns a product status object.
|
|
29
|
+
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
30
|
+
*/
|
|
13
31
|
getProductsByStatusMarker(marker: string, langCode: string): Promise<IProductStatusEntity | IError>;
|
|
32
|
+
/**
|
|
33
|
+
* Check the existence of a textual identifier.
|
|
34
|
+
*
|
|
35
|
+
* @param {string} marker - Product marker. Example: 'in_stock'.
|
|
36
|
+
*
|
|
37
|
+
* @return {boolean} Returns true if the textual identifier (marker) exists or false if it doesn't.
|
|
38
|
+
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
39
|
+
*/
|
|
14
40
|
validateMarker(marker: string): Promise<boolean | IError>;
|
|
15
41
|
}
|
|
16
42
|
/**
|
|
17
|
-
*
|
|
43
|
+
* @interface IProductStatusEntity
|
|
44
|
+
*
|
|
45
|
+
* @property {number} id - The unique identifier of the position. Example: 12345.
|
|
46
|
+
* @property {number} version - The version number of the object. Example: 1.
|
|
47
|
+
* @property {string} identifier - The textual identifier for the record field. Example: 'in_stock'.
|
|
48
|
+
* @property {number} position - Position number. Example: 1.
|
|
49
|
+
* @property {Record<string, any>} localizeInfos - The name of the products statuses, taking into account localization. Example: .
|
|
50
|
+
* @property {boolean} isDefault - Default status flag. Example: true.
|
|
18
51
|
*
|
|
19
|
-
* @interface
|
|
20
|
-
* @property {number} id - The unique identifier of the position.
|
|
21
|
-
* @property {number} version - The version number of the object.
|
|
22
|
-
* @property {string} identifier - The textual identifier for the record field.
|
|
23
|
-
* @property {number} position - Position number.
|
|
24
|
-
* @property {Record<string, any>} localizeInfos - The name of the products statuses, taking into account localization.
|
|
52
|
+
* @description This interface defines the structure of a product status entity, including its identifiers, localization information, position, and default status flag.
|
|
25
53
|
*/
|
|
26
54
|
interface IProductStatusEntity {
|
|
27
55
|
id: number;
|