@dforge-core/metadata 0.0.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/dist/actions.d.ts +31 -0
- package/dist/actions.d.ts.map +1 -0
- package/dist/actions.js +7 -0
- package/dist/actions.js.map +1 -0
- package/dist/aggregation.d.ts +13 -0
- package/dist/aggregation.d.ts.map +1 -0
- package/dist/aggregation.js +17 -0
- package/dist/aggregation.js.map +1 -0
- package/dist/base-datatypes.d.ts +5 -0
- package/dist/base-datatypes.d.ts.map +1 -0
- package/dist/base-datatypes.js +49 -0
- package/dist/base-datatypes.js.map +1 -0
- package/dist/column-types.d.ts +5 -0
- package/dist/column-types.d.ts.map +1 -0
- package/dist/column-types.js +18 -0
- package/dist/column-types.js.map +1 -0
- package/dist/data-views.d.ts +95 -0
- package/dist/data-views.d.ts.map +1 -0
- package/dist/data-views.js +17 -0
- package/dist/data-views.js.map +1 -0
- package/dist/derive.d.ts +19 -0
- package/dist/derive.d.ts.map +1 -0
- package/dist/derive.js +51 -0
- package/dist/derive.js.map +1 -0
- package/dist/entity.d.ts +110 -0
- package/dist/entity.d.ts.map +1 -0
- package/dist/entity.js +7 -0
- package/dist/entity.js.map +1 -0
- package/dist/field-types.d.ts +260 -0
- package/dist/field-types.d.ts.map +1 -0
- package/dist/field-types.js +55 -0
- package/dist/field-types.js.map +1 -0
- package/dist/filter.d.ts +26 -0
- package/dist/filter.d.ts.map +1 -0
- package/dist/filter.js +7 -0
- package/dist/filter.js.map +1 -0
- package/dist/folders.d.ts +32 -0
- package/dist/folders.d.ts.map +1 -0
- package/dist/folders.js +6 -0
- package/dist/folders.js.map +1 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -0
- package/dist/jobs.d.ts +32 -0
- package/dist/jobs.d.ts.map +1 -0
- package/dist/jobs.js +3 -0
- package/dist/jobs.js.map +1 -0
- package/dist/manifest.d.ts +53 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +4 -0
- package/dist/manifest.js.map +1 -0
- package/dist/menus.d.ts +32 -0
- package/dist/menus.d.ts.map +1 -0
- package/dist/menus.js +3 -0
- package/dist/menus.js.map +1 -0
- package/dist/print-templates.d.ts +36 -0
- package/dist/print-templates.d.ts.map +1 -0
- package/dist/print-templates.js +4 -0
- package/dist/print-templates.js.map +1 -0
- package/dist/reports.d.ts +84 -0
- package/dist/reports.d.ts.map +1 -0
- package/dist/reports.js +24 -0
- package/dist/reports.js.map +1 -0
- package/dist/roles.d.ts +10 -0
- package/dist/roles.d.ts.map +1 -0
- package/dist/roles.js +3 -0
- package/dist/roles.js.map +1 -0
- package/dist/seed-data.d.ts +8 -0
- package/dist/seed-data.d.ts.map +1 -0
- package/dist/seed-data.js +4 -0
- package/dist/seed-data.js.map +1 -0
- package/dist/settings.d.ts +26 -0
- package/dist/settings.d.ts.map +1 -0
- package/dist/settings.js +3 -0
- package/dist/settings.js.map +1 -0
- package/dist/traits.d.ts +14 -0
- package/dist/traits.d.ts.map +1 -0
- package/dist/traits.js +121 -0
- package/dist/traits.js.map +1 -0
- package/dist/triggers.d.ts +24 -0
- package/dist/triggers.d.ts.map +1 -0
- package/dist/triggers.js +3 -0
- package/dist/triggers.js.map +1 -0
- package/dist/types.d.ts +121 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +7 -0
- package/dist/types.js.map +1 -0
- package/dist/webhooks.d.ts +31 -0
- package/dist/webhooks.d.ts.map +1 -0
- package/dist/webhooks.js +3 -0
- package/dist/webhooks.js.map +1 -0
- package/package.json +54 -0
- package/src/actions.ts +38 -0
- package/src/aggregation.ts +21 -0
- package/src/base-datatypes.ts +53 -0
- package/src/column-types.ts +22 -0
- package/src/data-views.ts +139 -0
- package/src/derive.ts +63 -0
- package/src/entity.ts +124 -0
- package/src/field-types.ts +68 -0
- package/src/filter.ts +34 -0
- package/src/folders.ts +39 -0
- package/src/index.ts +109 -0
- package/src/jobs.ts +34 -0
- package/src/manifest.ts +54 -0
- package/src/menus.ts +36 -0
- package/src/print-templates.ts +41 -0
- package/src/reports.ts +111 -0
- package/src/roles.ts +12 -0
- package/src/seed-data.ts +10 -0
- package/src/settings.ts +29 -0
- package/src/traits.ts +127 -0
- package/src/triggers.ts +27 -0
- package/src/types.ts +177 -0
- package/src/webhooks.ts +35 -0
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import type { FieldTypeCd, FieldTypeDef } from "./types";
|
|
2
|
+
export declare const fieldTypes: readonly [{
|
|
3
|
+
readonly cd: "text";
|
|
4
|
+
readonly name: "Text";
|
|
5
|
+
readonly columnType: "D";
|
|
6
|
+
readonly baseDatatypeCd: "string";
|
|
7
|
+
readonly supportedAgg: null;
|
|
8
|
+
readonly maxLen: null;
|
|
9
|
+
readonly precision: null;
|
|
10
|
+
readonly useStringInFilter: true;
|
|
11
|
+
}, {
|
|
12
|
+
readonly cd: "email";
|
|
13
|
+
readonly name: "Email";
|
|
14
|
+
readonly columnType: "D";
|
|
15
|
+
readonly baseDatatypeCd: "string";
|
|
16
|
+
readonly supportedAgg: null;
|
|
17
|
+
readonly maxLen: null;
|
|
18
|
+
readonly precision: null;
|
|
19
|
+
readonly useStringInFilter: true;
|
|
20
|
+
}, {
|
|
21
|
+
readonly cd: "phone";
|
|
22
|
+
readonly name: "Phone";
|
|
23
|
+
readonly columnType: "D";
|
|
24
|
+
readonly baseDatatypeCd: "string";
|
|
25
|
+
readonly supportedAgg: null;
|
|
26
|
+
readonly maxLen: null;
|
|
27
|
+
readonly precision: null;
|
|
28
|
+
readonly useStringInFilter: true;
|
|
29
|
+
}, {
|
|
30
|
+
readonly cd: "url";
|
|
31
|
+
readonly name: "URL";
|
|
32
|
+
readonly columnType: "D";
|
|
33
|
+
readonly baseDatatypeCd: "string";
|
|
34
|
+
readonly supportedAgg: null;
|
|
35
|
+
readonly maxLen: null;
|
|
36
|
+
readonly precision: null;
|
|
37
|
+
readonly useStringInFilter: true;
|
|
38
|
+
}, {
|
|
39
|
+
readonly cd: "textarea";
|
|
40
|
+
readonly name: "Multiline Text";
|
|
41
|
+
readonly columnType: "D";
|
|
42
|
+
readonly baseDatatypeCd: "string";
|
|
43
|
+
readonly supportedAgg: null;
|
|
44
|
+
readonly maxLen: null;
|
|
45
|
+
readonly precision: null;
|
|
46
|
+
readonly useStringInFilter: true;
|
|
47
|
+
}, {
|
|
48
|
+
readonly cd: "number";
|
|
49
|
+
readonly name: "Number";
|
|
50
|
+
readonly columnType: "D";
|
|
51
|
+
readonly baseDatatypeCd: "number";
|
|
52
|
+
readonly supportedAgg: "SCAM";
|
|
53
|
+
readonly maxLen: null;
|
|
54
|
+
readonly precision: null;
|
|
55
|
+
readonly useStringInFilter: false;
|
|
56
|
+
readonly defParams: {
|
|
57
|
+
readonly min: 0;
|
|
58
|
+
readonly max: 10000;
|
|
59
|
+
};
|
|
60
|
+
}, {
|
|
61
|
+
readonly cd: "currency";
|
|
62
|
+
readonly name: "Currency";
|
|
63
|
+
readonly columnType: "D";
|
|
64
|
+
readonly baseDatatypeCd: "number";
|
|
65
|
+
readonly supportedAgg: "SCAM";
|
|
66
|
+
readonly maxLen: null;
|
|
67
|
+
readonly precision: 2;
|
|
68
|
+
readonly useStringInFilter: false;
|
|
69
|
+
readonly defParams: {
|
|
70
|
+
readonly min: 0;
|
|
71
|
+
readonly max: 1000000;
|
|
72
|
+
};
|
|
73
|
+
}, {
|
|
74
|
+
readonly cd: "percent";
|
|
75
|
+
readonly name: "Percent";
|
|
76
|
+
readonly columnType: "D";
|
|
77
|
+
readonly baseDatatypeCd: "number";
|
|
78
|
+
readonly supportedAgg: "CAM";
|
|
79
|
+
readonly maxLen: null;
|
|
80
|
+
readonly precision: 2;
|
|
81
|
+
readonly useStringInFilter: false;
|
|
82
|
+
readonly defParams: {
|
|
83
|
+
readonly min: 0;
|
|
84
|
+
readonly max: 100;
|
|
85
|
+
};
|
|
86
|
+
}, {
|
|
87
|
+
readonly cd: "checkbox";
|
|
88
|
+
readonly name: "Checkbox";
|
|
89
|
+
readonly columnType: "D";
|
|
90
|
+
readonly baseDatatypeCd: "bool";
|
|
91
|
+
readonly supportedAgg: "C";
|
|
92
|
+
readonly maxLen: null;
|
|
93
|
+
readonly precision: null;
|
|
94
|
+
readonly useStringInFilter: false;
|
|
95
|
+
}, {
|
|
96
|
+
readonly cd: "date";
|
|
97
|
+
readonly name: "Date";
|
|
98
|
+
readonly columnType: "D";
|
|
99
|
+
readonly baseDatatypeCd: "date";
|
|
100
|
+
readonly supportedAgg: "CM";
|
|
101
|
+
readonly maxLen: null;
|
|
102
|
+
readonly precision: null;
|
|
103
|
+
readonly useStringInFilter: false;
|
|
104
|
+
}, {
|
|
105
|
+
readonly cd: "datetime";
|
|
106
|
+
readonly name: "Date & Time";
|
|
107
|
+
readonly columnType: "D";
|
|
108
|
+
readonly baseDatatypeCd: "timestamp";
|
|
109
|
+
readonly supportedAgg: "CM";
|
|
110
|
+
readonly maxLen: null;
|
|
111
|
+
readonly precision: null;
|
|
112
|
+
readonly useStringInFilter: false;
|
|
113
|
+
}, {
|
|
114
|
+
readonly cd: "time";
|
|
115
|
+
readonly name: "Time";
|
|
116
|
+
readonly columnType: "D";
|
|
117
|
+
readonly baseDatatypeCd: "time";
|
|
118
|
+
readonly supportedAgg: null;
|
|
119
|
+
readonly maxLen: null;
|
|
120
|
+
readonly precision: null;
|
|
121
|
+
readonly useStringInFilter: false;
|
|
122
|
+
}, {
|
|
123
|
+
readonly cd: "dropdown";
|
|
124
|
+
readonly name: "Dropdown";
|
|
125
|
+
readonly columnType: "D";
|
|
126
|
+
readonly baseDatatypeCd: "string";
|
|
127
|
+
readonly supportedAgg: "C";
|
|
128
|
+
readonly maxLen: null;
|
|
129
|
+
readonly precision: null;
|
|
130
|
+
readonly useStringInFilter: true;
|
|
131
|
+
}, {
|
|
132
|
+
readonly cd: "flags";
|
|
133
|
+
readonly name: "Flags";
|
|
134
|
+
readonly columnType: "D";
|
|
135
|
+
readonly baseDatatypeCd: "string";
|
|
136
|
+
readonly supportedAgg: "C";
|
|
137
|
+
readonly maxLen: null;
|
|
138
|
+
readonly precision: null;
|
|
139
|
+
readonly useStringInFilter: true;
|
|
140
|
+
readonly defParams: {
|
|
141
|
+
readonly style: "buttons";
|
|
142
|
+
};
|
|
143
|
+
}, {
|
|
144
|
+
readonly cd: "json";
|
|
145
|
+
readonly name: "JSON Editor";
|
|
146
|
+
readonly columnType: "D";
|
|
147
|
+
readonly baseDatatypeCd: "json";
|
|
148
|
+
readonly supportedAgg: null;
|
|
149
|
+
readonly maxLen: null;
|
|
150
|
+
readonly precision: null;
|
|
151
|
+
readonly useStringInFilter: false;
|
|
152
|
+
}, {
|
|
153
|
+
readonly cd: "hidden";
|
|
154
|
+
readonly name: "Hidden";
|
|
155
|
+
readonly columnType: "D";
|
|
156
|
+
readonly baseDatatypeCd: "string";
|
|
157
|
+
readonly supportedAgg: null;
|
|
158
|
+
readonly maxLen: null;
|
|
159
|
+
readonly precision: null;
|
|
160
|
+
readonly useStringInFilter: false;
|
|
161
|
+
}, {
|
|
162
|
+
readonly cd: "color";
|
|
163
|
+
readonly name: "Color Picker";
|
|
164
|
+
readonly columnType: "D";
|
|
165
|
+
readonly baseDatatypeCd: "string";
|
|
166
|
+
readonly supportedAgg: null;
|
|
167
|
+
readonly maxLen: 20;
|
|
168
|
+
readonly precision: null;
|
|
169
|
+
readonly useStringInFilter: false;
|
|
170
|
+
}, {
|
|
171
|
+
readonly cd: "image";
|
|
172
|
+
readonly name: "Image";
|
|
173
|
+
readonly columnType: "D";
|
|
174
|
+
readonly baseDatatypeCd: "binary";
|
|
175
|
+
readonly supportedAgg: null;
|
|
176
|
+
readonly maxLen: null;
|
|
177
|
+
readonly precision: null;
|
|
178
|
+
readonly useStringInFilter: false;
|
|
179
|
+
}, {
|
|
180
|
+
readonly cd: "file";
|
|
181
|
+
readonly name: "File";
|
|
182
|
+
readonly columnType: "D";
|
|
183
|
+
readonly baseDatatypeCd: "binary";
|
|
184
|
+
readonly supportedAgg: null;
|
|
185
|
+
readonly maxLen: null;
|
|
186
|
+
readonly precision: null;
|
|
187
|
+
readonly useStringInFilter: false;
|
|
188
|
+
}, {
|
|
189
|
+
readonly cd: "richtext";
|
|
190
|
+
readonly name: "Rich Text Editor";
|
|
191
|
+
readonly columnType: "D";
|
|
192
|
+
readonly baseDatatypeCd: "string";
|
|
193
|
+
readonly supportedAgg: null;
|
|
194
|
+
readonly maxLen: null;
|
|
195
|
+
readonly precision: null;
|
|
196
|
+
readonly useStringInFilter: true;
|
|
197
|
+
}, {
|
|
198
|
+
readonly cd: "lookup";
|
|
199
|
+
readonly name: "Lookup";
|
|
200
|
+
readonly columnType: "R";
|
|
201
|
+
readonly baseDatatypeCd: "guid";
|
|
202
|
+
readonly supportedAgg: "C";
|
|
203
|
+
readonly maxLen: null;
|
|
204
|
+
readonly precision: null;
|
|
205
|
+
readonly useStringInFilter: true;
|
|
206
|
+
}, {
|
|
207
|
+
readonly cd: "user";
|
|
208
|
+
readonly name: "User Picker";
|
|
209
|
+
readonly columnType: "D";
|
|
210
|
+
readonly baseDatatypeCd: "cuid";
|
|
211
|
+
readonly supportedAgg: "C";
|
|
212
|
+
readonly maxLen: null;
|
|
213
|
+
readonly precision: null;
|
|
214
|
+
readonly useStringInFilter: false;
|
|
215
|
+
}, {
|
|
216
|
+
readonly cd: "grid";
|
|
217
|
+
readonly name: "Detail Grid";
|
|
218
|
+
readonly columnType: "S";
|
|
219
|
+
readonly baseDatatypeCd: "set";
|
|
220
|
+
readonly supportedAgg: "C";
|
|
221
|
+
readonly maxLen: null;
|
|
222
|
+
readonly precision: null;
|
|
223
|
+
readonly useStringInFilter: false;
|
|
224
|
+
}, {
|
|
225
|
+
readonly cd: "tags";
|
|
226
|
+
readonly name: "Tags";
|
|
227
|
+
readonly columnType: "D";
|
|
228
|
+
readonly baseDatatypeCd: "string";
|
|
229
|
+
readonly supportedAgg: "C";
|
|
230
|
+
readonly maxLen: null;
|
|
231
|
+
readonly precision: null;
|
|
232
|
+
readonly useStringInFilter: true;
|
|
233
|
+
}, {
|
|
234
|
+
readonly cd: "entitylink";
|
|
235
|
+
readonly name: "Entity Link";
|
|
236
|
+
readonly columnType: "D";
|
|
237
|
+
readonly baseDatatypeCd: "json";
|
|
238
|
+
readonly supportedAgg: "C";
|
|
239
|
+
readonly maxLen: null;
|
|
240
|
+
readonly precision: null;
|
|
241
|
+
readonly useStringInFilter: false;
|
|
242
|
+
}, {
|
|
243
|
+
readonly cd: "code";
|
|
244
|
+
readonly name: "Code Editor";
|
|
245
|
+
readonly columnType: "D";
|
|
246
|
+
readonly baseDatatypeCd: "string";
|
|
247
|
+
readonly supportedAgg: "C";
|
|
248
|
+
readonly maxLen: null;
|
|
249
|
+
readonly precision: null;
|
|
250
|
+
readonly useStringInFilter: false;
|
|
251
|
+
}];
|
|
252
|
+
/** Set of all known field type codes, for membership checks. */
|
|
253
|
+
export declare const fieldTypeCds: ReadonlySet<string>;
|
|
254
|
+
/** Type guard: is `cd` one of the known field type codes? */
|
|
255
|
+
export declare function isFieldTypeCd(cd: string | undefined): cd is FieldTypeCd;
|
|
256
|
+
/** Look up a field type by code, or `undefined` if unknown. */
|
|
257
|
+
export declare function getFieldType(cd: string): FieldTypeDef | undefined;
|
|
258
|
+
/** Field types whose default column kind is `columnType` (e.g. "D" value types). */
|
|
259
|
+
export declare function fieldTypesByColumnType(columnType: string): readonly FieldTypeDef[];
|
|
260
|
+
//# sourceMappingURL=field-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-types.d.ts","sourceRoot":"","sources":["../src/field-types.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAIzD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BqB,CAAC;AAY7C,gEAAgE;AAChE,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,MAAM,CAA0C,CAAC;AAExF,6DAA6D;AAC7D,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,EAAE,IAAI,WAAW,CAEvE;AAED,+DAA+D;AAC/D,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAEjE;AAED,oFAAoF;AACpF,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,YAAY,EAAE,CAElF"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Field-type registry — mirror of
|
|
2
|
+
// server/database/system-modules/metadata/seed-data/field_types.json
|
|
3
|
+
//
|
|
4
|
+
// This is the authoring source of truth: an author picks a `fieldTypeCd` and the
|
|
5
|
+
// editor derives `baseDatatypeCd` + `dbDatatype` from the entry here. Kept in
|
|
6
|
+
// sync with the server seed by the parity test in test/registries.test.ts —
|
|
7
|
+
// if that test fails after a seed change, regenerate this list.
|
|
8
|
+
// `satisfies` (not `: readonly FieldTypeDef[]`) so the literal `cd` values are
|
|
9
|
+
// preserved in the type — that powers the compile-time coverage guard below.
|
|
10
|
+
export const fieldTypes = [
|
|
11
|
+
{ cd: "text", name: "Text", columnType: "D", baseDatatypeCd: "string", supportedAgg: null, maxLen: null, precision: null, useStringInFilter: true },
|
|
12
|
+
{ cd: "email", name: "Email", columnType: "D", baseDatatypeCd: "string", supportedAgg: null, maxLen: null, precision: null, useStringInFilter: true },
|
|
13
|
+
{ cd: "phone", name: "Phone", columnType: "D", baseDatatypeCd: "string", supportedAgg: null, maxLen: null, precision: null, useStringInFilter: true },
|
|
14
|
+
{ cd: "url", name: "URL", columnType: "D", baseDatatypeCd: "string", supportedAgg: null, maxLen: null, precision: null, useStringInFilter: true },
|
|
15
|
+
{ cd: "textarea", name: "Multiline Text", columnType: "D", baseDatatypeCd: "string", supportedAgg: null, maxLen: null, precision: null, useStringInFilter: true },
|
|
16
|
+
{ cd: "number", name: "Number", columnType: "D", baseDatatypeCd: "number", supportedAgg: "SCAM", maxLen: null, precision: null, useStringInFilter: false, defParams: { min: 0, max: 10000 } },
|
|
17
|
+
{ cd: "currency", name: "Currency", columnType: "D", baseDatatypeCd: "number", supportedAgg: "SCAM", maxLen: null, precision: 2, useStringInFilter: false, defParams: { min: 0, max: 1000000 } },
|
|
18
|
+
{ cd: "percent", name: "Percent", columnType: "D", baseDatatypeCd: "number", supportedAgg: "CAM", maxLen: null, precision: 2, useStringInFilter: false, defParams: { min: 0, max: 100 } },
|
|
19
|
+
{ cd: "checkbox", name: "Checkbox", columnType: "D", baseDatatypeCd: "bool", supportedAgg: "C", maxLen: null, precision: null, useStringInFilter: false },
|
|
20
|
+
{ cd: "date", name: "Date", columnType: "D", baseDatatypeCd: "date", supportedAgg: "CM", maxLen: null, precision: null, useStringInFilter: false },
|
|
21
|
+
{ cd: "datetime", name: "Date & Time", columnType: "D", baseDatatypeCd: "timestamp", supportedAgg: "CM", maxLen: null, precision: null, useStringInFilter: false },
|
|
22
|
+
{ cd: "time", name: "Time", columnType: "D", baseDatatypeCd: "time", supportedAgg: null, maxLen: null, precision: null, useStringInFilter: false },
|
|
23
|
+
{ cd: "dropdown", name: "Dropdown", columnType: "D", baseDatatypeCd: "string", supportedAgg: "C", maxLen: null, precision: null, useStringInFilter: true },
|
|
24
|
+
{ cd: "flags", name: "Flags", columnType: "D", baseDatatypeCd: "string", supportedAgg: "C", maxLen: null, precision: null, useStringInFilter: true, defParams: { style: "buttons" } },
|
|
25
|
+
{ cd: "json", name: "JSON Editor", columnType: "D", baseDatatypeCd: "json", supportedAgg: null, maxLen: null, precision: null, useStringInFilter: false },
|
|
26
|
+
{ cd: "hidden", name: "Hidden", columnType: "D", baseDatatypeCd: "string", supportedAgg: null, maxLen: null, precision: null, useStringInFilter: false },
|
|
27
|
+
{ cd: "color", name: "Color Picker", columnType: "D", baseDatatypeCd: "string", supportedAgg: null, maxLen: 20, precision: null, useStringInFilter: false },
|
|
28
|
+
{ cd: "image", name: "Image", columnType: "D", baseDatatypeCd: "binary", supportedAgg: null, maxLen: null, precision: null, useStringInFilter: false },
|
|
29
|
+
{ cd: "file", name: "File", columnType: "D", baseDatatypeCd: "binary", supportedAgg: null, maxLen: null, precision: null, useStringInFilter: false },
|
|
30
|
+
{ cd: "richtext", name: "Rich Text Editor", columnType: "D", baseDatatypeCd: "string", supportedAgg: null, maxLen: null, precision: null, useStringInFilter: true },
|
|
31
|
+
{ cd: "lookup", name: "Lookup", columnType: "R", baseDatatypeCd: "guid", supportedAgg: "C", maxLen: null, precision: null, useStringInFilter: true },
|
|
32
|
+
{ cd: "user", name: "User Picker", columnType: "D", baseDatatypeCd: "cuid", supportedAgg: "C", maxLen: null, precision: null, useStringInFilter: false },
|
|
33
|
+
{ cd: "grid", name: "Detail Grid", columnType: "S", baseDatatypeCd: "set", supportedAgg: "C", maxLen: null, precision: null, useStringInFilter: false },
|
|
34
|
+
{ cd: "tags", name: "Tags", columnType: "D", baseDatatypeCd: "string", supportedAgg: "C", maxLen: null, precision: null, useStringInFilter: true },
|
|
35
|
+
{ cd: "entitylink", name: "Entity Link", columnType: "D", baseDatatypeCd: "json", supportedAgg: "C", maxLen: null, precision: null, useStringInFilter: false },
|
|
36
|
+
{ cd: "code", name: "Code Editor", columnType: "D", baseDatatypeCd: "string", supportedAgg: "C", maxLen: null, precision: null, useStringInFilter: false },
|
|
37
|
+
];
|
|
38
|
+
const _coverageOk = [undefined, undefined];
|
|
39
|
+
void _coverageOk;
|
|
40
|
+
const byCd = new Map(fieldTypes.map((ft) => [ft.cd, ft]));
|
|
41
|
+
/** Set of all known field type codes, for membership checks. */
|
|
42
|
+
export const fieldTypeCds = new Set(fieldTypes.map((ft) => ft.cd));
|
|
43
|
+
/** Type guard: is `cd` one of the known field type codes? */
|
|
44
|
+
export function isFieldTypeCd(cd) {
|
|
45
|
+
return cd != null && fieldTypeCds.has(cd);
|
|
46
|
+
}
|
|
47
|
+
/** Look up a field type by code, or `undefined` if unknown. */
|
|
48
|
+
export function getFieldType(cd) {
|
|
49
|
+
return byCd.get(cd);
|
|
50
|
+
}
|
|
51
|
+
/** Field types whose default column kind is `columnType` (e.g. "D" value types). */
|
|
52
|
+
export function fieldTypesByColumnType(columnType) {
|
|
53
|
+
return fieldTypes.filter((ft) => ft.columnType === columnType);
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=field-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-types.js","sourceRoot":"","sources":["../src/field-types.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,uEAAuE;AACvE,EAAE;AACF,iFAAiF;AACjF,8EAA8E;AAC9E,4EAA4E;AAC5E,gEAAgE;AAIhE,+EAA+E;AAC/E,6EAA6E;AAC7E,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,cAAc,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EAAE;IACnJ,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,cAAc,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EAAE;IACrJ,EAAE,EAAE,EAAE,OAAO,EAAE,IAA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
/** A single filter condition. */
|
|
2
|
+
export interface FilterCondition {
|
|
3
|
+
/** Column code (supports dot navigation: 'customer.name'). */
|
|
4
|
+
c: string;
|
|
5
|
+
/** Operator: eq, neq, =, !=, gt, gtEq, lt, ltEq, in, nIn, like, isNull, … */
|
|
6
|
+
o: string;
|
|
7
|
+
/** Comparison value: scalar, array (in/nIn) or a `@param_code` reference. */
|
|
8
|
+
v?: unknown;
|
|
9
|
+
}
|
|
10
|
+
/** A boolean group of nested conditions/sub-groups. */
|
|
11
|
+
export interface FilterGroup {
|
|
12
|
+
/** Group combinator. */
|
|
13
|
+
g: "and" | "or";
|
|
14
|
+
/** Group items: nested conditions or sub-groups. */
|
|
15
|
+
i: Filter[];
|
|
16
|
+
}
|
|
17
|
+
/** A filter is either a single condition or a group. */
|
|
18
|
+
export type Filter = FilterCondition | FilterGroup;
|
|
19
|
+
/** A sort clause `{ c, d }` as used by reports / per-source order. */
|
|
20
|
+
export interface SortClause {
|
|
21
|
+
/** Column code. */
|
|
22
|
+
c: string;
|
|
23
|
+
/** Sort direction (default: asc). */
|
|
24
|
+
d?: "asc" | "desc";
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../src/filter.ts"],"names":[],"mappings":"AAMA,iCAAiC;AACjC,MAAM,WAAW,eAAe;IAC/B,8DAA8D;IAC9D,CAAC,EAAE,MAAM,CAAC;IACV,6EAA6E;IAC7E,CAAC,EAAE,MAAM,CAAC;IACV,6EAA6E;IAC7E,CAAC,CAAC,EAAE,OAAO,CAAC;CACZ;AAED,uDAAuD;AACvD,MAAM,WAAW,WAAW;IAC3B,wBAAwB;IACxB,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IAChB,oDAAoD;IACpD,CAAC,EAAE,MAAM,EAAE,CAAC;CACZ;AAED,wDAAwD;AACxD,MAAM,MAAM,MAAM,GAAG,eAAe,GAAG,WAAW,CAAC;AAEnD,sEAAsE;AACtE,MAAM,WAAW,UAAU;IAC1B,mBAAmB;IACnB,CAAC,EAAE,MAAM,CAAC;IACV,qCAAqC;IACrC,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CACnB"}
|
package/dist/filter.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Canonical dForge filter expression.
|
|
2
|
+
//
|
|
3
|
+
// One shape shared by data views, reports, folders (row-level security) and the
|
|
4
|
+
// API: either a single condition `{c, o, v}` or a group `{g, i: [...]}`. Mirror
|
|
5
|
+
// of the `filter` $def repeated across data_views / reports / folders schemas.
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=filter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter.js","sourceRoot":"","sources":["../src/filter.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAChF,+EAA+E"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Filter } from "./filter";
|
|
2
|
+
/** Per-entity binding within a folder. */
|
|
3
|
+
export interface FolderEntityBinding {
|
|
4
|
+
/** Data view code to use in this folder (commonly 'default'). */
|
|
5
|
+
viewName?: string;
|
|
6
|
+
/** Enable the quick-add (+) button for this entity here. */
|
|
7
|
+
quickAdd?: boolean;
|
|
8
|
+
/** Row-level filter: a SQL expression string or a canonical filter object. */
|
|
9
|
+
rowFilter?: string | Filter;
|
|
10
|
+
}
|
|
11
|
+
/** A folder node (the folders.json root, and each entry under `children`). */
|
|
12
|
+
export interface FolderDef {
|
|
13
|
+
label?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
/** Parent folder code (only used by sparse-tree imports; usually omitted). */
|
|
16
|
+
parentCode?: string | null;
|
|
17
|
+
/** URL-friendly folder path override. */
|
|
18
|
+
folderPath?: string;
|
|
19
|
+
/** Accent color (hex, e.g. '#2196F3'). */
|
|
20
|
+
color?: string;
|
|
21
|
+
/** Bootstrap icon class (e.g. 'bi-folder'). */
|
|
22
|
+
icon?: string;
|
|
23
|
+
/** Inherit security rights from the parent folder (default true). */
|
|
24
|
+
inheritSecurity?: boolean;
|
|
25
|
+
/** Entity code → folder-entity binding. */
|
|
26
|
+
entities?: Record<string, FolderEntityBinding>;
|
|
27
|
+
/** Nested folders keyed by sub-folder code (recursive). */
|
|
28
|
+
children?: Record<string, FolderDef>;
|
|
29
|
+
}
|
|
30
|
+
/** A `folders.json` file: the root folder itself. */
|
|
31
|
+
export type FoldersFile = FolderDef;
|
|
32
|
+
//# sourceMappingURL=folders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"folders.d.ts","sourceRoot":"","sources":["../src/folders.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,0CAA0C;AAC1C,MAAM,WAAW,mBAAmB;IACnC,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B;AAED,8EAA8E;AAC9E,MAAM,WAAW,SAAS;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8EAA8E;IAC9E,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,yCAAyC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IAC/C,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACrC;AAED,qDAAqD;AACrD,MAAM,MAAM,WAAW,GAAG,SAAS,CAAC"}
|
package/dist/folders.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"folders.js","sourceRoot":"","sources":["../src/folders.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,EAAE;AACF,gFAAgF;AAChF,oCAAoC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type { AlignType, BaseDatatypeCd, ColumnTypeCd, ColumnTypeDef, FieldDef, FieldLink, FieldOption, FieldTypeCd, FieldTypeDef, FlagCd, NamedKind, TraitDef, } from "./types";
|
|
2
|
+
export { AggType, AGG_TYPE_LIST } from "./aggregation";
|
|
3
|
+
export { fieldTypes, fieldTypeCds, isFieldTypeCd, getFieldType, fieldTypesByColumnType } from "./field-types";
|
|
4
|
+
export { baseDatatypes, baseToDbDatatype } from "./base-datatypes";
|
|
5
|
+
export { columnTypes, getColumnType } from "./column-types";
|
|
6
|
+
export { traits, getTrait, expandTrait, expandTraits } from "./traits";
|
|
7
|
+
export { deriveDbDatatype, deriveBaseDatatype, defaultParams, NUMERIC_TOTAL, type DeriveOptions, } from "./derive";
|
|
8
|
+
export type { Filter, FilterCondition, FilterGroup, SortClause } from "./filter";
|
|
9
|
+
export type { EntityDef, EntityReference, NumberSequenceDef, PeriodConfig, AccumulationConfig, SignConfig, LedgerRegistryEntry, TraitCd, } from "./entity";
|
|
10
|
+
export { dataViewKinds, type DataViewsFile, type DataViewDef, type DataSource, type ViewColumn, type ViewType, type KanbanViewConfig, type CalendarViewConfig, type TreeGridViewConfig, type ListViewConfig, type ListLevelConfig, type DiagramViewConfig, } from "./data-views";
|
|
11
|
+
export { vizTypes, chartTypes, type ReportsFile, type ReportDef, type ReportLayout, type ReportPanel, type Dataset, type ReportQuery, type ColumnDef, type ParamDef, type VizType, } from "./reports";
|
|
12
|
+
export type { ManifestDef, ManifestAuthor, ModuleDependency } from "./manifest";
|
|
13
|
+
export type { MenusFile, MenuDef, MenuItemDef, MenuItemType } from "./menus";
|
|
14
|
+
export type { FoldersFile, FolderDef, FolderEntityBinding } from "./folders";
|
|
15
|
+
export type { RolesFile, RoleDef } from "./roles";
|
|
16
|
+
export type { SettingsFile, SettingDef, SettingBaseDatatype } from "./settings";
|
|
17
|
+
export type { JobsFile, JobDef } from "./jobs";
|
|
18
|
+
export type { TriggersFile, TriggerDef, EntityEvent } from "./triggers";
|
|
19
|
+
export type { WebhooksFile, WebhookSubscription, WebhookPayload } from "./webhooks";
|
|
20
|
+
export type { PrintTemplatesFile, PrintTemplateDef, PrintPageSettings, PrintMargins } from "./print-templates";
|
|
21
|
+
export type { SeedDataFile } from "./seed-data";
|
|
22
|
+
export type { ActionsFile, ActionDef, ActionExecutionMode } from "./actions";
|
|
23
|
+
export declare const flagDefs: readonly {
|
|
24
|
+
value: "V" | "I" | "E" | "M" | "H";
|
|
25
|
+
label: string;
|
|
26
|
+
}[];
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAeA,YAAY,EACX,SAAS,EACT,cAAc,EACd,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,SAAS,EACT,WAAW,EACX,WAAW,EACX,YAAY,EACZ,MAAM,EACN,SAAS,EACT,QAAQ,GACR,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAC9G,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACnE,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C;AAClD,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAChF,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC/C,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACxE,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACpF,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/G,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAI7E,eAAO,MAAM,QAAQ,EAAE,SAAS;IAAE,KAAK,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAM3E,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// @dforge-core/metadata — canonical dForge authoring registries + module-file types.
|
|
2
|
+
//
|
|
3
|
+
// Single source of truth for:
|
|
4
|
+
// • registries — field types, base datatypes, column types, traits, data-view
|
|
5
|
+
// kinds, report viz/chart types, plus helpers that derive physical metadata
|
|
6
|
+
// from a friendly field-type choice;
|
|
7
|
+
// • structural types — the authoring shape of every module-package file
|
|
8
|
+
// (manifest, entities, data views, reports, menus, folders, roles, settings,
|
|
9
|
+
// jobs, triggers, webhooks, print templates, seed data, actions), mirrored
|
|
10
|
+
// from the JSON schemas under docs/schemas/.
|
|
11
|
+
//
|
|
12
|
+
// No runtime dependencies; safe to import from editors, the web app, the CLI,
|
|
13
|
+
// the MCP server and the VS Code extension.
|
|
14
|
+
export { AggType, AGG_TYPE_LIST } from "./aggregation";
|
|
15
|
+
export { fieldTypes, fieldTypeCds, isFieldTypeCd, getFieldType, fieldTypesByColumnType } from "./field-types";
|
|
16
|
+
export { baseDatatypes, baseToDbDatatype } from "./base-datatypes";
|
|
17
|
+
export { columnTypes, getColumnType } from "./column-types";
|
|
18
|
+
export { traits, getTrait, expandTrait, expandTraits } from "./traits";
|
|
19
|
+
export { deriveDbDatatype, deriveBaseDatatype, defaultParams, NUMERIC_TOTAL, } from "./derive";
|
|
20
|
+
export { dataViewKinds, } from "./data-views";
|
|
21
|
+
export { vizTypes, chartTypes, } from "./reports";
|
|
22
|
+
// Display flag catalog — the only flags valid on an authored field
|
|
23
|
+
// (entity.schema.json `flags` pattern is ^[VIEMH]*$).
|
|
24
|
+
export const flagDefs = [
|
|
25
|
+
{ value: "V", label: "Visible" },
|
|
26
|
+
{ value: "I", label: "Identity" },
|
|
27
|
+
{ value: "E", label: "Editable" },
|
|
28
|
+
{ value: "M", label: "Mandatory" },
|
|
29
|
+
{ value: "H", label: "Hidden" },
|
|
30
|
+
];
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,EAAE;AACF,8BAA8B;AAC9B,gFAAgF;AAChF,gFAAgF;AAChF,yCAAyC;AACzC,0EAA0E;AAC1E,iFAAiF;AACjF,+EAA+E;AAC/E,iDAAiD;AACjD,EAAE;AACF,8EAA8E;AAC9E,4CAA4C;AAkB5C,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAC9G,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACvE,OAAO,EACN,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,aAAa,GAEb,MAAM,UAAU,CAAC;AAiBlB,OAAO,EACN,aAAa,GAYb,MAAM,cAAc,CAAC;AAEtB,OAAO,EACN,QAAQ,EACR,UAAU,GAUV,MAAM,WAAW,CAAC;AAcnB,mEAAmE;AACnE,sDAAsD;AACtD,MAAM,CAAC,MAAM,QAAQ,GAAqE;IACzF,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE;IAChC,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,UAAU,EAAE;IACjC,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,UAAU,EAAE;IACjC,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE;IAClC,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE;CACtB,CAAC"}
|
package/dist/jobs.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** A single scheduled-job declaration. */
|
|
2
|
+
export interface JobDef {
|
|
3
|
+
/** Unique identifier within the module. */
|
|
4
|
+
code: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
/** Action code in this module the scheduler fires. */
|
|
7
|
+
action: string;
|
|
8
|
+
/** Five-field cron expression (minute granularity). */
|
|
9
|
+
schedule: string;
|
|
10
|
+
/** Static parameters passed to the action as `__params`. */
|
|
11
|
+
params?: Record<string, unknown>;
|
|
12
|
+
/** Hard timeout in seconds (1–3600; > 300 requires class 'long_running'). */
|
|
13
|
+
timeout: number;
|
|
14
|
+
/** Max parallel runs (1–5; default 1). */
|
|
15
|
+
concurrency?: number;
|
|
16
|
+
/** Idempotency key template, e.g. '{job_cd}:{run.month}'. */
|
|
17
|
+
idempotencyKey?: string;
|
|
18
|
+
/** Routing class ('long_running' required for any timeout > 300s). */
|
|
19
|
+
class?: "standard" | "long_running";
|
|
20
|
+
/** IANA tz name overriding the tenant default. */
|
|
21
|
+
timeZone?: string;
|
|
22
|
+
/** Master switch (default true). */
|
|
23
|
+
enabled?: boolean;
|
|
24
|
+
/** Soft pause; admin 'trigger now' still works (default false). */
|
|
25
|
+
paused?: boolean;
|
|
26
|
+
}
|
|
27
|
+
/** A `logic/jobs.json` file. */
|
|
28
|
+
export interface JobsFile {
|
|
29
|
+
/** At most 50 jobs per module. */
|
|
30
|
+
jobs: JobDef[];
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=jobs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jobs.d.ts","sourceRoot":"","sources":["../src/jobs.ts"],"names":[],"mappings":"AAEA,0CAA0C;AAC1C,MAAM,WAAW,MAAM;IACtB,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sDAAsD;IACtD,MAAM,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,QAAQ,EAAE,MAAM,CAAC;IACjB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,6EAA6E;IAC7E,OAAO,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6DAA6D;IAC7D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sEAAsE;IACtE,KAAK,CAAC,EAAE,UAAU,GAAG,cAAc,CAAC;IACpC,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mEAAmE;IACnE,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,gCAAgC;AAChC,MAAM,WAAW,QAAQ;IACxB,kCAAkC;IAClC,IAAI,EAAE,MAAM,EAAE,CAAC;CACf"}
|
package/dist/jobs.js
ADDED
package/dist/jobs.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jobs.js","sourceRoot":"","sources":["../src/jobs.ts"],"names":[],"mappings":"AAAA,qFAAqF"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/** Author block on a manifest. */
|
|
2
|
+
export interface ManifestAuthor {
|
|
3
|
+
name: string;
|
|
4
|
+
url?: string;
|
|
5
|
+
}
|
|
6
|
+
/** A dependency value: a semver range, or a partial-dep object. */
|
|
7
|
+
export type ModuleDependency = string | {
|
|
8
|
+
version: string;
|
|
9
|
+
entities?: string[];
|
|
10
|
+
};
|
|
11
|
+
/** A module package manifest (`manifest.json`). */
|
|
12
|
+
export interface ManifestDef {
|
|
13
|
+
/** Package format version (currently 1). */
|
|
14
|
+
packageFormat: number;
|
|
15
|
+
/** Globally unique module UUID. */
|
|
16
|
+
moduleId: string;
|
|
17
|
+
/** Human-readable module code (becomes the schema name and `module_cd`). */
|
|
18
|
+
code: string;
|
|
19
|
+
/** 'module' (default) or 'pack' (a dependency bundle owning no entities). */
|
|
20
|
+
kind?: "module" | "pack";
|
|
21
|
+
/** Module version (semver). */
|
|
22
|
+
version: string;
|
|
23
|
+
/** Database schema version (semver). */
|
|
24
|
+
dbSchemaVersion: string;
|
|
25
|
+
displayName: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
/** Schema name override (defaults to `code`; system modules use 'dForge'). */
|
|
28
|
+
schemaName?: string;
|
|
29
|
+
/** System module flag (cannot be uninstalled, admin-only). Omit for regular modules. */
|
|
30
|
+
system?: boolean;
|
|
31
|
+
author?: ManifestAuthor;
|
|
32
|
+
/** License identifier (e.g. 'proprietary', 'MIT'). */
|
|
33
|
+
license?: string;
|
|
34
|
+
/** Module code → semver range or partial-dep object. */
|
|
35
|
+
dependencies?: Record<string, ModuleDependency>;
|
|
36
|
+
/** Default audit history mode for this module's entities. */
|
|
37
|
+
auditHistory?: "none" | "minimal" | "full";
|
|
38
|
+
/** Entity code → relative path of its JSON file (dotted keys = extensions). */
|
|
39
|
+
entities?: Record<string, string>;
|
|
40
|
+
/** Module category for display (e.g. 'Integration', 'Finance'). */
|
|
41
|
+
category?: string;
|
|
42
|
+
/** Free-form tags for search/discovery. */
|
|
43
|
+
tags?: string[];
|
|
44
|
+
/** Bootstrap icon class (e.g. 'bi-link-45deg'). */
|
|
45
|
+
icon?: string;
|
|
46
|
+
/** Non-English locales the package promises to translate. */
|
|
47
|
+
supportedLocales?: string[];
|
|
48
|
+
/** Initial creation date (YYYY-MM-DD). Informational. */
|
|
49
|
+
created?: string;
|
|
50
|
+
/** Last manifest edit date (YYYY-MM-DD). Informational. */
|
|
51
|
+
updated?: string;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAGA,kCAAkC;AAClC,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CACb;AAED,mEAAmE;AACnE,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAEjF,mDAAmD;AACnD,MAAM,WAAW,WAAW;IAC3B,4CAA4C;IAC5C,aAAa,EAAE,MAAM,CAAC;IACtB,mCAAmC;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,4EAA4E;IAC5E,IAAI,EAAE,MAAM,CAAC;IACb,6EAA6E;IAC7E,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACzB,+BAA+B;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,wCAAwC;IACxC,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,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