@trillboards/api-client 1.3.1 → 2.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.
@@ -337,8 +337,8 @@ type BleScanResultData = {
337
337
  };
338
338
  type CanonicalError = {
339
339
  error: {
340
- /** Stable machine-readable error code in snake_case. The enum below is the COMPLETE catalog (derived from utils/errorCatalog, the same registry `globalErrorHandler` reads), so a generated client can exhaustively switch on it. Per-code documentation: docs/errors.md and GET /v1/errors. */
341
- code: "ad_interval_out_of_range" | "allocation_out_of_range" | "analytics_unavailable" | "api_key_expired" | "api_key_owner_missing" | "api_key_revoked" | "array_items_must_be_strings" | "array_too_large" | "auth_error" | "authentication_required" | "batch_size_exceeded" | "blocked_advertisers_too_large" | "blocked_iab_categories_too_large" | "client_ip_required" | "concurrent_request_limit" | "conflict" | "conflicting_lists" | "daily_quota_exceeded" | "database_error" | "dataset_not_scopable" | "device_already_registered" | "device_identity_missing" | "device_identity_underivable" | "device_not_found" | "device_offline" | "dsp_access_denied" | "error" | "field_must_be_array" | "field_must_be_boolean" | "field_too_long" | "floor_price_out_of_range" | "forbidden" | "idempotency_error" | "idempotency_key_in_use" | "idempotency_key_mismatch" | "insufficient_data" | "insufficient_permissions" | "insufficient_scope" | "internal_error" | "invalid_ad_surface_mode" | "invalid_age_rating" | "invalid_api_key" | "invalid_api_key_format" | "invalid_array_items" | "invalid_currency" | "invalid_dataset" | "invalid_device_id" | "invalid_dimensions" | "invalid_display_mode" | "invalid_field_type" | "invalid_field_value" | "invalid_fingerprint" | "invalid_json" | "invalid_lbar_position" | "invalid_lbar_settings" | "invalid_measures" | "invalid_media_url" | "invalid_order_by" | "invalid_orientation" | "invalid_pip_position" | "invalid_pip_settings" | "invalid_preference_level" | "invalid_preferences" | "invalid_provider" | "invalid_screen_id" | "invalid_segment_rules" | "invalid_sizing_mode" | "invalid_stream_type" | "invalid_webhook_events" | "invalid_webhook_url" | "lbar_settings_must_be_object" | "lbar_size_out_of_range" | "missing_required_field" | "not_found" | "openrtb_auth_failed" | "openrtb_config_missing" | "paired_training_insert_failed" | "paired_training_rate_limit_exceeded" | "partner_inactive" | "pip_margin_out_of_range" | "pip_settings_must_be_object" | "pip_size_ratio_out_of_range" | "preferences_must_be_object" | "preferences_required" | "preset_id_required" | "preset_not_found" | "rate_limit_exceeded" | "resource_locked" | "screen_ids_required" | "screen_not_found" | "screen_not_in_scope" | "sdk_enrich_rate_limit_exceeded" | "sdk_impression_rate_limit_exceeded" | "sdk_qr_beacon_rate_limit_exceeded" | "sdk_qr_scan_rate_limit_exceeded" | "segment_limit_exceeded" | "segment_not_found" | "service_unavailable" | "stale_data" | "stream_content_required" | "stream_not_found" | "tier_insufficient" | "timeout" | "timeout_out_of_range" | "unknown_agent_type" | "unsupported_media_type" | "validation_error" | "webhook_limit_exceeded" | "webhook_not_found" | "webhook_secret_expired" | "webhook_url_unreachable";
340
+ /** Stable machine-readable error code. Switch on this, never on `message`. The 111 CATALOGUED codes are published as the `ErrorCode` schema and served live by `GET /v1/errors`, which is the authority. This field is NOT limited to them: services emit further codes directly, and `ApiError.notFound(resource)` mints `<resource>_not_found` from an arbitrary resource name. Always handle an unrecognised code by falling back to `type`. */
341
+ code: string;
342
342
  /** Per-field violations (populated from Zod errors). */
343
343
  details?: Array<{
344
344
  code?: string;
@@ -337,8 +337,8 @@ type BleScanResultData = {
337
337
  };
338
338
  type CanonicalError = {
339
339
  error: {
340
- /** Stable machine-readable error code in snake_case. The enum below is the COMPLETE catalog (derived from utils/errorCatalog, the same registry `globalErrorHandler` reads), so a generated client can exhaustively switch on it. Per-code documentation: docs/errors.md and GET /v1/errors. */
341
- code: "ad_interval_out_of_range" | "allocation_out_of_range" | "analytics_unavailable" | "api_key_expired" | "api_key_owner_missing" | "api_key_revoked" | "array_items_must_be_strings" | "array_too_large" | "auth_error" | "authentication_required" | "batch_size_exceeded" | "blocked_advertisers_too_large" | "blocked_iab_categories_too_large" | "client_ip_required" | "concurrent_request_limit" | "conflict" | "conflicting_lists" | "daily_quota_exceeded" | "database_error" | "dataset_not_scopable" | "device_already_registered" | "device_identity_missing" | "device_identity_underivable" | "device_not_found" | "device_offline" | "dsp_access_denied" | "error" | "field_must_be_array" | "field_must_be_boolean" | "field_too_long" | "floor_price_out_of_range" | "forbidden" | "idempotency_error" | "idempotency_key_in_use" | "idempotency_key_mismatch" | "insufficient_data" | "insufficient_permissions" | "insufficient_scope" | "internal_error" | "invalid_ad_surface_mode" | "invalid_age_rating" | "invalid_api_key" | "invalid_api_key_format" | "invalid_array_items" | "invalid_currency" | "invalid_dataset" | "invalid_device_id" | "invalid_dimensions" | "invalid_display_mode" | "invalid_field_type" | "invalid_field_value" | "invalid_fingerprint" | "invalid_json" | "invalid_lbar_position" | "invalid_lbar_settings" | "invalid_measures" | "invalid_media_url" | "invalid_order_by" | "invalid_orientation" | "invalid_pip_position" | "invalid_pip_settings" | "invalid_preference_level" | "invalid_preferences" | "invalid_provider" | "invalid_screen_id" | "invalid_segment_rules" | "invalid_sizing_mode" | "invalid_stream_type" | "invalid_webhook_events" | "invalid_webhook_url" | "lbar_settings_must_be_object" | "lbar_size_out_of_range" | "missing_required_field" | "not_found" | "openrtb_auth_failed" | "openrtb_config_missing" | "paired_training_insert_failed" | "paired_training_rate_limit_exceeded" | "partner_inactive" | "pip_margin_out_of_range" | "pip_settings_must_be_object" | "pip_size_ratio_out_of_range" | "preferences_must_be_object" | "preferences_required" | "preset_id_required" | "preset_not_found" | "rate_limit_exceeded" | "resource_locked" | "screen_ids_required" | "screen_not_found" | "screen_not_in_scope" | "sdk_enrich_rate_limit_exceeded" | "sdk_impression_rate_limit_exceeded" | "sdk_qr_beacon_rate_limit_exceeded" | "sdk_qr_scan_rate_limit_exceeded" | "segment_limit_exceeded" | "segment_not_found" | "service_unavailable" | "stale_data" | "stream_content_required" | "stream_not_found" | "tier_insufficient" | "timeout" | "timeout_out_of_range" | "unknown_agent_type" | "unsupported_media_type" | "validation_error" | "webhook_limit_exceeded" | "webhook_not_found" | "webhook_secret_expired" | "webhook_url_unreachable";
340
+ /** Stable machine-readable error code. Switch on this, never on `message`. The 111 CATALOGUED codes are published as the `ErrorCode` schema and served live by `GET /v1/errors`, which is the authority. This field is NOT limited to them: services emit further codes directly, and `ApiError.notFound(resource)` mints `<resource>_not_found` from an arbitrary resource name. Always handle an unrecognised code by falling back to `type`. */
341
+ code: string;
342
342
  /** Per-field violations (populated from Zod errors). */
343
343
  details?: Array<{
344
344
  code?: string;