@spotto/contract 1.0.70-alpha.19 → 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.
|
@@ -31,4 +31,16 @@ export interface GetLocationsQuery extends LocationFilters {
|
|
|
31
31
|
sort?: LocationSortField;
|
|
32
32
|
sortOrder?: SortOrders;
|
|
33
33
|
embed?: Array<LocationEmbedField>;
|
|
34
|
+
/**
|
|
35
|
+
* Run a stored semantic query by reference instead of the flat filters.
|
|
36
|
+
* Must NOT be combined with any filter member — the combination is rejected,
|
|
37
|
+
* never merged. An expired or unknown id returns a distinct "gone" error,
|
|
38
|
+
* never an empty list.
|
|
39
|
+
*/
|
|
40
|
+
semanticQueryId?: string;
|
|
41
|
+
/**
|
|
42
|
+
* IANA timezone for resolving relative date conditions. Without it the same
|
|
43
|
+
* saved query resolves "today" differently depending on who runs it.
|
|
44
|
+
*/
|
|
45
|
+
timezone?: string;
|
|
34
46
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SortOrders } from '../shared';
|
|
2
2
|
import { AssetSortField } from '../assets/get/query';
|
|
3
|
-
import { LocationStatus } from '../locations/constants';
|
|
3
|
+
import { LocationStatus, LocationType } from '../locations/constants';
|
|
4
4
|
import { FieldDataType } from '../fields/constants';
|
|
5
5
|
/**
|
|
6
6
|
* SEMANTIC QUERIES — the portable query language.
|
|
@@ -116,7 +116,7 @@ export interface SemanticAssetTypeCondition {
|
|
|
116
116
|
* asset currently IS; `homeLocation` is where it BELONGS — a fixed, often
|
|
117
117
|
* high-level node. Conflating them fails silently, so they are distinct types.
|
|
118
118
|
*/
|
|
119
|
-
export interface
|
|
119
|
+
export interface SemanticAssetLocationCondition {
|
|
120
120
|
type: 'location' | 'homeLocation';
|
|
121
121
|
path: string;
|
|
122
122
|
/** Default true. */
|
|
@@ -255,15 +255,127 @@ export interface SemanticLocationStatusCondition {
|
|
|
255
255
|
values: LocationStatus[];
|
|
256
256
|
}
|
|
257
257
|
/**
|
|
258
|
-
*
|
|
258
|
+
* Grouping — valid in every entity's vocabulary, because nesting is structure
|
|
259
|
+
* rather than subject matter.
|
|
260
|
+
*/
|
|
261
|
+
export declare const semanticGroupConditionTypes: readonly ["and", "or"];
|
|
262
|
+
/**
|
|
263
|
+
* The ASSET vocabulary. Over a third of it is asset-only by nature —
|
|
264
|
+
* `readiness`, `kit`, `withAsset`, `telemetry`, `locationStatus` mean nothing
|
|
265
|
+
* for a reader or a snapshot.
|
|
266
|
+
*/
|
|
267
|
+
export declare const semanticAssetConditionTypes: readonly ["and", "or", "assetType", "location", "homeLocation", "withAsset", "customField", "createdDate", "lastUpdated", "lastChanged", "lastSeen", "firstSeen", "geolocation", "tags", "telemetry", "readiness", "kit", "locationStatus"];
|
|
268
|
+
/**
|
|
269
|
+
* A location subtree, by pipe-delimited path.
|
|
270
|
+
*
|
|
271
|
+
* `path` rather than reusing the asset vocabulary's `location`, deliberately.
|
|
272
|
+
* They are not the same fact: an asset's `location` is a RELATIONSHIP to
|
|
273
|
+
* another record, while a location's path is its own identity — and
|
|
274
|
+
* "location" as a condition on a location query reads as self-reference.
|
|
275
|
+
* (Storage note for implementors: the Mongo document keeps this pipe path in
|
|
276
|
+
* `name`, not in a `path` field.)
|
|
277
|
+
*/
|
|
278
|
+
export interface SemanticLocationPathCondition {
|
|
279
|
+
type: 'path';
|
|
280
|
+
path: string;
|
|
281
|
+
/** Default true — this location and everything under it. */
|
|
282
|
+
includeSublocations?: boolean;
|
|
283
|
+
}
|
|
284
|
+
/** A location is FIXED (a room, a bay) or MOVING (a vehicle). */
|
|
285
|
+
export interface SemanticLocationTypeCondition {
|
|
286
|
+
type: 'locationType';
|
|
287
|
+
values: LocationType[];
|
|
288
|
+
}
|
|
289
|
+
/** Whether any reader is installed at the location. */
|
|
290
|
+
export interface SemanticLocationHasReadersCondition {
|
|
291
|
+
type: 'hasReaders';
|
|
292
|
+
value: boolean;
|
|
293
|
+
}
|
|
294
|
+
/** Whether a geofence polygon has been drawn for the location. */
|
|
295
|
+
export interface SemanticLocationGeofenceCondition {
|
|
296
|
+
type: 'geofence';
|
|
297
|
+
exists: boolean;
|
|
298
|
+
}
|
|
299
|
+
/** Locations carrying one specific manifest. Ids point; paths match. */
|
|
300
|
+
export interface SemanticLocationManifestCondition {
|
|
301
|
+
type: 'manifest';
|
|
302
|
+
manifestId: string;
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* The LOCATION vocabulary.
|
|
306
|
+
*
|
|
307
|
+
* Where a fact is genuinely the same as an asset's, it keeps the same word AND
|
|
308
|
+
* the same meaning — `tags`, `createdDate`, `lastUpdated`, `lastChanged`. That
|
|
309
|
+
* is the naming rule working: one fact stored the same way, sharing one
|
|
310
|
+
* emitter, not two coincidences that agree today.
|
|
311
|
+
*
|
|
312
|
+
* `geolocation` is the exception that proves it needs care. The word means the
|
|
313
|
+
* same thing — "has map coordinates" — but a location has TWO: the coordinates
|
|
314
|
+
* it was configured with, and the ones a moving location last reported
|
|
315
|
+
* (`state.geolocation`, which is what the asset condition reads). This
|
|
316
|
+
* condition means the CONFIGURED position; the observed one belongs to a
|
|
317
|
+
* separate condition if it is ever wanted, rather than being silently folded
|
|
318
|
+
* in here.
|
|
259
319
|
*
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
*
|
|
320
|
+
* DELIBERATELY ABSENT: `lastSeen`, `firstSeen` and `telemetry`. The location
|
|
321
|
+
* document declares all three and the parser exposes them, so they were easy
|
|
322
|
+
* to add — but nothing in this repo writes them (the reader/MQTT ingestion
|
|
323
|
+
* does, if anything does), no legacy filter or prototype condition ever
|
|
324
|
+
* offered them, and they could only ever apply to MOVING locations carrying a
|
|
325
|
+
* tracker. A condition over a field that may never be populated is one that
|
|
326
|
+
* runs and confidently returns nothing. They come back the day the ingestion
|
|
327
|
+
* is confirmed to populate them — the emitters are already shared, so it is a
|
|
328
|
+
* list entry and two switch arms.
|
|
329
|
+
*
|
|
330
|
+
* Also absent, and for a different reason: free text. There is no
|
|
331
|
+
* `nameContains` (the prototype had one) because search is a view option
|
|
332
|
+
* platform-wide, not a condition.
|
|
333
|
+
*/
|
|
334
|
+
export declare const semanticLocationConditionTypes: readonly ["and", "or", "path", "locationType", "hasReaders", "geofence", "manifest", "tags", "geolocation", "createdDate", "lastUpdated", "lastChanged"];
|
|
335
|
+
/**
|
|
336
|
+
* The three timestamps a location answers for. Narrowed rather than reusing
|
|
337
|
+
* `SemanticTimestampCondition` whole: that interface covers all five, and
|
|
338
|
+
* leaving it wide would let `lastSeen` typecheck on a location query and rely
|
|
339
|
+
* on the runtime vocabulary alone to catch it — the type should say the same
|
|
340
|
+
* thing the gate does.
|
|
265
341
|
*/
|
|
266
|
-
export declare
|
|
342
|
+
export declare type SemanticLocationTimestampCondition = Omit<SemanticTimestampCondition, 'type'> & {
|
|
343
|
+
type: 'createdDate' | 'lastUpdated' | 'lastChanged';
|
|
344
|
+
};
|
|
345
|
+
export declare type SemanticLocationCondition = SemanticAndCondition | SemanticOrCondition | SemanticLocationPathCondition | SemanticLocationTypeCondition | SemanticLocationHasReadersCondition | SemanticLocationGeofenceCondition | SemanticLocationManifestCondition | SemanticTagsCondition | SemanticGeolocationCondition | SemanticLocationTimestampCondition;
|
|
346
|
+
/**
|
|
347
|
+
* WHICH WORDS EACH ENTITY KNOWS — the closed vocabulary, per entity.
|
|
348
|
+
*
|
|
349
|
+
* The rule only has teeth if "unknown" is decidable for the entity being
|
|
350
|
+
* queried. In one flat list `{type:'readiness'}` on a location query is a
|
|
351
|
+
* VALID word, so rejecting it would demote to a hand-maintained compatibility
|
|
352
|
+
* table — a second gate that can drift from the first, which is the
|
|
353
|
+
* runs-cleanly-returns-wrong-rows failure this design exists to prevent.
|
|
354
|
+
*
|
|
355
|
+
* It also scopes what the generator is shown: composing a location query, the
|
|
356
|
+
* model never sees `readiness` at all. The prototype's prompt listed
|
|
357
|
+
* conditions it could not supply and the model duly emitted them (finding 12);
|
|
358
|
+
* a shared vocabulary hands that failure to every entity at once.
|
|
359
|
+
*
|
|
360
|
+
* An entity with an EMPTY vocabulary is one the language does not speak yet —
|
|
361
|
+
* every condition is rejected, which is the honest answer while only assets
|
|
362
|
+
* execute. Entities are listed from day one so a stored record never needs
|
|
363
|
+
* retrofitting.
|
|
364
|
+
*
|
|
365
|
+
* Where a concept genuinely coincides across entities it keeps the SAME word
|
|
366
|
+
* (`createdDate` is the same fact everywhere). A domain word is only earned
|
|
367
|
+
* where the meaning differs.
|
|
368
|
+
*/
|
|
369
|
+
export declare const semanticConditionTypesByEntity: Record<SemanticQueryEntityType, readonly string[]>;
|
|
370
|
+
/**
|
|
371
|
+
* Every condition type the language knows, across all entities.
|
|
372
|
+
*
|
|
373
|
+
* This is the BOUNDARY's list — the wire schema checks that a condition names
|
|
374
|
+
* a real word at all, and leaves which-entity-may-use-it to the shared
|
|
375
|
+
* validator, which knows the entity and can say "'readiness' is an asset
|
|
376
|
+
* condition" instead of "not allowed".
|
|
377
|
+
*/
|
|
378
|
+
export declare const semanticConditionTypes: readonly ("telemetry" | "readiness" | "location" | "manifest" | "and" | "or" | "assetType" | "homeLocation" | "withAsset" | "customField" | "createdDate" | "lastUpdated" | "lastChanged" | "lastSeen" | "firstSeen" | "geolocation" | "tags" | "kit" | "locationStatus" | "path" | "locationType" | "hasReaders" | "geofence")[];
|
|
267
379
|
export declare type SemanticConditionType = (typeof semanticConditionTypes)[number];
|
|
268
380
|
/**
|
|
269
381
|
* Query size bounds, shared by the boundary schema (which refuses an oversized
|
|
@@ -276,7 +388,18 @@ export declare const SEMANTIC_QUERY_LIMITS: {
|
|
|
276
388
|
readonly maxConditions: 50;
|
|
277
389
|
readonly maxDepth: 5;
|
|
278
390
|
};
|
|
279
|
-
|
|
391
|
+
/**
|
|
392
|
+
* The ASSET condition union. Per-entity rather than one shared union on
|
|
393
|
+
* purpose: an entity's compiler takes its own union, so a condition it has not
|
|
394
|
+
* handled is a COMPILE error rather than a runtime fall-through. The prototype
|
|
395
|
+
* kept its vocabularies as `string[]` allowlists and lost exactly that.
|
|
396
|
+
*/
|
|
397
|
+
export declare type SemanticAssetCondition = SemanticAndCondition | SemanticOrCondition | SemanticAssetTypeCondition | SemanticAssetLocationCondition | SemanticWithAssetCondition | SemanticCustomFieldCondition | SemanticTimestampCondition | SemanticGeolocationCondition | SemanticTagsCondition | SemanticTelemetryCondition | SemanticReadinessCondition | SemanticKitCondition | SemanticLocationStatusCondition;
|
|
398
|
+
/**
|
|
399
|
+
* Any condition, whatever the entity. Widens as entities are added; the
|
|
400
|
+
* envelope and everything generic over it stay unchanged when they are.
|
|
401
|
+
*/
|
|
402
|
+
export declare type SemanticQueryCondition = SemanticAssetCondition | SemanticLocationCondition;
|
|
280
403
|
/** Current wire version of the condition vocabulary. */
|
|
281
404
|
export declare const SEMANTIC_QUERY_VERSION = 2;
|
|
282
405
|
export interface SemanticQuery {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.semanticQueryViewTypes = exports.SEMANTIC_QUERY_VERSION = exports.SEMANTIC_QUERY_LIMITS = exports.semanticConditionTypes = exports.semanticReadinessLevels = exports.semanticTelemetryFields = exports.semanticSetOperators = exports.semanticComparisonOperators = exports.semanticTimestampOperators = exports.semanticFieldOperators = exports.semanticRelativeDatePositions = exports.semanticRelativeDateBases = exports.semanticQueryVisibilities = exports.semanticQueryKinds = exports.semanticQueryEntityTypes = void 0;
|
|
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
4
|
/**
|
|
5
5
|
* SEMANTIC QUERIES — the portable query language.
|
|
6
6
|
*
|
|
@@ -88,17 +88,17 @@ exports.semanticTelemetryFields = [
|
|
|
88
88
|
/** Readiness severity scale (contract shared/readiness.ts): 0 green, 1 amber, 2 red. */
|
|
89
89
|
exports.semanticReadinessLevels = [0, 1, 2];
|
|
90
90
|
/**
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
* Exported from the contract so the compiler's property whitelist and the
|
|
94
|
-
* boundary schema are both keyed off ONE list: a condition type added here is
|
|
95
|
-
* a compile error in any layer that has not handled it, instead of a silently
|
|
96
|
-
* unchecked type (a missing whitelist entry means "no properties checked",
|
|
97
|
-
* which is precisely the failure the closed vocabulary exists to prevent).
|
|
91
|
+
* Grouping — valid in every entity's vocabulary, because nesting is structure
|
|
92
|
+
* rather than subject matter.
|
|
98
93
|
*/
|
|
99
|
-
exports.
|
|
100
|
-
|
|
101
|
-
|
|
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
102
|
'assetType',
|
|
103
103
|
'location',
|
|
104
104
|
'homeLocation',
|
|
@@ -116,6 +116,94 @@ exports.semanticConditionTypes = [
|
|
|
116
116
|
'kit',
|
|
117
117
|
'locationStatus',
|
|
118
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
|
+
];
|
|
119
207
|
/**
|
|
120
208
|
* Query size bounds, shared by the boundary schema (which refuses an oversized
|
|
121
209
|
* query before parsing it) and the compiler (which counts every branch as it
|
|
@@ -1 +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,uB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GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAU,CAAA"}
|
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spotto/contract",
|
|
3
3
|
"license": "ISC",
|
|
4
|
-
"version": "1.0.70-alpha.
|
|
4
|
+
"version": "1.0.70-alpha.20",
|
|
5
5
|
"description": "Spotto's API Contract type definitions",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"files": [
|
|
@@ -18,5 +18,5 @@
|
|
|
18
18
|
"@types/geojson": "^7946.0.11",
|
|
19
19
|
"shx": "^0.3.4"
|
|
20
20
|
},
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "76c7272f0c6ec68cc60a268988d86064851b652b"
|
|
22
22
|
}
|