@spotto/contract 1.0.70-alpha.8 → 1.0.70-y.0
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 +42 -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 +74 -0
- package/dist/ai/chat/response.js +11 -0
- package/dist/ai/chat/response.js.map +1 -0
- package/dist/ai/expression/request.d.ts +3 -1
- package/dist/ai/index.d.ts +3 -0
- package/dist/ai/index.js +3 -0
- package/dist/ai/index.js.map +1 -1
- 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 +43 -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 +2 -1
- 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 +16 -1
- package/dist/assets/location/request.d.ts +10 -1
- package/dist/events/constants.d.ts +16 -1
- package/dist/events/constants.js +21 -1
- package/dist/events/constants.js.map +1 -1
- package/dist/events/get/query.d.ts +25 -0
- 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/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 +5 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- 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/readers/get/query.d.ts +12 -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 +853 -0
- package/dist/semantic-queries/shared.js +318 -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 +1 -0
- package/dist/shared/index.js +1 -0
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/readiness.d.ts +23 -0
- package/dist/snapshots/[id]/get.d.ts +139 -11
- package/dist/snapshots/[id]/get.js.map +1 -1
- package/dist/snapshots/get/query.d.ts +39 -0
- package/dist/snapshots/get/query.js +23 -1
- package/dist/snapshots/get/query.js.map +1 -1
- package/dist/snapshots/post/request.d.ts +21 -0
- package/dist/snapshots/post/request.js.map +1 -1
- 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 +3 -1
- package/dist/types/[id]/patch/request.d.ts +4 -1
- package/dist/types/post/request.d.ts +2 -1
- 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 +22 -4
- package/dist/users/get/query.d.ts +0 -2
- package/dist/users/home-layout/shared.d.ts +96 -21
- package/dist/users/home-layout/shared.js +11 -5
- package/dist/users/home-layout/shared.js.map +1 -1
- package/dist/users/post/request.d.ts +6 -1
- package/package.json +2 -2
|
@@ -4,43 +4,118 @@
|
|
|
4
4
|
* returned on `GET /users/current`, and written via
|
|
5
5
|
* `POST /users/current/home-layout`.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
7
|
+
* A layout is a flat, ordered list of widgets, each pinned to a rect on a
|
|
8
|
+
* 4-column grid (`gridPos`). The widget `type` is a closed union (below): adding
|
|
9
|
+
* a new kind is a contract change + republish + client bump. Per-widget `config`
|
|
10
|
+
* carries widget *behaviour* only (a saved-view id, an action id, a heading's
|
|
11
|
+
* text) — never geometry. Since 2026-07-30 the API validates each kind's KNOWN
|
|
12
|
+
* config keys on write (the per-kind `*WidgetConfig` shapes below) while
|
|
13
|
+
* tolerating unknown keys, so the client can still add config keys without an
|
|
14
|
+
* API deploy ordering — only changing a known key's meaning needs one.
|
|
15
|
+
*
|
|
16
|
+
* `version` discriminates stored layouts so the client can detect and
|
|
17
|
+
* reset/migrate an older one on read.
|
|
12
18
|
*/
|
|
13
|
-
/** Width a widget occupies in its section grid. `'full'` spans the row at every breakpoint. */
|
|
14
|
-
export declare type HomeWidgetSpan = 1 | 2 | 'full';
|
|
15
19
|
/**
|
|
16
20
|
* The kinds of Home widget. Closed set — adding one is a contract change.
|
|
17
|
-
* - `tile-link` — a link card (a saved view
|
|
21
|
+
* - `tile-link` — a link card (a saved view or a nav destination); may show a live count.
|
|
18
22
|
* - `summary-list` — top-N rows of a saved view's results.
|
|
19
23
|
* - `recent-activity` — the account's latest activity feed.
|
|
20
24
|
* - `recent-assets` / `recent-locations` — most-recently-updated entities.
|
|
21
25
|
* - `needs-attention` — assets flagged not-ready / partially-ready.
|
|
22
26
|
* - `kit-spotlight` — kit readiness summary.
|
|
27
|
+
* - `hero` — the fleet-readiness hero (overview + inline needs-attention legend),
|
|
28
|
+
* carrying its own mark and label so several can share a Home.
|
|
29
|
+
* - `heading` — a text heading to label a run of widgets (heading text lives in `config`).
|
|
30
|
+
*
|
|
31
|
+
* `heading` is a full-width structural widget: the client renders it spanning the
|
|
32
|
+
* whole row at every breakpoint. `hero` was one too until it learned to render at
|
|
33
|
+
* a quarter, a half or a full row; its width is now the user's, like any other
|
|
34
|
+
* widget's. As with all widgets, width is expressed through `gridPos.w`, not
|
|
35
|
+
* enforced by the API.
|
|
36
|
+
*/
|
|
37
|
+
export declare type HomeWidgetType = 'tile-link' | 'summary-list' | 'recent-activity' | 'recent-assets' | 'recent-locations' | 'needs-attention' | 'kit-spotlight' | 'hero' | 'heading';
|
|
38
|
+
/**
|
|
39
|
+
* Per-kind `config` shapes — the authoritative form of each configurable
|
|
40
|
+
* kind's KNOWN keys, which the API enforces on write (unknown keys pass, so
|
|
41
|
+
* these can grow client-first). The feed kinds define no config keys. `config`
|
|
42
|
+
* itself stays loosely typed on `HomeWidget`; the client parses defensively at
|
|
43
|
+
* the render boundary regardless (stored data may predate validation).
|
|
44
|
+
*/
|
|
45
|
+
/** A `tile-link`'s target: a registered app action or a saved view — never a
|
|
46
|
+
* free URL (the client resolves targets to internal routes by design). */
|
|
47
|
+
export declare type TileLinkWidgetConfig = {
|
|
48
|
+
source: 'action';
|
|
49
|
+
actionId: string;
|
|
50
|
+
} | {
|
|
51
|
+
source: 'view';
|
|
52
|
+
viewId: string;
|
|
53
|
+
};
|
|
54
|
+
/** A `summary-list` renders the top matches of one saved view. */
|
|
55
|
+
export interface SummaryListWidgetConfig {
|
|
56
|
+
viewId: string;
|
|
57
|
+
}
|
|
58
|
+
/** A `heading`'s user-editable label — empty while freshly added. */
|
|
59
|
+
export interface HeadingWidgetConfig {
|
|
60
|
+
text: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* How a hero card presents itself. Both keys are optional: with neither, the
|
|
64
|
+
* client renders its default mark and derives the label from the data source
|
|
65
|
+
* (the saved view's name, or the whole account). They exist because several
|
|
66
|
+
* heroes now share one Home — over different saved views, at different widths —
|
|
67
|
+
* and identical cards would be indistinguishable at a glance.
|
|
68
|
+
*/
|
|
69
|
+
export interface HeroWidgetPresentation {
|
|
70
|
+
/**
|
|
71
|
+
* Icon NAME from the client's curated set (kebab-case, e.g. `ambulance`) —
|
|
72
|
+
* never a URL or markup. The client resolves the name to a component and
|
|
73
|
+
* falls back to its default mark on one it doesn't recognise, which is why
|
|
74
|
+
* the API bounds the string rather than enumerating the set: adding an icon
|
|
75
|
+
* is then a client release, not an API deploy.
|
|
76
|
+
*/
|
|
77
|
+
icon?: string;
|
|
78
|
+
/** Label override. Empty or absent means the client derives it. */
|
|
79
|
+
title?: string;
|
|
80
|
+
}
|
|
81
|
+
/** The `hero`'s data source — the whole account's assets, or one saved view's
|
|
82
|
+
* matches — plus how the card presents itself. The source is always present on
|
|
83
|
+
* a stored hero (the kind shipped with it); the presentation keys are not. */
|
|
84
|
+
export declare type HeroWidgetConfig = HeroWidgetPresentation & ({
|
|
85
|
+
source: 'account';
|
|
86
|
+
} | {
|
|
87
|
+
source: 'view';
|
|
88
|
+
viewId: string;
|
|
89
|
+
});
|
|
90
|
+
/**
|
|
91
|
+
* A widget's cell on the Home grid: top-left position (`x`/`y`) and size
|
|
92
|
+
* (`w`/`h`), in grid units. The grid is 4 columns wide, so `x + w <= 4`, and
|
|
93
|
+
* `h` is a whole number of row-units. Below the desktop breakpoint the client
|
|
94
|
+
* collapses to a single column, so `x`/`w` only bind on wide viewports.
|
|
23
95
|
*/
|
|
24
|
-
export
|
|
96
|
+
export interface HomeWidgetGridPos {
|
|
97
|
+
/** Column of the top-left corner (0-based; `x + w <= 4`). */
|
|
98
|
+
x: number;
|
|
99
|
+
/** Row of the top-left corner (0-based), in row-units. */
|
|
100
|
+
y: number;
|
|
101
|
+
/** Width in columns (1–4). */
|
|
102
|
+
w: number;
|
|
103
|
+
/** Height in row-units (>= 1). */
|
|
104
|
+
h: number;
|
|
105
|
+
}
|
|
25
106
|
export interface HomeWidget {
|
|
26
107
|
/** Stable client-generated id (ulid) — the reorder / remove key. */
|
|
27
108
|
id: string;
|
|
28
109
|
/** Widget kind (closed union). The client registry maps it to a renderer + config shape. */
|
|
29
110
|
type: HomeWidgetType;
|
|
30
|
-
/**
|
|
31
|
-
|
|
32
|
-
/** Widget-specific
|
|
111
|
+
/** Position + size on the 4-column grid. */
|
|
112
|
+
gridPos: HomeWidgetGridPos;
|
|
113
|
+
/** Widget-specific *behaviour* config (e.g. a saved-view id, a heading's text) — never geometry. Known keys are validated per kind (see the `*WidgetConfig` shapes); unknown keys pass through. */
|
|
33
114
|
config?: Record<string, unknown>;
|
|
34
115
|
}
|
|
35
|
-
export interface HomeLayoutSection {
|
|
36
|
-
/** Stable client-generated id (ulid). */
|
|
37
|
-
id: string;
|
|
38
|
-
/** Optional section heading. Sections are single + untitled in P1; titled groups arrive in P2. */
|
|
39
|
-
title?: string;
|
|
40
|
-
widgets: HomeWidget[];
|
|
41
|
-
}
|
|
42
116
|
export interface HomeLayout {
|
|
43
|
-
/** Layout schema version,
|
|
117
|
+
/** Layout schema version, so the client can detect + migrate/reset older stored layouts. */
|
|
44
118
|
version: number;
|
|
45
|
-
|
|
119
|
+
/** Flat, ordered widget list; geometry lives on each widget's `gridPos`. */
|
|
120
|
+
widgets: HomeWidget[];
|
|
46
121
|
}
|
|
@@ -5,11 +5,17 @@
|
|
|
5
5
|
* returned on `GET /users/current`, and written via
|
|
6
6
|
* `POST /users/current/home-layout`.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
8
|
+
* A layout is a flat, ordered list of widgets, each pinned to a rect on a
|
|
9
|
+
* 4-column grid (`gridPos`). The widget `type` is a closed union (below): adding
|
|
10
|
+
* a new kind is a contract change + republish + client bump. Per-widget `config`
|
|
11
|
+
* carries widget *behaviour* only (a saved-view id, an action id, a heading's
|
|
12
|
+
* text) — never geometry. Since 2026-07-30 the API validates each kind's KNOWN
|
|
13
|
+
* config keys on write (the per-kind `*WidgetConfig` shapes below) while
|
|
14
|
+
* tolerating unknown keys, so the client can still add config keys without an
|
|
15
|
+
* API deploy ordering — only changing a known key's meaning needs one.
|
|
16
|
+
*
|
|
17
|
+
* `version` discriminates stored layouts so the client can detect and
|
|
18
|
+
* reset/migrate an older one on read.
|
|
13
19
|
*/
|
|
14
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
21
|
//# sourceMappingURL=shared.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/users/home-layout/shared.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/users/home-layout/shared.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
export interface BasePostUserRequest {
|
|
2
2
|
name: string;
|
|
3
3
|
role: string;
|
|
4
|
-
permissionLocationId?: string;
|
|
5
4
|
homeLocationId?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Complete usergroup membership for the new user (group ids). Enforced
|
|
7
|
+
* per the closure invariant when the org toggle is ON; omitted = no
|
|
8
|
+
* groups (resolves unconfined).
|
|
9
|
+
*/
|
|
10
|
+
usergroups?: string[];
|
|
6
11
|
}
|
|
7
12
|
export interface PostExternalUserRequest extends BasePostUserRequest {
|
|
8
13
|
type: 'EXTERNAL';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spotto/contract",
|
|
3
3
|
"license": "ISC",
|
|
4
|
-
"version": "1.0.70-
|
|
4
|
+
"version": "1.0.70-y.0",
|
|
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": "6085c86b6042d119b876e446b4c730d1ab39448f"
|
|
22
22
|
}
|