@tinycloud/sdk-services 3.0.0 → 3.1.0-beta.2

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
@@ -1075,6 +1075,24 @@ declare function parseAuthError(responseText: string): {
1075
1075
  * Create a service error for unauthorized action (missing capability).
1076
1076
  */
1077
1077
  declare function authUnauthorizedError(service: string, message: string, meta?: Record<string, unknown>): ServiceError;
1078
+ /**
1079
+ * Authorization verdict read from an error's structure, never its message:
1080
+ * - `"unauthenticated"`: HTTP 401 — the session is missing or stale.
1081
+ * - `"forbidden"`: HTTP 403, or `AUTH_UNAUTHORIZED` without a status — the
1082
+ * session is valid but lacks the capability.
1083
+ * - `"other"`: a non-authorization HTTP error status (4xx/5xx).
1084
+ */
1085
+ type AuthorizationVerdict = "unauthenticated" | "forbidden" | "other";
1086
+ /**
1087
+ * Classify an error from its typed HTTP error status (`status`, `statusCode`,
1088
+ * or `meta.status`, 4xx/5xx only) and `AUTH_UNAUTHORIZED` code, following the
1089
+ * `cause` chain outer-first (at most {@link MAX_CAUSE_DEPTH} links, cycles
1090
+ * stop the walk) so wrappers that rethrow with `cause` keep the verdict. The
1091
+ * outermost error status decides, so an outer 5xx keeps its retry budget even
1092
+ * over an inner 401. Returns `undefined` for untyped errors; only then may
1093
+ * callers fall back to message heuristics.
1094
+ */
1095
+ declare function authorizationVerdictOf(error: unknown): AuthorizationVerdict | undefined;
1078
1096
  /**
1079
1097
  * Create a service error for storage quota exceeded (402 Payment Required).
1080
1098
  */
@@ -1083,6 +1101,36 @@ declare function storageQuotaExceededError(service: string, message: string, met
1083
1101
  * Create a service error for storage limit reached (413 Payload Too Large).
1084
1102
  */
1085
1103
  declare function storageLimitReachedError(service: string, message: string, meta?: Record<string, unknown>): ServiceError;
1104
+ /** Shown when a write is rejected because the owner's storage is full. */
1105
+ declare const STORAGE_FULL_MESSAGE = "TinyCloud storage is full, so this change was not saved. Reading still works. Free up space or upgrade your plan to save again.";
1106
+ /** Shown when a write is larger than the storage the owner has left. */
1107
+ declare const STORAGE_WRITE_TOO_LARGE_MESSAGE = "This change is larger than the TinyCloud storage you have left, so it was not saved. Reading still works. Free up space or upgrade your plan to save it.";
1108
+ /**
1109
+ * Parse the byte counts from a node storage rejection
1110
+ * ("... Used: 155744 bytes, Limit: 0 bytes"). The limit is the share of the
1111
+ * owner's account-wide budget left for this space, so it is 0 when the
1112
+ * owner's other spaces already use the whole budget.
1113
+ */
1114
+ declare function parseStorageQuotaBytes(responseText: string): {
1115
+ usedBytes: number;
1116
+ limitBytes: number;
1117
+ } | undefined;
1118
+ /**
1119
+ * Build the error for a write the node rejected for storage: 402 when storage
1120
+ * is already full, 413 when this write is larger than what is left. KV, SQL
1121
+ * and DuckDB all report it with the same codes and message so an app can
1122
+ * detect "storage full" in one place with {@link isStorageFullError}.
1123
+ */
1124
+ declare function storageRejectionError(service: string, status: 402 | 413, meta: Record<string, unknown>, responseText: string): ServiceError;
1125
+ /**
1126
+ * True when a write failed for storage: the owner's TinyCloud storage is full
1127
+ * (`STORAGE_QUOTA_EXCEEDED`), or this write is larger than what is left
1128
+ * (`STORAGE_LIMIT_REACHED`). Reads keep working in both cases, so apps should
1129
+ * stay usable read-only and point the user at freeing up space or upgrading.
1130
+ */
1131
+ declare function isStorageFullError(error: {
1132
+ code?: string;
1133
+ } | null | undefined): boolean;
1086
1134
  /**
1087
1135
  * Wrap an unknown error in a ServiceError.
1088
1136
  */
@@ -1701,6 +1749,10 @@ type VaultErrorInput = {
1701
1749
  code: "STORAGE_ERROR";
1702
1750
  cause: Error;
1703
1751
  message?: string;
1752
+ } | {
1753
+ code: "STORAGE_QUOTA_EXCEEDED" | "STORAGE_LIMIT_REACHED";
1754
+ message: string;
1755
+ meta?: Record<string, unknown>;
1704
1756
  };
1705
1757
  /**
1706
1758
  * Vault error with service field (compatible with ServiceError).
@@ -2245,4 +2297,4 @@ declare class SecretsService implements ISecretsService {
2245
2297
  listAll(): Promise<Result<SecretCatalogEntry[], SecretsError>>;
2246
2298
  }
2247
2299
 
2248
- export { BaseService, type BaseServiceOptions, type ColumnInfo, type DataVaultConfig, DataVaultService, DecryptCapabilityProof, DuckDbAction, type DuckDbActionType, type DuckDbBatchOptions, type BatchResponse as DuckDbBatchResponse, DuckDbDatabaseHandle, type DuckDbExecuteOptions, type ExecuteResponse as DuckDbExecuteResponse, type DuckDbOptions, type DuckDbQueryOptions, type QueryResponse as DuckDbQueryResponse, DuckDbService, type DuckDbServiceConfig, type DuckDbStatement, type DuckDbValue, EventHandler, FetchFunction, GenericKVResponseSchema, type GenericKVResponseType, GenericResultSchema, type HookEvent, type HookServiceName, type HookStreamEvent, type HookSubscription, type HookWebhookListOptions, type HookWebhookRecord, type HookWebhookRegistration, type HookWebhookScope, type HookWebhookUnregisterOptions, HooksService, type HooksServiceConfig, type IDataVaultService, type IDuckDbDatabaseHandle, type IDuckDbService, IEncryptionService, type IHooksService, IKVService, type ISecretsService, IService, IServiceContext, InvokeAnyFunction, InvokeFunction, KVListResponseSchema, type KVListResponseType, KVListResultSchema, type KVListResultType, KVResponseHeadersSchema, type KVResponseHeadersType, type ParsedSecretCatalogKey, PermissionHint, type QuotaConfig, type QuotaStatus, type ResolvedSecretPath, Result, RetryPolicy, RetryPolicySchema, type RetryPolicyType, SECRET_NAME_RE, type SchemaInfo, type SecretCatalogEntry, type SecretPayload, type SecretScopeOptions, type SecretsError, SecretsService, type ServiceConstructor, ServiceContext, type ServiceContextConfig, ServiceError, ServiceErrorEventSchema, type ServiceErrorEventType, ServiceErrorSchema, type ServiceErrorType, type ServiceRegistration, ServiceRequestEventSchema, type ServiceRequestEventType, ServiceResponseEventSchema, type ServiceResponseEventType, ServiceRetryEventSchema, type ServiceRetryEventType, ServiceSession, ServiceSessionSchema, type ServiceSessionType, StorageQuotaInfo, type SubscribeOptions, type TableInfo, TelemetryConfig, TelemetrySpanEventSchema, type TelemetrySpanEventType, type TinyCloudDebugEnableOptions, type TinyCloudDebugEvent, type TinyCloudDebugLevel, TinyCloudDebugLogger, type TinyCloudDebugTimer, TinyCloudQuota, type ValidationError, type VaultCrypto, type VaultEntry, type VaultError, type VaultGetOptions, type VaultGrantOptions, VaultHeaders, type VaultListOptions, type VaultListPage, type VaultNetworkReadResult, VaultPublicSpaceKVActions, type VaultPutOptions, type ViewInfo, type WasmVaultFunctions, abortedError, authExpiredError, authRequiredError, authUnauthorizedError, canonicalizeSecretScope, clearTinyCloudDebugLogs, createKVResponseSchema, createResultSchema, createVaultCrypto, disableTinyCloudDebug, enableTinyCloudDebug, errorResult, getTinyCloudDebugLogs, installTinyCloudDebugGlobals, networkError, notFoundError, parseAuthError, parsePermissionHint, parsePermissionHintFromErrorText, parseSecretCatalogKey, permissionDeniedError, resolveSecretListPrefix, resolveSecretPath, storageLimitReachedError, storageQuotaExceededError, timeoutError, tinyCloudDebugLogger, validateKVListResponse, validateKVResponseHeaders, validateRetryPolicy, validateServiceError, validateServiceRequestEvent, validateServiceResponseEvent, validateServiceSession, validateTelemetrySpanEvent, wrapError };
2300
+ export { type AuthorizationVerdict, BaseService, type BaseServiceOptions, type ColumnInfo, type DataVaultConfig, DataVaultService, DecryptCapabilityProof, DuckDbAction, type DuckDbActionType, type DuckDbBatchOptions, type BatchResponse as DuckDbBatchResponse, DuckDbDatabaseHandle, type DuckDbExecuteOptions, type ExecuteResponse as DuckDbExecuteResponse, type DuckDbOptions, type DuckDbQueryOptions, type QueryResponse as DuckDbQueryResponse, DuckDbService, type DuckDbServiceConfig, type DuckDbStatement, type DuckDbValue, EventHandler, FetchFunction, GenericKVResponseSchema, type GenericKVResponseType, GenericResultSchema, type HookEvent, type HookServiceName, type HookStreamEvent, type HookSubscription, type HookWebhookListOptions, type HookWebhookRecord, type HookWebhookRegistration, type HookWebhookScope, type HookWebhookUnregisterOptions, HooksService, type HooksServiceConfig, type IDataVaultService, type IDuckDbDatabaseHandle, type IDuckDbService, IEncryptionService, type IHooksService, IKVService, type ISecretsService, IService, IServiceContext, InvokeAnyFunction, InvokeFunction, KVListResponseSchema, type KVListResponseType, KVListResultSchema, type KVListResultType, KVResponseHeadersSchema, type KVResponseHeadersType, type ParsedSecretCatalogKey, PermissionHint, type QuotaConfig, type QuotaStatus, type ResolvedSecretPath, Result, RetryPolicy, RetryPolicySchema, type RetryPolicyType, SECRET_NAME_RE, STORAGE_FULL_MESSAGE, STORAGE_WRITE_TOO_LARGE_MESSAGE, type SchemaInfo, type SecretCatalogEntry, type SecretPayload, type SecretScopeOptions, type SecretsError, SecretsService, type ServiceConstructor, ServiceContext, type ServiceContextConfig, ServiceError, ServiceErrorEventSchema, type ServiceErrorEventType, ServiceErrorSchema, type ServiceErrorType, type ServiceRegistration, ServiceRequestEventSchema, type ServiceRequestEventType, ServiceResponseEventSchema, type ServiceResponseEventType, ServiceRetryEventSchema, type ServiceRetryEventType, ServiceSession, ServiceSessionSchema, type ServiceSessionType, StorageQuotaInfo, type SubscribeOptions, type TableInfo, TelemetryConfig, TelemetrySpanEventSchema, type TelemetrySpanEventType, type TinyCloudDebugEnableOptions, type TinyCloudDebugEvent, type TinyCloudDebugLevel, TinyCloudDebugLogger, type TinyCloudDebugTimer, TinyCloudQuota, type ValidationError, type VaultCrypto, type VaultEntry, type VaultError, type VaultGetOptions, type VaultGrantOptions, VaultHeaders, type VaultListOptions, type VaultListPage, type VaultNetworkReadResult, VaultPublicSpaceKVActions, type VaultPutOptions, type ViewInfo, type WasmVaultFunctions, abortedError, authExpiredError, authRequiredError, authUnauthorizedError, authorizationVerdictOf, canonicalizeSecretScope, clearTinyCloudDebugLogs, createKVResponseSchema, createResultSchema, createVaultCrypto, disableTinyCloudDebug, enableTinyCloudDebug, errorResult, getTinyCloudDebugLogs, installTinyCloudDebugGlobals, isStorageFullError, networkError, notFoundError, parseAuthError, parsePermissionHint, parsePermissionHintFromErrorText, parseSecretCatalogKey, parseStorageQuotaBytes, permissionDeniedError, resolveSecretListPrefix, resolveSecretPath, storageLimitReachedError, storageQuotaExceededError, storageRejectionError, timeoutError, tinyCloudDebugLogger, validateKVListResponse, validateKVResponseHeaders, validateRetryPolicy, validateServiceError, validateServiceRequestEvent, validateServiceResponseEvent, validateServiceSession, validateTelemetrySpanEvent, wrapError };
package/dist/index.d.ts CHANGED
@@ -1075,6 +1075,24 @@ declare function parseAuthError(responseText: string): {
1075
1075
  * Create a service error for unauthorized action (missing capability).
1076
1076
  */
1077
1077
  declare function authUnauthorizedError(service: string, message: string, meta?: Record<string, unknown>): ServiceError;
1078
+ /**
1079
+ * Authorization verdict read from an error's structure, never its message:
1080
+ * - `"unauthenticated"`: HTTP 401 — the session is missing or stale.
1081
+ * - `"forbidden"`: HTTP 403, or `AUTH_UNAUTHORIZED` without a status — the
1082
+ * session is valid but lacks the capability.
1083
+ * - `"other"`: a non-authorization HTTP error status (4xx/5xx).
1084
+ */
1085
+ type AuthorizationVerdict = "unauthenticated" | "forbidden" | "other";
1086
+ /**
1087
+ * Classify an error from its typed HTTP error status (`status`, `statusCode`,
1088
+ * or `meta.status`, 4xx/5xx only) and `AUTH_UNAUTHORIZED` code, following the
1089
+ * `cause` chain outer-first (at most {@link MAX_CAUSE_DEPTH} links, cycles
1090
+ * stop the walk) so wrappers that rethrow with `cause` keep the verdict. The
1091
+ * outermost error status decides, so an outer 5xx keeps its retry budget even
1092
+ * over an inner 401. Returns `undefined` for untyped errors; only then may
1093
+ * callers fall back to message heuristics.
1094
+ */
1095
+ declare function authorizationVerdictOf(error: unknown): AuthorizationVerdict | undefined;
1078
1096
  /**
1079
1097
  * Create a service error for storage quota exceeded (402 Payment Required).
1080
1098
  */
@@ -1083,6 +1101,36 @@ declare function storageQuotaExceededError(service: string, message: string, met
1083
1101
  * Create a service error for storage limit reached (413 Payload Too Large).
1084
1102
  */
1085
1103
  declare function storageLimitReachedError(service: string, message: string, meta?: Record<string, unknown>): ServiceError;
1104
+ /** Shown when a write is rejected because the owner's storage is full. */
1105
+ declare const STORAGE_FULL_MESSAGE = "TinyCloud storage is full, so this change was not saved. Reading still works. Free up space or upgrade your plan to save again.";
1106
+ /** Shown when a write is larger than the storage the owner has left. */
1107
+ declare const STORAGE_WRITE_TOO_LARGE_MESSAGE = "This change is larger than the TinyCloud storage you have left, so it was not saved. Reading still works. Free up space or upgrade your plan to save it.";
1108
+ /**
1109
+ * Parse the byte counts from a node storage rejection
1110
+ * ("... Used: 155744 bytes, Limit: 0 bytes"). The limit is the share of the
1111
+ * owner's account-wide budget left for this space, so it is 0 when the
1112
+ * owner's other spaces already use the whole budget.
1113
+ */
1114
+ declare function parseStorageQuotaBytes(responseText: string): {
1115
+ usedBytes: number;
1116
+ limitBytes: number;
1117
+ } | undefined;
1118
+ /**
1119
+ * Build the error for a write the node rejected for storage: 402 when storage
1120
+ * is already full, 413 when this write is larger than what is left. KV, SQL
1121
+ * and DuckDB all report it with the same codes and message so an app can
1122
+ * detect "storage full" in one place with {@link isStorageFullError}.
1123
+ */
1124
+ declare function storageRejectionError(service: string, status: 402 | 413, meta: Record<string, unknown>, responseText: string): ServiceError;
1125
+ /**
1126
+ * True when a write failed for storage: the owner's TinyCloud storage is full
1127
+ * (`STORAGE_QUOTA_EXCEEDED`), or this write is larger than what is left
1128
+ * (`STORAGE_LIMIT_REACHED`). Reads keep working in both cases, so apps should
1129
+ * stay usable read-only and point the user at freeing up space or upgrading.
1130
+ */
1131
+ declare function isStorageFullError(error: {
1132
+ code?: string;
1133
+ } | null | undefined): boolean;
1086
1134
  /**
1087
1135
  * Wrap an unknown error in a ServiceError.
1088
1136
  */
@@ -1701,6 +1749,10 @@ type VaultErrorInput = {
1701
1749
  code: "STORAGE_ERROR";
1702
1750
  cause: Error;
1703
1751
  message?: string;
1752
+ } | {
1753
+ code: "STORAGE_QUOTA_EXCEEDED" | "STORAGE_LIMIT_REACHED";
1754
+ message: string;
1755
+ meta?: Record<string, unknown>;
1704
1756
  };
1705
1757
  /**
1706
1758
  * Vault error with service field (compatible with ServiceError).
@@ -2245,4 +2297,4 @@ declare class SecretsService implements ISecretsService {
2245
2297
  listAll(): Promise<Result<SecretCatalogEntry[], SecretsError>>;
2246
2298
  }
2247
2299
 
2248
- export { BaseService, type BaseServiceOptions, type ColumnInfo, type DataVaultConfig, DataVaultService, DecryptCapabilityProof, DuckDbAction, type DuckDbActionType, type DuckDbBatchOptions, type BatchResponse as DuckDbBatchResponse, DuckDbDatabaseHandle, type DuckDbExecuteOptions, type ExecuteResponse as DuckDbExecuteResponse, type DuckDbOptions, type DuckDbQueryOptions, type QueryResponse as DuckDbQueryResponse, DuckDbService, type DuckDbServiceConfig, type DuckDbStatement, type DuckDbValue, EventHandler, FetchFunction, GenericKVResponseSchema, type GenericKVResponseType, GenericResultSchema, type HookEvent, type HookServiceName, type HookStreamEvent, type HookSubscription, type HookWebhookListOptions, type HookWebhookRecord, type HookWebhookRegistration, type HookWebhookScope, type HookWebhookUnregisterOptions, HooksService, type HooksServiceConfig, type IDataVaultService, type IDuckDbDatabaseHandle, type IDuckDbService, IEncryptionService, type IHooksService, IKVService, type ISecretsService, IService, IServiceContext, InvokeAnyFunction, InvokeFunction, KVListResponseSchema, type KVListResponseType, KVListResultSchema, type KVListResultType, KVResponseHeadersSchema, type KVResponseHeadersType, type ParsedSecretCatalogKey, PermissionHint, type QuotaConfig, type QuotaStatus, type ResolvedSecretPath, Result, RetryPolicy, RetryPolicySchema, type RetryPolicyType, SECRET_NAME_RE, type SchemaInfo, type SecretCatalogEntry, type SecretPayload, type SecretScopeOptions, type SecretsError, SecretsService, type ServiceConstructor, ServiceContext, type ServiceContextConfig, ServiceError, ServiceErrorEventSchema, type ServiceErrorEventType, ServiceErrorSchema, type ServiceErrorType, type ServiceRegistration, ServiceRequestEventSchema, type ServiceRequestEventType, ServiceResponseEventSchema, type ServiceResponseEventType, ServiceRetryEventSchema, type ServiceRetryEventType, ServiceSession, ServiceSessionSchema, type ServiceSessionType, StorageQuotaInfo, type SubscribeOptions, type TableInfo, TelemetryConfig, TelemetrySpanEventSchema, type TelemetrySpanEventType, type TinyCloudDebugEnableOptions, type TinyCloudDebugEvent, type TinyCloudDebugLevel, TinyCloudDebugLogger, type TinyCloudDebugTimer, TinyCloudQuota, type ValidationError, type VaultCrypto, type VaultEntry, type VaultError, type VaultGetOptions, type VaultGrantOptions, VaultHeaders, type VaultListOptions, type VaultListPage, type VaultNetworkReadResult, VaultPublicSpaceKVActions, type VaultPutOptions, type ViewInfo, type WasmVaultFunctions, abortedError, authExpiredError, authRequiredError, authUnauthorizedError, canonicalizeSecretScope, clearTinyCloudDebugLogs, createKVResponseSchema, createResultSchema, createVaultCrypto, disableTinyCloudDebug, enableTinyCloudDebug, errorResult, getTinyCloudDebugLogs, installTinyCloudDebugGlobals, networkError, notFoundError, parseAuthError, parsePermissionHint, parsePermissionHintFromErrorText, parseSecretCatalogKey, permissionDeniedError, resolveSecretListPrefix, resolveSecretPath, storageLimitReachedError, storageQuotaExceededError, timeoutError, tinyCloudDebugLogger, validateKVListResponse, validateKVResponseHeaders, validateRetryPolicy, validateServiceError, validateServiceRequestEvent, validateServiceResponseEvent, validateServiceSession, validateTelemetrySpanEvent, wrapError };
2300
+ export { type AuthorizationVerdict, BaseService, type BaseServiceOptions, type ColumnInfo, type DataVaultConfig, DataVaultService, DecryptCapabilityProof, DuckDbAction, type DuckDbActionType, type DuckDbBatchOptions, type BatchResponse as DuckDbBatchResponse, DuckDbDatabaseHandle, type DuckDbExecuteOptions, type ExecuteResponse as DuckDbExecuteResponse, type DuckDbOptions, type DuckDbQueryOptions, type QueryResponse as DuckDbQueryResponse, DuckDbService, type DuckDbServiceConfig, type DuckDbStatement, type DuckDbValue, EventHandler, FetchFunction, GenericKVResponseSchema, type GenericKVResponseType, GenericResultSchema, type HookEvent, type HookServiceName, type HookStreamEvent, type HookSubscription, type HookWebhookListOptions, type HookWebhookRecord, type HookWebhookRegistration, type HookWebhookScope, type HookWebhookUnregisterOptions, HooksService, type HooksServiceConfig, type IDataVaultService, type IDuckDbDatabaseHandle, type IDuckDbService, IEncryptionService, type IHooksService, IKVService, type ISecretsService, IService, IServiceContext, InvokeAnyFunction, InvokeFunction, KVListResponseSchema, type KVListResponseType, KVListResultSchema, type KVListResultType, KVResponseHeadersSchema, type KVResponseHeadersType, type ParsedSecretCatalogKey, PermissionHint, type QuotaConfig, type QuotaStatus, type ResolvedSecretPath, Result, RetryPolicy, RetryPolicySchema, type RetryPolicyType, SECRET_NAME_RE, STORAGE_FULL_MESSAGE, STORAGE_WRITE_TOO_LARGE_MESSAGE, type SchemaInfo, type SecretCatalogEntry, type SecretPayload, type SecretScopeOptions, type SecretsError, SecretsService, type ServiceConstructor, ServiceContext, type ServiceContextConfig, ServiceError, ServiceErrorEventSchema, type ServiceErrorEventType, ServiceErrorSchema, type ServiceErrorType, type ServiceRegistration, ServiceRequestEventSchema, type ServiceRequestEventType, ServiceResponseEventSchema, type ServiceResponseEventType, ServiceRetryEventSchema, type ServiceRetryEventType, ServiceSession, ServiceSessionSchema, type ServiceSessionType, StorageQuotaInfo, type SubscribeOptions, type TableInfo, TelemetryConfig, TelemetrySpanEventSchema, type TelemetrySpanEventType, type TinyCloudDebugEnableOptions, type TinyCloudDebugEvent, type TinyCloudDebugLevel, TinyCloudDebugLogger, type TinyCloudDebugTimer, TinyCloudQuota, type ValidationError, type VaultCrypto, type VaultEntry, type VaultError, type VaultGetOptions, type VaultGrantOptions, VaultHeaders, type VaultListOptions, type VaultListPage, type VaultNetworkReadResult, VaultPublicSpaceKVActions, type VaultPutOptions, type ViewInfo, type WasmVaultFunctions, abortedError, authExpiredError, authRequiredError, authUnauthorizedError, authorizationVerdictOf, canonicalizeSecretScope, clearTinyCloudDebugLogs, createKVResponseSchema, createResultSchema, createVaultCrypto, disableTinyCloudDebug, enableTinyCloudDebug, errorResult, getTinyCloudDebugLogs, installTinyCloudDebugGlobals, isStorageFullError, networkError, notFoundError, parseAuthError, parsePermissionHint, parsePermissionHintFromErrorText, parseSecretCatalogKey, parseStorageQuotaBytes, permissionDeniedError, resolveSecretListPrefix, resolveSecretPath, storageLimitReachedError, storageQuotaExceededError, storageRejectionError, timeoutError, tinyCloudDebugLogger, validateKVListResponse, validateKVResponseHeaders, validateRetryPolicy, validateServiceError, validateServiceRequestEvent, validateServiceResponseEvent, validateServiceSession, validateTelemetrySpanEvent, wrapError };