@spotto/semantic-query 1.0.70-alpha.35 → 1.0.70-alpha.37
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/evaluate.d.ts +7 -0
- package/dist/evaluate.js +13 -3
- package/dist/evaluate.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/rules-fixtures.d.ts +673 -0
- package/dist/rules-fixtures.js +406 -0
- package/dist/rules-fixtures.js.map +1 -0
- package/dist/rules.d.ts +180 -0
- package/dist/rules.js +322 -0
- package/dist/rules.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,673 @@
|
|
|
1
|
+
import { FieldInputType } from '@spotto/contract';
|
|
2
|
+
import { AccessCaller, AccessGroup } from './rules';
|
|
3
|
+
import { SemanticAccountSchema, SemanticFieldDef } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* The rules conformance cast: the groups, assets and callers of the
|
|
6
|
+
* specification's appendix A, plus the cases the appendix leaves to the
|
|
7
|
+
* reader. Shipped on its own entry point (`@spotto/semantic-query/dist/rules-fixtures`)
|
|
8
|
+
* beside the language corpus, for the same reason: the server's compiler spec
|
|
9
|
+
* pins its Mongo against these documents and the client's equivalence test
|
|
10
|
+
* executes its SQL over them, so a scenario means the same thing at every
|
|
11
|
+
* layer.
|
|
12
|
+
*
|
|
13
|
+
* Every document states beside it why it exists. The hand-derived truth
|
|
14
|
+
* table lives in `rules.spec.ts`, so that the oracle is proven by hand once
|
|
15
|
+
* and the back-ends are proven against the oracle.
|
|
16
|
+
*/
|
|
17
|
+
export declare const RULE_FIELDS: {
|
|
18
|
+
readonly BATTERY_GOOD: "eeeeeeeeeeeeeeeeeeeeee01";
|
|
19
|
+
readonly BRAND: "eeeeeeeeeeeeeeeeeeeeee02";
|
|
20
|
+
readonly COST: "eeeeeeeeeeeeeeeeeeeeee03";
|
|
21
|
+
readonly SERIAL: "eeeeeeeeeeeeeeeeeeeeee04";
|
|
22
|
+
readonly BUSINESS_UNIT: "eeeeeeeeeeeeeeeeeeeeee05";
|
|
23
|
+
/** A CHECKBOXES field, present so the write-time refusal of a multi-select filter has something to refuse. */
|
|
24
|
+
readonly CERTIFICATIONS: "eeeeeeeeeeeeeeeeeeeeee06";
|
|
25
|
+
};
|
|
26
|
+
/** A field as the cast seeds it: the catalogue entry plus the input type the rule validator checks. */
|
|
27
|
+
export interface RuleFixtureField extends SemanticFieldDef {
|
|
28
|
+
inputType?: FieldInputType;
|
|
29
|
+
}
|
|
30
|
+
export declare const RULE_FIELD_DEFS: RuleFixtureField[];
|
|
31
|
+
export declare const RULE_TYPES: {
|
|
32
|
+
readonly TOOLS: "dddddddddddddddddddddd01";
|
|
33
|
+
/** Nested under Tools, and carries Business Unit = Operations at the TYPE level. */
|
|
34
|
+
readonly POWER_TOOLS: "dddddddddddddddddddddd02";
|
|
35
|
+
readonly TROLLEYS: "dddddddddddddddddddddd03";
|
|
36
|
+
readonly VEHICLES: "dddddddddddddddddddddd04";
|
|
37
|
+
};
|
|
38
|
+
export declare const RULE_TYPE_PATHS: {
|
|
39
|
+
readonly TOOLS: "Tools|";
|
|
40
|
+
readonly POWER_TOOLS: "Tools|Power tools|";
|
|
41
|
+
readonly TROLLEYS: "Trolleys|";
|
|
42
|
+
readonly VEHICLES: "Vehicles|";
|
|
43
|
+
};
|
|
44
|
+
export declare const RULE_LOCATIONS: {
|
|
45
|
+
readonly SYDNEY: "Eastern|Sydney|";
|
|
46
|
+
readonly SYDNEY_BAY: "Eastern|Sydney|Bay 1|";
|
|
47
|
+
readonly ALBURY: "Eastern|Albury|";
|
|
48
|
+
readonly DUBBO: "Eastern|Dubbo|";
|
|
49
|
+
readonly PERTH: "Western|Perth|";
|
|
50
|
+
/** The sibling trap: shares the prefix of Sydney up to the pipe. */
|
|
51
|
+
readonly SYDNEYSIDE: "Eastern|Sydneyside|";
|
|
52
|
+
};
|
|
53
|
+
export declare const RULE_ACTIONS: {
|
|
54
|
+
readonly REPORT_DAMAGE: "cccccccccccccccccccccc01";
|
|
55
|
+
readonly DECOMMISSION: "cccccccccccccccccccccc02";
|
|
56
|
+
/** Targets locations, so it attaches to no type. */
|
|
57
|
+
readonly AUDIT_LOCATION: "cccccccccccccccccccccc03";
|
|
58
|
+
};
|
|
59
|
+
export declare const RULE_SCHEMA: SemanticAccountSchema;
|
|
60
|
+
export declare const RULE_GROUP_IDS: {
|
|
61
|
+
readonly SYDNEY_EDITORS: "bbbbbbbbbbbbbbbbbbbbbb01";
|
|
62
|
+
readonly OPERATIONS_VIEWERS: "bbbbbbbbbbbbbbbbbbbbbb02";
|
|
63
|
+
readonly SERIAL_READERS: "bbbbbbbbbbbbbbbbbbbbbb03";
|
|
64
|
+
readonly TOOL_EDITORS: "bbbbbbbbbbbbbbbbbbbbbb04";
|
|
65
|
+
readonly ALL_USERS: "bbbbbbbbbbbbbbbbbbbbbb05";
|
|
66
|
+
readonly EMPTY_RULES: "bbbbbbbbbbbbbbbbbbbbbb06";
|
|
67
|
+
readonly DANGLING_FILTER: "bbbbbbbbbbbbbbbbbbbbbb07";
|
|
68
|
+
};
|
|
69
|
+
/** EDIT on the Sydney subtree, any type. Battery Good EDIT, Brand VIEW. All actions. */
|
|
70
|
+
export declare const SYDNEY_EDITORS: AccessGroup;
|
|
71
|
+
/** VIEW on every asset whose Business Unit is Operations, own or type-level. All fields VIEW. Report damage only. */
|
|
72
|
+
export declare const OPERATIONS_VIEWERS: AccessGroup;
|
|
73
|
+
/** Rule-less: Serial Number VIEW on anything a member can open. No actions. */
|
|
74
|
+
export declare const SERIAL_READERS: AccessGroup;
|
|
75
|
+
/**
|
|
76
|
+
* EDIT on Tools, subtypes included, at Albury or Perth: two selected paths
|
|
77
|
+
* AND a selected type, so a Perth trolley and a Dubbo tool both miss. All
|
|
78
|
+
* fields EDIT. Decommission only.
|
|
79
|
+
*/
|
|
80
|
+
export declare const TOOL_EDITORS: AccessGroup;
|
|
81
|
+
/** The bootstrap shape: unlimited at EDIT, every field EDIT, every action. */
|
|
82
|
+
export declare const ALL_USERS: AccessGroup;
|
|
83
|
+
/** A group with no rule at all: valid for a home layout or an SSO mapping, grants nothing. */
|
|
84
|
+
export declare const EMPTY_RULES: AccessGroup;
|
|
85
|
+
/** A filter on a field the catalogue does not hold: the rule grants nothing, never everything. */
|
|
86
|
+
export declare const DANGLING_FILTER: AccessGroup;
|
|
87
|
+
export declare const RULE_GROUPS: {
|
|
88
|
+
readonly SYDNEY_EDITORS: AccessGroup;
|
|
89
|
+
readonly OPERATIONS_VIEWERS: AccessGroup;
|
|
90
|
+
readonly SERIAL_READERS: AccessGroup;
|
|
91
|
+
readonly TOOL_EDITORS: AccessGroup;
|
|
92
|
+
readonly ALL_USERS: AccessGroup;
|
|
93
|
+
readonly EMPTY_RULES: AccessGroup;
|
|
94
|
+
readonly DANGLING_FILTER: AccessGroup;
|
|
95
|
+
};
|
|
96
|
+
/** Appendix asset A: a Sydney tool in Operations, scanned at home. Sydney editors EDIT and Operations viewers VIEW both match. */
|
|
97
|
+
export declare const SYDNEY_TOOL: {
|
|
98
|
+
_id: string;
|
|
99
|
+
name: string;
|
|
100
|
+
typeId: "dddddddddddddddddddddd01";
|
|
101
|
+
typePath: "Tools|";
|
|
102
|
+
homeLocationPath: "Eastern|Sydney|";
|
|
103
|
+
state: {
|
|
104
|
+
locationName: "Eastern|Sydney|Bay 1|";
|
|
105
|
+
locationStatus: string;
|
|
106
|
+
};
|
|
107
|
+
fieldValues: {
|
|
108
|
+
valueString?: string | null | undefined;
|
|
109
|
+
valueBoolean?: boolean | undefined;
|
|
110
|
+
valueDecimal?: number | undefined;
|
|
111
|
+
_id: string;
|
|
112
|
+
name: string;
|
|
113
|
+
}[];
|
|
114
|
+
};
|
|
115
|
+
/** Appendix asset B: a Dubbo trolley in Logistics. No group matches. */
|
|
116
|
+
export declare const DUBBO_TROLLEY: {
|
|
117
|
+
_id: string;
|
|
118
|
+
name: string;
|
|
119
|
+
typeId: "dddddddddddddddddddddd03";
|
|
120
|
+
typePath: "Trolleys|";
|
|
121
|
+
homeLocationPath: "Eastern|Dubbo|";
|
|
122
|
+
state: {
|
|
123
|
+
locationName: "Eastern|Dubbo|";
|
|
124
|
+
locationStatus: string;
|
|
125
|
+
};
|
|
126
|
+
fieldValues: {
|
|
127
|
+
valueString?: string | null | undefined;
|
|
128
|
+
valueBoolean?: boolean | undefined;
|
|
129
|
+
valueDecimal?: number | undefined;
|
|
130
|
+
_id: string;
|
|
131
|
+
name: string;
|
|
132
|
+
}[];
|
|
133
|
+
};
|
|
134
|
+
/** Appendix asset C: a tool homed in Dubbo, no business unit, currently scanned in Sydney. Sydney editors match through the current location. */
|
|
135
|
+
export declare const VISITING_TOOL: {
|
|
136
|
+
_id: string;
|
|
137
|
+
name: string;
|
|
138
|
+
typeId: "dddddddddddddddddddddd01";
|
|
139
|
+
typePath: "Tools|";
|
|
140
|
+
homeLocationPath: "Eastern|Dubbo|";
|
|
141
|
+
state: {
|
|
142
|
+
locationName: "Eastern|Sydney|";
|
|
143
|
+
locationStatus: string;
|
|
144
|
+
};
|
|
145
|
+
fieldValues: {
|
|
146
|
+
valueString?: string | null | undefined;
|
|
147
|
+
valueBoolean?: boolean | undefined;
|
|
148
|
+
valueDecimal?: number | undefined;
|
|
149
|
+
_id: string;
|
|
150
|
+
name: string;
|
|
151
|
+
}[];
|
|
152
|
+
};
|
|
153
|
+
/** A power tool at Albury, never scanned, with no business unit of its own: Operations viewers match through the TYPE-level value, Tool editors through Albury and the Tools prefix. */
|
|
154
|
+
export declare const ALBURY_POWER_TOOL: {
|
|
155
|
+
_id: string;
|
|
156
|
+
name: string;
|
|
157
|
+
typeId: "dddddddddddddddddddddd02";
|
|
158
|
+
typePath: "Tools|Power tools|";
|
|
159
|
+
homeLocationPath: "Eastern|Albury|";
|
|
160
|
+
fieldValues: {
|
|
161
|
+
valueString?: string | null | undefined;
|
|
162
|
+
valueBoolean?: boolean | undefined;
|
|
163
|
+
valueDecimal?: number | undefined;
|
|
164
|
+
_id: string;
|
|
165
|
+
name: string;
|
|
166
|
+
}[];
|
|
167
|
+
};
|
|
168
|
+
/** A Perth trolley with nothing set: Tool editors miss on the type, nobody else reaches Perth. */
|
|
169
|
+
export declare const PERTH_TROLLEY: {
|
|
170
|
+
_id: string;
|
|
171
|
+
name: string;
|
|
172
|
+
typeId: "dddddddddddddddddddddd03";
|
|
173
|
+
typePath: "Trolleys|";
|
|
174
|
+
homeLocationPath: "Western|Perth|";
|
|
175
|
+
fieldValues: never[];
|
|
176
|
+
};
|
|
177
|
+
/** The sibling trap: homed at Sydneyside, which shares Sydney's prefix up to the pipe. Must stay hidden from Sydney editors. */
|
|
178
|
+
export declare const SYDNEYSIDE_TOOL: {
|
|
179
|
+
_id: string;
|
|
180
|
+
name: string;
|
|
181
|
+
typeId: "dddddddddddddddddddddd01";
|
|
182
|
+
typePath: "Tools|";
|
|
183
|
+
homeLocationPath: "Eastern|Sydneyside|";
|
|
184
|
+
state: {
|
|
185
|
+
locationName: "Eastern|Sydneyside|";
|
|
186
|
+
locationStatus: string;
|
|
187
|
+
};
|
|
188
|
+
fieldValues: {
|
|
189
|
+
valueString?: string | null | undefined;
|
|
190
|
+
valueBoolean?: boolean | undefined;
|
|
191
|
+
valueDecimal?: number | undefined;
|
|
192
|
+
_id: string;
|
|
193
|
+
name: string;
|
|
194
|
+
}[];
|
|
195
|
+
};
|
|
196
|
+
/** A Sydney vehicle never scanned: Sydney editors match through the home alone. */
|
|
197
|
+
export declare const SYDNEY_VEHICLE: {
|
|
198
|
+
_id: string;
|
|
199
|
+
name: string;
|
|
200
|
+
typeId: "dddddddddddddddddddddd04";
|
|
201
|
+
typePath: "Vehicles|";
|
|
202
|
+
homeLocationPath: "Eastern|Sydney|";
|
|
203
|
+
fieldValues: {
|
|
204
|
+
valueString?: string | null | undefined;
|
|
205
|
+
valueBoolean?: boolean | undefined;
|
|
206
|
+
valueDecimal?: number | undefined;
|
|
207
|
+
_id: string;
|
|
208
|
+
name: string;
|
|
209
|
+
}[];
|
|
210
|
+
};
|
|
211
|
+
/** A Perth tool in Operations: Operations viewers VIEW and Tool editors EDIT, so EDIT wins. */
|
|
212
|
+
export declare const PERTH_OPS_TOOL: {
|
|
213
|
+
_id: string;
|
|
214
|
+
name: string;
|
|
215
|
+
typeId: "dddddddddddddddddddddd01";
|
|
216
|
+
typePath: "Tools|";
|
|
217
|
+
homeLocationPath: "Western|Perth|";
|
|
218
|
+
state: {
|
|
219
|
+
locationName: "Western|Perth|";
|
|
220
|
+
locationStatus: string;
|
|
221
|
+
};
|
|
222
|
+
fieldValues: {
|
|
223
|
+
valueString?: string | null | undefined;
|
|
224
|
+
valueBoolean?: boolean | undefined;
|
|
225
|
+
valueDecimal?: number | undefined;
|
|
226
|
+
_id: string;
|
|
227
|
+
name: string;
|
|
228
|
+
}[];
|
|
229
|
+
};
|
|
230
|
+
/** An Albury trolley in Operations: Operations viewers alone, so VIEW, and the VIEW cap on every field. */
|
|
231
|
+
export declare const ALBURY_OPS_TROLLEY: {
|
|
232
|
+
_id: string;
|
|
233
|
+
name: string;
|
|
234
|
+
typeId: "dddddddddddddddddddddd03";
|
|
235
|
+
typePath: "Trolleys|";
|
|
236
|
+
homeLocationPath: "Eastern|Albury|";
|
|
237
|
+
fieldValues: {
|
|
238
|
+
valueString?: string | null | undefined;
|
|
239
|
+
valueBoolean?: boolean | undefined;
|
|
240
|
+
valueDecimal?: number | undefined;
|
|
241
|
+
_id: string;
|
|
242
|
+
name: string;
|
|
243
|
+
}[];
|
|
244
|
+
};
|
|
245
|
+
/** A Dubbo power tool whose OWN business unit is Logistics while its type says Operations: either value matches, so Operations viewers see it. */
|
|
246
|
+
export declare const DUBBO_LOGISTICS_POWER_TOOL: {
|
|
247
|
+
_id: string;
|
|
248
|
+
name: string;
|
|
249
|
+
typeId: "dddddddddddddddddddddd02";
|
|
250
|
+
typePath: "Tools|Power tools|";
|
|
251
|
+
homeLocationPath: "Eastern|Dubbo|";
|
|
252
|
+
fieldValues: {
|
|
253
|
+
valueString?: string | null | undefined;
|
|
254
|
+
valueBoolean?: boolean | undefined;
|
|
255
|
+
valueDecimal?: number | undefined;
|
|
256
|
+
_id: string;
|
|
257
|
+
name: string;
|
|
258
|
+
}[];
|
|
259
|
+
};
|
|
260
|
+
/** An Albury tool whose business unit slot is present but null: unset, so Operations viewers miss, while Tool editors match. */
|
|
261
|
+
export declare const ALBURY_NULL_TOOL: {
|
|
262
|
+
_id: string;
|
|
263
|
+
name: string;
|
|
264
|
+
typeId: "dddddddddddddddddddddd01";
|
|
265
|
+
typePath: "Tools|";
|
|
266
|
+
homeLocationPath: "Eastern|Albury|";
|
|
267
|
+
state: {
|
|
268
|
+
locationName: "Eastern|Albury|";
|
|
269
|
+
locationStatus: string;
|
|
270
|
+
};
|
|
271
|
+
fieldValues: {
|
|
272
|
+
valueString?: string | null | undefined;
|
|
273
|
+
valueBoolean?: boolean | undefined;
|
|
274
|
+
valueDecimal?: number | undefined;
|
|
275
|
+
_id: string;
|
|
276
|
+
name: string;
|
|
277
|
+
}[];
|
|
278
|
+
};
|
|
279
|
+
export declare const RULE_ASSETS: {
|
|
280
|
+
readonly SYDNEY_TOOL: {
|
|
281
|
+
_id: string;
|
|
282
|
+
name: string;
|
|
283
|
+
typeId: "dddddddddddddddddddddd01";
|
|
284
|
+
typePath: "Tools|";
|
|
285
|
+
homeLocationPath: "Eastern|Sydney|";
|
|
286
|
+
state: {
|
|
287
|
+
locationName: "Eastern|Sydney|Bay 1|";
|
|
288
|
+
locationStatus: string;
|
|
289
|
+
};
|
|
290
|
+
fieldValues: {
|
|
291
|
+
valueString?: string | null | undefined;
|
|
292
|
+
valueBoolean?: boolean | undefined;
|
|
293
|
+
valueDecimal?: number | undefined;
|
|
294
|
+
_id: string;
|
|
295
|
+
name: string;
|
|
296
|
+
}[];
|
|
297
|
+
};
|
|
298
|
+
readonly DUBBO_TROLLEY: {
|
|
299
|
+
_id: string;
|
|
300
|
+
name: string;
|
|
301
|
+
typeId: "dddddddddddddddddddddd03";
|
|
302
|
+
typePath: "Trolleys|";
|
|
303
|
+
homeLocationPath: "Eastern|Dubbo|";
|
|
304
|
+
state: {
|
|
305
|
+
locationName: "Eastern|Dubbo|";
|
|
306
|
+
locationStatus: string;
|
|
307
|
+
};
|
|
308
|
+
fieldValues: {
|
|
309
|
+
valueString?: string | null | undefined;
|
|
310
|
+
valueBoolean?: boolean | undefined;
|
|
311
|
+
valueDecimal?: number | undefined;
|
|
312
|
+
_id: string;
|
|
313
|
+
name: string;
|
|
314
|
+
}[];
|
|
315
|
+
};
|
|
316
|
+
readonly VISITING_TOOL: {
|
|
317
|
+
_id: string;
|
|
318
|
+
name: string;
|
|
319
|
+
typeId: "dddddddddddddddddddddd01";
|
|
320
|
+
typePath: "Tools|";
|
|
321
|
+
homeLocationPath: "Eastern|Dubbo|";
|
|
322
|
+
state: {
|
|
323
|
+
locationName: "Eastern|Sydney|";
|
|
324
|
+
locationStatus: string;
|
|
325
|
+
};
|
|
326
|
+
fieldValues: {
|
|
327
|
+
valueString?: string | null | undefined;
|
|
328
|
+
valueBoolean?: boolean | undefined;
|
|
329
|
+
valueDecimal?: number | undefined;
|
|
330
|
+
_id: string;
|
|
331
|
+
name: string;
|
|
332
|
+
}[];
|
|
333
|
+
};
|
|
334
|
+
readonly ALBURY_POWER_TOOL: {
|
|
335
|
+
_id: string;
|
|
336
|
+
name: string;
|
|
337
|
+
typeId: "dddddddddddddddddddddd02";
|
|
338
|
+
typePath: "Tools|Power tools|";
|
|
339
|
+
homeLocationPath: "Eastern|Albury|";
|
|
340
|
+
fieldValues: {
|
|
341
|
+
valueString?: string | null | undefined;
|
|
342
|
+
valueBoolean?: boolean | undefined;
|
|
343
|
+
valueDecimal?: number | undefined;
|
|
344
|
+
_id: string;
|
|
345
|
+
name: string;
|
|
346
|
+
}[];
|
|
347
|
+
};
|
|
348
|
+
readonly PERTH_TROLLEY: {
|
|
349
|
+
_id: string;
|
|
350
|
+
name: string;
|
|
351
|
+
typeId: "dddddddddddddddddddddd03";
|
|
352
|
+
typePath: "Trolleys|";
|
|
353
|
+
homeLocationPath: "Western|Perth|";
|
|
354
|
+
fieldValues: never[];
|
|
355
|
+
};
|
|
356
|
+
readonly SYDNEYSIDE_TOOL: {
|
|
357
|
+
_id: string;
|
|
358
|
+
name: string;
|
|
359
|
+
typeId: "dddddddddddddddddddddd01";
|
|
360
|
+
typePath: "Tools|";
|
|
361
|
+
homeLocationPath: "Eastern|Sydneyside|";
|
|
362
|
+
state: {
|
|
363
|
+
locationName: "Eastern|Sydneyside|";
|
|
364
|
+
locationStatus: string;
|
|
365
|
+
};
|
|
366
|
+
fieldValues: {
|
|
367
|
+
valueString?: string | null | undefined;
|
|
368
|
+
valueBoolean?: boolean | undefined;
|
|
369
|
+
valueDecimal?: number | undefined;
|
|
370
|
+
_id: string;
|
|
371
|
+
name: string;
|
|
372
|
+
}[];
|
|
373
|
+
};
|
|
374
|
+
readonly SYDNEY_VEHICLE: {
|
|
375
|
+
_id: string;
|
|
376
|
+
name: string;
|
|
377
|
+
typeId: "dddddddddddddddddddddd04";
|
|
378
|
+
typePath: "Vehicles|";
|
|
379
|
+
homeLocationPath: "Eastern|Sydney|";
|
|
380
|
+
fieldValues: {
|
|
381
|
+
valueString?: string | null | undefined;
|
|
382
|
+
valueBoolean?: boolean | undefined;
|
|
383
|
+
valueDecimal?: number | undefined;
|
|
384
|
+
_id: string;
|
|
385
|
+
name: string;
|
|
386
|
+
}[];
|
|
387
|
+
};
|
|
388
|
+
readonly PERTH_OPS_TOOL: {
|
|
389
|
+
_id: string;
|
|
390
|
+
name: string;
|
|
391
|
+
typeId: "dddddddddddddddddddddd01";
|
|
392
|
+
typePath: "Tools|";
|
|
393
|
+
homeLocationPath: "Western|Perth|";
|
|
394
|
+
state: {
|
|
395
|
+
locationName: "Western|Perth|";
|
|
396
|
+
locationStatus: string;
|
|
397
|
+
};
|
|
398
|
+
fieldValues: {
|
|
399
|
+
valueString?: string | null | undefined;
|
|
400
|
+
valueBoolean?: boolean | undefined;
|
|
401
|
+
valueDecimal?: number | undefined;
|
|
402
|
+
_id: string;
|
|
403
|
+
name: string;
|
|
404
|
+
}[];
|
|
405
|
+
};
|
|
406
|
+
readonly ALBURY_OPS_TROLLEY: {
|
|
407
|
+
_id: string;
|
|
408
|
+
name: string;
|
|
409
|
+
typeId: "dddddddddddddddddddddd03";
|
|
410
|
+
typePath: "Trolleys|";
|
|
411
|
+
homeLocationPath: "Eastern|Albury|";
|
|
412
|
+
fieldValues: {
|
|
413
|
+
valueString?: string | null | undefined;
|
|
414
|
+
valueBoolean?: boolean | undefined;
|
|
415
|
+
valueDecimal?: number | undefined;
|
|
416
|
+
_id: string;
|
|
417
|
+
name: string;
|
|
418
|
+
}[];
|
|
419
|
+
};
|
|
420
|
+
readonly DUBBO_LOGISTICS_POWER_TOOL: {
|
|
421
|
+
_id: string;
|
|
422
|
+
name: string;
|
|
423
|
+
typeId: "dddddddddddddddddddddd02";
|
|
424
|
+
typePath: "Tools|Power tools|";
|
|
425
|
+
homeLocationPath: "Eastern|Dubbo|";
|
|
426
|
+
fieldValues: {
|
|
427
|
+
valueString?: string | null | undefined;
|
|
428
|
+
valueBoolean?: boolean | undefined;
|
|
429
|
+
valueDecimal?: number | undefined;
|
|
430
|
+
_id: string;
|
|
431
|
+
name: string;
|
|
432
|
+
}[];
|
|
433
|
+
};
|
|
434
|
+
readonly ALBURY_NULL_TOOL: {
|
|
435
|
+
_id: string;
|
|
436
|
+
name: string;
|
|
437
|
+
typeId: "dddddddddddddddddddddd01";
|
|
438
|
+
typePath: "Tools|";
|
|
439
|
+
homeLocationPath: "Eastern|Albury|";
|
|
440
|
+
state: {
|
|
441
|
+
locationName: "Eastern|Albury|";
|
|
442
|
+
locationStatus: string;
|
|
443
|
+
};
|
|
444
|
+
fieldValues: {
|
|
445
|
+
valueString?: string | null | undefined;
|
|
446
|
+
valueBoolean?: boolean | undefined;
|
|
447
|
+
valueDecimal?: number | undefined;
|
|
448
|
+
_id: string;
|
|
449
|
+
name: string;
|
|
450
|
+
}[];
|
|
451
|
+
};
|
|
452
|
+
};
|
|
453
|
+
export declare type RuleAssetKey = keyof typeof RULE_ASSETS;
|
|
454
|
+
export declare const RULE_CORPUS: ({
|
|
455
|
+
_id: string;
|
|
456
|
+
name: string;
|
|
457
|
+
typeId: "dddddddddddddddddddddd01";
|
|
458
|
+
typePath: "Tools|";
|
|
459
|
+
homeLocationPath: "Eastern|Sydney|";
|
|
460
|
+
state: {
|
|
461
|
+
locationName: "Eastern|Sydney|Bay 1|";
|
|
462
|
+
locationStatus: string;
|
|
463
|
+
};
|
|
464
|
+
fieldValues: {
|
|
465
|
+
valueString?: string | null | undefined;
|
|
466
|
+
valueBoolean?: boolean | undefined;
|
|
467
|
+
valueDecimal?: number | undefined;
|
|
468
|
+
_id: string;
|
|
469
|
+
name: string;
|
|
470
|
+
}[];
|
|
471
|
+
} | {
|
|
472
|
+
_id: string;
|
|
473
|
+
name: string;
|
|
474
|
+
typeId: "dddddddddddddddddddddd03";
|
|
475
|
+
typePath: "Trolleys|";
|
|
476
|
+
homeLocationPath: "Eastern|Dubbo|";
|
|
477
|
+
state: {
|
|
478
|
+
locationName: "Eastern|Dubbo|";
|
|
479
|
+
locationStatus: string;
|
|
480
|
+
};
|
|
481
|
+
fieldValues: {
|
|
482
|
+
valueString?: string | null | undefined;
|
|
483
|
+
valueBoolean?: boolean | undefined;
|
|
484
|
+
valueDecimal?: number | undefined;
|
|
485
|
+
_id: string;
|
|
486
|
+
name: string;
|
|
487
|
+
}[];
|
|
488
|
+
} | {
|
|
489
|
+
_id: string;
|
|
490
|
+
name: string;
|
|
491
|
+
typeId: "dddddddddddddddddddddd01";
|
|
492
|
+
typePath: "Tools|";
|
|
493
|
+
homeLocationPath: "Eastern|Dubbo|";
|
|
494
|
+
state: {
|
|
495
|
+
locationName: "Eastern|Sydney|";
|
|
496
|
+
locationStatus: string;
|
|
497
|
+
};
|
|
498
|
+
fieldValues: {
|
|
499
|
+
valueString?: string | null | undefined;
|
|
500
|
+
valueBoolean?: boolean | undefined;
|
|
501
|
+
valueDecimal?: number | undefined;
|
|
502
|
+
_id: string;
|
|
503
|
+
name: string;
|
|
504
|
+
}[];
|
|
505
|
+
} | {
|
|
506
|
+
_id: string;
|
|
507
|
+
name: string;
|
|
508
|
+
typeId: "dddddddddddddddddddddd02";
|
|
509
|
+
typePath: "Tools|Power tools|";
|
|
510
|
+
homeLocationPath: "Eastern|Albury|";
|
|
511
|
+
fieldValues: {
|
|
512
|
+
valueString?: string | null | undefined;
|
|
513
|
+
valueBoolean?: boolean | undefined;
|
|
514
|
+
valueDecimal?: number | undefined;
|
|
515
|
+
_id: string;
|
|
516
|
+
name: string;
|
|
517
|
+
}[];
|
|
518
|
+
} | {
|
|
519
|
+
_id: string;
|
|
520
|
+
name: string;
|
|
521
|
+
typeId: "dddddddddddddddddddddd03";
|
|
522
|
+
typePath: "Trolleys|";
|
|
523
|
+
homeLocationPath: "Western|Perth|";
|
|
524
|
+
fieldValues: never[];
|
|
525
|
+
} | {
|
|
526
|
+
_id: string;
|
|
527
|
+
name: string;
|
|
528
|
+
typeId: "dddddddddddddddddddddd01";
|
|
529
|
+
typePath: "Tools|";
|
|
530
|
+
homeLocationPath: "Eastern|Sydneyside|";
|
|
531
|
+
state: {
|
|
532
|
+
locationName: "Eastern|Sydneyside|";
|
|
533
|
+
locationStatus: string;
|
|
534
|
+
};
|
|
535
|
+
fieldValues: {
|
|
536
|
+
valueString?: string | null | undefined;
|
|
537
|
+
valueBoolean?: boolean | undefined;
|
|
538
|
+
valueDecimal?: number | undefined;
|
|
539
|
+
_id: string;
|
|
540
|
+
name: string;
|
|
541
|
+
}[];
|
|
542
|
+
} | {
|
|
543
|
+
_id: string;
|
|
544
|
+
name: string;
|
|
545
|
+
typeId: "dddddddddddddddddddddd04";
|
|
546
|
+
typePath: "Vehicles|";
|
|
547
|
+
homeLocationPath: "Eastern|Sydney|";
|
|
548
|
+
fieldValues: {
|
|
549
|
+
valueString?: string | null | undefined;
|
|
550
|
+
valueBoolean?: boolean | undefined;
|
|
551
|
+
valueDecimal?: number | undefined;
|
|
552
|
+
_id: string;
|
|
553
|
+
name: string;
|
|
554
|
+
}[];
|
|
555
|
+
} | {
|
|
556
|
+
_id: string;
|
|
557
|
+
name: string;
|
|
558
|
+
typeId: "dddddddddddddddddddddd01";
|
|
559
|
+
typePath: "Tools|";
|
|
560
|
+
homeLocationPath: "Western|Perth|";
|
|
561
|
+
state: {
|
|
562
|
+
locationName: "Western|Perth|";
|
|
563
|
+
locationStatus: string;
|
|
564
|
+
};
|
|
565
|
+
fieldValues: {
|
|
566
|
+
valueString?: string | null | undefined;
|
|
567
|
+
valueBoolean?: boolean | undefined;
|
|
568
|
+
valueDecimal?: number | undefined;
|
|
569
|
+
_id: string;
|
|
570
|
+
name: string;
|
|
571
|
+
}[];
|
|
572
|
+
} | {
|
|
573
|
+
_id: string;
|
|
574
|
+
name: string;
|
|
575
|
+
typeId: "dddddddddddddddddddddd03";
|
|
576
|
+
typePath: "Trolleys|";
|
|
577
|
+
homeLocationPath: "Eastern|Albury|";
|
|
578
|
+
fieldValues: {
|
|
579
|
+
valueString?: string | null | undefined;
|
|
580
|
+
valueBoolean?: boolean | undefined;
|
|
581
|
+
valueDecimal?: number | undefined;
|
|
582
|
+
_id: string;
|
|
583
|
+
name: string;
|
|
584
|
+
}[];
|
|
585
|
+
} | {
|
|
586
|
+
_id: string;
|
|
587
|
+
name: string;
|
|
588
|
+
typeId: "dddddddddddddddddddddd02";
|
|
589
|
+
typePath: "Tools|Power tools|";
|
|
590
|
+
homeLocationPath: "Eastern|Dubbo|";
|
|
591
|
+
fieldValues: {
|
|
592
|
+
valueString?: string | null | undefined;
|
|
593
|
+
valueBoolean?: boolean | undefined;
|
|
594
|
+
valueDecimal?: number | undefined;
|
|
595
|
+
_id: string;
|
|
596
|
+
name: string;
|
|
597
|
+
}[];
|
|
598
|
+
} | {
|
|
599
|
+
_id: string;
|
|
600
|
+
name: string;
|
|
601
|
+
typeId: "dddddddddddddddddddddd01";
|
|
602
|
+
typePath: "Tools|";
|
|
603
|
+
homeLocationPath: "Eastern|Albury|";
|
|
604
|
+
state: {
|
|
605
|
+
locationName: "Eastern|Albury|";
|
|
606
|
+
locationStatus: string;
|
|
607
|
+
};
|
|
608
|
+
fieldValues: {
|
|
609
|
+
valueString?: string | null | undefined;
|
|
610
|
+
valueBoolean?: boolean | undefined;
|
|
611
|
+
valueDecimal?: number | undefined;
|
|
612
|
+
_id: string;
|
|
613
|
+
name: string;
|
|
614
|
+
}[];
|
|
615
|
+
})[];
|
|
616
|
+
declare const definedCallers: {
|
|
617
|
+
/** The appendix user: a member of all three appendix groups. */
|
|
618
|
+
ALL_THREE: {
|
|
619
|
+
groups: AccessGroup[];
|
|
620
|
+
};
|
|
621
|
+
OPERATIONS_ONLY: {
|
|
622
|
+
groups: AccessGroup[];
|
|
623
|
+
};
|
|
624
|
+
SERIAL_ONLY: {
|
|
625
|
+
groups: AccessGroup[];
|
|
626
|
+
};
|
|
627
|
+
TOOL_EDITORS_ONLY: {
|
|
628
|
+
groups: AccessGroup[];
|
|
629
|
+
};
|
|
630
|
+
NO_GROUP: {
|
|
631
|
+
groups: never[];
|
|
632
|
+
};
|
|
633
|
+
BOOTSTRAP_ONLY: {
|
|
634
|
+
groups: AccessGroup[];
|
|
635
|
+
};
|
|
636
|
+
/** An Admin: the field and action bypasses, confined to Sydney by their one group. */
|
|
637
|
+
ADMIN: {
|
|
638
|
+
fieldsAdmin: boolean;
|
|
639
|
+
actionsAdmin: boolean;
|
|
640
|
+
groups: AccessGroup[];
|
|
641
|
+
};
|
|
642
|
+
/** A System Admin: exempt from asset rules, with both bypasses, in no group. */
|
|
643
|
+
SYSTEM_ADMIN: {
|
|
644
|
+
exempt: boolean;
|
|
645
|
+
fieldsAdmin: boolean;
|
|
646
|
+
actionsAdmin: boolean;
|
|
647
|
+
groups: never[];
|
|
648
|
+
};
|
|
649
|
+
/** Exempt without the bypasses: every asset, but only the fields and actions the groups grant. */
|
|
650
|
+
EXEMPT_ONLY: {
|
|
651
|
+
exempt: boolean;
|
|
652
|
+
groups: AccessGroup[];
|
|
653
|
+
};
|
|
654
|
+
/** An API-key request: open on every axis, whatever its user record holds. */
|
|
655
|
+
API_KEY: {
|
|
656
|
+
open: boolean;
|
|
657
|
+
groups: AccessGroup[];
|
|
658
|
+
};
|
|
659
|
+
LAYOUT_ONLY: {
|
|
660
|
+
groups: AccessGroup[];
|
|
661
|
+
};
|
|
662
|
+
DANGLING_ONLY: {
|
|
663
|
+
groups: AccessGroup[];
|
|
664
|
+
};
|
|
665
|
+
};
|
|
666
|
+
export declare type RuleCallerKey = keyof typeof definedCallers;
|
|
667
|
+
export declare const RULE_CALLERS: Record<RuleCallerKey, AccessCaller>;
|
|
668
|
+
/** Frozen clock, as the language corpus has: nothing here is date-sensitive, but the evaluator takes one. */
|
|
669
|
+
export declare const RULE_OPTS: {
|
|
670
|
+
now: Date;
|
|
671
|
+
timeZone: string;
|
|
672
|
+
};
|
|
673
|
+
export {};
|