@giteeteam/apps-manifest 0.8.0 → 0.8.2
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/lib/index.d.ts +2 -2
- package/lib/index.js +20 -20
- package/lib/manifest.d.ts +64 -64
- package/lib/manifest.js +126 -126
- package/lib/schema/all.json +34 -34
- package/lib/schema/app.json +21 -21
- package/lib/schema/dependVersion.json +6 -6
- package/lib/schema/locales.json +6 -6
- package/lib/schema/messageQueues.json +31 -31
- package/lib/schema/modules/custom-field/field.json +19 -19
- package/lib/schema/modules/custom-field/proxima-field.json +19 -19
- package/lib/schema/modules/custom-field/type.json +18 -18
- package/lib/schema/modules/custom-item-type/base.json +16 -16
- package/lib/schema/modules/frontend/base.json +25 -25
- package/lib/schema/modules/frontend/workspacePage.json +28 -28
- package/lib/schema/modules/function/base.json +15 -15
- package/lib/schema/modules/index.json +180 -180
- package/lib/schema/modules/proxima-workflow/condition.json +39 -39
- package/lib/schema/modules/proxima-workflow/post-function.json +36 -36
- package/lib/schema/modules/proxima-workflow/resource.json +15 -15
- package/lib/schema/modules/proxima-workflow/validator.json +56 -56
- package/lib/schema/modules/trigger/base.json +26 -26
- package/lib/schema/modules/trigger/webtrigger.json +15 -15
- package/lib/schema/resources.json +27 -27
- package/lib/schema/storage.json +92 -92
- package/lib/schema/tables.json +151 -151
- package/lib/types.d.ts +132 -130
- package/lib/types.js +2 -2
- package/lib/validate.d.ts +75 -75
- package/lib/validate.js +231 -231
- package/package.json +7 -5
package/lib/schema/tables.json
CHANGED
|
@@ -1,151 +1,151 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$id": "http://proxima.com/schemas/tables.json",
|
|
3
|
-
"type": "array",
|
|
4
|
-
"minItems": 1,
|
|
5
|
-
"uniqueItems": true,
|
|
6
|
-
"uniqueItemProperties": [
|
|
7
|
-
"className"
|
|
8
|
-
],
|
|
9
|
-
"items": {
|
|
10
|
-
"type": "object",
|
|
11
|
-
"properties": {
|
|
12
|
-
"className": {
|
|
13
|
-
"type": "string",
|
|
14
|
-
"regexp": {
|
|
15
|
-
"pattern": "(^_([a-zA-Z0-9]_?)*$)|(^[a-zA-Z](_?[a-zA-Z0-9])*_?$)",
|
|
16
|
-
"flags": "i"
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"fields": {
|
|
20
|
-
"type": "object",
|
|
21
|
-
"patternProperties": {
|
|
22
|
-
"(^_([a-zA-Z0-9]_?)*$)|(^[a-zA-Z](_?[a-zA-Z0-9])*_?$)": {
|
|
23
|
-
"type": "object",
|
|
24
|
-
"anyOf": [
|
|
25
|
-
{
|
|
26
|
-
"type": "object",
|
|
27
|
-
"properties": {
|
|
28
|
-
"type": {
|
|
29
|
-
"type": "string",
|
|
30
|
-
"enum": [
|
|
31
|
-
"Pointer",
|
|
32
|
-
"Relation"
|
|
33
|
-
]
|
|
34
|
-
},
|
|
35
|
-
"targetClass": {
|
|
36
|
-
"type": "string",
|
|
37
|
-
"regexp": {
|
|
38
|
-
"pattern": "(^_([a-zA-Z0-9]_?)*$)|(^[a-zA-Z](_?[a-zA-Z0-9])*_?$)",
|
|
39
|
-
"flags": "i"
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
"isAppClass": {
|
|
43
|
-
"type": "boolean",
|
|
44
|
-
"default": false
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
"required": [
|
|
48
|
-
"type", "targetClass"
|
|
49
|
-
]
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"type": "object",
|
|
53
|
-
"properties": {
|
|
54
|
-
"type": {
|
|
55
|
-
"type": "string",
|
|
56
|
-
"const": "String"
|
|
57
|
-
},
|
|
58
|
-
"defaultValue": {
|
|
59
|
-
"type": "string"
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
"required": [
|
|
63
|
-
"type"
|
|
64
|
-
]
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"type": "object",
|
|
68
|
-
"properties": {
|
|
69
|
-
"type": {
|
|
70
|
-
"type": "string",
|
|
71
|
-
"const": "Boolean"
|
|
72
|
-
},
|
|
73
|
-
"defaultValue": {
|
|
74
|
-
"type": "boolean"
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
"required": [
|
|
78
|
-
"type"
|
|
79
|
-
]
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"type": "object",
|
|
83
|
-
"properties": {
|
|
84
|
-
"type": {
|
|
85
|
-
"type": "string",
|
|
86
|
-
"const": "Number"
|
|
87
|
-
},
|
|
88
|
-
"defaultValue": {
|
|
89
|
-
"type": "number"
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
"required": [
|
|
93
|
-
"type"
|
|
94
|
-
]
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"type": "object",
|
|
98
|
-
"properties": {
|
|
99
|
-
"type": {
|
|
100
|
-
"type": "string",
|
|
101
|
-
"const": "Object"
|
|
102
|
-
},
|
|
103
|
-
"defaultValue": {
|
|
104
|
-
"type": "object"
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
"required": [
|
|
108
|
-
"type"
|
|
109
|
-
]
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
"type": "object",
|
|
113
|
-
"properties": {
|
|
114
|
-
"type": {
|
|
115
|
-
"type": "string",
|
|
116
|
-
"const": "Array"
|
|
117
|
-
},
|
|
118
|
-
"defaultValue": {
|
|
119
|
-
"type": "array"
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
"required": [
|
|
123
|
-
"type"
|
|
124
|
-
]
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
"type": "object",
|
|
128
|
-
"properties": {
|
|
129
|
-
"type": {
|
|
130
|
-
"type": "string",
|
|
131
|
-
"enum": [
|
|
132
|
-
"Date",
|
|
133
|
-
"File"
|
|
134
|
-
]
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
"required": [
|
|
138
|
-
"type"
|
|
139
|
-
]
|
|
140
|
-
}
|
|
141
|
-
]
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
"additionalProperties": false
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
"required": [
|
|
148
|
-
"className", "fields"
|
|
149
|
-
]
|
|
150
|
-
}
|
|
151
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$id": "http://proxima.com/schemas/tables.json",
|
|
3
|
+
"type": "array",
|
|
4
|
+
"minItems": 1,
|
|
5
|
+
"uniqueItems": true,
|
|
6
|
+
"uniqueItemProperties": [
|
|
7
|
+
"className"
|
|
8
|
+
],
|
|
9
|
+
"items": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"className": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"regexp": {
|
|
15
|
+
"pattern": "(^_([a-zA-Z0-9]_?)*$)|(^[a-zA-Z](_?[a-zA-Z0-9])*_?$)",
|
|
16
|
+
"flags": "i"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"fields": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"patternProperties": {
|
|
22
|
+
"(^_([a-zA-Z0-9]_?)*$)|(^[a-zA-Z](_?[a-zA-Z0-9])*_?$)": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"anyOf": [
|
|
25
|
+
{
|
|
26
|
+
"type": "object",
|
|
27
|
+
"properties": {
|
|
28
|
+
"type": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"enum": [
|
|
31
|
+
"Pointer",
|
|
32
|
+
"Relation"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"targetClass": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"regexp": {
|
|
38
|
+
"pattern": "(^_([a-zA-Z0-9]_?)*$)|(^[a-zA-Z](_?[a-zA-Z0-9])*_?$)",
|
|
39
|
+
"flags": "i"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"isAppClass": {
|
|
43
|
+
"type": "boolean",
|
|
44
|
+
"default": false
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"required": [
|
|
48
|
+
"type", "targetClass"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"type": "object",
|
|
53
|
+
"properties": {
|
|
54
|
+
"type": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"const": "String"
|
|
57
|
+
},
|
|
58
|
+
"defaultValue": {
|
|
59
|
+
"type": "string"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"required": [
|
|
63
|
+
"type"
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"type": "object",
|
|
68
|
+
"properties": {
|
|
69
|
+
"type": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"const": "Boolean"
|
|
72
|
+
},
|
|
73
|
+
"defaultValue": {
|
|
74
|
+
"type": "boolean"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"required": [
|
|
78
|
+
"type"
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"type": "object",
|
|
83
|
+
"properties": {
|
|
84
|
+
"type": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"const": "Number"
|
|
87
|
+
},
|
|
88
|
+
"defaultValue": {
|
|
89
|
+
"type": "number"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"required": [
|
|
93
|
+
"type"
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"type": "object",
|
|
98
|
+
"properties": {
|
|
99
|
+
"type": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"const": "Object"
|
|
102
|
+
},
|
|
103
|
+
"defaultValue": {
|
|
104
|
+
"type": "object"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"required": [
|
|
108
|
+
"type"
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"type": "object",
|
|
113
|
+
"properties": {
|
|
114
|
+
"type": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"const": "Array"
|
|
117
|
+
},
|
|
118
|
+
"defaultValue": {
|
|
119
|
+
"type": "array"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"required": [
|
|
123
|
+
"type"
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"type": "object",
|
|
128
|
+
"properties": {
|
|
129
|
+
"type": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"enum": [
|
|
132
|
+
"Date",
|
|
133
|
+
"File"
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"required": [
|
|
138
|
+
"type"
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"additionalProperties": false
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"required": [
|
|
148
|
+
"className", "fields"
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
}
|
package/lib/types.d.ts
CHANGED
|
@@ -1,130 +1,132 @@
|
|
|
1
|
-
export type TriggerEvent = string;
|
|
2
|
-
export interface IManifestResource {
|
|
3
|
-
key: string;
|
|
4
|
-
path: string;
|
|
5
|
-
}
|
|
6
|
-
export interface IManifestApp {
|
|
7
|
-
id?: string;
|
|
8
|
-
name?: string;
|
|
9
|
-
key?: string;
|
|
10
|
-
description?: string;
|
|
11
|
-
version?: string;
|
|
12
|
-
global?: boolean;
|
|
13
|
-
category?: string;
|
|
14
|
-
}
|
|
15
|
-
export type LoadType = 'micro' | 'iframe' | 'remoteJs' | 'redirect' | 'uikit';
|
|
16
|
-
export interface IManifestModule {
|
|
17
|
-
key: string;
|
|
18
|
-
loadType?: LoadType;
|
|
19
|
-
title?: string;
|
|
20
|
-
viewType?: string;
|
|
21
|
-
function?: string;
|
|
22
|
-
resource?: string;
|
|
23
|
-
route?: string;
|
|
24
|
-
type?: string;
|
|
25
|
-
displayConditions?: Record<string, any>;
|
|
26
|
-
resolver?: {
|
|
27
|
-
function: string;
|
|
28
|
-
method?: string;
|
|
29
|
-
};
|
|
30
|
-
parent?: string;
|
|
31
|
-
}
|
|
32
|
-
export interface IManifestFunction {
|
|
33
|
-
key: string;
|
|
34
|
-
handler: string;
|
|
35
|
-
timeout?: number;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
export type
|
|
99
|
-
export type
|
|
100
|
-
export type
|
|
101
|
-
export type
|
|
102
|
-
export type
|
|
103
|
-
export
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
1
|
+
export type TriggerEvent = string;
|
|
2
|
+
export interface IManifestResource {
|
|
3
|
+
key: string;
|
|
4
|
+
path: string;
|
|
5
|
+
}
|
|
6
|
+
export interface IManifestApp {
|
|
7
|
+
id?: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
key?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
version?: string;
|
|
12
|
+
global?: boolean;
|
|
13
|
+
category?: string;
|
|
14
|
+
}
|
|
15
|
+
export type LoadType = 'micro' | 'iframe' | 'remoteJs' | 'redirect' | 'uikit';
|
|
16
|
+
export interface IManifestModule {
|
|
17
|
+
key: string;
|
|
18
|
+
loadType?: LoadType;
|
|
19
|
+
title?: string;
|
|
20
|
+
viewType?: string;
|
|
21
|
+
function?: string;
|
|
22
|
+
resource?: string;
|
|
23
|
+
route?: string;
|
|
24
|
+
type?: string;
|
|
25
|
+
displayConditions?: Record<string, any>;
|
|
26
|
+
resolver?: {
|
|
27
|
+
function: string;
|
|
28
|
+
method?: string;
|
|
29
|
+
};
|
|
30
|
+
parent?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface IManifestFunction {
|
|
33
|
+
key: string;
|
|
34
|
+
handler: string;
|
|
35
|
+
timeout?: number;
|
|
36
|
+
runtime?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface IManifestImporterItemField {
|
|
39
|
+
key: string;
|
|
40
|
+
title: string;
|
|
41
|
+
}
|
|
42
|
+
export interface IManifestImporter {
|
|
43
|
+
function: string;
|
|
44
|
+
validate: string;
|
|
45
|
+
after?: string;
|
|
46
|
+
itemFields: IManifestImporterItemField[];
|
|
47
|
+
}
|
|
48
|
+
export interface IManifestTrigger {
|
|
49
|
+
key: string;
|
|
50
|
+
function: string;
|
|
51
|
+
events: TriggerEvent[];
|
|
52
|
+
/** 是否异步执行trigger */
|
|
53
|
+
async?: boolean;
|
|
54
|
+
}
|
|
55
|
+
export interface IManifestCustomField {
|
|
56
|
+
key: string;
|
|
57
|
+
name: string;
|
|
58
|
+
type: string;
|
|
59
|
+
description?: string;
|
|
60
|
+
}
|
|
61
|
+
export interface IManifestCustomFieldType {
|
|
62
|
+
key: string;
|
|
63
|
+
name: string;
|
|
64
|
+
dataType: string;
|
|
65
|
+
resource: string;
|
|
66
|
+
description?: string;
|
|
67
|
+
}
|
|
68
|
+
export interface IConsumer {
|
|
69
|
+
key: string;
|
|
70
|
+
queue: string;
|
|
71
|
+
resolver: {
|
|
72
|
+
function: string;
|
|
73
|
+
method: string;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
export interface IMessageQueueConsumer extends IConsumer {
|
|
77
|
+
messageQueue: string;
|
|
78
|
+
messageTransformer: Record<string, any>;
|
|
79
|
+
}
|
|
80
|
+
export interface IScheduledTrigger {
|
|
81
|
+
key: string;
|
|
82
|
+
function: string;
|
|
83
|
+
cronTime: string;
|
|
84
|
+
}
|
|
85
|
+
export type TManifestModules = {
|
|
86
|
+
[k in string]?: IManifestModule[];
|
|
87
|
+
} & {
|
|
88
|
+
function?: IManifestFunction[];
|
|
89
|
+
trigger?: IManifestTrigger[];
|
|
90
|
+
importer?: IManifestImporter;
|
|
91
|
+
customField?: IManifestCustomField[];
|
|
92
|
+
customFieldType?: IManifestCustomFieldType[];
|
|
93
|
+
customItemType?: any[];
|
|
94
|
+
consumer?: IConsumer[];
|
|
95
|
+
messageQueueConsumer?: IMessageQueueConsumer[];
|
|
96
|
+
scheduledTrigger?: IScheduledTrigger[];
|
|
97
|
+
};
|
|
98
|
+
export type TDependProduct = 'team' | 'one';
|
|
99
|
+
export type TManifestLanguage = 'en-US' | 'zh-CN' | 'ru-RU';
|
|
100
|
+
export type TManifestLocalesItem = Record<string, string>;
|
|
101
|
+
export type TManifestLocalesItems = Record<string, TManifestLocalesItem>;
|
|
102
|
+
export type TManifestLocales = Record<TManifestLanguage, TManifestLocalesItems>;
|
|
103
|
+
export type TDependVersion = Record<TDependProduct, string[]>;
|
|
104
|
+
export type TStorageAttributeType = 'String' | 'Float' | 'Date' | 'Boolean';
|
|
105
|
+
export interface IStorageAttribute {
|
|
106
|
+
type: TStorageAttributeType;
|
|
107
|
+
required?: boolean;
|
|
108
|
+
defaultValue?: any;
|
|
109
|
+
}
|
|
110
|
+
export interface IStorageEntity {
|
|
111
|
+
name: string;
|
|
112
|
+
attributes: Record<string, IStorageAttribute>;
|
|
113
|
+
indexes?: string[];
|
|
114
|
+
}
|
|
115
|
+
export interface IStorage {
|
|
116
|
+
entities: IStorageEntity[];
|
|
117
|
+
}
|
|
118
|
+
export interface IMessageQueue {
|
|
119
|
+
key: string;
|
|
120
|
+
type: string;
|
|
121
|
+
endpoint: string;
|
|
122
|
+
}
|
|
123
|
+
export interface IManifest {
|
|
124
|
+
app: IManifestApp;
|
|
125
|
+
modules: TManifestModules;
|
|
126
|
+
tables?: any;
|
|
127
|
+
resources?: IManifestResource[];
|
|
128
|
+
locales?: TManifestLocales;
|
|
129
|
+
dependVersion?: TDependVersion;
|
|
130
|
+
storage?: IStorage;
|
|
131
|
+
messageQueues?: IMessageQueue[];
|
|
132
|
+
}
|
package/lib/types.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|