@fleetless/sdk 4.3.0 → 4.4.0-next.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
@@ -508,14 +508,23 @@ type SessionTokens = z.infer<typeof sessionTokens>;
508
508
  * `provider_misconfigured`, `provider_disabled` — the provider's or the
509
509
  * developer's to fix, and the app can say so.
510
510
  * - `invalid_request` — the start parameters did not hold up.
511
- * - `quota_exceeded` — the org has as many app users as its `max_end_users`
512
- * quota allows, so no account can be created for this identity. Named rather
513
- * than folded into `no_access`, for `domain_not_allowed`'s reason: it is not
514
- * about the person, the app can say what happened, and the remedy belongs to
515
- * the developer rather than to whoever is trying to sign in. It is raised
511
+ * - `quota_exceeded` — the org is at the protection ceiling: it has as many
512
+ * app users as its `max_end_users` quota allows, so no account can be
513
+ * created for this identity. This also covers an org still on the beta,
514
+ * whose plan is not enforced yet. Named rather than folded into
515
+ * `no_access`, for `domain_not_allowed`'s reason: it is not about the
516
+ * person, the app can say what happened, and the remedy belongs to the
517
+ * developer rather than to whoever is trying to sign in. It is raised
516
518
  * **only where an account would be created** — an identity that already has
517
519
  * one signs in at the quota exactly as it does under it, because refusing a
518
520
  * sign-in would turn a protection limit into an outage.
521
+ * - `plan_limit` — the org's plan has no room for another app user: it is at
522
+ * its plan's `app_users` limit (fleetless/fleetless#103), counted across
523
+ * every app of the org with pending invitations included. Checked before
524
+ * the protection ceiling, and raised, like `quota_exceeded`, **only where
525
+ * an account would be created**. The remedy is a higher plan or an add-on,
526
+ * which is why it is not `quota_exceeded`. It is the same code the other
527
+ * app-user doors answer as `409 plan_limit`.
519
528
  */
520
529
  declare const clientOidcErrorCode: z.ZodEnum<{
521
530
  no_access: "no_access";
@@ -530,6 +539,7 @@ declare const clientOidcErrorCode: z.ZodEnum<{
530
539
  provider_disabled: "provider_disabled";
531
540
  invalid_request: "invalid_request";
532
541
  quota_exceeded: "quota_exceeded";
542
+ plan_limit: "plan_limit";
533
543
  }>;
534
544
  type ClientOidcErrorCode = z.infer<typeof clientOidcErrorCode>;
535
545
  /**
@@ -854,7 +864,7 @@ type CancelRejectedDetails = z.infer<typeof cancelRejectedDetails>;
854
864
  * list is the shared vocabulary, not a closed set, so a new refusal never
855
865
  * needs a contracts release before it can be reported honestly.
856
866
  */
857
- 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"];
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"];
858
868
  type ErrorCode = (typeof ERROR_CODES)[number];
859
869
 
860
870
  /**
package/dist/index.d.ts CHANGED
@@ -508,14 +508,23 @@ type SessionTokens = z.infer<typeof sessionTokens>;
508
508
  * `provider_misconfigured`, `provider_disabled` — the provider's or the
509
509
  * developer's to fix, and the app can say so.
510
510
  * - `invalid_request` — the start parameters did not hold up.
511
- * - `quota_exceeded` — the org has as many app users as its `max_end_users`
512
- * quota allows, so no account can be created for this identity. Named rather
513
- * than folded into `no_access`, for `domain_not_allowed`'s reason: it is not
514
- * about the person, the app can say what happened, and the remedy belongs to
515
- * the developer rather than to whoever is trying to sign in. It is raised
511
+ * - `quota_exceeded` — the org is at the protection ceiling: it has as many
512
+ * app users as its `max_end_users` quota allows, so no account can be
513
+ * created for this identity. This also covers an org still on the beta,
514
+ * whose plan is not enforced yet. Named rather than folded into
515
+ * `no_access`, for `domain_not_allowed`'s reason: it is not about the
516
+ * person, the app can say what happened, and the remedy belongs to the
517
+ * developer rather than to whoever is trying to sign in. It is raised
516
518
  * **only where an account would be created** — an identity that already has
517
519
  * one signs in at the quota exactly as it does under it, because refusing a
518
520
  * sign-in would turn a protection limit into an outage.
521
+ * - `plan_limit` — the org's plan has no room for another app user: it is at
522
+ * its plan's `app_users` limit (fleetless/fleetless#103), counted across
523
+ * every app of the org with pending invitations included. Checked before
524
+ * the protection ceiling, and raised, like `quota_exceeded`, **only where
525
+ * an account would be created**. The remedy is a higher plan or an add-on,
526
+ * which is why it is not `quota_exceeded`. It is the same code the other
527
+ * app-user doors answer as `409 plan_limit`.
519
528
  */
520
529
  declare const clientOidcErrorCode: z.ZodEnum<{
521
530
  no_access: "no_access";
@@ -530,6 +539,7 @@ declare const clientOidcErrorCode: z.ZodEnum<{
530
539
  provider_disabled: "provider_disabled";
531
540
  invalid_request: "invalid_request";
532
541
  quota_exceeded: "quota_exceeded";
542
+ plan_limit: "plan_limit";
533
543
  }>;
534
544
  type ClientOidcErrorCode = z.infer<typeof clientOidcErrorCode>;
535
545
  /**
@@ -854,7 +864,7 @@ type CancelRejectedDetails = z.infer<typeof cancelRejectedDetails>;
854
864
  * list is the shared vocabulary, not a closed set, so a new refusal never
855
865
  * needs a contracts release before it can be reported honestly.
856
866
  */
857
- 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"];
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"];
858
868
  type ErrorCode = (typeof ERROR_CODES)[number];
859
869
 
860
870
  /**