oneentry 1.0.75 → 1.0.76
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/README.md +1 -10
- package/dist/auth-provider/authProviderApi.d.ts +2 -2
- package/dist/auth-provider/authProvidersInterfaces.d.ts +2 -6
- package/dist/base/asyncModules.js +3 -14
- package/dist/base/stateModule.d.ts +2 -0
- package/dist/base/stateModule.js +19 -0
- package/package.json +1 -1
- package/dist/_cjs/admins/adminsApi.d.ts +0 -14
- package/dist/_cjs/admins/adminsApi.js +0 -34
- package/dist/_cjs/admins/adminsApi.js.map +0 -1
- package/dist/_cjs/admins/adminsInterfaces.d.ts +0 -32
- package/dist/_cjs/admins/adminsInterfaces.js +0 -3
- package/dist/_cjs/admins/adminsInterfaces.js.map +0 -1
- package/dist/_cjs/attribute-set/attributeSetApi.d.ts +0 -24
- package/dist/_cjs/attribute-set/attributeSetApi.js +0 -49
- package/dist/_cjs/attribute-set/attributeSetApi.js.map +0 -1
- package/dist/_cjs/attribute-set/attributeSetInterfaces.d.ts +0 -23
- package/dist/_cjs/attribute-set/attributeSetInterfaces.js +0 -3
- package/dist/_cjs/attribute-set/attributeSetInterfaces.js.map +0 -1
- package/dist/_cjs/base/oneEntry.d.ts +0 -9
- package/dist/_cjs/base/oneEntry.js +0 -55
- package/dist/_cjs/base/oneEntry.js.map +0 -1
- package/dist/_cjs/base/utils.d.ts +0 -32
- package/dist/_cjs/base/utils.js +0 -32
- package/dist/_cjs/base/utils.js.map +0 -1
- package/dist/_cjs/forms/formsApi.d.ts +0 -26
- package/dist/_cjs/forms/formsApi.js +0 -56
- package/dist/_cjs/forms/formsApi.js.map +0 -1
- package/dist/_cjs/forms/formsInterfaces.d.ts +0 -28
- package/dist/_cjs/forms/formsInterfaces.js +0 -3
- package/dist/_cjs/forms/formsInterfaces.js.map +0 -1
- package/dist/_cjs/formsData/formsDataApi.d.ts +0 -41
- package/dist/_cjs/formsData/formsDataApi.js +0 -71
- package/dist/_cjs/formsData/formsDataApi.js.map +0 -1
- package/dist/_cjs/formsData/formsDataInterfaces.d.ts +0 -25
- package/dist/_cjs/formsData/formsDataInterfaces.js +0 -3
- package/dist/_cjs/formsData/formsDataInterfaces.js.map +0 -1
- package/dist/_cjs/general-types/generalTypesApi.d.ts +0 -14
- package/dist/_cjs/general-types/generalTypesApi.js +0 -34
- package/dist/_cjs/general-types/generalTypesApi.js.map +0 -1
- package/dist/_cjs/general-types/generalTypesInterfaces.d.ts +0 -9
- package/dist/_cjs/general-types/generalTypesInterfaces.js +0 -3
- package/dist/_cjs/general-types/generalTypesInterfaces.js.map +0 -1
- package/dist/_cjs/index.d.ts +0 -35
- package/dist/_cjs/index.js +0 -55
- package/dist/_cjs/index.js.map +0 -1
- package/dist/_cjs/locales/localesApi.d.ts +0 -14
- package/dist/_cjs/locales/localesApi.js +0 -34
- package/dist/_cjs/locales/localesApi.js.map +0 -1
- package/dist/_cjs/locales/localesInterfaces.d.ts +0 -15
- package/dist/_cjs/locales/localesInterfaces.js +0 -3
- package/dist/_cjs/locales/localesInterfaces.js.map +0 -1
- package/dist/_cjs/markers/markersApi.d.ts +0 -35
- package/dist/_cjs/markers/markersApi.js +0 -65
- package/dist/_cjs/markers/markersApi.js.map +0 -1
- package/dist/_cjs/markers/markersInterfaces.d.ts +0 -16
- package/dist/_cjs/markers/markersInterfaces.js +0 -3
- package/dist/_cjs/markers/markersInterfaces.js.map +0 -1
- package/dist/_cjs/menus/menusApi.d.ts +0 -16
- package/dist/_cjs/menus/menusApi.js +0 -36
- package/dist/_cjs/menus/menusApi.js.map +0 -1
- package/dist/_cjs/menus/menusInterfaces.d.ts +0 -18
- package/dist/_cjs/menus/menusInterfaces.js +0 -3
- package/dist/_cjs/menus/menusInterfaces.js.map +0 -1
- package/dist/_cjs/modules/modulesApi.d.ts +0 -14
- package/dist/_cjs/modules/modulesApi.js +0 -34
- package/dist/_cjs/modules/modulesApi.js.map +0 -1
- package/dist/_cjs/modules/modulesInterfaces.d.ts +0 -19
- package/dist/_cjs/modules/modulesInterfaces.js +0 -3
- package/dist/_cjs/modules/modulesInterfaces.js.map +0 -1
- package/dist/_cjs/pages/pagesApi.d.ts +0 -74
- package/dist/_cjs/pages/pagesApi.js +0 -137
- package/dist/_cjs/pages/pagesApi.js.map +0 -1
- package/dist/_cjs/pages/pagesInterfaces.d.ts +0 -39
- package/dist/_cjs/pages/pagesInterfaces.js +0 -3
- package/dist/_cjs/pages/pagesInterfaces.js.map +0 -1
- package/dist/_cjs/product-statuses/productStatusesApi.d.ts +0 -38
- package/dist/_cjs/product-statuses/productStatusesApi.js +0 -73
- package/dist/_cjs/product-statuses/productStatusesApi.js.map +0 -1
- package/dist/_cjs/product-statuses/productStatusesInterfaces.d.ts +0 -15
- package/dist/_cjs/product-statuses/productStatusesInterfaces.js +0 -3
- package/dist/_cjs/product-statuses/productStatusesInterfaces.js.map +0 -1
- package/dist/_cjs/products/productsApi.d.ts +0 -195
- package/dist/_cjs/products/productsApi.js +0 -295
- package/dist/_cjs/products/productsApi.js.map +0 -1
- package/dist/_cjs/products/productsInterfaces.d.ts +0 -83
- package/dist/_cjs/products/productsInterfaces.js +0 -3
- package/dist/_cjs/products/productsInterfaces.js.map +0 -1
- package/dist/_cjs/templates/templatesApi.d.ts +0 -32
- package/dist/_cjs/templates/templatesApi.js +0 -72
- package/dist/_cjs/templates/templatesApi.js.map +0 -1
- package/dist/_cjs/templates/templatesInterfaces.d.ts +0 -30
- package/dist/_cjs/templates/templatesInterfaces.js +0 -3
- package/dist/_cjs/templates/templatesInterfaces.js.map +0 -1
- package/dist/_cjs/templates-preview/templatesPreviewApi.d.ts +0 -30
- package/dist/_cjs/templates-preview/templatesPreviewApi.js +0 -60
- package/dist/_cjs/templates-preview/templatesPreviewApi.js.map +0 -1
- package/dist/_cjs/templates-preview/templatesPreviewInterfaces.d.ts +0 -27
- package/dist/_cjs/templates-preview/templatesPreviewInterfaces.js +0 -3
- package/dist/_cjs/templates-preview/templatesPreviewInterfaces.js.map +0 -1
- package/dist/_esm/admins/adminsApi.d.ts +0 -14
- package/dist/_esm/admins/adminsApi.js +0 -31
- package/dist/_esm/admins/adminsApi.js.map +0 -1
- package/dist/_esm/admins/adminsInterfaces.d.ts +0 -32
- package/dist/_esm/admins/adminsInterfaces.js +0 -2
- package/dist/_esm/admins/adminsInterfaces.js.map +0 -1
- package/dist/_esm/attribute-set/attributeSetApi.d.ts +0 -24
- package/dist/_esm/attribute-set/attributeSetApi.js +0 -46
- package/dist/_esm/attribute-set/attributeSetApi.js.map +0 -1
- package/dist/_esm/attribute-set/attributeSetInterfaces.d.ts +0 -23
- package/dist/_esm/attribute-set/attributeSetInterfaces.js +0 -2
- package/dist/_esm/attribute-set/attributeSetInterfaces.js.map +0 -1
- package/dist/_esm/base/oneEntry.d.ts +0 -9
- package/dist/_esm/base/oneEntry.js +0 -52
- package/dist/_esm/base/oneEntry.js.map +0 -1
- package/dist/_esm/base/utils.d.ts +0 -32
- package/dist/_esm/base/utils.js +0 -30
- package/dist/_esm/base/utils.js.map +0 -1
- package/dist/_esm/forms/formsApi.d.ts +0 -26
- package/dist/_esm/forms/formsApi.js +0 -53
- package/dist/_esm/forms/formsApi.js.map +0 -1
- package/dist/_esm/forms/formsInterfaces.d.ts +0 -28
- package/dist/_esm/forms/formsInterfaces.js +0 -2
- package/dist/_esm/forms/formsInterfaces.js.map +0 -1
- package/dist/_esm/formsData/formsDataApi.d.ts +0 -41
- package/dist/_esm/formsData/formsDataApi.js +0 -68
- package/dist/_esm/formsData/formsDataApi.js.map +0 -1
- package/dist/_esm/formsData/formsDataInterfaces.d.ts +0 -25
- package/dist/_esm/formsData/formsDataInterfaces.js +0 -2
- package/dist/_esm/formsData/formsDataInterfaces.js.map +0 -1
- package/dist/_esm/general-types/generalTypesApi.d.ts +0 -14
- package/dist/_esm/general-types/generalTypesApi.js +0 -31
- package/dist/_esm/general-types/generalTypesApi.js.map +0 -1
- package/dist/_esm/general-types/generalTypesInterfaces.d.ts +0 -9
- package/dist/_esm/general-types/generalTypesInterfaces.js +0 -2
- package/dist/_esm/general-types/generalTypesInterfaces.js.map +0 -1
- package/dist/_esm/index.d.ts +0 -35
- package/dist/_esm/index.js +0 -51
- package/dist/_esm/index.js.map +0 -1
- package/dist/_esm/locales/localesApi.d.ts +0 -14
- package/dist/_esm/locales/localesApi.js +0 -31
- package/dist/_esm/locales/localesApi.js.map +0 -1
- package/dist/_esm/locales/localesInterfaces.d.ts +0 -15
- package/dist/_esm/locales/localesInterfaces.js +0 -2
- package/dist/_esm/locales/localesInterfaces.js.map +0 -1
- package/dist/_esm/markers/markersApi.d.ts +0 -35
- package/dist/_esm/markers/markersApi.js +0 -62
- package/dist/_esm/markers/markersApi.js.map +0 -1
- package/dist/_esm/markers/markersInterfaces.d.ts +0 -16
- package/dist/_esm/markers/markersInterfaces.js +0 -2
- package/dist/_esm/markers/markersInterfaces.js.map +0 -1
- package/dist/_esm/menus/menusApi.d.ts +0 -16
- package/dist/_esm/menus/menusApi.js +0 -33
- package/dist/_esm/menus/menusApi.js.map +0 -1
- package/dist/_esm/menus/menusInterfaces.d.ts +0 -18
- package/dist/_esm/menus/menusInterfaces.js +0 -2
- package/dist/_esm/menus/menusInterfaces.js.map +0 -1
- package/dist/_esm/modules/modulesApi.d.ts +0 -14
- package/dist/_esm/modules/modulesApi.js +0 -31
- package/dist/_esm/modules/modulesApi.js.map +0 -1
- package/dist/_esm/modules/modulesInterfaces.d.ts +0 -19
- package/dist/_esm/modules/modulesInterfaces.js +0 -2
- package/dist/_esm/modules/modulesInterfaces.js.map +0 -1
- package/dist/_esm/pages/pagesApi.d.ts +0 -74
- package/dist/_esm/pages/pagesApi.js +0 -134
- package/dist/_esm/pages/pagesApi.js.map +0 -1
- package/dist/_esm/pages/pagesInterfaces.d.ts +0 -39
- package/dist/_esm/pages/pagesInterfaces.js +0 -2
- package/dist/_esm/pages/pagesInterfaces.js.map +0 -1
- package/dist/_esm/product-statuses/productStatusesApi.d.ts +0 -38
- package/dist/_esm/product-statuses/productStatusesApi.js +0 -70
- package/dist/_esm/product-statuses/productStatusesApi.js.map +0 -1
- package/dist/_esm/product-statuses/productStatusesInterfaces.d.ts +0 -15
- package/dist/_esm/product-statuses/productStatusesInterfaces.js +0 -2
- package/dist/_esm/product-statuses/productStatusesInterfaces.js.map +0 -1
- package/dist/_esm/products/productsApi.d.ts +0 -195
- package/dist/_esm/products/productsApi.js +0 -292
- package/dist/_esm/products/productsApi.js.map +0 -1
- package/dist/_esm/products/productsInterfaces.d.ts +0 -83
- package/dist/_esm/products/productsInterfaces.js +0 -2
- package/dist/_esm/products/productsInterfaces.js.map +0 -1
- package/dist/_esm/templates/templatesApi.d.ts +0 -32
- package/dist/_esm/templates/templatesApi.js +0 -69
- package/dist/_esm/templates/templatesApi.js.map +0 -1
- package/dist/_esm/templates/templatesInterfaces.d.ts +0 -30
- package/dist/_esm/templates/templatesInterfaces.js +0 -2
- package/dist/_esm/templates/templatesInterfaces.js.map +0 -1
- package/dist/_esm/templates-preview/templatesPreviewApi.d.ts +0 -30
- package/dist/_esm/templates-preview/templatesPreviewApi.js +0 -57
- package/dist/_esm/templates-preview/templatesPreviewApi.js.map +0 -1
- package/dist/_esm/templates-preview/templatesPreviewInterfaces.d.ts +0 -27
- package/dist/_esm/templates-preview/templatesPreviewInterfaces.js +0 -2
- package/dist/_esm/templates-preview/templatesPreviewInterfaces.js.map +0 -1
- package/dist/_types/admins/adminsApi.d.ts +0 -14
- package/dist/_types/admins/adminsInterfaces.d.ts +0 -32
- package/dist/_types/attribute-set/attributeSetApi.d.ts +0 -24
- package/dist/_types/attribute-set/attributeSetInterfaces.d.ts +0 -23
- package/dist/_types/base/oneEntry.d.ts +0 -9
- package/dist/_types/base/utils.d.ts +0 -32
- package/dist/_types/forms/formsApi.d.ts +0 -26
- package/dist/_types/forms/formsInterfaces.d.ts +0 -28
- package/dist/_types/formsData/formsDataApi.d.ts +0 -41
- package/dist/_types/formsData/formsDataInterfaces.d.ts +0 -25
- package/dist/_types/general-types/generalTypesApi.d.ts +0 -14
- package/dist/_types/general-types/generalTypesInterfaces.d.ts +0 -9
- package/dist/_types/index.d.ts +0 -35
- package/dist/_types/locales/localesApi.d.ts +0 -14
- package/dist/_types/locales/localesInterfaces.d.ts +0 -15
- package/dist/_types/markers/markersApi.d.ts +0 -35
- package/dist/_types/markers/markersInterfaces.d.ts +0 -16
- package/dist/_types/menus/menusApi.d.ts +0 -16
- package/dist/_types/menus/menusInterfaces.d.ts +0 -18
- package/dist/_types/modules/modulesApi.d.ts +0 -14
- package/dist/_types/modules/modulesInterfaces.d.ts +0 -19
- package/dist/_types/pages/pagesApi.d.ts +0 -74
- package/dist/_types/pages/pagesInterfaces.d.ts +0 -39
- package/dist/_types/product-statuses/productStatusesApi.d.ts +0 -38
- package/dist/_types/product-statuses/productStatusesInterfaces.d.ts +0 -15
- package/dist/_types/products/productsApi.d.ts +0 -195
- package/dist/_types/products/productsInterfaces.d.ts +0 -83
- package/dist/_types/templates/templatesApi.d.ts +0 -32
- package/dist/_types/templates/templatesInterfaces.d.ts +0 -30
- package/dist/_types/templates-preview/templatesPreviewApi.d.ts +0 -30
- package/dist/_types/templates-preview/templatesPreviewInterfaces.d.ts +0 -27
- package/dist/admins/adminsApi.js.map +0 -1
- package/dist/admins/adminsInterfaces.js.map +0 -1
- package/dist/attribute-set/AttributeSetApi.d.ts +0 -24
- package/dist/attribute-set/AttributeSetApi.js +0 -49
- package/dist/attribute-set/AttributeSetApi.js.map +0 -1
- package/dist/attribute-set/attributeSetInterfaces.d.ts +0 -23
- package/dist/attribute-set/attributeSetInterfaces.js +0 -3
- package/dist/attribute-set/attributeSetInterfaces.js.map +0 -1
- package/dist/base/attributes.d.ts +0 -6
- package/dist/base/attributes.js +0 -6
- package/dist/base/modules.d.ts +0 -14
- package/dist/base/modules.js +0 -173
- package/dist/base/oneEntry.d.ts +0 -0
- package/dist/base/oneEntry.js +0 -74
- package/dist/base/oneEntry.js.map +0 -1
- package/dist/base/utils.js.map +0 -1
- package/dist/file-uploding/fileUploadingApi.js.map +0 -1
- package/dist/file-uploding/fileUploadingInterfaces.js.map +0 -1
- package/dist/forms/formsApi.js.map +0 -1
- package/dist/forms/formsInterfaces.js.map +0 -1
- package/dist/formsData/formsDataApi.js.map +0 -1
- package/dist/formsData/formsDataInterfaces.js.map +0 -1
- package/dist/general-types/GeneralTypesApi.d.ts +0 -15
- package/dist/general-types/GeneralTypesApi.js +0 -22
- package/dist/general-types/GeneralTypesApi.js.map +0 -1
- package/dist/general-types/generalTypesInterfaces.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/locales/localesApi.js.map +0 -1
- package/dist/locales/localesInterfaces.js.map +0 -1
- package/dist/markers/markersApi.d.ts +0 -37
- package/dist/markers/markersApi.js +0 -50
- package/dist/markers/markersApi.js.map +0 -1
- package/dist/markers/markersInterfaces.d.ts +0 -37
- package/dist/markers/markersInterfaces.js +0 -2
- package/dist/markers/markersInterfaces.js.map +0 -1
- package/dist/menus/menusApi.js.map +0 -1
- package/dist/menus/menusInterfaces.js.map +0 -1
- package/dist/modules/modulesApi.d.ts +0 -14
- package/dist/modules/modulesApi.js +0 -34
- package/dist/modules/modulesApi.js.map +0 -1
- package/dist/modules/modulesInterfaces.d.ts +0 -19
- package/dist/modules/modulesInterfaces.js +0 -3
- package/dist/modules/modulesInterfaces.js.map +0 -1
- package/dist/pages/pagesApi.js.map +0 -1
- package/dist/pages/pagesInterfaces.js.map +0 -1
- package/dist/product-statuses/productStatusesApi.js.map +0 -1
- package/dist/product-statuses/productStatusesInterfaces.js.map +0 -1
- package/dist/products/productsApi.js.map +0 -1
- package/dist/products/productsInterfaces.js.map +0 -1
- package/dist/system/systemApi.js.map +0 -1
- package/dist/system/systemInterfaces.js.map +0 -1
- package/dist/templates/templatesApi.js.map +0 -1
- package/dist/templates/templatesInterfaces.js.map +0 -1
- package/dist/templates-preview/templatesPreviewApi.js.map +0 -1
- package/dist/templates-preview/templatesPreviewInterfaces.js.map +0 -1
package/README.md
CHANGED
|
@@ -535,16 +535,7 @@ example: 1 <br>
|
|
|
535
535
|
const value = await AuthProvider.generateCode('email', 'test@trer.com', 'auth')
|
|
536
536
|
```
|
|
537
537
|
|
|
538
|
-
> This method receives a code to activate the user.
|
|
539
|
-
|
|
540
|
-
Example return:
|
|
541
|
-
|
|
542
|
-
```json
|
|
543
|
-
{
|
|
544
|
-
"userIdentifier": "example@oneentry.cloud",
|
|
545
|
-
"eventIdentifier": "auth"
|
|
546
|
-
}
|
|
547
|
-
```
|
|
538
|
+
> This method receives a code to activate the user. Code is returned through the corresponding user notification method
|
|
548
539
|
|
|
549
540
|
|
|
550
541
|
### AuthProvider.checkCode(marker, userIdentifier, code)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import AsyncModules from "../base/asyncModules";
|
|
2
|
-
import { IAuthProvider, ISignUpData, ISignUpEntity,
|
|
2
|
+
import { IAuthProvider, ISignUpData, ISignUpEntity, IAuthEntity, IAuthProvidersEntity, IAuthPostBody } from "./authProvidersInterfaces";
|
|
3
3
|
import StateModule from "../base/stateModule";
|
|
4
4
|
/**
|
|
5
5
|
* Controllers for working with auth services.
|
|
@@ -48,7 +48,7 @@ export default class AuthProviderApi extends AsyncModules implements IAuthProvid
|
|
|
48
48
|
* @param {string} userIdentifier - The text identifier of the user's object (user login)
|
|
49
49
|
* @param {string} eventIdentifier - Text identifier of the event object for which the code is generated
|
|
50
50
|
*/
|
|
51
|
-
generateCode(marker: string, userIdentifier: string, eventIdentifier: string): Promise<
|
|
51
|
+
generateCode(marker: string, userIdentifier: string, eventIdentifier: string): Promise<void>;
|
|
52
52
|
/**
|
|
53
53
|
* User activation code verification. Returns true (if the code is correct) or false (if it is incorrect).
|
|
54
54
|
* @param {string} marker - The text identifier of the authorization provider. Example - email
|
|
@@ -15,7 +15,7 @@ import { ILocalizeInfo } from "../base/utils";
|
|
|
15
15
|
*/
|
|
16
16
|
interface IAuthProvider {
|
|
17
17
|
signUp(marker: string, data: ISignUpData, langCode?: string): Promise<ISignUpEntity>;
|
|
18
|
-
generateCode(marker: string, userIdentifier: string, eventIdentifier: string): Promise<
|
|
18
|
+
generateCode(marker: string, userIdentifier: string, eventIdentifier: string): Promise<void>;
|
|
19
19
|
checkCode(marker: string, userIdentifier: string, code: string): Promise<boolean>;
|
|
20
20
|
activateUser(marker: string, userIdentifier: string, code: string): Promise<boolean>;
|
|
21
21
|
auth(marker: string, data: IAuthPostBody): Promise<IAuthEntity>;
|
|
@@ -88,8 +88,4 @@ interface IAuthPostBody {
|
|
|
88
88
|
value: string | number;
|
|
89
89
|
}>;
|
|
90
90
|
}
|
|
91
|
-
|
|
92
|
-
"code": string;
|
|
93
|
-
"expiredDate": string;
|
|
94
|
-
}
|
|
95
|
-
export { IAuthProvider, IAuthFormData, ISignUpData, ISignUpEntity, ICodeEntity, IAuthEntity, IAuthProvidersEntity, IAuthPostBody, ICode };
|
|
91
|
+
export { IAuthProvider, IAuthFormData, ISignUpData, ISignUpEntity, ICodeEntity, IAuthEntity, IAuthProvidersEntity, IAuthPostBody, };
|
|
@@ -3,23 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const syncModules_1 = require("./syncModules");
|
|
4
4
|
class AsyncModules extends syncModules_1.default {
|
|
5
5
|
constructor(state) {
|
|
6
|
+
var _a;
|
|
6
7
|
super(state);
|
|
7
8
|
this._url = this.state.url;
|
|
8
9
|
this.state = state;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
this._NO_FETCH = true;
|
|
12
|
-
this._https = require('https');
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
this._NO_FETCH = false;
|
|
16
|
-
this._https = null;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
catch (e) {
|
|
20
|
-
this._NO_FETCH = false;
|
|
21
|
-
this._https = null;
|
|
22
|
-
}
|
|
10
|
+
this._NO_FETCH = state._NO_FETCH;
|
|
11
|
+
this._https = (_a = state._https) !== null && _a !== void 0 ? _a : null;
|
|
23
12
|
}
|
|
24
13
|
async _fetchGet(path) {
|
|
25
14
|
const options = this.makeOptions('GET');
|
package/dist/base/stateModule.js
CHANGED
|
@@ -10,6 +10,25 @@ class StateModule {
|
|
|
10
10
|
this.refreshToken = (_d = (_c = config.auth) === null || _c === void 0 ? void 0 : _c.refreshToken) !== null && _d !== void 0 ? _d : undefined;
|
|
11
11
|
this.customAuth = (_f = (_e = config.auth) === null || _e === void 0 ? void 0 : _e.customAuth) !== null && _f !== void 0 ? _f : false;
|
|
12
12
|
this.saveFunction = (_h = (_g = config.auth) === null || _g === void 0 ? void 0 : _g.saveFunction) !== null && _h !== void 0 ? _h : null;
|
|
13
|
+
try {
|
|
14
|
+
if (typeof process === 'object' && +process.versions.node.split('.')[0] < 18) {
|
|
15
|
+
try {
|
|
16
|
+
this._NO_FETCH = true;
|
|
17
|
+
this._https = require('https'); //file extension
|
|
18
|
+
}
|
|
19
|
+
catch (e) {
|
|
20
|
+
this._https = null;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
this._NO_FETCH = false;
|
|
25
|
+
this._https = null;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
catch (e) {
|
|
29
|
+
this._NO_FETCH = false;
|
|
30
|
+
this._https = null;
|
|
31
|
+
}
|
|
13
32
|
}
|
|
14
33
|
}
|
|
15
34
|
exports.default = StateModule;
|
package/package.json
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import OneEntry from "../base/modules";
|
|
2
|
-
import { IAdminEntity, IAdmins } from "./adminsInterfaces";
|
|
3
|
-
/**
|
|
4
|
-
* Controllers for working with users - admins
|
|
5
|
-
*/
|
|
6
|
-
export default class AdminsApi extends OneEntry implements IAdmins {
|
|
7
|
-
constructor(url: string);
|
|
8
|
-
/**
|
|
9
|
-
* Get all user objects - admins.
|
|
10
|
-
*
|
|
11
|
-
* @returns Returns all AdminEntity user objects
|
|
12
|
-
*/
|
|
13
|
-
getAdminsInfo(): Promise<IAdminEntity>;
|
|
14
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const oneEntry_1 = require("../base/oneEntry");
|
|
13
|
-
/**
|
|
14
|
-
* Controllers for working with users - admins
|
|
15
|
-
*/
|
|
16
|
-
class AdminsApi extends oneEntry_1.default {
|
|
17
|
-
constructor(url) {
|
|
18
|
-
super(url);
|
|
19
|
-
this._url += '/api/content/admins';
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Get all user objects - admins.
|
|
23
|
-
*
|
|
24
|
-
* @returns Returns all AdminEntity user objects
|
|
25
|
-
*/
|
|
26
|
-
getAdminsInfo() {
|
|
27
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
-
const result = yield this._fetchGet('');
|
|
29
|
-
return result;
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.default = AdminsApi;
|
|
34
|
-
//# sourceMappingURL=adminsApi.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adminsApi.js","sourceRoot":"","sources":["../../../src/admins/adminsApi.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+CAAwC;AAGxC;;GAEG;AACH,MAAqB,SAAU,SAAQ,kBAAQ;IAC3C,YAAY,GAAW;QACnB,KAAK,CAAC,GAAG,CAAC,CAAA;QACV,IAAI,CAAC,IAAI,IAAI,qBAAqB,CAAA;IACtC,CAAC;IAED;;;;OAIG;IACU,aAAa;;YACtB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;YACvC,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;CACJ;AAfD,4BAeC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
interface IAdmins {
|
|
2
|
-
getAdminsInfo(): Promise<IAdminEntity>;
|
|
3
|
-
}
|
|
4
|
-
interface IPosition {
|
|
5
|
-
id: number;
|
|
6
|
-
position: string;
|
|
7
|
-
objectId: number;
|
|
8
|
-
objectType: string;
|
|
9
|
-
isLocked: boolean;
|
|
10
|
-
objectCategoryId: number;
|
|
11
|
-
}
|
|
12
|
-
interface IAttributesSets {
|
|
13
|
-
[key: string]: string;
|
|
14
|
-
}
|
|
15
|
-
interface IAdminEntity {
|
|
16
|
-
id: number;
|
|
17
|
-
updatedDate: string;
|
|
18
|
-
version: number;
|
|
19
|
-
identifier: string;
|
|
20
|
-
attributesSets: IAttributesSets;
|
|
21
|
-
attributeSetId: number;
|
|
22
|
-
login: string;
|
|
23
|
-
email?: string;
|
|
24
|
-
restorePasswordCode: number;
|
|
25
|
-
position: IPosition;
|
|
26
|
-
positionId: number;
|
|
27
|
-
permissions: Record<string, boolean>;
|
|
28
|
-
selectedLanguage: string;
|
|
29
|
-
selectedContentLanguage: string;
|
|
30
|
-
selectedUITheme: string;
|
|
31
|
-
}
|
|
32
|
-
export { IAdmins, IAdminEntity };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adminsInterfaces.js","sourceRoot":"","sources":["../../../src/admins/adminsInterfaces.ts"],"names":[],"mappings":""}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import OneEntry from "../base/oneEntry";
|
|
2
|
-
import { IAttributeSet, IAttributeSetEntity } from "./attributeSetInterfaces";
|
|
3
|
-
/**
|
|
4
|
-
* Controllers for working with attribute sets
|
|
5
|
-
*/
|
|
6
|
-
export default class AttributeSetApi extends OneEntry implements IAttributeSet {
|
|
7
|
-
constructor(url: string);
|
|
8
|
-
/**
|
|
9
|
-
* Get one attributes set object.
|
|
10
|
-
*
|
|
11
|
-
* @param {number} [id] - Identifier of the attributes set object
|
|
12
|
-
*
|
|
13
|
-
* @returns Returns one attributes set object
|
|
14
|
-
*/
|
|
15
|
-
getAttributeSetById(id: number): Promise<IAttributeSetEntity>;
|
|
16
|
-
/**
|
|
17
|
-
* Get one attributes set object by marker.
|
|
18
|
-
*
|
|
19
|
-
* @param {string} [marker] - Marker of the attributes set object
|
|
20
|
-
*
|
|
21
|
-
* @returns Returns one attributes set object
|
|
22
|
-
*/
|
|
23
|
-
getAttributeSetByMarker(marker: string): Promise<IAttributeSetEntity>;
|
|
24
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const oneEntry_1 = require("../base/oneEntry");
|
|
13
|
-
/**
|
|
14
|
-
* Controllers for working with attribute sets
|
|
15
|
-
*/
|
|
16
|
-
class AttributeSetApi extends oneEntry_1.default {
|
|
17
|
-
constructor(url) {
|
|
18
|
-
super(url);
|
|
19
|
-
this._url += '/api/content/attributes-sets';
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Get one attributes set object.
|
|
23
|
-
*
|
|
24
|
-
* @param {number} [id] - Identifier of the attributes set object
|
|
25
|
-
*
|
|
26
|
-
* @returns Returns one attributes set object
|
|
27
|
-
*/
|
|
28
|
-
getAttributeSetById(id) {
|
|
29
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
-
const result = yield this._fetchGet(`/${id}`);
|
|
31
|
-
return result;
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Get one attributes set object by marker.
|
|
36
|
-
*
|
|
37
|
-
* @param {string} [marker] - Marker of the attributes set object
|
|
38
|
-
*
|
|
39
|
-
* @returns Returns one attributes set object
|
|
40
|
-
*/
|
|
41
|
-
getAttributeSetByMarker(marker) {
|
|
42
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
const result = yield this._fetchGet(`/marker/${marker}`);
|
|
44
|
-
return result;
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
exports.default = AttributeSetApi;
|
|
49
|
-
//# sourceMappingURL=attributeSetApi.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attributeSetApi.js","sourceRoot":"","sources":["../../../src/attribute-set/attributeSetApi.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+CAAwC;AAGxC;;GAEG;AACH,MAAqB,eAAgB,SAAQ,kBAAQ;IACjD,YAAY,GAAW;QACnB,KAAK,CAAC,GAAG,CAAC,CAAA;QACV,IAAI,CAAC,IAAI,IAAI,8BAA8B,CAAA;IAC/C,CAAC;IAED;;;;;;OAMG;IACU,mBAAmB,CAAC,EAAS;;YACtC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;YAC7C,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAED;;;;;;OAMG;IACU,uBAAuB,CAAC,MAAa;;YAC9C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,MAAM,EAAE,CAAC,CAAA;YACxD,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;CACJ;AA7BD,kCA6BC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ILocalizeInfos } from "../base/utils";
|
|
2
|
-
interface IAttributeSet {
|
|
3
|
-
getAttributeSetById(id: number): Promise<IAttributeSetEntity>;
|
|
4
|
-
getAttributeSetByMarker(url: string): Promise<IAttributeSetEntity>;
|
|
5
|
-
}
|
|
6
|
-
interface IAttributeSetEntity {
|
|
7
|
-
id: number;
|
|
8
|
-
updatedDate: string;
|
|
9
|
-
version: number;
|
|
10
|
-
identifier: string;
|
|
11
|
-
typeId: number;
|
|
12
|
-
localizeInfos: ILocalizeInfos;
|
|
13
|
-
schema: object;
|
|
14
|
-
position: {
|
|
15
|
-
id: number;
|
|
16
|
-
objectId: number;
|
|
17
|
-
objectType: string;
|
|
18
|
-
position: number | string;
|
|
19
|
-
};
|
|
20
|
-
positionId: number | string;
|
|
21
|
-
isVisible: boolean;
|
|
22
|
-
}
|
|
23
|
-
export { IAttributeSet, IAttributeSetEntity };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attributeSetInterfaces.js","sourceRoot":"","sources":["../../../src/attribute-set/attributeSetInterfaces.ts"],"names":[],"mappings":""}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { IProductsQuery } from '../products/productsInterfaces';
|
|
2
|
-
export default abstract class OneEntry {
|
|
3
|
-
protected _url: string;
|
|
4
|
-
constructor(url: string);
|
|
5
|
-
protected _getFullPath(path: string): string;
|
|
6
|
-
protected _fetchGet(path: string): Promise<any>;
|
|
7
|
-
protected _fetchPost(path: string, data: object): Promise<any>;
|
|
8
|
-
protected _queryParamsToString(query: IProductsQuery): string;
|
|
9
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
class OneEntry {
|
|
13
|
-
constructor(url) {
|
|
14
|
-
this._url = url;
|
|
15
|
-
}
|
|
16
|
-
_getFullPath(path) {
|
|
17
|
-
return (this._url + path);
|
|
18
|
-
}
|
|
19
|
-
_fetchGet(path) {
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const response = yield fetch(this._getFullPath(path), {
|
|
22
|
-
method: 'GET',
|
|
23
|
-
headers: {
|
|
24
|
-
'Content-Type': 'application/json'
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
const result = yield response.json();
|
|
28
|
-
return result;
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
_fetchPost(path, data) {
|
|
32
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
-
const response = yield fetch(this._getFullPath(path), {
|
|
34
|
-
method: 'POST',
|
|
35
|
-
headers: {
|
|
36
|
-
'Content-Type': 'application/json'
|
|
37
|
-
},
|
|
38
|
-
body: JSON.stringify(data)
|
|
39
|
-
});
|
|
40
|
-
const result = yield response.json();
|
|
41
|
-
return result;
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
_queryParamsToString(query) {
|
|
45
|
-
let result = '';
|
|
46
|
-
for (let key in query) {
|
|
47
|
-
if (query[key] !== null) {
|
|
48
|
-
result += `${key}=${query[key]}&`;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
return result.slice(0, (result.length - 1));
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
exports.default = OneEntry;
|
|
55
|
-
//# sourceMappingURL=oneEntry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"oneEntry.js","sourceRoot":"","sources":["../../../src/base/oneEntry.ts"],"names":[],"mappings":";;;;;;;;;;;AAEA,MAA8B,QAAQ;IAGlC,YAAY,GAAU;QAClB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAA;IACnB,CAAC;IAES,YAAY,CAAC,IAAW;QAC9B,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,CAAA;IAC7B,CAAC;IAEe,SAAS,CAAC,IAAW;;YACjC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE;gBAClD,MAAM,EAAE,KAAK;gBACb,OAAO,EAAE;oBACL,cAAc,EAAE,kBAAkB;iBACrC;aACJ,CAAC,CAAA;YAEF,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;YACpC,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAEe,UAAU,CAAC,IAAW,EAAE,IAAW;;YAC/C,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE;gBAClD,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACL,cAAc,EAAE,kBAAkB;iBACrC;gBACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;aAC7B,CAAC,CAAA;YACF,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;YACpC,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAES,oBAAoB,CAAC,KAAoB;QAC/C,IAAI,MAAM,GAAU,EAAE,CAAA;QACtB,KAAK,IAAI,GAAG,IAAI,KAAK,EAAE;YACnB,IAAI,KAAK,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE;gBACrB,MAAM,IAAI,GAAG,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,GAAG,CAAA;aACpC;SACJ;QACD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAA;IAC/C,CAAC;CACJ;AA5CD,2BA4CC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
declare enum LanguageCode {
|
|
2
|
-
ru_RU = "ru_RU",
|
|
3
|
-
en_US = "en_US",
|
|
4
|
-
fr_FR = "fr_FR"
|
|
5
|
-
}
|
|
6
|
-
declare enum Types {
|
|
7
|
-
forCatalogProducts = "forCatalogProducts",
|
|
8
|
-
forBasketPage = "forBasketPage",
|
|
9
|
-
forErrorPage = "forErrorPage",
|
|
10
|
-
forCatalogPages = "forCatalogPages",
|
|
11
|
-
forProductPreview = "forProductPreview",
|
|
12
|
-
forProductPage = "forProductPage",
|
|
13
|
-
forSimilarProductBlock = "forSimilarProductBlock",
|
|
14
|
-
forStatisticProductBlock = "forStatisticProductBlock",
|
|
15
|
-
forProductBlock = "forProductBlock",
|
|
16
|
-
forForm = "forForm",
|
|
17
|
-
forFormField = "forFormField",
|
|
18
|
-
forNewsPage = "forNewsPage",
|
|
19
|
-
forNewsBlock = "forNewsBlock",
|
|
20
|
-
forNewsPreview = "forNewsPreview",
|
|
21
|
-
forOneNewsPage = "forOneNewsPage",
|
|
22
|
-
forUsualPage = "forUsualPage",
|
|
23
|
-
forTextBlock = "forTextBlock",
|
|
24
|
-
forSlider = "forSlider",
|
|
25
|
-
service = "service"
|
|
26
|
-
}
|
|
27
|
-
interface ILocalizeInfos {
|
|
28
|
-
[key: string]: {
|
|
29
|
-
[key: string]: string;
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
export { LanguageCode, ILocalizeInfos, Types, };
|
package/dist/_cjs/base/utils.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Types = exports.LanguageCode = void 0;
|
|
4
|
-
var LanguageCode;
|
|
5
|
-
(function (LanguageCode) {
|
|
6
|
-
LanguageCode["ru_RU"] = "ru_RU";
|
|
7
|
-
LanguageCode["en_US"] = "en_US";
|
|
8
|
-
LanguageCode["fr_FR"] = "fr_FR";
|
|
9
|
-
})(LanguageCode || (exports.LanguageCode = LanguageCode = {}));
|
|
10
|
-
var Types;
|
|
11
|
-
(function (Types) {
|
|
12
|
-
Types["forCatalogProducts"] = "forCatalogProducts";
|
|
13
|
-
Types["forBasketPage"] = "forBasketPage";
|
|
14
|
-
Types["forErrorPage"] = "forErrorPage";
|
|
15
|
-
Types["forCatalogPages"] = "forCatalogPages";
|
|
16
|
-
Types["forProductPreview"] = "forProductPreview";
|
|
17
|
-
Types["forProductPage"] = "forProductPage";
|
|
18
|
-
Types["forSimilarProductBlock"] = "forSimilarProductBlock";
|
|
19
|
-
Types["forStatisticProductBlock"] = "forStatisticProductBlock";
|
|
20
|
-
Types["forProductBlock"] = "forProductBlock";
|
|
21
|
-
Types["forForm"] = "forForm";
|
|
22
|
-
Types["forFormField"] = "forFormField";
|
|
23
|
-
Types["forNewsPage"] = "forNewsPage";
|
|
24
|
-
Types["forNewsBlock"] = "forNewsBlock";
|
|
25
|
-
Types["forNewsPreview"] = "forNewsPreview";
|
|
26
|
-
Types["forOneNewsPage"] = "forOneNewsPage";
|
|
27
|
-
Types["forUsualPage"] = "forUsualPage";
|
|
28
|
-
Types["forTextBlock"] = "forTextBlock";
|
|
29
|
-
Types["forSlider"] = "forSlider";
|
|
30
|
-
Types["service"] = "service";
|
|
31
|
-
})(Types || (exports.Types = Types = {}));
|
|
32
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/base/utils.ts"],"names":[],"mappings":";;;AAAA,IAAK,YAIJ;AAJD,WAAK,YAAY;IACb,+BAAa,CAAA;IACb,+BAAa,CAAA;IACb,+BAAa,CAAA;AACjB,CAAC,EAJI,YAAY,4BAAZ,YAAY,QAIhB;AAED,IAAK,KAoBJ;AApBD,WAAK,KAAK;IACN,kDAAyC,CAAA;IACzC,wCAA+B,CAAA;IAC/B,sCAA6B,CAAA;IAC7B,4CAAmC,CAAA;IACnC,gDAAuC,CAAA;IACvC,0CAAiC,CAAA;IACjC,0DAAiD,CAAA;IACjD,8DAAqD,CAAA;IACrD,4CAAmC,CAAA;IACnC,4BAAmB,CAAA;IACnB,sCAA6B,CAAA;IAC7B,oCAA2B,CAAA;IAC3B,sCAA6B,CAAA;IAC7B,0CAAiC,CAAA;IACjC,0CAAiC,CAAA;IACjC,sCAA6B,CAAA;IAC7B,sCAA6B,CAAA;IAC7B,gCAAuB,CAAA;IACvB,4BAAmB,CAAA;AACvB,CAAC,EApBI,KAAK,qBAAL,KAAK,QAoBT"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import OneEntry from "../base/oneEntry";
|
|
2
|
-
import { IForms, IFormsEntity } from "./formsInterfaces";
|
|
3
|
-
/**
|
|
4
|
-
* Controllers for forms objects
|
|
5
|
-
*/
|
|
6
|
-
export default class FormsApi extends OneEntry implements IForms {
|
|
7
|
-
constructor(url: string);
|
|
8
|
-
/**
|
|
9
|
-
* Get all forms.
|
|
10
|
-
*
|
|
11
|
-
* @returns Returns array for all objects of type FormEntity
|
|
12
|
-
*/
|
|
13
|
-
getAllForms(): Promise<IFormsEntity[]>;
|
|
14
|
-
/**
|
|
15
|
-
* Get one form by form id.
|
|
16
|
-
*
|
|
17
|
-
* @returns Returns object of type FormEntity
|
|
18
|
-
*/
|
|
19
|
-
getFormById(id: number): Promise<IFormsEntity>;
|
|
20
|
-
/**
|
|
21
|
-
* Get one form by form marker.
|
|
22
|
-
*
|
|
23
|
-
* @returns Returns object of type FormEntity
|
|
24
|
-
*/
|
|
25
|
-
getFormByMarker(marker: string): Promise<IFormsEntity>;
|
|
26
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const oneEntry_1 = require("../base/oneEntry");
|
|
13
|
-
/**
|
|
14
|
-
* Controllers for forms objects
|
|
15
|
-
*/
|
|
16
|
-
class FormsApi extends oneEntry_1.default {
|
|
17
|
-
constructor(url) {
|
|
18
|
-
super(url);
|
|
19
|
-
this._url += '/api/content/forms';
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Get all forms.
|
|
23
|
-
*
|
|
24
|
-
* @returns Returns array for all objects of type FormEntity
|
|
25
|
-
*/
|
|
26
|
-
getAllForms() {
|
|
27
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
-
const result = yield this._fetchGet('');
|
|
29
|
-
return result;
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Get one form by form id.
|
|
34
|
-
*
|
|
35
|
-
* @returns Returns object of type FormEntity
|
|
36
|
-
*/
|
|
37
|
-
getFormById(id) {
|
|
38
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
const result = yield this._fetchGet(`/${id}`);
|
|
40
|
-
return result;
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Get one form by form marker.
|
|
45
|
-
*
|
|
46
|
-
* @returns Returns object of type FormEntity
|
|
47
|
-
*/
|
|
48
|
-
getFormByMarker(marker) {
|
|
49
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
-
const result = yield this._fetchGet(`/marker/${marker}`);
|
|
51
|
-
return result;
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
exports.default = FormsApi;
|
|
56
|
-
//# sourceMappingURL=formsApi.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formsApi.js","sourceRoot":"","sources":["../../../src/forms/formsApi.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+CAAwC;AAGxC;;GAEG;AACH,MAAqB,QAAS,SAAQ,kBAAQ;IAC1C,YAAY,GAAW;QACnB,KAAK,CAAC,GAAG,CAAC,CAAA;QACV,IAAI,CAAC,IAAI,IAAI,oBAAoB,CAAA;IACrC,CAAC;IAED;;;;OAIG;IACU,WAAW;;YACpB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;YACvC,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAED;;;;OAIG;IACU,WAAW,CAAC,EAAS;;YAC9B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;YAC7C,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;IAED;;;;OAIG;IACU,eAAe,CAAC,MAAa;;YACtC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,MAAM,EAAE,CAAC,CAAA;YACxD,OAAO,MAAM,CAAA;QACjB,CAAC;KAAA;CACJ;AAnCD,2BAmCC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { ILocalizeInfos } from "../base/utils";
|
|
2
|
-
interface IForms {
|
|
3
|
-
getAllForms(): Promise<IFormsEntity[]>;
|
|
4
|
-
getFormById(id: number): Promise<IFormsEntity>;
|
|
5
|
-
getFormByMarker(marker: string): Promise<IFormsEntity>;
|
|
6
|
-
}
|
|
7
|
-
interface IFromPages {
|
|
8
|
-
id: number;
|
|
9
|
-
pageId: number;
|
|
10
|
-
formId: number;
|
|
11
|
-
positionId: number;
|
|
12
|
-
position: object;
|
|
13
|
-
}
|
|
14
|
-
interface IFormsEntity {
|
|
15
|
-
id: number;
|
|
16
|
-
updatedDate: string;
|
|
17
|
-
version: number;
|
|
18
|
-
identifier: string;
|
|
19
|
-
attributesSets: {
|
|
20
|
-
[key: string]: string;
|
|
21
|
-
};
|
|
22
|
-
attributeSetId: number;
|
|
23
|
-
processingType: string;
|
|
24
|
-
localizeInfos: ILocalizeInfos;
|
|
25
|
-
processingData: object;
|
|
26
|
-
formPages: Array<IFromPages>;
|
|
27
|
-
}
|
|
28
|
-
export { IForms, IFormsEntity };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formsInterfaces.js","sourceRoot":"","sources":["../../../src/forms/formsInterfaces.ts"],"names":[],"mappings":""}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import OneEntry from '../base/oneEntry';
|
|
2
|
-
import { IFormsPost, IFormsData, IFormsDataPost, IFormsDataEntity } from './formsDataInterfaces';
|
|
3
|
-
/**
|
|
4
|
-
* Controllers for working with form data
|
|
5
|
-
*/
|
|
6
|
-
export default class FormsDataApi extends OneEntry implements IFormsData {
|
|
7
|
-
constructor(url: string);
|
|
8
|
-
/**
|
|
9
|
-
* Get all forms data.
|
|
10
|
-
*
|
|
11
|
-
* @returns Returns array for all objects of type CreateFormDataDto
|
|
12
|
-
*/
|
|
13
|
-
getFormsData(): Promise<Array<IFormsDataEntity>>;
|
|
14
|
-
/**
|
|
15
|
-
* Find all product page objects with pagination and multiple filtering.
|
|
16
|
-
*
|
|
17
|
-
* @param {object} [data] - Request body.
|
|
18
|
-
* Example Value:
|
|
19
|
-
* {
|
|
20
|
-
* "formIdentifier": "my-form",
|
|
21
|
-
* "formData": [
|
|
22
|
-
* {
|
|
23
|
-
* "marker": "naimenovanie_1",
|
|
24
|
-
* "value": "Наименование",
|
|
25
|
-
* "langCode": "ru_RU"
|
|
26
|
-
* }
|
|
27
|
-
* ]
|
|
28
|
-
* }
|
|
29
|
-
*
|
|
30
|
-
* @returns - Returns created CreateFormDataDto objects.
|
|
31
|
-
*/
|
|
32
|
-
postFormsData(data: Array<IFormsPost>): Promise<IFormsDataPost>;
|
|
33
|
-
/**
|
|
34
|
-
* Get one object of form data by marker.
|
|
35
|
-
*
|
|
36
|
-
* @param {string} [marker] - Marker of the form data
|
|
37
|
-
*
|
|
38
|
-
* @returns Returns array of object FormDataEntity
|
|
39
|
-
*/
|
|
40
|
-
getFormsDataByMarker(marker: string): Promise<Array<IFormsDataEntity>>;
|
|
41
|
-
}
|