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,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,48 +0,0 @@
1
- /**
2
- * Validation schemas for Templates module
3
- * @description Zod schemas for validating templates-related API responses
4
- */
5
- import { z } from 'zod';
6
- /**
7
- * Template entity schema
8
- * Includes all fields returned by the API
9
- */
10
- export declare const TemplateEntitySchema: z.ZodObject<{
11
- id: z.ZodNumber;
12
- attributeSetIdentifier: z.ZodNullable<z.ZodString>;
13
- title: z.ZodString;
14
- generalTypeId: z.ZodNumber;
15
- identifier: z.ZodString;
16
- version: z.ZodNumber;
17
- generalTypeName: z.ZodString;
18
- attributeValues: z.ZodRecord<z.ZodString, z.ZodAny>;
19
- position: z.ZodNumber;
20
- }, z.core.$strip>;
21
- /**
22
- * Templates response schema (array of templates)
23
- */
24
- export declare const TemplatesResponseSchema: z.ZodArray<z.ZodObject<{
25
- id: z.ZodNumber;
26
- attributeSetIdentifier: z.ZodNullable<z.ZodString>;
27
- title: z.ZodString;
28
- generalTypeId: z.ZodNumber;
29
- identifier: z.ZodString;
30
- version: z.ZodNumber;
31
- generalTypeName: z.ZodString;
32
- attributeValues: z.ZodRecord<z.ZodString, z.ZodAny>;
33
- position: z.ZodNumber;
34
- }, z.core.$strip>>;
35
- /**
36
- * Grouped templates response schema (by type)
37
- */
38
- export declare const GroupedTemplatesResponseSchema: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
39
- id: z.ZodNumber;
40
- attributeSetIdentifier: z.ZodNullable<z.ZodString>;
41
- title: z.ZodString;
42
- generalTypeId: z.ZodNumber;
43
- identifier: z.ZodString;
44
- version: z.ZodNumber;
45
- generalTypeName: z.ZodString;
46
- attributeValues: z.ZodRecord<z.ZodString, z.ZodAny>;
47
- position: z.ZodNumber;
48
- }, z.core.$strip>>>;
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GroupedTemplatesResponseSchema = exports.TemplatesResponseSchema = exports.TemplateEntitySchema = void 0;
4
- /**
5
- * Validation schemas for Templates module
6
- * @description Zod schemas for validating templates-related API responses
7
- */
8
- const zod_1 = require("zod");
9
- /**
10
- * Template entity schema
11
- * Includes all fields returned by the API
12
- */
13
- exports.TemplateEntitySchema = zod_1.z.object({
14
- id: zod_1.z.number(),
15
- attributeSetIdentifier: zod_1.z.string().nullable(),
16
- title: zod_1.z.string(),
17
- generalTypeId: zod_1.z.number(),
18
- identifier: zod_1.z.string(),
19
- version: zod_1.z.number(),
20
- generalTypeName: zod_1.z.string(),
21
- attributeValues: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
22
- position: zod_1.z.number(),
23
- });
24
- /**
25
- * Templates response schema (array of templates)
26
- */
27
- exports.TemplatesResponseSchema = zod_1.z.array(exports.TemplateEntitySchema);
28
- /**
29
- * Grouped templates response schema (by type)
30
- */
31
- exports.GroupedTemplatesResponseSchema = zod_1.z.record(zod_1.z.string(), zod_1.z.array(exports.TemplateEntitySchema));
@@ -1,38 +0,0 @@
1
- import AsyncModules from '../base/asyncModules';
2
- import type StateModule from '../base/stateModule';
3
- import type { IError } from '../base/utils';
4
- import type { ITemplatesPreview, ITemplatesPreviewEntity } from './templatesPreviewInterfaces';
5
- /**
6
- * Controllers for working with template objects for preview.
7
- * @handle /api/content/template-previews
8
- * @description This module provides a set of controllers for managing and retrieving template objects designed for preview purposes.
9
- */
10
- export default class TemplatePreviewsApi extends AsyncModules implements ITemplatesPreview {
11
- protected state: StateModule;
12
- protected _url: string;
13
- /**
14
- * Constructor for the TemplatePreviewsApi class.
15
- * @param {StateModule} state - The state module instance.
16
- * @description Initializes the TemplatePreviewsApi class with the provided state module instance.
17
- */
18
- constructor(state: StateModule);
19
- /**
20
- * Get all template objects.
21
- * @handleName getTemplatePreviews
22
- * @param {string} [langCode] - Language code. Default: "en_US".
23
- * @returns {Promise<ITemplatesPreviewEntity[] | IError>} - Returns all TemplatePreviewsEntity template objects.
24
- * @throws {IError} When isShell=false and an error occurs during the fetch
25
- * @description This method is used to fetch all available template objects.
26
- */
27
- getTemplatePreviews(langCode?: string): Promise<ITemplatesPreviewEntity[] | IError>;
28
- /**
29
- * Retrieves a template object by its marker.
30
- * @handleName getTemplatePreviewByMarker
31
- * @param {string} marker - The unique product marker used to identify the template. If not provided, a default behavior or error may occur. Example: "template_12345".
32
- * @param {string} [langCode] - Language code. Default: "en_US".
33
- * @returns {Promise<ITemplatesPreviewEntity | IError>} - A promise that resolves to a TemplatePreviewsEntity object representing the template.
34
- * @throws {IError} When isShell=false and an error occurs during the fetch
35
- * @description This method is used to fetch a specific template object based on the provided marker.
36
- */
37
- getTemplatePreviewByMarker(marker: string, langCode?: string): Promise<ITemplatesPreviewEntity | IError>;
38
- }
@@ -1,53 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const asyncModules_1 = __importDefault(require("../base/asyncModules"));
7
- const templatesPreviewSchemas_1 = require("./templatesPreviewSchemas");
8
- /**
9
- * Controllers for working with template objects for preview.
10
- * @handle /api/content/template-previews
11
- * @description This module provides a set of controllers for managing and retrieving template objects designed for preview purposes.
12
- */
13
- class TemplatePreviewsApi extends asyncModules_1.default {
14
- /**
15
- * Constructor for the TemplatePreviewsApi class.
16
- * @param {StateModule} state - The state module instance.
17
- * @description Initializes the TemplatePreviewsApi class with the provided state module instance.
18
- */
19
- constructor(state) {
20
- super(state);
21
- this._url = state.url + '/api/content/template-previews';
22
- }
23
- /**
24
- * Get all template objects.
25
- * @handleName getTemplatePreviews
26
- * @param {string} [langCode] - Language code. Default: "en_US".
27
- * @returns {Promise<ITemplatesPreviewEntity[] | IError>} - Returns all TemplatePreviewsEntity template objects.
28
- * @throws {IError} When isShell=false and an error occurs during the fetch
29
- * @description This method is used to fetch all available template objects.
30
- */
31
- async getTemplatePreviews(langCode = this.state.lang) {
32
- const result = await this._fetchGet(`?langCode=${langCode}`);
33
- // Validate response if validation is enabled
34
- const validated = this._validateResponse(result, templatesPreviewSchemas_1.TemplatePreviewsResponseSchema);
35
- return this._normalizeData(validated, langCode);
36
- }
37
- /**
38
- * Retrieves a template object by its marker.
39
- * @handleName getTemplatePreviewByMarker
40
- * @param {string} marker - The unique product marker used to identify the template. If not provided, a default behavior or error may occur. Example: "template_12345".
41
- * @param {string} [langCode] - Language code. Default: "en_US".
42
- * @returns {Promise<ITemplatesPreviewEntity | IError>} - A promise that resolves to a TemplatePreviewsEntity object representing the template.
43
- * @throws {IError} When isShell=false and an error occurs during the fetch
44
- * @description This method is used to fetch a specific template object based on the provided marker.
45
- */
46
- async getTemplatePreviewByMarker(marker, langCode = this.state.lang) {
47
- const result = await this._fetchGet(`/marker/${marker}?langCode=${langCode}`);
48
- // Validate response if validation is enabled
49
- const validated = this._validateResponse(result, templatesPreviewSchemas_1.TemplatePreviewEntitySchema);
50
- return this._normalizeData(validated, langCode);
51
- }
52
- }
53
- exports.default = TemplatePreviewsApi;
@@ -1,121 +0,0 @@
1
- import type { AttributeType, IError } from '../base/utils';
2
- /**
3
- * @interface ITemplatesPreview
4
- * @property {Function} getTemplatePreviews - Get all template preview objects.
5
- * @property {Function} getTemplatePreviewByMarker - Get one template preview object by marker.
6
- * @description This interface defines methods for retrieving template previews in the system, including fetching all previews, specific previews by marker.
7
- */
8
- interface ITemplatesPreview {
9
- /**
10
- * Retrieves all template preview objects.
11
- * @param {string} langCode - Language code for localization. Default: "en_US".
12
- * @returns {ITemplatesPreviewEntity[]} A promise resolving to an array of template preview entities or an error.
13
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
14
- */
15
- getTemplatePreviews(langCode: string): Promise<ITemplatesPreviewEntity[] | IError>;
16
- /**
17
- * Retrieves a specific template preview object by its marker.
18
- * @handleName getTemplatePreviewByMarker
19
- * @param {string} marker - The marker of the template preview. Example: "template_12345".
20
- * @param {string} [langCode] - Language code for localization. Default: "en_US".
21
- * @returns {ITemplatesPreviewEntity | IError} A promise resolving to the template preview entity or an error.
22
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
23
- * @description This method retrieves a specific template preview object by its marker.
24
- */
25
- getTemplatePreviewByMarker(marker: string, langCode: string): Promise<ITemplatesPreviewEntity | IError>;
26
- }
27
- /**
28
- * The `ITemplatesPreview` interface defines the structure of template preview entities.
29
- * @interface ITemplatesPreviewEntity
30
- * @property {number} id - The unique identifier of the position. Example: 3.
31
- * @property {string} title - The name of the template preview. Example: "Product Template"..
32
- * @property {object} proportions - Object contains info by proportions template preview.
33
- * @example
34
- {
35
- "default": {
36
- "horizontal": {
37
- "width": 234,
38
- "height": 324,
39
- "alignmentType": "middleBottom"
40
- },
41
- "vertical": {
42
- "width": 2,
43
- "height": 3,
44
- "alignmentType": "leftTop"
45
- },
46
- "square": {
47
- "side": 3,
48
- "alignmentType": "leftTop"
49
- }
50
- }
51
- }
52
- * @property {IProportion | null} proportions.horizontal - Horizontal proportion of the template preview.
53
- * @example
54
- {
55
- "width": 234,
56
- "height": 324,
57
- "alignmentType": "middleBottom"
58
- }
59
- * @property {IProportion | null} proportions.vertical - Vertical proportion of the template preview.
60
- * @example
61
- {
62
- "width": 2,
63
- "height": 3,
64
- "alignmentType": "leftTop"
65
- }
66
- * @property {ISquare} proportions.square - Square proportion of the template preview.
67
- * @example
68
- {
69
- "side": 3,
70
- "alignmentType": "leftTop"
71
- }
72
- * @property {string} identifier - The textual identifier for the record field. Example: "preview-templates"
73
- * @property {number} version - The version number of the object. Example: 1.
74
- * @property {AttributeType} attributeValues - Attribute values from index. Example: {}
75
- * @property {number} position - The position of the object. Example: 1.
76
- * @property {boolean} isUsed - Indicates whether the template preview is used. Example: true.
77
- * @property {string | null} [attributeSetIdentifier] - Text identifier used for a set of attributes. Example: "attribute_set_1".
78
- * @description This interface defines the structure of a template preview entity, including its identifiers, attributes, proportions, and title.
79
- */
80
- interface ITemplatesPreviewEntity {
81
- id: number;
82
- title: string;
83
- proportions: {
84
- default: {
85
- horizontal: IProportion | null;
86
- vertical: IProportion | null;
87
- square: ISquare;
88
- };
89
- };
90
- identifier: string;
91
- version: number;
92
- attributeValues: AttributeType;
93
- position: number;
94
- isUsed: boolean;
95
- attributeSetIdentifier?: string | null;
96
- }
97
- /**
98
- * The `IProportion` interface defines the structure of a proportion object used in template previews.
99
- * @interface IProportion
100
- * @property {string | number | null} width - width of the template preview. Example: 100.
101
- * @property {string | number | null} height - height of the template preview. Example: 200.
102
- * @property {string} alignmentType - alignment type of the template preview. Example: "center".
103
- * @description Represents a proportion object used in template previews.
104
- */
105
- interface IProportion {
106
- width: number | null;
107
- height: number | null;
108
- alignmentType: string;
109
- }
110
- /**
111
- * The `ISquare` interface defines the structure of a square proportion object used in template previews.
112
- * @interface ISquare
113
- * @property {number | string} side - Side length of the square template preview, can be a number or string. Example: 100.
114
- * @property {string} alignmentType - Alignment type of the square template preview. Example: "center".
115
- * @description Represents a square proportion object used in template previews.
116
- */
117
- interface ISquare {
118
- side: number | string;
119
- alignmentType: string;
120
- }
121
- export type { IProportion, ISquare, ITemplatesPreview, ITemplatesPreviewEntity, };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,83 +0,0 @@
1
- /**
2
- * Validation schemas for TemplatesPreviews module
3
- * @description Zod schemas for validating templates previews-related API responses
4
- */
5
- import { z } from 'zod';
6
- /**
7
- * Proportion schema
8
- */
9
- export declare const ProportionSchema: z.ZodObject<{
10
- width: z.ZodNullable<z.ZodNumber>;
11
- height: z.ZodNullable<z.ZodNumber>;
12
- alignmentType: z.ZodString;
13
- }, z.core.$strip>;
14
- /**
15
- * Square schema
16
- */
17
- export declare const SquareSchema: z.ZodObject<{
18
- side: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
19
- alignmentType: z.ZodString;
20
- }, z.core.$strip>;
21
- /**
22
- * Template preview entity schema
23
- * Includes all fields returned by the API
24
- */
25
- export declare const TemplatePreviewEntitySchema: z.ZodObject<{
26
- id: z.ZodNumber;
27
- title: z.ZodString;
28
- proportions: z.ZodObject<{
29
- default: z.ZodObject<{
30
- horizontal: z.ZodNullable<z.ZodObject<{
31
- width: z.ZodNullable<z.ZodNumber>;
32
- height: z.ZodNullable<z.ZodNumber>;
33
- alignmentType: z.ZodString;
34
- }, z.core.$strip>>;
35
- vertical: z.ZodNullable<z.ZodObject<{
36
- width: z.ZodNullable<z.ZodNumber>;
37
- height: z.ZodNullable<z.ZodNumber>;
38
- alignmentType: z.ZodString;
39
- }, z.core.$strip>>;
40
- square: z.ZodObject<{
41
- side: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
42
- alignmentType: z.ZodString;
43
- }, z.core.$strip>;
44
- }, z.core.$strip>;
45
- }, z.core.$strip>;
46
- identifier: z.ZodString;
47
- version: z.ZodNumber;
48
- attributeValues: z.ZodRecord<z.ZodString, z.ZodAny>;
49
- position: z.ZodNumber;
50
- isUsed: z.ZodBoolean;
51
- attributeSetIdentifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
52
- }, z.core.$strip>;
53
- /**
54
- * Template previews response schema (array of template previews)
55
- */
56
- export declare const TemplatePreviewsResponseSchema: z.ZodArray<z.ZodObject<{
57
- id: z.ZodNumber;
58
- title: z.ZodString;
59
- proportions: z.ZodObject<{
60
- default: z.ZodObject<{
61
- horizontal: z.ZodNullable<z.ZodObject<{
62
- width: z.ZodNullable<z.ZodNumber>;
63
- height: z.ZodNullable<z.ZodNumber>;
64
- alignmentType: z.ZodString;
65
- }, z.core.$strip>>;
66
- vertical: z.ZodNullable<z.ZodObject<{
67
- width: z.ZodNullable<z.ZodNumber>;
68
- height: z.ZodNullable<z.ZodNumber>;
69
- alignmentType: z.ZodString;
70
- }, z.core.$strip>>;
71
- square: z.ZodObject<{
72
- side: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
73
- alignmentType: z.ZodString;
74
- }, z.core.$strip>;
75
- }, z.core.$strip>;
76
- }, z.core.$strip>;
77
- identifier: z.ZodString;
78
- version: z.ZodNumber;
79
- attributeValues: z.ZodRecord<z.ZodString, z.ZodAny>;
80
- position: z.ZodNumber;
81
- isUsed: z.ZodBoolean;
82
- attributeSetIdentifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
83
- }, z.core.$strip>>;
@@ -1,48 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TemplatePreviewsResponseSchema = exports.TemplatePreviewEntitySchema = exports.SquareSchema = exports.ProportionSchema = void 0;
4
- /**
5
- * Validation schemas for TemplatesPreviews module
6
- * @description Zod schemas for validating templates previews-related API responses
7
- */
8
- const zod_1 = require("zod");
9
- /**
10
- * Proportion schema
11
- */
12
- exports.ProportionSchema = zod_1.z.object({
13
- width: zod_1.z.number().nullable(),
14
- height: zod_1.z.number().nullable(),
15
- alignmentType: zod_1.z.string(),
16
- });
17
- /**
18
- * Square schema
19
- */
20
- exports.SquareSchema = zod_1.z.object({
21
- side: zod_1.z.union([zod_1.z.number(), zod_1.z.string()]),
22
- alignmentType: zod_1.z.string(),
23
- });
24
- /**
25
- * Template preview entity schema
26
- * Includes all fields returned by the API
27
- */
28
- exports.TemplatePreviewEntitySchema = zod_1.z.object({
29
- id: zod_1.z.number(),
30
- title: zod_1.z.string(),
31
- proportions: zod_1.z.object({
32
- default: zod_1.z.object({
33
- horizontal: exports.ProportionSchema.nullable(),
34
- vertical: exports.ProportionSchema.nullable(),
35
- square: exports.SquareSchema,
36
- }),
37
- }),
38
- identifier: zod_1.z.string(),
39
- version: zod_1.z.number(),
40
- attributeValues: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
41
- position: zod_1.z.number(),
42
- isUsed: zod_1.z.boolean(),
43
- attributeSetIdentifier: zod_1.z.string().nullable().optional(),
44
- });
45
- /**
46
- * Template previews response schema (array of template previews)
47
- */
48
- exports.TemplatePreviewsResponseSchema = zod_1.z.array(exports.TemplatePreviewEntitySchema);
@@ -1,143 +0,0 @@
1
- import AsyncModules from '../base/asyncModules';
2
- import type StateModule from '../base/stateModule';
3
- import type { IError } from '../base/utils';
4
- import type { IUserBody, IUserEntity, IUsers } from './usersInterfaces';
5
- /**
6
- * Controllers for working with users
7
- * @handle /api/content/users
8
- * @description This module provides various methods to manage users, including creating, retrieving, updating, and deleting user data. It requires proper authorization to access these endpoints.
9
- */
10
- export default class UsersApi extends AsyncModules implements IUsers {
11
- protected state: StateModule;
12
- protected _url: string;
13
- /**
14
- * Constructor for UsersApi class.
15
- * @param {StateModule} state - The state module containing necessary information for API calls.
16
- * @description Initializes the UsersApi class with the provided state module.
17
- */
18
- constructor(state: StateModule);
19
- /**
20
- * Getting the data of an authorized user.
21
- * @handleName getUser
22
- * @param {string} [langCode] - Language code. Default: "en_US".
23
- * @returns {Promise<IUserEntity | IError>} Returns a promise that resolves to the user entity object if successful; otherwise, returns an error object.
24
- * @throws {IError} When isShell=false and an error occurs during the fetch
25
- * @description This method requires user authorization.
26
- * @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}.
27
- */
28
- getUser(langCode?: string): Promise<IUserEntity | IError>;
29
- /**
30
- * Updating a single user object.
31
- * @handleName updateUser
32
- * @param {IUserBody} body - Request body.
33
- * @example
34
- {
35
- "formIdentifier": "reg",
36
- "authData": [
37
- {
38
- "marker": "email_reg",
39
- "value": "your-email@oneentery.cloud"
40
- },
41
- {
42
- "marker": "password_reg",
43
- "value": "12345"
44
- }
45
- ],
46
- "formData": [
47
- {
48
- "marker": "last_name",
49
- "type": "string",
50
- "value": "Username"
51
- }
52
- ],
53
- "notificationData": {
54
- "email": "example@oneentry.cloud",
55
- "phonePush": ["+99999999999"],
56
- "phoneSMS": "+99999999999"
57
- },
58
- "state": {}
59
- }
60
- * @param {string} body.formIdentifier - Identifies the registration form being used. Example: "reg_form".
61
- * @param {string} body.authData - Contains authentication credentials for the user. Example:
62
- * @example
63
- [
64
- {
65
- "marker": "email_reg",
66
- "value": "example@oneentry.cloud"
67
- },
68
- {
69
- "marker": "password_reg",
70
- "value": "password"
71
- }
72
- ]
73
- * @param {string} body.authData[].marker - Identifies the field being used. Example: "email_reg".
74
- * @param {string} body.authData[].value - Contains the value of the field. Example: "example@oneentry.cloud".
75
- * @param {string} body.formData - Contains additional data for the user.
76
- * @example
77
- [
78
- {
79
- "marker": "last_name",
80
- "type": "string",
81
- "value": "Username"
82
- }
83
- ]
84
- * @param {string} body.formData[].marker - The marker of the field. Example: "last_name".
85
- * @param {string} body.formData[].type - The type of the field. Example: "string".
86
- * @param {string} body.formData[].value - The value of the field. Example: "Username".
87
- * @param {string} body.notificationData - The notification data.
88
- * @example
89
- {
90
- "email": "example@oneentry.cloud",
91
- "phonePush": ["+99999999999"],
92
- "phoneSMS": "+99999999999"
93
- }
94
- * @param {string} body.notificationData.email - The email address of the user. Example: "example@oneentry.cloud".
95
- * @param {string} body.notificationData.phonePush - An array of phone numbers for push notifications. Example: ["+99999999999"].
96
- * @param {string} body.notificationData.phoneSMS - The phone number for SMS notifications. Example: "+99999999999".
97
- * @param {string} [langCode] - Language code. Default: "en_US".
98
- * @returns {Promise<boolean | IError>} Returns `true` if the user object was successfully updated; otherwise, returns an error object.
99
- * @throws {IError} When isShell=false and an error occurs during the fetch
100
- * @description This method updates the user's data. This method requires user authorization.
101
- * @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}.
102
- * @see For more information about {@link https://doc.oneentry.cloud/docs/forms/create-form registration forms}, see the documentation in the {@link https://doc.oneentry.cloud/docs/forms/create-form forms configuration section}.
103
- */
104
- updateUser(body: IUserBody, langCode?: string): Promise<boolean | IError>;
105
- /**
106
- * Archiving one user object (marked for deletion).
107
- * @handleName archiveUser
108
- * @returns {Promise<boolean | IError>} Returns `true` if the user was successfully deleted; otherwise, returns an error object.
109
- * @throws {IError} When isShell=false and an error occurs during the fetch
110
- * @description This method archives a user object (marks it for deletion). This method requires user authorization.
111
- * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/auth-provider/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
112
- */
113
- archiveUser(): Promise<boolean | IError>;
114
- /**
115
- * Delete a single user.
116
- * @handleName deleteUser
117
- * @returns {Promise<boolean | IError>} Returns `true` if the user was successfully deleted; otherwise, returns an error object.
118
- * @throws {IError} When isShell=false and an error occurs during the fetch
119
- * @description This method deletes the user from the system. This method requires user authorization.
120
- * @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}.
121
- */
122
- deleteUser(): Promise<boolean | IError>;
123
- /**
124
- * Adds an FCM (Firebase Cloud Messaging) token for sending push notifications.
125
- * @handleName addFCMToken
126
- * @param {string} token - The cloud messaging token to be added. This token is used to identify the user's device for push notifications. Example: "fcm_token_1234567890abcdefg".
127
- * @returns {Promise<boolean | IError>} Returns `true` if the token was successfully added; otherwise, returns an error object.
128
- * @throws {IError} When isShell=false and an error occurs during the fetch
129
- * @description This method adds an FCM token for sending push notifications. This method requires user authorization.
130
- * @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}.
131
- */
132
- addFCMToken(token: string): Promise<boolean | IError>;
133
- /**
134
- * Deletes an FCM (Firebase Cloud Messaging) token.
135
- * @handleName deleteFCMToken
136
- * @param {string} token - The cloud messaging token to be deleted. This token is used to identify the user's device for push notifications and will be removed. Example: "fcm_token_1234567890abcdefg".
137
- * @returns {Promise<boolean | IError>} Returns `true` if the token was successfully deleted; otherwise, returns an error object.
138
- * @throws {IError} When isShell=false and an error occurs during the fetch
139
- * @description This method deletes an existing FCM token. This method requires user authorization.
140
- * @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}.
141
- */
142
- deleteFCMToken(token: string): Promise<boolean | IError>;
143
- }