oneentry 1.0.126 → 1.0.128

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 +18 -13
  4. package/dist/admins/adminsApi.js +18 -13
  5. package/dist/admins/adminsInterfaces.d.ts +16 -25
  6. package/dist/attribute-sets/attributeSetsApi.d.ts +14 -15
  7. package/dist/attribute-sets/attributeSetsApi.js +14 -15
  8. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +78 -84
  9. package/dist/auth-provider/authProviderApi.d.ts +53 -79
  10. package/dist/auth-provider/authProviderApi.js +52 -78
  11. package/dist/auth-provider/authProvidersInterfaces.d.ts +98 -94
  12. package/dist/base/asyncModules.d.ts +23 -21
  13. package/dist/base/asyncModules.js +39 -29
  14. package/dist/base/result.d.ts +31 -0
  15. package/dist/base/result.js +32 -5
  16. package/dist/base/stateModule.d.ts +10 -0
  17. package/dist/base/stateModule.js +50 -2
  18. package/dist/base/syncModules.d.ts +42 -50
  19. package/dist/base/syncModules.js +106 -58
  20. package/dist/base/utils.d.ts +33 -2
  21. package/dist/blocks/blocksApi.d.ts +9 -18
  22. package/dist/blocks/blocksApi.js +9 -18
  23. package/dist/blocks/blocksInterfaces.d.ts +41 -46
  24. package/dist/config.d.ts +13 -0
  25. package/dist/config.js +30 -0
  26. package/dist/events/eventsApi.d.ts +10 -27
  27. package/dist/events/eventsApi.js +26 -40
  28. package/dist/events/eventsInterfaces.d.ts +33 -28
  29. package/dist/file-uploading/fileUploadingApi.d.ts +12 -17
  30. package/dist/file-uploading/fileUploadingApi.js +14 -17
  31. package/dist/file-uploading/fileUploadingInterfaces.d.ts +8 -19
  32. package/dist/forms/formsApi.d.ts +10 -9
  33. package/dist/forms/formsApi.js +10 -9
  34. package/dist/forms/formsInterfaces.d.ts +20 -12
  35. package/dist/forms-data/formsDataApi.d.ts +24 -28
  36. package/dist/forms-data/formsDataApi.js +25 -28
  37. package/dist/forms-data/formsDataInterfaces.d.ts +71 -71
  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 +5 -8
  41. package/dist/index.d.ts +3 -4
  42. package/dist/index.js +3 -4
  43. package/dist/integration-collections/integrationCollectionsApi.d.ts +29 -47
  44. package/dist/integration-collections/integrationCollectionsApi.js +31 -51
  45. package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +62 -58
  46. package/dist/locales/localesApi.d.ts +7 -3
  47. package/dist/locales/localesApi.js +7 -3
  48. package/dist/locales/localesInterfaces.d.ts +6 -5
  49. package/dist/menus/menusApi.d.ts +7 -3
  50. package/dist/menus/menusApi.js +7 -3
  51. package/dist/menus/menusInterfaces.d.ts +5 -10
  52. package/dist/menus/menusInterfaces.js +1 -0
  53. package/dist/orders/ordersApi.d.ts +17 -25
  54. package/dist/orders/ordersApi.js +17 -26
  55. package/dist/orders/ordersInterfaces.d.ts +94 -53
  56. package/dist/pages/pagesApi.d.ts +47 -60
  57. package/dist/pages/pagesApi.js +51 -61
  58. package/dist/pages/pagesInterfaces.d.ts +44 -48
  59. package/dist/payments/paymentsApi.d.ts +17 -27
  60. package/dist/payments/paymentsApi.js +17 -31
  61. package/dist/payments/paymentsInterfaces.d.ts +35 -29
  62. package/dist/product-statuses/productStatusesApi.d.ts +9 -9
  63. package/dist/product-statuses/productStatusesApi.js +9 -9
  64. package/dist/product-statuses/productStatusesInterfaces.d.ts +14 -12
  65. package/dist/products/productsApi.d.ts +23 -44
  66. package/dist/products/productsApi.js +24 -44
  67. package/dist/products/productsInterfaces.d.ts +51 -57
  68. package/dist/system/systemApi.d.ts +11 -13
  69. package/dist/system/systemApi.js +12 -13
  70. package/dist/system/systemInterfaces.d.ts +14 -3
  71. package/dist/templates/templatesApi.d.ts +8 -11
  72. package/dist/templates/templatesApi.js +8 -11
  73. package/dist/templates/templatesInterfaces.d.ts +13 -12
  74. package/dist/templates-preview/templatesPreviewApi.d.ts +7 -8
  75. package/dist/templates-preview/templatesPreviewApi.js +7 -8
  76. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +15 -18
  77. package/dist/users/usersApi.d.ts +13 -20
  78. package/dist/users/usersApi.js +13 -20
  79. package/dist/users/usersInterfaces.d.ts +26 -30
  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
@@ -4,91 +4,81 @@ import type { IError } from '../base/utils';
4
4
  import type { IAccountsEntity, ICreateSessionEntity, IPaymentsApi, ISessionEntity, ISessionsEntity } from './paymentsInterfaces';
5
5
  /**
6
6
  * Controllers for working with payments
7
- *
8
7
  * @handle /api/content/payments
8
+ * @description Controllers for working with payments
9
9
  */
10
10
  export default class PaymentsApi extends AsyncModules implements IPaymentsApi {
11
11
  protected state: StateModule;
12
12
  protected _url: string;
13
+ /**
14
+ * Constructor
15
+ * @param {StateModule} state - StateModule instance
16
+ * @description Constructor initializes the PaymentsApi with a given state.
17
+ */
13
18
  constructor(state: StateModule);
14
19
  /**
15
20
  * Get list of payment sessions. This method requires user authorization.
16
- *
17
21
  * @handleName getSessions
18
- *
19
22
  * @param {number} [offset] - Optional parameter for pagination. Default: 0.
20
- * @param {number} [limit] - Optional parameter for pagination. Default: 30.
21
- * @return {ISessionsEntity} Returns an array of SessionEntity objects.
23
+ * @param {number} [limit] - Optional parameter for pagination. Default: 30.
24
+ * @returns {ISessionsEntity} Returns an array of SessionEntity objects.
22
25
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
23
26
  * @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.
24
27
  */
25
28
  getSessions(offset?: number, limit?: number): Promise<ISessionsEntity | IError>;
26
29
  /**
27
30
  * Get a single payment session object by its identifier. This method requires user authorization.
28
- *
29
31
  * @handleName getSessionById
30
- *
31
32
  * @param {number} id - Identifier of the retrieved payment session object. Example: 12345.
32
- * @return {ISessionEntity} Returns a single payment session object.
33
+ * @returns {ISessionEntity} Returns a single payment session object.
33
34
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
34
35
  * @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.
35
36
  */
36
37
  getSessionById(id: number): Promise<ISessionEntity | IError>;
37
38
  /**
38
39
  * Get one payment session object by order identifier
39
- *
40
40
  * @handleName getSessionByOrderId
41
- *
42
41
  * @param {number} id - Order identifier. Example: 12345.
43
- * @return {IAccountsEntity} Returns a single payment account object.
42
+ * @returns {IAccountsEntity} Returns a single payment account object.
44
43
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
45
44
  * @description Get one payment session object by order identifier. This method requires user authorization.
46
45
  */
47
46
  getSessionByOrderId(id: number): Promise<ISessionEntity | IError>;
48
47
  /**
49
48
  * Creation of payment session. This method requires user authorization.
50
- *
51
49
  * @handleName createSession
52
- *
53
50
  * @param {number} orderId - Order identifier. Example: 12345.
54
51
  * @param {'session' | 'intent'} type - Session type. Possible values: "session" or "intent". Example: 'session'.
55
52
  * @param {boolean} [automaticTaxEnabled] - Automatic calculation of the tax rate. Default: false.
56
- * @return {ICreateSessionEntity} Returns a single payment session object.
53
+ * @returns {ICreateSessionEntity} Returns a single payment session object.
57
54
  * @throws {IError} If there is an error during the fetch operation, it will return an error object.
58
55
  * @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.
59
56
  */
60
57
  createSession(orderId: number, type: 'session' | 'intent', automaticTaxEnabled?: boolean): Promise<ICreateSessionEntity | IError>;
61
58
  /**
62
59
  * Get all payment accounts as an array. This method requires user authorization.
63
- *
64
60
  * @handleName getAccounts
65
- *
66
- * @return {IAccountsEntity} Returns all created payment accounts as an array of PaymentAccountEntity objects.
61
+ * @returns {IAccountsEntity} Returns all created payment accounts as an array of PaymentAccountEntity objects.
67
62
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
68
63
  * @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.
69
64
  */
70
65
  getAccounts(): Promise<IAccountsEntity[] | IError>;
71
66
  /**
72
67
  * Get a single payment account object by its identifier. This method requires user authorization.
73
- *
74
68
  * @handleName getAccountById
75
- *
76
69
  * @param {number} id - Identifier of the retrieved payment account object. Example: 12345.
77
- * @param {any} settings - Settings object. Example: !!!
78
- * @return {IAccountsEntity} Returns a single payment account object.
70
+ * @returns {IAccountsEntity} Returns a single payment account object.
79
71
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
80
72
  * @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.
81
73
  */
82
- getAccountById(id: number, settings?: any): Promise<IAccountsEntity | IError>;
74
+ getAccountById(id: number): Promise<IAccountsEntity | IError>;
83
75
  /**
84
76
  * Webhook for payment account.
85
- *
86
77
  * @handleName webhookByMarker
87
- *
88
- * @param {number} marker - marker. Example: "stripe".
89
- * @return {boolean} Returns ...!!!
78
+ * @param {string} marker - marker. Example: "stripe".
79
+ * @returns {boolean} Returns true if the webhook was processed successfully.
90
80
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
91
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.
92
82
  */
93
- webhookByMarker(marker: string): Promise<any | IError>;
83
+ webhookByMarker(marker: string): Promise<boolean | IError>;
94
84
  }
@@ -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
25
  * @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.
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
42
  * @param {number} id - Identifier of the retrieved payment session object. Example: 12345.
42
- * @return {ISessionEntity} Returns a single payment session object.
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
54
  * @param {number} id - Order identifier. Example: 12345.
56
- * @return {IAccountsEntity} Returns a single payment account object.
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
66
  * @param {number} orderId - Order identifier. Example: 12345.
70
67
  * @param {'session' | 'intent'} type - Session type. Possible values: "session" or "intent". Example: 'session'.
71
68
  * @param {boolean} [automaticTaxEnabled] - Automatic calculation of the tax rate. Default: false.
72
- * @return {ICreateSessionEntity} Returns a single payment session object.
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
95
  * @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.
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,71 +1,74 @@
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
- *
15
+ * @handleName getSessions
17
16
  * @param {number} [offset] - Optional parameter for pagination. Default: 0.
18
17
  * @param {number} [limit] - Optional parameter for pagination. Default: 30.
19
- * @return {ISessionsEntity} Returns an array of SessionEntity objects.
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
- *
25
+ * @handleName getSessionById
26
26
  * @param {number} id - Identifier of the retrieved payment session object. Example: 12345.
27
- * @return {ISessionEntity} Returns a single payment session object.
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
+ * @handleName getSessionByOrderId
34
35
  * @param {number} id - Order identifier. Example: 12345.
35
- * @return {ISessionEntity}
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
- *
43
+ * @handleName createSession
42
44
  * @param {number} orderId - Order identifier. Example: 12345.
43
45
  * @param {'session' | 'intent'} type - Session type. Possible values: "session" or "intent". Example: "session".
44
46
  * @param {boolean} [automaticTaxEnabled] - Automatic calculation of the tax rate. Default: false.
45
- * @return {ICreateSessionEntity} Returns a single payment session object.
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
- *
62
+ * @handleName getAccountById
59
63
  * @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.
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
72
  * @property {number} total - Total number of found records. Example: 100.
70
73
  * @property {ISessionEntity} items - Array of session objects. Example:
71
74
  [
@@ -88,7 +91,6 @@ interface ISessionsEntity {
88
91
  }
89
92
  /**
90
93
  * @interface ISessionEntity
91
- *
92
94
  * @property {number} id - Object identifier. Example: 1764.
93
95
  * @property {string} createdDate - Object creation date. Example: "2025-02-26T10:13:16.839Z".
94
96
  * @property {string} updatedDate - Object modification date. Example: "2025-02-26T10:13:16.839Z".
@@ -111,7 +113,6 @@ interface ISessionEntity {
111
113
  }
112
114
  /**
113
115
  * @interface IIntent
114
- *
115
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.
@@ -122,7 +123,6 @@ interface IIntent {
122
123
  }
123
124
  /**
124
125
  * @interface ISessionItem
125
- *
126
126
  * @property {number} id - Object identifier. Example: 12345.
127
127
  * @property {string} updatedDate - Object modification date. Example: "2023-10-01T12:00:00Z".
128
128
  * @property {string} type - Type may be 'session' or 'intent'. Example: 'session'.
@@ -145,7 +145,6 @@ interface ISessionItem {
145
145
  }
146
146
  /**
147
147
  * @interface ICreateSessionEntity
148
- *
149
148
  * @property {number} id - Object identifier. Example: 12345.
150
149
  * @property {string} updatedDate - Object modification date. Example: "2023-10-01T12:00:00Z".
151
150
  * @property {number} version - Version of the object. Example: 1.
@@ -162,7 +161,6 @@ interface ICreateSessionEntity {
162
161
  }
163
162
  /**
164
163
  * @interface IAccountsEntity
165
- *
166
164
  * @property {number} id - Object identifier. Example: 12345.
167
165
  * @property {ILocalizeInfo} localizeInfos - Json description of the payment account object.
168
166
  * @property {string} identifier - Text identifier for the recording field. Example: "payment_12345".
@@ -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
22
  * @param {string} [langCode] - Language code. Default: "en_US".
19
- * @return {IProductStatusEntity[]} Returns an array of product status objects.
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
31
  * @param {string} marker - Product marker. Example: "in_stock".
30
32
  * @param {string} [langCode] - Language code. Default: "en_US".
31
- * @return {IProductStatusEntity} Returns a product status object.
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
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.
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
25
  * @param {string} [langCode] - Language code. Default: "en_US".
22
- * @return {IProductStatusEntity[]} Returns an array of product status objects.
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
37
  * @param {string} marker - Product marker. Example: "in_stock".
36
38
  * @param {string} [langCode] - Language code. Default: "en_US".
37
- * @return {IProductStatusEntity} Returns a product status object.
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
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.
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,43 +1,45 @@
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
- *
13
+ * @handleName getProductStatuses
15
14
  * @param {string} [langCode] - Language code. Default: "en_US".
16
- * @return {IProductStatusEntity[]} Returns an array of product status objects.
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
- *
22
+ * @handleName getProductsByStatusMarker
23
23
  * @param {string} marker - Product marker. Example: "in_stock".
24
24
  * @param {string} [langCode] - Language code. Default: "en_US".
25
- * @return {IProductStatusEntity} Returns a product status object.
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
+ * @handleName validateMarker
32
33
  * @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.
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
43
  * @property {number} id - The unique identifier of the position. Example: 12345.
42
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: