oneentry 1.0.142 → 1.0.143
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.
- package/dist/admins/adminsApi.d.ts +50 -0
- package/dist/admins/adminsApi.js +65 -0
- package/dist/admins/adminsInterfaces.d.ts +98 -0
- package/dist/admins/adminsInterfaces.js +2 -0
- package/dist/admins/adminsSchemas.d.ts +30 -0
- package/dist/admins/adminsSchemas.js +27 -0
- package/dist/attribute-sets/attributeSetsApi.d.ts +63 -0
- package/dist/attribute-sets/attributeSetsApi.js +98 -0
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +185 -0
- package/dist/attribute-sets/attributeSetsInterfaces.js +2 -0
- package/dist/attribute-sets/attributeSetsSchemas.d.ts +90 -0
- package/dist/attribute-sets/attributeSetsSchemas.js +74 -0
- package/dist/auth-provider/authProviderApi.d.ts +249 -0
- package/dist/auth-provider/authProviderApi.js +354 -0
- package/dist/auth-provider/authProviderSchemas.d.ts +131 -0
- package/dist/auth-provider/authProviderSchemas.js +82 -0
- package/dist/auth-provider/authProvidersInterfaces.d.ts +412 -0
- package/dist/auth-provider/authProvidersInterfaces.js +2 -0
- package/dist/base/asyncModules.d.ts +80 -0
- package/dist/base/asyncModules.js +448 -0
- package/dist/base/result.d.ts +39 -0
- package/dist/base/result.js +154 -0
- package/dist/base/stateModule.d.ts +41 -0
- package/dist/base/stateModule.js +128 -0
- package/dist/base/syncModules.d.ts +286 -0
- package/dist/base/syncModules.js +716 -0
- package/dist/base/utils.d.ts +197 -0
- package/dist/base/utils.js +2 -0
- package/dist/base/validation.d.ts +118 -0
- package/dist/base/validation.js +132 -0
- package/dist/blocks/blocksApi.d.ts +76 -0
- package/dist/blocks/blocksApi.js +188 -0
- package/dist/blocks/blocksInterfaces.d.ts +168 -0
- package/dist/blocks/blocksInterfaces.js +2 -0
- package/dist/blocks/blocksSchemas.d.ts +195 -0
- package/dist/blocks/blocksSchemas.js +43 -0
- package/dist/discounts/discountsApi.d.ts +56 -0
- package/dist/discounts/discountsApi.js +82 -0
- package/dist/discounts/discountsInterfaces.d.ts +145 -0
- package/dist/discounts/discountsInterfaces.js +2 -0
- package/dist/events/eventsApi.d.ts +60 -0
- package/dist/events/eventsApi.js +97 -0
- package/dist/events/eventsInterfaces.d.ts +87 -0
- package/dist/events/eventsInterfaces.js +2 -0
- package/dist/file-uploading/fileUploadingApi.d.ts +88 -0
- package/dist/file-uploading/fileUploadingApi.js +129 -0
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +114 -0
- package/dist/file-uploading/fileUploadingInterfaces.js +2 -0
- package/dist/file-uploading/fileUploadingSchemas.d.ts +22 -0
- package/dist/file-uploading/fileUploadingSchemas.js +21 -0
- package/dist/forms/formsApi.d.ts +42 -0
- package/dist/forms/formsApi.js +57 -0
- package/dist/forms/formsInterfaces.d.ts +134 -0
- package/dist/forms/formsInterfaces.js +2 -0
- package/dist/forms/formsSchemas.d.ts +50 -0
- package/dist/forms/formsSchemas.js +31 -0
- package/dist/forms-data/formsDataApi.d.ts +106 -0
- package/dist/forms-data/formsDataApi.js +189 -0
- package/dist/forms-data/formsDataInterfaces.d.ts +522 -0
- package/dist/forms-data/formsDataInterfaces.js +2 -0
- package/dist/forms-data/formsDataSchemas.d.ts +115 -0
- package/dist/forms-data/formsDataSchemas.js +86 -0
- package/dist/general-types/generalTypesApi.d.ts +28 -0
- package/dist/general-types/generalTypesApi.js +38 -0
- package/dist/general-types/generalTypesInterfaces.d.ts +29 -0
- package/dist/general-types/generalTypesInterfaces.js +2 -0
- package/dist/general-types/generalTypesSchemas.d.ts +50 -0
- package/dist/general-types/generalTypesSchemas.js +35 -0
- package/dist/index.d.ts +100 -0
- package/dist/index.js +103 -0
- package/dist/integration-collections/integrationCollectionsApi.d.ts +163 -0
- package/dist/integration-collections/integrationCollectionsApi.js +220 -0
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +313 -0
- package/dist/integration-collections/integrationCollectionsInterfaces.js +2 -0
- package/dist/integration-collections/integrationCollectionsSchemas.d.ts +80 -0
- package/dist/integration-collections/integrationCollectionsSchemas.js +61 -0
- package/dist/locales/localesApi.d.ts +27 -0
- package/dist/locales/localesApi.js +37 -0
- package/dist/locales/localesInterfaces.d.ts +40 -0
- package/dist/locales/localesInterfaces.js +2 -0
- package/dist/locales/localesSchemas.d.ts +32 -0
- package/dist/locales/localesSchemas.js +26 -0
- package/dist/menus/menusApi.d.ts +29 -0
- package/dist/menus/menusApi.js +39 -0
- package/dist/menus/menusInterfaces.d.ts +87 -0
- package/dist/menus/menusInterfaces.js +3 -0
- package/dist/menus/menusSchemas.d.ts +16 -0
- package/dist/menus/menusSchemas.js +28 -0
- package/dist/orders/ordersApi.d.ts +149 -0
- package/dist/orders/ordersApi.js +203 -0
- package/dist/orders/ordersInterfaces.d.ts +520 -0
- package/dist/orders/ordersInterfaces.js +2 -0
- package/dist/orders/ordersSchemas.d.ts +120 -0
- package/dist/orders/ordersSchemas.js +101 -0
- package/dist/pages/pagesApi.d.ts +151 -0
- package/dist/pages/pagesApi.js +390 -0
- package/dist/pages/pagesInterfaces.d.ts +284 -0
- package/dist/pages/pagesInterfaces.js +2 -0
- package/dist/pages/pagesSchemas.d.ts +85 -0
- package/dist/pages/pagesSchemas.js +46 -0
- package/dist/payments/paymentsApi.d.ts +82 -0
- package/dist/payments/paymentsApi.js +121 -0
- package/dist/payments/paymentsInterfaces.d.ts +200 -0
- package/dist/payments/paymentsInterfaces.js +2 -0
- package/dist/payments/paymentsSchemas.d.ts +100 -0
- package/dist/payments/paymentsSchemas.js +65 -0
- package/dist/product-statuses/productStatusesApi.d.ts +47 -0
- package/dist/product-statuses/productStatusesApi.js +70 -0
- package/dist/product-statuses/productStatusesInterfaces.d.ts +62 -0
- package/dist/product-statuses/productStatusesInterfaces.js +2 -0
- package/dist/product-statuses/productStatusesSchemas.d.ts +34 -0
- package/dist/product-statuses/productStatusesSchemas.js +30 -0
- package/dist/products/productsApi.d.ts +365 -0
- package/dist/products/productsApi.js +459 -0
- package/dist/products/productsInterfaces.d.ts +577 -0
- package/dist/products/productsInterfaces.js +2 -0
- package/dist/products/productsSchemas.d.ts +200 -0
- package/dist/products/productsSchemas.js +98 -0
- package/dist/sitemap/sitemapApi.d.ts +35 -0
- package/dist/sitemap/sitemapApi.js +45 -0
- package/dist/sitemap/sitemapInterfaces.d.ts +40 -0
- package/dist/sitemap/sitemapInterfaces.js +2 -0
- package/dist/system/systemApi.d.ts +43 -0
- package/dist/system/systemApi.js +56 -0
- package/dist/system/systemInterfaces.d.ts +29 -0
- package/dist/system/systemInterfaces.js +2 -0
- package/dist/templates/templatesApi.d.ts +49 -0
- package/dist/templates/templatesApi.js +75 -0
- package/dist/templates/templatesInterfaces.d.ts +67 -0
- package/dist/templates/templatesInterfaces.js +2 -0
- package/dist/templates/templatesSchemas.d.ts +48 -0
- package/dist/templates/templatesSchemas.js +31 -0
- package/dist/templates-preview/templatesPreviewApi.d.ts +38 -0
- package/dist/templates-preview/templatesPreviewApi.js +53 -0
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +119 -0
- package/dist/templates-preview/templatesPreviewInterfaces.js +2 -0
- package/dist/templates-preview/templatesPreviewSchemas.d.ts +83 -0
- package/dist/templates-preview/templatesPreviewSchemas.js +48 -0
- package/dist/users/usersApi.d.ts +143 -0
- package/dist/users/usersApi.js +171 -0
- package/dist/users/usersInterfaces.d.ts +229 -0
- package/dist/users/usersInterfaces.js +2 -0
- package/dist/users/usersSchemas.d.ts +38 -0
- package/dist/users/usersSchemas.js +28 -0
- package/dist/web-socket/wsApi.d.ts +25 -0
- package/dist/web-socket/wsApi.js +45 -0
- package/dist/web-socket/wsInterfaces.d.ts +16 -0
- package/dist/web-socket/wsInterfaces.js +2 -0
- package/package.json +3 -81
|
@@ -0,0 +1,45 @@
|
|
|
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 socket_io_client_1 = require("socket.io-client");
|
|
7
|
+
const asyncModules_1 = __importDefault(require("../base/asyncModules"));
|
|
8
|
+
/**
|
|
9
|
+
* Controllers for working with users
|
|
10
|
+
* @handle /api/content/ws
|
|
11
|
+
*/
|
|
12
|
+
class WsApi extends asyncModules_1.default {
|
|
13
|
+
/**
|
|
14
|
+
* Constructor
|
|
15
|
+
* @param {StateModule} state - StateModule
|
|
16
|
+
*/
|
|
17
|
+
constructor(state) {
|
|
18
|
+
super(state);
|
|
19
|
+
this._url = state.url + '/api/content/ws';
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Creates an instance of an object Socket.io with a connection.
|
|
23
|
+
* @handleName connect
|
|
24
|
+
* @returns {Socket} Returns a Socket instance.
|
|
25
|
+
* @description Creates an instance of an object Socket.io with a connection. 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
|
+
connect() {
|
|
29
|
+
if (!this.state.accessToken) {
|
|
30
|
+
// eslint-disable-next-line no-undef, no-console
|
|
31
|
+
console.error('User is unauthorized');
|
|
32
|
+
}
|
|
33
|
+
const socket = (0, socket_io_client_1.io)(this.state.url, {
|
|
34
|
+
autoConnect: true,
|
|
35
|
+
path: '/api/content/ws',
|
|
36
|
+
transports: ['websocket'],
|
|
37
|
+
extraHeaders: {
|
|
38
|
+
Authorization: 'Bearer ' + this.state.accessToken,
|
|
39
|
+
'x-app-token': this.state.token,
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
return socket;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.default = WsApi;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Socket } from 'socket.io-client';
|
|
2
|
+
/**
|
|
3
|
+
* @interface IWS
|
|
4
|
+
* @description This interface defines a method for establishing a WebSocket connection.
|
|
5
|
+
*/
|
|
6
|
+
interface IWS {
|
|
7
|
+
/**
|
|
8
|
+
* Creates an instance of an object Socket.io with a connection.
|
|
9
|
+
* @handleName connect
|
|
10
|
+
* @returns {Socket} Returns a Socket instance.
|
|
11
|
+
* @description Creates an instance of an object Socket.io with a connection. This method requires user authorization.
|
|
12
|
+
* @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}.
|
|
13
|
+
*/
|
|
14
|
+
connect(): Socket;
|
|
15
|
+
}
|
|
16
|
+
export type { IWS };
|
package/package.json
CHANGED
|
@@ -1,97 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oneentry",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.143",
|
|
4
4
|
"description": "OneEntry NPM package",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"/dist"
|
|
9
9
|
],
|
|
10
|
-
"scripts": {
|
|
11
|
-
"productionBuild": "run-s lint testAll build",
|
|
12
|
-
"testAll": "run-s admins attributesets authProvider blocks discounts events fileuploading forms formsdata generaltypes integrationcollections locales menus orders pages payments productstatuses products templates templatespreview users",
|
|
13
|
-
"admins": "npx jest src/admins/tests/admins.spec.ts",
|
|
14
|
-
"update admins": "npx jest src/admins/tests/admins.spec.ts --updateSnapshot",
|
|
15
|
-
"attributesets": "npx jest src/attribute-sets/tests/attributesets.spec.ts",
|
|
16
|
-
"update attributesets": "npx jest src/attribute-sets/tests/attributesets.spec.ts --updateSnapshot",
|
|
17
|
-
"authProvider": "npx jest src/auth-provider/tests/authProvider.spec.ts",
|
|
18
|
-
"update authProvider": "npx jest src/auth-provider/tests/authProvider.spec.ts --updateSnapshot",
|
|
19
|
-
"blocks": "npx jest src/blocks/tests/blocks.spec.ts",
|
|
20
|
-
"update blocks": "npx jest src/blocks/tests/blocks.spec.ts --updateSnapshot",
|
|
21
|
-
"discounts": "npx jest src/discounts/tests/discounts.spec.ts",
|
|
22
|
-
"update discounts": "npx jest src/discounts/tests/discounts.spec.ts --updateSnapshot",
|
|
23
|
-
"events": "npx jest src/events/tests/events.spec.ts",
|
|
24
|
-
"update events": "npx jest src/events/tests/events.spec.ts --updateSnapshot",
|
|
25
|
-
"fileuploading": "npx jest src/file-uploading/tests/fileuploading.spec.ts",
|
|
26
|
-
"update fileuploading": "npx jest src/file-uploading/tests/fileuploading.spec.ts --updateSnapshot",
|
|
27
|
-
"forms": "npx jest src/forms/tests/forms.spec.ts",
|
|
28
|
-
"update forms": "npx jest src/forms/tests/forms.spec.ts --updateSnapshot",
|
|
29
|
-
"formsdata": "npx jest src/forms-data/tests/formsdata.spec.ts",
|
|
30
|
-
"update formsdata": "npx jest src/forms-data/tests/formsdata.spec.ts --updateSnapshot",
|
|
31
|
-
"generaltypes": "npx jest src/general-types/tests/generaltypes.spec.ts",
|
|
32
|
-
"update generaltypes": "npx jest src/general-types/tests/generaltypes.spec.ts --updateSnapshot",
|
|
33
|
-
"integrationcollections": "npx jest src/integration-collections/tests/integrationcollections.spec.ts",
|
|
34
|
-
"update integrationcollections": "npx jest src/integration-collections/tests/integrationcollections.spec.ts --updateSnapshot",
|
|
35
|
-
"locales": "npx jest src/locales/tests/locales.spec.ts",
|
|
36
|
-
"update locales": "npx jest src/locales/tests/locales.spec.ts --updateSnapshot",
|
|
37
|
-
"menus": "npx jest src/menus/tests/menus.spec.ts",
|
|
38
|
-
"update menus": "npx jest src/menus/tests/menus.spec.ts --updateSnapshot",
|
|
39
|
-
"orders": "npx jest src/orders/tests/orders.spec.ts",
|
|
40
|
-
"update orders": "npx jest src/orders/tests/orders.spec.ts --updateSnapshot",
|
|
41
|
-
"pages": "npx jest src/pages/tests/pages.spec.ts",
|
|
42
|
-
"update pages": "npx jest src/pages/tests/pages.spec.ts --updateSnapshot",
|
|
43
|
-
"payments": "npx jest src/payments/tests/payments.spec.ts",
|
|
44
|
-
"update payments": "npx jest src/payments/tests/payments.spec.ts --updateSnapshot",
|
|
45
|
-
"productstatuses": "npx jest src/product-statuses/tests/productstatuses.spec.ts",
|
|
46
|
-
"update productstatuses": "npx jest src/product-statuses/tests/productstatuses.spec.ts --updateSnapshot",
|
|
47
|
-
"products": "npx jest src/products/tests/products.spec.ts",
|
|
48
|
-
"update products": "npx jest src/products/tests/products.spec.ts --updateSnapshot",
|
|
49
|
-
"sitemap": "npx jest src/sitemap/tests/sitemap.spec.ts",
|
|
50
|
-
"update sitemap": "npx jest src/sitemap/tests/sitemap.spec.ts --updateSnapshot",
|
|
51
|
-
"templates": "npx jest src/templates/tests/templates.spec.ts",
|
|
52
|
-
"update templates": "npx jest src/templates/tests/templates.spec.ts --updateSnapshot",
|
|
53
|
-
"templatespreview": "npx jest src/templates-preview/tests/templatespreview.spec.ts",
|
|
54
|
-
"update templatespreview": "npx jest src/templates-preview/tests/templatespreview.spec.ts --updateSnapshot",
|
|
55
|
-
"users": "npx jest src/users/tests/users.spec.ts",
|
|
56
|
-
"update users": "npx jest src/users/tests/users.spec.ts --updateSnapshot",
|
|
57
|
-
"lint": "npx eslint .",
|
|
58
|
-
"tsc": "npx tsc --noEmit --watch false",
|
|
59
|
-
"lintFix": "npx eslint . --fix",
|
|
60
|
-
"build": "npx tsc && node scripts/copy-to-output.js",
|
|
61
|
-
"updateSnapshots": "npx jest --updateSnapshot"
|
|
62
|
-
},
|
|
63
10
|
"bin": {
|
|
64
11
|
"oneentry": "./configure.js"
|
|
65
12
|
},
|
|
66
|
-
"author": "ONEENTRY PORTAL
|
|
13
|
+
"author": "ONEENTRY PORTAL LLC",
|
|
67
14
|
"license": "ISC",
|
|
68
15
|
"dependencies": {
|
|
69
16
|
"socket.io-client": "^4.8.3",
|
|
70
17
|
"zod": "^4.3.6"
|
|
71
|
-
},
|
|
72
|
-
"devDependencies": {
|
|
73
|
-
"@eslint/eslintrc": "^3.3.5",
|
|
74
|
-
"@jest/globals": "^30.3.0",
|
|
75
|
-
"@types/eslint-config-prettier": "^6.11.3",
|
|
76
|
-
"@types/jest": "^30.0.0",
|
|
77
|
-
"@types/node": "^25.4.0",
|
|
78
|
-
"@typescript-eslint/eslint-plugin": "^8.57.0",
|
|
79
|
-
"@typescript-eslint/parser": "^8.57.0",
|
|
80
|
-
"eslint": "^9.39.4",
|
|
81
|
-
"eslint-config-prettier": "^10.1.8",
|
|
82
|
-
"eslint-plugin-import": "^2.32.0",
|
|
83
|
-
"eslint-plugin-jest": "^29.15.0",
|
|
84
|
-
"eslint-plugin-jest-extended": "^3.0.1",
|
|
85
|
-
"eslint-plugin-jsdoc": "^62.7.1",
|
|
86
|
-
"eslint-plugin-prettier": "^5.5.5",
|
|
87
|
-
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
88
|
-
"jest": "^30.3.0",
|
|
89
|
-
"jest-extended": "^7.0.0",
|
|
90
|
-
"jsdoc": "^4.0.5",
|
|
91
|
-
"npm-run-all": "^4.1.5",
|
|
92
|
-
"prettier": "^3.8.1",
|
|
93
|
-
"ts-jest": "^29.4.6",
|
|
94
|
-
"ts-node": "^10.9.2",
|
|
95
|
-
"typescript": "^5.9.3"
|
|
96
18
|
}
|
|
97
|
-
}
|
|
19
|
+
}
|