@qelos/global-types 3.5.1
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/ScreenRequirement.ts +11 -0
- package/blueprint.ts +57 -0
- package/event-subscriber.ts +6 -0
- package/index.ts +7 -0
- package/injectable.ts +6 -0
- package/micro-frontend.ts +39 -0
- package/navbar-group.ts +7 -0
- package/package.json +14 -0
- package/plugin-crud.ts +11 -0
- package/plugin.ts +32 -0
package/blueprint.ts
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export enum EntityIdentifierMechanism {
|
|
2
|
+
OBJECT_ID = 'objectid',
|
|
3
|
+
GUID = 'guid'
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export enum BlueprintPropertyType {
|
|
7
|
+
STRING = 'string',
|
|
8
|
+
NUMBER = 'number',
|
|
9
|
+
BOOLEAN = 'boolean',
|
|
10
|
+
DATE = 'date',
|
|
11
|
+
DATETIME = 'datetime',
|
|
12
|
+
TIME = 'time'
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export enum PermissionScope {
|
|
16
|
+
USER = 'user',
|
|
17
|
+
WORKSPACE = 'workspace',
|
|
18
|
+
TENANT = 'tenant'
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export enum CRUDOperation {
|
|
22
|
+
CREATE = 'create',
|
|
23
|
+
READ = 'read',
|
|
24
|
+
UPDATE = 'update',
|
|
25
|
+
DELETE = 'delete'
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface IPermissionsDescriptor {
|
|
29
|
+
scope: PermissionScope,
|
|
30
|
+
operation: CRUDOperation,
|
|
31
|
+
roleBased: string[],
|
|
32
|
+
workspaceRoleBased: string[],
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface IBlueprint {
|
|
36
|
+
tenant: string;
|
|
37
|
+
identifier: string,
|
|
38
|
+
name: string,
|
|
39
|
+
description?: string,
|
|
40
|
+
entityIdentifierMechanism: EntityIdentifierMechanism,
|
|
41
|
+
permissions: Array<Partial<IPermissionsDescriptor>>,
|
|
42
|
+
permissionScope: PermissionScope,
|
|
43
|
+
properties: Record<string, {
|
|
44
|
+
title: string,
|
|
45
|
+
type: BlueprintPropertyType,
|
|
46
|
+
description: string,
|
|
47
|
+
required: boolean,
|
|
48
|
+
enum?: string[],
|
|
49
|
+
multi?: boolean,
|
|
50
|
+
min?: number,
|
|
51
|
+
max?: number,
|
|
52
|
+
}>,
|
|
53
|
+
updateMapping: Record<string, string>,
|
|
54
|
+
relations: { key: string, target: string }[],
|
|
55
|
+
created: Date;
|
|
56
|
+
updated: Date;
|
|
57
|
+
}
|
package/index.ts
ADDED
package/injectable.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { IScreenRequirement } from './ScreenRequirement';
|
|
2
|
+
|
|
3
|
+
export interface IMicroFrontend {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
url: string;
|
|
7
|
+
active: boolean;
|
|
8
|
+
opened: boolean;
|
|
9
|
+
roles: string[],
|
|
10
|
+
workspaceRoles: string[],
|
|
11
|
+
crud?: string;
|
|
12
|
+
use?: string;
|
|
13
|
+
structure?: string;
|
|
14
|
+
searchQuery?: boolean,
|
|
15
|
+
searchPlaceholder?: string,
|
|
16
|
+
requirements?: IScreenRequirement[]
|
|
17
|
+
navigateAfterSubmit?: {
|
|
18
|
+
name: string,
|
|
19
|
+
params: Record<string, string>,
|
|
20
|
+
query: Record<string, string>,
|
|
21
|
+
},
|
|
22
|
+
clearAfterSubmit?: boolean,
|
|
23
|
+
route?: {
|
|
24
|
+
name: string;
|
|
25
|
+
path: string;
|
|
26
|
+
roles: string[],
|
|
27
|
+
navBarPosition: 'top' | 'bottom' | 'user-dropdown' | false;
|
|
28
|
+
group?: string;
|
|
29
|
+
};
|
|
30
|
+
component?: {
|
|
31
|
+
page: string;
|
|
32
|
+
position: 'top' | 'left' | 'right' | 'bottom';
|
|
33
|
+
};
|
|
34
|
+
modal?: {
|
|
35
|
+
name: string;
|
|
36
|
+
params: string[] | Record<string, string>; // schema / hints for props
|
|
37
|
+
size: 'sm' | 'md' | 'lg' | 'full'
|
|
38
|
+
}
|
|
39
|
+
}
|
package/navbar-group.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@qelos/global-types",
|
|
3
|
+
"version": "3.5.1",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "index.ts",
|
|
6
|
+
"types": "index.ts",
|
|
7
|
+
"scripts": {},
|
|
8
|
+
"author": "",
|
|
9
|
+
"gitHead": "0c89581c94896414d53b99a63788829fe3caab4c",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
}
|
|
14
|
+
}
|
package/plugin-crud.ts
ADDED
package/plugin.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IMicroFrontend } from './micro-frontend';
|
|
2
|
+
import { IEventSubscriber } from './event-subscriber';
|
|
3
|
+
import { IPluginCrud } from './plugin-crud';
|
|
4
|
+
import { IInjectable } from './injectable';
|
|
5
|
+
import { INavbarGroup } from './navbar-group';
|
|
6
|
+
|
|
7
|
+
export interface IPlugin {
|
|
8
|
+
tenant: string;
|
|
9
|
+
name: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
apiPath: string;
|
|
12
|
+
registerUrl: string;
|
|
13
|
+
user: string;
|
|
14
|
+
token: string;
|
|
15
|
+
proxyUrl: string;
|
|
16
|
+
authAcquire: {
|
|
17
|
+
refreshTokenUrl: string;
|
|
18
|
+
refreshTokenKey: string;
|
|
19
|
+
accessTokenKey: string;
|
|
20
|
+
};
|
|
21
|
+
auth: {
|
|
22
|
+
refreshTokenIdentifier?: string;
|
|
23
|
+
};
|
|
24
|
+
manifestUrl: string,
|
|
25
|
+
callbackUrl?: string,
|
|
26
|
+
subscribedEvents: IEventSubscriber[]
|
|
27
|
+
microFrontends: IMicroFrontend[]
|
|
28
|
+
cruds: IPluginCrud[]
|
|
29
|
+
|
|
30
|
+
injectables: IInjectable[],
|
|
31
|
+
navBarGroups?: INavbarGroup[],
|
|
32
|
+
}
|