oneentry 1.0.138 → 1.0.140

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 (143) hide show
  1. package/README.md +16 -1
  2. package/configure.js +40 -21
  3. package/package.json +15 -12
  4. package/dist/admins/adminsApi.d.ts +0 -50
  5. package/dist/admins/adminsApi.js +0 -65
  6. package/dist/admins/adminsInterfaces.d.ts +0 -99
  7. package/dist/admins/adminsInterfaces.js +0 -2
  8. package/dist/admins/adminsSchemas.d.ts +0 -30
  9. package/dist/admins/adminsSchemas.js +0 -27
  10. package/dist/attribute-sets/attributeSetsApi.d.ts +0 -63
  11. package/dist/attribute-sets/attributeSetsApi.js +0 -98
  12. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +0 -187
  13. package/dist/attribute-sets/attributeSetsInterfaces.js +0 -2
  14. package/dist/attribute-sets/attributeSetsSchemas.d.ts +0 -90
  15. package/dist/attribute-sets/attributeSetsSchemas.js +0 -74
  16. package/dist/auth-provider/authProviderApi.d.ts +0 -249
  17. package/dist/auth-provider/authProviderApi.js +0 -351
  18. package/dist/auth-provider/authProviderSchemas.d.ts +0 -137
  19. package/dist/auth-provider/authProviderSchemas.js +0 -85
  20. package/dist/auth-provider/authProvidersInterfaces.d.ts +0 -417
  21. package/dist/auth-provider/authProvidersInterfaces.js +0 -2
  22. package/dist/base/asyncModules.d.ts +0 -80
  23. package/dist/base/asyncModules.js +0 -440
  24. package/dist/base/result.d.ts +0 -39
  25. package/dist/base/result.js +0 -154
  26. package/dist/base/stateModule.d.ts +0 -41
  27. package/dist/base/stateModule.js +0 -128
  28. package/dist/base/syncModules.d.ts +0 -148
  29. package/dist/base/syncModules.js +0 -530
  30. package/dist/base/utils.d.ts +0 -197
  31. package/dist/base/utils.js +0 -2
  32. package/dist/base/validation.d.ts +0 -118
  33. package/dist/base/validation.js +0 -132
  34. package/dist/blocks/blocksApi.d.ts +0 -74
  35. package/dist/blocks/blocksApi.js +0 -184
  36. package/dist/blocks/blocksInterfaces.d.ts +0 -173
  37. package/dist/blocks/blocksInterfaces.js +0 -2
  38. package/dist/blocks/blocksSchemas.d.ts +0 -187
  39. package/dist/blocks/blocksSchemas.js +0 -43
  40. package/dist/events/eventsApi.d.ts +0 -60
  41. package/dist/events/eventsApi.js +0 -97
  42. package/dist/events/eventsInterfaces.d.ts +0 -87
  43. package/dist/events/eventsInterfaces.js +0 -2
  44. package/dist/file-uploading/fileUploadingApi.d.ts +0 -88
  45. package/dist/file-uploading/fileUploadingApi.js +0 -132
  46. package/dist/file-uploading/fileUploadingInterfaces.d.ts +0 -117
  47. package/dist/file-uploading/fileUploadingInterfaces.js +0 -2
  48. package/dist/file-uploading/fileUploadingSchemas.d.ts +0 -22
  49. package/dist/file-uploading/fileUploadingSchemas.js +0 -21
  50. package/dist/forms/formsApi.d.ts +0 -42
  51. package/dist/forms/formsApi.js +0 -57
  52. package/dist/forms/formsInterfaces.d.ts +0 -132
  53. package/dist/forms/formsInterfaces.js +0 -2
  54. package/dist/forms/formsSchemas.d.ts +0 -65
  55. package/dist/forms/formsSchemas.js +0 -36
  56. package/dist/forms-data/formsDataApi.d.ts +0 -106
  57. package/dist/forms-data/formsDataApi.js +0 -189
  58. package/dist/forms-data/formsDataInterfaces.d.ts +0 -525
  59. package/dist/forms-data/formsDataInterfaces.js +0 -2
  60. package/dist/forms-data/formsDataSchemas.d.ts +0 -115
  61. package/dist/forms-data/formsDataSchemas.js +0 -86
  62. package/dist/general-types/generalTypesApi.d.ts +0 -28
  63. package/dist/general-types/generalTypesApi.js +0 -38
  64. package/dist/general-types/generalTypesInterfaces.d.ts +0 -30
  65. package/dist/general-types/generalTypesInterfaces.js +0 -2
  66. package/dist/general-types/generalTypesSchemas.d.ts +0 -50
  67. package/dist/general-types/generalTypesSchemas.js +0 -35
  68. package/dist/index.d.ts +0 -94
  69. package/dist/index.js +0 -97
  70. package/dist/integration-collections/integrationCollectionsApi.d.ts +0 -173
  71. package/dist/integration-collections/integrationCollectionsApi.js +0 -220
  72. package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +0 -313
  73. package/dist/integration-collections/integrationCollectionsInterfaces.js +0 -2
  74. package/dist/integration-collections/integrationCollectionsSchemas.d.ts +0 -84
  75. package/dist/integration-collections/integrationCollectionsSchemas.js +0 -63
  76. package/dist/locales/localesApi.d.ts +0 -27
  77. package/dist/locales/localesApi.js +0 -37
  78. package/dist/locales/localesInterfaces.d.ts +0 -41
  79. package/dist/locales/localesInterfaces.js +0 -2
  80. package/dist/locales/localesSchemas.d.ts +0 -32
  81. package/dist/locales/localesSchemas.js +0 -26
  82. package/dist/menus/menusApi.d.ts +0 -29
  83. package/dist/menus/menusApi.js +0 -39
  84. package/dist/menus/menusInterfaces.d.ts +0 -88
  85. package/dist/menus/menusInterfaces.js +0 -4
  86. package/dist/menus/menusSchemas.d.ts +0 -16
  87. package/dist/menus/menusSchemas.js +0 -28
  88. package/dist/orders/ordersApi.d.ts +0 -126
  89. package/dist/orders/ordersApi.js +0 -169
  90. package/dist/orders/ordersInterfaces.d.ts +0 -427
  91. package/dist/orders/ordersInterfaces.js +0 -2
  92. package/dist/orders/ordersSchemas.d.ts +0 -158
  93. package/dist/orders/ordersSchemas.js +0 -120
  94. package/dist/pages/pagesApi.d.ts +0 -151
  95. package/dist/pages/pagesApi.js +0 -390
  96. package/dist/pages/pagesInterfaces.d.ts +0 -292
  97. package/dist/pages/pagesInterfaces.js +0 -2
  98. package/dist/pages/pagesSchemas.d.ts +0 -85
  99. package/dist/pages/pagesSchemas.js +0 -46
  100. package/dist/payments/paymentsApi.d.ts +0 -82
  101. package/dist/payments/paymentsApi.js +0 -121
  102. package/dist/payments/paymentsInterfaces.d.ts +0 -206
  103. package/dist/payments/paymentsInterfaces.js +0 -2
  104. package/dist/payments/paymentsSchemas.d.ts +0 -137
  105. package/dist/payments/paymentsSchemas.js +0 -78
  106. package/dist/product-statuses/productStatusesApi.d.ts +0 -47
  107. package/dist/product-statuses/productStatusesApi.js +0 -70
  108. package/dist/product-statuses/productStatusesInterfaces.d.ts +0 -66
  109. package/dist/product-statuses/productStatusesInterfaces.js +0 -2
  110. package/dist/product-statuses/productStatusesSchemas.d.ts +0 -34
  111. package/dist/product-statuses/productStatusesSchemas.js +0 -30
  112. package/dist/products/productsApi.d.ts +0 -365
  113. package/dist/products/productsApi.js +0 -464
  114. package/dist/products/productsInterfaces.d.ts +0 -583
  115. package/dist/products/productsInterfaces.js +0 -2
  116. package/dist/products/productsSchemas.d.ts +0 -212
  117. package/dist/products/productsSchemas.js +0 -85
  118. package/dist/system/systemApi.d.ts +0 -65
  119. package/dist/system/systemApi.js +0 -82
  120. package/dist/system/systemInterfaces.d.ts +0 -23
  121. package/dist/system/systemInterfaces.js +0 -2
  122. package/dist/templates/templatesApi.d.ts +0 -49
  123. package/dist/templates/templatesApi.js +0 -75
  124. package/dist/templates/templatesInterfaces.d.ts +0 -70
  125. package/dist/templates/templatesInterfaces.js +0 -2
  126. package/dist/templates/templatesSchemas.d.ts +0 -48
  127. package/dist/templates/templatesSchemas.js +0 -31
  128. package/dist/templates-preview/templatesPreviewApi.d.ts +0 -38
  129. package/dist/templates-preview/templatesPreviewApi.js +0 -53
  130. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +0 -121
  131. package/dist/templates-preview/templatesPreviewInterfaces.js +0 -2
  132. package/dist/templates-preview/templatesPreviewSchemas.d.ts +0 -83
  133. package/dist/templates-preview/templatesPreviewSchemas.js +0 -48
  134. package/dist/users/usersApi.d.ts +0 -143
  135. package/dist/users/usersApi.js +0 -174
  136. package/dist/users/usersInterfaces.d.ts +0 -235
  137. package/dist/users/usersInterfaces.js +0 -2
  138. package/dist/users/usersSchemas.d.ts +0 -38
  139. package/dist/users/usersSchemas.js +0 -28
  140. package/dist/web-socket/wsApi.d.ts +0 -25
  141. package/dist/web-socket/wsApi.js +0 -45
  142. package/dist/web-socket/wsInterfaces.d.ts +0 -17
  143. package/dist/web-socket/wsInterfaces.js +0 -2
@@ -1,154 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- /* eslint-disable jsdoc/reject-any-type */
4
- /* eslint-disable no-restricted-syntax */
5
- /* eslint-disable @typescript-eslint/no-explicit-any */
6
- /**
7
- * Result class for handling response data.
8
- * @description Result class for handling response data.
9
- */
10
- class Result {
11
- /**
12
- * Constructor that initializes the class with a given data.
13
- * @param {Response | string} data - Response or string data.
14
- * @description Constructor that initializes the class with a given data, which can be of type Response or string.
15
- */
16
- constructor(data) {
17
- this.body = data;
18
- }
19
- /**
20
- * Asynchronously converts the body to a blob and returns the current instance.
21
- * @returns {Promise<Result>} Current instance.
22
- * @description Asynchronously converts the body to a blob and returns the current instance.
23
- */
24
- async blob() {
25
- // Convert the body to a blob using the blob() method.
26
- this.body = await this.body.blob();
27
- return this;
28
- }
29
- /**
30
- * Asynchronously parses the body as JSON and returns the current instance.
31
- * @returns {Promise<Result>} Current instance.
32
- * @description Asynchronously parses the body as JSON and returns the current instance.
33
- */
34
- async json() {
35
- // Check if the body is a string, then parse it as JSON, otherwise call the json() method.
36
- this.body =
37
- (await typeof this.body) === 'string'
38
- ? JSON.parse(this.body)
39
- : this.body.json();
40
- return this;
41
- }
42
- /**
43
- * Recursively removes language-specific data from the provided data or the body.
44
- * @param {string} langCode - Language code.
45
- * @param {any} [data] - Data to process.
46
- * @returns {any} Processed data.
47
- * @description Recursively removes language-specific data from the provided data or the body.
48
- */
49
- makeDataWithoutLang(langCode, data) {
50
- if (data) {
51
- // If data is an array, recursively process each item.
52
- if (Array.isArray(data)) {
53
- return data.map((item) => this.makeDataWithoutLang(langCode, item));
54
- }
55
- else {
56
- // Iterate through each key in the data object.
57
- for (const key in data) {
58
- // If the value is an object containing the specified language code, replace it with the language-specific value.
59
- if (typeof data[key] === 'object' &&
60
- data[key] &&
61
- langCode in data[key]) {
62
- data[key] = data[key][langCode];
63
- }
64
- else if (typeof data[key] === 'object' && data[key] != null) {
65
- // If the value is an object, recursively process it.
66
- data[key] = this.makeDataWithoutLang(langCode, data[key]);
67
- }
68
- else if (Array.isArray(data[key])) {
69
- // If the value is an array, recursively process each item.
70
- data[key] = data.map((item) => this.makeDataWithoutLang(langCode, item));
71
- }
72
- }
73
- // Return the processed data.
74
- return data;
75
- }
76
- }
77
- else {
78
- // Process the body if no specific data is provided.
79
- if (Array.isArray(this.body)) {
80
- this.body = this.body.map((item) => this.makeDataWithoutLang(langCode, item));
81
- }
82
- else {
83
- // Iterate through each key in the body object.
84
- for (const key in this.body) {
85
- // Similar processing as above but applied to the body.
86
- if (typeof this.body[key] === 'object' &&
87
- this.body[key] &&
88
- langCode in this.body[key]) {
89
- this.body[key] = this.body[key][langCode];
90
- }
91
- else if (typeof this.body[key] === 'object' &&
92
- this.body[key] != null) {
93
- this.body[key] = this.makeDataWithoutLang(langCode, this.body[key]);
94
- }
95
- else if (Array.isArray(this.body[key])) {
96
- this.body[key] = this.body[key].map((item) => this.makeDataWithoutLang(langCode, item));
97
- }
98
- }
99
- }
100
- return this;
101
- }
102
- }
103
- /**
104
- * Recursively simplifies arrays in the provided data or the body by removing single-element arrays.
105
- * @param {any} data - The data to simplify.
106
- * @returns {any} The simplified data.
107
- */
108
- makeDataWithoutArray(data) {
109
- if (data) {
110
- // If data is an array, recursively process each item.
111
- if (Array.isArray(data)) {
112
- return data.map((item) => this.makeDataWithoutArray(item));
113
- }
114
- else {
115
- // Iterate through each key in the data object.
116
- for (const key in data) {
117
- // If the value is a single-element array, replace it with the element itself.
118
- if (Array.isArray(data[key]) && data[key].length === 1) {
119
- data[key] = data[key][0];
120
- }
121
- else if (typeof data[key] === 'object' &&
122
- data[key] &&
123
- !Array.isArray(data[key])) {
124
- // If the value is an object, recursively process it.
125
- data[key] = this.makeDataWithoutArray(data[key]);
126
- }
127
- }
128
- return data;
129
- }
130
- }
131
- else {
132
- // Process the body if no specific data is provided.
133
- if (Array.isArray(this.body)) {
134
- return this.body.map((item) => this.makeDataWithoutArray(item));
135
- }
136
- else {
137
- // Iterate through each key in the body object.
138
- for (const key in this.body) {
139
- // Similar processing as above but applied to the body.
140
- if (Array.isArray(this.body[key]) && this.body[key].length === 1) {
141
- this.body[key] = this.body[key][0];
142
- }
143
- else if (typeof this.body[key] === 'object' &&
144
- this.body[key] &&
145
- !Array.isArray(this.body[key])) {
146
- this.body[key] = this.makeDataWithoutArray(this.body[key]);
147
- }
148
- }
149
- return this;
150
- }
151
- }
152
- }
153
- }
154
- exports.default = Result;
@@ -1,41 +0,0 @@
1
- import type { IConfig, IError } from './utils';
2
- /**
3
- * State module for managing application state and configuration.
4
- * @description State module for managing application state and configuration.
5
- */
6
- export default class StateModule {
7
- url: string | undefined;
8
- lang: string | undefined;
9
- token: string | undefined;
10
- accessToken: string | undefined;
11
- traficLimit: boolean;
12
- refreshToken: string | undefined;
13
- providerMarker: string;
14
- customAuth: boolean;
15
- _NO_FETCH: boolean;
16
- _https: any;
17
- isShell: boolean;
18
- validationEnabled: boolean;
19
- validationStrictMode: boolean;
20
- validationLogErrors: boolean;
21
- rawData: boolean;
22
- errorsFunctions: {
23
- 400?: (data: IError) => any | null;
24
- 401?: (data: IError) => any | null;
25
- 403?: (data: IError) => any | null;
26
- 404?: (data: IError) => any | null;
27
- 429?: (data: IError) => any | null;
28
- 500?: (data: IError) => any | null;
29
- 502?: (data: IError) => any | null;
30
- 503?: (data: IError) => any | null;
31
- 504?: (data: IError) => any | null;
32
- };
33
- saveFunction: (param: string) => void | null;
34
- /**
35
- * Constructor for StateModule
36
- * @param {string} url - Base URL for API requests.
37
- * @param {IConfig} config - Configuration object.
38
- * @description Constructor for StateModule.
39
- */
40
- constructor(url: string, config: IConfig);
41
- }
@@ -1,128 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- /**
37
- * State module for managing application state and configuration.
38
- * @description State module for managing application state and configuration.
39
- */
40
- class StateModule {
41
- /**
42
- * Constructor for StateModule
43
- * @param {string} url - Base URL for API requests.
44
- * @param {IConfig} config - Configuration object.
45
- * @description Constructor for StateModule.
46
- */
47
- constructor(url, config) {
48
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
49
- this.url = url;
50
- this.lang = (_a = config.langCode) !== null && _a !== void 0 ? _a : 'en_US';
51
- this.token = config.token;
52
- this.traficLimit = config.traficLimit || false;
53
- this.validationEnabled = (_c = (_b = config.validation) === null || _b === void 0 ? void 0 : _b.enabled) !== null && _c !== void 0 ? _c : false;
54
- this.validationStrictMode = (_e = (_d = config.validation) === null || _d === void 0 ? void 0 : _d.strictMode) !== null && _e !== void 0 ? _e : false;
55
- this.validationLogErrors = (_g = (_f = config.validation) === null || _f === void 0 ? void 0 : _f.logErrors) !== null && _g !== void 0 ? _g : true;
56
- this.rawData = (_h = config.rawData) !== null && _h !== void 0 ? _h : false;
57
- this.refreshToken = (_k = (_j = config.auth) === null || _j === void 0 ? void 0 : _j.refreshToken) !== null && _k !== void 0 ? _k : undefined;
58
- this.providerMarker = (_m = (_l = config.auth) === null || _l === void 0 ? void 0 : _l.providerMarker) !== null && _m !== void 0 ? _m : 'email';
59
- this.customAuth = (_p = (_o = config.auth) === null || _o === void 0 ? void 0 : _o.customAuth) !== null && _p !== void 0 ? _p : false;
60
- this.errorsFunctions = {
61
- '400': undefined,
62
- '401': undefined,
63
- '403': undefined,
64
- '404': undefined,
65
- '429': undefined,
66
- '500': undefined,
67
- '502': undefined,
68
- '503': undefined,
69
- '504': undefined,
70
- };
71
- this.saveFunction = (_r = (_q = config.auth) === null || _q === void 0 ? void 0 : _q.saveFunction) !== null && _r !== void 0 ? _r : null;
72
- if (config.errors) {
73
- this.isShell = (_s = config.errors.isShell) !== null && _s !== void 0 ? _s : true;
74
- if (config.errors.customErrors) {
75
- this.errorsFunctions['400'] =
76
- (_t = config.errors.customErrors['400']) !== null && _t !== void 0 ? _t : undefined;
77
- this.errorsFunctions['401'] =
78
- (_u = config.errors.customErrors['401']) !== null && _u !== void 0 ? _u : undefined;
79
- this.errorsFunctions['403'] =
80
- (_v = config.errors.customErrors['403']) !== null && _v !== void 0 ? _v : undefined;
81
- this.errorsFunctions['404'] =
82
- (_w = config.errors.customErrors['404']) !== null && _w !== void 0 ? _w : undefined;
83
- this.errorsFunctions['429'] =
84
- (_x = config.errors.customErrors['429']) !== null && _x !== void 0 ? _x : undefined;
85
- this.errorsFunctions['500'] =
86
- (_y = config.errors.customErrors['500']) !== null && _y !== void 0 ? _y : undefined;
87
- this.errorsFunctions['502'] =
88
- (_z = config.errors.customErrors['502']) !== null && _z !== void 0 ? _z : undefined;
89
- this.errorsFunctions['503'] =
90
- (_0 = config.errors.customErrors['503']) !== null && _0 !== void 0 ? _0 : undefined;
91
- this.errorsFunctions['504'] =
92
- (_1 = config.errors.customErrors['504']) !== null && _1 !== void 0 ? _1 : undefined;
93
- }
94
- }
95
- else {
96
- this.isShell = false;
97
- }
98
- try {
99
- if (typeof process === 'object' &&
100
- +process.versions.node.split('.')[0] < 18) {
101
- try {
102
- this._NO_FETCH = true;
103
- // Dynamically import https for older Node.js versions
104
- Promise.resolve().then(() => __importStar(require('https'))).then((https) => {
105
- this._https = https;
106
- })
107
- .catch(() => {
108
- this._https = null;
109
- });
110
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
111
- }
112
- catch (e) {
113
- this._https = null;
114
- }
115
- }
116
- else {
117
- this._NO_FETCH = false;
118
- this._https = null;
119
- }
120
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
121
- }
122
- catch (e) {
123
- this._NO_FETCH = false;
124
- this._https = null;
125
- }
126
- }
127
- }
128
- exports.default = StateModule;
@@ -1,148 +0,0 @@
1
- import type { IUploadingQuery } from '../file-uploading/fileUploadingInterfaces';
2
- import type { IProductsQuery } from '../products/productsInterfaces';
3
- import type StateModule from './stateModule';
4
- /**
5
- * Abstract class representing synchronization modules.
6
- */
7
- export default abstract class SyncModules {
8
- /** Protected properties for state and URL */
9
- protected state: StateModule;
10
- protected _url: string;
11
- /**
12
- * Constructor to initialize state and URL.
13
- * @param {StateModule} state - StateModule instance.
14
- */
15
- protected constructor(state: StateModule);
16
- /**
17
- * Constructs the full URL path by appending the given path to the base URL.
18
- * @param {string} path - The path to append to the base URL.
19
- * @returns {string} The full URL as a string.
20
- */
21
- protected _getFullPath(path: string): string;
22
- /**
23
- * Converts query parameters into a query string.
24
- * @param {IProductsQuery | IUploadingQuery | any} query - The query object containing key-value pairs.
25
- * @returns {string} A string representation of the query parameters.
26
- */
27
- protected _queryParamsToString(query: IProductsQuery | IUploadingQuery | any): string;
28
- /**
29
- * Normalizes data based on language code.
30
- * @param {any} data - The data to normalize.
31
- * @param {string} langCode - The language code for normalization.
32
- * @returns {any} Normalized data.
33
- */
34
- protected _normalizeData(data: any, langCode?: string): any;
35
- /**
36
- * Normalizes the body of a POST request.
37
- * @param {any} body - The body to normalize.
38
- * @param {string} [langCode] - The language code for normalization.
39
- * @returns {any} Normalized body.
40
- */
41
- protected _normalizePostBody(body: any, langCode?: string): any;
42
- /**
43
- * Clears arrays within the data structure.
44
- * @param {Record<string, any>} data - The data to clear.
45
- * @returns {any} Cleared data.
46
- */
47
- protected _clearArray(data: Record<string, any>): any;
48
- /**
49
- * Sorts attributes by their positions.
50
- * @param {any} data - The data containing attributes.
51
- * @returns {any} Sorted attributes.
52
- */
53
- protected _sortAttributes: (data: any) => any;
54
- /**
55
- * Adds a specified number of days to a date.
56
- * @param {Date} date - The initial date.
57
- * @param {number} days - The number of days to add.
58
- * @returns {any} The new date with added days.
59
- */
60
- protected _addDays(date: Date, days: number): any;
61
- /**
62
- * Common logic for processing schedule dates (weekly, monthly, or both).
63
- * @param {Date} date - The date for which to process intervals.
64
- * @param {object} config - Configuration for schedule repetition.
65
- * @param {boolean} config.inEveryWeek - Whether to repeat weekly.
66
- * @param {boolean} config.inEveryMonth - Whether to repeat monthly.
67
- * @param {Function} processDate - Callback function to process each date.
68
- */
69
- protected _processScheduleDates(date: Date, config: {
70
- inEveryWeek: boolean;
71
- inEveryMonth: boolean;
72
- }, processDate: (currentDate: Date) => void): void;
73
- /**
74
- * Generates intervals for a specific date based on a schedule.
75
- * @param {Date} date - The date for which to generate intervals.
76
- * @param {object} schedule - The schedule defining the intervals.
77
- * @param {boolean} schedule.inEveryWeek - The number of weeks between intervals.
78
- * @param {any[]} schedule.times - The times for each interval.
79
- * @param {boolean} schedule.inEveryMonth - The month intervals for each interval.
80
- * @param {Set<Array<string>>} utcIntervals - A set to store unique intervals.
81
- */
82
- protected _generateIntervalsForDate(date: Date, schedule: {
83
- inEveryWeek: boolean;
84
- times: any[];
85
- inEveryMonth: boolean;
86
- }, utcIntervals: Set<Array<string>>): void;
87
- /**
88
- * Adds time intervals to schedules.
89
- * @param {any[]} schedules - The schedules to process.
90
- * @returns {any} Schedules with added time intervals.
91
- */
92
- _addTimeIntervalsToSchedules(schedules: any[]): any;
93
- /**
94
- * Generates intervals for a specific date for form schedules.
95
- * @param {Date} date - The date for which to generate intervals.
96
- * @param {object} interval - The interval configuration.
97
- * @param {boolean} interval.inEveryWeek - Indicates whether the schedule is weekly.
98
- * @param {boolean} interval.inEveryMonth - Indicates whether the schedule is monthly.
99
- * @param {any[]} timeIntervals - The time intervals to process.
100
- * @param {Set<Array<string>>} utcIntervals - A set to store unique intervals.
101
- */
102
- protected _generateIntervalsForFormDate(date: Date, interval: {
103
- inEveryWeek: boolean;
104
- inEveryMonth: boolean;
105
- }, timeIntervals: any[], utcIntervals: Set<Array<string>>): void;
106
- /**
107
- * Adds time intervals to form schedules (different structure).
108
- * @param {any[]} intervals - The intervals to process.
109
- * @returns {any} Intervals with added time intervals.
110
- */
111
- _addTimeIntervalsToFormSchedules(intervals: any[]): any;
112
- /**
113
- * Transforms additionalFields from array to object keyed by marker.
114
- * Skipped when rawData is enabled in config.
115
- * @param {any} attr - The attribute object that may contain additionalFields.
116
- */
117
- private _normalizeAdditionalFields;
118
- /**
119
- * Normalizes attributes within the data.
120
- * @param {any} data - The data to normalize.
121
- * @returns {any} Normalized attributes.
122
- */
123
- protected _normalizeAttr(data: any): any;
124
- /**
125
- * Processes data after fetching or receiving it.
126
- * @param {any} data - The data to process.
127
- * @param {any} [langCode] - The language code for processing.
128
- * @returns {any} Processed data.
129
- */
130
- protected _dataPostProcess(data: any, langCode?: string): any;
131
- /**
132
- * Sets the access token in the state.
133
- * @param {string} accessToken - The access token to set.
134
- * @returns {any} The instance of SyncModules for chaining.
135
- */
136
- setAccessToken(accessToken: string): any;
137
- /**
138
- * Sets the refresh token in the state.
139
- * @param {string} refreshToken - The refresh token to set.
140
- * @returns {any} The instance of SyncModules for chaining.
141
- */
142
- setRefreshToken(refreshToken: string): any;
143
- /**
144
- * Get deviceMetadata
145
- * @returns {string} - Returns an object containing device metadata.
146
- */
147
- protected _getDeviceMetadata(): string;
148
- }