oneentry 1.0.126 → 1.0.127

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/README.md +0 -2
  2. package/configure.js +25 -18
  3. package/dist/admins/adminsApi.d.ts +30 -25
  4. package/dist/admins/adminsApi.js +30 -25
  5. package/dist/admins/adminsInterfaces.d.ts +45 -54
  6. package/dist/attribute-sets/attributeSetsApi.d.ts +26 -27
  7. package/dist/attribute-sets/attributeSetsApi.js +26 -27
  8. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +101 -109
  9. package/dist/auth-provider/authProviderApi.d.ts +132 -158
  10. package/dist/auth-provider/authProviderApi.js +131 -157
  11. package/dist/auth-provider/authProvidersInterfaces.d.ts +241 -237
  12. package/dist/base/asyncModules.d.ts +23 -21
  13. package/dist/base/asyncModules.js +30 -25
  14. package/dist/base/result.d.ts +31 -0
  15. package/dist/base/result.js +32 -1
  16. package/dist/base/stateModule.d.ts +10 -0
  17. package/dist/base/stateModule.js +50 -2
  18. package/dist/base/syncModules.d.ts +41 -49
  19. package/dist/base/syncModules.js +49 -48
  20. package/dist/base/utils.d.ts +38 -7
  21. package/dist/blocks/blocksApi.d.ts +27 -36
  22. package/dist/blocks/blocksApi.js +27 -36
  23. package/dist/blocks/blocksInterfaces.d.ts +92 -97
  24. package/dist/config.d.ts +13 -0
  25. package/dist/config.js +30 -0
  26. package/dist/events/eventsApi.d.ts +16 -33
  27. package/dist/events/eventsApi.js +32 -46
  28. package/dist/events/eventsInterfaces.d.ts +42 -37
  29. package/dist/file-uploading/fileUploadingApi.d.ts +42 -47
  30. package/dist/file-uploading/fileUploadingApi.js +44 -47
  31. package/dist/file-uploading/fileUploadingInterfaces.d.ts +49 -60
  32. package/dist/forms/formsApi.d.ts +15 -14
  33. package/dist/forms/formsApi.js +15 -14
  34. package/dist/forms/formsInterfaces.d.ts +36 -40
  35. package/dist/forms-data/formsDataApi.d.ts +40 -44
  36. package/dist/forms-data/formsDataApi.js +42 -44
  37. package/dist/forms-data/formsDataInterfaces.d.ts +231 -231
  38. package/dist/general-types/generalTypesApi.d.ts +5 -5
  39. package/dist/general-types/generalTypesApi.js +5 -5
  40. package/dist/general-types/generalTypesInterfaces.d.ts +6 -9
  41. package/dist/index.d.ts +12 -13
  42. package/dist/index.js +12 -13
  43. package/dist/integration-collections/integrationCollectionsApi.d.ts +84 -98
  44. package/dist/integration-collections/integrationCollectionsApi.js +86 -102
  45. package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +177 -169
  46. package/dist/locales/localesApi.d.ts +7 -3
  47. package/dist/locales/localesApi.js +7 -3
  48. package/dist/locales/localesInterfaces.d.ts +14 -13
  49. package/dist/menus/menusApi.d.ts +9 -5
  50. package/dist/menus/menusApi.js +9 -5
  51. package/dist/menus/menusInterfaces.d.ts +43 -48
  52. package/dist/menus/menusInterfaces.js +1 -0
  53. package/dist/orders/ordersApi.d.ts +62 -70
  54. package/dist/orders/ordersApi.js +62 -71
  55. package/dist/orders/ordersInterfaces.d.ts +238 -203
  56. package/dist/pages/pagesApi.d.ts +67 -80
  57. package/dist/pages/pagesApi.js +71 -81
  58. package/dist/pages/pagesInterfaces.d.ts +164 -160
  59. package/dist/payments/paymentsApi.d.ts +24 -34
  60. package/dist/payments/paymentsApi.js +24 -38
  61. package/dist/payments/paymentsInterfaces.d.ts +82 -76
  62. package/dist/product-statuses/productStatusesApi.d.ts +13 -13
  63. package/dist/product-statuses/productStatusesApi.js +13 -13
  64. package/dist/product-statuses/productStatusesInterfaces.d.ts +29 -27
  65. package/dist/products/productsApi.d.ts +246 -267
  66. package/dist/products/productsApi.js +247 -267
  67. package/dist/products/productsInterfaces.d.ts +333 -339
  68. package/dist/system/systemApi.d.ts +19 -21
  69. package/dist/system/systemApi.js +20 -21
  70. package/dist/system/systemInterfaces.d.ts +14 -3
  71. package/dist/templates/templatesApi.d.ts +13 -16
  72. package/dist/templates/templatesApi.js +13 -16
  73. package/dist/templates/templatesInterfaces.d.ts +30 -29
  74. package/dist/templates-preview/templatesPreviewApi.d.ts +10 -11
  75. package/dist/templates-preview/templatesPreviewApi.js +10 -11
  76. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +61 -64
  77. package/dist/users/usersApi.d.ts +36 -43
  78. package/dist/users/usersApi.js +36 -43
  79. package/dist/users/usersInterfaces.d.ts +92 -96
  80. package/dist/web-socket/wsApi.d.ts +5 -3
  81. package/dist/web-socket/wsApi.js +6 -3
  82. package/dist/web-socket/wsInterfaces.d.ts +7 -2
  83. package/package.json +16 -12
@@ -6,22 +6,25 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const asyncModules_1 = __importDefault(require("../base/asyncModules"));
7
7
  /**
8
8
  * Controllers for working with payments
9
- *
10
9
  * @handle /api/content/payments
10
+ * @description Controllers for working with payments
11
11
  */
12
12
  class PaymentsApi extends asyncModules_1.default {
13
+ /**
14
+ * Constructor
15
+ * @param {StateModule} state - StateModule instance
16
+ * @description Constructor initializes the PaymentsApi with a given state.
17
+ */
13
18
  constructor(state) {
14
19
  super(state);
15
20
  this._url = state.url + '/api/content/payments';
16
21
  }
17
22
  /**
18
23
  * Get list of payment sessions. This method requires user authorization.
19
- *
20
24
  * @handleName getSessions
21
- *
22
- * @param {number} [offset] - Optional parameter for pagination. Default: 0.
23
- * @param {number} [limit] - Optional parameter for pagination. Default: 30.
24
- * @return {ISessionsEntity} Returns an array of SessionEntity objects.
25
+ * @param {number} [offset] - Optional parameter for pagination. Default: 0.
26
+ * @param {number} [limit] - Optional parameter for pagination. Default: 30.
27
+ * @returns {ISessionsEntity} Returns an array of SessionEntity objects.
25
28
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
26
29
  * @description Get list of payment sessions. This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
27
30
  */
@@ -35,11 +38,9 @@ class PaymentsApi extends asyncModules_1.default {
35
38
  }
36
39
  /**
37
40
  * Get a single payment session object by its identifier. This method requires user authorization.
38
- *
39
41
  * @handleName getSessionById
40
- *
41
- * @param {number} id - Identifier of the retrieved payment session object. Example: 12345.
42
- * @return {ISessionEntity} Returns a single payment session object.
42
+ * @param {number} id - Identifier of the retrieved payment session object. Example: 12345.
43
+ * @returns {ISessionEntity} Returns a single payment session object.
43
44
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
44
45
  * @description Get a single payment session object by its identifier. This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
45
46
  */
@@ -49,11 +50,9 @@ class PaymentsApi extends asyncModules_1.default {
49
50
  }
50
51
  /**
51
52
  * Get one payment session object by order identifier
52
- *
53
53
  * @handleName getSessionByOrderId
54
- *
55
- * @param {number} id - Order identifier. Example: 12345.
56
- * @return {IAccountsEntity} Returns a single payment account object.
54
+ * @param {number} id - Order identifier. Example: 12345.
55
+ * @returns {IAccountsEntity} Returns a single payment account object.
57
56
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
58
57
  * @description Get one payment session object by order identifier. This method requires user authorization.
59
58
  */
@@ -63,13 +62,11 @@ class PaymentsApi extends asyncModules_1.default {
63
62
  }
64
63
  /**
65
64
  * Creation of payment session. This method requires user authorization.
66
- *
67
65
  * @handleName createSession
68
- *
69
- * @param {number} orderId - Order identifier. Example: 12345.
70
- * @param {'session' | 'intent'} type - Session type. Possible values: "session" or "intent". Example: 'session'.
71
- * @param {boolean} [automaticTaxEnabled] - Automatic calculation of the tax rate. Default: false.
72
- * @return {ICreateSessionEntity} Returns a single payment session object.
66
+ * @param {number} orderId - Order identifier. Example: 12345.
67
+ * @param {'session' | 'intent'} type - Session type. Possible values: "session" or "intent". Example: 'session'.
68
+ * @param {boolean} [automaticTaxEnabled] - Automatic calculation of the tax rate. Default: false.
69
+ * @returns {ICreateSessionEntity} Returns a single payment session object.
73
70
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
74
71
  * @description Creation of payment session. This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
75
72
  */
@@ -83,10 +80,8 @@ class PaymentsApi extends asyncModules_1.default {
83
80
  }
84
81
  /**
85
82
  * Get all payment accounts as an array. This method requires user authorization.
86
- *
87
83
  * @handleName getAccounts
88
- *
89
- * @return {IAccountsEntity} Returns all created payment accounts as an array of PaymentAccountEntity objects.
84
+ * @returns {IAccountsEntity} Returns all created payment accounts as an array of PaymentAccountEntity objects.
90
85
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
91
86
  * @description Get all payment accounts as an array. This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
92
87
  */
@@ -96,33 +91,24 @@ class PaymentsApi extends asyncModules_1.default {
96
91
  }
97
92
  /**
98
93
  * Get a single payment account object by its identifier. This method requires user authorization.
99
- *
100
94
  * @handleName getAccountById
101
- *
102
- * @param {number} id - Identifier of the retrieved payment account object. Example: 12345.
103
- * @param {any} settings - Settings object. Example: !!!
104
- * @return {IAccountsEntity} Returns a single payment account object.
95
+ * @param {number} id - Identifier of the retrieved payment account object. Example: 12345.
96
+ * @returns {IAccountsEntity} Returns a single payment account object.
105
97
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
106
98
  * @description Get a single payment account object by its identifier. This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
107
99
  */
108
- async getAccountById(id,
109
- // !!! куда добавлять settins? query? body?
110
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
111
- settings) {
100
+ async getAccountById(id) {
112
101
  const result = await this._fetchGet(`/accounts/${id}`);
113
- return result;
102
+ return this._normalizeData(result);
114
103
  }
115
104
  /**
116
105
  * Webhook for payment account.
117
- *
118
106
  * @handleName webhookByMarker
119
- *
120
- * @param {number} marker - marker. Example: "stripe".
121
- * @return {boolean} Returns ...!!!
107
+ * @param {string} marker - marker. Example: "stripe".
108
+ * @returns {boolean} Returns true if the webhook was processed successfully.
122
109
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
123
110
  * @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.
124
111
  */
125
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
126
112
  async webhookByMarker(marker) {
127
113
  const result = await this._fetchPost(`/webhook/${marker}`, {});
128
114
  return result;
@@ -1,85 +1,88 @@
1
1
  import type { IError, ILocalizeInfo } from '../base/utils';
2
2
  /**
3
3
  * @interface IPaymentsApi
4
- *
5
- * @property {function} getSessions - Get list of payment sessions.
6
- * @property {function} getSessionById - Get a single payment session object by its identifier.
7
- * @property {function} createSession - Creation of payment session.
8
- * @property {function} getAccounts - Get all payment accounts as an array.
9
- * @property {function} getAccountById - Get a single payment account object by its identifier.
10
- * @property {function} setAccessToken - Only for custom authorization. An intermediate method for setting up an access token.
4
+ * @property {Function} getSessions - Get list of payment sessions.
5
+ * @property {Function} getSessionById - Get a single payment session object by its identifier.
6
+ * @property {Function} createSession - Creation of payment session.
7
+ * @property {Function} getAccounts - Get all payment accounts as an array.
8
+ * @property {Function} getAccountById - Get a single payment account object by its identifier.
9
+ * @property {Function} setAccessToken - Only for custom authorization. An intermediate method for setting up an access token.
11
10
  * @description This interface defines methods for managing payment sessions, accounts, and connected payment settings in the system.
12
11
  */
13
12
  interface IPaymentsApi {
14
13
  /**
15
14
  * Get list of payment sessions.
16
- *
17
- * @param {number} [offset] - Optional parameter for pagination. Default: 0.
18
- * @param {number} [limit] - Optional parameter for pagination. Default: 30.
19
- * @return {ISessionsEntity} Returns an array of SessionEntity objects.
15
+ * @handleName getSessions
16
+ * @param {number} [offset] - Optional parameter for pagination. Default: 0.
17
+ * @param {number} [limit] - Optional parameter for pagination. Default: 30.
18
+ * @returns {ISessionsEntity} Returns an array of SessionEntity objects.
20
19
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
20
+ * @description This method gets list of payment sessions.
21
21
  */
22
22
  getSessions(offset: number, limit: number): Promise<ISessionsEntity | IError>;
23
23
  /**
24
24
  * Get a single payment session object by its identifier.
25
- *
26
- * @param {number} id - Identifier of the retrieved payment session object. Example: 12345.
27
- * @return {ISessionEntity} Returns a single payment session object.
25
+ * @handleName getSessionById
26
+ * @param {number} id - Identifier of the retrieved payment session object. Example: 12345.
27
+ * @returns {ISessionEntity} Returns a single payment session object.
28
28
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
29
+ * @description This method gets a single payment session object by its identifier.
29
30
  */
30
31
  getSessionById(id: number): Promise<ISessionEntity | IError>;
31
32
  /**
32
33
  * Get one payment session object by order identifier 🔐
33
- *
34
- * @param {number} id - Order identifier. Example: 12345.
35
- * @return {ISessionEntity}
34
+ * @handleName getSessionByOrderId
35
+ * @param {number} id - Order identifier. Example: 12345.
36
+ * @returns {ISessionEntity} Returns a single payment session object.
36
37
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
38
+ * @description This method gets one payment session object by order identifier.
37
39
  */
38
40
  getSessionByOrderId(id: number): Promise<ISessionEntity | IError>;
39
41
  /**
40
42
  * Creation of payment session.
41
- *
42
- * @param {number} orderId - Order identifier. Example: 12345.
43
- * @param {'session' | 'intent'} type - Session type. Possible values: "session" or "intent". Example: "session".
44
- * @param {boolean} [automaticTaxEnabled] - Automatic calculation of the tax rate. Default: false.
45
- * @return {ICreateSessionEntity} Returns a single payment session object.
43
+ * @handleName createSession
44
+ * @param {number} orderId - Order identifier. Example: 12345.
45
+ * @param {'session' | 'intent'} type - Session type. Possible values: "session" or "intent". Example: "session".
46
+ * @param {boolean} [automaticTaxEnabled] - Automatic calculation of the tax rate. Default: false.
47
+ * @returns {ICreateSessionEntity} Returns a single payment session object.
46
48
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
49
+ * @description This method creates a payment session.
47
50
  */
48
51
  createSession(orderId: number, type: 'session' | 'intent', automaticTaxEnabled?: boolean): Promise<ICreateSessionEntity | IError>;
49
52
  /**
50
53
  * Get all payment accounts as an array.
51
- *
52
- * @return {IAccountsEntity} Returns all created payment accounts as an array of PaymentAccountEntity objects.
54
+ * @handleName getAccounts
55
+ * @returns {IAccountsEntity} Returns all created payment accounts as an array of PaymentAccountEntity objects.
53
56
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
57
+ * @description This method gets all payment accounts as an array.
54
58
  */
55
59
  getAccounts(): Promise<IAccountsEntity[] | IError>;
56
60
  /**
57
61
  * Get a single payment account object by its identifier.
58
- *
59
- * @param {number} id - Identifier of the retrieved payment account object. Example: 12345.
60
- * @param {any} settings - Settings object. Example: ...!!!
61
- * @return {IAccountsEntity} Returns a single payment account object.
62
+ * @handleName getAccountById
63
+ * @param {number} id - Identifier of the retrieved payment account object. Example: 12345.
64
+ * @returns {IAccountsEntity} Returns a single payment account object.
62
65
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
66
+ * @description This method gets a single payment account object by its identifier.
63
67
  */
64
- getAccountById(id: number, settings?: any): Promise<IAccountsEntity | IError>;
68
+ getAccountById(id: number): Promise<IAccountsEntity | IError>;
65
69
  }
66
70
  /**
67
71
  * @interface ISessionsEntity
68
- *
69
- * @property {number} total - Total number of found records. Example: 100.
72
+ * @property {number} total - Total number of found records. Example: 100.
70
73
  * @property {ISessionEntity} items - Array of session objects. Example:
71
- [
72
- {
73
- "id": 27,
74
- "createdDate": "2025-06-04T04:38:32.849Z",
75
- "updatedDate": "2025-06-04T04:38:32.849Z",
76
- "type": "session",
77
- "status": "waiting",
78
- "paymentAccountId": 1,
79
- "orderId": 55,
80
- "paymentUrl": null
81
- }
82
- ]
74
+ [
75
+ {
76
+ "id": 27,
77
+ "createdDate": "2025-06-04T04:38:32.849Z",
78
+ "updatedDate": "2025-06-04T04:38:32.849Z",
79
+ "type": "session",
80
+ "status": "waiting",
81
+ "paymentAccountId": 1,
82
+ "orderId": 55,
83
+ "paymentUrl": null
84
+ }
85
+ ]
83
86
  * @description Represents a response from the payments API containing a total count and an array of session entities.
84
87
  */
85
88
  interface ISessionsEntity {
@@ -88,15 +91,14 @@ interface ISessionsEntity {
88
91
  }
89
92
  /**
90
93
  * @interface ISessionEntity
91
- *
92
- * @property {number} id - Object identifier. Example: 1764.
93
- * @property {string} createdDate - Object creation date. Example: "2025-02-26T10:13:16.839Z".
94
- * @property {string} updatedDate - Object modification date. Example: "2025-02-26T10:13:16.839Z".
95
- * @property {string} type - Type may be 'session' or 'intent'. Example: "session".
96
- * @property {string} status - Payment status. Example: "completed".
97
- * @property {number} paymentAccountId - Payment ID from an external provider. Example: "9BE88048TU058770M".
98
- * @property {number} orderId - Order identifier. Example: 1.
99
- * @property {string | null} paymentUrl - payment link. Example: " https://www.sandbox.paypal.com/checkoutnow?token=9BE88048TU058770M".
94
+ * @property {number} id - Object identifier. Example: 1764.
95
+ * @property {string} createdDate - Object creation date. Example: "2025-02-26T10:13:16.839Z".
96
+ * @property {string} updatedDate - Object modification date. Example: "2025-02-26T10:13:16.839Z".
97
+ * @property {string} type - Type may be 'session' or 'intent'. Example: "session".
98
+ * @property {string} status - Payment status. Example: "completed".
99
+ * @property {number} paymentAccountId - Payment ID from an external provider. Example: "9BE88048TU058770M".
100
+ * @property {number} orderId - Order identifier. Example: 1.
101
+ * @property {string | null} paymentUrl - payment link. Example: " https://www.sandbox.paypal.com/checkoutnow?token=9BE88048TU058770M".
100
102
  * @description This interface defines the structure of a session entity, including its quantity, amount, currency, name, and description.
101
103
  */
102
104
  interface ISessionEntity {
@@ -111,8 +113,7 @@ interface ISessionEntity {
111
113
  }
112
114
  /**
113
115
  * @interface IIntent
114
- *
115
- * @property {number} amount - Amount of the payment intent. Example: 100.00.
116
+ * @property {number} amount - Amount of the payment intent. Example: 100.00.
116
117
  * @property {string} currency - Currency of the payment intent. Example: "USD".
117
118
  * @description This interface defines the structure of a payment intent, including its amount and currency.
118
119
  */
@@ -122,15 +123,14 @@ interface IIntent {
122
123
  }
123
124
  /**
124
125
  * @interface ISessionItem
125
- *
126
- * @property {number} id - Object identifier. Example: 12345.
127
- * @property {string} updatedDate - Object modification date. Example: "2023-10-01T12:00:00Z".
128
- * @property {string} type - Type may be 'session' or 'intent'. Example: 'session'.
129
- * @property {number} orderId - Order identifier. Example: 12345.
126
+ * @property {number} id - Object identifier. Example: 12345.
127
+ * @property {string} updatedDate - Object modification date. Example: "2023-10-01T12:00:00Z".
128
+ * @property {string} type - Type may be 'session' or 'intent'. Example: 'session'.
129
+ * @property {number} orderId - Order identifier. Example: 12345.
130
130
  * @property {number} paymentAccountId - Payment account object identifier. Example: 12345.
131
- * @property {string} paymentUrl - Payment link. Example: "https://example.com/payment/12345".
132
- * @property {string} clientSecret - Client secret key. Example: "sk_test_4eC39HqLyjWDarjtT1zdp7dc".
133
- * @property {string} status - payment status. Example: "pending".
131
+ * @property {string} paymentUrl - Payment link. Example: "https://example.com/payment/12345".
132
+ * @property {string} clientSecret - Client secret key. Example: "sk_test_4eC39HqLyjWDarjtT1zdp7dc".
133
+ * @property {string} status - payment status. Example: "pending".
134
134
  * @description This interface defines the structure of a session item, which includes identifiers, payment details, and status information.
135
135
  */
136
136
  interface ISessionItem {
@@ -145,12 +145,11 @@ interface ISessionItem {
145
145
  }
146
146
  /**
147
147
  * @interface ICreateSessionEntity
148
- *
149
- * @property {number} id - Object identifier. Example: 12345.
148
+ * @property {number} id - Object identifier. Example: 12345.
150
149
  * @property {string} updatedDate - Object modification date. Example: "2023-10-01T12:00:00Z".
151
- * @property {number} version - Version of the object. Example: 1.
152
- * @property {string} identifier - Text identifier for the recording field. Example: "payment_12345".
153
- * @property {string} paymentUrl - Payment link. Example: "https://example.com/payment/12345".
150
+ * @property {number} version - Version of the object. Example: 1.
151
+ * @property {string} identifier - Text identifier for the recording field. Example: "payment_12345".
152
+ * @property {string} paymentUrl - Payment link. Example: "https://example.com/payment/12345".
154
153
  * @description This interface defines the structure of a session entity created during the payment process, including its identifiers, version, and payment URL.
155
154
  */
156
155
  interface ICreateSessionEntity {
@@ -162,13 +161,12 @@ interface ICreateSessionEntity {
162
161
  }
163
162
  /**
164
163
  * @interface IAccountsEntity
165
- *
166
- * @property {number} id - Object identifier. Example: 12345.
167
- * @property {ILocalizeInfo} localizeInfos - Json description of the payment account object.
168
- * @property {string} identifier - Text identifier for the recording field. Example: "payment_12345".
169
- * @property {'stripe' | 'custom'} type - Type may be 'stripe' or 'custom'. Example: 'stripe'.
170
- * @property {boolean} isVisible - Visibility indicator of the payment account. Example: true.
171
- * @property {boolean} isUsed - Usage indicator of the payment account. Example: false.
164
+ * @property {number} id - Object identifier. Example: 12345.
165
+ * @property {ILocalizeInfo} localizeInfos - Json description of the payment account object.
166
+ * @property {string} identifier - Text identifier for the recording field. Example: "payment_12345".
167
+ * @property {'stripe' | 'custom'} type - Type may be 'stripe' or 'custom'. Example: 'stripe'.
168
+ * @property {boolean} isVisible - Visibility indicator of the payment account. Example: true.
169
+ * @property {boolean} isUsed - Usage indicator of the payment account. Example: false.
172
170
  * @description This interface defines the structure of a payment account entity, including its identifiers, localization information, type, visibility, and usage status.
173
171
  */
174
172
  interface IAccountsEntity {
@@ -178,8 +176,16 @@ interface IAccountsEntity {
178
176
  type: 'stripe' | 'custom';
179
177
  isVisible: boolean;
180
178
  isUsed: boolean;
181
- settings: any;
182
179
  testMode: boolean;
183
- testSettings: any;
180
+ settings: any;
181
+ testSettings: {
182
+ status: string;
183
+ cancelUrl?: string;
184
+ successUrl?: string;
185
+ sessionTimeout?: number;
186
+ stripeAccountId?: string;
187
+ stripeRedirectUrl?: string;
188
+ stripeOnboardingComplete?: boolean;
189
+ };
184
190
  }
185
191
  export type { IAccountsEntity, ICreateSessionEntity, IIntent, IPaymentsApi, ISessionEntity, ISessionItem, ISessionsEntity, };
@@ -5,41 +5,41 @@ import type { IProductStatusEntity, IProductStatuses } from './productStatusesIn
5
5
  /**
6
6
  * Controllers for working with product statuses
7
7
  * @handle /api/content/product-statuses
8
+ * @description Controllers for working with product statuses
8
9
  */
9
10
  export default class ProductStatusesApi extends AsyncModules implements IProductStatuses {
10
11
  protected state: StateModule;
11
12
  protected _url: string;
13
+ /**
14
+ * Constructor
15
+ * @param {StateModule} state - State module instance
16
+ * @description Constructor initializes the ProductStatusesApi with a given state.
17
+ */
12
18
  constructor(state: StateModule);
13
19
  /**
14
20
  * Search for all product status objects.
15
- *
16
21
  * @handleName getProductStatuses
17
- *
18
- * @param {string} [langCode] - Language code. Default: "en_US".
19
- * @return {IProductStatusEntity[]} Returns an array of product status objects.
22
+ * @param {string} [langCode] - Language code. Default: "en_US".
23
+ * @returns {IProductStatusEntity[]} Returns an array of product status objects.
20
24
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
21
25
  * @description Search for all product status objects.
22
26
  */
23
27
  getProductStatuses(langCode?: string): Promise<IProductStatusEntity[] | IError>;
24
28
  /**
25
29
  * Search for a product status object by its textual identifier (marker).
26
- *
27
30
  * @handleName getProductsByStatusMarker
28
- *
29
- * @param {string} marker - Product marker. Example: "in_stock".
30
- * @param {string} [langCode] - Language code. Default: "en_US".
31
- * @return {IProductStatusEntity} Returns a product status object.
31
+ * @param {string} marker - Product marker. Example: "in_stock".
32
+ * @param {string} [langCode] - Language code. Default: "en_US".
33
+ * @returns {IProductStatusEntity} Returns a product status object.
32
34
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
33
35
  * @description Search for a product status object by its textual identifier (marker).
34
36
  */
35
37
  getProductsByStatusMarker(marker: string, langCode?: string): Promise<IProductStatusEntity | IError>;
36
38
  /**
37
39
  * Check the existence of a textual identifier.
38
- *
39
40
  * @handleName validateMarker
40
- *
41
- * @param {string} marker - Product marker. Example: "in_stock".
42
- * @return {boolean} Returns true if the textual identifier (marker) exists or false if it doesn't.
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
43
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
44
44
  * @description Check the existence of a textual identifier.
45
45
  */
@@ -7,19 +7,23 @@ const asyncModules_1 = __importDefault(require("../base/asyncModules"));
7
7
  /**
8
8
  * Controllers for working with product statuses
9
9
  * @handle /api/content/product-statuses
10
+ * @description Controllers for working with product statuses
10
11
  */
11
12
  class ProductStatusesApi extends asyncModules_1.default {
13
+ /**
14
+ * Constructor
15
+ * @param {StateModule} state - State module instance
16
+ * @description Constructor initializes the ProductStatusesApi with a given state.
17
+ */
12
18
  constructor(state) {
13
19
  super(state);
14
20
  this._url = state.url + '/api/content/product-statuses';
15
21
  }
16
22
  /**
17
23
  * Search for all product status objects.
18
- *
19
24
  * @handleName getProductStatuses
20
- *
21
- * @param {string} [langCode] - Language code. Default: "en_US".
22
- * @return {IProductStatusEntity[]} Returns an array of product status objects.
25
+ * @param {string} [langCode] - Language code. Default: "en_US".
26
+ * @returns {IProductStatusEntity[]} Returns an array of product status objects.
23
27
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
24
28
  * @description Search for all product status objects.
25
29
  */
@@ -29,12 +33,10 @@ class ProductStatusesApi extends asyncModules_1.default {
29
33
  }
30
34
  /**
31
35
  * Search for a product status object by its textual identifier (marker).
32
- *
33
36
  * @handleName getProductsByStatusMarker
34
- *
35
- * @param {string} marker - Product marker. Example: "in_stock".
36
- * @param {string} [langCode] - Language code. Default: "en_US".
37
- * @return {IProductStatusEntity} Returns a product status object.
37
+ * @param {string} marker - Product marker. Example: "in_stock".
38
+ * @param {string} [langCode] - Language code. Default: "en_US".
39
+ * @returns {IProductStatusEntity} Returns a product status object.
38
40
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
39
41
  * @description Search for a product status object by its textual identifier (marker).
40
42
  */
@@ -44,11 +46,9 @@ class ProductStatusesApi extends asyncModules_1.default {
44
46
  }
45
47
  /**
46
48
  * Check the existence of a textual identifier.
47
- *
48
49
  * @handleName validateMarker
49
- *
50
- * @param {string} marker - Product marker. Example: "in_stock".
51
- * @return {boolean} Returns true if the textual identifier (marker) exists or false if it doesn't.
50
+ * @param {string} marker - Product marker. Example: "in_stock".
51
+ * @returns {boolean} Returns true if the textual identifier (marker) exists or false if it doesn't.
52
52
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
53
53
  * @description Check the existence of a textual identifier.
54
54
  */
@@ -1,55 +1,57 @@
1
1
  import type { IError, ILocalizeInfo } from '../base/utils';
2
2
  /**
3
3
  * @interface IProductStatuses
4
- *
5
- * @property {function} getProductStatuses - Search for all product status objects.
6
- * @property {function} getProductStatusesById - Search for a product status object by identifier.
7
- * @property {function} getProductsByStatusMarker - Search for a product status object by its textual identifier (marker).
8
- * @property {function} validateMarker - Check the existence of a textual identifier.
4
+ * @property {Function} getProductStatuses - Search for all product status objects.
5
+ * @property {Function} getProductStatusesById - Search for a product status object by identifier.
6
+ * @property {Function} getProductsByStatusMarker - Search for a product status object by its textual identifier (marker).
7
+ * @property {Function} validateMarker - Check the existence of a textual identifier.
9
8
  * @description This interface defines methods for retrieving and managing product statuses in the system.
10
9
  */
11
10
  interface IProductStatuses {
12
11
  /**
13
12
  * Search for all product status objects.
14
- *
15
- * @param {string} [langCode] - Language code. Default: "en_US".
16
- * @return {IProductStatusEntity[]} Returns an array of product status objects.
13
+ * @handleName getProductStatuses
14
+ * @param {string} [langCode] - Language code. Default: "en_US".
15
+ * @returns {IProductStatusEntity[]} Returns an array of product status objects.
17
16
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
17
+ * @description This method searches for all product status objects.
18
18
  */
19
19
  getProductStatuses(langCode: string): Promise<IProductStatusEntity[] | IError>;
20
20
  /**
21
21
  * Search for a product status object by its textual identifier (marker).
22
- *
23
- * @param {string} marker - Product marker. Example: "in_stock".
24
- * @param {string} [langCode] - Language code. Default: "en_US".
25
- * @return {IProductStatusEntity} Returns a product status object.
22
+ * @handleName getProductsByStatusMarker
23
+ * @param {string} marker - Product marker. Example: "in_stock".
24
+ * @param {string} [langCode] - Language code. Default: "en_US".
25
+ * @returns {IProductStatusEntity} Returns a product status object.
26
26
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
27
+ * @description This method searches for a product status object by its textual identifier (marker).
27
28
  */
28
29
  getProductsByStatusMarker(marker: string, langCode: string): Promise<IProductStatusEntity | IError>;
29
30
  /**
30
31
  * Check the existence of a textual identifier.
31
- *
32
- * @param {string} marker - Product marker. Example: "in_stock".
33
- * @return {boolean} Returns true if the textual identifier (marker) exists or false if it doesn't.
32
+ * @handleName validateMarker
33
+ * @param {string} marker - Product marker. Example: "in_stock".
34
+ * @returns {boolean} Returns true if the textual identifier (marker) exists or false if it doesn't.
34
35
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
36
+ * @description This method checks the existence of a textual identifier.
35
37
  */
36
38
  validateMarker(marker: string): Promise<boolean | IError>;
37
39
  }
38
40
  /**
41
+ * Product status entity structure
39
42
  * @interface IProductStatusEntity
40
- *
41
- * @property {number} id - The unique identifier of the position. Example: 12345.
42
- * @property {string} identifier - The textual identifier for the record field. Example: "in_stock".
43
+ * @property {number} id - The unique identifier of the position. Example: 12345.
44
+ * @property {string} identifier - The textual identifier for the record field. Example: "in_stock".
43
45
  * @property {ILocalizeInfo} localizeInfos - The name of the products statuses, taking into account localization. Example:
44
- * @property {boolean} isDefault - Default status flag. Example: true.
45
- * @property {number} version - The version number of the object. Example: 1.
46
- * @property {number} position - Position number. Example: 1.
47
- {
48
- "title": "Catalog",
49
- "plainContent": "Content for catalog",
50
- "htmlContent": "<b>Content for catalog</b>",
51
- "menuTitle": "Catalog"
52
- }
46
+ * @property {boolean} isDefault - Default status flag. Example: true.
47
+ * @property {number} version - The version number of the object. Example: 1.
48
+ * @property {number} position - Position number. Example: 1.
49
+ {
50
+ "title": "Catalog",
51
+ "plainContent": "Content for catalog",
52
+ "htmlContent": "<b>Content for catalog</b>",
53
+ "menuTitle": "Catalog"
54
+ }
53
55
  * @description This interface defines the structure of a product status entity, including its identifiers, localization information, position, and default status flag.
54
56
  */
55
57
  interface IProductStatusEntity {