@buildery/ts-api-kit 4.6.29 → 4.8.0
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/ApiConfigs.d.ts +6 -0
- package/dist/ApiConfigs.js +7 -0
- package/dist/ApiConfigs.js.map +1 -0
- package/dist/RawApi.d.ts +2 -1
- package/dist/RawApi.js +13 -12
- package/dist/RawApi.js.map +1 -1
- package/dist/configs/index.d.ts +1 -0
- package/dist/configs/index.js +1 -0
- package/dist/configs/index.js.map +1 -1
- package/dist/configs/user/config/UserApi.d.ts +2 -2
- package/dist/configs/user/config/UserApi.js.map +1 -1
- package/dist/configs/user/types/CreateUser.d.ts +5 -0
- package/dist/configs/user/types/CreateUser.js +3 -0
- package/dist/configs/user/types/CreateUser.js.map +1 -0
- package/dist/configs/user/types/IUser.d.ts +4 -6
- package/dist/configs/user/types/index.d.ts +1 -1
- package/dist/configs/user/types/index.js +1 -1
- package/dist/configs/user/types/index.js.map +1 -1
- package/dist/configs/workspace/config/WorkspaceApi.d.ts +10 -0
- package/dist/configs/workspace/config/WorkspaceApi.js +26 -0
- package/dist/configs/workspace/config/WorkspaceApi.js.map +1 -0
- package/dist/configs/workspace/config/index.d.ts +1 -0
- package/dist/configs/workspace/config/index.js +18 -0
- package/dist/configs/workspace/config/index.js.map +1 -0
- package/dist/configs/workspace/index.d.ts +2 -0
- package/dist/configs/workspace/index.js +19 -0
- package/dist/configs/workspace/index.js.map +1 -0
- package/dist/configs/workspace/types/InitWorkspace.d.ts +6 -0
- package/dist/configs/workspace/types/InitWorkspace.js +3 -0
- package/dist/configs/workspace/types/InitWorkspace.js.map +1 -0
- package/dist/configs/workspace/types/index.d.ts +1 -0
- package/dist/configs/workspace/types/index.js +18 -0
- package/dist/configs/workspace/types/index.js.map +1 -0
- package/dist/core/ApiConfigs.d.ts +1 -0
- package/dist/core/ApiConfigs.js.map +1 -1
- package/dist/entities/auth/config/AuthApi.d.ts +10 -0
- package/dist/entities/auth/config/AuthApi.js +57 -0
- package/dist/entities/auth/config/AuthApi.js.map +1 -0
- package/dist/entities/auth/config/index.d.ts +1 -0
- package/dist/entities/auth/config/index.js +18 -0
- package/dist/entities/auth/config/index.js.map +1 -0
- package/dist/entities/auth/index.d.ts +2 -0
- package/dist/entities/auth/index.js +19 -0
- package/dist/entities/auth/index.js.map +1 -0
- package/dist/entities/auth/services/AuthAxiosService.d.ts +7 -0
- package/dist/entities/auth/services/AuthAxiosService.js +39 -0
- package/dist/entities/auth/services/AuthAxiosService.js.map +1 -0
- package/dist/entities/auth/services/AuthError.d.ts +3 -0
- package/dist/entities/auth/services/AuthError.js +10 -0
- package/dist/entities/auth/services/AuthError.js.map +1 -0
- package/dist/entities/auth/services/AuthService.d.ts +4 -0
- package/dist/entities/auth/services/AuthService.js +24 -0
- package/dist/entities/auth/services/AuthService.js.map +1 -0
- package/dist/entities/auth/services/AuthTokensService.d.ts +11 -0
- package/dist/entities/auth/services/AuthTokensService.js +36 -0
- package/dist/entities/auth/services/AuthTokensService.js.map +1 -0
- package/dist/entities/auth/services/index.d.ts +3 -0
- package/dist/entities/auth/services/index.js +20 -0
- package/dist/entities/auth/services/index.js.map +1 -0
- package/dist/entities/auth/types/AuthActivateUser.d.ts +5 -0
- package/dist/entities/auth/types/AuthActivateUser.js +3 -0
- package/dist/entities/auth/types/AuthActivateUser.js.map +1 -0
- package/dist/entities/auth/types/AuthApiTokens.d.ts +4 -0
- package/dist/entities/auth/types/AuthApiTokens.js +3 -0
- package/dist/entities/auth/types/AuthApiTokens.js.map +1 -0
- package/dist/entities/auth/types/AuthChangePassword.d.ts +5 -0
- package/dist/entities/auth/types/AuthChangePassword.js +3 -0
- package/dist/entities/auth/types/AuthChangePassword.js.map +1 -0
- package/dist/entities/auth/types/AuthCode.d.ts +4 -0
- package/dist/entities/auth/types/AuthCode.js +3 -0
- package/dist/entities/auth/types/AuthCode.js.map +1 -0
- package/dist/entities/auth/types/AuthSignIn.d.ts +4 -0
- package/dist/entities/auth/types/AuthSignIn.js +3 -0
- package/dist/entities/auth/types/AuthSignIn.js.map +1 -0
- package/dist/entities/auth/types/AuthUserJWT.d.ts +8 -0
- package/dist/entities/auth/types/AuthUserJWT.js +3 -0
- package/dist/entities/auth/types/AuthUserJWT.js.map +1 -0
- package/dist/entities/auth/types/index.d.ts +6 -0
- package/dist/entities/auth/types/index.js +23 -0
- package/dist/entities/auth/types/index.js.map +1 -0
- package/dist/entities/index.d.ts +6 -0
- package/dist/entities/index.js +23 -0
- package/dist/entities/index.js.map +1 -0
- package/dist/entities/module/config/ModuleApi.d.ts +10 -0
- package/dist/entities/module/config/ModuleApi.js +44 -0
- package/dist/entities/module/config/ModuleApi.js.map +1 -0
- package/dist/entities/module/config/index.d.ts +1 -0
- package/dist/entities/module/config/index.js +18 -0
- package/dist/entities/module/config/index.js.map +1 -0
- package/dist/entities/module/index.d.ts +2 -0
- package/dist/entities/module/index.js +19 -0
- package/dist/entities/module/index.js.map +1 -0
- package/dist/entities/module/types/IModule.d.ts +12 -0
- package/dist/entities/module/types/IModule.js +3 -0
- package/dist/entities/module/types/IModule.js.map +1 -0
- package/dist/entities/module/types/ModuleObjectNames.d.ts +3 -0
- package/dist/entities/module/types/ModuleObjectNames.js +7 -0
- package/dist/entities/module/types/ModuleObjectNames.js.map +1 -0
- package/dist/entities/module/types/index.d.ts +2 -0
- package/dist/entities/module/types/index.js +19 -0
- package/dist/entities/module/types/index.js.map +1 -0
- package/dist/entities/schema/config/FieldApi.d.ts +12 -0
- package/dist/entities/schema/config/FieldApi.js +44 -0
- package/dist/entities/schema/config/FieldApi.js.map +1 -0
- package/dist/entities/schema/config/ObjectApi.d.ts +6 -0
- package/dist/entities/schema/config/ObjectApi.js +21 -0
- package/dist/entities/schema/config/ObjectApi.js.map +1 -0
- package/dist/entities/schema/config/index.d.ts +2 -0
- package/dist/entities/schema/config/index.js +19 -0
- package/dist/entities/schema/config/index.js.map +1 -0
- package/dist/entities/schema/index.d.ts +2 -0
- package/dist/entities/schema/index.js +19 -0
- package/dist/entities/schema/index.js.map +1 -0
- package/dist/entities/schema/types/FieldType.d.ts +9 -0
- package/dist/entities/schema/types/FieldType.js +14 -0
- package/dist/entities/schema/types/FieldType.js.map +1 -0
- package/dist/entities/schema/types/PicklistValue.d.ts +4 -0
- package/dist/entities/schema/types/PicklistValue.js +3 -0
- package/dist/entities/schema/types/PicklistValue.js.map +1 -0
- package/dist/entities/schema/types/SObject.d.ts +7 -0
- package/dist/entities/schema/types/SObject.js +3 -0
- package/dist/entities/schema/types/SObject.js.map +1 -0
- package/dist/entities/schema/types/SObjectField.d.ts +32 -0
- package/dist/entities/schema/types/SObjectField.js +3 -0
- package/dist/entities/schema/types/SObjectField.js.map +1 -0
- package/dist/entities/schema/types/SchemaObjectNames.d.ts +4 -0
- package/dist/entities/schema/types/SchemaObjectNames.js +8 -0
- package/dist/entities/schema/types/SchemaObjectNames.js.map +1 -0
- package/dist/entities/schema/types/index.d.ts +5 -0
- package/dist/entities/schema/types/index.js +22 -0
- package/dist/entities/schema/types/index.js.map +1 -0
- package/dist/entities/security/config/PermissionApi.d.ts +9 -0
- package/dist/entities/security/config/PermissionApi.js +36 -0
- package/dist/entities/security/config/PermissionApi.js.map +1 -0
- package/dist/entities/security/config/PermissionAssignmentApi.d.ts +6 -0
- package/dist/entities/security/config/PermissionAssignmentApi.js +21 -0
- package/dist/entities/security/config/PermissionAssignmentApi.js.map +1 -0
- package/dist/entities/security/config/PermissionCategoryApi.d.ts +8 -0
- package/dist/entities/security/config/PermissionCategoryApi.js +38 -0
- package/dist/entities/security/config/PermissionCategoryApi.js.map +1 -0
- package/dist/entities/security/config/PermissionDefinitionApi.d.ts +6 -0
- package/dist/entities/security/config/PermissionDefinitionApi.js +21 -0
- package/dist/entities/security/config/PermissionDefinitionApi.js.map +1 -0
- package/dist/entities/security/config/PermissionGroupApi.d.ts +6 -0
- package/dist/entities/security/config/PermissionGroupApi.js +21 -0
- package/dist/entities/security/config/PermissionGroupApi.js.map +1 -0
- package/dist/entities/security/config/PermissionSetApi.d.ts +6 -0
- package/dist/entities/security/config/PermissionSetApi.js +21 -0
- package/dist/entities/security/config/PermissionSetApi.js.map +1 -0
- package/dist/entities/security/config/index.d.ts +6 -0
- package/dist/entities/security/config/index.js +23 -0
- package/dist/entities/security/config/index.js.map +1 -0
- package/dist/entities/security/index.d.ts +2 -0
- package/dist/entities/security/index.js +19 -0
- package/dist/entities/security/index.js.map +1 -0
- package/dist/entities/security/types/IPermission.d.ts +10 -0
- package/dist/entities/security/types/IPermission.js +3 -0
- package/dist/entities/security/types/IPermission.js.map +1 -0
- package/dist/entities/security/types/IPermissionAssignment.d.ts +6 -0
- package/dist/entities/security/types/IPermissionAssignment.js +3 -0
- package/dist/entities/security/types/IPermissionAssignment.js.map +1 -0
- package/dist/entities/security/types/IPermissionCategory.d.ts +5 -0
- package/dist/entities/security/types/IPermissionCategory.js +3 -0
- package/dist/entities/security/types/IPermissionCategory.js.map +1 -0
- package/dist/entities/security/types/IPermissionDefinition.d.ts +6 -0
- package/dist/entities/security/types/IPermissionDefinition.js +3 -0
- package/dist/entities/security/types/IPermissionDefinition.js.map +1 -0
- package/dist/entities/security/types/IPermissionGroup.d.ts +4 -0
- package/dist/entities/security/types/IPermissionGroup.js +3 -0
- package/dist/entities/security/types/IPermissionGroup.js.map +1 -0
- package/dist/entities/security/types/IPermissionSet.d.ts +6 -0
- package/dist/entities/security/types/IPermissionSet.js +3 -0
- package/dist/entities/security/types/IPermissionSet.js.map +1 -0
- package/dist/entities/security/types/SecurityObjectNames.d.ts +8 -0
- package/dist/entities/security/types/SecurityObjectNames.js +12 -0
- package/dist/entities/security/types/SecurityObjectNames.js.map +1 -0
- package/dist/entities/security/types/index.d.ts +7 -0
- package/dist/entities/security/types/index.js +24 -0
- package/dist/entities/security/types/index.js.map +1 -0
- package/dist/entities/user/config/UserApi.d.ts +6 -0
- package/dist/entities/user/config/UserApi.js +21 -0
- package/dist/entities/user/config/UserApi.js.map +1 -0
- package/dist/entities/user/config/index.d.ts +1 -0
- package/dist/entities/user/config/index.js +18 -0
- package/dist/entities/user/config/index.js.map +1 -0
- package/dist/entities/user/index.d.ts +2 -0
- package/dist/entities/user/index.js +19 -0
- package/dist/entities/user/index.js.map +1 -0
- package/dist/entities/user/types/CreateUser.d.ts +5 -0
- package/dist/entities/user/types/CreateUser.js +3 -0
- package/dist/entities/user/types/CreateUser.js.map +1 -0
- package/dist/entities/user/types/IUser.d.ts +6 -0
- package/dist/entities/user/types/IUser.js +3 -0
- package/dist/entities/user/types/IUser.js.map +1 -0
- package/dist/entities/user/types/index.d.ts +2 -0
- package/dist/entities/user/types/index.js +19 -0
- package/dist/entities/user/types/index.js.map +1 -0
- package/dist/entities/workspace/config/WorkspaceApi.d.ts +10 -0
- package/dist/entities/workspace/config/WorkspaceApi.js +27 -0
- package/dist/entities/workspace/config/WorkspaceApi.js.map +1 -0
- package/dist/entities/workspace/config/index.d.ts +1 -0
- package/dist/entities/workspace/config/index.js +18 -0
- package/dist/entities/workspace/config/index.js.map +1 -0
- package/dist/entities/workspace/index.d.ts +2 -0
- package/dist/entities/workspace/index.js +19 -0
- package/dist/entities/workspace/index.js.map +1 -0
- package/dist/entities/workspace/types/InitWorkspace.d.ts +6 -0
- package/dist/entities/workspace/types/InitWorkspace.js +3 -0
- package/dist/entities/workspace/types/InitWorkspace.js.map +1 -0
- package/dist/entities/workspace/types/index.d.ts +1 -0
- package/dist/entities/workspace/types/index.js +18 -0
- package/dist/entities/workspace/types/index.js.map +1 -0
- package/dist/features/bind-this/BindThis.d.ts +3 -0
- package/dist/features/bind-this/BindThis.js +9 -0
- package/dist/features/bind-this/BindThis.js.map +1 -0
- package/dist/features/bind-this/index.d.ts +1 -0
- package/dist/features/bind-this/index.js +18 -0
- package/dist/features/bind-this/index.js.map +1 -0
- package/dist/features/callout/Calloutable.d.ts +4 -0
- package/dist/features/callout/Calloutable.js +28 -0
- package/dist/features/callout/Calloutable.js.map +1 -0
- package/dist/features/callout/index.d.ts +1 -0
- package/dist/features/callout/index.js +18 -0
- package/dist/features/callout/index.js.map +1 -0
- package/dist/features/crud/abstract/AbstractCRUDRequest.d.ts +5 -0
- package/dist/features/crud/abstract/AbstractCRUDRequest.js +8 -0
- package/dist/features/crud/abstract/AbstractCRUDRequest.js.map +1 -0
- package/dist/features/crud/abstract/index.d.ts +1 -0
- package/dist/features/crud/abstract/index.js +18 -0
- package/dist/features/crud/abstract/index.js.map +1 -0
- package/dist/features/crud/index.d.ts +3 -0
- package/dist/features/crud/index.js +20 -0
- package/dist/features/crud/index.js.map +1 -0
- package/dist/features/crud/operations/Create.d.ts +5 -0
- package/dist/features/crud/operations/Create.js +17 -0
- package/dist/features/crud/operations/Create.js.map +1 -0
- package/dist/features/crud/operations/CreateBulk.d.ts +5 -0
- package/dist/features/crud/operations/CreateBulk.js +17 -0
- package/dist/features/crud/operations/CreateBulk.js.map +1 -0
- package/dist/features/crud/operations/DeleteById.d.ts +5 -0
- package/dist/features/crud/operations/DeleteById.js +16 -0
- package/dist/features/crud/operations/DeleteById.js.map +1 -0
- package/dist/features/crud/operations/DeleteByIds.d.ts +5 -0
- package/dist/features/crud/operations/DeleteByIds.js +16 -0
- package/dist/features/crud/operations/DeleteByIds.js.map +1 -0
- package/dist/features/crud/operations/GetAll.d.ts +5 -0
- package/dist/features/crud/operations/GetAll.js +16 -0
- package/dist/features/crud/operations/GetAll.js.map +1 -0
- package/dist/features/crud/operations/GetById.d.ts +5 -0
- package/dist/features/crud/operations/GetById.js +16 -0
- package/dist/features/crud/operations/GetById.js.map +1 -0
- package/dist/features/crud/operations/GetByIds.d.ts +5 -0
- package/dist/features/crud/operations/GetByIds.js +17 -0
- package/dist/features/crud/operations/GetByIds.js.map +1 -0
- package/dist/features/crud/operations/Update.d.ts +5 -0
- package/dist/features/crud/operations/Update.js +17 -0
- package/dist/features/crud/operations/Update.js.map +1 -0
- package/dist/features/crud/operations/UpdateBulk.d.ts +5 -0
- package/dist/features/crud/operations/UpdateBulk.js +17 -0
- package/dist/features/crud/operations/UpdateBulk.js.map +1 -0
- package/dist/features/crud/operations/Upsert.d.ts +5 -0
- package/dist/features/crud/operations/Upsert.js +17 -0
- package/dist/features/crud/operations/Upsert.js.map +1 -0
- package/dist/features/crud/operations/UpsertBulk.d.ts +5 -0
- package/dist/features/crud/operations/UpsertBulk.js +17 -0
- package/dist/features/crud/operations/UpsertBulk.js.map +1 -0
- package/dist/features/crud/operations/index.d.ts +11 -0
- package/dist/features/crud/operations/index.js +28 -0
- package/dist/features/crud/operations/index.js.map +1 -0
- package/dist/features/crud/templates/FullCRUD.d.ts +8 -0
- package/dist/features/crud/templates/FullCRUD.js +12 -0
- package/dist/features/crud/templates/FullCRUD.js.map +1 -0
- package/dist/features/crud/templates/FullCreate.d.ts +6 -0
- package/dist/features/crud/templates/FullCreate.js +10 -0
- package/dist/features/crud/templates/FullCreate.js.map +1 -0
- package/dist/features/crud/templates/FullDelete.d.ts +6 -0
- package/dist/features/crud/templates/FullDelete.js +10 -0
- package/dist/features/crud/templates/FullDelete.js.map +1 -0
- package/dist/features/crud/templates/FullQuery.d.ts +7 -0
- package/dist/features/crud/templates/FullQuery.js +11 -0
- package/dist/features/crud/templates/FullQuery.js.map +1 -0
- package/dist/features/crud/templates/FullUpdate.d.ts +6 -0
- package/dist/features/crud/templates/FullUpdate.js +10 -0
- package/dist/features/crud/templates/FullUpdate.js.map +1 -0
- package/dist/features/crud/templates/FullUpsert.d.ts +6 -0
- package/dist/features/crud/templates/FullUpsert.js +10 -0
- package/dist/features/crud/templates/FullUpsert.js.map +1 -0
- package/dist/features/crud/templates/index.d.ts +6 -0
- package/dist/features/crud/templates/index.js +23 -0
- package/dist/features/crud/templates/index.js.map +1 -0
- package/dist/features/index.d.ts +3 -0
- package/dist/features/index.js +20 -0
- package/dist/features/index.js.map +1 -0
- package/dist/index.d.ts +2 -3
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/Constructable.d.ts +3 -0
- package/dist/types/Constructable.js +3 -0
- package/dist/types/Constructable.js.map +1 -0
- package/dist/types/HasDBId.d.ts +3 -0
- package/dist/types/HasDBId.js +3 -0
- package/dist/types/HasDBId.js.map +1 -0
- package/dist/types/HasEmail.d.ts +3 -0
- package/dist/types/HasEmail.js +3 -0
- package/dist/types/HasEmail.js.map +1 -0
- package/dist/types/HasId.d.ts +3 -0
- package/dist/types/HasId.js +3 -0
- package/dist/types/HasId.js.map +1 -0
- package/dist/types/HasLabel.d.ts +3 -0
- package/dist/types/HasLabel.js +3 -0
- package/dist/types/HasLabel.js.map +1 -0
- package/dist/types/HasMode.d.ts +3 -0
- package/dist/types/HasMode.js +3 -0
- package/dist/types/HasMode.js.map +1 -0
- package/dist/types/HasOrder.d.ts +3 -0
- package/dist/types/HasOrder.js +3 -0
- package/dist/types/HasOrder.js.map +1 -0
- package/dist/types/index.d.ts +6 -1
- package/dist/types/index.js +6 -1
- package/dist/types/index.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiConfigs.js","sourceRoot":"","sources":["../src/ApiConfigs.ts"],"names":[],"mappings":";;;AAAA,MAAa,UAAU;CAKtB;AALD,gCAKC"}
|
package/dist/RawApi.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FieldApi, ModuleApi, ObjectApi, PermissionApi, PermissionAssignmentApi, PermissionCategoryApi, PermissionDefinitionApi, PermissionGroupApi, PermissionSetApi, UserApi, AuthApi } from "./
|
|
1
|
+
import { FieldApi, ModuleApi, ObjectApi, PermissionApi, PermissionAssignmentApi, PermissionCategoryApi, PermissionDefinitionApi, PermissionGroupApi, PermissionSetApi, UserApi, AuthApi, WorkspaceApi } from "./entities";
|
|
2
2
|
export declare const RawApi: {
|
|
3
3
|
readonly permission: PermissionApi;
|
|
4
4
|
readonly permissionGroup: PermissionGroupApi;
|
|
@@ -11,4 +11,5 @@ export declare const RawApi: {
|
|
|
11
11
|
readonly object: ObjectApi;
|
|
12
12
|
readonly field: FieldApi;
|
|
13
13
|
readonly auth: AuthApi;
|
|
14
|
+
readonly workspace: WorkspaceApi;
|
|
14
15
|
};
|
package/dist/RawApi.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RawApi = void 0;
|
|
4
|
-
const
|
|
4
|
+
const entities_1 = require("./entities");
|
|
5
5
|
exports.RawApi = {
|
|
6
|
-
permission: new
|
|
7
|
-
permissionGroup: new
|
|
8
|
-
permissionDefinition: new
|
|
9
|
-
permissionCategory: new
|
|
10
|
-
permissionSet: new
|
|
11
|
-
permissionAssignment: new
|
|
12
|
-
user: new
|
|
13
|
-
module: new
|
|
14
|
-
object: new
|
|
15
|
-
field: new
|
|
16
|
-
auth: new
|
|
6
|
+
permission: new entities_1.PermissionApi(),
|
|
7
|
+
permissionGroup: new entities_1.PermissionGroupApi(),
|
|
8
|
+
permissionDefinition: new entities_1.PermissionDefinitionApi(),
|
|
9
|
+
permissionCategory: new entities_1.PermissionCategoryApi(),
|
|
10
|
+
permissionSet: new entities_1.PermissionSetApi(),
|
|
11
|
+
permissionAssignment: new entities_1.PermissionAssignmentApi(),
|
|
12
|
+
user: new entities_1.UserApi,
|
|
13
|
+
module: new entities_1.ModuleApi(),
|
|
14
|
+
object: new entities_1.ObjectApi(),
|
|
15
|
+
field: new entities_1.FieldApi(),
|
|
16
|
+
auth: new entities_1.AuthApi(),
|
|
17
|
+
workspace: new entities_1.WorkspaceApi(),
|
|
17
18
|
};
|
|
18
19
|
//# sourceMappingURL=RawApi.js.map
|
package/dist/RawApi.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RawApi.js","sourceRoot":"","sources":["../src/RawApi.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"RawApi.js","sourceRoot":"","sources":["../src/RawApi.ts"],"names":[],"mappings":";;;AAAA,yCAaoB;AAEP,QAAA,MAAM,GAAG;IACpB,UAAU,EAAE,IAAI,wBAAa,EAAE;IAC/B,eAAe,EAAE,IAAI,6BAAkB,EAAE;IACzC,oBAAoB,EAAE,IAAI,kCAAuB,EAAE;IACnD,kBAAkB,EAAE,IAAI,gCAAqB,EAAE;IAC/C,aAAa,EAAE,IAAI,2BAAgB,EAAE;IACrC,oBAAoB,EAAE,IAAI,kCAAuB,EAAE;IACnD,IAAI,EAAE,IAAI,kBAAO;IACjB,MAAM,EAAE,IAAI,oBAAS,EAAE;IACvB,MAAM,EAAE,IAAI,oBAAS,EAAE;IACvB,KAAK,EAAE,IAAI,mBAAQ,EAAE;IACrB,IAAI,EAAE,IAAI,kBAAO,EAAE;IACnB,SAAS,EAAE,IAAI,uBAAY,EAAE;CACrB,CAAC"}
|
package/dist/configs/index.d.ts
CHANGED
package/dist/configs/index.js
CHANGED
|
@@ -19,4 +19,5 @@ __exportStar(require("./schema"), exports);
|
|
|
19
19
|
__exportStar(require("./security"), exports);
|
|
20
20
|
__exportStar(require("./user"), exports);
|
|
21
21
|
__exportStar(require("./auth"), exports);
|
|
22
|
+
__exportStar(require("./workspace"), exports);
|
|
22
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/configs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB;AACzB,6CAA2B;AAC3B,yCAAuB;AACvB,yCAAuB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/configs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB;AACzB,6CAA2B;AAC3B,yCAAuB;AACvB,yCAAuB;AACvB,8CAA4B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SObjectRequest } from "../../../core";
|
|
2
|
-
import {
|
|
3
|
-
export declare class UserApi extends SObjectRequest<
|
|
2
|
+
import { User } from "../types";
|
|
3
|
+
export declare class UserApi extends SObjectRequest<User> {
|
|
4
4
|
getApiUrl(): string;
|
|
5
5
|
getObjectName(): string;
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserApi.js","sourceRoot":"","sources":["../../../../src/configs/user/config/UserApi.ts"],"names":[],"mappings":";;;;;;;;;AAAA,wCAAyD;AACzD,yDAAqD;AAI9C,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,
|
|
1
|
+
{"version":3,"file":"UserApi.js","sourceRoot":"","sources":["../../../../src/configs/user/config/UserApi.ts"],"names":[],"mappings":";;;;;;;;;AAAA,wCAAyD;AACzD,yDAAqD;AAI9C,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,qBAAoB;IAE/B,SAAS,KAAK,OAAO,iBAAU,CAAC,YAAY,CAAA,CAAC,CAAC;IAE9C,aAAa,KAAK,OAAO,MAAM,CAAA,CAAC,CAAC;CAElD,CAAA;AANY,OAAO;IADnB,IAAA,wBAAW,GAAE;GACD,OAAO,CAMnB;AANY,0BAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateUser.js","sourceRoot":"","sources":["../../../../src/configs/user/types/CreateUser.ts"],"names":[],"mappings":""}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
lastName?: string;
|
|
1
|
+
import { CreateUser } from "./CreateUser";
|
|
2
|
+
import { HasDBId } from "../../../types";
|
|
3
|
+
export type User = {
|
|
5
4
|
email?: string;
|
|
6
|
-
username?: string;
|
|
7
5
|
status?: any;
|
|
8
|
-
}
|
|
6
|
+
} & Partial<CreateUser> & Partial<HasDBId>;
|
|
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./UserObjectNames"), exports);
|
|
18
17
|
__exportStar(require("./IUser"), exports);
|
|
18
|
+
__exportStar(require("./CreateUser"), exports);
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/configs/user/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/configs/user/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,+CAA6B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseRequest } from "../../../core";
|
|
2
|
+
import { InitWorkspace } from "../types";
|
|
3
|
+
export declare class WorkspaceApi extends BaseRequest {
|
|
4
|
+
init(workspace: InitWorkspace): {
|
|
5
|
+
baseURL: string;
|
|
6
|
+
url: string;
|
|
7
|
+
method: string;
|
|
8
|
+
data: InitWorkspace;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.WorkspaceApi = void 0;
|
|
10
|
+
const core_1 = require("../../../core");
|
|
11
|
+
const decorators_1 = require("../../../core/decorators");
|
|
12
|
+
let WorkspaceApi = class WorkspaceApi extends core_1.BaseRequest {
|
|
13
|
+
init(workspace) {
|
|
14
|
+
return {
|
|
15
|
+
baseURL: core_1.ApiConfigs.initURL,
|
|
16
|
+
url: '/init',
|
|
17
|
+
method: 'POST',
|
|
18
|
+
data: workspace
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
WorkspaceApi = __decorate([
|
|
23
|
+
(0, decorators_1.Calloutable)()
|
|
24
|
+
], WorkspaceApi);
|
|
25
|
+
exports.WorkspaceApi = WorkspaceApi;
|
|
26
|
+
//# sourceMappingURL=WorkspaceApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkspaceApi.js","sourceRoot":"","sources":["../../../../src/configs/workspace/config/WorkspaceApi.ts"],"names":[],"mappings":";;;;;;;;;AAAA,wCAAsD;AACtD,yDAAqD;AAI9C,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,kBAAW;IAEpC,IAAI,CAAC,SAAwB;QAClC,OAAO;YACL,OAAO,EAAE,iBAAU,CAAC,OAAO;YAC3B,GAAG,EAAE,OAAO;YACZ,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,SAAS;SAChB,CAAA;IACH,CAAC;CAEF,CAAA;AAXY,YAAY;IADxB,IAAA,wBAAW,GAAE;GACD,YAAY,CAWxB;AAXY,oCAAY"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './WorkspaceApi';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./WorkspaceApi"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/configs/workspace/config/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
18
|
+
__exportStar(require("./config"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/configs/workspace/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,2CAAyB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InitWorkspace.js","sourceRoot":"","sources":["../../../../src/configs/workspace/types/InitWorkspace.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './InitWorkspace';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./InitWorkspace"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/configs/workspace/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiConfigs.js","sourceRoot":"","sources":["../../src/core/ApiConfigs.ts"],"names":[],"mappings":";;;AAAA,MAAa,UAAU;
|
|
1
|
+
{"version":3,"file":"ApiConfigs.js","sourceRoot":"","sources":["../../src/core/ApiConfigs.ts"],"names":[],"mappings":";;;AAAA,MAAa,UAAU;CAKtB;AALD,gCAKC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AxiosRequestConfig } from "axios";
|
|
2
|
+
import { BindThis } from "../../../features";
|
|
3
|
+
import { AuthSignIn, AuthActivateUser } from "../types";
|
|
4
|
+
export declare class AuthApi extends BindThis {
|
|
5
|
+
getTokensByCredentials(user: AuthSignIn): AxiosRequestConfig<any>;
|
|
6
|
+
getAuthCodeByCredentials(user: AuthSignIn): AxiosRequestConfig<any>;
|
|
7
|
+
getTokensByAuthCode(code: string): AxiosRequestConfig<any>;
|
|
8
|
+
activate(user: AuthActivateUser): AxiosRequestConfig<any>;
|
|
9
|
+
refresh(refreshToken: string): AxiosRequestConfig<any>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.AuthApi = void 0;
|
|
10
|
+
const features_1 = require("../../../features");
|
|
11
|
+
const ApiConfigs_1 = require("../../../ApiConfigs");
|
|
12
|
+
let AuthApi = class AuthApi extends features_1.BindThis {
|
|
13
|
+
getTokensByCredentials(user) {
|
|
14
|
+
return {
|
|
15
|
+
baseURL: ApiConfigs_1.ApiConfigs.authUrl,
|
|
16
|
+
url: '/user/signin',
|
|
17
|
+
method: 'POST',
|
|
18
|
+
data: user
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
getAuthCodeByCredentials(user) {
|
|
22
|
+
return {
|
|
23
|
+
baseURL: ApiConfigs_1.ApiConfigs.authUrl,
|
|
24
|
+
url: '/user/signin/code',
|
|
25
|
+
method: 'POST',
|
|
26
|
+
data: user
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
getTokensByAuthCode(code) {
|
|
30
|
+
return {
|
|
31
|
+
baseURL: ApiConfigs_1.ApiConfigs.authUrl,
|
|
32
|
+
url: `/user/signin/code/${code}`,
|
|
33
|
+
method: 'GET',
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
activate(user) {
|
|
37
|
+
return {
|
|
38
|
+
baseURL: ApiConfigs_1.ApiConfigs.authUrl,
|
|
39
|
+
url: '/user/signup',
|
|
40
|
+
method: 'POST',
|
|
41
|
+
data: user
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
refresh(refreshToken) {
|
|
45
|
+
return {
|
|
46
|
+
baseURL: ApiConfigs_1.ApiConfigs.authUrl,
|
|
47
|
+
url: '/refresh',
|
|
48
|
+
method: 'POST',
|
|
49
|
+
data: { refreshToken }
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
AuthApi = __decorate([
|
|
54
|
+
(0, features_1.Calloutable)()
|
|
55
|
+
], AuthApi);
|
|
56
|
+
exports.AuthApi = AuthApi;
|
|
57
|
+
//# sourceMappingURL=AuthApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthApi.js","sourceRoot":"","sources":["../../../../src/entities/auth/config/AuthApi.ts"],"names":[],"mappings":";;;;;;;;;AACA,gDAAwD;AAExD,oDAA+C;AAGxC,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,mBAAQ;IAE5B,sBAAsB,CAAC,IAAgB;QAC5C,OAAO;YACL,OAAO,EAAE,uBAAU,CAAC,OAAO;YAC3B,GAAG,EAAE,cAAc;YACnB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACW,CAAA;IACzB,CAAC;IAEM,wBAAwB,CAAC,IAAgB;QAC9C,OAAO;YACL,OAAO,EAAE,uBAAU,CAAC,OAAO;YAC3B,GAAG,EAAE,mBAAmB;YACxB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACW,CAAA;IACzB,CAAC;IAEM,mBAAmB,CAAC,IAAY;QACrC,OAAO;YACL,OAAO,EAAE,uBAAU,CAAC,OAAO;YAC3B,GAAG,EAAE,qBAAqB,IAAI,EAAE;YAChC,MAAM,EAAE,KAAK;SACQ,CAAA;IACzB,CAAC;IAEM,QAAQ,CAAC,IAAsB;QACpC,OAAO;YACL,OAAO,EAAE,uBAAU,CAAC,OAAO;YAC3B,GAAG,EAAE,cAAc;YACnB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACW,CAAA;IACzB,CAAC;IAEM,OAAO,CAAC,YAAoB;QACjC,OAAO;YACL,OAAO,EAAE,uBAAU,CAAC,OAAO;YAC3B,GAAG,EAAE,UAAU;YACf,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,YAAY,EAAE;SACD,CAAA;IACzB,CAAC;CAEF,CAAA;AA9CY,OAAO;IADnB,IAAA,sBAAW,GAAE;GACD,OAAO,CA8CnB;AA9CY,0BAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AuthApi';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./AuthApi"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/entities/auth/config/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./config"), exports);
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/auth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,0CAAwB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InternalAxiosRequestConfig } from "axios";
|
|
2
|
+
export declare class AuthAxiosService {
|
|
3
|
+
static getAxiosInstance(): import("axios").AxiosInstance;
|
|
4
|
+
static setTokenHeader(config: InternalAxiosRequestConfig): InternalAxiosRequestConfig<any>;
|
|
5
|
+
static refreshTokens(error: any): Promise<any>;
|
|
6
|
+
static redirectToSignIn(): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthAxiosService = void 0;
|
|
4
|
+
const axios_1 = require("axios");
|
|
5
|
+
const AuthTokensService_1 = require("./AuthTokensService");
|
|
6
|
+
const AuthService_1 = require("./AuthService");
|
|
7
|
+
class AuthAxiosService {
|
|
8
|
+
static getAxiosInstance() {
|
|
9
|
+
const instance = axios_1.default.create();
|
|
10
|
+
instance.interceptors.request.use(AuthAxiosService.setTokenHeader, error => Promise.reject(error));
|
|
11
|
+
instance.interceptors.response.use(response => response, AuthAxiosService.refreshTokens);
|
|
12
|
+
return instance;
|
|
13
|
+
}
|
|
14
|
+
static setTokenHeader(config) {
|
|
15
|
+
const accessToken = AuthTokensService_1.AuthTokensService.getAccessToken();
|
|
16
|
+
if (!accessToken)
|
|
17
|
+
return config;
|
|
18
|
+
config.headers.Authorization = config ? `Bearer ${accessToken}` : '';
|
|
19
|
+
return config;
|
|
20
|
+
}
|
|
21
|
+
static async refreshTokens(error) {
|
|
22
|
+
if (error.response.status !== 403)
|
|
23
|
+
return Promise.reject(error);
|
|
24
|
+
await AuthService_1.AuthService.refresh();
|
|
25
|
+
if (!AuthTokensService_1.AuthTokensService.isTokensExists()) {
|
|
26
|
+
AuthAxiosService.redirectToSignIn();
|
|
27
|
+
return error;
|
|
28
|
+
}
|
|
29
|
+
return (0, axios_1.default)(error.config);
|
|
30
|
+
}
|
|
31
|
+
static redirectToSignIn() {
|
|
32
|
+
const loginURL = `http://auth.localhost`;
|
|
33
|
+
const redirectURL = window.location.href;
|
|
34
|
+
const url = `${loginURL}?redirect=${redirectURL}`;
|
|
35
|
+
window.location.replace(url);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.AuthAxiosService = AuthAxiosService;
|
|
39
|
+
//# sourceMappingURL=AuthAxiosService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthAxiosService.js","sourceRoot":"","sources":["../../../../src/entities/auth/services/AuthAxiosService.ts"],"names":[],"mappings":";;;AAAA,iCAAwD;AACxD,2DAAsD;AACtD,+CAA0C;AAE1C,MAAa,gBAAgB;IAC1B,MAAM,CAAC,gBAAgB;QACtB,MAAM,QAAQ,GAAG,eAAK,CAAC,MAAM,EAAE,CAAC;QAEhC,QAAQ,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACnG,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAC;QAEzF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,MAAkC;QACtD,MAAM,WAAW,GAAG,qCAAiB,CAAC,cAAc,EAAE,CAAC;QAEvD,IAAI,CAAC,WAAW;YAAE,OAAO,MAAM,CAAC;QAEhC,MAAM,CAAC,OAAO,CAAC,aAAa,GAAG,MAAM,CAAC,CAAC,CAAC,UAAU,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAErE,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,KAAU;QACnC,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,KAAK,GAAG;YAAE,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAEhE,MAAM,yBAAW,CAAC,OAAO,EAAE,CAAC;QAE5B,IAAI,CAAC,qCAAiB,CAAC,cAAc,EAAE,EAAE;YACvC,gBAAgB,CAAC,gBAAgB,EAAE,CAAC;YAEpC,OAAO,KAAK,CAAC;SACd;QAED,OAAO,IAAA,eAAK,EAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;IAED,MAAM,CAAC,gBAAgB;QACpB,MAAM,QAAQ,GAAG,uBAAuB,CAAC;QACzC,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;QAEzC,MAAM,GAAG,GAAG,GAAG,QAAQ,aAAa,WAAW,EAAE,CAAC;QAElD,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;CAEF;AA3CD,4CA2CC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthError = void 0;
|
|
4
|
+
class AuthError extends Error {
|
|
5
|
+
constructor(message) {
|
|
6
|
+
super(message);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
exports.AuthError = AuthError;
|
|
10
|
+
//# sourceMappingURL=AuthError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthError.js","sourceRoot":"","sources":["../../../../src/entities/auth/services/AuthError.ts"],"names":[],"mappings":";;;AAAA,MAAa,SAAU,SAAQ,KAAK;IAClC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;CACF;AAJD,8BAIC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthService = void 0;
|
|
4
|
+
const Api_1 = require("../../../Api");
|
|
5
|
+
const AuthTokensService_1 = require("./AuthTokensService");
|
|
6
|
+
class AuthService {
|
|
7
|
+
static async signInByCode(code) {
|
|
8
|
+
var _a;
|
|
9
|
+
if (!code)
|
|
10
|
+
return;
|
|
11
|
+
const tokens = (_a = (await Api_1.Api.auth.getTokensByAuthCodeCallout.invoke(code))) === null || _a === void 0 ? void 0 : _a.data;
|
|
12
|
+
return AuthTokensService_1.AuthTokensService.setTokens(tokens);
|
|
13
|
+
}
|
|
14
|
+
static async refresh() {
|
|
15
|
+
const refreshToken = AuthTokensService_1.AuthTokensService.getRefreshToken();
|
|
16
|
+
if (!refreshToken)
|
|
17
|
+
return;
|
|
18
|
+
const tokens = (await Api_1.Api.auth.refreshCallout.invoke(refreshToken)).data;
|
|
19
|
+
AuthTokensService_1.AuthTokensService.setTokens(tokens);
|
|
20
|
+
return tokens;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.AuthService = AuthService;
|
|
24
|
+
//# sourceMappingURL=AuthService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthService.js","sourceRoot":"","sources":["../../../../src/entities/auth/services/AuthService.ts"],"names":[],"mappings":";;;AAAA,sCAAiC;AACjC,2DAAsD;AAEtD,MAAa,WAAW;IAEtB,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,IAAY;;QACpC,IAAI,CAAC,IAAI;YAAE,OAAO;QAElB,MAAM,MAAM,GAAG,MAAA,CAAC,MAAM,SAAG,CAAC,IAAI,CAAC,0BAA0B,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,0CAAE,IAAI,CAAC;QAE9E,OAAO,qCAAiB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,OAAO;QAClB,MAAM,YAAY,GAAG,qCAAiB,CAAC,eAAe,EAAE,CAAC;QAEzD,IAAI,CAAC,YAAY;YAAE,OAAO;QAE1B,MAAM,MAAM,GAAG,CAAC,MAAM,SAAG,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC;QAEzE,qCAAiB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAEpC,OAAO,MAAM,CAAC;IAChB,CAAC;CAEF;AAtBD,kCAsBC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AuthApiTokens } from "../../index";
|
|
2
|
+
export declare const ACCESS_TOKEN_KEY = "access_token";
|
|
3
|
+
export declare const REFRESH_TOKEN_KEY = "refresh_token";
|
|
4
|
+
export declare class AuthTokensService {
|
|
5
|
+
static getAccessToken(): string;
|
|
6
|
+
static setAccessToken(token: string): void;
|
|
7
|
+
static getRefreshToken(): string;
|
|
8
|
+
static setRefreshToken(token: string): void;
|
|
9
|
+
static setTokens(tokens: AuthApiTokens | undefined): AuthApiTokens;
|
|
10
|
+
static isTokensExists(): string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthTokensService = exports.REFRESH_TOKEN_KEY = exports.ACCESS_TOKEN_KEY = void 0;
|
|
4
|
+
const AuthError_1 = require("./AuthError");
|
|
5
|
+
exports.ACCESS_TOKEN_KEY = 'access_token';
|
|
6
|
+
exports.REFRESH_TOKEN_KEY = 'refresh_token';
|
|
7
|
+
class AuthTokensService {
|
|
8
|
+
static getAccessToken() {
|
|
9
|
+
return localStorage.getItem(exports.ACCESS_TOKEN_KEY);
|
|
10
|
+
}
|
|
11
|
+
static setAccessToken(token) {
|
|
12
|
+
if (!token)
|
|
13
|
+
throw new AuthError_1.AuthError('Access token is not defined during saving');
|
|
14
|
+
localStorage.setItem(exports.ACCESS_TOKEN_KEY, token);
|
|
15
|
+
}
|
|
16
|
+
static getRefreshToken() {
|
|
17
|
+
return localStorage.getItem(exports.REFRESH_TOKEN_KEY);
|
|
18
|
+
}
|
|
19
|
+
static setRefreshToken(token) {
|
|
20
|
+
if (!token)
|
|
21
|
+
throw new AuthError_1.AuthError('Refresh token is not defined during saving');
|
|
22
|
+
localStorage.setItem(exports.REFRESH_TOKEN_KEY, token);
|
|
23
|
+
}
|
|
24
|
+
static setTokens(tokens) {
|
|
25
|
+
if (!tokens)
|
|
26
|
+
return;
|
|
27
|
+
this.setAccessToken(tokens.accessToken);
|
|
28
|
+
this.setRefreshToken(tokens.refreshToken);
|
|
29
|
+
return tokens;
|
|
30
|
+
}
|
|
31
|
+
static isTokensExists() {
|
|
32
|
+
return AuthTokensService.getAccessToken() && AuthTokensService.getRefreshToken();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.AuthTokensService = AuthTokensService;
|
|
36
|
+
//# sourceMappingURL=AuthTokensService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthTokensService.js","sourceRoot":"","sources":["../../../../src/entities/auth/services/AuthTokensService.ts"],"names":[],"mappings":";;;AACA,2CAAsC;AAEzB,QAAA,gBAAgB,GAAG,cAAc,CAAC;AAClC,QAAA,iBAAiB,GAAG,eAAe,CAAC;AAEjD,MAAa,iBAAiB;IAE5B,MAAM,CAAC,cAAc;QACnB,OAAO,YAAY,CAAC,OAAO,CAAC,wBAAgB,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,KAAa;QACjC,IAAI,CAAC,KAAK;YAAE,MAAM,IAAI,qBAAS,CAAC,2CAA2C,CAAC,CAAC;QAE7E,YAAY,CAAC,OAAO,CAAC,wBAAgB,EAAE,KAAK,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,CAAC,eAAe;QACpB,OAAO,YAAY,CAAC,OAAO,CAAC,yBAAiB,CAAC,CAAC;IACjD,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,KAAa;QAClC,IAAI,CAAC,KAAK;YAAE,MAAM,IAAI,qBAAS,CAAC,4CAA4C,CAAC,CAAC;QAE9E,YAAY,CAAC,OAAO,CAAC,yBAAiB,EAAE,KAAK,CAAC,CAAC;IACjD,CAAC;IAED,MAAM,CAAC,SAAS,CAAC,MAAiC;QAChD,IAAI,CAAC,MAAM;YAAE,OAAO;QAEpB,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QACxC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QAE1C,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,cAAc;QACnB,OAAO,iBAAiB,CAAC,cAAc,EAAE,IAAI,iBAAiB,CAAC,eAAe,EAAE,CAAC;IACnF,CAAC;CACF;AAlCD,8CAkCC"}
|