oneentry 1.0.128 → 1.0.131

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 (64) hide show
  1. package/README.md +3 -0
  2. package/dist/admins/adminsApi.d.ts +8 -8
  3. package/dist/admins/adminsApi.js +8 -8
  4. package/dist/admins/adminsInterfaces.d.ts +16 -15
  5. package/dist/attribute-sets/attributeSetsApi.d.ts +0 -4
  6. package/dist/attribute-sets/attributeSetsApi.js +0 -4
  7. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +42 -32
  8. package/dist/auth-provider/authProviderApi.d.ts +19 -10
  9. package/dist/auth-provider/authProviderApi.js +19 -10
  10. package/dist/auth-provider/authProvidersInterfaces.d.ts +28 -12
  11. package/dist/base/asyncModules.js +13 -6
  12. package/dist/base/result.d.ts +9 -9
  13. package/dist/base/result.js +10 -10
  14. package/dist/base/stateModule.d.ts +6 -5
  15. package/dist/base/stateModule.js +15 -14
  16. package/dist/base/syncModules.d.ts +10 -5
  17. package/dist/base/syncModules.js +14 -7
  18. package/dist/base/utils.d.ts +34 -11
  19. package/dist/blocks/blocksApi.d.ts +0 -4
  20. package/dist/blocks/blocksApi.js +0 -4
  21. package/dist/config.d.ts +1 -1
  22. package/dist/config.js +3 -1
  23. package/dist/events/eventsApi.d.ts +6 -3
  24. package/dist/events/eventsApi.js +6 -3
  25. package/dist/events/eventsInterfaces.d.ts +2 -1
  26. package/dist/file-uploading/fileUploadingApi.d.ts +12 -6
  27. package/dist/file-uploading/fileUploadingApi.js +12 -6
  28. package/dist/file-uploading/fileUploadingInterfaces.d.ts +10 -5
  29. package/dist/forms/formsApi.d.ts +4 -2
  30. package/dist/forms/formsApi.js +4 -2
  31. package/dist/forms/formsInterfaces.d.ts +2 -1
  32. package/dist/forms-data/formsDataApi.d.ts +28 -6
  33. package/dist/forms-data/formsDataApi.js +28 -6
  34. package/dist/forms-data/formsDataInterfaces.d.ts +64 -22
  35. package/dist/general-types/generalTypesInterfaces.d.ts +2 -2
  36. package/dist/index.d.ts +1 -0
  37. package/dist/index.js +1 -0
  38. package/dist/integration-collections/integrationCollectionsApi.d.ts +10 -5
  39. package/dist/integration-collections/integrationCollectionsApi.js +10 -5
  40. package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +20 -10
  41. package/dist/menus/menusInterfaces.d.ts +8 -4
  42. package/dist/orders/ordersApi.d.ts +16 -8
  43. package/dist/orders/ordersApi.js +16 -8
  44. package/dist/orders/ordersInterfaces.d.ts +39 -18
  45. package/dist/pages/pagesApi.d.ts +2 -1
  46. package/dist/pages/pagesApi.js +2 -1
  47. package/dist/pages/pagesInterfaces.d.ts +10 -5
  48. package/dist/payments/paymentsApi.d.ts +20 -12
  49. package/dist/payments/paymentsApi.js +20 -12
  50. package/dist/payments/paymentsInterfaces.d.ts +28 -9
  51. package/dist/product-statuses/productStatusesInterfaces.d.ts +5 -4
  52. package/dist/products/productsApi.d.ts +28 -15
  53. package/dist/products/productsApi.js +28 -15
  54. package/dist/products/productsInterfaces.d.ts +33 -18
  55. package/dist/system/systemApi.d.ts +2 -1
  56. package/dist/system/systemApi.js +2 -1
  57. package/dist/templates/templatesInterfaces.d.ts +3 -2
  58. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +8 -4
  59. package/dist/users/usersApi.d.ts +14 -7
  60. package/dist/users/usersApi.js +14 -7
  61. package/dist/users/usersInterfaces.d.ts +23 -11
  62. package/dist/web-socket/wsApi.d.ts +2 -1
  63. package/dist/web-socket/wsApi.js +2 -1
  64. package/package.json +9 -8
@@ -14,15 +14,17 @@ export default class FileUploadingApi extends AsyncModules implements IFileUploa
14
14
  protected state: StateModule;
15
15
  protected _url: string;
16
16
  /**
17
- *
17
+ * Constructs a new instance of the FileUploadingApi class.
18
18
  */
19
19
  constructor(state: StateModule);
20
+ /** FileUploadingApi class */
20
21
  private _defaultQuery;
21
22
  /**
22
23
  * Upload file function.
23
24
  * @handleName upload
24
25
  * @param {File | Blob} file - File to upload. Example: `new File(["content"], "file.png", {"type": "image/png"})`
25
- * @param {IUploadingQuery} [fileQuery] - Optional set query parameters. Example:
26
+ * @param {IUploadingQuery} [fileQuery] - Optional set query parameters.
27
+ * @example
26
28
  {
27
29
  "type": "page",
28
30
  "entity": "editor",
@@ -41,14 +43,16 @@ export default class FileUploadingApi extends AsyncModules implements IFileUploa
41
43
  * @param {any} [fileQuery.template] - preview template identifier. Example: 1.
42
44
  * @returns {IUploadingReturn[]} Uploads a file to an Amazon S3-compatible cloud file storage.
43
45
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
44
- * @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.
46
+ * @description This method requires user authorization.
47
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
45
48
  */
46
49
  upload(file: File | Blob, fileQuery?: IUploadingQuery): Promise<IUploadingReturn[] | IError>;
47
50
  /**
48
51
  * Deletes a file from the cloud file storage.
49
52
  * @handleName delete
50
53
  * @param {string} filename - File name. Example: "file.png".
51
- * @param {IUploadingQuery} [fileQuery] - Optional set query parameters. Example:
54
+ * @param {IUploadingQuery} [fileQuery] - Optional set query parameters.
55
+ * @example
52
56
  {
53
57
  "type": "page",
54
58
  "entity": "editor",
@@ -61,7 +65,8 @@ export default class FileUploadingApi extends AsyncModules implements IFileUploa
61
65
  * @param {number} [fileQuery.template] - preview template identifier. Example: 1.
62
66
  * @returns {any} Returns a promise that resolves to the result of the deletion operation or an error object if there was an issue.
63
67
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
64
- * @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.
68
+ * @description This method requires user authorization.
69
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
65
70
  */
66
71
  delete(filename: string, fileQuery?: IUploadingQuery): Promise<any | IError>;
67
72
  /**
@@ -74,7 +79,8 @@ export default class FileUploadingApi extends AsyncModules implements IFileUploa
74
79
  * @param {string} [template] - Preview template identifier. Example: 1.
75
80
  * @returns {any} Returns a promise that resolves to a Blob object containing the file data or an error object if there was an issue.
76
81
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
77
- * @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.
82
+ * @description This method requires user authorization.
83
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
78
84
  */
79
85
  getFile(id: number, type: string, entity: string, filename: string, template?: string): Promise<any | IError>;
80
86
  }
@@ -16,10 +16,11 @@ const asyncModules_1 = __importDefault(require("../base/asyncModules"));
16
16
  */
17
17
  class FileUploadingApi extends asyncModules_1.default {
18
18
  /**
19
- *
19
+ * Constructs a new instance of the FileUploadingApi class.
20
20
  */
21
21
  constructor(state) {
22
22
  super(state);
23
+ /** FileUploadingApi class */
23
24
  this._defaultQuery = {
24
25
  type: null,
25
26
  entity: null,
@@ -34,7 +35,8 @@ class FileUploadingApi extends asyncModules_1.default {
34
35
  * Upload file function.
35
36
  * @handleName upload
36
37
  * @param {File | Blob} file - File to upload. Example: `new File(["content"], "file.png", {"type": "image/png"})`
37
- * @param {IUploadingQuery} [fileQuery] - Optional set query parameters. Example:
38
+ * @param {IUploadingQuery} [fileQuery] - Optional set query parameters.
39
+ * @example
38
40
  {
39
41
  "type": "page",
40
42
  "entity": "editor",
@@ -53,7 +55,8 @@ class FileUploadingApi extends asyncModules_1.default {
53
55
  * @param {any} [fileQuery.template] - preview template identifier. Example: 1.
54
56
  * @returns {IUploadingReturn[]} Uploads a file to an Amazon S3-compatible cloud file storage.
55
57
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
56
- * @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
58
+ * @description This method requires user authorization.
59
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
57
60
  */
58
61
  async upload(file, fileQuery) {
59
62
  const query = { ...this._defaultQuery, ...fileQuery };
@@ -66,7 +69,8 @@ class FileUploadingApi extends asyncModules_1.default {
66
69
  * Deletes a file from the cloud file storage.
67
70
  * @handleName delete
68
71
  * @param {string} filename - File name. Example: "file.png".
69
- * @param {IUploadingQuery} [fileQuery] - Optional set query parameters. Example:
72
+ * @param {IUploadingQuery} [fileQuery] - Optional set query parameters.
73
+ * @example
70
74
  {
71
75
  "type": "page",
72
76
  "entity": "editor",
@@ -79,7 +83,8 @@ class FileUploadingApi extends asyncModules_1.default {
79
83
  * @param {number} [fileQuery.template] - preview template identifier. Example: 1.
80
84
  * @returns {any} Returns a promise that resolves to the result of the deletion operation or an error object if there was an issue.
81
85
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
82
- * @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
86
+ * @description This method requires user authorization.
87
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
83
88
  */
84
89
  async delete(filename, fileQuery) {
85
90
  const query = { ...this._defaultQuery, ...fileQuery };
@@ -96,7 +101,8 @@ class FileUploadingApi extends asyncModules_1.default {
96
101
  * @param {string} [template] - Preview template identifier. Example: 1.
97
102
  * @returns {any} Returns a promise that resolves to a Blob object containing the file data or an error object if there was an issue.
98
103
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
99
- * @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
104
+ * @description This method requires user authorization.
105
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
100
106
  */
101
107
  async getFile(id, type, entity, filename, template) {
102
108
  // eslint-disable-next-line no-undef
@@ -12,7 +12,8 @@ interface IFileUploading {
12
12
  * Upload file function.
13
13
  * @handleName upload
14
14
  * @param {File | Blob} file - File to upload. Example: `new File(["content"], "file.png", {"type": "image/png"})`
15
- * @param {IUploadingQuery} [fileQuery] - Optional set query parameters. Example:
15
+ * @param {IUploadingQuery} [fileQuery] - Optional set query parameters.
16
+ * @example
16
17
  {
17
18
  "type": "page",
18
19
  "entity": "editor",
@@ -31,14 +32,16 @@ interface IFileUploading {
31
32
  * @param {any} [fileQuery.template] - preview template identifier. Example: 1.
32
33
  * @returns {IUploadingReturn[]} Uploads a file to an Amazon S3-compatible cloud file storage.
33
34
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
34
- * @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.
35
+ * @description This method requires user authorization.
36
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
35
37
  */
36
38
  upload(file: File | Blob, fileQuery?: IUploadingQuery): Promise<IUploadingReturn[] | IError>;
37
39
  /**
38
40
  * Deletes a file from the cloud file storage.
39
41
  * @handleName delete
40
42
  * @param {string} [filename] - File name. Example: "file.png".
41
- * @param {IUploadingQuery} [fileQuery] - Optional set query parameters. Example:
43
+ * @param {IUploadingQuery} [fileQuery] - Optional set query parameters.
44
+ * @example
42
45
  {
43
46
  "type": "page",
44
47
  "entity": "editor",
@@ -51,7 +54,8 @@ interface IFileUploading {
51
54
  * @param {number} [fileQuery.template] - preview template identifier. Example: 1.
52
55
  * @returns {any} Returns a promise that resolves to the result of the deletion operation or an error object if there was an issue.
53
56
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
54
- * @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.
57
+ * @description This method requires user authorization.
58
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
55
59
  */
56
60
  delete(filename: string, fileQuery?: IUploadingQuery): Promise<any | IError>;
57
61
  /**
@@ -63,7 +67,8 @@ interface IFileUploading {
63
67
  * @param {string} [filename] - Optional filename to retrieve. Example: "file.png".
64
68
  * @returns {Blob} A promise that resolves to a Blob object or an error.
65
69
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
66
- * @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.
70
+ * @description This method requires user authorization.
71
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
67
72
  */
68
73
  getFile(id: number, type: string, entity: string, filename?: string): Promise<any | IError>;
69
74
  }
@@ -28,7 +28,8 @@ export default class FormsApi extends AsyncModules implements IForms {
28
28
  * @param {number} [limit] - Parameter for pagination. Default: 30.
29
29
  * @returns {IFormsEntity[]} Returns array for all objects of type FormEntity.
30
30
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
31
- * @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.
31
+ * @description This method requires user authorization.
32
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
32
33
  */
33
34
  getAllForms(langCode?: string, offset?: number, limit?: number): Promise<IFormsEntity[] | IError>;
34
35
  /**
@@ -38,7 +39,8 @@ export default class FormsApi extends AsyncModules implements IForms {
38
39
  * @param {string} [langCode] - Language code. Default: "en_US".
39
40
  * @returns {IFormsEntity} Returns object of type FormEntity.
40
41
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
41
- * @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.
42
+ * @description This method requires user authorization.
43
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
42
44
  */
43
45
  getFormByMarker(marker: string, langCode?: string): Promise<IFormsEntity | IError>;
44
46
  }
@@ -31,7 +31,8 @@ class FormsApi extends asyncModules_1.default {
31
31
  * @param {number} [limit] - Parameter for pagination. Default: 30.
32
32
  * @returns {IFormsEntity[]} Returns array for all objects of type FormEntity.
33
33
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
34
- * @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.
34
+ * @description This method requires user authorization.
35
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
35
36
  */
36
37
  async getAllForms(langCode = this.state.lang, offset = 0, limit = 30) {
37
38
  const result = await this._fetchGet(`?langCode=${langCode}&offset=${offset}&limit=${limit}`);
@@ -44,7 +45,8 @@ class FormsApi extends asyncModules_1.default {
44
45
  * @param {string} [langCode] - Language code. Default: "en_US".
45
46
  * @returns {IFormsEntity} Returns object of type FormEntity.
46
47
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
47
- * @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
48
+ * @description This method requires user authorization.
49
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
48
50
  */
49
51
  async getFormByMarker(marker, langCode = this.state.lang) {
50
52
  const result = await this._fetchGet(`/marker/${marker}?langCode=${langCode}`);
@@ -37,7 +37,8 @@ interface IForms {
37
37
  * @property {number} pageId - The identifier of the page. Example: 12.
38
38
  * @property {number} formId - The identifier of the form. Example: 321.
39
39
  * @property {number} positionId - The identifier of the position. Example: 1.
40
- * @property {IPosition} position - The position object. Example:
40
+ * @property {IPosition} position - The position object.
41
+ * @example
41
42
  {
42
43
  "id": 1,
43
44
  "position": 1,
@@ -25,13 +25,15 @@ export default class FormsDataApi extends AsyncModules implements IFormsData {
25
25
  * @param {number} [limit] - Parameter for pagination. Default: 30.
26
26
  * @returns {IFormsDataEntity} Returns an object containing all forms data or an error object if there was an issue.
27
27
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
28
- * @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.
28
+ * @description This method requires user authorization.
29
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
29
30
  */
30
31
  getFormsData(langCode?: string, offset?: number, limit?: number): Promise<IFormsDataEntity | IError>;
31
32
  /**
32
33
  * Creating an object of data save information by form
33
34
  * @handleName postFormsData
34
- * @param {IBodyPostFormData} body - Request body. Example:
35
+ * @param {IBodyPostFormData} body - Request body.
36
+ * @example
35
37
  {
36
38
  "formIdentifier": "test-form",
37
39
  "formModuleConfigId": 2,
@@ -46,10 +48,28 @@ export default class FormsDataApi extends AsyncModules implements IFormsData {
46
48
  }
47
49
  ]
48
50
  }
51
+ * @param {string} body.formIdentifier - The identifier for the form. Example: "form".
52
+ * @param {number} body.formModuleConfigId - The ID of the form module configuration. Example: 2.
53
+ * @param {string} body.moduleEntityIdentifier - The identifier of the module entity. Example: "form".
54
+ * @param {string | null} [body.replayTo] - The email address to which the reply should be sent.
55
+ * @param {string | null} [body.status] - The status of the form submission.
56
+ * @param {FormDataType[]} body.formData - Form data.
57
+ * @example
58
+ [
59
+ {
60
+ "marker": "name",
61
+ "type": "string",
62
+ "value": "Jack"
63
+ }
64
+ ]
65
+ * @param {string} body.formData[].marker - The marker identifying the form field. Example: "name".
66
+ * @param {string} body.formData[].type - The type of the form field. Example: "string".
67
+ * @param {string} body.formData[].value - The value of the form field. Example: "Jack".
49
68
  * @param {string} [langCode] - Language code. Default: "en_US".
50
- * @returns {IPostFormResponse} Returns an object containing the created form data entry or an error object if there was an issue.
69
+ * @returns {IPostFormResponse} Returns an object containing the created form data entry and message.
51
70
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
52
- * @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.
71
+ * @description This method requires user authorization.
72
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
53
73
  */
54
74
  postFormsData(body: IBodyPostFormData, langCode?: string): Promise<IPostFormResponse | IError>;
55
75
  /**
@@ -57,7 +77,8 @@ export default class FormsDataApi extends AsyncModules implements IFormsData {
57
77
  * @handleName getFormsDataByMarker
58
78
  * @param {string} marker - Marker of the form. Example: "contact_form".
59
79
  * @param {number} formModuleConfigId - Form module configuration ID. Example: 4.
60
- * @param {object} [body] - Request body. Example:
80
+ * @param {object} [body] - Request body.
81
+ * @example
61
82
  {
62
83
  "entityIdentifier": "test",
63
84
  "userIdentifier": "",
@@ -71,7 +92,8 @@ export default class FormsDataApi extends AsyncModules implements IFormsData {
71
92
  * @param {number} [limit] - Parameter for pagination. Default: 30.
72
93
  * @returns {IFormsByMarkerDataEntity} Returns an object containing the form data or an error object if there was an issue.
73
94
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
74
- * @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.
95
+ * @description This method requires user authorization.
96
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
75
97
  */
76
98
  getFormsDataByMarker(marker: string, formModuleConfigId: number, body?: object, isNested?: number, langCode?: string, offset?: number, limit?: number): Promise<IFormsByMarkerDataEntity | IError>;
77
99
  }
@@ -31,7 +31,8 @@ class FormsDataApi extends asyncModules_1.default {
31
31
  * @param {number} [limit] - Parameter for pagination. Default: 30.
32
32
  * @returns {IFormsDataEntity} Returns an object containing all forms data or an error object if there was an issue.
33
33
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
34
- * @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.
34
+ * @description This method requires user authorization.
35
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
35
36
  */
36
37
  async getFormsData(langCode = this.state.lang, offset = 0, limit = 30) {
37
38
  const result = await this._fetchGet(`?langCode=${langCode}&offset=${offset}&limit=${limit}`);
@@ -40,7 +41,8 @@ class FormsDataApi extends asyncModules_1.default {
40
41
  /**
41
42
  * Creating an object of data save information by form
42
43
  * @handleName postFormsData
43
- * @param {IBodyPostFormData} body - Request body. Example:
44
+ * @param {IBodyPostFormData} body - Request body.
45
+ * @example
44
46
  {
45
47
  "formIdentifier": "test-form",
46
48
  "formModuleConfigId": 2,
@@ -55,10 +57,28 @@ class FormsDataApi extends asyncModules_1.default {
55
57
  }
56
58
  ]
57
59
  }
60
+ * @param {string} body.formIdentifier - The identifier for the form. Example: "form".
61
+ * @param {number} body.formModuleConfigId - The ID of the form module configuration. Example: 2.
62
+ * @param {string} body.moduleEntityIdentifier - The identifier of the module entity. Example: "form".
63
+ * @param {string | null} [body.replayTo] - The email address to which the reply should be sent.
64
+ * @param {string | null} [body.status] - The status of the form submission.
65
+ * @param {FormDataType[]} body.formData - Form data.
66
+ * @example
67
+ [
68
+ {
69
+ "marker": "name",
70
+ "type": "string",
71
+ "value": "Jack"
72
+ }
73
+ ]
74
+ * @param {string} body.formData[].marker - The marker identifying the form field. Example: "name".
75
+ * @param {string} body.formData[].type - The type of the form field. Example: "string".
76
+ * @param {string} body.formData[].value - The value of the form field. Example: "Jack".
58
77
  * @param {string} [langCode] - Language code. Default: "en_US".
59
- * @returns {IPostFormResponse} Returns an object containing the created form data entry or an error object if there was an issue.
78
+ * @returns {IPostFormResponse} Returns an object containing the created form data entry and message.
60
79
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
61
- * @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.
80
+ * @description This method requires user authorization.
81
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
62
82
  */
63
83
  async postFormsData(body, langCode = this.state.lang) {
64
84
  const formData = {};
@@ -118,7 +138,8 @@ class FormsDataApi extends asyncModules_1.default {
118
138
  * @handleName getFormsDataByMarker
119
139
  * @param {string} marker - Marker of the form. Example: "contact_form".
120
140
  * @param {number} formModuleConfigId - Form module configuration ID. Example: 4.
121
- * @param {object} [body] - Request body. Example:
141
+ * @param {object} [body] - Request body.
142
+ * @example
122
143
  {
123
144
  "entityIdentifier": "test",
124
145
  "userIdentifier": "",
@@ -132,7 +153,8 @@ class FormsDataApi extends asyncModules_1.default {
132
153
  * @param {number} [limit] - Parameter for pagination. Default: 30.
133
154
  * @returns {IFormsByMarkerDataEntity} Returns an object containing the form data or an error object if there was an issue.
134
155
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
135
- * @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.
156
+ * @description This method requires user authorization.
157
+ * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
136
158
  */
137
159
  async getFormsDataByMarker(marker, formModuleConfigId, body = {}, isNested = 1, langCode = this.state.lang, offset = 0, limit = 30) {
138
160
  const result = await this._fetchPost(`/marker/${marker}?formModuleConfigId=${formModuleConfigId}&isNested=${isNested}&langCode=${langCode}&offset=${offset}&limit=${limit}`, body);
@@ -23,19 +23,29 @@ interface IFormsData {
23
23
  /**
24
24
  * Creating an object of data save information by form
25
25
  * @handleName postFormsData
26
- * @param {IBodyPostFormData} body - Request body. Example
26
+ * @param {IBodyPostFormData} body - Request body.
27
+ * @example
27
28
  {
28
- "formIdentifier": "form",
29
+ "formIdentifier": "test-form",
30
+ "formModuleConfigId": 2,
31
+ "moduleEntityIdentifier": "blog",
32
+ "replayTo": null,
33
+ "status": "sent",
29
34
  "formData": [
30
35
  {
31
- "marker": "name",
32
- "type": "string",
33
- "value": "Jack"
36
+ "marker": "name",
37
+ "type": "string",
38
+ "value": "Test"
34
39
  }
35
40
  ]
36
41
  }
37
42
  * @param {string} body.formIdentifier - The identifier for the form. Example: "form".
38
- * @param {FormDataType[]} body.formData - Form data. Example:
43
+ * @param {number} body.formModuleConfigId - The ID of the form module configuration. Example: 2.
44
+ * @param {string} body.moduleEntityIdentifier - The identifier of the module entity. Example: "form".
45
+ * @param {string | null} [body.replayTo] - The email address to which the reply should be sent.
46
+ * @param {string | null} [body.status] - The status of the form submission.
47
+ * @param {FormDataType[]} body.formData - Form data.
48
+ * @example
39
49
  [
40
50
  {
41
51
  "marker": "name",
@@ -49,7 +59,6 @@ interface IFormsData {
49
59
  * @param {string} [langCode] - Language code. Default: "en_US".
50
60
  * @returns {IPostFormResponse} Returns an object containing the created form data entry and message.
51
61
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
52
- * @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.
53
62
  */
54
63
  postFormsData(body: IBodyPostFormData, langCode?: string): Promise<IPostFormResponse | IError>;
55
64
  /**
@@ -57,7 +66,8 @@ interface IFormsData {
57
66
  * @handleName getFormsDataByMarker
58
67
  * @param {string} marker - The marker identifying the form data. Example: "contact_form_data".
59
68
  * @param {number} formModuleConfigId - The form module configuration ID. Example: 4.
60
- * @param {object} [body] - Request body. Default: {}. Example:
69
+ * @param {object} [body] - Request body. Default: {}.
70
+ * @example
61
71
  {
62
72
  "entityIdentifier": "test",
63
73
  "userIdentifier": "",
@@ -81,7 +91,8 @@ interface IFormsData {
81
91
  * @property {number} id - The unique identifier of the form page. Example: 12345.
82
92
  * @property {string} formIdentifier - The identifier of the page. Example: "contact_form".
83
93
  * @property {Date | string} time - The identifier of the form. Example: "2023-10-01T12:00:00Z".
84
- * @property {FormDataType[]} formData - Form data. Example:
94
+ * @property {FormDataType[]} formData - Form data.
95
+ * @example
85
96
  [
86
97
  {
87
98
  "marker": "name",
@@ -104,7 +115,8 @@ interface IFormDataEntity {
104
115
  /**
105
116
  * Represents a collection of form data entities.
106
117
  * @interface IFormsDataEntity
107
- * @property {IFormDataEntity[]} items - Array of form data objects. Example:
118
+ * @property {IFormDataEntity[]} items - Array of form data objects.
119
+ * @example
108
120
  [
109
121
  {
110
122
  "id": 1,
@@ -132,7 +144,8 @@ interface IFormsDataEntity {
132
144
  * @property {string | null} [ip] - Ip. Example: '127.0.0.1'.
133
145
  * @property {string | null} [status] - Status. Example: 'approved'.
134
146
  * @property {string | null} [userIdentifier] - Text identifier (marker) of the user. Example: "admin".
135
- * @property {FormDataType[]} formData - Form data. Example:
147
+ * @property {FormDataType[]} formData - Form data.
148
+ * @example
136
149
  [
137
150
  {
138
151
  "marker": "name",
@@ -165,7 +178,8 @@ interface IFormByMarkerDataEntity {
165
178
  /**
166
179
  * Represents a collection of form data entities.
167
180
  * @interface IFormsByMarkerDataEntity
168
- * @property {IFormByMarkerDataEntity[]} items - Array of form data objects. Example:
181
+ * @property {IFormByMarkerDataEntity[]} items - Array of form data objects.
182
+ * @example
169
183
  [
170
184
  {
171
185
  "id": 42,
@@ -200,7 +214,25 @@ interface IFormsByMarkerDataEntity {
200
214
  * Represents the structure of the response after posting form data.
201
215
  * @interface IPostFormResponse
202
216
  * @property {string} actionMessage - Action message for the form data. Example: "Form submitted successfully".
203
- * @property {object} formData - Form data. Example:
217
+ * @property {object} formData - Form data.
218
+ * @example
219
+ {
220
+ "id": 42,
221
+ "formIdentifier": "contact_form",
222
+ "time": "2023-10-01T12:00:00Z",
223
+ "entityIdentifier": "blog",
224
+ "isUserAdmin": false,
225
+ "formModuleId": 2,
226
+ "parentId": null,
227
+ "userIdentifier": null,
228
+ "formData": [
229
+ {
230
+ "marker": "name",
231
+ "type": "string",
232
+ "value": "Jack"
233
+ }
234
+ ]
235
+ }
204
236
  * @property {number} formData.id - The unique identifier of the form page. Example: 12345.
205
237
  * @property {string} formData.formIdentifier - The identifier of the form. Example: "contact_form".
206
238
  * @property {string} formData.time - The time of the form submit. Example: "2023-10-01T12:00:00Z".
@@ -209,7 +241,8 @@ interface IFormsByMarkerDataEntity {
209
241
  * @property {number} formData.formModuleId - The form module identifier. Example: 2.
210
242
  * @property {any} formData.parentId - The parent identifier. Example: null.
211
243
  * @property {any} formData.userIdentifier - The user identifier. Example: null.
212
- * @property {FormDataType[]} formData.formData - Form fields data. Example:
244
+ * @property {FormDataType[]} formData.formData - Form fields data.
245
+ * @example
213
246
  [
214
247
  {
215
248
  "marker": "name",
@@ -225,6 +258,7 @@ interface IPostFormResponse {
225
258
  formIdentifier: string;
226
259
  time: string;
227
260
  entityIdentifier: string;
261
+ fingerprint: string;
228
262
  isUserAdmin: boolean;
229
263
  formModuleId: number;
230
264
  userIdentifier: any;
@@ -244,7 +278,8 @@ type FormDataType = IBodyTypeStringNumberFloat | IBodyTypeTimeDate | IBodyTypeTe
244
278
  * @property {string} moduleEntityIdentifier - Text identifier (marker) of the module entity. Example: "blog".
245
279
  * @property {string | null} replayTo - Email to reply to. Example: "some@email.com".
246
280
  * @property {string} status - Status of the form. Example: "sent".
247
- * @property {FormDataType[]} formData - Array of form data objects. Example:
281
+ * @property {FormDataType[]} formData - Array of form data objects.
282
+ * @example
248
283
  [
249
284
  {
250
285
  "marker": "name",
@@ -255,7 +290,8 @@ type FormDataType = IBodyTypeStringNumberFloat | IBodyTypeTimeDate | IBodyTypeTe
255
290
  * @property {string} formData[index].marker - The marker identifying the form field. Example: "name".
256
291
  * @property {string} formData[index].type - The type of the form field. Example: "string".
257
292
  * @property {string} formData[index].value - The value of the form field. Example: "name".
258
- * @property {IUploadingQuery} [fileQuery] - Optional file query for uploading files. Example:
293
+ * @property {IUploadingQuery} [fileQuery] - Optional file query for uploading files.
294
+ * @example
259
295
  {
260
296
  "type": "page",
261
297
  "entity": "editor",
@@ -290,7 +326,8 @@ interface IBodyTypeStringNumberFloat {
290
326
  * @interface IBodyTypeTimeDate
291
327
  * @property {string} marker - marker name. Example: "ome_marker".
292
328
  * @property {string} type - Type value. 'date' | 'dateTime' | 'time' Example: "date".
293
- * @property {object} value - Date object. Contains fullDate, formattedValue, formatString. Example:
329
+ * @property {object} value - Date object. Contains fullDate, formattedValue, formatString.
330
+ * @example
294
331
  {
295
332
  "fullDate": "2024-05-07T21:02:00.000Z",
296
333
  "formattedValue": "08-05-2024 00:02",
@@ -312,7 +349,8 @@ interface IBodyTypeTimeDate {
312
349
  * @interface IBodyTypeText
313
350
  * @property {string} marker - marker name. Example: "some_marker".
314
351
  * @property {string} type - Type value. Example: "text".
315
- * @property {object} value - Text Object. Contains html as string, plain text and params. Example:
352
+ * @property {object} value - Text Object. Contains html as string, plain text and params.
353
+ * @example
316
354
  {
317
355
  "htmlValue": "<p>Hello world</p>",
318
356
  "plainValue": "",
@@ -340,7 +378,8 @@ interface IBodyTypeText {
340
378
  * @interface IBodyTypeTextWithHeader
341
379
  * @property {string} marker - marker name. Example: "about".
342
380
  * @property {string} type - Type value. Example: "textWithHeader".
343
- * @property {object} value - Text Object. Contains html as string, header and params. Example:
381
+ * @property {object} value - Text Object. Contains html as string, header and params.
382
+ * @example
344
383
  {
345
384
  "header": "Headline",
346
385
  "htmlValue": "<p>Hello World</p>",
@@ -370,7 +409,8 @@ interface IBodyTypeTextWithHeader {
370
409
  * @interface IBodyTypeImageGroupOfImages
371
410
  * @property {string} marker - marker name. Example: "avatar".
372
411
  * @property {'image' | 'groupOfImage'} type - Type value. Example: "image".
373
- * @property {object} value - Image Object. Contains image information. Example:
412
+ * @property {object} value - Image Object. Contains image information.
413
+ * @example
374
414
  [
375
415
  {
376
416
  "filename": "files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
@@ -410,7 +450,8 @@ interface IBodyTypeImageGroupOfImages {
410
450
  * @interface IBodyTypeFile
411
451
  * @property {string} marker - marker name. Example: "picture".
412
452
  * @property {'file'} type - Type value. Example: "file".
413
- * @property {object} value - File Object. Contains file information. Example:
453
+ * @property {object} value - File Object. Contains file information.
454
+ * @example
414
455
  [
415
456
  {
416
457
  "filename": "files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
@@ -434,7 +475,8 @@ interface IBodyTypeFile {
434
475
  * @interface IBodyTypeRadioButtonList
435
476
  * @property {string} marker - marker name. Example: "selector".
436
477
  * @property {string} type - Type value. Example: 'list'.
437
- * @property {Array} value - Array of list or radioButton bojects. Example:
478
+ * @property {Array} value - Array of list or radioButton bojects.
479
+ * @example
438
480
  [
439
481
  {
440
482
  "title": "red",
@@ -1,5 +1,5 @@
1
- import type { BlockType } from 'blocks/blocksInterfaces';
2
1
  import type { IError } from '../base/utils';
2
+ import type { BlockType } from '../blocks/blocksInterfaces';
3
3
  /**
4
4
  * Interface for retrieving all general types in the system.
5
5
  * @interface IGeneralTypes
@@ -19,9 +19,9 @@ interface IGeneralTypes {
19
19
  /**
20
20
  * Represents a general type entity.
21
21
  * @interface IGeneralTypesEntity
22
- * @description Represents a general type entity with an identifier and a type.
23
22
  * @property {number} id - Type id. Example: 1.
24
23
  * @property {Types} type - Types enum. Example: "product", "category", "etc".
24
+ * @description Represents a general type entity with an identifier and a type.
25
25
  */
26
26
  interface IGeneralTypesEntity {
27
27
  id: number;
package/dist/index.d.ts CHANGED
@@ -63,6 +63,7 @@ interface IDefineApi {
63
63
  * @param {string} [config.auth] - An object with authorization settings.
64
64
  * @param {boolean} [config.auth.customAuth] - Set this flag to true if you want to configure the authorization process yourself. Set the flag to false, or do not pass it at all to have automatic authorization and token renewal.
65
65
  * @param {string} [config.auth.refreshToken] - Transfer the refresh token here, for example from the local storage, to resume the user's session. Otherwise, the user will need to log in every time a new session is created.
66
+ * @param {string} [config.auth.providerMarker] - The marker of the authorization provider.
66
67
  * @param {string} [config.auth.saveFunction] - If you want to store the token between sessions, for example in local storage, create a custom function that takes refreshToken as a parameter and executes the necessary instructions. This function will be called every time the tokens are updated.
67
68
  * @returns {IDefineApi} List of methods set.
68
69
  * @description Define API.
package/dist/index.js CHANGED
@@ -41,6 +41,7 @@ const wsApi_1 = __importDefault(require("./web-socket/wsApi"));
41
41
  * @param {string} [config.auth] - An object with authorization settings.
42
42
  * @param {boolean} [config.auth.customAuth] - Set this flag to true if you want to configure the authorization process yourself. Set the flag to false, or do not pass it at all to have automatic authorization and token renewal.
43
43
  * @param {string} [config.auth.refreshToken] - Transfer the refresh token here, for example from the local storage, to resume the user's session. Otherwise, the user will need to log in every time a new session is created.
44
+ * @param {string} [config.auth.providerMarker] - The marker of the authorization provider.
44
45
  * @param {string} [config.auth.saveFunction] - If you want to store the token between sessions, for example in local storage, create a custom function that takes refreshToken as a parameter and executes the necessary instructions. This function will be called every time the tokens are updated.
45
46
  * @returns {IDefineApi} List of methods set.
46
47
  * @description Define API.