@fleetless/sdk 4.5.0 → 4.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -3,7 +3,7 @@ import { z } from 'zod';
3
3
 
4
4
 
5
5
  /**
6
- * One exposure of a robot, as `robot_describe` and the console's per-role
6
+ * One exposure of a robot, as `robots.describe` and the console's per-role
7
7
  * preview list it. Every exposure the role grants is listed —
8
8
  * a missing `description` is shown as `null`, never used to hide the entry.
9
9
  *
@@ -34,7 +34,7 @@ declare const mcpCapabilities: z.ZodObject<{
34
34
  }, z.core.$strip>;
35
35
  type McpCapabilities$1 = z.infer<typeof mcpCapabilities>;
36
36
  /**
37
- * What one caller may do on one robot — the answer to `robot_describe`, and
37
+ * What one caller may do on one robot — the answer to `robots.describe`, and
38
38
  * since 1.1.0 to `GET /api/robots/:id/datasheet` as well. One schema for both
39
39
  * surfaces on purpose: an app and an AI tool read the same description of the
40
40
  * same grant. The `mcp` prefix is history, not scope.
@@ -644,7 +644,7 @@ type ClientIdentity = z.infer<typeof clientIdentity>;
644
644
 
645
645
  /**
646
646
  * One robot as `GET /api/client/robots` lists it — the REST twin of the MCP
647
- * tool `robots_list`, and the one robot question no robot-scoped route can
647
+ * action `robots.list`, and the one robot question no robot-scoped route can
648
648
  * answer: which robots may I name at all.
649
649
  *
650
650
  * Deliberately not `robotListItem`: that one carries `exposes`, the per-kind
@@ -657,6 +657,9 @@ declare const clientRobotListItem: z.ZodObject<{
657
657
  online: z.ZodBoolean;
658
658
  latency_ms: z.ZodNullable<z.ZodNumber>;
659
659
  low_bandwidth: z.ZodBoolean;
660
+ health_reason: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
661
+ job_query_unanswered: "job_query_unanswered";
662
+ }>>>;
660
663
  }, z.core.$strip>;
661
664
  published_version: z.ZodNullable<z.ZodNumber>;
662
665
  id: z.ZodUUID;
@@ -864,7 +867,7 @@ type CancelRejectedDetails = z.infer<typeof cancelRejectedDetails>;
864
867
  * list is the shared vocabulary, not a closed set, so a new refusal never
865
868
  * needs a contracts release before it can be reported honestly.
866
869
  */
867
- declare const ERROR_CODES: readonly ["not_found", "validation_error", "bad_request", "unknown_datapoint", "invalid_token", "protocol_mismatch", "bridge_too_old", "invalid_frame", "duplicate_slug", "reserved_slug", "unknown_slug", "unknown_field_path", "unknown_type", "unknown_topic", "invalid_rate", "invalid_range", "config_conflict", "no_data", "robot_offline", "bridge_timeout", "unauthorized", "forbidden", "invalid_credentials", "token_expired", "token_revoked", "email_taken", "identifier_taken", "weak_password", "account_blocked", "busy", "parameter_invalid", "cancel_rejected", "job_lost", "job_unknown_to_bridge", "action_server_lost", "action_failed", "goal_rejected", "goal_send_failed", "result_failed", "goal_uncontrollable", "bridge_disconnected", "config_changed", "publisher_busy", "unknown_command", "not_subscribable", "camera_offline", "no_snapshot_yet", "live_unavailable", "wrong_kind", "not_recorded", "not_aggregatable", "quota_exceeded", "credential_in_use", "goal_timeout", "robot_in_use", "robot_deletion_partial", "job_queue_full", "invalid_uuid", "rate_limited", "tier_required", "token_spent", "service_timeout", "asset_missing", "dynamic_registration_disabled", "client_limit_reached", "idp_unavailable", "mcp_disabled", "tool_not_available", "capability_required", "last_owner", "role_name_taken", "role_in_use", "last_role", "target_state_conflict", "signup_closed", "draft_not_a_document", "internal_error", "not_cancellable", "unsupported_media_type", "wrong_browser", "invalid_yaml", "unstorable_yaml", "registration_closed", "domain_not_allowed", "email_unverified", "origin_not_allowed", "template_invalid", "provider_disabled", "provider_misconfigured", "invalid_redirect_uri", "interaction_expired", "invalid_code", "method_not_allowed", "plan_limit", "plan_required", "org_locked", "file_too_large"];
870
+ declare const ERROR_CODES: readonly ["not_found", "validation_error", "bad_request", "unknown_datapoint", "invalid_token", "protocol_mismatch", "bridge_too_old", "invalid_frame", "duplicate_slug", "reserved_slug", "unknown_slug", "unknown_field_path", "unknown_type", "unknown_topic", "invalid_rate", "invalid_range", "config_conflict", "no_data", "robot_offline", "bridge_timeout", "unauthorized", "forbidden", "invalid_credentials", "token_expired", "token_revoked", "email_taken", "identifier_taken", "weak_password", "account_blocked", "busy", "parameter_invalid", "cancel_rejected", "job_lost", "operator_verified_stopped", "job_unknown_to_bridge", "action_server_lost", "action_failed", "goal_rejected", "goal_send_failed", "result_failed", "goal_uncontrollable", "bridge_disconnected", "config_changed", "publisher_busy", "unknown_command", "not_subscribable", "camera_offline", "no_snapshot_yet", "live_unavailable", "wrong_kind", "not_recorded", "not_aggregatable", "quota_exceeded", "credential_in_use", "goal_timeout", "robot_in_use", "robot_deletion_partial", "job_queue_full", "invalid_uuid", "rate_limited", "tier_required", "token_spent", "service_timeout", "asset_missing", "dynamic_registration_disabled", "client_limit_reached", "idp_unavailable", "mcp_disabled", "tool_not_available", "capability_required", "last_owner", "role_name_taken", "role_in_use", "last_role", "target_state_conflict", "job_state_conflict", "signup_closed", "draft_not_a_document", "internal_error", "not_cancellable", "unsupported_media_type", "wrong_browser", "invalid_yaml", "unstorable_yaml", "registration_closed", "domain_not_allowed", "email_unverified", "origin_not_allowed", "template_invalid", "provider_disabled", "provider_misconfigured", "invalid_redirect_uri", "interaction_expired", "invalid_code", "method_not_allowed", "plan_limit", "plan_required", "org_locked", "file_too_large", "billing_unavailable", "payment_provider_unavailable", "history_migrating", "billing_documents_unavailable", "support_read_only", "support_forbidden"];
868
871
  type ErrorCode = (typeof ERROR_CODES)[number];
869
872
 
870
873
  /**
@@ -1710,6 +1713,18 @@ interface SignInMethods {
1710
1713
  password: boolean;
1711
1714
  /** Whether `requestLoginCode`/`verifyLoginCode` is on for this app. */
1712
1715
  emailCode: boolean;
1716
+ /**
1717
+ * The app's two-factor policy — `'off'`, `'optional'` or `'required'` —
1718
+ * not the signed-in person's enrollment state.
1719
+ *
1720
+ * **`null` when the cloud answered no policy this SDK recognises**: a cloud
1721
+ * that predates the field, or a value outside those three. Treat `null` as
1722
+ * a failed policy read — offer no two-factor action, let the person retry —
1723
+ * and never as `'off'`: the SDK does not guess a policy, and the cloud
1724
+ * still enforces the real one at sign-in. `password` and `emailCode` are
1725
+ * read either way, so a login screen keeps working against such a cloud.
1726
+ */
1727
+ twoFactor: 'off' | 'optional' | 'required' | null;
1713
1728
  }
1714
1729
  /** One sign-in button on the app's own login screen, as `listProviders()` lists it. */
1715
1730
  interface ProviderButton {
@@ -2013,7 +2028,7 @@ interface AuthApi {
2013
2028
  */
2014
2029
  listProviders(): Promise<ProviderButton[]>;
2015
2030
  /**
2016
- * Which credential-based sign-in methods this app has on, for drawing a
2031
+ * Which credential-based sign-in methods and two-factor policy this app has on, for drawing a
2017
2032
  * password field, a "get a code by email" link, or both, on your own login
2018
2033
  * screen — the other half of what the login screen needs, the federated
2019
2034
  * buttons being `listProviders()`'s own answer.
@@ -2022,6 +2037,10 @@ interface AuthApi {
2022
2037
  * (`GET /api/client/providers`) — each call is its own request, picking a
2023
2038
  * different field out of the same response; call both if your login
2024
2039
  * screen needs both.
2040
+ *
2041
+ * `twoFactor` is `null` when the cloud's answer carries no policy this SDK
2042
+ * recognises (an older cloud, or an unknown value) — a failed policy read,
2043
+ * not `'off'`. `password` and `emailCode` are answered either way.
2025
2044
  */
2026
2045
  signInMethods(): Promise<SignInMethods>;
2027
2046
  /**
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import { z } from 'zod';
3
3
 
4
4
 
5
5
  /**
6
- * One exposure of a robot, as `robot_describe` and the console's per-role
6
+ * One exposure of a robot, as `robots.describe` and the console's per-role
7
7
  * preview list it. Every exposure the role grants is listed —
8
8
  * a missing `description` is shown as `null`, never used to hide the entry.
9
9
  *
@@ -34,7 +34,7 @@ declare const mcpCapabilities: z.ZodObject<{
34
34
  }, z.core.$strip>;
35
35
  type McpCapabilities$1 = z.infer<typeof mcpCapabilities>;
36
36
  /**
37
- * What one caller may do on one robot — the answer to `robot_describe`, and
37
+ * What one caller may do on one robot — the answer to `robots.describe`, and
38
38
  * since 1.1.0 to `GET /api/robots/:id/datasheet` as well. One schema for both
39
39
  * surfaces on purpose: an app and an AI tool read the same description of the
40
40
  * same grant. The `mcp` prefix is history, not scope.
@@ -644,7 +644,7 @@ type ClientIdentity = z.infer<typeof clientIdentity>;
644
644
 
645
645
  /**
646
646
  * One robot as `GET /api/client/robots` lists it — the REST twin of the MCP
647
- * tool `robots_list`, and the one robot question no robot-scoped route can
647
+ * action `robots.list`, and the one robot question no robot-scoped route can
648
648
  * answer: which robots may I name at all.
649
649
  *
650
650
  * Deliberately not `robotListItem`: that one carries `exposes`, the per-kind
@@ -657,6 +657,9 @@ declare const clientRobotListItem: z.ZodObject<{
657
657
  online: z.ZodBoolean;
658
658
  latency_ms: z.ZodNullable<z.ZodNumber>;
659
659
  low_bandwidth: z.ZodBoolean;
660
+ health_reason: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
661
+ job_query_unanswered: "job_query_unanswered";
662
+ }>>>;
660
663
  }, z.core.$strip>;
661
664
  published_version: z.ZodNullable<z.ZodNumber>;
662
665
  id: z.ZodUUID;
@@ -864,7 +867,7 @@ type CancelRejectedDetails = z.infer<typeof cancelRejectedDetails>;
864
867
  * list is the shared vocabulary, not a closed set, so a new refusal never
865
868
  * needs a contracts release before it can be reported honestly.
866
869
  */
867
- declare const ERROR_CODES: readonly ["not_found", "validation_error", "bad_request", "unknown_datapoint", "invalid_token", "protocol_mismatch", "bridge_too_old", "invalid_frame", "duplicate_slug", "reserved_slug", "unknown_slug", "unknown_field_path", "unknown_type", "unknown_topic", "invalid_rate", "invalid_range", "config_conflict", "no_data", "robot_offline", "bridge_timeout", "unauthorized", "forbidden", "invalid_credentials", "token_expired", "token_revoked", "email_taken", "identifier_taken", "weak_password", "account_blocked", "busy", "parameter_invalid", "cancel_rejected", "job_lost", "job_unknown_to_bridge", "action_server_lost", "action_failed", "goal_rejected", "goal_send_failed", "result_failed", "goal_uncontrollable", "bridge_disconnected", "config_changed", "publisher_busy", "unknown_command", "not_subscribable", "camera_offline", "no_snapshot_yet", "live_unavailable", "wrong_kind", "not_recorded", "not_aggregatable", "quota_exceeded", "credential_in_use", "goal_timeout", "robot_in_use", "robot_deletion_partial", "job_queue_full", "invalid_uuid", "rate_limited", "tier_required", "token_spent", "service_timeout", "asset_missing", "dynamic_registration_disabled", "client_limit_reached", "idp_unavailable", "mcp_disabled", "tool_not_available", "capability_required", "last_owner", "role_name_taken", "role_in_use", "last_role", "target_state_conflict", "signup_closed", "draft_not_a_document", "internal_error", "not_cancellable", "unsupported_media_type", "wrong_browser", "invalid_yaml", "unstorable_yaml", "registration_closed", "domain_not_allowed", "email_unverified", "origin_not_allowed", "template_invalid", "provider_disabled", "provider_misconfigured", "invalid_redirect_uri", "interaction_expired", "invalid_code", "method_not_allowed", "plan_limit", "plan_required", "org_locked", "file_too_large"];
870
+ declare const ERROR_CODES: readonly ["not_found", "validation_error", "bad_request", "unknown_datapoint", "invalid_token", "protocol_mismatch", "bridge_too_old", "invalid_frame", "duplicate_slug", "reserved_slug", "unknown_slug", "unknown_field_path", "unknown_type", "unknown_topic", "invalid_rate", "invalid_range", "config_conflict", "no_data", "robot_offline", "bridge_timeout", "unauthorized", "forbidden", "invalid_credentials", "token_expired", "token_revoked", "email_taken", "identifier_taken", "weak_password", "account_blocked", "busy", "parameter_invalid", "cancel_rejected", "job_lost", "operator_verified_stopped", "job_unknown_to_bridge", "action_server_lost", "action_failed", "goal_rejected", "goal_send_failed", "result_failed", "goal_uncontrollable", "bridge_disconnected", "config_changed", "publisher_busy", "unknown_command", "not_subscribable", "camera_offline", "no_snapshot_yet", "live_unavailable", "wrong_kind", "not_recorded", "not_aggregatable", "quota_exceeded", "credential_in_use", "goal_timeout", "robot_in_use", "robot_deletion_partial", "job_queue_full", "invalid_uuid", "rate_limited", "tier_required", "token_spent", "service_timeout", "asset_missing", "dynamic_registration_disabled", "client_limit_reached", "idp_unavailable", "mcp_disabled", "tool_not_available", "capability_required", "last_owner", "role_name_taken", "role_in_use", "last_role", "target_state_conflict", "job_state_conflict", "signup_closed", "draft_not_a_document", "internal_error", "not_cancellable", "unsupported_media_type", "wrong_browser", "invalid_yaml", "unstorable_yaml", "registration_closed", "domain_not_allowed", "email_unverified", "origin_not_allowed", "template_invalid", "provider_disabled", "provider_misconfigured", "invalid_redirect_uri", "interaction_expired", "invalid_code", "method_not_allowed", "plan_limit", "plan_required", "org_locked", "file_too_large", "billing_unavailable", "payment_provider_unavailable", "history_migrating", "billing_documents_unavailable", "support_read_only", "support_forbidden"];
868
871
  type ErrorCode = (typeof ERROR_CODES)[number];
869
872
 
870
873
  /**
@@ -1710,6 +1713,18 @@ interface SignInMethods {
1710
1713
  password: boolean;
1711
1714
  /** Whether `requestLoginCode`/`verifyLoginCode` is on for this app. */
1712
1715
  emailCode: boolean;
1716
+ /**
1717
+ * The app's two-factor policy — `'off'`, `'optional'` or `'required'` —
1718
+ * not the signed-in person's enrollment state.
1719
+ *
1720
+ * **`null` when the cloud answered no policy this SDK recognises**: a cloud
1721
+ * that predates the field, or a value outside those three. Treat `null` as
1722
+ * a failed policy read — offer no two-factor action, let the person retry —
1723
+ * and never as `'off'`: the SDK does not guess a policy, and the cloud
1724
+ * still enforces the real one at sign-in. `password` and `emailCode` are
1725
+ * read either way, so a login screen keeps working against such a cloud.
1726
+ */
1727
+ twoFactor: 'off' | 'optional' | 'required' | null;
1713
1728
  }
1714
1729
  /** One sign-in button on the app's own login screen, as `listProviders()` lists it. */
1715
1730
  interface ProviderButton {
@@ -2013,7 +2028,7 @@ interface AuthApi {
2013
2028
  */
2014
2029
  listProviders(): Promise<ProviderButton[]>;
2015
2030
  /**
2016
- * Which credential-based sign-in methods this app has on, for drawing a
2031
+ * Which credential-based sign-in methods and two-factor policy this app has on, for drawing a
2017
2032
  * password field, a "get a code by email" link, or both, on your own login
2018
2033
  * screen — the other half of what the login screen needs, the federated
2019
2034
  * buttons being `listProviders()`'s own answer.
@@ -2022,6 +2037,10 @@ interface AuthApi {
2022
2037
  * (`GET /api/client/providers`) — each call is its own request, picking a
2023
2038
  * different field out of the same response; call both if your login
2024
2039
  * screen needs both.
2040
+ *
2041
+ * `twoFactor` is `null` when the cloud's answer carries no policy this SDK
2042
+ * recognises (an older cloud, or an unknown value) — a failed policy read,
2043
+ * not `'off'`. `password` and `emailCode` are answered either way.
2025
2044
  */
2026
2045
  signInMethods(): Promise<SignInMethods>;
2027
2046
  /**