@rockster/core 0.0.2 → 0.0.4
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/access/access.module.d.ts +11 -0
- package/access/access.module.js +60 -0
- package/access/access.module.js.map +1 -0
- package/access/controllers/controllers.d.ts +6 -0
- package/access/controllers/controllers.js +16 -0
- package/access/controllers/controllers.js.map +1 -0
- package/access/controllers/scope-group-user.controller.d.ts +13 -0
- package/access/controllers/scope-group-user.controller.js +84 -0
- package/access/controllers/scope-group-user.controller.js.map +1 -0
- package/access/controllers/scope-group.controller.d.ts +19 -0
- package/access/controllers/scope-group.controller.js +123 -0
- package/access/controllers/scope-group.controller.js.map +1 -0
- package/access/controllers/scope-key.controller.d.ts +7 -0
- package/access/controllers/scope-key.controller.js +45 -0
- package/access/controllers/scope-key.controller.js.map +1 -0
- package/access/controllers/scope-owner.controller.d.ts +8 -0
- package/access/controllers/scope-owner.controller.js +66 -0
- package/access/controllers/scope-owner.controller.js.map +1 -0
- package/access/controllers/scope-user.controller.d.ts +14 -0
- package/access/controllers/scope-user.controller.js +95 -0
- package/access/controllers/scope-user.controller.js.map +1 -0
- package/access/entities/entities.d.ts +6 -0
- package/access/entities/entities.js +18 -0
- package/access/entities/entities.js.map +1 -0
- package/access/entities/index.d.ts +5 -0
- package/access/entities/index.js +22 -0
- package/access/entities/index.js.map +1 -0
- package/access/entities/scope-access.d.ts +9 -0
- package/access/entities/scope-access.js +58 -0
- package/access/entities/scope-access.js.map +1 -0
- package/access/entities/scope-group-user.d.ts +7 -0
- package/access/entities/scope-group-user.js +47 -0
- package/access/entities/scope-group-user.js.map +1 -0
- package/access/entities/scope-group.d.ts +9 -0
- package/access/entities/scope-group.js +56 -0
- package/access/entities/scope-group.js.map +1 -0
- package/access/entities/scope-key.d.ts +5 -0
- package/access/entities/scope-key.js +35 -0
- package/access/entities/scope-key.js.map +1 -0
- package/access/entities/scope-owner.d.ts +7 -0
- package/access/entities/scope-owner.js +45 -0
- package/access/entities/scope-owner.js.map +1 -0
- package/access/env.d.ts +10 -0
- package/access/env.js +10 -0
- package/access/env.js.map +1 -0
- package/access/functions/get-context-id-service.d.ts +1 -0
- package/access/functions/get-context-id-service.js +8 -0
- package/access/functions/get-context-id-service.js.map +1 -0
- package/access/functions/get-is-owner.d.ts +1 -0
- package/access/functions/get-is-owner.js +8 -0
- package/access/functions/get-is-owner.js.map +1 -0
- package/access/functions/get-user-keys.d.ts +2 -0
- package/access/functions/get-user-keys.js +10 -0
- package/access/functions/get-user-keys.js.map +1 -0
- package/access/functions/index.d.ts +3 -0
- package/access/functions/index.js +20 -0
- package/access/functions/index.js.map +1 -0
- package/access/functions/register-scope.d.ts +8 -0
- package/access/functions/register-scope.js +82 -0
- package/access/functions/register-scope.js.map +1 -0
- package/access/index.d.ts +5 -0
- package/access/index.js +22 -0
- package/access/index.js.map +1 -0
- package/access/interfaces/index.d.ts +2 -0
- package/access/interfaces/index.js +19 -0
- package/access/interfaces/index.js.map +1 -0
- package/access/interfaces/scope-service-registry.d.ts +6 -0
- package/access/interfaces/scope-service-registry.js +3 -0
- package/access/interfaces/scope-service-registry.js.map +1 -0
- package/access/interfaces/scope-service.d.ts +12 -0
- package/access/interfaces/scope-service.js +3 -0
- package/access/interfaces/scope-service.js.map +1 -0
- package/access/models/scope-context.d.ts +4 -0
- package/access/models/scope-context.js +27 -0
- package/access/models/scope-context.js.map +1 -0
- package/access/models/scope-keys-update.d.ts +7 -0
- package/access/models/scope-keys-update.js +38 -0
- package/access/models/scope-keys-update.js.map +1 -0
- package/access/models/scope-owner.d.ts +5 -0
- package/access/models/scope-owner.js +32 -0
- package/access/models/scope-owner.js.map +1 -0
- package/access/models/scope-user-mapped.d.ts +8 -0
- package/access/models/scope-user-mapped.js +42 -0
- package/access/models/scope-user-mapped.js.map +1 -0
- package/access/models/scope-user.d.ts +9 -0
- package/access/models/scope-user.js +49 -0
- package/access/models/scope-user.js.map +1 -0
- package/access/queries/scope-group-user.query.d.ts +1 -0
- package/access/queries/scope-group-user.query.js +26 -0
- package/access/queries/scope-group-user.query.js.map +1 -0
- package/access/queries/scope-group.query.d.ts +1 -0
- package/access/queries/scope-group.query.js +12 -0
- package/access/queries/scope-group.query.js.map +1 -0
- package/access/services/index.d.ts +6 -0
- package/access/services/index.js +23 -0
- package/access/services/index.js.map +1 -0
- package/access/services/scope-access.service.d.ts +11 -0
- package/access/services/scope-access.service.js +87 -0
- package/access/services/scope-access.service.js.map +1 -0
- package/access/services/scope-group-user.service.d.ts +8 -0
- package/access/services/scope-group-user.service.js +49 -0
- package/access/services/scope-group-user.service.js.map +1 -0
- package/access/services/scope-group.service.d.ts +7 -0
- package/access/services/scope-group.service.js +38 -0
- package/access/services/scope-group.service.js.map +1 -0
- package/access/services/scope-key.service.d.ts +9 -0
- package/access/services/scope-key.service.js +52 -0
- package/access/services/scope-key.service.js.map +1 -0
- package/access/services/scope-owner.service.d.ts +7 -0
- package/access/services/scope-owner.service.js +35 -0
- package/access/services/scope-owner.service.js.map +1 -0
- package/access/services/scope-service.d.ts +10 -0
- package/access/services/scope-service.js +52 -0
- package/access/services/scope-service.js.map +1 -0
- package/command/functions/execute-post.js +5 -7
- package/command/functions/execute-post.js.map +1 -1
- package/command/services/post-action-builder.js +2 -0
- package/command/services/post-action-builder.js.map +1 -1
- package/command/services/remove-action-builder.js +2 -0
- package/command/services/remove-action-builder.js.map +1 -1
- package/common/entities/base-entity.js +2 -0
- package/common/entities/base-entity.js.map +1 -1
- package/common/interfaces/enum/object-type.d.ts +2 -1
- package/common/interfaces/enum/object-type.js +1 -0
- package/common/interfaces/enum/object-type.js.map +1 -1
- package/controllers/constants/controller-transaction.d.ts +2 -0
- package/controllers/constants/controller-transaction.js +6 -0
- package/controllers/constants/controller-transaction.js.map +1 -0
- package/controllers/controller.controller.d.ts +1 -1
- package/controllers/controller.controller.js +4 -4
- package/controllers/controller.controller.js.map +1 -1
- package/controllers/decorators/controller.decorator.js +8 -0
- package/controllers/decorators/controller.decorator.js.map +1 -1
- package/controllers/decorators/index.d.ts +1 -0
- package/controllers/decorators/index.js +1 -0
- package/controllers/decorators/index.js.map +1 -1
- package/controllers/decorators/transaction.decorator.d.ts +7 -0
- package/controllers/decorators/transaction.decorator.js +23 -0
- package/controllers/decorators/transaction.decorator.js.map +1 -0
- package/controllers/interfaces/controller-object.d.ts +1 -0
- package/controllers/interfaces/controller-options.d.ts +1 -0
- package/controllers/interfaces/controller-property.d.ts +3 -0
- package/controllers/services/default-action-builder.js +32 -0
- package/controllers/services/default-action-builder.js.map +1 -1
- package/core/core.controller.d.ts +1 -0
- package/core/core.controller.js +9 -1
- package/core/core.controller.js.map +1 -1
- package/core/functions/create-interceptor.js +2 -2
- package/core/functions/create-interceptor.js.map +1 -1
- package/core/functions/resolve-action-transactional.d.ts +3 -0
- package/core/functions/resolve-action-transactional.js +10 -0
- package/core/functions/resolve-action-transactional.js.map +1 -0
- package/core/interfaces/action-def.d.ts +2 -5
- package/core/interfaces/action-handle.d.ts +5 -0
- package/core/interfaces/action-handle.js +3 -0
- package/core/interfaces/action-handle.js.map +1 -0
- package/core/interfaces/core-options.d.ts +1 -0
- package/core/interfaces/interceptor.d.ts +1 -1
- package/core/interfaces/object.d.ts +3 -2
- package/core/interfaces/request-context.d.ts +2 -2
- package/core/services/request-executor.d.ts +8 -0
- package/core/services/request-executor.js +88 -0
- package/core/services/request-executor.js.map +1 -1
- package/core/services/request-router.js +3 -3
- package/core/services/request-router.js.map +1 -1
- package/database/decorators/entity.decorator.d.ts +3 -1
- package/database/decorators/entity.decorator.js +14 -5
- package/database/decorators/entity.decorator.js.map +1 -1
- package/database/decorators/external-column.decorator.d.ts +17 -0
- package/database/decorators/external-column.decorator.js +30 -0
- package/database/decorators/external-column.decorator.js.map +1 -0
- package/database/decorators/index.d.ts +1 -0
- package/database/decorators/index.js +1 -0
- package/database/decorators/index.js.map +1 -1
- package/database/decorators/relation.decorator.d.ts +2 -2
- package/database/decorators/relation.decorator.js.map +1 -1
- package/database/extensions/select-query-builder.d.ts +1 -5
- package/database/extensions/select-query-builder.js.map +1 -1
- package/database/functions/find-relation.d.ts +2 -1
- package/database/functions/find-relation.js +3 -3
- package/database/functions/find-relation.js.map +1 -1
- package/database/functions/generate-entity-id.d.ts +2 -0
- package/database/functions/{generate-id.js → generate-entity-id.js} +3 -3
- package/database/functions/generate-entity-id.js.map +1 -0
- package/database/functions/get-relations.d.ts +1 -1
- package/database/functions/use-protector.js +1 -1
- package/database/functions/use-protector.js.map +1 -1
- package/database/functions/use-transaction.d.ts +1 -0
- package/database/functions/use-transaction.js +2 -6
- package/database/functions/use-transaction.js.map +1 -1
- package/database/interfaces/entity-dto-object.d.ts +7 -0
- package/database/interfaces/entity-dto-object.js +3 -0
- package/database/interfaces/entity-dto-object.js.map +1 -0
- package/database/interfaces/entity-property.d.ts +12 -0
- package/database/interfaces/path.d.ts +6 -2
- package/database/interfaces/virtual-select.d.ts +4 -0
- package/database/interfaces/virtual-select.js +3 -0
- package/database/interfaces/virtual-select.js.map +1 -0
- package/database/services/protect-builder.d.ts +3 -2
- package/database/services/protect-builder.js +2 -2
- package/database/services/protect-builder.js.map +1 -1
- package/database/services/repository.service.d.ts +1 -1
- package/database/services/repository.service.js +3 -6
- package/database/services/repository.service.js.map +1 -1
- package/docs/queries/docs-controller-action.query.d.ts +1 -1
- package/docs/queries/docs-controller.query.d.ts +1 -1
- package/docs/queries/docs-model.query.d.ts +1 -1
- package/docs/queries/docs-model.query.js +1 -1
- package/docs/queries/docs-model.query.js.map +1 -1
- package/docs/queries/docs-version.query.d.ts +1 -1
- package/docs/services/docs-version.service.js +6 -3
- package/docs/services/docs-version.service.js.map +1 -1
- package/forms/queries/form.query.d.ts +1 -1
- package/forms/queries/property.query.d.ts +1 -1
- package/global.js +1 -1
- package/global.js.map +1 -1
- package/http/http.controller.d.ts +2 -0
- package/http/http.controller.js +3 -2
- package/http/http.controller.js.map +1 -1
- package/index.d.ts +3 -1
- package/index.js +2 -6
- package/index.js.map +1 -1
- package/jobs/jobs.controller.js +2 -0
- package/jobs/jobs.controller.js.map +1 -1
- package/package.json +7 -6
- package/query/functions/add-join.js +8 -5
- package/query/functions/add-join.js.map +1 -1
- package/query/functions/collect-external-column-owners.d.ts +10 -0
- package/query/functions/collect-external-column-owners.js +100 -0
- package/query/functions/collect-external-column-owners.js.map +1 -0
- package/query/functions/create-query-builder.js +47 -18
- package/query/functions/create-query-builder.js.map +1 -1
- package/query/functions/create-query-cache-hash.d.ts +16 -0
- package/query/functions/create-query-cache-hash.js +70 -0
- package/query/functions/create-query-cache-hash.js.map +1 -0
- package/query/functions/create-query.d.ts +8 -3
- package/query/functions/create-query.js +12 -9
- package/query/functions/create-query.js.map +1 -1
- package/query/functions/describe-query-filter.js +3 -2
- package/query/functions/describe-query-filter.js.map +1 -1
- package/query/functions/execute-query.js +55 -9
- package/query/functions/execute-query.js.map +1 -1
- package/query/functions/expand-select-with-external-dependencies.d.ts +9 -0
- package/query/functions/expand-select-with-external-dependencies.js +34 -0
- package/query/functions/expand-select-with-external-dependencies.js.map +1 -0
- package/query/functions/external-column-owner-path.d.ts +5 -0
- package/query/functions/external-column-owner-path.js +18 -0
- package/query/functions/external-column-owner-path.js.map +1 -0
- package/query/functions/get-entity-object-class.d.ts +2 -0
- package/query/functions/get-entity-object-class.js +12 -0
- package/query/functions/get-entity-object-class.js.map +1 -0
- package/query/functions/get-native-select.js +3 -0
- package/query/functions/get-native-select.js.map +1 -1
- package/query/functions/load-properties.d.ts +20 -2
- package/query/functions/load-properties.js +119 -37
- package/query/functions/load-properties.js.map +1 -1
- package/query/functions/map-query-property-to-column-name.js +1 -1
- package/query/functions/map-query-property-to-column-name.js.map +1 -1
- package/query/functions/query-structure-cache.d.ts +24 -0
- package/query/functions/query-structure-cache.js +66 -0
- package/query/functions/query-structure-cache.js.map +1 -0
- package/query/interfaces/query.d.ts +44 -1
- package/query/services/query-action-builder.d.ts +4 -1
- package/query/services/query-action-builder.js +32 -12
- package/query/services/query-action-builder.js.map +1 -1
- package/security/env.js.map +1 -1
- package/security/requests/security.request.js +1 -1
- package/security/requests/security.request.js.map +1 -1
- package/tasks/decorators/task.decorator.js +3 -2
- package/tasks/decorators/task.decorator.js.map +1 -1
- package/tasks/functions/{create-task-message-receptor.d.ts → create-task-message-post.d.ts} +1 -1
- package/tasks/functions/{create-task-message-receptor.js → create-task-message-post.js} +8 -3
- package/tasks/functions/create-task-message-post.js.map +1 -0
- package/tasks/interfaces/task-object.d.ts +2 -2
- package/tasks/interfaces/task-post-intercept.d.ts +1 -8
- package/tasks/interfaces/task-runner.d.ts +2 -1
- package/tasks/interfaces/task-settings.d.ts +2 -0
- package/tasks/services/task-runner.service.js +5 -3
- package/tasks/services/task-runner.service.js.map +1 -1
- package/translations/controllers/translation.controller.js +12 -9
- package/translations/controllers/translation.controller.js.map +1 -1
- package/translations/functions/create-translation-values.js +2 -5
- package/translations/functions/create-translation-values.js.map +1 -1
- package/translations/migrations/1723760669185-CreateTranslationTables.js +3 -3
- package/translations/migrations/1723760669185-CreateTranslationTables.js.map +1 -1
- package/translations/queries/translation-config.query.d.ts +1 -1
- package/translations/queries/translation-values.query.d.ts +1 -1
- package/translations/queries/translation-values.query.js +1 -1
- package/translations/queries/translation-values.query.js.map +1 -1
- package/translations/translations.controller.d.ts +1 -1
- package/translations/translations.controller.js +4 -4
- package/translations/translations.controller.js.map +1 -1
- package/database/functions/generate-id.d.ts +0 -2
- package/database/functions/generate-id.js.map +0 -1
- package/tasks/functions/create-task-message-receptor.js.map +0 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.entities = void 0;
|
|
4
|
+
const scope_user_mapped_1 = require("../models/scope-user-mapped");
|
|
5
|
+
const scope_access_1 = require("./scope-access");
|
|
6
|
+
const scope_group_1 = require("./scope-group");
|
|
7
|
+
const scope_group_user_1 = require("./scope-group-user");
|
|
8
|
+
const scope_key_1 = require("./scope-key");
|
|
9
|
+
const scope_owner_1 = require("./scope-owner");
|
|
10
|
+
exports.entities = [
|
|
11
|
+
scope_access_1.ScopeAccess,
|
|
12
|
+
scope_group_user_1.ScopeGroupUser,
|
|
13
|
+
scope_group_1.ScopeGroup,
|
|
14
|
+
scope_key_1.ScopeKey,
|
|
15
|
+
scope_owner_1.ScopeOwner,
|
|
16
|
+
scope_user_mapped_1.ScopeUserMapped
|
|
17
|
+
];
|
|
18
|
+
//# sourceMappingURL=entities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entities.js","sourceRoot":"./","sources":["access/entities/entities.ts"],"names":[],"mappings":";;;AAAA,mEAA8D;AAC9D,iDAA6C;AAC7C,+CAA2C;AAC3C,yDAAoD;AACpD,2CAAuC;AACvC,+CAA2C;AAE9B,QAAA,QAAQ,GAAG;IACrB,0BAAW;IACX,iCAAc;IACd,wBAAU;IACV,oBAAQ;IACR,wBAAU;IACV,mCAAe;CACjB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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("./scope-access"), exports);
|
|
18
|
+
__exportStar(require("./scope-group-user"), exports);
|
|
19
|
+
__exportStar(require("./scope-group"), exports);
|
|
20
|
+
__exportStar(require("./scope-key"), exports);
|
|
21
|
+
__exportStar(require("./scope-owner"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"./","sources":["access/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,qDAAmC;AACnC,gDAA8B;AAC9B,8CAA4B;AAC5B,gDAA8B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IScopeAccess } from "@rockster/common/access";
|
|
2
|
+
import { BaseEntity } from "../../common/entities/base-entity";
|
|
3
|
+
export declare class ScopeAccess extends BaseEntity implements IScopeAccess {
|
|
4
|
+
contextName: string;
|
|
5
|
+
contextId?: string;
|
|
6
|
+
userId?: string;
|
|
7
|
+
groupId?: string;
|
|
8
|
+
key?: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ScopeAccess = void 0;
|
|
13
|
+
const base_entity_1 = require("../../common/entities/base-entity");
|
|
14
|
+
const entity_decorator_1 = require("../../database/decorators/entity.decorator");
|
|
15
|
+
const class_pipe_1 = require("@rockster/class-pipe");
|
|
16
|
+
const column_decorator_1 = require("../../database/decorators/column.decorator");
|
|
17
|
+
const relation_decorator_1 = require("../../database/decorators/relation.decorator");
|
|
18
|
+
const scope_key_1 = require("./scope-key");
|
|
19
|
+
const scope_group_1 = require("./scope-group");
|
|
20
|
+
const typeorm_1 = require("typeorm");
|
|
21
|
+
let ScopeAccess = class ScopeAccess extends base_entity_1.BaseEntity {
|
|
22
|
+
};
|
|
23
|
+
exports.ScopeAccess = ScopeAccess;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_pipe_1.Expose)(),
|
|
26
|
+
(0, class_pipe_1.IsString)(),
|
|
27
|
+
(0, column_decorator_1.Column)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], ScopeAccess.prototype, "contextName", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_pipe_1.Expose)(),
|
|
32
|
+
(0, class_pipe_1.IsString)(),
|
|
33
|
+
(0, column_decorator_1.Column)({ nullable: true }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], ScopeAccess.prototype, "contextId", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_pipe_1.Expose)(),
|
|
38
|
+
(0, class_pipe_1.IsString)(),
|
|
39
|
+
(0, typeorm_1.Index)(),
|
|
40
|
+
(0, column_decorator_1.Column)({ nullable: true }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], ScopeAccess.prototype, "userId", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_pipe_1.Expose)(),
|
|
45
|
+
(0, class_pipe_1.IsString)(),
|
|
46
|
+
(0, relation_decorator_1.Relation)(() => scope_group_1.ScopeGroup, { nullable: true }),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], ScopeAccess.prototype, "groupId", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, class_pipe_1.Expose)(),
|
|
51
|
+
(0, class_pipe_1.IsString)(),
|
|
52
|
+
(0, relation_decorator_1.Relation)(() => scope_key_1.ScopeKey, { nullable: true }),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], ScopeAccess.prototype, "key", void 0);
|
|
55
|
+
exports.ScopeAccess = ScopeAccess = __decorate([
|
|
56
|
+
(0, entity_decorator_1.Entity)()
|
|
57
|
+
], ScopeAccess);
|
|
58
|
+
//# sourceMappingURL=scope-access.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-access.js","sourceRoot":"./","sources":["access/entities/scope-access.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,mEAA+D;AAC/D,iFAAoE;AACpE,qDAAwD;AACxD,iFAAoE;AACpE,qFAAwE;AACxE,2CAAuC;AACvC,+CAA2C;AAC3C,qCAAgC;AAGzB,IAAM,WAAW,GAAjB,MAAM,WACV,SAAQ,wBAAU;CA6BpB,CAAA;AA9BY,kCAAW;AAQrB;IAHC,IAAA,mBAAM,GAAE;IACR,IAAA,qBAAQ,GAAE;IACV,IAAA,yBAAM,GAAE;;gDACW;AAKpB;IAHC,IAAA,mBAAM,GAAE;IACR,IAAA,qBAAQ,GAAE;IACV,IAAA,yBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACR;AAMnB;IAJC,IAAA,mBAAM,GAAE;IACR,IAAA,qBAAQ,GAAE;IACV,IAAA,eAAK,GAAE;IACP,IAAA,yBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACX;AAKhB;IAHC,IAAA,mBAAM,GAAE;IACR,IAAA,qBAAQ,GAAE;IACV,IAAA,6BAAQ,EAAC,GAAG,EAAE,CAAC,wBAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CAC9B;AAKjB;IAHC,IAAA,mBAAM,GAAE;IACR,IAAA,qBAAQ,GAAE;IACV,IAAA,6BAAQ,EAAC,GAAG,EAAE,CAAC,oBAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCAChC;sBA7BH,WAAW;IADvB,IAAA,yBAAM,GAAE;GACI,WAAW,CA8BvB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IScopeGroupUser, IScopeUserMapped } from "@rockster/common/access";
|
|
2
|
+
import { BaseEntity } from "../../common/entities/base-entity";
|
|
3
|
+
export declare class ScopeGroupUser extends BaseEntity implements IScopeGroupUser {
|
|
4
|
+
groupId: string;
|
|
5
|
+
userId: string;
|
|
6
|
+
user?: IScopeUserMapped;
|
|
7
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ScopeGroupUser = void 0;
|
|
13
|
+
const base_entity_1 = require("../../common/entities/base-entity");
|
|
14
|
+
const entity_decorator_1 = require("../../database/decorators/entity.decorator");
|
|
15
|
+
const class_pipe_1 = require("@rockster/class-pipe");
|
|
16
|
+
const relation_decorator_1 = require("../../database/decorators/relation.decorator");
|
|
17
|
+
const scope_group_1 = require("./scope-group");
|
|
18
|
+
const column_decorator_1 = require("../../database/decorators/column.decorator");
|
|
19
|
+
const typeorm_1 = require("typeorm");
|
|
20
|
+
const scope_user_mapped_1 = require("../models/scope-user-mapped");
|
|
21
|
+
let ScopeGroupUser = class ScopeGroupUser extends base_entity_1.BaseEntity {
|
|
22
|
+
};
|
|
23
|
+
exports.ScopeGroupUser = ScopeGroupUser;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_pipe_1.Expose)(),
|
|
26
|
+
(0, class_pipe_1.IsRequired)(),
|
|
27
|
+
(0, class_pipe_1.IsString)(),
|
|
28
|
+
(0, relation_decorator_1.Relation)(() => scope_group_1.ScopeGroup),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], ScopeGroupUser.prototype, "groupId", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_pipe_1.Expose)(),
|
|
33
|
+
(0, class_pipe_1.IsRequired)(),
|
|
34
|
+
(0, class_pipe_1.IsString)(),
|
|
35
|
+
(0, typeorm_1.Index)(),
|
|
36
|
+
(0, column_decorator_1.Column)(),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], ScopeGroupUser.prototype, "userId", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_pipe_1.Expose)(),
|
|
41
|
+
(0, class_pipe_1.IsType)(() => scope_user_mapped_1.ScopeUserMapped),
|
|
42
|
+
__metadata("design:type", Object)
|
|
43
|
+
], ScopeGroupUser.prototype, "user", void 0);
|
|
44
|
+
exports.ScopeGroupUser = ScopeGroupUser = __decorate([
|
|
45
|
+
(0, entity_decorator_1.Entity)()
|
|
46
|
+
], ScopeGroupUser);
|
|
47
|
+
//# sourceMappingURL=scope-group-user.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-group-user.js","sourceRoot":"./","sources":["access/entities/scope-group-user.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,mEAA+D;AAC/D,iFAAoE;AACpE,qDAA4E;AAC5E,qFAAwE;AACxE,+CAA2C;AAC3C,iFAAoE;AACpE,qCAAgC;AAChC,mEAA8D;AAGvD,IAAM,cAAc,GAApB,MAAM,cACV,SAAQ,wBAAU;CAqBpB,CAAA;AAtBY,wCAAc;AASxB;IAJC,IAAA,mBAAM,GAAE;IACR,IAAA,uBAAU,GAAE;IACZ,IAAA,qBAAQ,GAAE;IACV,IAAA,6BAAQ,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC;;+CACX;AAOhB;IALC,IAAA,mBAAM,GAAE;IACR,IAAA,uBAAU,GAAE;IACZ,IAAA,qBAAQ,GAAE;IACV,IAAA,eAAK,GAAE;IACP,IAAA,yBAAM,GAAE;;8CACM;AAKf;IAFC,IAAA,mBAAM,GAAE;IACR,IAAA,mBAAM,EAAC,GAAG,EAAE,CAAC,mCAAe,CAAC;;4CACN;yBArBd,cAAc;IAD1B,IAAA,yBAAM,GAAE;GACI,cAAc,CAsB1B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IScopeAccess, IScopeGroup } from "@rockster/common/access";
|
|
2
|
+
import { BaseEntity } from "../../common/entities/base-entity";
|
|
3
|
+
export declare class ScopeGroup extends BaseEntity implements IScopeGroup {
|
|
4
|
+
contextName: string;
|
|
5
|
+
contextId?: string;
|
|
6
|
+
isReadOnly?: boolean;
|
|
7
|
+
name: string;
|
|
8
|
+
keys?: IScopeAccess[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ScopeGroup = void 0;
|
|
13
|
+
const base_entity_1 = require("../../common/entities/base-entity");
|
|
14
|
+
const entity_decorator_1 = require("../../database/decorators/entity.decorator");
|
|
15
|
+
const column_decorator_1 = require("../../database/decorators/column.decorator");
|
|
16
|
+
const class_pipe_1 = require("@rockster/class-pipe");
|
|
17
|
+
const scope_access_1 = require("./scope-access");
|
|
18
|
+
let ScopeGroup = class ScopeGroup extends base_entity_1.BaseEntity {
|
|
19
|
+
};
|
|
20
|
+
exports.ScopeGroup = ScopeGroup;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_pipe_1.Expose)(),
|
|
23
|
+
(0, class_pipe_1.IsRequired)(),
|
|
24
|
+
(0, class_pipe_1.IsString)(),
|
|
25
|
+
(0, column_decorator_1.Column)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], ScopeGroup.prototype, "contextName", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_pipe_1.Expose)(),
|
|
30
|
+
(0, class_pipe_1.IsOptional)(),
|
|
31
|
+
(0, class_pipe_1.IsString)(),
|
|
32
|
+
(0, column_decorator_1.Column)({ nullable: true }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], ScopeGroup.prototype, "contextId", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_pipe_1.Expose)(),
|
|
37
|
+
(0, class_pipe_1.IsBoolean)(),
|
|
38
|
+
(0, column_decorator_1.Column)({ nullable: true }),
|
|
39
|
+
__metadata("design:type", Boolean)
|
|
40
|
+
], ScopeGroup.prototype, "isReadOnly", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, class_pipe_1.Expose)(),
|
|
43
|
+
(0, class_pipe_1.IsRequired)(),
|
|
44
|
+
(0, class_pipe_1.IsString)(),
|
|
45
|
+
(0, column_decorator_1.Column)(),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], ScopeGroup.prototype, "name", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_pipe_1.Expose)(),
|
|
50
|
+
(0, class_pipe_1.IsType)(() => scope_access_1.ScopeAccess),
|
|
51
|
+
__metadata("design:type", Array)
|
|
52
|
+
], ScopeGroup.prototype, "keys", void 0);
|
|
53
|
+
exports.ScopeGroup = ScopeGroup = __decorate([
|
|
54
|
+
(0, entity_decorator_1.Entity)()
|
|
55
|
+
], ScopeGroup);
|
|
56
|
+
//# sourceMappingURL=scope-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-group.js","sourceRoot":"./","sources":["access/entities/scope-group.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA,mEAA+D;AAC/D,iFAAoE;AACpE,iFAAoE;AACpE,qDAO8B;AAC9B,iDAA6C;AAGtC,IAAM,UAAU,GAAhB,MAAM,UACV,SAAQ,wBAAU;CA+BpB,CAAA;AAhCY,gCAAU;AASpB;IAJC,IAAA,mBAAM,GAAE;IACR,IAAA,uBAAU,GAAE;IACZ,IAAA,qBAAQ,GAAE;IACV,IAAA,yBAAM,GAAE;;+CACW;AAMpB;IAJC,IAAA,mBAAM,GAAE;IACR,IAAA,uBAAU,GAAE;IACZ,IAAA,qBAAQ,GAAE;IACV,IAAA,yBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACR;AAKnB;IAHC,IAAA,mBAAM,GAAE;IACR,IAAA,sBAAS,GAAE;IACX,IAAA,yBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACN;AAMrB;IAJC,IAAA,mBAAM,GAAE;IACR,IAAA,uBAAU,GAAE;IACZ,IAAA,qBAAQ,GAAE;IACV,IAAA,yBAAM,GAAE;;wCACI;AAKb;IAFC,IAAA,mBAAM,GAAE;IACR,IAAA,mBAAM,EAAC,GAAG,EAAE,CAAC,0BAAW,CAAC;;wCACJ;qBA/BZ,UAAU;IADtB,IAAA,yBAAM,GAAE;GACI,UAAU,CAgCtB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ScopeKey = void 0;
|
|
13
|
+
const class_pipe_1 = require("@rockster/class-pipe");
|
|
14
|
+
const entity_decorator_1 = require("../../database/decorators/entity.decorator");
|
|
15
|
+
const column_decorator_1 = require("../../database/decorators/column.decorator");
|
|
16
|
+
const id_decorator_1 = require("../../database/decorators/id.decorator");
|
|
17
|
+
let ScopeKey = class ScopeKey {
|
|
18
|
+
};
|
|
19
|
+
exports.ScopeKey = ScopeKey;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_pipe_1.Expose)(),
|
|
22
|
+
(0, class_pipe_1.IsString)(),
|
|
23
|
+
(0, column_decorator_1.Column)(),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], ScopeKey.prototype, "contextName", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_pipe_1.Expose)(),
|
|
28
|
+
(0, class_pipe_1.IsString)(),
|
|
29
|
+
(0, id_decorator_1.Id)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], ScopeKey.prototype, "name", void 0);
|
|
32
|
+
exports.ScopeKey = ScopeKey = __decorate([
|
|
33
|
+
(0, entity_decorator_1.Entity)()
|
|
34
|
+
], ScopeKey);
|
|
35
|
+
//# sourceMappingURL=scope-key.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-key.js","sourceRoot":"./","sources":["access/entities/scope-key.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAwD;AACxD,iFAAoE;AACpE,iFAAoE;AACpE,yEAA4D;AAIrD,IAAM,QAAQ,GAAd,MAAM,QAAQ;CAYpB,CAAA;AAZY,4BAAQ;AAMlB;IAHC,IAAA,mBAAM,GAAE;IACR,IAAA,qBAAQ,GAAE;IACV,IAAA,yBAAM,GAAE;;6CACW;AAKpB;IAHC,IAAA,mBAAM,GAAE;IACR,IAAA,qBAAQ,GAAE;IACV,IAAA,iBAAE,GAAE;;sCACQ;mBAXH,QAAQ;IADpB,IAAA,yBAAM,GAAE;GACI,QAAQ,CAYpB"}
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ScopeOwner = void 0;
|
|
13
|
+
const base_entity_1 = require("../../common/entities/base-entity");
|
|
14
|
+
const entity_decorator_1 = require("../../database/decorators/entity.decorator");
|
|
15
|
+
const class_pipe_1 = require("@rockster/class-pipe");
|
|
16
|
+
const column_decorator_1 = require("../../database/decorators/column.decorator");
|
|
17
|
+
const typeorm_1 = require("typeorm");
|
|
18
|
+
let ScopeOwner = class ScopeOwner extends base_entity_1.BaseEntity {
|
|
19
|
+
};
|
|
20
|
+
exports.ScopeOwner = ScopeOwner;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_pipe_1.Expose)(),
|
|
23
|
+
(0, class_pipe_1.IsString)(),
|
|
24
|
+
(0, typeorm_1.Index)(),
|
|
25
|
+
(0, column_decorator_1.Column)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], ScopeOwner.prototype, "contextName", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_pipe_1.Expose)(),
|
|
30
|
+
(0, class_pipe_1.IsString)(),
|
|
31
|
+
(0, typeorm_1.Index)(),
|
|
32
|
+
(0, column_decorator_1.Column)({ nullable: true }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], ScopeOwner.prototype, "contextId", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_pipe_1.Expose)(),
|
|
37
|
+
(0, class_pipe_1.IsString)(),
|
|
38
|
+
(0, typeorm_1.Index)(),
|
|
39
|
+
(0, column_decorator_1.Column)(),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], ScopeOwner.prototype, "userId", void 0);
|
|
42
|
+
exports.ScopeOwner = ScopeOwner = __decorate([
|
|
43
|
+
(0, entity_decorator_1.Entity)()
|
|
44
|
+
], ScopeOwner);
|
|
45
|
+
//# sourceMappingURL=scope-owner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-owner.js","sourceRoot":"./","sources":["access/entities/scope-owner.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,mEAA+D;AAC/D,iFAAoE;AACpE,qDAAwD;AACxD,iFAAoE;AACpE,qCAAgC;AAGzB,IAAM,UAAU,GAAhB,MAAM,UACV,SAAQ,wBAAU;CAoBpB,CAAA;AArBY,gCAAU;AAQpB;IAJC,IAAA,mBAAM,GAAE;IACR,IAAA,qBAAQ,GAAE;IACV,IAAA,eAAK,GAAE;IACP,IAAA,yBAAM,GAAE;;+CACW;AAMpB;IAJC,IAAA,mBAAM,GAAE;IACR,IAAA,qBAAQ,GAAE;IACV,IAAA,eAAK,GAAE;IACP,IAAA,yBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACR;AAMnB;IAJC,IAAA,mBAAM,GAAE;IACR,IAAA,qBAAQ,GAAE;IACV,IAAA,eAAK,GAAE;IACP,IAAA,yBAAM,GAAE;;0CACM;qBApBL,UAAU;IADtB,IAAA,yBAAM,GAAE;GACI,UAAU,CAqBtB"}
|
package/access/env.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IScopeKey } from "@rockster/common/access";
|
|
2
|
+
import { IScopeServiceRegistry } from "./interfaces/scope-service-registry";
|
|
3
|
+
import { ScopeAccessService } from "./services/scope-access.service";
|
|
4
|
+
import { ScopeOwnerService } from "./services/scope-owner.service";
|
|
5
|
+
export declare const env: {
|
|
6
|
+
scopesKeys: Map<string, IScopeKey[]>;
|
|
7
|
+
scopeServiceRegistry: Map<string, IScopeServiceRegistry>;
|
|
8
|
+
scopeAccessService: ScopeAccessService;
|
|
9
|
+
scopeOwnerService: ScopeOwnerService;
|
|
10
|
+
};
|
package/access/env.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.env = void 0;
|
|
4
|
+
exports.env = {
|
|
5
|
+
scopesKeys: new Map(),
|
|
6
|
+
scopeServiceRegistry: new Map(),
|
|
7
|
+
scopeAccessService: null,
|
|
8
|
+
scopeOwnerService: null
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=env.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"./","sources":["access/env.ts"],"names":[],"mappings":";;;AAKa,QAAA,GAAG,GAAG;IAChB,UAAU,EAAE,IAAI,GAAG,EAAuB;IAC1C,oBAAoB,EAAE,IAAI,GAAG,EAAiC;IAC9D,kBAAkB,EAAE,IAA0B;IAC9C,iBAAiB,EAAE,IAAyB;CAC9C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getGetContextIdService(contextName: string): import("..").IScopeServiceRegistry;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getGetContextIdService = getGetContextIdService;
|
|
4
|
+
const env_1 = require("../env");
|
|
5
|
+
function getGetContextIdService(contextName) {
|
|
6
|
+
return env_1.env.scopeServiceRegistry.get(contextName);
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=get-context-id-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-context-id-service.js","sourceRoot":"./","sources":["access/functions/get-context-id-service.ts"],"names":[],"mappings":";;AAEA,wDAEC;AAJD,gCAA6B;AAE7B,SAAgB,sBAAsB,CAAC,WAAmB;IACvD,OAAO,SAAG,CAAC,oBAAoB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getIsOwner(contextName: string, userId: string, contextId?: string): Promise<boolean>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getIsOwner = getIsOwner;
|
|
4
|
+
const env_1 = require("../env");
|
|
5
|
+
async function getIsOwner(contextName, userId, contextId) {
|
|
6
|
+
return env_1.env.scopeOwnerService.getIsOwner(contextName, userId, contextId);
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=get-is-owner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-is-owner.js","sourceRoot":"./","sources":["access/functions/get-is-owner.ts"],"names":[],"mappings":";;AAEA,gCAUC;AAZD,gCAA6B;AAEtB,KAAK,UAAU,UAAU,CAC7B,WAAmB,EACnB,MAAc,EACd,SAAkB;IAElB,OAAO,SAAG,CAAC,iBAAiB,CAAC,UAAU,CACpC,WAAW,EACX,MAAM,EACN,SAAS,CACX,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getUserKeys = getUserKeys;
|
|
4
|
+
const env_1 = require("../env");
|
|
5
|
+
async function getUserKeys(arg1, arg2) {
|
|
6
|
+
return arg2
|
|
7
|
+
? env_1.env.scopeAccessService.getKeysWithCtx(arg2, arg1)
|
|
8
|
+
: env_1.env.scopeAccessService.getAllUserKeys(arg1);
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=get-user-keys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-user-keys.js","sourceRoot":"./","sources":["access/functions/get-user-keys.ts"],"names":[],"mappings":";;AAIA,kCAIC;AARD,gCAA6B;AAItB,KAAK,UAAU,WAAW,CAAC,IAAY,EAAE,IAAa;IAC1D,OAAO,IAAI;QACR,CAAC,CAAC,SAAG,CAAC,kBAAkB,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC;QACnD,CAAC,CAAC,SAAG,CAAC,kBAAkB,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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("./get-context-id-service"), exports);
|
|
18
|
+
__exportStar(require("./get-user-keys"), exports);
|
|
19
|
+
__exportStar(require("./register-scope"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"./","sources":["access/functions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,kDAAgC;AAChC,mDAAiC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Instantiable } from "@rockster/common";
|
|
2
|
+
import { IScopeService } from "../interfaces/scope-service";
|
|
3
|
+
export declare function registerScope(contextName: string, Service: Instantiable<IScopeService<any>>, withId?: boolean): {
|
|
4
|
+
ActionKey: (key: string) => MethodDecorator;
|
|
5
|
+
QueryActionKey: (key: string) => (target: any, propertyKey: any) => void;
|
|
6
|
+
CreateActionKey: (key: string) => MethodDecorator;
|
|
7
|
+
ModifyActionKey: (key: string) => MethodDecorator;
|
|
8
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerScope = registerScope;
|
|
4
|
+
const env_1 = require("../env");
|
|
5
|
+
function registerScope(contextName, Service, withId) {
|
|
6
|
+
const keys = [];
|
|
7
|
+
env_1.env.scopesKeys.set(contextName, keys);
|
|
8
|
+
if (Service) {
|
|
9
|
+
env_1.env.scopeServiceRegistry.set(contextName, {
|
|
10
|
+
Service: Service
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
const getProperty = (target, propertyKey) => {
|
|
14
|
+
const property = core
|
|
15
|
+
.storage
|
|
16
|
+
.createProperty(target, propertyKey);
|
|
17
|
+
if (!property.keys)
|
|
18
|
+
property.keys = new Map();
|
|
19
|
+
return property;
|
|
20
|
+
};
|
|
21
|
+
return {
|
|
22
|
+
ActionKey: function (key) {
|
|
23
|
+
return function (target, propertyKey) {
|
|
24
|
+
keys.push({
|
|
25
|
+
contextName: contextName,
|
|
26
|
+
name: key
|
|
27
|
+
});
|
|
28
|
+
const property = getProperty(target, propertyKey);
|
|
29
|
+
property.keys.set('default', {
|
|
30
|
+
contextName: contextName,
|
|
31
|
+
name: key,
|
|
32
|
+
withId: withId
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
QueryActionKey: function (key) {
|
|
37
|
+
return function (target, propertyKey) {
|
|
38
|
+
keys.push({
|
|
39
|
+
contextName: contextName,
|
|
40
|
+
name: key
|
|
41
|
+
});
|
|
42
|
+
const property = getProperty(target, propertyKey);
|
|
43
|
+
property.keys.set('query', {
|
|
44
|
+
contextName: contextName,
|
|
45
|
+
name: key,
|
|
46
|
+
withId: withId
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
CreateActionKey: function (key) {
|
|
51
|
+
return function (target, propertyKey) {
|
|
52
|
+
keys.push({
|
|
53
|
+
contextName: contextName,
|
|
54
|
+
type: 'create',
|
|
55
|
+
name: key
|
|
56
|
+
});
|
|
57
|
+
const property = getProperty(target, propertyKey);
|
|
58
|
+
property.keys.set('create', {
|
|
59
|
+
contextName: contextName,
|
|
60
|
+
name: key,
|
|
61
|
+
withId: withId
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
ModifyActionKey: function (key) {
|
|
66
|
+
return function (target, propertyKey) {
|
|
67
|
+
keys.push({
|
|
68
|
+
contextName: contextName,
|
|
69
|
+
type: 'modify',
|
|
70
|
+
name: key
|
|
71
|
+
});
|
|
72
|
+
const property = getProperty(target, propertyKey);
|
|
73
|
+
property.keys.set('modify', {
|
|
74
|
+
contextName: contextName,
|
|
75
|
+
name: key,
|
|
76
|
+
withId: withId
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=register-scope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-scope.js","sourceRoot":"./","sources":["access/functions/register-scope.ts"],"names":[],"mappings":"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"}
|
package/access/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
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("./entities"), exports);
|
|
18
|
+
__exportStar(require("./access.module"), exports);
|
|
19
|
+
__exportStar(require("./functions"), exports);
|
|
20
|
+
__exportStar(require("./services"), exports);
|
|
21
|
+
__exportStar(require("./interfaces"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"./","sources":["access/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,kDAAgC;AAChC,8CAA4B;AAC5B,6CAA2B;AAC3B,+CAA6B"}
|