@spotto/contract 1.0.70-alpha.2 → 1.0.70-alpha.20
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/README.md +33 -33
- package/dist/actions/[id]/index.d.ts +1 -0
- package/dist/actions/[id]/index.js +18 -0
- package/dist/actions/[id]/index.js.map +1 -0
- package/dist/actions/[id]/patch/index.d.ts +2 -0
- package/dist/actions/[id]/patch/index.js +19 -0
- package/dist/actions/[id]/patch/index.js.map +1 -0
- package/dist/actions/[id]/patch/request.d.ts +16 -0
- package/dist/actions/[id]/patch/request.js +3 -0
- package/dist/actions/[id]/patch/request.js.map +1 -0
- package/dist/actions/[id]/patch/response.d.ts +1 -0
- package/dist/actions/[id]/patch/response.js +3 -0
- package/dist/actions/[id]/patch/response.js.map +1 -0
- package/dist/actions/get/index.d.ts +2 -0
- package/dist/actions/get/index.js +19 -0
- package/dist/actions/get/index.js.map +1 -0
- package/dist/actions/get/query.d.ts +14 -0
- package/dist/actions/get/query.js +3 -0
- package/dist/actions/get/query.js.map +1 -0
- package/dist/actions/get/response.d.ts +29 -0
- package/dist/actions/get/response.js +3 -0
- package/dist/actions/get/response.js.map +1 -0
- package/dist/actions/index.d.ts +4 -0
- package/dist/actions/index.js +21 -0
- package/dist/actions/index.js.map +1 -0
- package/dist/actions/post/index.d.ts +2 -0
- package/dist/actions/post/index.js +19 -0
- package/dist/actions/post/index.js.map +1 -0
- package/dist/actions/post/request.d.ts +15 -0
- package/dist/actions/post/request.js +3 -0
- package/dist/actions/post/request.js.map +1 -0
- package/dist/actions/post/response.d.ts +1 -0
- package/dist/actions/post/response.js +3 -0
- package/dist/actions/post/response.js.map +1 -0
- package/dist/actions/shared.d.ts +51 -0
- package/dist/actions/shared.js +13 -0
- package/dist/actions/shared.js.map +1 -0
- package/dist/ai/chat/index.d.ts +2 -0
- package/dist/ai/chat/index.js +19 -0
- package/dist/ai/chat/index.js.map +1 -0
- package/dist/ai/chat/request.d.ts +27 -0
- package/dist/ai/chat/request.js +3 -0
- package/dist/ai/chat/request.js.map +1 -0
- package/dist/ai/chat/response.d.ts +57 -0
- package/dist/ai/chat/response.js +11 -0
- package/dist/ai/chat/response.js.map +1 -0
- package/dist/ai/expression/index.d.ts +2 -0
- package/dist/ai/expression/index.js +19 -0
- package/dist/ai/expression/index.js.map +1 -0
- package/dist/ai/expression/request.d.ts +29 -0
- package/dist/ai/expression/request.js +3 -0
- package/dist/ai/expression/request.js.map +1 -0
- package/dist/ai/expression/response.d.ts +23 -0
- package/dist/ai/expression/response.js +3 -0
- package/dist/ai/expression/response.js.map +1 -0
- package/dist/ai/index.d.ts +4 -0
- package/dist/ai/index.js +21 -0
- package/dist/ai/index.js.map +1 -0
- package/dist/ai/semantic-query/index.d.ts +2 -0
- package/dist/ai/semantic-query/index.js +19 -0
- package/dist/ai/semantic-query/index.js.map +1 -0
- package/dist/ai/semantic-query/request.d.ts +30 -0
- package/dist/ai/semantic-query/request.js +3 -0
- package/dist/ai/semantic-query/request.js.map +1 -0
- package/dist/ai/semantic-query/response.d.ts +40 -0
- package/dist/ai/semantic-query/response.js +3 -0
- package/dist/ai/semantic-query/response.js.map +1 -0
- package/dist/ai/shared.d.ts +22 -0
- package/dist/ai/shared.js +11 -0
- package/dist/ai/shared.js.map +1 -0
- package/dist/assets/[id]/get.d.ts +9 -1
- package/dist/assets/[id]/patch/request.d.ts +5 -0
- package/dist/assets/count/query.d.ts +16 -1
- package/dist/assets/download/query.d.ts +7 -0
- package/dist/assets/get/query.d.ts +22 -4
- package/dist/assets/post/request.d.ts +2 -0
- package/dist/assets/post/request.js.map +1 -1
- package/dist/events/constants.d.ts +2 -1
- package/dist/events/constants.js +2 -0
- package/dist/events/constants.js.map +1 -1
- package/dist/events/get/response.d.ts +17 -1
- package/dist/fields/[id]/get.d.ts +3 -0
- package/dist/fields/[id]/patch/request.d.ts +4 -0
- package/dist/fields/constants.d.ts +19 -0
- package/dist/fields/constants.js +15 -1
- package/dist/fields/constants.js.map +1 -1
- package/dist/forms/[id]/index.d.ts +1 -0
- package/dist/forms/[id]/index.js +18 -0
- package/dist/forms/[id]/index.js.map +1 -0
- package/dist/forms/[id]/patch/index.d.ts +2 -0
- package/dist/forms/[id]/patch/index.js +19 -0
- package/dist/forms/[id]/patch/index.js.map +1 -0
- package/dist/forms/[id]/patch/request.d.ts +14 -0
- package/dist/forms/[id]/patch/request.js +3 -0
- package/dist/forms/[id]/patch/request.js.map +1 -0
- package/dist/forms/[id]/patch/response.d.ts +1 -0
- package/dist/forms/[id]/patch/response.js +3 -0
- package/dist/forms/[id]/patch/response.js.map +1 -0
- package/dist/forms/constants.d.ts +19 -0
- package/dist/forms/constants.js +33 -0
- package/dist/forms/constants.js.map +1 -0
- package/dist/forms/get/index.d.ts +2 -0
- package/dist/forms/get/index.js +19 -0
- package/dist/forms/get/index.js.map +1 -0
- package/dist/forms/get/query.d.ts +18 -0
- package/dist/forms/get/query.js +3 -0
- package/dist/forms/get/query.js.map +1 -0
- package/dist/forms/get/response.d.ts +23 -0
- package/dist/forms/get/response.js +3 -0
- package/dist/forms/get/response.js.map +1 -0
- package/dist/forms/index.d.ts +6 -0
- package/dist/forms/index.js +23 -0
- package/dist/forms/index.js.map +1 -0
- package/dist/forms/post/index.d.ts +2 -0
- package/dist/forms/post/index.js +19 -0
- package/dist/forms/post/index.js.map +1 -0
- package/dist/forms/post/request.d.ts +9 -0
- package/dist/forms/post/request.js +3 -0
- package/dist/forms/post/request.js.map +1 -0
- package/dist/forms/post/response.d.ts +1 -0
- package/dist/forms/post/response.js +3 -0
- package/dist/forms/post/response.js.map +1 -0
- package/dist/forms/shared.d.ts +127 -0
- package/dist/forms/shared.js +3 -0
- package/dist/forms/shared.js.map +1 -0
- package/dist/forms/versions/index.d.ts +2 -0
- package/dist/forms/versions/index.js +19 -0
- package/dist/forms/versions/index.js.map +1 -0
- package/dist/forms/versions/path.d.ts +8 -0
- package/dist/forms/versions/path.js +3 -0
- package/dist/forms/versions/path.js.map +1 -0
- package/dist/forms/versions/response.d.ts +1 -0
- package/dist/forms/versions/response.js +3 -0
- package/dist/forms/versions/response.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/integrations/oneblink/patch/request.d.ts +2 -2
- package/dist/integrations/oneblink/token.d.ts +2 -0
- package/dist/locations/get/query.d.ts +14 -0
- package/dist/organisations/constants.d.ts +11 -0
- package/dist/organisations/sso/constants.d.ts +15 -0
- package/dist/organisations/sso/constants.js +16 -1
- package/dist/organisations/sso/constants.js.map +1 -1
- package/dist/organisations/sso/types.d.ts +48 -0
- package/dist/semantic-queries/[id]/index.d.ts +1 -0
- package/dist/semantic-queries/[id]/index.js +18 -0
- package/dist/semantic-queries/[id]/index.js.map +1 -0
- package/dist/semantic-queries/[id]/patch/index.d.ts +2 -0
- package/dist/semantic-queries/[id]/patch/index.js +19 -0
- package/dist/semantic-queries/[id]/patch/index.js.map +1 -0
- package/dist/semantic-queries/[id]/patch/request.d.ts +20 -0
- package/dist/semantic-queries/[id]/patch/request.js +3 -0
- package/dist/semantic-queries/[id]/patch/request.js.map +1 -0
- package/dist/semantic-queries/[id]/patch/response.d.ts +1 -0
- package/dist/semantic-queries/[id]/patch/response.js +3 -0
- package/dist/semantic-queries/[id]/patch/response.js.map +1 -0
- package/dist/semantic-queries/get/index.d.ts +2 -0
- package/dist/semantic-queries/get/index.js +19 -0
- package/dist/semantic-queries/get/index.js.map +1 -0
- package/dist/semantic-queries/get/query.d.ts +18 -0
- package/dist/semantic-queries/get/query.js +3 -0
- package/dist/semantic-queries/get/query.js.map +1 -0
- package/dist/semantic-queries/get/response.d.ts +40 -0
- package/dist/semantic-queries/get/response.js +3 -0
- package/dist/semantic-queries/get/response.js.map +1 -0
- package/dist/semantic-queries/index.d.ts +4 -0
- package/dist/semantic-queries/index.js +21 -0
- package/dist/semantic-queries/index.js.map +1 -0
- package/dist/semantic-queries/post/index.d.ts +2 -0
- package/dist/semantic-queries/post/index.js +19 -0
- package/dist/semantic-queries/post/index.js.map +1 -0
- package/dist/semantic-queries/post/request.d.ts +56 -0
- package/dist/semantic-queries/post/request.js +3 -0
- package/dist/semantic-queries/post/request.js.map +1 -0
- package/dist/semantic-queries/post/response.d.ts +1 -0
- package/dist/semantic-queries/post/response.js +3 -0
- package/dist/semantic-queries/post/response.js.map +1 -0
- package/dist/semantic-queries/shared.d.ts +496 -0
- package/dist/semantic-queries/shared.js +224 -0
- package/dist/semantic-queries/shared.js.map +1 -0
- package/dist/shared/attachments.d.ts +29 -0
- package/dist/shared/attachments.js +11 -0
- package/dist/shared/attachments.js.map +1 -0
- package/dist/shared/embed.d.ts +14 -0
- package/dist/shared/index.d.ts +2 -0
- package/dist/shared/index.js +2 -0
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/readiness.d.ts +81 -0
- package/dist/shared/readiness.js +11 -0
- package/dist/shared/readiness.js.map +1 -0
- package/dist/sso/onboard/request.d.ts +12 -1
- package/dist/sso/sso-mappings/request.d.ts +10 -5
- package/dist/submissions/[id]/index.d.ts +1 -0
- package/dist/submissions/[id]/index.js +18 -0
- package/dist/submissions/[id]/index.js.map +1 -0
- package/dist/submissions/[id]/void/post.d.ts +6 -0
- package/dist/submissions/[id]/void/post.js +3 -0
- package/dist/submissions/[id]/void/post.js.map +1 -0
- package/dist/submissions/constants.d.ts +14 -0
- package/dist/submissions/constants.js +21 -0
- package/dist/submissions/constants.js.map +1 -0
- package/dist/submissions/get/index.d.ts +2 -0
- package/dist/submissions/get/index.js +19 -0
- package/dist/submissions/get/index.js.map +1 -0
- package/dist/submissions/get/query.d.ts +14 -0
- package/dist/submissions/get/query.js +3 -0
- package/dist/submissions/get/query.js.map +1 -0
- package/dist/submissions/get/response.d.ts +6 -0
- package/dist/submissions/get/response.js +3 -0
- package/dist/submissions/get/response.js.map +1 -0
- package/dist/submissions/index.d.ts +6 -0
- package/dist/submissions/index.js +23 -0
- package/dist/submissions/index.js.map +1 -0
- package/dist/submissions/post/index.d.ts +2 -0
- package/dist/submissions/post/index.js +19 -0
- package/dist/submissions/post/index.js.map +1 -0
- package/dist/submissions/post/request.d.ts +17 -0
- package/dist/submissions/post/request.js +3 -0
- package/dist/submissions/post/request.js.map +1 -0
- package/dist/submissions/post/response.d.ts +22 -0
- package/dist/submissions/post/response.js +3 -0
- package/dist/submissions/post/response.js.map +1 -0
- package/dist/submissions/shared.d.ts +133 -0
- package/dist/submissions/shared.js +3 -0
- package/dist/submissions/shared.js.map +1 -0
- package/dist/submissions/uploads/[fileId]/get.d.ts +11 -0
- package/dist/submissions/uploads/[fileId]/get.js +3 -0
- package/dist/submissions/uploads/[fileId]/get.js.map +1 -0
- package/dist/submissions/uploads/[fileId]/index.d.ts +1 -0
- package/dist/submissions/uploads/[fileId]/index.js +18 -0
- package/dist/submissions/uploads/[fileId]/index.js.map +1 -0
- package/dist/submissions/uploads/index.d.ts +2 -0
- package/dist/submissions/uploads/index.js +19 -0
- package/dist/submissions/uploads/index.js.map +1 -0
- package/dist/submissions/uploads/post/index.d.ts +2 -0
- package/dist/submissions/uploads/post/index.js +19 -0
- package/dist/submissions/uploads/post/index.js.map +1 -0
- package/dist/submissions/uploads/post/request.d.ts +9 -0
- package/dist/submissions/uploads/post/request.js +3 -0
- package/dist/submissions/uploads/post/request.js.map +1 -0
- package/dist/submissions/uploads/post/response.d.ts +18 -0
- package/dist/submissions/uploads/post/response.js +3 -0
- package/dist/submissions/uploads/post/response.js.map +1 -0
- package/dist/types/[id]/get.d.ts +17 -2
- package/dist/types/[id]/patch/request.d.ts +16 -2
- package/dist/types/post/request.d.ts +16 -2
- package/dist/types/post/request.js.map +1 -1
- package/dist/usergroups/[id]/index.d.ts +1 -0
- package/dist/usergroups/[id]/index.js +18 -0
- package/dist/usergroups/[id]/index.js.map +1 -0
- package/dist/usergroups/[id]/patch/index.d.ts +2 -0
- package/dist/usergroups/[id]/patch/index.js +19 -0
- package/dist/usergroups/[id]/patch/index.js.map +1 -0
- package/dist/usergroups/[id]/patch/request.d.ts +12 -0
- package/dist/usergroups/[id]/patch/request.js +3 -0
- package/dist/usergroups/[id]/patch/request.js.map +1 -0
- package/dist/usergroups/[id]/patch/response.d.ts +1 -0
- package/dist/usergroups/[id]/patch/response.js +3 -0
- package/dist/usergroups/[id]/patch/response.js.map +1 -0
- package/dist/usergroups/get/index.d.ts +2 -0
- package/dist/usergroups/get/index.js +19 -0
- package/dist/usergroups/get/index.js.map +1 -0
- package/dist/usergroups/get/query.d.ts +12 -0
- package/dist/usergroups/get/query.js +3 -0
- package/dist/usergroups/get/query.js.map +1 -0
- package/dist/usergroups/get/response.d.ts +35 -0
- package/dist/usergroups/get/response.js +3 -0
- package/dist/usergroups/get/response.js.map +1 -0
- package/dist/usergroups/index.d.ts +4 -0
- package/dist/usergroups/index.js +21 -0
- package/dist/usergroups/index.js.map +1 -0
- package/dist/usergroups/post/index.d.ts +2 -0
- package/dist/usergroups/post/index.js +19 -0
- package/dist/usergroups/post/index.js.map +1 -0
- package/dist/usergroups/post/request.d.ts +11 -0
- package/dist/usergroups/post/request.js +3 -0
- package/dist/usergroups/post/request.js.map +1 -0
- package/dist/usergroups/post/response.d.ts +1 -0
- package/dist/usergroups/post/response.js +3 -0
- package/dist/usergroups/post/response.js.map +1 -0
- package/dist/usergroups/shared.d.ts +25 -0
- package/dist/usergroups/shared.js +11 -0
- package/dist/usergroups/shared.js.map +1 -0
- package/dist/users/[id]/get/response.d.ts +0 -2
- package/dist/users/[id]/patch/request.d.ts +5 -1
- package/dist/users/current.d.ts +29 -4
- package/dist/users/get/query.d.ts +0 -2
- package/dist/users/home-layout/index.d.ts +3 -0
- package/dist/users/home-layout/index.js +20 -0
- package/dist/users/home-layout/index.js.map +1 -0
- package/dist/users/home-layout/request.d.ts +5 -0
- package/dist/users/home-layout/request.js +3 -0
- package/dist/users/home-layout/request.js.map +1 -0
- package/dist/users/home-layout/response.d.ts +5 -0
- package/dist/users/home-layout/response.js +3 -0
- package/dist/users/home-layout/response.js.map +1 -0
- package/dist/users/home-layout/shared.d.ts +98 -0
- package/dist/users/home-layout/shared.js +21 -0
- package/dist/users/home-layout/shared.js.map +1 -0
- package/dist/users/index.d.ts +1 -0
- package/dist/users/index.js +1 -0
- package/dist/users/index.js.map +1 -1
- package/dist/users/post/request.d.ts +6 -1
- package/package.json +2 -2
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.semanticQueryViewTypes = exports.SEMANTIC_QUERY_VERSION = exports.SEMANTIC_QUERY_LIMITS = exports.semanticConditionTypes = exports.semanticConditionTypesByEntity = exports.semanticLocationConditionTypes = exports.semanticAssetConditionTypes = exports.semanticGroupConditionTypes = exports.semanticReadinessLevels = exports.semanticTelemetryFields = exports.semanticSetOperators = exports.semanticComparisonOperators = exports.semanticTimestampOperators = exports.semanticFieldOperators = exports.semanticRelativeDatePositions = exports.semanticRelativeDateBases = exports.semanticQueryVisibilities = exports.semanticQueryKinds = exports.semanticQueryEntityTypes = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* SEMANTIC QUERIES — the portable query language.
|
|
6
|
+
*
|
|
7
|
+
* A semantic query is a JSON list of typed conditions (ANDed together, nestable
|
|
8
|
+
* with and/or groups) over one entity type. Three parties speak this contract —
|
|
9
|
+
* the client filter UI that builds conditions, the LLM that generates them, and
|
|
10
|
+
* the server compiler that executes them — so this file is the single
|
|
11
|
+
* vocabulary all three encode.
|
|
12
|
+
*
|
|
13
|
+
* THE CLOSED-VOCABULARY RULE. Condition types, operators AND property names are
|
|
14
|
+
* closed sets: validation rejects an unknown property rather than ignoring it,
|
|
15
|
+
* at every level. This is not defensive tidiness — an LLM once invented a
|
|
16
|
+
* `"negate": true` property; ignoring it compiled NOT(X) as X, a query that ran
|
|
17
|
+
* successfully and returned exactly the complement of what was asked. Every
|
|
18
|
+
* defect class this design guards against fails SILENTLY (valid query, wrong
|
|
19
|
+
* rows), which is why an honest rejection always beats a plausible guess.
|
|
20
|
+
*
|
|
21
|
+
* There is deliberately NO general negation (no `not` group, no invertible
|
|
22
|
+
* flag). Expressible negatively: `notExists`, `ne`, `geolocation.exists:false`,
|
|
23
|
+
* `kit.isMember:false`. Anything else must surface as a validation issue,
|
|
24
|
+
* never an approximation.
|
|
25
|
+
*
|
|
26
|
+
* Descends from the G2G Chat prototype (see g2g-client
|
|
27
|
+
* `docs/semantic-query-decisions.md` while it lives, folding into
|
|
28
|
+
* TECHNICAL_DECISIONS.md) and the semantic-query specification errata.
|
|
29
|
+
*/
|
|
30
|
+
// --- Entity + record kind -------------------------------------------------
|
|
31
|
+
/**
|
|
32
|
+
* What a semantic query targets. Only `asset` executes today; recorded on
|
|
33
|
+
* every stored query from day one so saved records never need retrofitting.
|
|
34
|
+
*/
|
|
35
|
+
exports.semanticQueryEntityTypes = [
|
|
36
|
+
'asset',
|
|
37
|
+
'location',
|
|
38
|
+
'event',
|
|
39
|
+
'reader',
|
|
40
|
+
'snapshot',
|
|
41
|
+
'manifest',
|
|
42
|
+
];
|
|
43
|
+
/**
|
|
44
|
+
* What a stored record IS, as opposed to what it targets.
|
|
45
|
+
* - `query` — a selector. Executing it returns rows.
|
|
46
|
+
* - `operation` — a selector PLUS verbs ("move everything matching this to
|
|
47
|
+
* Southport"). Only the DEFINITION is stored; execution belongs
|
|
48
|
+
* to the bulk-operations API when it exists.
|
|
49
|
+
*/
|
|
50
|
+
exports.semanticQueryKinds = ['query', 'operation'];
|
|
51
|
+
exports.semanticQueryVisibilities = ['private', 'organisation'];
|
|
52
|
+
// --- Relative dates -------------------------------------------------------
|
|
53
|
+
exports.semanticRelativeDateBases = [
|
|
54
|
+
'day',
|
|
55
|
+
'week',
|
|
56
|
+
'month',
|
|
57
|
+
'quarter',
|
|
58
|
+
'year',
|
|
59
|
+
];
|
|
60
|
+
exports.semanticRelativeDatePositions = ['start', 'end', 'same'];
|
|
61
|
+
// --- Operators ------------------------------------------------------------
|
|
62
|
+
exports.semanticFieldOperators = [
|
|
63
|
+
'eq',
|
|
64
|
+
'ne',
|
|
65
|
+
'gt',
|
|
66
|
+
'gte',
|
|
67
|
+
'lt',
|
|
68
|
+
'lte',
|
|
69
|
+
'contains',
|
|
70
|
+
'exists',
|
|
71
|
+
'notExists',
|
|
72
|
+
];
|
|
73
|
+
exports.semanticTimestampOperators = ['gt', 'gte', 'lt', 'lte'];
|
|
74
|
+
exports.semanticComparisonOperators = [
|
|
75
|
+
'eq',
|
|
76
|
+
'ne',
|
|
77
|
+
'gt',
|
|
78
|
+
'gte',
|
|
79
|
+
'lt',
|
|
80
|
+
'lte',
|
|
81
|
+
];
|
|
82
|
+
exports.semanticSetOperators = ['any', 'all'];
|
|
83
|
+
exports.semanticTelemetryFields = [
|
|
84
|
+
'battery',
|
|
85
|
+
'temperature',
|
|
86
|
+
'voltage',
|
|
87
|
+
];
|
|
88
|
+
/** Readiness severity scale (contract shared/readiness.ts): 0 green, 1 amber, 2 red. */
|
|
89
|
+
exports.semanticReadinessLevels = [0, 1, 2];
|
|
90
|
+
/**
|
|
91
|
+
* Grouping — valid in every entity's vocabulary, because nesting is structure
|
|
92
|
+
* rather than subject matter.
|
|
93
|
+
*/
|
|
94
|
+
exports.semanticGroupConditionTypes = ['and', 'or'];
|
|
95
|
+
/**
|
|
96
|
+
* The ASSET vocabulary. Over a third of it is asset-only by nature —
|
|
97
|
+
* `readiness`, `kit`, `withAsset`, `telemetry`, `locationStatus` mean nothing
|
|
98
|
+
* for a reader or a snapshot.
|
|
99
|
+
*/
|
|
100
|
+
exports.semanticAssetConditionTypes = [
|
|
101
|
+
...exports.semanticGroupConditionTypes,
|
|
102
|
+
'assetType',
|
|
103
|
+
'location',
|
|
104
|
+
'homeLocation',
|
|
105
|
+
'withAsset',
|
|
106
|
+
'customField',
|
|
107
|
+
'createdDate',
|
|
108
|
+
'lastUpdated',
|
|
109
|
+
'lastChanged',
|
|
110
|
+
'lastSeen',
|
|
111
|
+
'firstSeen',
|
|
112
|
+
'geolocation',
|
|
113
|
+
'tags',
|
|
114
|
+
'telemetry',
|
|
115
|
+
'readiness',
|
|
116
|
+
'kit',
|
|
117
|
+
'locationStatus',
|
|
118
|
+
];
|
|
119
|
+
/**
|
|
120
|
+
* The LOCATION vocabulary.
|
|
121
|
+
*
|
|
122
|
+
* Where a fact is genuinely the same as an asset's, it keeps the same word AND
|
|
123
|
+
* the same meaning — `tags`, `createdDate`, `lastUpdated`, `lastChanged`. That
|
|
124
|
+
* is the naming rule working: one fact stored the same way, sharing one
|
|
125
|
+
* emitter, not two coincidences that agree today.
|
|
126
|
+
*
|
|
127
|
+
* `geolocation` is the exception that proves it needs care. The word means the
|
|
128
|
+
* same thing — "has map coordinates" — but a location has TWO: the coordinates
|
|
129
|
+
* it was configured with, and the ones a moving location last reported
|
|
130
|
+
* (`state.geolocation`, which is what the asset condition reads). This
|
|
131
|
+
* condition means the CONFIGURED position; the observed one belongs to a
|
|
132
|
+
* separate condition if it is ever wanted, rather than being silently folded
|
|
133
|
+
* in here.
|
|
134
|
+
*
|
|
135
|
+
* DELIBERATELY ABSENT: `lastSeen`, `firstSeen` and `telemetry`. The location
|
|
136
|
+
* document declares all three and the parser exposes them, so they were easy
|
|
137
|
+
* to add — but nothing in this repo writes them (the reader/MQTT ingestion
|
|
138
|
+
* does, if anything does), no legacy filter or prototype condition ever
|
|
139
|
+
* offered them, and they could only ever apply to MOVING locations carrying a
|
|
140
|
+
* tracker. A condition over a field that may never be populated is one that
|
|
141
|
+
* runs and confidently returns nothing. They come back the day the ingestion
|
|
142
|
+
* is confirmed to populate them — the emitters are already shared, so it is a
|
|
143
|
+
* list entry and two switch arms.
|
|
144
|
+
*
|
|
145
|
+
* Also absent, and for a different reason: free text. There is no
|
|
146
|
+
* `nameContains` (the prototype had one) because search is a view option
|
|
147
|
+
* platform-wide, not a condition.
|
|
148
|
+
*/
|
|
149
|
+
exports.semanticLocationConditionTypes = [
|
|
150
|
+
...exports.semanticGroupConditionTypes,
|
|
151
|
+
'path',
|
|
152
|
+
'locationType',
|
|
153
|
+
'hasReaders',
|
|
154
|
+
'geofence',
|
|
155
|
+
'manifest',
|
|
156
|
+
'tags',
|
|
157
|
+
'geolocation',
|
|
158
|
+
'createdDate',
|
|
159
|
+
'lastUpdated',
|
|
160
|
+
'lastChanged',
|
|
161
|
+
];
|
|
162
|
+
/**
|
|
163
|
+
* WHICH WORDS EACH ENTITY KNOWS — the closed vocabulary, per entity.
|
|
164
|
+
*
|
|
165
|
+
* The rule only has teeth if "unknown" is decidable for the entity being
|
|
166
|
+
* queried. In one flat list `{type:'readiness'}` on a location query is a
|
|
167
|
+
* VALID word, so rejecting it would demote to a hand-maintained compatibility
|
|
168
|
+
* table — a second gate that can drift from the first, which is the
|
|
169
|
+
* runs-cleanly-returns-wrong-rows failure this design exists to prevent.
|
|
170
|
+
*
|
|
171
|
+
* It also scopes what the generator is shown: composing a location query, the
|
|
172
|
+
* model never sees `readiness` at all. The prototype's prompt listed
|
|
173
|
+
* conditions it could not supply and the model duly emitted them (finding 12);
|
|
174
|
+
* a shared vocabulary hands that failure to every entity at once.
|
|
175
|
+
*
|
|
176
|
+
* An entity with an EMPTY vocabulary is one the language does not speak yet —
|
|
177
|
+
* every condition is rejected, which is the honest answer while only assets
|
|
178
|
+
* execute. Entities are listed from day one so a stored record never needs
|
|
179
|
+
* retrofitting.
|
|
180
|
+
*
|
|
181
|
+
* Where a concept genuinely coincides across entities it keeps the SAME word
|
|
182
|
+
* (`createdDate` is the same fact everywhere). A domain word is only earned
|
|
183
|
+
* where the meaning differs.
|
|
184
|
+
*/
|
|
185
|
+
exports.semanticConditionTypesByEntity = {
|
|
186
|
+
asset: exports.semanticAssetConditionTypes,
|
|
187
|
+
location: exports.semanticLocationConditionTypes,
|
|
188
|
+
event: [],
|
|
189
|
+
reader: [],
|
|
190
|
+
snapshot: [],
|
|
191
|
+
manifest: [],
|
|
192
|
+
};
|
|
193
|
+
/**
|
|
194
|
+
* Every condition type the language knows, across all entities.
|
|
195
|
+
*
|
|
196
|
+
* This is the BOUNDARY's list — the wire schema checks that a condition names
|
|
197
|
+
* a real word at all, and leaves which-entity-may-use-it to the shared
|
|
198
|
+
* validator, which knows the entity and can say "'readiness' is an asset
|
|
199
|
+
* condition" instead of "not allowed".
|
|
200
|
+
*/
|
|
201
|
+
exports.semanticConditionTypes = [
|
|
202
|
+
...new Set([
|
|
203
|
+
...exports.semanticAssetConditionTypes,
|
|
204
|
+
...exports.semanticLocationConditionTypes,
|
|
205
|
+
]),
|
|
206
|
+
];
|
|
207
|
+
/**
|
|
208
|
+
* Query size bounds, shared by the boundary schema (which refuses an oversized
|
|
209
|
+
* query before parsing it) and the compiler (which counts every branch as it
|
|
210
|
+
* walks). Both halves are load-bearing: without the compiler's counting a
|
|
211
|
+
* single `or` could carry thousands of arms, and without the boundary's cap
|
|
212
|
+
* the parse itself is the cost.
|
|
213
|
+
*/
|
|
214
|
+
exports.SEMANTIC_QUERY_LIMITS = {
|
|
215
|
+
maxConditions: 50,
|
|
216
|
+
maxDepth: 5,
|
|
217
|
+
};
|
|
218
|
+
// --- The envelope ---------------------------------------------------------
|
|
219
|
+
/** Current wire version of the condition vocabulary. */
|
|
220
|
+
exports.SEMANTIC_QUERY_VERSION = 2;
|
|
221
|
+
// --- Stored-record display config -----------------------------------------
|
|
222
|
+
/** Which rendering of the asset list a saved query opens in. */
|
|
223
|
+
exports.semanticQueryViewTypes = ['table', 'map', 'tree'];
|
|
224
|
+
//# sourceMappingURL=shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/semantic-queries/shared.ts"],"names":[],"mappings":";;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,6EAA6E;AAE7E;;;GAGG;AACU,QAAA,wBAAwB,GAAG;IACtC,OAAO;IACP,UAAU;IACV,OAAO;IACP,QAAQ;IACR,UAAU;IACV,UAAU;CACF,CAAA;AAGV;;;;;;GAMG;AACU,QAAA,kBAAkB,GAAG,CAAC,OAAO,EAAE,WAAW,CAAU,CAAA;AAGpD,QAAA,yBAAyB,GAAG,CAAC,SAAS,EAAE,cAAc,CAAU,CAAA;AAG7E,6EAA6E;AAEhE,QAAA,yBAAyB,GAAG;IACvC,KAAK;IACL,MAAM;IACN,OAAO;IACP,SAAS;IACT,MAAM;CACE,CAAA;AAGG,QAAA,6BAA6B,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAU,CAAA;AAwC9E,6EAA6E;AAEhE,QAAA,sBAAsB,GAAG;IACpC,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,KAAK;IACL,UAAU;IACV,QAAQ;IACR,WAAW;CACH,CAAA;AAGG,QAAA,0BAA0B,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAU,CAAA;AAIhE,QAAA,2BAA2B,GAAG;IACzC,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,KAAK;CACG,CAAA;AAIG,QAAA,oBAAoB,GAAG,CAAC,KAAK,EAAE,KAAK,CAAU,CAAA;AA+H9C,QAAA,uBAAuB,GAAG;IACrC,SAAS;IACT,aAAa;IACb,SAAS;CACD,CAAA;AAUV,wFAAwF;AAC3E,QAAA,uBAAuB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAU,CAAA;AA6CzD;;;GAGG;AACU,QAAA,2BAA2B,GAAG,CAAC,KAAK,EAAE,IAAI,CAAU,CAAA;AAEjE;;;;GAIG;AACU,QAAA,2BAA2B,GAAG;IACzC,GAAG,mCAA2B;IAC9B,WAAW;IACX,UAAU;IACV,cAAc;IACd,WAAW;IACX,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,UAAU;IACV,WAAW;IACX,aAAa;IACb,MAAM;IACN,WAAW;IACX,WAAW;IACX,KAAK;IACL,gBAAgB;CACR,CAAA;AA6CV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACU,QAAA,8BAA8B,GAAG;IAC5C,GAAG,mCAA2B;IAC9B,MAAM;IACN,cAAc;IACd,YAAY;IACZ,UAAU;IACV,UAAU;IACV,MAAM;IACN,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;CACL,CAAA;AA4BV;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACU,QAAA,8BAA8B,GAGvC;IACF,KAAK,EAAE,mCAA2B;IAClC,QAAQ,EAAE,sCAA8B;IACxC,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,EAAE;IACV,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,EAAE;CACb,CAAA;AAED;;;;;;;GAOG;AACU,QAAA,sBAAsB,GAAG;IACpC,GAAG,IAAI,GAAG,CAAS;QACjB,GAAG,mCAA2B;QAC9B,GAAG,sCAA8B;KAClC,CAAC;CAIH,CAAA;AAGD;;;;;;GAMG;AACU,QAAA,qBAAqB,GAAG;IACnC,aAAa,EAAE,EAAE;IACjB,QAAQ,EAAE,CAAC;CACH,CAAA;AA+BV,6EAA6E;AAE7E,wDAAwD;AAC3C,QAAA,sBAAsB,GAAG,CAAC,CAAA;AAyDvC,6EAA6E;AAE7E,gEAAgE;AACnD,QAAA,sBAAsB,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAU,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Good-to-Go action attachments — shared API contract shapes.
|
|
3
|
+
*
|
|
4
|
+
* A type offers actions to its assets by attaching them, inherited with
|
|
5
|
+
* field-binding mechanics (a keyed nearest-wins merge — FORMS.md §6): an
|
|
6
|
+
* authored row attaches an action, re-configures an inherited attachment, or
|
|
7
|
+
* detaches it for this type and its descendants.
|
|
8
|
+
*/
|
|
9
|
+
/** An authored attachment row on a type (a delta, keyed by action name). */
|
|
10
|
+
export interface IActionAttachment {
|
|
11
|
+
/** Immutable handle of the action being attached, configured or detached. */
|
|
12
|
+
actionName: string;
|
|
13
|
+
/**
|
|
14
|
+
* Offer the action only while this expression is TRUE for the asset.
|
|
15
|
+
* Presentation, not authorization — submit does not re-check it.
|
|
16
|
+
*/
|
|
17
|
+
visibleWhen?: string;
|
|
18
|
+
/** Suppress the inherited attachment from this type down. */
|
|
19
|
+
detach?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/** A resolved attachment (own + inherited), on a type's `actionsAll`. */
|
|
22
|
+
export interface IActionAttachmentAll {
|
|
23
|
+
actionName: string;
|
|
24
|
+
/** The action's display label, denormalised at resolve (refreshed on rename). */
|
|
25
|
+
label: string;
|
|
26
|
+
visibleWhen?: string;
|
|
27
|
+
/** Path of the type whose row attached it (provenance, like `fieldsAll`). */
|
|
28
|
+
typePath: string;
|
|
29
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Good-to-Go action attachments — shared API contract shapes.
|
|
4
|
+
*
|
|
5
|
+
* A type offers actions to its assets by attaching them, inherited with
|
|
6
|
+
* field-binding mechanics (a keyed nearest-wins merge — FORMS.md §6): an
|
|
7
|
+
* authored row attaches an action, re-configures an inherited attachment, or
|
|
8
|
+
* detaches it for this type and its descendants.
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
//# sourceMappingURL=attachments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachments.js","sourceRoot":"","sources":["../../src/shared/attachments.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG"}
|
package/dist/shared/embed.d.ts
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
export interface IEntityMeta {
|
|
2
2
|
created: number;
|
|
3
|
+
/** The record itself was edited through the APIs. */
|
|
3
4
|
updated?: number;
|
|
5
|
+
/**
|
|
6
|
+
* ANY system touched the record, including location and telemetry updates —
|
|
7
|
+
* the stamp `?updatedAfter` delta reads filter on.
|
|
8
|
+
*
|
|
9
|
+
* Exposed because a client that cannot SEE it cannot answer with it. The
|
|
10
|
+
* semantic query language has a `lastChanged` condition and the AI is taught
|
|
11
|
+
* to reach for it on "moved / touched / any activity"; the server compiled
|
|
12
|
+
* and ran those queries correctly while the offline client returned zero
|
|
13
|
+
* rows for every one of them, because the field stopped at the response
|
|
14
|
+
* boundary and never reached the cache. Valid query, right answer on one
|
|
15
|
+
* side, silently empty on the other.
|
|
16
|
+
*/
|
|
17
|
+
changed?: number;
|
|
4
18
|
}
|
|
5
19
|
export interface IEmbeddedEntity {
|
|
6
20
|
id: string;
|
package/dist/shared/index.d.ts
CHANGED
package/dist/shared/index.js
CHANGED
|
@@ -25,4 +25,6 @@ __exportStar(require("./sort"), exports);
|
|
|
25
25
|
__exportStar(require("./timezone"), exports);
|
|
26
26
|
__exportStar(require("./timestamp"), exports);
|
|
27
27
|
__exportStar(require("./relative-date"), exports);
|
|
28
|
+
__exportStar(require("./readiness"), exports);
|
|
29
|
+
__exportStar(require("./attachments"), exports);
|
|
28
30
|
//# sourceMappingURL=index.js.map
|
package/dist/shared/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,2CAAwB;AACxB,0CAAuB;AACvB,2CAAwB;AACxB,4CAAyB;AACzB,yCAAsB;AACtB,0CAAuB;AACvB,yCAAsB;AACtB,6CAA0B;AAC1B,8CAA2B;AAC3B,kDAA+B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,2CAAwB;AACxB,0CAAuB;AACvB,2CAAwB;AACxB,4CAAyB;AACzB,yCAAsB;AACtB,0CAAuB;AACvB,yCAAsB;AACtB,6CAA0B;AAC1B,8CAA2B;AAC3B,kDAA+B;AAC/B,8CAA2B;AAC3B,gDAA6B"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Good-to-Go (G2G) asset readiness — shared API contract shapes.
|
|
3
|
+
*
|
|
4
|
+
* Readiness rules are authored on types (and inherited like fields), evaluated
|
|
5
|
+
* against an asset's field values by the excelexp engine. A rule whose
|
|
6
|
+
* expression evaluates TRUE raises an issue at its level; an asset's overall
|
|
7
|
+
* `ready` is the worst level among its issues.
|
|
8
|
+
*/
|
|
9
|
+
/** Readiness severity: 1 = amber (warning), 2 = red (blocking). */
|
|
10
|
+
export declare type ReadinessLevel = 1 | 2;
|
|
11
|
+
/** Overall readiness: 0 = ready (green), else the worst issue level. */
|
|
12
|
+
export declare type ReadinessState = 0 | ReadinessLevel;
|
|
13
|
+
/**
|
|
14
|
+
* A rule's optional remediation tie to an action attached to the same type
|
|
15
|
+
* (FORMS.md §7): when the issue is shown, the UI offers `cta` → runs the
|
|
16
|
+
* action's form against the asset. Discoverable remediation, nothing more —
|
|
17
|
+
* the rule clears identically however the field changes.
|
|
18
|
+
*/
|
|
19
|
+
export interface IReadinessRuleAction {
|
|
20
|
+
/** Immutable handle of the linked action (must be in the type's `actionsAll`). */
|
|
21
|
+
actionName: string;
|
|
22
|
+
/** Button label the UI offers on the fired issue. */
|
|
23
|
+
cta: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* An authored readiness rule on a type. `expression` is an excelexp boolean;
|
|
27
|
+
* when it evaluates TRUE the issue fires at `level` with `message` rendered as
|
|
28
|
+
* a `{FieldName}` template.
|
|
29
|
+
*/
|
|
30
|
+
export interface IReadinessRule {
|
|
31
|
+
level: ReadinessLevel;
|
|
32
|
+
expression: string;
|
|
33
|
+
message: string;
|
|
34
|
+
action?: IReadinessRuleAction;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* A resolved rule (own + inherited), carrying the path of the type that
|
|
38
|
+
* authored it — mirrors how `IFieldDefinitionAll` carries `typePath`.
|
|
39
|
+
*/
|
|
40
|
+
export interface IReadinessRuleAll extends IReadinessRule {
|
|
41
|
+
/** Id of the type that authored the rule. */
|
|
42
|
+
typeId: string;
|
|
43
|
+
typePath: string;
|
|
44
|
+
}
|
|
45
|
+
/** The remediation link resolved onto a fired issue at evaluation time. */
|
|
46
|
+
export interface IReadinessIssueAction extends IReadinessRuleAction {
|
|
47
|
+
/** The linked action's display label at evaluation time. */
|
|
48
|
+
label: string;
|
|
49
|
+
}
|
|
50
|
+
/** A fired readiness issue on an asset. */
|
|
51
|
+
export interface IReadinessIssue {
|
|
52
|
+
/** The type that authored the fired rule. */
|
|
53
|
+
typeId: string;
|
|
54
|
+
/**
|
|
55
|
+
* The asset the issue came from: the asset itself for a leaf, or a member
|
|
56
|
+
* for a kit (kit issues are materialized copies of member issues).
|
|
57
|
+
*/
|
|
58
|
+
assetId: string;
|
|
59
|
+
assetName: string;
|
|
60
|
+
level: ReadinessLevel;
|
|
61
|
+
/** Rendered message (the rule's `message` template with field values). */
|
|
62
|
+
reason: string;
|
|
63
|
+
/**
|
|
64
|
+
* Referenced DATE / number fields that had no value, causing the rule to
|
|
65
|
+
* fail closed. Present only when the issue fired on missing data.
|
|
66
|
+
*/
|
|
67
|
+
missingFields?: string[];
|
|
68
|
+
/**
|
|
69
|
+
* The fired rule's remediation link, stamped at evaluation only while the
|
|
70
|
+
* action is still attached to the asset's type — so it can never dangle.
|
|
71
|
+
*/
|
|
72
|
+
action?: IReadinessIssueAction;
|
|
73
|
+
}
|
|
74
|
+
/** Stored/returned readiness for an asset. */
|
|
75
|
+
export interface IReadiness {
|
|
76
|
+
/** Worst level among `readyIssues`; 0 = ready (green). */
|
|
77
|
+
ready: ReadinessState;
|
|
78
|
+
readyIssues: IReadinessIssue[];
|
|
79
|
+
/** Epoch ms of the evaluation that produced this result. */
|
|
80
|
+
evaluatedAt?: number;
|
|
81
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Good-to-Go (G2G) asset readiness — shared API contract shapes.
|
|
4
|
+
*
|
|
5
|
+
* Readiness rules are authored on types (and inherited like fields), evaluated
|
|
6
|
+
* against an asset's field values by the excelexp engine. A rule whose
|
|
7
|
+
* expression evaluates TRUE raises an issue at its level; an asset's overall
|
|
8
|
+
* `ready` is the worst level among its issues.
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
//# sourceMappingURL=readiness.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readiness.js","sourceRoot":"","sources":["../../src/shared/readiness.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RoleMappingInput } from '../../organisations/sso';
|
|
1
|
+
import { RoleMappingInput, UsergroupMappingInput } from '../../organisations/sso';
|
|
2
2
|
/**
|
|
3
3
|
* Wire shape for `POST /sso/orgs/:id/onboard`. Operator-supplied fields only.
|
|
4
4
|
*
|
|
@@ -31,6 +31,17 @@ interface OnboardSsoOrgWireBase {
|
|
|
31
31
|
* mappings via `PUT /sso/orgs/:id/sso-mappings`.
|
|
32
32
|
*/
|
|
33
33
|
roleMappings?: RoleMappingInput[];
|
|
34
|
+
/**
|
|
35
|
+
* IdP claim to wire into `custom:g2g_groups`. Optional — group mapping is
|
|
36
|
+
* opt-in; absent means no group sync for the org until configured via
|
|
37
|
+
* `PUT /sso/orgs/:id/sso-mappings`.
|
|
38
|
+
*/
|
|
39
|
+
idpGroupClaim?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Initial usergroup mappings (union semantics — see `UsergroupMapping`).
|
|
42
|
+
* Only meaningful alongside `idpGroupClaim`.
|
|
43
|
+
*/
|
|
44
|
+
usergroupMappings?: UsergroupMappingInput[];
|
|
34
45
|
/**
|
|
35
46
|
* Opt-in to mixed-mode: allow password-auth users alongside SSO-managed
|
|
36
47
|
* users in the same org. Password-user emails must be OUTSIDE
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
import { RoleMappingInput } from '../../organisations/sso';
|
|
1
|
+
import { RoleMappingInput, UsergroupMappingInput } from '../../organisations/sso';
|
|
2
2
|
/**
|
|
3
3
|
* Wire shape for `PUT /sso/orgs/:id/sso-mappings`.
|
|
4
4
|
*
|
|
5
|
-
* Atomic full-replace of the org's
|
|
6
|
-
* `idpRoleClaim` (which IdP claim feeds `custom:g2g_role`) and the
|
|
7
|
-
* `roleMappings` array
|
|
8
|
-
* `
|
|
5
|
+
* Atomic full-replace of the org's mapping configuration — role AND group.
|
|
6
|
+
* Sends `idpRoleClaim` (which IdP claim feeds `custom:g2g_role`) and the
|
|
7
|
+
* whole `roleMappings` array, plus optionally `idpGroupClaim` (feeds
|
|
8
|
+
* `custom:g2g_groups`) and `usergroupMappings`. Because the PUT carries
|
|
9
|
+
* complete state, omitting the group fields CLEARS group mapping for the
|
|
10
|
+
* org. The orchestrator validates role/usergroup ids, pushes any claim-name
|
|
11
|
+
* change (either attribute) to Cognito via `UpdateIdentityProvider`, then
|
|
9
12
|
* persists. Mapping `_id` values are server-assigned on each write.
|
|
10
13
|
*/
|
|
11
14
|
export interface UpdateSsoMappingsRequest {
|
|
12
15
|
idpRoleClaim: string;
|
|
13
16
|
roleMappings: RoleMappingInput[];
|
|
17
|
+
idpGroupClaim?: string;
|
|
18
|
+
usergroupMappings?: UsergroupMappingInput[];
|
|
14
19
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './void/post';
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./void/post"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/submissions/[id]/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { GetSubmissionResponse } from '../../shared';
|
|
2
|
+
export interface PostSubmissionVoidRequest {
|
|
3
|
+
reason?: string;
|
|
4
|
+
}
|
|
5
|
+
/** The voided submission — the resource with its `voided` overlay applied. */
|
|
6
|
+
export declare type PostSubmissionVoidResponse = GetSubmissionResponse;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post.js","sourceRoot":"","sources":["../../../../src/submissions/[id]/void/post.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Media content types a capture block accepts (§4.3) — images only, never
|
|
3
|
+
* SVG (active content). Enforced at upload-mint (the presigned POST pins the
|
|
4
|
+
* exact type into the policy) and re-checked at submit.
|
|
5
|
+
*/
|
|
6
|
+
export declare const SUBMISSION_MEDIA_CONTENT_TYPES: readonly ["image/png", "image/jpeg", "image/webp"];
|
|
7
|
+
export declare type SubmissionMediaContentType = (typeof SUBMISSION_MEDIA_CONTENT_TYPES)[number];
|
|
8
|
+
/**
|
|
9
|
+
* Upload size cap (§4.3), enforced by the presigned-POST policy's
|
|
10
|
+
* content-length-range condition and re-checked by HEAD at submit.
|
|
11
|
+
*/
|
|
12
|
+
export declare const SUBMISSION_MEDIA_MAX_BYTES: number;
|
|
13
|
+
/** Most files a single mint request may ask for — the per-form capture-block cap. */
|
|
14
|
+
export declare const SUBMISSION_UPLOADS_MAX_FILES = 10;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SUBMISSION_UPLOADS_MAX_FILES = exports.SUBMISSION_MEDIA_MAX_BYTES = exports.SUBMISSION_MEDIA_CONTENT_TYPES = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Media content types a capture block accepts (§4.3) — images only, never
|
|
6
|
+
* SVG (active content). Enforced at upload-mint (the presigned POST pins the
|
|
7
|
+
* exact type into the policy) and re-checked at submit.
|
|
8
|
+
*/
|
|
9
|
+
exports.SUBMISSION_MEDIA_CONTENT_TYPES = [
|
|
10
|
+
'image/png',
|
|
11
|
+
'image/jpeg',
|
|
12
|
+
'image/webp',
|
|
13
|
+
];
|
|
14
|
+
/**
|
|
15
|
+
* Upload size cap (§4.3), enforced by the presigned-POST policy's
|
|
16
|
+
* content-length-range condition and re-checked by HEAD at submit.
|
|
17
|
+
*/
|
|
18
|
+
exports.SUBMISSION_MEDIA_MAX_BYTES = 10 * 1024 * 1024;
|
|
19
|
+
/** Most files a single mint request may ask for — the per-form capture-block cap. */
|
|
20
|
+
exports.SUBMISSION_UPLOADS_MAX_FILES = 10;
|
|
21
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/submissions/constants.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACU,QAAA,8BAA8B,GAAG;IAC5C,WAAW;IACX,YAAY;IACZ,YAAY;CACJ,CAAA;AAKV;;;GAGG;AACU,QAAA,0BAA0B,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAA;AAE1D,qFAAqF;AACxE,QAAA,4BAA4B,GAAG,EAAE,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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("./query"), exports);
|
|
18
|
+
__exportStar(require("./response"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/submissions/get/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,6CAA0B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SortOrders } from '../../shared';
|
|
2
|
+
export interface SubmissionFilters {
|
|
3
|
+
/** Filter to submissions against these assets. */
|
|
4
|
+
assets?: string[];
|
|
5
|
+
/** Filter to submissions against these locations. */
|
|
6
|
+
locations?: string[];
|
|
7
|
+
timeFrom?: number;
|
|
8
|
+
timeTo?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface GetSubmissionsQuery extends SubmissionFilters {
|
|
11
|
+
page?: number;
|
|
12
|
+
limit?: number;
|
|
13
|
+
sortOrder?: SortOrders;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/submissions/get/query.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/submissions/get/response.ts"],"names":[],"mappings":""}
|