@spotto/contract 1.0.70-alpha.6 → 1.0.70-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/expression/response.d.ts +12 -1
- package/dist/users/current.d.ts +7 -0
- 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 +46 -0
- package/dist/users/home-layout/shared.js +15 -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/package.json +2 -2
|
@@ -3,8 +3,19 @@ export interface PostAiExpressionResponse {
|
|
|
3
3
|
ok: boolean;
|
|
4
4
|
/** The generated excelexp expression, or null when declined / unbuildable. */
|
|
5
5
|
expression: string | null;
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* readinessRule: the display text shown when the rule fires — house-style, with
|
|
8
|
+
* `{FieldName}` placeholders. null for computedField, and null on a decline.
|
|
9
|
+
*/
|
|
7
10
|
message: string | null;
|
|
11
|
+
/**
|
|
12
|
+
* readinessRule severity, set ONLY from explicit severity words in the prompt:
|
|
13
|
+
* 1 = amber, 2 = red. null when the prompt stated no severity (the author picks)
|
|
14
|
+
* or for computedField.
|
|
15
|
+
*/
|
|
16
|
+
level: 1 | 2 | null;
|
|
17
|
+
/** Author-facing explanation/caveat: why it declined, or a one-line caveat. */
|
|
18
|
+
note: string | null;
|
|
8
19
|
/** Server-side compiler findings (empty when the expression compiles cleanly). */
|
|
9
20
|
warnings: string[];
|
|
10
21
|
/** The model that answered. */
|
package/dist/users/current.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { IEntityMeta, IEmbeddedEntity } from '../shared';
|
|
|
2
2
|
import { Preferences } from '../organisations/constants';
|
|
3
3
|
import { Integrations } from '../integrations/constants';
|
|
4
4
|
import { System } from '../system';
|
|
5
|
+
import { HomeLayout } from './home-layout';
|
|
5
6
|
export interface EmbeddedRole extends IEmbeddedEntity {
|
|
6
7
|
permissions: string[];
|
|
7
8
|
}
|
|
@@ -28,6 +29,12 @@ export interface CurrentUserResponse {
|
|
|
28
29
|
* - `undefined` — legacy native user (non-SSO org, or pre-SSO).
|
|
29
30
|
*/
|
|
30
31
|
authProvider?: 'sso' | 'native';
|
|
32
|
+
/**
|
|
33
|
+
* Personal Home-screen layout (widget arrangement). Persisted on the user doc
|
|
34
|
+
* and written via `POST /users/current/home-layout`. `undefined` until the
|
|
35
|
+
* user customises — the client then renders its built-in default layout.
|
|
36
|
+
*/
|
|
37
|
+
homeLayout?: HomeLayout;
|
|
31
38
|
}
|
|
32
39
|
export interface CurrentUserPublicResponse {
|
|
33
40
|
id: string;
|
|
@@ -0,0 +1,20 @@
|
|
|
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("./shared"), exports);
|
|
18
|
+
__exportStar(require("./request"), exports);
|
|
19
|
+
__exportStar(require("./response"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/users/home-layout/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,4CAAyB;AACzB,6CAA0B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/users/home-layout/request.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/users/home-layout/response.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-user Home screen layout — a personal, server-persisted arrangement of
|
|
3
|
+
* Home widgets. Stored directly on the user document (like `homeLocationId`),
|
|
4
|
+
* returned on `GET /users/current`, and written via
|
|
5
|
+
* `POST /users/current/home-layout`.
|
|
6
|
+
*
|
|
7
|
+
* The widget `type` is a closed union (below): adding a new widget kind is a
|
|
8
|
+
* contract change + republish + client bump. Per-widget `config` is left opaque
|
|
9
|
+
* — its shape is the client's concern, so a widget's behaviour can evolve
|
|
10
|
+
* without a contract change. Sections are modelled now (single + untitled in
|
|
11
|
+
* P1) so titled groups can land later without another contract change.
|
|
12
|
+
*/
|
|
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
|
+
/**
|
|
16
|
+
* The kinds of Home widget. Closed set — adding one is a contract change.
|
|
17
|
+
* - `tile-link` — a link card (a saved view, a nav destination, or a URL); may show a live count.
|
|
18
|
+
* - `summary-list` — top-N rows of a saved view's results.
|
|
19
|
+
* - `recent-activity` — the account's latest activity feed.
|
|
20
|
+
* - `recent-assets` / `recent-locations` — most-recently-updated entities.
|
|
21
|
+
* - `needs-attention` — assets flagged not-ready / partially-ready.
|
|
22
|
+
* - `kit-spotlight` — kit readiness summary.
|
|
23
|
+
*/
|
|
24
|
+
export declare type HomeWidgetType = 'tile-link' | 'summary-list' | 'recent-activity' | 'recent-assets' | 'recent-locations' | 'needs-attention' | 'kit-spotlight';
|
|
25
|
+
export interface HomeWidget {
|
|
26
|
+
/** Stable client-generated id (ulid) — the reorder / remove key. */
|
|
27
|
+
id: string;
|
|
28
|
+
/** Widget kind (closed union). The client registry maps it to a renderer + config shape. */
|
|
29
|
+
type: HomeWidgetType;
|
|
30
|
+
/** Width preset; falls back to the widget's registry default when omitted. */
|
|
31
|
+
span?: HomeWidgetSpan;
|
|
32
|
+
/** Widget-specific configuration (e.g. a saved-view id, a title, a row limit). Opaque to the API. */
|
|
33
|
+
config?: Record<string, unknown>;
|
|
34
|
+
}
|
|
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
|
+
export interface HomeLayout {
|
|
43
|
+
/** Layout schema version, for forward-migrating stored layouts. */
|
|
44
|
+
version: number;
|
|
45
|
+
sections: HomeLayoutSection[];
|
|
46
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Per-user Home screen layout — a personal, server-persisted arrangement of
|
|
4
|
+
* Home widgets. Stored directly on the user document (like `homeLocationId`),
|
|
5
|
+
* returned on `GET /users/current`, and written via
|
|
6
|
+
* `POST /users/current/home-layout`.
|
|
7
|
+
*
|
|
8
|
+
* The widget `type` is a closed union (below): adding a new widget kind is a
|
|
9
|
+
* contract change + republish + client bump. Per-widget `config` is left opaque
|
|
10
|
+
* — its shape is the client's concern, so a widget's behaviour can evolve
|
|
11
|
+
* without a contract change. Sections are modelled now (single + untitled in
|
|
12
|
+
* P1) so titled groups can land later without another contract change.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
//# sourceMappingURL=shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/users/home-layout/shared.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG"}
|
package/dist/users/index.d.ts
CHANGED
package/dist/users/index.js
CHANGED
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./constants"), exports);
|
|
18
18
|
__exportStar(require("./current"), exports);
|
|
19
|
+
__exportStar(require("./home-layout"), exports);
|
|
19
20
|
__exportStar(require("./post"), exports);
|
|
20
21
|
__exportStar(require("./get"), exports);
|
|
21
22
|
__exportStar(require("./[id]"), exports);
|
package/dist/users/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/users/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,4CAAyB;AACzB,yCAAsB;AACtB,wCAAqB;AACrB,yCAAsB;AACtB,4CAAyB;AACzB,mDAAgC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/users/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,4CAAyB;AACzB,gDAA6B;AAC7B,yCAAsB;AACtB,wCAAqB;AACrB,yCAAsB;AACtB,4CAAyB;AACzB,mDAAgC"}
|
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.8",
|
|
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": "94cde3fcfef3aaae93339641b208aca87965104c"
|
|
22
22
|
}
|