@spotto/contract 1.0.70-alpha.4 → 1.0.70-alpha.41
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 +12 -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 +25 -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 +63 -0
- package/dist/actions/shared.js +17 -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/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 +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 +16 -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 +77 -4
- package/dist/assets/get/query.js +3 -0
- package/dist/assets/get/query.js.map +1 -1
- package/dist/assets/get/response.d.ts +6 -0
- package/dist/assets/index.d.ts +3 -0
- package/dist/assets/index.js +3 -0
- package/dist/assets/index.js.map +1 -1
- package/dist/assets/location/request.d.ts +10 -1
- package/dist/assets/partitions/index.d.ts +2 -0
- package/dist/assets/partitions/index.js +19 -0
- package/dist/assets/partitions/index.js.map +1 -0
- package/dist/assets/partitions/query.d.ts +16 -0
- package/dist/assets/partitions/query.js +3 -0
- package/dist/assets/partitions/query.js.map +1 -0
- package/dist/assets/partitions/response.d.ts +10 -0
- package/dist/assets/partitions/response.js +3 -0
- package/dist/assets/partitions/response.js.map +1 -0
- package/dist/assets/post/request.d.ts +2 -0
- package/dist/assets/post/request.js.map +1 -1
- package/dist/assets/readiness/index.d.ts +2 -0
- package/dist/assets/readiness/index.js +19 -0
- package/dist/assets/readiness/index.js.map +1 -0
- package/dist/assets/readiness/query.d.ts +7 -0
- package/dist/assets/readiness/query.js +3 -0
- package/dist/assets/readiness/query.js.map +1 -0
- package/dist/assets/readiness/response.d.ts +24 -0
- package/dist/assets/readiness/response.js +3 -0
- package/dist/assets/readiness/response.js.map +1 -0
- package/dist/assets/rollup/index.d.ts +2 -0
- package/dist/assets/rollup/index.js +19 -0
- package/dist/assets/rollup/index.js.map +1 -0
- package/dist/assets/rollup/query.d.ts +12 -0
- package/dist/assets/rollup/query.js +5 -0
- package/dist/assets/rollup/query.js.map +1 -0
- package/dist/assets/rollup/response.d.ts +58 -0
- package/dist/assets/rollup/response.js +3 -0
- package/dist/assets/rollup/response.js.map +1 -0
- package/dist/events/constants.d.ts +52 -1
- package/dist/events/constants.js +46 -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 +107 -3
- package/dist/fields/[id]/get.d.ts +7 -0
- package/dist/fields/[id]/patch/request.d.ts +14 -0
- package/dist/fields/constants.d.ts +68 -0
- package/dist/fields/constants.js +29 -1
- package/dist/fields/constants.js.map +1 -1
- package/dist/fields/post/request.d.ts +6 -0
- package/dist/fields/post/request.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 +136 -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/locations/constants.d.ts +9 -0
- package/dist/locations/constants.js +10 -1
- package/dist/locations/constants.js.map +1 -1
- package/dist/locations/get/query.d.ts +22 -0
- package/dist/organisations/[id]/get.d.ts +7 -0
- package/dist/organisations/[id]/patch/request.d.ts +2 -0
- package/dist/organisations/constants.d.ts +20 -0
- package/dist/organisations/constants.js +10 -0
- package/dist/organisations/constants.js.map +1 -1
- 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 +876 -0
- package/dist/semantic-queries/shared.js +319 -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/snapshots/[id]/get.d.ts +142 -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 +34 -4
- package/dist/types/[id]/patch/request.d.ts +24 -4
- package/dist/types/constants.d.ts +9 -0
- package/dist/types/constants.js +13 -0
- package/dist/types/constants.js.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/post/request.d.ts +30 -4
- 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 +23 -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/access.d.ts +100 -0
- package/dist/usergroups/access.js +24 -0
- package/dist/usergroups/access.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 +44 -0
- package/dist/usergroups/get/response.js +3 -0
- package/dist/usergroups/get/response.js.map +1 -0
- package/dist/usergroups/index.d.ts +5 -0
- package/dist/usergroups/index.js +22 -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 +17 -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 +8 -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/console.d.ts +15 -0
- package/dist/users/console.js +5 -0
- package/dist/users/console.js.map +1 -0
- package/dist/users/current.d.ts +70 -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 +288 -0
- package/dist/users/home-layout/shared.js +30 -0
- package/dist/users/home-layout/shared.js.map +1 -0
- package/dist/users/index.d.ts +2 -0
- package/dist/users/index.js +2 -0
- package/dist/users/index.js.map +1 -1
- package/dist/users/password-reset.d.ts +8 -1
- package/dist/users/post/request.d.ts +12 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/assets/post/request.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/assets/post/request.ts"],"names":[],"mappings":";;;AAiBA,QAAQ;AACK,QAAA,oBAAoB,GAAqB;IACpD,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,MAAM;IAClB,MAAM,EAAE,OAAO;CAChB,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/assets/readiness/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,6CAA0B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CountAssetsQuery } from '../count';
|
|
2
|
+
/**
|
|
3
|
+
* The readiness summary takes exactly the facet count's inputs: the flat
|
|
4
|
+
* filters, or a stored query by reference (`semanticQueryId`, never combined
|
|
5
|
+
* with a filter) with the `timezone` its relative dates resolve in.
|
|
6
|
+
*/
|
|
7
|
+
export declare type GetAssetsReadinessQuery = CountAssetsQuery;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/assets/readiness/query.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The matching assets by readiness state (shared/readiness.ts), with the two
|
|
3
|
+
* numbers the Home summary shows beside them.
|
|
4
|
+
*
|
|
5
|
+
* `unevaluated` is the assets that carry no readiness object at all. Every
|
|
6
|
+
* write evaluates readiness (a type with no rules yields state 0), so these
|
|
7
|
+
* are assets not written since readiness shipped. Kept apart from `ready` on
|
|
8
|
+
* purpose: the `ready` FILTER folds the two together, a summary must not, or
|
|
9
|
+
* an account never evaluated reads as entirely ready.
|
|
10
|
+
*/
|
|
11
|
+
export interface GetAssetsReadinessResponse {
|
|
12
|
+
/** Every matching asset, whatever its state. */
|
|
13
|
+
total: number;
|
|
14
|
+
/** Readiness state 0: no fired issue. */
|
|
15
|
+
ready: number;
|
|
16
|
+
/** Worst fired issue at level 1. */
|
|
17
|
+
warning: number;
|
|
18
|
+
/** Worst fired issue at level 2. */
|
|
19
|
+
blocking: number;
|
|
20
|
+
/** No readiness object on the asset at all: not written since readiness shipped. */
|
|
21
|
+
unevaluated: number;
|
|
22
|
+
/** Matching assets whose type is a kit. */
|
|
23
|
+
kits: number;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/assets/readiness/response.ts"],"names":[],"mappings":""}
|
|
@@ -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/assets/rollup/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,6CAA0B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CountAssetsQuery } from '../count';
|
|
2
|
+
/** The dimension a rollup tallies by. */
|
|
3
|
+
export declare type AssetRollupBy = 'type' | 'location';
|
|
4
|
+
export declare const ASSET_ROLLUP_BY: AssetRollupBy[];
|
|
5
|
+
/**
|
|
6
|
+
* The rollup takes the facet count's inputs — the flat filters, or a stored
|
|
7
|
+
* query by reference (`semanticQueryId`, never combined with a filter) with
|
|
8
|
+
* the `timezone` its relative dates resolve in — plus the dimension.
|
|
9
|
+
*/
|
|
10
|
+
export interface GetAssetsRollupQuery extends CountAssetsQuery {
|
|
11
|
+
by: AssetRollupBy;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/assets/rollup/query.ts"],"names":[],"mappings":";;;AAIa,QAAA,eAAe,GAAoB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { LocationStatus } from '../../locations/constants';
|
|
2
|
+
import { ReadinessState } from '../../shared';
|
|
3
|
+
import { AssetRollupBy } from './query';
|
|
4
|
+
/**
|
|
5
|
+
* One line of the tally: every matching asset with this path (and, for the
|
|
6
|
+
* assets with no location, this status) and this readiness state, counted.
|
|
7
|
+
* The lines are the whole answer — never paged, never sorted — because a
|
|
8
|
+
* tree is built from all of them: a parent's number is the sum of the lines
|
|
9
|
+
* beneath it, which is the client's fold, the same one it runs over a local
|
|
10
|
+
* copy.
|
|
11
|
+
*
|
|
12
|
+
* What a line does NOT carry, on purpose: names, ids, or anything else that
|
|
13
|
+
* lives only in the document. The fields here are exactly the ones the
|
|
14
|
+
* widened path indexes hold, so an unfiltered tally is answered from index
|
|
15
|
+
* entries alone (db-management/migrations/20260915120000).
|
|
16
|
+
*/
|
|
17
|
+
export interface AssetRollupLine {
|
|
18
|
+
/**
|
|
19
|
+
* The type path (`by=type`) or the location path (`by=location`), pipe
|
|
20
|
+
* delimited. An untyped asset carries `''` (created that way) or `null`
|
|
21
|
+
* (typed once, then untyped): fold both as untyped. In the location tally
|
|
22
|
+
* `null` is an asset with no state, or a state with no location (a status
|
|
23
|
+
* of `UNKNOWN` or `MAP`): read the status, not the path, for "never seen".
|
|
24
|
+
*/
|
|
25
|
+
path: string | null;
|
|
26
|
+
/**
|
|
27
|
+
* `by=location`, and only on a line whose path has no segments: the
|
|
28
|
+
* location status as stored (unknown, a map fix, carried by another asset,
|
|
29
|
+
* dispatched…), or `NEVERSEEN` for an asset with no state at all (the rule
|
|
30
|
+
* `GET /assets/{id}` applies to `lastLocation.status`). A line with a path
|
|
31
|
+
* is placed by its path and carries no status — its statuses are merged.
|
|
32
|
+
* Absent in the type tally.
|
|
33
|
+
*/
|
|
34
|
+
status?: LocationStatus;
|
|
35
|
+
/** The readiness state as stored; `null` for an asset with no readiness object (not written since readiness shipped). */
|
|
36
|
+
ready: ReadinessState | null;
|
|
37
|
+
count: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* `by=type` only: how many distinct locations hold assets of this type path
|
|
41
|
+
* or of any type path beneath it — one entry per path and per ancestor
|
|
42
|
+
* prefix, each written as the client keys its nodes (every segment followed
|
|
43
|
+
* by a pipe, so `Pump|` and `Pump|Portable|`), and `''` for the untyped
|
|
44
|
+
* assets. Folded on the server from the (type, location) pairs, which never
|
|
45
|
+
* leave it. An asset with no location adds to nothing.
|
|
46
|
+
*/
|
|
47
|
+
export interface AssetRollupPlaces {
|
|
48
|
+
path: string;
|
|
49
|
+
count: number;
|
|
50
|
+
}
|
|
51
|
+
export interface GetAssetsRollupResponse {
|
|
52
|
+
by: AssetRollupBy;
|
|
53
|
+
/** Every matching asset: the sum of the lines. */
|
|
54
|
+
total: number;
|
|
55
|
+
items: AssetRollupLine[];
|
|
56
|
+
/** Present for `by=type`; see AssetRollupPlaces. */
|
|
57
|
+
places?: AssetRollupPlaces[];
|
|
58
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/assets/rollup/response.ts"],"names":[],"mappings":""}
|
|
@@ -4,6 +4,57 @@ export declare type AssetCrudEventType = 'AssetCreated' | 'AssetUpdated' | 'Asse
|
|
|
4
4
|
export declare type LocationCrudEventType = 'LocationCreated' | 'LocationUpdated' | 'LocationDeleted';
|
|
5
5
|
export declare type ReaderCrudEventType = 'ReaderCreated' | 'ReaderUpdated' | 'ReaderDeleted';
|
|
6
6
|
export declare type SnapshotCrudEventType = 'SnapshotCreated' | 'SnapshotDeleted';
|
|
7
|
+
/**
|
|
8
|
+
* Asset-type CRUD events (option rules §8, R2). Stored only — never published
|
|
9
|
+
* to Slate. A `TypeUpdated` is also written for every OTHER type whose
|
|
10
|
+
* authored option list a propagation rewrote (`payload.propagation`).
|
|
11
|
+
*/
|
|
12
|
+
export declare type TypeCrudEventType = 'TypeCreated' | 'TypeUpdated' | 'TypeDeleted';
|
|
13
|
+
/**
|
|
14
|
+
* A readiness transition: the asset's verdict (green / amber / red) moved.
|
|
15
|
+
* Stored only — never published to Slate. Written by every path that
|
|
16
|
+
* re-derives readiness — an asset write, a kit re-roll, a type-rule edit and
|
|
17
|
+
* the scheduled refresh — so the log records the move whoever or whatever
|
|
18
|
+
* caused it, and a user is present only when a person's action led there.
|
|
19
|
+
*/
|
|
20
|
+
export declare type ReadinessEventType = 'AssetReadinessChanged';
|
|
21
|
+
/**
|
|
22
|
+
* What moved an asset's readiness verdict.
|
|
23
|
+
* - `edit`: the asset itself was written — an edit, a form write-back, a
|
|
24
|
+
* stocktake's manifest verdict on a kit.
|
|
25
|
+
* - `rules`: its type's readiness rules or bindings changed and every asset
|
|
26
|
+
* of the type was re-evaluated.
|
|
27
|
+
* - `members`: a kit re-rolled because a member changed, joined or left.
|
|
28
|
+
* - `schedule`: the scheduled refresh noticed the date moved.
|
|
29
|
+
*/
|
|
30
|
+
export declare type ReadinessChangeCause = 'edit' | 'rules' | 'members' | 'schedule';
|
|
31
|
+
export declare const READINESS_CHANGE_CAUSES: ReadinessChangeCause[];
|
|
32
|
+
export declare type FormEventType = 'FormSubmitted' | 'FormSubmissionVoided';
|
|
7
33
|
export declare type SlateEventType = 'ReaderArrived' | 'ReaderExited' | 'Arrived' | 'Moved' | 'Exited' | 'ReaderOnline' | 'ReaderOffline' | 'AssetDispatch';
|
|
8
|
-
export declare type EventType = SlateEventType | AssetCrudEventType | LocationCrudEventType | ReaderCrudEventType | SnapshotCrudEventType | 'UserSearch' | 'WorkflowActionExecuted';
|
|
34
|
+
export declare type EventType = SlateEventType | AssetCrudEventType | LocationCrudEventType | ReaderCrudEventType | SnapshotCrudEventType | TypeCrudEventType | ReadinessEventType | FormEventType | 'UserSearch' | 'WorkflowActionExecuted';
|
|
9
35
|
export declare const EVENT_TYPES: EventType[];
|
|
36
|
+
/** The asset-type CRUD events as a value, for the surfaces that list them. */
|
|
37
|
+
export declare const TYPE_CRUD_EVENT_TYPES: TypeCrudEventType[];
|
|
38
|
+
/**
|
|
39
|
+
* The asset CRUD events as a VALUE — the only events whose `thing` is a full
|
|
40
|
+
* asset document (`IAssetCrudSchema`) rather than a bare reference.
|
|
41
|
+
*
|
|
42
|
+
* Exported because the semantic layer scopes `assetType` on activity to exactly
|
|
43
|
+
* these: every movement event embeds a reduced `thing` with no `typePath`, so
|
|
44
|
+
* "movements of forklifts" would match nothing while "forklifts created"
|
|
45
|
+
* worked — right half the time and silent about which half. Compiler,
|
|
46
|
+
* evaluator, AI preamble and the client's chip all read THIS list; four hand
|
|
47
|
+
* written copies would drift the day a fourth asset CRUD event exists.
|
|
48
|
+
*
|
|
49
|
+
* Typed as `AssetCrudEventType[]` so the list cannot diverge from the union.
|
|
50
|
+
*/
|
|
51
|
+
export declare const ASSET_CRUD_EVENT_TYPES: AssetCrudEventType[];
|
|
52
|
+
/**
|
|
53
|
+
* The events whose embedded asset records its TYPE PATH (`thing.typePath`
|
|
54
|
+
* in storage): the CRUD trio, which embeds the whole asset, and the
|
|
55
|
+
* readiness transition, which embeds the asset's identity, type path and
|
|
56
|
+
* verdict. The `assetType` condition on activity is scoped to exactly these
|
|
57
|
+
* — the compiler, the evaluator, the validator's pairing guard and the AI
|
|
58
|
+
* preamble all read THIS list, for the reason `ASSET_CRUD_EVENT_TYPES` gives.
|
|
59
|
+
*/
|
|
60
|
+
export declare const TYPED_ASSET_EVENT_TYPES: (AssetCrudEventType | ReadinessEventType)[];
|
package/dist/events/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EVENT_TYPES = exports.EVENT_COUNT_BREAKDOWN = void 0;
|
|
3
|
+
exports.TYPED_ASSET_EVENT_TYPES = exports.ASSET_CRUD_EVENT_TYPES = exports.TYPE_CRUD_EVENT_TYPES = exports.EVENT_TYPES = exports.READINESS_CHANGE_CAUSES = exports.EVENT_COUNT_BREAKDOWN = void 0;
|
|
4
4
|
exports.EVENT_COUNT_BREAKDOWN = [
|
|
5
5
|
'year',
|
|
6
6
|
'week',
|
|
@@ -8,6 +8,12 @@ exports.EVENT_COUNT_BREAKDOWN = [
|
|
|
8
8
|
'day',
|
|
9
9
|
'hour',
|
|
10
10
|
];
|
|
11
|
+
exports.READINESS_CHANGE_CAUSES = [
|
|
12
|
+
'edit',
|
|
13
|
+
'rules',
|
|
14
|
+
'members',
|
|
15
|
+
'schedule',
|
|
16
|
+
];
|
|
11
17
|
exports.EVENT_TYPES = [
|
|
12
18
|
'ReaderArrived',
|
|
13
19
|
'ReaderExited',
|
|
@@ -28,7 +34,46 @@ exports.EVENT_TYPES = [
|
|
|
28
34
|
'ReaderDeleted',
|
|
29
35
|
'SnapshotCreated',
|
|
30
36
|
'SnapshotDeleted',
|
|
37
|
+
'TypeCreated',
|
|
38
|
+
'TypeUpdated',
|
|
39
|
+
'TypeDeleted',
|
|
40
|
+
'AssetReadinessChanged',
|
|
41
|
+
'FormSubmitted',
|
|
42
|
+
'FormSubmissionVoided',
|
|
31
43
|
'UserSearch',
|
|
32
44
|
'WorkflowActionExecuted',
|
|
33
45
|
];
|
|
46
|
+
/** The asset-type CRUD events as a value, for the surfaces that list them. */
|
|
47
|
+
exports.TYPE_CRUD_EVENT_TYPES = [
|
|
48
|
+
'TypeCreated',
|
|
49
|
+
'TypeUpdated',
|
|
50
|
+
'TypeDeleted',
|
|
51
|
+
];
|
|
52
|
+
/**
|
|
53
|
+
* The asset CRUD events as a VALUE — the only events whose `thing` is a full
|
|
54
|
+
* asset document (`IAssetCrudSchema`) rather than a bare reference.
|
|
55
|
+
*
|
|
56
|
+
* Exported because the semantic layer scopes `assetType` on activity to exactly
|
|
57
|
+
* these: every movement event embeds a reduced `thing` with no `typePath`, so
|
|
58
|
+
* "movements of forklifts" would match nothing while "forklifts created"
|
|
59
|
+
* worked — right half the time and silent about which half. Compiler,
|
|
60
|
+
* evaluator, AI preamble and the client's chip all read THIS list; four hand
|
|
61
|
+
* written copies would drift the day a fourth asset CRUD event exists.
|
|
62
|
+
*
|
|
63
|
+
* Typed as `AssetCrudEventType[]` so the list cannot diverge from the union.
|
|
64
|
+
*/
|
|
65
|
+
exports.ASSET_CRUD_EVENT_TYPES = [
|
|
66
|
+
'AssetCreated',
|
|
67
|
+
'AssetUpdated',
|
|
68
|
+
'AssetDeleted',
|
|
69
|
+
];
|
|
70
|
+
/**
|
|
71
|
+
* The events whose embedded asset records its TYPE PATH (`thing.typePath`
|
|
72
|
+
* in storage): the CRUD trio, which embeds the whole asset, and the
|
|
73
|
+
* readiness transition, which embeds the asset's identity, type path and
|
|
74
|
+
* verdict. The `assetType` condition on activity is scoped to exactly these
|
|
75
|
+
* — the compiler, the evaluator, the validator's pairing guard and the AI
|
|
76
|
+
* preamble all read THIS list, for the reason `ASSET_CRUD_EVENT_TYPES` gives.
|
|
77
|
+
*/
|
|
78
|
+
exports.TYPED_ASSET_EVENT_TYPES = [...exports.ASSET_CRUD_EVENT_TYPES, 'AssetReadinessChanged'];
|
|
34
79
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/events/constants.ts"],"names":[],"mappings":";;;AACa,QAAA,qBAAqB,GAA0B;IAC1D,MAAM;IACN,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;CACP,CAAA;
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/events/constants.ts"],"names":[],"mappings":";;;AACa,QAAA,qBAAqB,GAA0B;IAC1D,MAAM;IACN,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;CACP,CAAA;AA8CY,QAAA,uBAAuB,GAA2B;IAC7D,MAAM;IACN,OAAO;IACP,SAAS;IACT,UAAU;CACX,CAAA;AA0BY,QAAA,WAAW,GAAgB;IACtC,eAAe;IACf,cAAc;IACd,SAAS;IACT,OAAO;IACP,QAAQ;IACR,cAAc;IACd,eAAe;IACf,eAAe;IACf,cAAc;IACd,cAAc;IACd,cAAc;IACd,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,eAAe;IACf,eAAe;IACf,eAAe;IACf,iBAAiB;IACjB,iBAAiB;IACjB,aAAa;IACb,aAAa;IACb,aAAa;IACb,uBAAuB;IACvB,eAAe;IACf,sBAAsB;IACtB,YAAY;IACZ,wBAAwB;CACzB,CAAA;AAED,8EAA8E;AACjE,QAAA,qBAAqB,GAAwB;IACxD,aAAa;IACb,aAAa;IACb,aAAa;CACd,CAAA;AAED;;;;;;;;;;;;GAYG;AACU,QAAA,sBAAsB,GAAyB;IAC1D,cAAc;IACd,cAAc;IACd,cAAc;CACf,CAAA;AAED;;;;;;;GAOG;AACU,QAAA,uBAAuB,GAClC,CAAC,GAAG,8BAAsB,EAAE,uBAAuB,CAAC,CAAA"}
|
|
@@ -12,4 +12,29 @@ export interface GetEventsQuery extends EventFilters {
|
|
|
12
12
|
page?: number;
|
|
13
13
|
limit?: number;
|
|
14
14
|
sortOrder?: SortOrders;
|
|
15
|
+
/**
|
|
16
|
+
* Run a stored semantic query instead of the filters above. The stored query
|
|
17
|
+
* REPLACES them — it is not merged, because two filter systems combined
|
|
18
|
+
* produce rows nobody asked for.
|
|
19
|
+
*
|
|
20
|
+
* Deliberately on the QUERY and not on `EventFilters`: download and count
|
|
21
|
+
* extend that interface, and inheriting an id they do not execute would mean
|
|
22
|
+
* accepting it and silently ignoring it.
|
|
23
|
+
*/
|
|
24
|
+
semanticQueryId?: string;
|
|
25
|
+
/**
|
|
26
|
+
* A semantic query serialised as JSON, run WITHOUT being stored.
|
|
27
|
+
*
|
|
28
|
+
* Activity is the one entity with no offline corpus, so unlike assets and
|
|
29
|
+
* locations its filters must reach the server. Sending the conditions rather
|
|
30
|
+
* than a reference is what lets an AI answer and a hand-built picker be the
|
|
31
|
+
* same thing: a chip removal edits the query in the URL and re-runs it, with
|
|
32
|
+
* no draft minted per interaction and no link that expires when a 24h draft
|
|
33
|
+
* does.
|
|
34
|
+
*
|
|
35
|
+
* Mutually exclusive with `semanticQueryId` — two queries is not a question.
|
|
36
|
+
*/
|
|
37
|
+
semanticQuery?: string;
|
|
38
|
+
/** IANA zone for the query's relative dates; the record's own wins if set. */
|
|
39
|
+
timezone?: string;
|
|
15
40
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { IEmbeddedEntity } from '../../shared';
|
|
2
|
-
import { AssetCrudEventType, EventType, LocationCrudEventType, ReaderCrudEventType, SnapshotCrudEventType } from '../constants';
|
|
1
|
+
import { IEmbeddedEntity, IReadiness, ReadinessState } from '../../shared';
|
|
2
|
+
import { AssetCrudEventType, EventType, LocationCrudEventType, ReaderCrudEventType, ReadinessChangeCause, ReadinessEventType, SnapshotCrudEventType, TypeCrudEventType } from '../constants';
|
|
3
3
|
import { GetEventsQuery } from './query';
|
|
4
4
|
import { DeviceType, ReaderType } from '../../readers/constants';
|
|
5
5
|
import { LocationType } from '../../locations/constants';
|
|
6
6
|
import { GetSnapshotResponse } from '../../snapshots';
|
|
7
7
|
import { ExecutedWorkflow } from '../../workflows';
|
|
8
8
|
import { GetAssetResponse } from '../../assets';
|
|
9
|
+
import { GetTypeResponse } from '../../types/[id]/get';
|
|
10
|
+
import { ISubmissionAssetEmbed, ISubmissionPayload, ISubmissionVoidPayload } from '../../submissions';
|
|
9
11
|
export interface EventLocation {
|
|
10
12
|
id?: string;
|
|
11
13
|
name?: string;
|
|
@@ -75,6 +77,93 @@ export interface ISnapshotCrudEvent extends IBaseEvent {
|
|
|
75
77
|
user: IEmbeddedEntity;
|
|
76
78
|
payload: ISnapshotEventPayload;
|
|
77
79
|
}
|
|
80
|
+
/** The asset type an event is about (`type` being the event's own kind). */
|
|
81
|
+
export interface IEventAssetType extends IEmbeddedEntity {
|
|
82
|
+
/** Pipe-delimited path of the type at the time. */
|
|
83
|
+
path?: string;
|
|
84
|
+
/** Display name of the type at the time. */
|
|
85
|
+
fullName?: string;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* One option-list rewrite made BY propagation (option rules §4.2, §4.4): a
|
|
89
|
+
* value added at `origin` reached this type's authored list on the way up or
|
|
90
|
+
* down the tree, or a value removed at `origin` was pulled from it.
|
|
91
|
+
*/
|
|
92
|
+
export interface ITypeEventPropagation {
|
|
93
|
+
field: IEmbeddedEntity;
|
|
94
|
+
added: string[];
|
|
95
|
+
removed: string[];
|
|
96
|
+
origin: IEmbeddedEntity;
|
|
97
|
+
}
|
|
98
|
+
export interface ITypeEventPayload {
|
|
99
|
+
/**
|
|
100
|
+
* The authored keys whose stored value differs between the states the
|
|
101
|
+
* event records (`previousTypeState` → `newTypeState`; nothing → the new
|
|
102
|
+
* state on a create), in authored order. Not the keys the request sent: an
|
|
103
|
+
* editor re-sends a whole section, and a key re-sent unchanged is no
|
|
104
|
+
* change. Empty on a propagated write.
|
|
105
|
+
*/
|
|
106
|
+
changed: string[];
|
|
107
|
+
/** Present only on a write made by propagation from another type's edit. */
|
|
108
|
+
propagation?: ITypeEventPropagation;
|
|
109
|
+
/** Values the edit appended to a field's master list (R1), on the origin's event. */
|
|
110
|
+
masterAdded?: string[];
|
|
111
|
+
}
|
|
112
|
+
export interface ITypeCrudEvent extends IBaseEvent {
|
|
113
|
+
type: TypeCrudEventType;
|
|
114
|
+
assetType: IEventAssetType;
|
|
115
|
+
user: IEmbeddedEntity;
|
|
116
|
+
payload: ITypeEventPayload;
|
|
117
|
+
/** `TypeUpdated` / `TypeDeleted` — the type's authored keys before the write (no resolved `*All` caches). */
|
|
118
|
+
previousTypeState?: GetTypeResponse;
|
|
119
|
+
/**
|
|
120
|
+
* `TypeUpdated` / `TypeCreated` — the type's authored keys after the write,
|
|
121
|
+
* in the same shape. Diff the two for what changed, as `asset` and
|
|
122
|
+
* `previousAssetState` on an asset event.
|
|
123
|
+
*/
|
|
124
|
+
newTypeState?: GetTypeResponse;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* The subject of a readiness transition: the asset's identity, its type path
|
|
128
|
+
* at the time, and its verdict after the move. Not the whole asset — the
|
|
129
|
+
* values a person authored are on the `AssetUpdated` beside an edit, and on
|
|
130
|
+
* the other causes nothing authored changed.
|
|
131
|
+
*/
|
|
132
|
+
export interface IReadinessEventAsset extends IEmbeddedEntity {
|
|
133
|
+
/** Pipe-delimited path of the asset's type at the time. */
|
|
134
|
+
typePath?: string;
|
|
135
|
+
/** The verdict and the issues firing after the move. */
|
|
136
|
+
readiness: IReadiness;
|
|
137
|
+
}
|
|
138
|
+
export interface IAssetReadinessChangedPayload {
|
|
139
|
+
/**
|
|
140
|
+
* The verdict the asset moved to — the same value as
|
|
141
|
+
* `asset.readiness.ready`, at the top so a filter never opens the embed.
|
|
142
|
+
*/
|
|
143
|
+
ready: ReadinessState;
|
|
144
|
+
/**
|
|
145
|
+
* The verdict it moved from. Absent when the asset had never been
|
|
146
|
+
* evaluated: its first verdict, which is recorded only when it lands amber
|
|
147
|
+
* or red, is not a move from green.
|
|
148
|
+
*/
|
|
149
|
+
previousReady?: ReadinessState;
|
|
150
|
+
cause: ReadinessChangeCause;
|
|
151
|
+
/** `members` — the member whose change re-rolled this kit, when one asset was the cause. */
|
|
152
|
+
origin?: IEmbeddedEntity;
|
|
153
|
+
/** The stocktake the change came through, when it did. */
|
|
154
|
+
snapshotId?: string;
|
|
155
|
+
/** The form submission whose write-back caused the change, when one did. */
|
|
156
|
+
submissionId?: string;
|
|
157
|
+
}
|
|
158
|
+
export interface IAssetReadinessChangedEvent extends IBaseEvent {
|
|
159
|
+
type: ReadinessEventType;
|
|
160
|
+
asset: IReadinessEventAsset;
|
|
161
|
+
/** The person whose action led to the move. Absent on the scheduled refresh. */
|
|
162
|
+
user?: IEmbeddedEntity;
|
|
163
|
+
/** The verdict and issues before the move. Absent on a first evaluation. */
|
|
164
|
+
previousReadiness?: IReadiness;
|
|
165
|
+
payload: IAssetReadinessChangedPayload;
|
|
166
|
+
}
|
|
78
167
|
export interface IUserSearchEvent extends IBaseEvent {
|
|
79
168
|
type: 'UserSearch';
|
|
80
169
|
entity: string;
|
|
@@ -85,6 +174,21 @@ export interface IWorkflowActionExecutedEvent extends IBaseEvent {
|
|
|
85
174
|
type: 'WorkflowActionExecuted';
|
|
86
175
|
workflow: ExecutedWorkflow;
|
|
87
176
|
}
|
|
177
|
+
/** Exactly one of `asset`/`location` is present — the run's target (§4.4). */
|
|
178
|
+
export interface IFormSubmittedEvent extends IBaseEvent {
|
|
179
|
+
type: 'FormSubmitted';
|
|
180
|
+
asset?: ISubmissionAssetEmbed;
|
|
181
|
+
location?: IEmbeddedEntity;
|
|
182
|
+
user: IEmbeddedEntity;
|
|
183
|
+
submission: ISubmissionPayload;
|
|
184
|
+
}
|
|
185
|
+
export interface IFormSubmissionVoidedEvent extends IBaseEvent {
|
|
186
|
+
type: 'FormSubmissionVoided';
|
|
187
|
+
asset?: ISubmissionAssetEmbed;
|
|
188
|
+
location?: IEmbeddedEntity;
|
|
189
|
+
user: IEmbeddedEntity;
|
|
190
|
+
submission: ISubmissionVoidPayload;
|
|
191
|
+
}
|
|
88
192
|
export interface IArrivedEventAsset extends IEmbeddedEntity {
|
|
89
193
|
dispatch?: boolean;
|
|
90
194
|
userId?: string;
|
|
@@ -137,7 +241,7 @@ export interface IAssetDispatchEvent extends IBaseEvent {
|
|
|
137
241
|
location?: AssetEventLocation;
|
|
138
242
|
dispatchExpires: number;
|
|
139
243
|
}
|
|
140
|
-
export declare type GetEventResponse = IAssetCrudEvent | ILocationCrudEvent | IReaderCrudEvent | ISnapshotCrudEvent | IUserSearchEvent | IReaderArrivedEvent | IReaderExitedEvent | IArrivedEvent | IMovedEvent | IExitedEvent | IReaderOnlineEvent | IReaderOfflineEvent | IAssetDispatchEvent | IWorkflowActionExecutedEvent;
|
|
244
|
+
export declare type GetEventResponse = IAssetCrudEvent | ILocationCrudEvent | IReaderCrudEvent | ISnapshotCrudEvent | ITypeCrudEvent | IAssetReadinessChangedEvent | IUserSearchEvent | IReaderArrivedEvent | IReaderExitedEvent | IArrivedEvent | IMovedEvent | IExitedEvent | IReaderOnlineEvent | IReaderOfflineEvent | IAssetDispatchEvent | IWorkflowActionExecutedEvent | IFormSubmittedEvent | IFormSubmissionVoidedEvent;
|
|
141
245
|
export interface GetEventsResponse {
|
|
142
246
|
query: GetEventsQuery | null;
|
|
143
247
|
items: GetEventResponse[];
|
|
@@ -3,12 +3,19 @@ export interface GetFieldResponse {
|
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
5
5
|
dataType: FieldDataType;
|
|
6
|
+
/** Defaulted from `dataType` when not supplied at creation; can be changed later. */
|
|
6
7
|
inputType?: FieldInputType;
|
|
7
8
|
label?: string;
|
|
8
9
|
required?: boolean;
|
|
9
10
|
rememberLast?: boolean;
|
|
10
11
|
regex?: string;
|
|
11
12
|
options?: string[];
|
|
13
|
+
/**
|
|
14
|
+
* Options no longer offered for new values. Every value is in `options`;
|
|
15
|
+
* subtracted from every type's projection at read, never from stored
|
|
16
|
+
* values. Absent = none.
|
|
17
|
+
*/
|
|
18
|
+
discontinued?: string[];
|
|
12
19
|
integerMin?: number;
|
|
13
20
|
integerMax?: number;
|
|
14
21
|
decimalMin?: number;
|
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
import { FieldInputType } from '../../constants';
|
|
2
2
|
export interface UpdateFieldRequestOption {
|
|
3
3
|
value: string;
|
|
4
|
+
/**
|
|
5
|
+
* The option's current name, to rename it to `value` (surrounding
|
|
6
|
+
* whitespace is ignored, as on `value`); one that names no current option
|
|
7
|
+
* makes `value` a plain new option.
|
|
8
|
+
*/
|
|
4
9
|
previousValue?: string;
|
|
5
10
|
}
|
|
6
11
|
export interface UpdateFieldRequest {
|
|
12
|
+
/** Omit to keep the current input type; it cannot be cleared. */
|
|
7
13
|
inputType?: FieldInputType;
|
|
8
14
|
label?: string | null;
|
|
9
15
|
required?: boolean;
|
|
10
16
|
rememberLast?: boolean | null;
|
|
11
17
|
regex?: string | null;
|
|
12
18
|
options?: UpdateFieldRequestOption[];
|
|
19
|
+
/**
|
|
20
|
+
* Options no longer offered for new values — replaced wholesale; `[]`
|
|
21
|
+
* clears it; omit to leave it untouched. Each value must be an option as
|
|
22
|
+
* they stand after this request; an entry naming a value as it stood
|
|
23
|
+
* before follows the request's rename of it, and is left out by its
|
|
24
|
+
* removal or merge — so a stored list may be sent back unchanged.
|
|
25
|
+
*/
|
|
26
|
+
discontinued?: string[];
|
|
13
27
|
integerMin?: number | null;
|
|
14
28
|
integerMax?: number | null;
|
|
15
29
|
decimalMin?: number | null;
|
|
@@ -2,3 +2,71 @@ export declare type FieldDataType = 'STRING' | 'INTEGER' | 'DECIMAL' | 'BOOLEAN'
|
|
|
2
2
|
export declare const FIELD_DATA_TYPES: FieldDataType[];
|
|
3
3
|
export declare type FieldInputType = 'SINGLELINE' | 'MULTILINE' | 'LINK' | 'RICHTEXT' | 'DROPDOWN' | 'RADIO' | 'CHECKBOXES' | 'DATE' | 'DATETIME' | 'INTEGER' | 'DECIMAL' | 'SWITCH';
|
|
4
4
|
export declare const FIELD_INPUT_TYPES: FieldInputType[];
|
|
5
|
+
/**
|
|
6
|
+
* The input type a field gets when created without `inputType`: the plainest
|
|
7
|
+
* input for its data type (the Spotto client's own preset for a new field).
|
|
8
|
+
* One exception is applied by the API on top of this table: a `STRING` field
|
|
9
|
+
* created with `options` defaults to a `DROPDOWN`.
|
|
10
|
+
*/
|
|
11
|
+
export declare const DEFAULT_FIELD_INPUT_TYPES: {
|
|
12
|
+
[key in FieldDataType]: FieldInputType;
|
|
13
|
+
};
|
|
14
|
+
export declare type FieldSource = 'INPUT' | 'COMPUTED' | 'AGGREGATED';
|
|
15
|
+
export declare const FIELD_SOURCES: FieldSource[];
|
|
16
|
+
export declare type AggregateFunction = 'SUM' | 'AVG' | 'MIN' | 'MAX' | 'COUNT';
|
|
17
|
+
export declare const AGGREGATE_FUNCTIONS: AggregateFunction[];
|
|
18
|
+
/**
|
|
19
|
+
* A per-type field-binding delta, layered onto the inherited field identity
|
|
20
|
+
* (`fieldsAll = parent.fieldsAll ⊕ fields`). Omitted `source` on an override =
|
|
21
|
+
* inherit; explicit `INPUT` = reset to user-entered.
|
|
22
|
+
* - `expression` — COMPUTED: excelexp over the asset's other fields.
|
|
23
|
+
* - `visibleWhen` — conditional visibility (client-render only).
|
|
24
|
+
* - `function` — AGGREGATED (M2 — kits): the same field is reduced across
|
|
25
|
+
* a kit's direct members.
|
|
26
|
+
* - `label` / `required` / `rememberLast` — per-type presentation overrides
|
|
27
|
+
* of the global field's values; nearest authored type wins, an omitted key
|
|
28
|
+
* inherits (option rules §2.2).
|
|
29
|
+
* - `options` — a whitelist of the field's options for this type and its
|
|
30
|
+
* descendants, in the order to offer them (option rules §2.2, §4.2). The
|
|
31
|
+
* nearest authored list wins; an omitted key inherits the parent's. Kept
|
|
32
|
+
* inside the parent's list by PROPAGATION: a value added here is appended
|
|
33
|
+
* to every ancestor's authored list that lacks it (and to the field's
|
|
34
|
+
* master, under `fields:update`), a value removed here is pulled from every
|
|
35
|
+
* descendant's authored list. Never authored empty; may become `[]` through
|
|
36
|
+
* a removal above.
|
|
37
|
+
* - `detach` — unbind an INHERITED field from this type down (LOG-2292);
|
|
38
|
+
* a detach row carries no other configuration. Stored values are kept.
|
|
39
|
+
*/
|
|
40
|
+
export interface IFieldBindingDelta {
|
|
41
|
+
source?: FieldSource;
|
|
42
|
+
expression?: string;
|
|
43
|
+
visibleWhen?: string;
|
|
44
|
+
function?: AggregateFunction;
|
|
45
|
+
label?: string;
|
|
46
|
+
required?: boolean;
|
|
47
|
+
rememberLast?: boolean;
|
|
48
|
+
options?: string[];
|
|
49
|
+
optionRules?: OptionRule[];
|
|
50
|
+
detach?: boolean;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* A conditional option rule (option rules §2.2, §3.5): while `expression`
|
|
54
|
+
* holds over the record's values, the offered list is narrowed to `options`
|
|
55
|
+
* (intersected, order kept). Authored on a type's field rows — where it
|
|
56
|
+
* applies to records of exactly that type, never inherited (U2) — and on
|
|
57
|
+
* form items. `options` may name only values on the authoring type's list
|
|
58
|
+
* (U3; a form item's, the field's master). `expression` is required: an
|
|
59
|
+
* unconditional narrowing is a type's `options` or the field's
|
|
60
|
+
* `discontinued`.
|
|
61
|
+
*/
|
|
62
|
+
export interface OptionRule {
|
|
63
|
+
expression: string;
|
|
64
|
+
options: string[];
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The delta keys a type-level field row (`typeFields[]`) may carry: the
|
|
68
|
+
* presentation overrides, the option whitelist, the option rules and
|
|
69
|
+
* `detach`, never a value source (a type field's value lives on the type,
|
|
70
|
+
* not on an asset) and never `rememberLast`.
|
|
71
|
+
*/
|
|
72
|
+
export declare type ITypeFieldBindingDelta = Pick<IFieldBindingDelta, 'label' | 'required' | 'options' | 'optionRules' | 'detach'>;
|