oneentry 1.0.106 → 1.0.109

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 (42) hide show
  1. package/README.md +6479 -3951
  2. package/dist/attribute-sets/attributeSetsApi.d.ts +11 -14
  3. package/dist/attribute-sets/attributeSetsApi.js +14 -17
  4. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +2 -2
  5. package/dist/auth-provider/authProviderApi.d.ts +21 -23
  6. package/dist/auth-provider/authProviderApi.js +28 -30
  7. package/dist/auth-provider/authProvidersInterfaces.d.ts +1 -1
  8. package/dist/blocks/blocksApi.d.ts +6 -6
  9. package/dist/blocks/blocksApi.js +9 -8
  10. package/dist/events/eventsApi.d.ts +7 -7
  11. package/dist/events/eventsApi.js +11 -7
  12. package/dist/file-uploading/fileUploadingApi.d.ts +4 -4
  13. package/dist/file-uploading/fileUploadingApi.js +4 -4
  14. package/dist/forms/formsApi.d.ts +1 -1
  15. package/dist/forms/formsApi.js +1 -1
  16. package/dist/formsData/formsDataApi.d.ts +16 -12
  17. package/dist/formsData/formsDataApi.js +21 -17
  18. package/dist/integration-collections/integrationCollectionsApi.d.ts +18 -20
  19. package/dist/integration-collections/integrationCollectionsApi.js +15 -19
  20. package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +45 -8
  21. package/dist/menus/menusApi.d.ts +1 -1
  22. package/dist/menus/menusApi.js +1 -1
  23. package/dist/orders/ordersApi.d.ts +43 -43
  24. package/dist/orders/ordersApi.js +60 -60
  25. package/dist/orders/ordersInterfaces.d.ts +2 -2
  26. package/dist/pages/pagesApi.d.ts +15 -15
  27. package/dist/pages/pagesApi.js +20 -20
  28. package/dist/payments/paymentsApi.d.ts +5 -5
  29. package/dist/payments/paymentsApi.js +5 -5
  30. package/dist/product-statuses/productStatusesApi.d.ts +7 -6
  31. package/dist/product-statuses/productStatusesApi.js +7 -6
  32. package/dist/products/productsApi.d.ts +19 -19
  33. package/dist/products/productsApi.js +18 -18
  34. package/dist/products/productsInterfaces.d.ts +1 -1
  35. package/dist/templates/templatesApi.d.ts +3 -3
  36. package/dist/templates/templatesApi.js +3 -3
  37. package/dist/templates-preview/templatesPreviewApi.d.ts +2 -2
  38. package/dist/templates-preview/templatesPreviewApi.js +2 -2
  39. package/dist/users/usersApi.d.ts +9 -9
  40. package/dist/users/usersApi.js +19 -19
  41. package/package.json +8 -9
  42. package/readme.js +103 -0
@@ -22,12 +22,12 @@ class ProductApi extends asyncModules_1.default {
22
22
  /**
23
23
  * Search for all products with pagination and filter.
24
24
  *
25
- * @param {Array<IFilterParams>} body - Request body. Default [].
25
+ * @param {Array<IFilterParams>} [body] - Request body. Default [].
26
26
  * @param {string} [langCode] - Language code parameter. Default "en_US"
27
27
  * @param {IProductsQuery} [userQuery] - Optional set query parameters.
28
28
  *
29
- * @param {number} [userQuery.offset] - Optional parameter for pagination, default is 30
30
- * @param {number} [userQuery.limit] - Optional parameter for pagination, default is 0
29
+ * @param {number} [userQuery.offset] - Optional parameter for pagination, default is 0
30
+ * @param {number} [userQuery.limit] - Optional parameter for pagination, default is 30
31
31
  * @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC
32
32
  * @param {string} [userQuery.sortKey] - Optional field to sort by (id, title, date, price, position, status)
33
33
  * @param {number} [userQuery.statusId] - Optional parameter - search by status id
@@ -78,8 +78,8 @@ class ProductApi extends asyncModules_1.default {
78
78
  * @param {string} [langCode] - Language code parameter. Default "en_US"
79
79
  * @param {IProductsQuery} [userQuery] - Optional set query parameters.
80
80
  *
81
- * @param {number} [userQuery.offset] - Optional parameter for pagination, default is 30
82
- * @param {number} [userQuery.limit] - Optional parameter for pagination, default is 0
81
+ * @param {number} [userQuery.offset] - Optional parameter for pagination, default is 0
82
+ * @param {number} [userQuery.limit] - Optional parameter for pagination, default is 30
83
83
  * @param {string} [userQuery.statusMarker] - Optional identifier of the product page status
84
84
  * @param {string} [userQuery.conditionValue] - Optional value that is being searched
85
85
  * @param {string} [userQuery.conditionMarker] - Optional identifier of the filter condition by which values are filtered
@@ -97,13 +97,13 @@ class ProductApi extends asyncModules_1.default {
97
97
  /**
98
98
  * Search for all products with pagination for the selected category.
99
99
  *
100
- * @param {Array<IFilterParams>} body - Request body.
101
100
  * @param {number} id - Page id.
101
+ * @param {Array<IFilterParams>} body - Request body.
102
102
  * @param {string} [langCode] - Language code parameter. Default "en_US"
103
103
  * @param {IProductsQuery} [userQuery] - Optional set query parameters.
104
104
  *
105
- * @param {number} [userQuery.offset] - Optional parameter for pagination, default is 30
106
- * @param {number} [userQuery.limit] - Optional parameter for pagination, default is 0
105
+ * @param {number} [userQuery.offset] - Optional parameter for pagination, default is 0
106
+ * @param {number} [userQuery.limit] - Optional parameter for pagination, default is 30
107
107
  * @param {string} [userQuery.statusMarker] - Optional identifier of the product page status
108
108
  * @param {string} [userQuery.conditionValue] - Optional value that is being searched
109
109
  * @param {string} [userQuery.conditionMarker] - Optional identifier of the filter condition by which values are filtered
@@ -146,8 +146,8 @@ class ProductApi extends asyncModules_1.default {
146
146
  /**
147
147
  * Search for information about products and prices for the selected category.
148
148
  *
149
- * @param {string} url - Page url.
150
- * @param {string} langCode - Language code.
149
+ * @param {string} [url] - Page url.
150
+ * @param {string} [langCode] - Language code.
151
151
  * @param {IProductsQuery} [userQuery] - Optional set query parameters.
152
152
  *
153
153
  * @param {number} [userQuery.offset] - Optional parameter for pagination, default is 30
@@ -173,8 +173,8 @@ class ProductApi extends asyncModules_1.default {
173
173
  /**
174
174
  * Search for all products with pagination for the selected category.
175
175
  *
176
- * @param {Array<IFilterParams>} body - Request body.
177
- * @param {string} url - Page url.
176
+ * @param {string} [url] - Page url.
177
+ * @param {Array<IFilterParams>} [body] - Request body.
178
178
  * @param {string} [langCode] - Language code parameter. Default "en_US"
179
179
  * @param {IProductsQuery} [userQuery] - Optional set query parameters.
180
180
  *
@@ -227,8 +227,8 @@ class ProductApi extends asyncModules_1.default {
227
227
  * @param {string} [langCode] - Language code parameter. Default "en_US"
228
228
  * @param {IProductsQuery} [userQuery] - Optional set query parameters.
229
229
  *
230
- * @param {number} [userQuery.offset] - Optional parameter for pagination, default is 30
231
- * @param {number} [userQuery.limit] - Optional parameter for pagination, default is 0
230
+ * @param {number} [userQuery.offset] - Optional parameter for pagination, default is 0
231
+ * @param {number} [userQuery.limit] - Optional parameter for pagination, default is 30
232
232
  * @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC
233
233
  * @param {string} [userQuery.sortKey] - Optional field to sort by (id, title, date, price, position, status)
234
234
  *
@@ -246,8 +246,8 @@ class ProductApi extends asyncModules_1.default {
246
246
  * @param {string} [langCode] - Language code parameter. Default "en_US"
247
247
  * @param {IProductsQuery} [userQuery] - Optional set query parameters.
248
248
  *
249
- * @param {number} [userQuery.offset] - Optional parameter for pagination, default is 30
250
- * @param {number} [userQuery.limit] - Optional parameter for pagination, default is 0
249
+ * @param {number} [userQuery.offset] - Optional parameter for pagination, default is 0
250
+ * @param {number} [userQuery.limit] - Optional parameter for pagination, default is 30
251
251
  * @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC
252
252
  * @param {string} [userQuery.sortKey] - Optional field to sort by (id, title, date, price, position, status)
253
253
  *
@@ -267,7 +267,7 @@ class ProductApi extends asyncModules_1.default {
267
267
  * Retrieve one product object.
268
268
  *
269
269
  * @param {number} [id] - Product id.
270
- * @param {string} [langCode] Language code parameter. Default "en_US".
270
+ * @param {string} [langCode] - Language code parameter. Default "en_US".
271
271
  *
272
272
  * @returns ProductEntity object.
273
273
  */
@@ -278,7 +278,7 @@ class ProductApi extends asyncModules_1.default {
278
278
  /**
279
279
  * Getting a product block object by product id.
280
280
  *
281
- * @param {number} id - Product id
281
+ * @param {number} [id] - Product id
282
282
  */
283
283
  async getProductBlockById(id) {
284
284
  const response = await this._fetchGet(`/${id}/blocks`);
@@ -77,7 +77,7 @@ interface IFilterParams {
77
77
  * @property {object} additional - Additional value from the index.
78
78
  * @property {Record<string, any>} localizeInfos - The name of the products, taking into account localization.
79
79
  * @property {boolean} isVisible - A sign of page visibility.
80
- * @property {boolean} [isPositionLocked] - Sorting position lock indicator (optional).
80
+ * @property {boolean} isPositionLocked - Sorting position lock indicator (optional).
81
81
  * @property {number | null} statusIdentifier - Product page status identifiers (may be null).
82
82
  * @property {Array<number>} relatedIds - Ids of related product pages.
83
83
  * @property {string} attributeSetIdentifier - Set of attributes id.
@@ -20,7 +20,7 @@ export default class TemplatesPreviewApi extends AsyncModules implements ITempla
20
20
  /**
21
21
  * Get template objects by type.
22
22
  *
23
- * @param {Types} type - Product marker
23
+ * @param {Types} [type] - type
24
24
  * @param {string} [langCode] - Optional parameter language code
25
25
  *
26
26
  * @returns Returns a TemplateEntity object
@@ -29,7 +29,7 @@ export default class TemplatesPreviewApi extends AsyncModules implements ITempla
29
29
  /**
30
30
  * Get one template object by id.
31
31
  *
32
- * @param {number} id - Template id
32
+ * @param {number} [id] - Template id
33
33
  * @param {string} [langCode] - Optional parameter language code
34
34
  *
35
35
  * @returns Returns a TemplateEntity object
@@ -38,7 +38,7 @@ export default class TemplatesPreviewApi extends AsyncModules implements ITempla
38
38
  /**
39
39
  * Get one template object by id.
40
40
  *
41
- * @param {number} marker - Template marker
41
+ * @param {number} [marker] - Template marker
42
42
  * @param {string} [langCode] - Optional parameter language code
43
43
  *
44
44
  * @returns Returns a TemplateEntity object
@@ -32,7 +32,7 @@ class TemplatesPreviewApi extends asyncModules_1.default {
32
32
  /**
33
33
  * Get template objects by type.
34
34
  *
35
- * @param {Types} type - Product marker
35
+ * @param {Types} [type] - type
36
36
  * @param {string} [langCode] - Optional parameter language code
37
37
  *
38
38
  * @returns Returns a TemplateEntity object
@@ -44,7 +44,7 @@ class TemplatesPreviewApi extends asyncModules_1.default {
44
44
  /**
45
45
  * Get one template object by id.
46
46
  *
47
- * @param {number} id - Template id
47
+ * @param {number} [id] - Template id
48
48
  * @param {string} [langCode] - Optional parameter language code
49
49
  *
50
50
  * @returns Returns a TemplateEntity object
@@ -56,7 +56,7 @@ class TemplatesPreviewApi extends asyncModules_1.default {
56
56
  /**
57
57
  * Get one template object by id.
58
58
  *
59
- * @param {number} marker - Template marker
59
+ * @param {number} [marker] - Template marker
60
60
  * @param {string} [langCode] - Optional parameter language code
61
61
  *
62
62
  * @returns Returns a TemplateEntity object
@@ -20,7 +20,7 @@ export default class TemplatePreviewsApi extends AsyncModules implements ITempla
20
20
  /**
21
21
  * Get one template object by id.
22
22
  *
23
- * @param {number} id - Product marker
23
+ * @param {number} [id] - Product marker
24
24
  * @param {string} [langCode] - Optional parameter language code
25
25
  *
26
26
  * @returns Returns a TemplatePreviewsEntity object
@@ -29,7 +29,7 @@ export default class TemplatePreviewsApi extends AsyncModules implements ITempla
29
29
  /**
30
30
  * Get one template object by marker.
31
31
  *
32
- * @param {string} marker - Product marker
32
+ * @param {string} [marker] - Product marker
33
33
  * @param {string} [langCode] - Optional parameter language code
34
34
  *
35
35
  * @returns Returns a TemplatePreviewsEntity object
@@ -26,7 +26,7 @@ class TemplatePreviewsApi extends asyncModules_1.default {
26
26
  /**
27
27
  * Get one template object by id.
28
28
  *
29
- * @param {number} id - Product marker
29
+ * @param {number} [id] - Product marker
30
30
  * @param {string} [langCode] - Optional parameter language code
31
31
  *
32
32
  * @returns Returns a TemplatePreviewsEntity object
@@ -38,7 +38,7 @@ class TemplatePreviewsApi extends asyncModules_1.default {
38
38
  /**
39
39
  * Get one template object by marker.
40
40
  *
41
- * @param {string} marker - Product marker
41
+ * @param {string} [marker] - Product marker
42
42
  * @param {string} [langCode] - Optional parameter language code
43
43
  *
44
44
  * @returns Returns a TemplatePreviewsEntity object
@@ -14,15 +14,15 @@ export default class UsersApi extends AsyncModules implements IUsers {
14
14
  *
15
15
  * @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.
16
16
  *
17
- * @param {string} [langCode] Required parameter lang code.
17
+ * @param {string} [langCode] - lang code.
18
18
  */
19
19
  getUser(langCode?: string): Promise<IUserEntity | IError>;
20
20
  /**
21
21
  * Updating a single user object.
22
22
  * @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.
23
23
  *
24
- * @param {object} data - Request body.
25
- * @param {string} langCode - Optional language field
24
+ * @param {object} [body] - Request body.
25
+ * @param {string} [langCode] - Optional language field
26
26
  *
27
27
  * @example
28
28
  * {
@@ -46,22 +46,22 @@ export default class UsersApi extends AsyncModules implements IUsers {
46
46
  * "state": {}
47
47
  * }
48
48
  */
49
- updateUser(data: IUserBody, langCode?: string): Promise<boolean | IError>;
49
+ updateUser(body: IUserBody, langCode?: string): Promise<boolean | IError>;
50
50
  /**
51
51
  * Delete a single user object.
52
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
53
  *
54
- * @param {object} data - Request body.
55
- * @param {string} langCode - Optional language field
54
+ * @param {object} [body] - Request body.
55
+ * @param {string} [langCode] - Optional language field
56
56
  *
57
57
  */
58
- deleteUser(data: IUserBody, langCode?: string): Promise<boolean | IError>;
58
+ deleteUser(body: IUserBody, langCode?: string): Promise<boolean | IError>;
59
59
  /**
60
60
  * Adds FCM token for sending Push notification.
61
61
  *
62
62
  * @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.
63
63
  *
64
- * @param {string} token - Cloud messaging token.
64
+ * @param {string} [token] - Cloud messaging token.
65
65
  */
66
66
  addFCMToken(token: string): Promise<boolean | IError>;
67
67
  /**
@@ -69,7 +69,7 @@ export default class UsersApi extends AsyncModules implements IUsers {
69
69
  *
70
70
  * @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
71
  *
72
- * @param {string} token - Cloud messaging token.
72
+ * @param {string} [token] - Cloud messaging token.
73
73
  */
74
74
  deleteFCMToken(token: string): Promise<boolean | IError>;
75
75
  }
@@ -17,7 +17,7 @@ class UsersApi extends asyncModules_1.default {
17
17
  *
18
18
  * @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.
19
19
  *
20
- * @param {string} [langCode] Required parameter lang code.
20
+ * @param {string} [langCode] - lang code.
21
21
  */
22
22
  async getUser(langCode = this.state.lang) {
23
23
  const result = await this._fetchGet(`/me?langCode=${langCode}`);
@@ -27,8 +27,8 @@ class UsersApi extends asyncModules_1.default {
27
27
  * Updating a single user object.
28
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.
29
29
  *
30
- * @param {object} data - Request body.
31
- * @param {string} langCode - Optional language field
30
+ * @param {object} [body] - Request body.
31
+ * @param {string} [langCode] - Optional language field
32
32
  *
33
33
  * @example
34
34
  * {
@@ -52,32 +52,32 @@ class UsersApi extends asyncModules_1.default {
52
52
  * "state": {}
53
53
  * }
54
54
  */
55
- async updateUser(data, langCode = this.state.lang) {
56
- if (!('langCode' in data))
57
- data['langCode'] = langCode;
55
+ async updateUser(body, langCode = this.state.lang) {
56
+ if (!('langCode' in body))
57
+ body['langCode'] = langCode;
58
58
  const result = await this._fetchPut('/me',
59
59
  // eslint-disable-next-line no-prototype-builtins
60
- data.hasOwnProperty('formData')
61
- ? this._normalizePostBody(data, langCode)
62
- : data);
60
+ body.hasOwnProperty('formData')
61
+ ? this._normalizePostBody(body, langCode)
62
+ : body);
63
63
  return result;
64
64
  }
65
65
  /**
66
66
  * Delete a single user object.
67
67
  * @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
68
  *
69
- * @param {object} data - Request body.
70
- * @param {string} langCode - Optional language field
69
+ * @param {object} [body] - Request body.
70
+ * @param {string} [langCode] - Optional language field
71
71
  *
72
72
  */
73
- async deleteUser(data, langCode = this.state.lang) {
74
- if (!('langCode' in data))
75
- data['langCode'] = langCode;
73
+ async deleteUser(body, langCode = this.state.lang) {
74
+ if (!('langCode' in body))
75
+ body['langCode'] = langCode;
76
76
  const result = await this._fetchDelete('/me',
77
77
  // eslint-disable-next-line no-prototype-builtins
78
- data.hasOwnProperty('formData')
79
- ? this._normalizePostBody(data, langCode)
80
- : data);
78
+ body.hasOwnProperty('formData')
79
+ ? this._normalizePostBody(body, langCode)
80
+ : body);
81
81
  return result;
82
82
  }
83
83
  /**
@@ -85,7 +85,7 @@ class UsersApi extends asyncModules_1.default {
85
85
  *
86
86
  * @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.
87
87
  *
88
- * @param {string} token - Cloud messaging token.
88
+ * @param {string} [token] - Cloud messaging token.
89
89
  */
90
90
  async addFCMToken(token) {
91
91
  const result = await this._fetchPost(`/me/fcm-token/${token}`);
@@ -96,7 +96,7 @@ class UsersApi extends asyncModules_1.default {
96
96
  *
97
97
  * @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.
98
98
  *
99
- * @param {string} token - Cloud messaging token.
99
+ * @param {string} [token] - Cloud messaging token.
100
100
  */
101
101
  async deleteFCMToken(token) {
102
102
  const result = await this._fetchDelete(`/me/fcm-token/${token}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oneentry",
3
- "version": "1.0.106",
3
+ "version": "1.0.109",
4
4
  "description": "OneEntry NPM package",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -8,8 +8,8 @@
8
8
  "/dist"
9
9
  ],
10
10
  "scripts": {
11
- "productionBuild": "run-s lint testAll build",
12
- "testAll": "run-s admins attributesets authProvider blocks fileuploading forms formsdata generaltypes locales menus orders pages payments payments productstatuses products templates templatespreview users",
11
+ "productionBuild": "run-s lint testAll build readme",
12
+ "testAll": "run-s admins attributesets authProvider blocks fileuploading forms formsdata generaltypes integrationcollections locales menus orders pages payments payments productstatuses products templates templatespreview users",
13
13
  "admins": "npx jest src/admins/admins.spec.ts",
14
14
  "attributesets": "npx jest src/attribute-sets/attributesets.spec.ts",
15
15
  "authProvider": "npx jest src/auth-provider/authProvider.spec.ts",
@@ -31,7 +31,7 @@
31
31
  "users": "npx jest src/users/users.spec.ts",
32
32
  "lint": "npx eslint",
33
33
  "build": "npx tsc",
34
- "tsdoc": "tsdoc --src=src/admins/adminsApi.ts,src/attribute-sets/attributeSetsApi.ts,src/index.ts"
34
+ "readme": "node readme.js"
35
35
  },
36
36
  "bin": {
37
37
  "oneentry": "./configure.js"
@@ -47,9 +47,9 @@
47
47
  "@microsoft/tsdoc": "^0.15.1",
48
48
  "@types/eslint-config-prettier": "^6.11.3",
49
49
  "@types/jest": "^29.5.14",
50
- "@types/node": "^22.10.10",
51
- "@typescript-eslint/eslint-plugin": "^8.21.0",
52
- "@typescript-eslint/parser": "^8.21.0",
50
+ "@types/node": "^22.13.0",
51
+ "@typescript-eslint/eslint-plugin": "^8.22.0",
52
+ "@typescript-eslint/parser": "^8.22.0",
53
53
  "eslint": "^8.57.1",
54
54
  "eslint-config-prettier": "^10.0.1",
55
55
  "eslint-plugin-import": "^2.31.0",
@@ -60,7 +60,6 @@
60
60
  "npm-run-all": "^4.1.5",
61
61
  "prettier": "^3.4.2",
62
62
  "ts-jest": "^29.2.5",
63
- "tsdoc-markdown": "^1.1.1",
64
63
  "typescript": "^5.7.3"
65
64
  }
66
- }
65
+ }
package/readme.js ADDED
@@ -0,0 +1,103 @@
1
+ import fs from 'fs';
2
+
3
+ let modules = [
4
+ {
5
+ name: 'admins',
6
+ path: 'admins',
7
+ },
8
+ {
9
+ name: 'attributesets',
10
+ path: 'attribute-sets',
11
+ },
12
+ {
13
+ name: 'authprovider',
14
+ path: 'auth-provider',
15
+ },
16
+ {
17
+ name: 'blocks',
18
+ path: 'blocks',
19
+ },
20
+ {
21
+ name: 'events',
22
+ path: 'events',
23
+ },
24
+ {
25
+ name: 'fileuploading',
26
+ path: 'file-uploading',
27
+ },
28
+ {
29
+ name: 'forms',
30
+ path: 'forms',
31
+ },
32
+ {
33
+ name: 'formsdata',
34
+ path: 'formsData',
35
+ },
36
+ {
37
+ name: 'generaltypes',
38
+ path: 'general-types',
39
+ },
40
+ {
41
+ name: 'integrationcollections',
42
+ path: 'integration-collections',
43
+ },
44
+ {
45
+ name: 'locales',
46
+ path: 'locales',
47
+ },
48
+ {
49
+ name: 'menus',
50
+ path: 'menus',
51
+ },
52
+ {
53
+ name: 'orders',
54
+ path: 'orders',
55
+ },
56
+ {
57
+ name: 'pages',
58
+ path: 'pages',
59
+ },
60
+ {
61
+ name: 'payments',
62
+ path: 'payments',
63
+ },
64
+ {
65
+ name: 'productstatuses',
66
+ path: 'product-statuses',
67
+ },
68
+ {
69
+ name: 'products',
70
+ path: 'products',
71
+ },
72
+ {
73
+ name: 'system',
74
+ path: 'system',
75
+ },
76
+ {
77
+ name: 'templates',
78
+ path: 'templates',
79
+ },
80
+ {
81
+ name: 'templatepreviews',
82
+ path: 'templates-preview',
83
+ },
84
+ {
85
+ name: 'users',
86
+ path: 'users',
87
+ },
88
+ {
89
+ name: 'ws',
90
+ path: 'web-socket',
91
+ },
92
+ ];
93
+
94
+ let template = fs.readFileSync('./template.md').toString();
95
+
96
+ modules.forEach((module) => {
97
+ let file = fs
98
+ .readFileSync('./src/' + module.path + '/' + module.name + '.md')
99
+ .toString();
100
+ template = template.replace('# {{' + module.name + '}}', file);
101
+ });
102
+
103
+ fs.writeFileSync(`./README.md`, template);