@fleetless/contracts 1.0.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/CHANGELOG.md +26 -0
- package/LICENSE +202 -0
- package/NOTICE +17 -0
- package/README.md +88 -0
- package/artifacts/constants.json +24 -0
- package/artifacts/openapi.json +17219 -0
- package/artifacts/routes.json +4605 -0
- package/artifacts/schema/accept-team-invite-request.schema.json +22 -0
- package/artifacts/schema/action-config.schema.json +198 -0
- package/artifacts/schema/alert-list-response.schema.json +172 -0
- package/artifacts/schema/api-error.schema.json +20 -0
- package/artifacts/schema/app-auth-config.schema.json +106 -0
- package/artifacts/schema/app-invitation-list-response.schema.json +57 -0
- package/artifacts/schema/app-invitation.schema.json +69 -0
- package/artifacts/schema/app-list-response.schema.json +82 -0
- package/artifacts/schema/app-mail-template-list-response.schema.json +68 -0
- package/artifacts/schema/app-mail-template.schema.json +54 -0
- package/artifacts/schema/app-oidc-provider-list-response.schema.json +93 -0
- package/artifacts/schema/app-oidc-provider.schema.json +80 -0
- package/artifacts/schema/app-user-list-response.schema.json +111 -0
- package/artifacts/schema/app-user.schema.json +98 -0
- package/artifacts/schema/app.schema.json +69 -0
- package/artifacts/schema/apply-error.schema.json +41 -0
- package/artifacts/schema/asset-list-response.schema.json +288 -0
- package/artifacts/schema/asset-sync-request.schema.json +17 -0
- package/artifacts/schema/asset-sync-response.schema.json +16 -0
- package/artifacts/schema/asset-sync-status.schema.json +136 -0
- package/artifacts/schema/asset.schema.json +68 -0
- package/artifacts/schema/audit-actor.schema.json +32 -0
- package/artifacts/schema/audit-event.schema.json +119 -0
- package/artifacts/schema/audit-list-response.schema.json +144 -0
- package/artifacts/schema/audit-query.schema.json +79 -0
- package/artifacts/schema/auth-error.schema.json +23 -0
- package/artifacts/schema/auth-me-response.schema.json +99 -0
- package/artifacts/schema/auth-ok.schema.json +115 -0
- package/artifacts/schema/authorization-server-metadata.schema.json +80 -0
- package/artifacts/schema/bridge-asset-progress.schema.json +99 -0
- package/artifacts/schema/bridge-assets-available.schema.json +25 -0
- package/artifacts/schema/bridge-camera-state.schema.json +78 -0
- package/artifacts/schema/bridge-config-applied.schema.json +67 -0
- package/artifacts/schema/bridge-hello.schema.json +65 -0
- package/artifacts/schema/bridge-introspect.schema.json +114 -0
- package/artifacts/schema/bridge-job-lost.schema.json +22 -0
- package/artifacts/schema/bridge-job-update.schema.json +100 -0
- package/artifacts/schema/bridge-pong.schema.json +19 -0
- package/artifacts/schema/bridge-pressure.schema.json +292 -0
- package/artifacts/schema/bridge-state.schema.json +24 -0
- package/artifacts/schema/bridge-type-definitions.schema.json +169 -0
- package/artifacts/schema/busy-details.schema.json +115 -0
- package/artifacts/schema/camera-descriptor.schema.json +45 -0
- package/artifacts/schema/camera-list-response.schema.json +58 -0
- package/artifacts/schema/camera-source.schema.json +240 -0
- package/artifacts/schema/cancel-request.schema.json +20 -0
- package/artifacts/schema/client-accept-invitation-request.schema.json +35 -0
- package/artifacts/schema/client-auth.schema.json +18 -0
- package/artifacts/schema/client-cancel.schema.json +45 -0
- package/artifacts/schema/client-identity.schema.json +103 -0
- package/artifacts/schema/client-invoke.schema.json +45 -0
- package/artifacts/schema/client-login-request.schema.json +29 -0
- package/artifacts/schema/client-logout-request.schema.json +14 -0
- package/artifacts/schema/client-mcp-interaction-decision-response.schema.json +15 -0
- package/artifacts/schema/client-mcp-interaction.schema.json +59 -0
- package/artifacts/schema/client-oidc-callback-query.schema.json +28 -0
- package/artifacts/schema/client-oidc-exchange-request.schema.json +21 -0
- package/artifacts/schema/client-oidc-start-query.schema.json +36 -0
- package/artifacts/schema/client-password-reset-confirm-request.schema.json +22 -0
- package/artifacts/schema/client-password-reset-request.schema.json +24 -0
- package/artifacts/schema/client-provider-list-query.schema.json +17 -0
- package/artifacts/schema/client-provider-list-response.schema.json +34 -0
- package/artifacts/schema/client-publish.schema.json +40 -0
- package/artifacts/schema/client-refresh-request.schema.json +14 -0
- package/artifacts/schema/client-register-request.schema.json +44 -0
- package/artifacts/schema/client-resend-verification-request.schema.json +24 -0
- package/artifacts/schema/client-subscribe.schema.json +43 -0
- package/artifacts/schema/client-unsubscribe.schema.json +26 -0
- package/artifacts/schema/client-verify-email-request.schema.json +15 -0
- package/artifacts/schema/cloud-asset-request.schema.json +37 -0
- package/artifacts/schema/cloud-camera-start.schema.json +41 -0
- package/artifacts/schema/cloud-camera-stop.schema.json +26 -0
- package/artifacts/schema/cloud-cancel.schema.json +33 -0
- package/artifacts/schema/cloud-config.schema.json +1635 -0
- package/artifacts/schema/cloud-hello-error.schema.json +23 -0
- package/artifacts/schema/cloud-hello-ok.schema.json +19 -0
- package/artifacts/schema/cloud-introspect-request.schema.json +19 -0
- package/artifacts/schema/cloud-invoke.schema.json +40 -0
- package/artifacts/schema/cloud-ping.schema.json +19 -0
- package/artifacts/schema/cloud-publish.schema.json +28 -0
- package/artifacts/schema/cloud-type-request.schema.json +30 -0
- package/artifacts/schema/command-result.schema.json +175 -0
- package/artifacts/schema/config-draft-response.schema.json +1695 -0
- package/artifacts/schema/config-state.schema.json +124 -0
- package/artifacts/schema/config-version-response.schema.json +1641 -0
- package/artifacts/schema/config-versions-response.schema.json +33 -0
- package/artifacts/schema/create-app-invitation-request.schema.json +40 -0
- package/artifacts/schema/create-app-oidc-provider-request.schema.json +70 -0
- package/artifacts/schema/create-app-request.schema.json +30 -0
- package/artifacts/schema/create-app-user-request.schema.json +42 -0
- package/artifacts/schema/create-robot-request.schema.json +14 -0
- package/artifacts/schema/create-robot-response.schema.json +44 -0
- package/artifacts/schema/create-server-key-response.schema.json +65 -0
- package/artifacts/schema/create-team-invite-request.schema.json +43 -0
- package/artifacts/schema/datapoint-alert-row.schema.json +160 -0
- package/artifacts/schema/datapoint-config.schema.json +366 -0
- package/artifacts/schema/datapoint-display.schema.json +31 -0
- package/artifacts/schema/datapoint-event.schema.json +34 -0
- package/artifacts/schema/datapoint-frame.schema.json +28 -0
- package/artifacts/schema/datapoint-list-response.schema.json +61 -0
- package/artifacts/schema/datapoint-value.schema.json +28 -0
- package/artifacts/schema/developer-login-request.schema.json +19 -0
- package/artifacts/schema/dynamic-client-registration-request.schema.json +60 -0
- package/artifacts/schema/dynamic-client-registration-response.schema.json +68 -0
- package/artifacts/schema/error-frame.schema.json +23 -0
- package/artifacts/schema/exposure-counts.schema.json +39 -0
- package/artifacts/schema/exposure-list-response.schema.json +43 -0
- package/artifacts/schema/fetch-types-request.schema.json +19 -0
- package/artifacts/schema/fetch-types-response.schema.json +163 -0
- package/artifacts/schema/fleetless-user-list-response.schema.json +73 -0
- package/artifacts/schema/fleetless-user.schema.json +60 -0
- package/artifacts/schema/history-buckets-response.schema.json +79 -0
- package/artifacts/schema/history-query.schema.json +58 -0
- package/artifacts/schema/history-response.schema.json +150 -0
- package/artifacts/schema/history-samples-response.schema.json +68 -0
- package/artifacts/schema/introspection-response.schema.json +118 -0
- package/artifacts/schema/invoke-or-service-response.schema.json +141 -0
- package/artifacts/schema/invoke-request.schema.json +23 -0
- package/artifacts/schema/invoke-response.schema.json +125 -0
- package/artifacts/schema/job-actor.schema.json +34 -0
- package/artifacts/schema/job-event.schema.json +158 -0
- package/artifacts/schema/job-response.schema.json +123 -0
- package/artifacts/schema/job-run-list-response.schema.json +222 -0
- package/artifacts/schema/job-run-query.schema.json +95 -0
- package/artifacts/schema/job-run-summary-query.schema.json +23 -0
- package/artifacts/schema/job-run-summary.schema.json +33 -0
- package/artifacts/schema/job-run.schema.json +195 -0
- package/artifacts/schema/job-state.schema.json +11 -0
- package/artifacts/schema/job.schema.json +106 -0
- package/artifacts/schema/latency-bucket.schema.json +63 -0
- package/artifacts/schema/live-session-response.schema.json +41 -0
- package/artifacts/schema/mail-outcome.schema.json +20 -0
- package/artifacts/schema/mail-template-preview-request.schema.json +35 -0
- package/artifacts/schema/mail-template-preview-response.schema.json +31 -0
- package/artifacts/schema/mail-template-problem-details.schema.json +24 -0
- package/artifacts/schema/mcp-consent-grant-list-response.schema.json +52 -0
- package/artifacts/schema/mcp-consent-grant.schema.json +39 -0
- package/artifacts/schema/mcp-robot-datasheet.schema.json +115 -0
- package/artifacts/schema/mcp-role-preview-response.schema.json +134 -0
- package/artifacts/schema/missing-asset-query.schema.json +11 -0
- package/artifacts/schema/oauth-authorize-query.schema.json +47 -0
- package/artifacts/schema/oauth-redirect-response.schema.json +15 -0
- package/artifacts/schema/oauth-token-request.schema.json +47 -0
- package/artifacts/schema/oauth-token-response.schema.json +38 -0
- package/artifacts/schema/org-alerts-query.schema.json +15 -0
- package/artifacts/schema/org-event-dropped.schema.json +26 -0
- package/artifacts/schema/org-event-replay.schema.json +97 -0
- package/artifacts/schema/org-event-subscribe.schema.json +14 -0
- package/artifacts/schema/org-event-unsubscribe.schema.json +14 -0
- package/artifacts/schema/org-event.schema.json +75 -0
- package/artifacts/schema/org-firing-alerts-response.schema.json +178 -0
- package/artifacts/schema/org-health-query.schema.json +13 -0
- package/artifacts/schema/org-latency-query.schema.json +42 -0
- package/artifacts/schema/org-latency-response.schema.json +124 -0
- package/artifacts/schema/org-quota-usage-counts.schema.json +42 -0
- package/artifacts/schema/org-quota-usage.schema.json +102 -0
- package/artifacts/schema/org-quotas.schema.json +51 -0
- package/artifacts/schema/org-usage-query.schema.json +19 -0
- package/artifacts/schema/org-usage-response.schema.json +77 -0
- package/artifacts/schema/org.schema.json +30 -0
- package/artifacts/schema/parameter-invalid-details.schema.json +37 -0
- package/artifacts/schema/parameter-spec.schema.json +120 -0
- package/artifacts/schema/parameter-violation.schema.json +24 -0
- package/artifacts/schema/password-change-request.schema.json +21 -0
- package/artifacts/schema/password-reset-confirm.schema.json +19 -0
- package/artifacts/schema/password-reset-request.schema.json +14 -0
- package/artifacts/schema/patch-app-oidc-provider-request.schema.json +50 -0
- package/artifacts/schema/patch-app-user-request.schema.json +34 -0
- package/artifacts/schema/patch-auth-me-request.schema.json +22 -0
- package/artifacts/schema/patch-fleetless-user-request.schema.json +20 -0
- package/artifacts/schema/patch-org-request.schema.json +15 -0
- package/artifacts/schema/patch-org-response.schema.json +40 -0
- package/artifacts/schema/patch-robot-request.schema.json +15 -0
- package/artifacts/schema/patch-robot-response.schema.json +40 -0
- package/artifacts/schema/pending-team-invite-list-response.schema.json +52 -0
- package/artifacts/schema/pending-team-invite.schema.json +39 -0
- package/artifacts/schema/protected-resource-metadata.schema.json +41 -0
- package/artifacts/schema/publish-config-response.schema.json +21 -0
- package/artifacts/schema/publish-request.schema.json +17 -0
- package/artifacts/schema/publisher-config.schema.json +285 -0
- package/artifacts/schema/put-app-auth-config-request.schema.json +93 -0
- package/artifacts/schema/put-app-mail-template-request.schema.json +35 -0
- package/artifacts/schema/put-config-draft-request.schema.json +13 -0
- package/artifacts/schema/put-datapoint-display-request.schema.json +31 -0
- package/artifacts/schema/put-robot-details-request.schema.json +41 -0
- package/artifacts/schema/put-robot-details-response.schema.json +43 -0
- package/artifacts/schema/rate-limit-details.schema.json +15 -0
- package/artifacts/schema/refresh-request.schema.json +13 -0
- package/artifacts/schema/release-live-query.schema.json +13 -0
- package/artifacts/schema/rename-slug-request.schema.json +23 -0
- package/artifacts/schema/rename-slug-response.schema.json +24 -0
- package/artifacts/schema/resource-health-event.schema.json +72 -0
- package/artifacts/schema/resource-health-list-response.schema.json +80 -0
- package/artifacts/schema/resource-health-state.schema.json +68 -0
- package/artifacts/schema/robot-config-doc.schema.json +1616 -0
- package/artifacts/schema/robot-delete-query.schema.json +12 -0
- package/artifacts/schema/robot-deletion-summary.schema.json +63 -0
- package/artifacts/schema/robot-detail-response.schema.json +262 -0
- package/artifacts/schema/robot-details-doc.schema.json +33 -0
- package/artifacts/schema/robot-jobs-response.schema.json +119 -0
- package/artifacts/schema/robot-latency-series.schema.json +81 -0
- package/artifacts/schema/robot-list-item.schema.json +94 -0
- package/artifacts/schema/robot-list-response.schema.json +106 -0
- package/artifacts/schema/robot.schema.json +30 -0
- package/artifacts/schema/role-list-response.schema.json +48 -0
- package/artifacts/schema/role-permissions.schema.json +61 -0
- package/artifacts/schema/role.schema.json +35 -0
- package/artifacts/schema/ros-graph.schema.json +99 -0
- package/artifacts/schema/server-key-list-response.schema.json +64 -0
- package/artifacts/schema/server-key.schema.json +51 -0
- package/artifacts/schema/service-call-response.schema.json +13 -0
- package/artifacts/schema/service-config.schema.json +198 -0
- package/artifacts/schema/session-tokens.schema.json +28 -0
- package/artifacts/schema/sign-up-request.schema.json +26 -0
- package/artifacts/schema/sign-up-response.schema.json +127 -0
- package/artifacts/schema/slug-usage-response.schema.json +32 -0
- package/artifacts/schema/snapshot-header.schema.json +44 -0
- package/artifacts/schema/snapshot-meta-response.schema.json +85 -0
- package/artifacts/schema/subscribe-error.schema.json +31 -0
- package/artifacts/schema/team-invite.schema.json +57 -0
- package/artifacts/schema/tier-change-request.schema.json +17 -0
- package/artifacts/schema/type-definition.schema.json +144 -0
- package/artifacts/schema/types-response.schema.json +156 -0
- package/artifacts/schema/update-app-request.schema.json +32 -0
- package/artifacts/schema/urdf-completeness.schema.json +50 -0
- package/artifacts/schema/validation-issue.schema.json +43 -0
- package/artifacts/schema/waitlist-request.schema.json +15 -0
- package/artifacts/schema-outgoing/bridge-asset-progress.schema.json +102 -0
- package/artifacts/schema-outgoing/bridge-assets-available.schema.json +26 -0
- package/artifacts/schema-outgoing/bridge-camera-state.schema.json +80 -0
- package/artifacts/schema-outgoing/bridge-config-applied.schema.json +69 -0
- package/artifacts/schema-outgoing/bridge-hello.schema.json +68 -0
- package/artifacts/schema-outgoing/bridge-introspect.schema.json +119 -0
- package/artifacts/schema-outgoing/bridge-job-lost.schema.json +23 -0
- package/artifacts/schema-outgoing/bridge-job-update.schema.json +102 -0
- package/artifacts/schema-outgoing/bridge-pong.schema.json +20 -0
- package/artifacts/schema-outgoing/bridge-type-definitions.schema.json +174 -0
- package/artifacts/schema-outgoing/datapoint-frame.schema.json +29 -0
- package/artifacts/schema-outgoing/snapshot-header.schema.json +45 -0
- package/dist/alerts.d.ts +255 -0
- package/dist/alerts.js +193 -0
- package/dist/app-users.d.ts +606 -0
- package/dist/app-users.js +696 -0
- package/dist/apps.d.ts +175 -0
- package/dist/apps.js +267 -0
- package/dist/assets.d.ts +434 -0
- package/dist/assets.js +546 -0
- package/dist/audit.d.ts +129 -0
- package/dist/audit.js +238 -0
- package/dist/client-auth.d.ts +409 -0
- package/dist/client-auth.js +487 -0
- package/dist/common.d.ts +186 -0
- package/dist/common.js +199 -0
- package/dist/config-issues.d.ts +175 -0
- package/dist/config-issues.js +339 -0
- package/dist/config.d.ts +862 -0
- package/dist/config.js +1988 -0
- package/dist/errors.d.ts +52 -0
- package/dist/errors.js +786 -0
- package/dist/identity.d.ts +549 -0
- package/dist/identity.js +503 -0
- package/dist/index.d.ts +51 -0
- package/dist/index.js +51 -0
- package/dist/introspection.d.ts +99 -0
- package/dist/introspection.js +97 -0
- package/dist/jobs.d.ts +334 -0
- package/dist/jobs.js +345 -0
- package/dist/mcp.d.ts +239 -0
- package/dist/mcp.js +153 -0
- package/dist/oauth.d.ts +344 -0
- package/dist/oauth.js +488 -0
- package/dist/protocol.d.ts +781 -0
- package/dist/protocol.js +715 -0
- package/dist/realtime.d.ts +494 -0
- package/dist/realtime.js +512 -0
- package/dist/rest.d.ts +1989 -0
- package/dist/rest.js +1963 -0
- package/dist/routes.d.ts +94 -0
- package/dist/routes.js +2298 -0
- package/package.json +61 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Introspection (spec §4.1, §4.5): what the connected bridge can tell the
|
|
4
|
+
* cloud about the robot's ROS graph, so the console can offer a quick pick
|
|
5
|
+
* instead of a blank text field.
|
|
6
|
+
*
|
|
7
|
+
* Introspection is an *enrichment*, never a precondition — a robot that has
|
|
8
|
+
* never been connected is still fully configurable.
|
|
9
|
+
*/
|
|
10
|
+
/** One entry of the ROS graph: a name and the types announced on it. */
|
|
11
|
+
export declare const rosGraphEntry: z.ZodObject<{
|
|
12
|
+
name: z.ZodString;
|
|
13
|
+
types: z.ZodArray<z.ZodString>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export type RosGraphEntry = z.infer<typeof rosGraphEntry>;
|
|
16
|
+
/**
|
|
17
|
+
* A snapshot of the graph. `captured_at_ms` is the bridge's clock at capture
|
|
18
|
+
* time, so the console can say how old the picture is.
|
|
19
|
+
*/
|
|
20
|
+
export declare const rosGraph: z.ZodObject<{
|
|
21
|
+
topics: z.ZodArray<z.ZodObject<{
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
types: z.ZodArray<z.ZodString>;
|
|
24
|
+
}, z.core.$strip>>;
|
|
25
|
+
services: z.ZodArray<z.ZodObject<{
|
|
26
|
+
name: z.ZodString;
|
|
27
|
+
types: z.ZodArray<z.ZodString>;
|
|
28
|
+
}, z.core.$strip>>;
|
|
29
|
+
actions: z.ZodArray<z.ZodObject<{
|
|
30
|
+
name: z.ZodString;
|
|
31
|
+
types: z.ZodArray<z.ZodString>;
|
|
32
|
+
}, z.core.$strip>>;
|
|
33
|
+
captured_at_ms: z.ZodNumber;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type RosGraph = z.infer<typeof rosGraph>;
|
|
36
|
+
/**
|
|
37
|
+
* One field of a message type. `fields` is null for primitives and set for
|
|
38
|
+
* nested messages; `array` marks sequences of whatever `type` says.
|
|
39
|
+
*/
|
|
40
|
+
export interface TypeField {
|
|
41
|
+
name: string;
|
|
42
|
+
type: string;
|
|
43
|
+
array: boolean;
|
|
44
|
+
fields: TypeField[] | null;
|
|
45
|
+
}
|
|
46
|
+
export declare const typeField: z.ZodType<TypeField>;
|
|
47
|
+
/**
|
|
48
|
+
* A resolved type of one robot. Custom types are per robot (spec §4.5): two
|
|
49
|
+
* robots may define `custom_msgs/msg/Speed` differently and both are right.
|
|
50
|
+
*
|
|
51
|
+
* W2 resolved messages only; W4 adds services and actions, because a
|
|
52
|
+
* `parameterSpec.name` has to resolve against *something*, and an action has
|
|
53
|
+
* no flat field list — it has a goal, a result and a feedback tree.
|
|
54
|
+
*
|
|
55
|
+
* **Which tree a parameter resolves against** (the rule every consumer needs
|
|
56
|
+
* and none should re-derive):
|
|
57
|
+
*
|
|
58
|
+
* | config kind | type | parameters resolve against |
|
|
59
|
+
* |---|---|---|
|
|
60
|
+
* | `actionConfig` | `pkg/action/T` | `goal` |
|
|
61
|
+
* | `serviceConfig` | `pkg/srv/T` | `request` |
|
|
62
|
+
* | `publisherConfig` | `pkg/msg/T` | `fields` |
|
|
63
|
+
*
|
|
64
|
+
* `result`/`feedback`/`response` are never parameter targets — nobody passes
|
|
65
|
+
* a result in. They are carried so the console can show what an action will
|
|
66
|
+
* report back, and so a client knows the shape of `job.result` in advance.
|
|
67
|
+
*
|
|
68
|
+
* The `msg` member keeps W2's exact shape, so every type already stored stays
|
|
69
|
+
* valid without migration.
|
|
70
|
+
*/
|
|
71
|
+
export declare const typeDefinition: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
72
|
+
name: z.ZodString;
|
|
73
|
+
kind: z.ZodLiteral<"msg">;
|
|
74
|
+
fields: z.ZodArray<z.ZodType<TypeField, unknown, z.core.$ZodTypeInternals<TypeField, unknown>>>;
|
|
75
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
76
|
+
name: z.ZodString;
|
|
77
|
+
kind: z.ZodLiteral<"srv">;
|
|
78
|
+
request: z.ZodArray<z.ZodType<TypeField, unknown, z.core.$ZodTypeInternals<TypeField, unknown>>>;
|
|
79
|
+
response: z.ZodArray<z.ZodType<TypeField, unknown, z.core.$ZodTypeInternals<TypeField, unknown>>>;
|
|
80
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
81
|
+
name: z.ZodString;
|
|
82
|
+
kind: z.ZodLiteral<"action">;
|
|
83
|
+
goal: z.ZodArray<z.ZodType<TypeField, unknown, z.core.$ZodTypeInternals<TypeField, unknown>>>;
|
|
84
|
+
result: z.ZodArray<z.ZodType<TypeField, unknown, z.core.$ZodTypeInternals<TypeField, unknown>>>;
|
|
85
|
+
feedback: z.ZodArray<z.ZodType<TypeField, unknown, z.core.$ZodTypeInternals<TypeField, unknown>>>;
|
|
86
|
+
}, z.core.$strip>], "kind">;
|
|
87
|
+
export type TypeDefinition = z.infer<typeof typeDefinition>;
|
|
88
|
+
/**
|
|
89
|
+
* The tree a message template resolves against, per the table above.
|
|
90
|
+
*
|
|
91
|
+
* What resolves against it is a **placeholder's position in the template** —
|
|
92
|
+
* the field the `${name}` sits on — and not the parameter's name.
|
|
93
|
+
* `parameterSpec` has no `name`; `parameters` is a record keyed by name, and
|
|
94
|
+
* the format decouples that name from the field path on purpose, so a
|
|
95
|
+
* parameter survives its field moving in the tree.
|
|
96
|
+
*
|
|
97
|
+
* One helper so cloud, console and SDK cannot each pick a different field.
|
|
98
|
+
*/
|
|
99
|
+
export declare function parameterFieldsOf(def: TypeDefinition): TypeField[];
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { rosName, rosTypeName } from './common.js';
|
|
4
|
+
/**
|
|
5
|
+
* Introspection (spec §4.1, §4.5): what the connected bridge can tell the
|
|
6
|
+
* cloud about the robot's ROS graph, so the console can offer a quick pick
|
|
7
|
+
* instead of a blank text field.
|
|
8
|
+
*
|
|
9
|
+
* Introspection is an *enrichment*, never a precondition — a robot that has
|
|
10
|
+
* never been connected is still fully configurable.
|
|
11
|
+
*/
|
|
12
|
+
/** One entry of the ROS graph: a name and the types announced on it. */
|
|
13
|
+
export const rosGraphEntry = z.object({
|
|
14
|
+
name: rosName,
|
|
15
|
+
types: z.array(rosTypeName).min(1),
|
|
16
|
+
});
|
|
17
|
+
/**
|
|
18
|
+
* A snapshot of the graph. `captured_at_ms` is the bridge's clock at capture
|
|
19
|
+
* time, so the console can say how old the picture is.
|
|
20
|
+
*/
|
|
21
|
+
export const rosGraph = z.object({
|
|
22
|
+
topics: z.array(rosGraphEntry),
|
|
23
|
+
services: z.array(rosGraphEntry),
|
|
24
|
+
actions: z.array(rosGraphEntry),
|
|
25
|
+
captured_at_ms: z.number().int().nonnegative(),
|
|
26
|
+
});
|
|
27
|
+
export const typeField = z.lazy(() => z.object({
|
|
28
|
+
name: z.string().min(1).max(128),
|
|
29
|
+
type: z.string().min(1).max(255),
|
|
30
|
+
array: z.boolean(),
|
|
31
|
+
fields: z.array(typeField).nullable(),
|
|
32
|
+
}));
|
|
33
|
+
/**
|
|
34
|
+
* A resolved type of one robot. Custom types are per robot (spec §4.5): two
|
|
35
|
+
* robots may define `custom_msgs/msg/Speed` differently and both are right.
|
|
36
|
+
*
|
|
37
|
+
* W2 resolved messages only; W4 adds services and actions, because a
|
|
38
|
+
* `parameterSpec.name` has to resolve against *something*, and an action has
|
|
39
|
+
* no flat field list — it has a goal, a result and a feedback tree.
|
|
40
|
+
*
|
|
41
|
+
* **Which tree a parameter resolves against** (the rule every consumer needs
|
|
42
|
+
* and none should re-derive):
|
|
43
|
+
*
|
|
44
|
+
* | config kind | type | parameters resolve against |
|
|
45
|
+
* |---|---|---|
|
|
46
|
+
* | `actionConfig` | `pkg/action/T` | `goal` |
|
|
47
|
+
* | `serviceConfig` | `pkg/srv/T` | `request` |
|
|
48
|
+
* | `publisherConfig` | `pkg/msg/T` | `fields` |
|
|
49
|
+
*
|
|
50
|
+
* `result`/`feedback`/`response` are never parameter targets — nobody passes
|
|
51
|
+
* a result in. They are carried so the console can show what an action will
|
|
52
|
+
* report back, and so a client knows the shape of `job.result` in advance.
|
|
53
|
+
*
|
|
54
|
+
* The `msg` member keeps W2's exact shape, so every type already stored stays
|
|
55
|
+
* valid without migration.
|
|
56
|
+
*/
|
|
57
|
+
export const typeDefinition = z.discriminatedUnion('kind', [
|
|
58
|
+
z.object({
|
|
59
|
+
name: rosTypeName,
|
|
60
|
+
kind: z.literal('msg'),
|
|
61
|
+
fields: z.array(typeField),
|
|
62
|
+
}),
|
|
63
|
+
z.object({
|
|
64
|
+
name: rosTypeName,
|
|
65
|
+
kind: z.literal('srv'),
|
|
66
|
+
request: z.array(typeField),
|
|
67
|
+
response: z.array(typeField),
|
|
68
|
+
}),
|
|
69
|
+
z.object({
|
|
70
|
+
name: rosTypeName,
|
|
71
|
+
kind: z.literal('action'),
|
|
72
|
+
goal: z.array(typeField),
|
|
73
|
+
result: z.array(typeField),
|
|
74
|
+
feedback: z.array(typeField),
|
|
75
|
+
}),
|
|
76
|
+
]);
|
|
77
|
+
/**
|
|
78
|
+
* The tree a message template resolves against, per the table above.
|
|
79
|
+
*
|
|
80
|
+
* What resolves against it is a **placeholder's position in the template** —
|
|
81
|
+
* the field the `${name}` sits on — and not the parameter's name.
|
|
82
|
+
* `parameterSpec` has no `name`; `parameters` is a record keyed by name, and
|
|
83
|
+
* the format decouples that name from the field path on purpose, so a
|
|
84
|
+
* parameter survives its field moving in the tree.
|
|
85
|
+
*
|
|
86
|
+
* One helper so cloud, console and SDK cannot each pick a different field.
|
|
87
|
+
*/
|
|
88
|
+
export function parameterFieldsOf(def) {
|
|
89
|
+
switch (def.kind) {
|
|
90
|
+
case 'msg':
|
|
91
|
+
return def.fields;
|
|
92
|
+
case 'srv':
|
|
93
|
+
return def.request;
|
|
94
|
+
case 'action':
|
|
95
|
+
return def.goal;
|
|
96
|
+
}
|
|
97
|
+
}
|
package/dist/jobs.d.ts
ADDED
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Jobs (spec §6.1, §11.3): one running unit of work on a robot — an action
|
|
4
|
+
* goal or a service call — with an id both sides know, so bridge and cloud
|
|
5
|
+
* stay in sync across a disconnect.
|
|
6
|
+
*
|
|
7
|
+
* Two rules shape everything here:
|
|
8
|
+
*
|
|
9
|
+
* 1. **State is observed by slug, not by id.** The id is informative (§11.3);
|
|
10
|
+
* a client watches `robot × slug` and sees whatever job is running there,
|
|
11
|
+
* which is also why every observer of a slug sees the same job.
|
|
12
|
+
* 2. **`lost` is a real outcome and must be said out loud** (§6.1). Job state
|
|
13
|
+
* lives only in the bridge's memory; if it restarts mid-job, the results
|
|
14
|
+
* are gone. The cloud then marks the job `lost` — never leaves it reading
|
|
15
|
+
* "running" because nobody contradicted it. A system that reports a
|
|
16
|
+
* machine is still working when it does not know is worse than one that
|
|
17
|
+
* admits it lost track.
|
|
18
|
+
*/
|
|
19
|
+
export declare const jobState: z.ZodEnum<{
|
|
20
|
+
failed: "failed";
|
|
21
|
+
running: "running";
|
|
22
|
+
succeeded: "succeeded";
|
|
23
|
+
cancelled: "cancelled";
|
|
24
|
+
lost: "lost";
|
|
25
|
+
}>;
|
|
26
|
+
export type JobState = z.infer<typeof jobState>;
|
|
27
|
+
export declare const job: z.ZodObject<{
|
|
28
|
+
id: z.ZodUUID;
|
|
29
|
+
robot_id: z.ZodUUID;
|
|
30
|
+
slug: z.ZodString;
|
|
31
|
+
state: z.ZodEnum<{
|
|
32
|
+
failed: "failed";
|
|
33
|
+
running: "running";
|
|
34
|
+
succeeded: "succeeded";
|
|
35
|
+
cancelled: "cancelled";
|
|
36
|
+
lost: "lost";
|
|
37
|
+
}>;
|
|
38
|
+
started_at: z.ZodISODateTime;
|
|
39
|
+
updated_at: z.ZodISODateTime;
|
|
40
|
+
seq: z.ZodNumber;
|
|
41
|
+
result: z.ZodNullable<z.ZodUnknown>;
|
|
42
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
43
|
+
code: z.ZodString;
|
|
44
|
+
message: z.ZodString;
|
|
45
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
46
|
+
}, z.core.$strip>>;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
export type Job = z.infer<typeof job>;
|
|
49
|
+
/**
|
|
50
|
+
* One update about a job, pushed to subscribers of its slug.
|
|
51
|
+
*
|
|
52
|
+
* `timestamp_ms` is the bridge's capture time, exactly as for a datapoint
|
|
53
|
+
* (§6.3 says action feedback carries it too) — so a client computes the age
|
|
54
|
+
* of a progress report the same way it computes the age of a sensor value,
|
|
55
|
+
* and a burst of late-delivered feedback after a reconnect is visibly late
|
|
56
|
+
* rather than looking current.
|
|
57
|
+
*/
|
|
58
|
+
export declare const jobEvent: z.ZodObject<{
|
|
59
|
+
type: z.ZodLiteral<"job">;
|
|
60
|
+
robot_id: z.ZodUUID;
|
|
61
|
+
slug: z.ZodString;
|
|
62
|
+
job: z.ZodObject<{
|
|
63
|
+
id: z.ZodUUID;
|
|
64
|
+
robot_id: z.ZodUUID;
|
|
65
|
+
slug: z.ZodString;
|
|
66
|
+
state: z.ZodEnum<{
|
|
67
|
+
failed: "failed";
|
|
68
|
+
running: "running";
|
|
69
|
+
succeeded: "succeeded";
|
|
70
|
+
cancelled: "cancelled";
|
|
71
|
+
lost: "lost";
|
|
72
|
+
}>;
|
|
73
|
+
started_at: z.ZodISODateTime;
|
|
74
|
+
updated_at: z.ZodISODateTime;
|
|
75
|
+
seq: z.ZodNumber;
|
|
76
|
+
result: z.ZodNullable<z.ZodUnknown>;
|
|
77
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
78
|
+
code: z.ZodString;
|
|
79
|
+
message: z.ZodString;
|
|
80
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
81
|
+
}, z.core.$strip>>;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
feedback: z.ZodNullable<z.ZodUnknown>;
|
|
84
|
+
progress: z.ZodNullable<z.ZodNumber>;
|
|
85
|
+
timestamp_ms: z.ZodNumber;
|
|
86
|
+
}, z.core.$strip>;
|
|
87
|
+
export type JobEvent = z.infer<typeof jobEvent>;
|
|
88
|
+
/**
|
|
89
|
+
* What a busy refusal tells the caller (spec §11.3: "inkl. Information, was
|
|
90
|
+
* läuft"). A refusal that only says "busy" forces the caller to guess whether
|
|
91
|
+
* to wait or to give up.
|
|
92
|
+
*/
|
|
93
|
+
export declare const busyDetails: z.ZodObject<{
|
|
94
|
+
running: z.ZodObject<{
|
|
95
|
+
id: z.ZodUUID;
|
|
96
|
+
robot_id: z.ZodUUID;
|
|
97
|
+
slug: z.ZodString;
|
|
98
|
+
state: z.ZodEnum<{
|
|
99
|
+
failed: "failed";
|
|
100
|
+
running: "running";
|
|
101
|
+
succeeded: "succeeded";
|
|
102
|
+
cancelled: "cancelled";
|
|
103
|
+
lost: "lost";
|
|
104
|
+
}>;
|
|
105
|
+
started_at: z.ZodISODateTime;
|
|
106
|
+
updated_at: z.ZodISODateTime;
|
|
107
|
+
seq: z.ZodNumber;
|
|
108
|
+
result: z.ZodNullable<z.ZodUnknown>;
|
|
109
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
110
|
+
code: z.ZodString;
|
|
111
|
+
message: z.ZodString;
|
|
112
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
113
|
+
}, z.core.$strip>>;
|
|
114
|
+
}, z.core.$strip>;
|
|
115
|
+
}, z.core.$strip>;
|
|
116
|
+
export type BusyDetails = z.infer<typeof busyDetails>;
|
|
117
|
+
/**
|
|
118
|
+
* What a `publisher_busy` refusal tells the caller (spec §6.4).
|
|
119
|
+
*
|
|
120
|
+
* "Another caller is publishing and has not been quiet long enough" names a
|
|
121
|
+
* state and no action: the caller does not know how much longer, because
|
|
122
|
+
* `quiet_timeout_ms` lives in the configuration document, which a client app
|
|
123
|
+
* never reads. Without a number they busy-loop — on the one verb that moves
|
|
124
|
+
* a machine, on a platform with no rate limiting. So the refusal carries the
|
|
125
|
+
* wait itself.
|
|
126
|
+
*
|
|
127
|
+
* `holder` is deliberately absent: it would name another end user to a
|
|
128
|
+
* caller who may have no right to know they exist.
|
|
129
|
+
*/
|
|
130
|
+
export declare const publisherBusyDetails: z.ZodObject<{
|
|
131
|
+
quiet_timeout_ms: z.ZodNumber;
|
|
132
|
+
retry_after_ms: z.ZodNumber;
|
|
133
|
+
}, z.core.$strip>;
|
|
134
|
+
export type PublisherBusyDetails = z.infer<typeof publisherBusyDetails>;
|
|
135
|
+
/**
|
|
136
|
+
* What a `job_queue_full` refusal tells the caller (W6b).
|
|
137
|
+
*
|
|
138
|
+
* Both numbers, not just the limit: `limit` alone says how big the queue is
|
|
139
|
+
* and nothing about whether waiting will help, and `queued` alone cannot be
|
|
140
|
+
* read without knowing the bound. Together they are the only two facts a
|
|
141
|
+
* caller needs to decide between retrying and giving up.
|
|
142
|
+
*/
|
|
143
|
+
export declare const jobQueueFullDetails: z.ZodObject<{
|
|
144
|
+
limit: z.ZodNumber;
|
|
145
|
+
queued: z.ZodNumber;
|
|
146
|
+
}, z.core.$strip>;
|
|
147
|
+
export type JobQueueFullDetails = z.infer<typeof jobQueueFullDetails>;
|
|
148
|
+
/** A page of run history is bounded; 200 is what one console screen can ever want. */
|
|
149
|
+
export declare const JOB_RUN_PAGE_MAX = 200;
|
|
150
|
+
/**
|
|
151
|
+
* Job runs keep the audit log's retention, and that is not a coincidence:
|
|
152
|
+
* every invoke already writes an `action.invoked` audit event. A different
|
|
153
|
+
* figure here creates a window in which the audit log shows a call whose
|
|
154
|
+
* outcome has already been deleted — a state no developer can be expected to
|
|
155
|
+
* read as anything but a bug.
|
|
156
|
+
*/
|
|
157
|
+
export declare const JOB_RUN_RETENTION_DAYS = 90;
|
|
158
|
+
/**
|
|
159
|
+
* Who invoked a run.
|
|
160
|
+
*
|
|
161
|
+
* Deliberately **not** `auditActor`: that enum carries `bridge` as a fourth
|
|
162
|
+
* case, and a bridge invokes nothing. An enum that names an impossible case
|
|
163
|
+
* invites every reader to handle it.
|
|
164
|
+
*
|
|
165
|
+
* **`app_user` is what a client-app caller writes now, and `end_user` stays**
|
|
166
|
+
* (app-user auth, D1). The seam this comment used to describe — two names for
|
|
167
|
+
* two ways into one merged pool — is settled: the two identity spaces are
|
|
168
|
+
* separate tables again, and `app_user` is a row in `app_users`, belonging to
|
|
169
|
+
* exactly one app. `end_user` is kept for the same reason `auditActor.kind`
|
|
170
|
+
* keeps it: a job run is history, and every row written before the cut carries
|
|
171
|
+
* it. Removing the member would make the whole trail unparseable to a client
|
|
172
|
+
* that validates, which is the one thing a history shape must never do.
|
|
173
|
+
*/
|
|
174
|
+
export declare const jobActor: z.ZodObject<{
|
|
175
|
+
kind: z.ZodEnum<{
|
|
176
|
+
developer: "developer";
|
|
177
|
+
server_key: "server_key";
|
|
178
|
+
end_user: "end_user";
|
|
179
|
+
app_user: "app_user";
|
|
180
|
+
}>;
|
|
181
|
+
id: z.ZodUUID;
|
|
182
|
+
label: z.ZodString;
|
|
183
|
+
}, z.core.$strip>;
|
|
184
|
+
export type JobActor = z.infer<typeof jobActor>;
|
|
185
|
+
export declare const jobRunKind: z.ZodEnum<{
|
|
186
|
+
action: "action";
|
|
187
|
+
service: "service";
|
|
188
|
+
}>;
|
|
189
|
+
export type JobRunKind = z.infer<typeof jobRunKind>;
|
|
190
|
+
/**
|
|
191
|
+
* One durable record of one invocation (spec `2026-08-20-timeseries-and-run-history`,
|
|
192
|
+
* D2). One row per run, never one per event: the per-event timeline's write rate
|
|
193
|
+
* is set by the bridge, and a throttled log that cannot say it was throttled is
|
|
194
|
+
* the instrument this codebase refuses everywhere else. The live timeline is
|
|
195
|
+
* delivered in full by realtime, for as long as somebody is watching.
|
|
196
|
+
*/
|
|
197
|
+
export declare const jobRun: z.ZodObject<{
|
|
198
|
+
id: z.ZodUUID;
|
|
199
|
+
robot_id: z.ZodUUID;
|
|
200
|
+
slug: z.ZodString;
|
|
201
|
+
kind: z.ZodEnum<{
|
|
202
|
+
action: "action";
|
|
203
|
+
service: "service";
|
|
204
|
+
}>;
|
|
205
|
+
state: z.ZodEnum<{
|
|
206
|
+
failed: "failed";
|
|
207
|
+
running: "running";
|
|
208
|
+
succeeded: "succeeded";
|
|
209
|
+
cancelled: "cancelled";
|
|
210
|
+
lost: "lost";
|
|
211
|
+
}>;
|
|
212
|
+
started_at: z.ZodISODateTime;
|
|
213
|
+
ended_at: z.ZodNullable<z.ZodISODateTime>;
|
|
214
|
+
duration_ms: z.ZodNullable<z.ZodNumber>;
|
|
215
|
+
result: z.ZodNullable<z.ZodUnknown>;
|
|
216
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
217
|
+
code: z.ZodString;
|
|
218
|
+
message: z.ZodString;
|
|
219
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
220
|
+
}, z.core.$strip>>;
|
|
221
|
+
actor: z.ZodObject<{
|
|
222
|
+
kind: z.ZodEnum<{
|
|
223
|
+
developer: "developer";
|
|
224
|
+
server_key: "server_key";
|
|
225
|
+
end_user: "end_user";
|
|
226
|
+
app_user: "app_user";
|
|
227
|
+
}>;
|
|
228
|
+
id: z.ZodUUID;
|
|
229
|
+
label: z.ZodString;
|
|
230
|
+
}, z.core.$strip>;
|
|
231
|
+
seq: z.ZodNumber;
|
|
232
|
+
progress: z.ZodNullable<z.ZodNumber>;
|
|
233
|
+
feedback: z.ZodNullable<z.ZodUnknown>;
|
|
234
|
+
}, z.core.$strip>;
|
|
235
|
+
export type JobRun = z.infer<typeof jobRun>;
|
|
236
|
+
export declare const jobRunQuery: z.ZodObject<{
|
|
237
|
+
before_seq: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
|
|
238
|
+
limit: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
|
|
239
|
+
robot_id: z.ZodOptional<z.ZodUUID>;
|
|
240
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
241
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
242
|
+
failed: "failed";
|
|
243
|
+
running: "running";
|
|
244
|
+
succeeded: "succeeded";
|
|
245
|
+
cancelled: "cancelled";
|
|
246
|
+
lost: "lost";
|
|
247
|
+
}>>;
|
|
248
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
249
|
+
action: "action";
|
|
250
|
+
service: "service";
|
|
251
|
+
}>>;
|
|
252
|
+
from_ms: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
|
|
253
|
+
to_ms: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
|
|
254
|
+
}, z.core.$strict>;
|
|
255
|
+
export type JobRunQuery = z.infer<typeof jobRunQuery>;
|
|
256
|
+
export declare const jobRunListResponse: z.ZodObject<{
|
|
257
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
258
|
+
id: z.ZodUUID;
|
|
259
|
+
robot_id: z.ZodUUID;
|
|
260
|
+
slug: z.ZodString;
|
|
261
|
+
kind: z.ZodEnum<{
|
|
262
|
+
action: "action";
|
|
263
|
+
service: "service";
|
|
264
|
+
}>;
|
|
265
|
+
state: z.ZodEnum<{
|
|
266
|
+
failed: "failed";
|
|
267
|
+
running: "running";
|
|
268
|
+
succeeded: "succeeded";
|
|
269
|
+
cancelled: "cancelled";
|
|
270
|
+
lost: "lost";
|
|
271
|
+
}>;
|
|
272
|
+
started_at: z.ZodISODateTime;
|
|
273
|
+
ended_at: z.ZodNullable<z.ZodISODateTime>;
|
|
274
|
+
duration_ms: z.ZodNullable<z.ZodNumber>;
|
|
275
|
+
result: z.ZodNullable<z.ZodUnknown>;
|
|
276
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
277
|
+
code: z.ZodString;
|
|
278
|
+
message: z.ZodString;
|
|
279
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
280
|
+
}, z.core.$strip>>;
|
|
281
|
+
actor: z.ZodObject<{
|
|
282
|
+
kind: z.ZodEnum<{
|
|
283
|
+
developer: "developer";
|
|
284
|
+
server_key: "server_key";
|
|
285
|
+
end_user: "end_user";
|
|
286
|
+
app_user: "app_user";
|
|
287
|
+
}>;
|
|
288
|
+
id: z.ZodUUID;
|
|
289
|
+
label: z.ZodString;
|
|
290
|
+
}, z.core.$strip>;
|
|
291
|
+
seq: z.ZodNumber;
|
|
292
|
+
progress: z.ZodNullable<z.ZodNumber>;
|
|
293
|
+
feedback: z.ZodNullable<z.ZodUnknown>;
|
|
294
|
+
}, z.core.$strip>>;
|
|
295
|
+
next_cursor: z.ZodNullable<z.ZodNumber>;
|
|
296
|
+
}, z.core.$strip>;
|
|
297
|
+
export type JobRunListResponse = z.infer<typeof jobRunListResponse>;
|
|
298
|
+
/**
|
|
299
|
+
* The overview tile's three numbers, over a window **the caller names**.
|
|
300
|
+
*
|
|
301
|
+
* `since_ms` rather than "today": which day that is, only the browser knows. A
|
|
302
|
+
* cloud that picks its own day boundary shows a developer in another timezone a
|
|
303
|
+
* number they cannot reproduce. Echoed back so a rendered tile can say which
|
|
304
|
+
* window it is describing.
|
|
305
|
+
*/
|
|
306
|
+
/**
|
|
307
|
+
* `GET /api/org/jobs/summary`'s query: the window, and nothing else.
|
|
308
|
+
*
|
|
309
|
+
* **`since_ms` is required and has no default.** Which day "today" is, only
|
|
310
|
+
* the browser knows; a cloud that picked its own boundary would show a
|
|
311
|
+
* developer in another timezone a number they cannot reproduce from anything
|
|
312
|
+
* in front of them. The absence of a default is the contract here, not an
|
|
313
|
+
* omission — see `jobRunSummary`, which echoes the window back so a rendered
|
|
314
|
+
* tile can say what it is describing.
|
|
315
|
+
*
|
|
316
|
+
* Its own shape rather than a slice of `jobRunQuery`: pagination and filters
|
|
317
|
+
* mean nothing to an aggregate, and `.strict()` would refuse them anyway, so
|
|
318
|
+
* borrowing that schema would advertise seven parameters the route ignores.
|
|
319
|
+
*
|
|
320
|
+
* `.strict()` for `jobRunQuery`'s reason — a mistyped `since_mss` that is
|
|
321
|
+
* silently ignored answers `200` over a window nobody chose, which is worse
|
|
322
|
+
* than a refusal because it looks like data.
|
|
323
|
+
*/
|
|
324
|
+
export declare const jobRunSummaryQuery: z.ZodObject<{
|
|
325
|
+
since_ms: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<number, string | number>>, z.ZodNumber>;
|
|
326
|
+
}, z.core.$strict>;
|
|
327
|
+
export type JobRunSummaryQuery = z.infer<typeof jobRunSummaryQuery>;
|
|
328
|
+
export declare const jobRunSummary: z.ZodObject<{
|
|
329
|
+
running: z.ZodNumber;
|
|
330
|
+
started: z.ZodNumber;
|
|
331
|
+
failed: z.ZodNumber;
|
|
332
|
+
since_ms: z.ZodNumber;
|
|
333
|
+
}, z.core.$strip>;
|
|
334
|
+
export type JobRunSummary = z.infer<typeof jobRunSummary>;
|