@spooled/sdk 1.3.0 → 1.4.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/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RealtimeConnectionOptions, C as ConnectionState, S as SubscriptionFilter, a as RealtimeEventType, b as RealtimeEvent, c as RetryConfig } from './index-BVWKEr6p.cjs';
2
- export { A as API_VERSION, d as AddDependenciesParams, e as AddDependenciesResponse, f as AdminApiKeyResponse, g as AdminCreateApiKeyParams, h as AdminCreateOrganizationParams, i as AdminCreateOrganizationResponse, j as AdminDeleteOrganizationParams, k as AdminListOrganizationsParams, l as AdminOrganizationDetail, m as AdminOrganizationList, n as AdminOrganizationSummary, o as AdminPlanLimits, p as AdminPlatformStats, q as AdminResource, r as AdminUpdateOrganizationParams, s as AdminUsageStats, t as ApiKeySummary, u as ApiKeysResource, v as AuthResource, B as BatchJobStatus, w as BillingResource, x as BillingStatus, y as BoostPriorityResponse, z as BulkEnqueueParams, D as BulkEnqueueResponse, E as BulkJobItem, F as CheckEmailResponse, G as CheckSlugResponse, H as CircuitBreaker, I as CircuitBreakerConfig, J as CircuitState, K as ClaimJobsParams, L as ClaimJobsResult, M as ClaimedJob, N as CompleteJobParams, O as CreateApiKeyParams, P as CreateApiKeyResponse, Q as CreateBillingPortalParams, T as CreateBillingPortalResponse, U as CreateJobParams, V as CreateJobResult, W as CreateOrganizationParams, X as CreateOrganizationResponse, Y as CreateOutgoingWebhookParams, Z as CreateScheduleParams, _ as CreateScheduleResponse, $ as CreateWorkflowParams, a0 as CreateWorkflowResponse, a1 as CurrentUserResponse, a2 as DEFAULT_CONFIG, a3 as DashboardData, a4 as DashboardResource, a5 as DashboardWorkerSummary, a6 as DebugFn, a7 as DeleteQueueOptions, a8 as DependencyInfo, a9 as DependencyMode, aa as FailJobParams, ab as GrpcClientOptions, ac as GrpcCompleteJobParams, ad as GrpcCompleteJobResponse, ae as GrpcCompleteRequest, af as GrpcCompleteResponse, ag as GrpcDequeueJobParams, ah as GrpcDequeueJobResponse, ai as GrpcDequeueRequest, aj as GrpcDequeueResponse, ak as GrpcDeregisterRequest, al as GrpcDeregisterResponse, am as GrpcEnqueueJobParams, an as GrpcEnqueueJobResponse, ao as GrpcEnqueueRequest, ap as GrpcEnqueueResponse, aq as GrpcErrorResponse, ar as GrpcFailJobParams, as as GrpcFailJobResponse, at as GrpcFailRequest, au as GrpcFailResponse, av as GrpcGetJobRequest, aw as GrpcGetJobResponse, ax as GrpcGetQueueStatsRequest, ay as GrpcGetQueueStatsResponse, az as GrpcGetQueueStatsResponse_Legacy, aA as GrpcHeartbeatParams, aB as GrpcHeartbeatRequest, aC as GrpcHeartbeatResponse, aD as GrpcHeartbeatResponse_Legacy, aE as GrpcJob, aF as GrpcJobStatus, aG as GrpcJobStatusNumber, aH as GrpcProcessRequest, aI as GrpcProcessResponse, aJ as GrpcQueueOperations, aK as GrpcRegisterWorkerParams, aL as GrpcRegisterWorkerRequest, aM as GrpcRegisterWorkerResponse, aN as GrpcRegisterWorkerResponse_Legacy, aO as GrpcRenewLeaseParams, aP as GrpcRenewLeaseRequest, aQ as GrpcRenewLeaseResponse, aR as GrpcRenewLeaseResponse_Legacy, aS as GrpcStreamJobsRequest, aT as GrpcTimestamp, aU as GrpcWorkerOperations, aV as HealthResource, aW as HealthResponse, aX as HeartbeatEvent, aY as HeartbeatJobParams, aZ as HttpClient, a_ as IngestCustomWebhookParams, a$ as IngestCustomWebhookResponse, b0 as IngestGitHubWebhookOptions, b1 as IngestStripeWebhookOptions, b2 as InitialApiKey, b3 as Job, b4 as JobCompletedEvent, b5 as JobContext, b6 as JobCreatedEvent, b7 as JobFailedEvent, b8 as JobHandler, b9 as JobProgressEvent, ba as JobResult, bb as JobStartedEvent, bc as JobStats, bd as JobStatus, be as JobStatusChangedEvent, bf as JobStream, bg as JobSummary, bh as JobSummaryStats, bi as JobWithDependencies, bj as JobsResource, bk as JsonArray, bl as JsonObject, bm as JsonPrimitive, bn as JsonValue, bo as ListDlqParams, bp as ListJobsParams, bq as ListParams, br as ListSchedulesParams, bs as ListWorkflowsParams, bt as LoginParams, bu as LoginResponse, bv as MetricsResource, bw as Organization, bx as OrganizationMember, by as OrganizationSummary, bz as OrganizationUsage, bA as OrganizationsResource, bB as OutgoingWebhook, bC as OutgoingWebhookDelivery, bD as PaginatedResponse, bE as PaginationParams, bF as PauseQueueResponse, bG as PlanCount, bH as PlanLimits, bI as PlanTier, bJ as ProcessJobsStream, bK as PurgeDlqParams, bL as PurgeDlqResponse, bM as QueueConfig, bN as QueueConfigSummary, bO as QueuePausedEvent, bP as QueueResumedEvent, bQ as QueueStats, bR as QueueSummary, bS as QueuesResource, bT as RealtimeEventData, bU as RecentActivity, bV as RefreshTokenParams, bW as RefreshTokenResponse, bX as RegisterWorkerParams, bY as RegisterWorkerResponse, bZ as ResolvedConfig, b_ as ResourceUsage, b$ as ResumeQueueResponse, c0 as RetryDlqParams, c1 as RetryDlqResponse, c2 as SDK_VERSION, c3 as Schedule, c4 as ScheduleRun, c5 as ScheduleRunStatus, c6 as ScheduleTriggeredEvent, c7 as SchedulesResource, c8 as SpooledClient, c9 as SpooledClientConfig, ca as SpooledGrpcClient, cb as SpooledRealtime, cc as SpooledRealtimeOptions, cd as SpooledWorker, ce as SpooledWorkerOptions, cf as StartEmailLoginResponse, cg as StreamOptions, ch as SystemInfo, ci as TestWebhookResponse, cj as TokenClaims, ck as TriggerScheduleResponse, cl as UpdateApiKeyParams, cm as UpdateOrganizationParams, cn as UpdateOutgoingWebhookParams, co as UpdateQueueConfigParams, cp as UpdateScheduleParams, cq as UsageItem, cr as UsageWarning, cs as ValidateTokenParams, ct as ValidateTokenResponse, cu as WebhookDeliveryStatus, cv as WebhookEventType, cw as WebhookIngestionResource, cx as WebhookTokenResponse, cy as WebhooksResource, cz as Worker, cA as WorkerDeregisteredEvent, cB as WorkerEvent, cC as WorkerEventData, cD as WorkerHeartbeatParams, cE as WorkerRegisteredEvent, cF as WorkerState, cG as WorkerStatus, cH as WorkerSummary, cI as WorkersResource, cJ as Workflow, cK as WorkflowJob, cL as WorkflowJobDefinition, cM as WorkflowJobStatus, cN as WorkflowResponse, cO as WorkflowStatus, cP as WorkflowsResource, cQ as asyncIterableFromStream, cR as createCircuitBreaker, cS as createClient, cT as createHttpClient, cU as createJobStream, cV as createPaginatedResponse, cW as createProcessJobsStream, cX as dateToTimestamp, cY as resolveConfig, cZ as timestampToDate, c_ as validateConfig } from './index-BVWKEr6p.cjs';
1
+ import { R as RealtimeConnectionOptions, C as ConnectionState, S as SubscriptionFilter, a as RealtimeEventType, b as RealtimeEvent, c as RetryConfig } from './index-DzTC8ld3.cjs';
2
+ export { A as API_VERSION, d as AddDependenciesParams, e as AddDependenciesResponse, f as AdminApiKeyResponse, g as AdminCreateApiKeyParams, h as AdminCreateOrganizationParams, i as AdminCreateOrganizationResponse, j as AdminDeleteOrganizationParams, k as AdminListOrganizationsParams, l as AdminOrganizationDetail, m as AdminOrganizationList, n as AdminOrganizationSummary, o as AdminPlanLimits, p as AdminPlatformStats, q as AdminResource, r as AdminUpdateOrganizationParams, s as AdminUsageStats, t as ApiErrorBody, u as ApiKeySummary, v as ApiKeysResource, w as AuthResource, x as AuthenticationError, y as AuthorizationError, B as BatchJobStatus, z as BillingResource, D as BillingStatus, E as BoostPriorityResponse, F as BulkEnqueueParams, G as BulkEnqueueResponse, H as BulkJobItem, I as CheckEmailResponse, J as CheckSlugResponse, K as CircuitBreaker, L as CircuitBreakerConfig, M as CircuitBreakerOpenError, N as CircuitBreakerOptions, O as CircuitState, P as CircuitStateChange, Q as ClaimJobsParams, T as ClaimJobsResult, U as ClaimedJob, V as CompleteJobParams, W as ConflictError, X as CreateApiKeyParams, Y as CreateApiKeyResponse, Z as CreateBillingPortalParams, _ as CreateBillingPortalResponse, $ as CreateJobParams, a0 as CreateJobResult, a1 as CreateOrganizationParams, a2 as CreateOrganizationResponse, a3 as CreateOutgoingWebhookParams, a4 as CreateScheduleParams, a5 as CreateScheduleResponse, a6 as CreateWorkflowParams, a7 as CreateWorkflowResponse, a8 as CurrentUserResponse, a9 as DEFAULT_CONFIG, aa as DashboardData, ab as DashboardResource, ac as DashboardWorkerSummary, ad as DebugFn, ae as DeleteQueueOptions, af as DependencyInfo, ag as DependencyMode, ah as FailJobParams, ai as GrpcClientOptions, aj as GrpcCompleteJobParams, ak as GrpcCompleteJobResponse, al as GrpcCompleteRequest, am as GrpcCompleteResponse, an as GrpcDequeueJobParams, ao as GrpcDequeueJobResponse, ap as GrpcDequeueRequest, aq as GrpcDequeueResponse, ar as GrpcDeregisterRequest, as as GrpcDeregisterResponse, at as GrpcEnqueueJobParams, au as GrpcEnqueueJobResponse, av as GrpcEnqueueRequest, aw as GrpcEnqueueResponse, ax as GrpcErrorResponse, ay as GrpcFailJobParams, az as GrpcFailJobResponse, aA as GrpcFailRequest, aB as GrpcFailResponse, aC as GrpcGetJobRequest, aD as GrpcGetJobResponse, aE as GrpcGetQueueStatsRequest, aF as GrpcGetQueueStatsResponse, aG as GrpcGetQueueStatsResponse_Legacy, aH as GrpcHeartbeatParams, aI as GrpcHeartbeatRequest, aJ as GrpcHeartbeatResponse, aK as GrpcHeartbeatResponse_Legacy, aL as GrpcJob, aM as GrpcJobStatus, aN as GrpcJobStatusNumber, aO as GrpcProcessRequest, aP as GrpcProcessResponse, aQ as GrpcQueueOperations, aR as GrpcRegisterWorkerParams, aS as GrpcRegisterWorkerRequest, aT as GrpcRegisterWorkerResponse, aU as GrpcRegisterWorkerResponse_Legacy, aV as GrpcRenewLeaseParams, aW as GrpcRenewLeaseRequest, aX as GrpcRenewLeaseResponse, aY as GrpcRenewLeaseResponse_Legacy, aZ as GrpcStreamJobsRequest, a_ as GrpcTimestamp, a$ as GrpcWorkerOperations, b0 as HealthResource, b1 as HealthResponse, b2 as HeartbeatEvent, b3 as HeartbeatJobParams, b4 as HttpClient, b5 as InboundDeliveryStatus, b6 as InboundWebhookDelivery, b7 as IngestCustomWebhookParams, b8 as IngestCustomWebhookResponse, b9 as IngestGitHubWebhookOptions, ba as IngestStripeWebhookOptions, bb as InitialApiKey, bc as Job, bd as JobCompletedEvent, be as JobContext, bf as JobCreatedEvent, bg as JobFailedEvent, bh as JobHandler, bi as JobHistoryEvent, bj as JobHistoryEventType, bk as JobHistoryParams, bl as JobProgressEvent, bm as JobResult, bn as JobSearchParams, bo as JobStartedEvent, bp as JobStats, bq as JobStatus, br as JobStatusChangedEvent, bs as JobStream, bt as JobSummary, bu as JobSummaryStats, bv as JobWithDependencies, bw as JobsResource, bx as JsonArray, by as JsonObject, bz as JsonPrimitive, bA as JsonValue, bB as ListDlqParams, bC as ListInboundDeliveriesParams, bD as ListJobsParams, bE as ListPage, bF as ListParams, bG as ListSchedulesParams, bH as ListWorkflowsParams, bI as LoginParams, bJ as LoginResponse, bK as MetricsResource, bL as NetworkError, bM as NotFoundError, bN as Organization, bO as OrganizationMember, bP as OrganizationSummary, bQ as OrganizationUsage, bR as OrganizationsResource, bS as OutgoingWebhook, bT as OutgoingWebhookDelivery, bU as PaginatedResponse, bV as PaginationParams, bW as PauseQueueResponse, bX as PayloadTooLargeError, bY as PlanCount, bZ as PlanLimits, b_ as PlanTier, b$ as ProcessJobsStream, c0 as PurgeDlqParams, c1 as PurgeDlqResponse, c2 as QueueConfig, c3 as QueueConfigSummary, c4 as QueuePausedEvent, c5 as QueueResumedEvent, c6 as QueueStats, c7 as QueueSummary, c8 as QueuesResource, c9 as RateLimitError, ca as RateLimitInfo, cb as RealtimeEventData, cc as RecentActivity, cd as RefreshTokenParams, ce as RefreshTokenResponse, cf as RegisterWorkerParams, cg as RegisterWorkerResponse, ch as ResolvedConfig, ci as ResourceUsage, cj as ResumeQueueResponse, ck as RetryDlqParams, cl as RetryDlqResponse, cm as SDK_VERSION, cn as Schedule, co as ScheduleRun, cp as ScheduleRunStatus, cq as ScheduleTriggeredEvent, cr as SchedulesResource, cs as ServerError, ct as SpooledClient, cu as SpooledClientConfig, cv as SpooledError, cw as SpooledGrpcClient, cx as SpooledRealtime, cy as SpooledRealtimeOptions, cz as SpooledWorker, cA as SpooledWorkerOptions, cB as StartEmailLoginResponse, cC as StreamOptions, cD as SystemInfo, cE as TestWebhookResponse, cF as TimeoutError, cG as TokenClaims, cH as TriggerScheduleResponse, cI as UnsupportedOperationError, cJ as UpdateApiKeyParams, cK as UpdateOrganizationParams, cL as UpdateOutgoingWebhookParams, cM as UpdateQueueConfigParams, cN as UpdateScheduleParams, cO as UsageItem, cP as UsageWarning, cQ as ValidateTokenParams, cR as ValidateTokenResponse, cS as ValidationError, cT as WebhookDeliveryStatus, cU as WebhookEventType, cV as WebhookFormat, cW as WebhookIngestionResource, cX as WebhookTokenResponse, cY as WebhooksResource, cZ as Worker, c_ as WorkerDeregisteredEvent, c$ as WorkerEvent, d0 as WorkerEventData, d1 as WorkerHeartbeatParams, d2 as WorkerRegisteredEvent, d3 as WorkerState, d4 as WorkerStatus, d5 as WorkerSummary, d6 as WorkersResource, d7 as Workflow, d8 as WorkflowJob, d9 as WorkflowJobDefinition, da as WorkflowJobStatus, db as WorkflowResponse, dc as WorkflowStatus, dd as WorkflowsResource, de as asyncIterableFromStream, df as createCircuitBreaker, dg as createClient, dh as createErrorFromResponse, di as createHttpClient, dj as createJobStream, dk as createPaginatedResponse, dl as createProcessJobsStream, dm as dateToTimestamp, dn as isCircuitBreakerFailure, dp as isRetryableError, dq as isSpooledError, dr as parseRateLimitHeaders, ds as resolveConfig, dt as timestampToDate, du as validateConfig } from './index-DzTC8ld3.cjs';
3
3
  import * as protoLoader from '@grpc/proto-loader';
4
4
  import { ServiceClientConstructor } from '@grpc/grpc-js';
5
5
 
@@ -171,189 +171,6 @@ declare class SseRealtimeClient {
171
171
  private scheduleReconnect;
172
172
  }
173
173
 
174
- /**
175
- * Custom Error Classes
176
- *
177
- * Provides a hierarchy of error types for the Spooled SDK.
178
- */
179
- /** Error response body from the API */
180
- interface ApiErrorBody {
181
- code: string;
182
- message: string;
183
- details?: Record<string, unknown>;
184
- }
185
- /** Rate limit information parsed from headers */
186
- interface RateLimitInfo {
187
- /** Maximum requests per window */
188
- limit?: number;
189
- /** Remaining requests in current window */
190
- remaining?: number;
191
- /** Unix timestamp when the window resets */
192
- reset?: Date;
193
- /** Seconds to wait before retrying */
194
- retryAfter?: number;
195
- }
196
- /**
197
- * Base error class for all Spooled SDK errors
198
- */
199
- declare class SpooledError extends Error {
200
- /** HTTP status code (if applicable) */
201
- readonly statusCode: number;
202
- /** Error code from API response */
203
- readonly code: string;
204
- /** Additional error details */
205
- readonly details?: Record<string, unknown>;
206
- /** Request ID for debugging */
207
- readonly requestId?: string;
208
- /** Original cause of the error */
209
- readonly cause?: Error;
210
- constructor(message: string, statusCode?: number, code?: string, details?: Record<string, unknown>, requestId?: string, cause?: Error);
211
- /**
212
- * Whether this error is retryable.
213
- *
214
- * Only 408 (Request Timeout) is retryable among the plain 4xx statuses: the
215
- * server gave up waiting for the request, so it never ran. Subclasses
216
- * override this (5xx, network, timeout, rate limit).
217
- */
218
- isRetryable(): boolean;
219
- /** Convert to plain object for logging */
220
- toJSON(): Record<string, unknown>;
221
- }
222
- /**
223
- * Authentication error (401)
224
- * Thrown when authentication fails (invalid/expired token or API key)
225
- */
226
- declare class AuthenticationError extends SpooledError {
227
- constructor(message?: string, code?: string, details?: Record<string, unknown>, requestId?: string);
228
- }
229
- /**
230
- * Authorization error (403)
231
- * Thrown when the authenticated user lacks permission
232
- */
233
- declare class AuthorizationError extends SpooledError {
234
- constructor(message?: string, code?: string, details?: Record<string, unknown>, requestId?: string);
235
- }
236
- /**
237
- * Not found error (404)
238
- * Thrown when a requested resource doesn't exist
239
- */
240
- declare class NotFoundError extends SpooledError {
241
- constructor(message?: string, code?: string, details?: Record<string, unknown>, requestId?: string);
242
- }
243
- /**
244
- * Conflict error (409)
245
- * Thrown when there's a conflict (e.g., duplicate resource)
246
- */
247
- declare class ConflictError extends SpooledError {
248
- constructor(message?: string, code?: string, details?: Record<string, unknown>, requestId?: string);
249
- }
250
- /**
251
- * Validation error (400 or 422)
252
- * Thrown when request validation fails.
253
- *
254
- * The API answers a field-rule failure (length, range) with 400 but a missing
255
- * or mistyped JSON field with 422; both are the caller's request being invalid,
256
- * so both surface as this class. `statusCode` tells them apart.
257
- */
258
- declare class ValidationError extends SpooledError {
259
- constructor(message?: string, code?: string, details?: Record<string, unknown>, requestId?: string, statusCode?: 400 | 422);
260
- }
261
- /**
262
- * Payload too large error (413)
263
- * Thrown when request body exceeds size limit
264
- */
265
- declare class PayloadTooLargeError extends SpooledError {
266
- constructor(message?: string, code?: string, details?: Record<string, unknown>, requestId?: string);
267
- }
268
- /**
269
- * Rate limit error (429)
270
- * Thrown when rate limit is exceeded, or a plan quota is (see `isQuota`)
271
- */
272
- declare class RateLimitError extends SpooledError {
273
- /** Rate limit information */
274
- readonly rateLimitInfo: RateLimitInfo;
275
- constructor(message?: string, code?: string, rateLimitInfo?: RateLimitInfo, details?: Record<string, unknown>, requestId?: string);
276
- /**
277
- * True when this 429 is a plan quota or limit (daily job cap, active jobs,
278
- * queue/worker/webhook caps) rather than per-second rate limiting.
279
- *
280
- * A quota does not clear for minutes or hours, so retrying it only blocks the
281
- * caller for the whole backoff and, via the circuit breaker, takes every
282
- * other call on the client down with it. It is never retried and never
283
- * counted as a circuit breaker failure.
284
- *
285
- * Detection: the `QUOTA_EXCEEDED` code, or, for older plan-limit paths that
286
- * answer with plain text wrapped as `RATE_LIMIT_EXCEEDED`, a "... limit
287
- * reached" message that carries no `Retry-After`.
288
- */
289
- get isQuota(): boolean;
290
- isRetryable(): boolean;
291
- /** Get the number of seconds to wait before retrying */
292
- getRetryAfter(): number;
293
- toJSON(): Record<string, unknown>;
294
- }
295
- /**
296
- * Server error (5xx)
297
- * Thrown when the server encounters an error
298
- */
299
- declare class ServerError extends SpooledError {
300
- constructor(message?: string, statusCode?: number, code?: string, details?: Record<string, unknown>, requestId?: string);
301
- isRetryable(): boolean;
302
- }
303
- /**
304
- * Network error
305
- * Thrown when a network request fails (no response received)
306
- */
307
- declare class NetworkError extends SpooledError {
308
- constructor(message?: string, cause?: Error);
309
- isRetryable(): boolean;
310
- }
311
- /**
312
- * Timeout error
313
- * Thrown when a request times out
314
- */
315
- declare class TimeoutError extends SpooledError {
316
- /** Timeout duration in milliseconds */
317
- readonly timeoutMs: number;
318
- constructor(message?: string, timeoutMs?: number);
319
- isRetryable(): boolean;
320
- }
321
- /**
322
- * Circuit breaker open error
323
- * Thrown when the circuit breaker is open and rejecting requests
324
- */
325
- declare class CircuitBreakerOpenError extends SpooledError {
326
- constructor(message?: string);
327
- isRetryable(): boolean;
328
- }
329
- /**
330
- * Unsupported operation error
331
- * Thrown by SDK methods whose route the Spooled API does not provide (or
332
- * always rejects). It is raised before any network call, so code that still
333
- * calls such a method fails loudly with an explanation instead of a 404.
334
- */
335
- declare class UnsupportedOperationError extends SpooledError {
336
- /** The SDK method that is not supported, e.g. `ingest.github` */
337
- readonly operation: string;
338
- constructor(operation: string, reason: string);
339
- }
340
- /**
341
- * Parse rate limit headers from a Response
342
- */
343
- declare function parseRateLimitHeaders(headers: Headers): RateLimitInfo;
344
- /**
345
- * Create an appropriate error from an HTTP response
346
- */
347
- declare function createErrorFromResponse(response: Response): Promise<SpooledError>;
348
- /**
349
- * Check if an error is a SpooledError instance
350
- */
351
- declare function isSpooledError(error: unknown): error is SpooledError;
352
- /**
353
- * Check if an error is retryable
354
- */
355
- declare function isRetryableError(error: unknown): boolean;
356
-
357
174
  /**
358
175
  * Proto Loader Utility
359
176
  *
@@ -497,4 +314,4 @@ declare function convertResponse<T>(body: T): T;
497
314
  */
498
315
  declare function convertQueryParams(params: Record<string, string | number | boolean | undefined>): Record<string, string>;
499
316
 
500
- export { type ApiErrorBody, AuthenticationError, AuthorizationError, CircuitBreakerOpenError, ConflictError, ConnectionState, NetworkError, NotFoundError, PROTO_LOADER_OPTIONS, PayloadTooLargeError, RateLimitError, type RateLimitInfo, RealtimeConnectionOptions, RealtimeEvent, RealtimeEventType, RetryConfig, ServerError, SpooledError, type SpooledProtoDefinition, SseRealtimeClient, SubscriptionFilter, TimeoutError, UnsupportedOperationError, ValidationError, WebSocketRealtimeClient, calculateDelay, camelToSnake, clearProtoCache, convertQueryParams, convertRequest, convertResponse, createErrorFromResponse, createRetryWrapper, getProtoPath, isRetryableError, isSpooledError, loadProtoDefinition, loadProtoDefinitionAsync, parseRateLimitHeaders, shouldRetry, sleep, snakeToCamel, toCamelCase, toSnakeCase, withRetry };
317
+ export { ConnectionState, PROTO_LOADER_OPTIONS, RealtimeConnectionOptions, RealtimeEvent, RealtimeEventType, RetryConfig, type SpooledProtoDefinition, SseRealtimeClient, SubscriptionFilter, WebSocketRealtimeClient, calculateDelay, camelToSnake, clearProtoCache, convertQueryParams, convertRequest, convertResponse, createRetryWrapper, getProtoPath, loadProtoDefinition, loadProtoDefinitionAsync, shouldRetry, sleep, snakeToCamel, toCamelCase, toSnakeCase, withRetry };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RealtimeConnectionOptions, C as ConnectionState, S as SubscriptionFilter, a as RealtimeEventType, b as RealtimeEvent, c as RetryConfig } from './index-BVWKEr6p.js';
2
- export { A as API_VERSION, d as AddDependenciesParams, e as AddDependenciesResponse, f as AdminApiKeyResponse, g as AdminCreateApiKeyParams, h as AdminCreateOrganizationParams, i as AdminCreateOrganizationResponse, j as AdminDeleteOrganizationParams, k as AdminListOrganizationsParams, l as AdminOrganizationDetail, m as AdminOrganizationList, n as AdminOrganizationSummary, o as AdminPlanLimits, p as AdminPlatformStats, q as AdminResource, r as AdminUpdateOrganizationParams, s as AdminUsageStats, t as ApiKeySummary, u as ApiKeysResource, v as AuthResource, B as BatchJobStatus, w as BillingResource, x as BillingStatus, y as BoostPriorityResponse, z as BulkEnqueueParams, D as BulkEnqueueResponse, E as BulkJobItem, F as CheckEmailResponse, G as CheckSlugResponse, H as CircuitBreaker, I as CircuitBreakerConfig, J as CircuitState, K as ClaimJobsParams, L as ClaimJobsResult, M as ClaimedJob, N as CompleteJobParams, O as CreateApiKeyParams, P as CreateApiKeyResponse, Q as CreateBillingPortalParams, T as CreateBillingPortalResponse, U as CreateJobParams, V as CreateJobResult, W as CreateOrganizationParams, X as CreateOrganizationResponse, Y as CreateOutgoingWebhookParams, Z as CreateScheduleParams, _ as CreateScheduleResponse, $ as CreateWorkflowParams, a0 as CreateWorkflowResponse, a1 as CurrentUserResponse, a2 as DEFAULT_CONFIG, a3 as DashboardData, a4 as DashboardResource, a5 as DashboardWorkerSummary, a6 as DebugFn, a7 as DeleteQueueOptions, a8 as DependencyInfo, a9 as DependencyMode, aa as FailJobParams, ab as GrpcClientOptions, ac as GrpcCompleteJobParams, ad as GrpcCompleteJobResponse, ae as GrpcCompleteRequest, af as GrpcCompleteResponse, ag as GrpcDequeueJobParams, ah as GrpcDequeueJobResponse, ai as GrpcDequeueRequest, aj as GrpcDequeueResponse, ak as GrpcDeregisterRequest, al as GrpcDeregisterResponse, am as GrpcEnqueueJobParams, an as GrpcEnqueueJobResponse, ao as GrpcEnqueueRequest, ap as GrpcEnqueueResponse, aq as GrpcErrorResponse, ar as GrpcFailJobParams, as as GrpcFailJobResponse, at as GrpcFailRequest, au as GrpcFailResponse, av as GrpcGetJobRequest, aw as GrpcGetJobResponse, ax as GrpcGetQueueStatsRequest, ay as GrpcGetQueueStatsResponse, az as GrpcGetQueueStatsResponse_Legacy, aA as GrpcHeartbeatParams, aB as GrpcHeartbeatRequest, aC as GrpcHeartbeatResponse, aD as GrpcHeartbeatResponse_Legacy, aE as GrpcJob, aF as GrpcJobStatus, aG as GrpcJobStatusNumber, aH as GrpcProcessRequest, aI as GrpcProcessResponse, aJ as GrpcQueueOperations, aK as GrpcRegisterWorkerParams, aL as GrpcRegisterWorkerRequest, aM as GrpcRegisterWorkerResponse, aN as GrpcRegisterWorkerResponse_Legacy, aO as GrpcRenewLeaseParams, aP as GrpcRenewLeaseRequest, aQ as GrpcRenewLeaseResponse, aR as GrpcRenewLeaseResponse_Legacy, aS as GrpcStreamJobsRequest, aT as GrpcTimestamp, aU as GrpcWorkerOperations, aV as HealthResource, aW as HealthResponse, aX as HeartbeatEvent, aY as HeartbeatJobParams, aZ as HttpClient, a_ as IngestCustomWebhookParams, a$ as IngestCustomWebhookResponse, b0 as IngestGitHubWebhookOptions, b1 as IngestStripeWebhookOptions, b2 as InitialApiKey, b3 as Job, b4 as JobCompletedEvent, b5 as JobContext, b6 as JobCreatedEvent, b7 as JobFailedEvent, b8 as JobHandler, b9 as JobProgressEvent, ba as JobResult, bb as JobStartedEvent, bc as JobStats, bd as JobStatus, be as JobStatusChangedEvent, bf as JobStream, bg as JobSummary, bh as JobSummaryStats, bi as JobWithDependencies, bj as JobsResource, bk as JsonArray, bl as JsonObject, bm as JsonPrimitive, bn as JsonValue, bo as ListDlqParams, bp as ListJobsParams, bq as ListParams, br as ListSchedulesParams, bs as ListWorkflowsParams, bt as LoginParams, bu as LoginResponse, bv as MetricsResource, bw as Organization, bx as OrganizationMember, by as OrganizationSummary, bz as OrganizationUsage, bA as OrganizationsResource, bB as OutgoingWebhook, bC as OutgoingWebhookDelivery, bD as PaginatedResponse, bE as PaginationParams, bF as PauseQueueResponse, bG as PlanCount, bH as PlanLimits, bI as PlanTier, bJ as ProcessJobsStream, bK as PurgeDlqParams, bL as PurgeDlqResponse, bM as QueueConfig, bN as QueueConfigSummary, bO as QueuePausedEvent, bP as QueueResumedEvent, bQ as QueueStats, bR as QueueSummary, bS as QueuesResource, bT as RealtimeEventData, bU as RecentActivity, bV as RefreshTokenParams, bW as RefreshTokenResponse, bX as RegisterWorkerParams, bY as RegisterWorkerResponse, bZ as ResolvedConfig, b_ as ResourceUsage, b$ as ResumeQueueResponse, c0 as RetryDlqParams, c1 as RetryDlqResponse, c2 as SDK_VERSION, c3 as Schedule, c4 as ScheduleRun, c5 as ScheduleRunStatus, c6 as ScheduleTriggeredEvent, c7 as SchedulesResource, c8 as SpooledClient, c9 as SpooledClientConfig, ca as SpooledGrpcClient, cb as SpooledRealtime, cc as SpooledRealtimeOptions, cd as SpooledWorker, ce as SpooledWorkerOptions, cf as StartEmailLoginResponse, cg as StreamOptions, ch as SystemInfo, ci as TestWebhookResponse, cj as TokenClaims, ck as TriggerScheduleResponse, cl as UpdateApiKeyParams, cm as UpdateOrganizationParams, cn as UpdateOutgoingWebhookParams, co as UpdateQueueConfigParams, cp as UpdateScheduleParams, cq as UsageItem, cr as UsageWarning, cs as ValidateTokenParams, ct as ValidateTokenResponse, cu as WebhookDeliveryStatus, cv as WebhookEventType, cw as WebhookIngestionResource, cx as WebhookTokenResponse, cy as WebhooksResource, cz as Worker, cA as WorkerDeregisteredEvent, cB as WorkerEvent, cC as WorkerEventData, cD as WorkerHeartbeatParams, cE as WorkerRegisteredEvent, cF as WorkerState, cG as WorkerStatus, cH as WorkerSummary, cI as WorkersResource, cJ as Workflow, cK as WorkflowJob, cL as WorkflowJobDefinition, cM as WorkflowJobStatus, cN as WorkflowResponse, cO as WorkflowStatus, cP as WorkflowsResource, cQ as asyncIterableFromStream, cR as createCircuitBreaker, cS as createClient, cT as createHttpClient, cU as createJobStream, cV as createPaginatedResponse, cW as createProcessJobsStream, cX as dateToTimestamp, cY as resolveConfig, cZ as timestampToDate, c_ as validateConfig } from './index-BVWKEr6p.js';
1
+ import { R as RealtimeConnectionOptions, C as ConnectionState, S as SubscriptionFilter, a as RealtimeEventType, b as RealtimeEvent, c as RetryConfig } from './index-DzTC8ld3.js';
2
+ export { A as API_VERSION, d as AddDependenciesParams, e as AddDependenciesResponse, f as AdminApiKeyResponse, g as AdminCreateApiKeyParams, h as AdminCreateOrganizationParams, i as AdminCreateOrganizationResponse, j as AdminDeleteOrganizationParams, k as AdminListOrganizationsParams, l as AdminOrganizationDetail, m as AdminOrganizationList, n as AdminOrganizationSummary, o as AdminPlanLimits, p as AdminPlatformStats, q as AdminResource, r as AdminUpdateOrganizationParams, s as AdminUsageStats, t as ApiErrorBody, u as ApiKeySummary, v as ApiKeysResource, w as AuthResource, x as AuthenticationError, y as AuthorizationError, B as BatchJobStatus, z as BillingResource, D as BillingStatus, E as BoostPriorityResponse, F as BulkEnqueueParams, G as BulkEnqueueResponse, H as BulkJobItem, I as CheckEmailResponse, J as CheckSlugResponse, K as CircuitBreaker, L as CircuitBreakerConfig, M as CircuitBreakerOpenError, N as CircuitBreakerOptions, O as CircuitState, P as CircuitStateChange, Q as ClaimJobsParams, T as ClaimJobsResult, U as ClaimedJob, V as CompleteJobParams, W as ConflictError, X as CreateApiKeyParams, Y as CreateApiKeyResponse, Z as CreateBillingPortalParams, _ as CreateBillingPortalResponse, $ as CreateJobParams, a0 as CreateJobResult, a1 as CreateOrganizationParams, a2 as CreateOrganizationResponse, a3 as CreateOutgoingWebhookParams, a4 as CreateScheduleParams, a5 as CreateScheduleResponse, a6 as CreateWorkflowParams, a7 as CreateWorkflowResponse, a8 as CurrentUserResponse, a9 as DEFAULT_CONFIG, aa as DashboardData, ab as DashboardResource, ac as DashboardWorkerSummary, ad as DebugFn, ae as DeleteQueueOptions, af as DependencyInfo, ag as DependencyMode, ah as FailJobParams, ai as GrpcClientOptions, aj as GrpcCompleteJobParams, ak as GrpcCompleteJobResponse, al as GrpcCompleteRequest, am as GrpcCompleteResponse, an as GrpcDequeueJobParams, ao as GrpcDequeueJobResponse, ap as GrpcDequeueRequest, aq as GrpcDequeueResponse, ar as GrpcDeregisterRequest, as as GrpcDeregisterResponse, at as GrpcEnqueueJobParams, au as GrpcEnqueueJobResponse, av as GrpcEnqueueRequest, aw as GrpcEnqueueResponse, ax as GrpcErrorResponse, ay as GrpcFailJobParams, az as GrpcFailJobResponse, aA as GrpcFailRequest, aB as GrpcFailResponse, aC as GrpcGetJobRequest, aD as GrpcGetJobResponse, aE as GrpcGetQueueStatsRequest, aF as GrpcGetQueueStatsResponse, aG as GrpcGetQueueStatsResponse_Legacy, aH as GrpcHeartbeatParams, aI as GrpcHeartbeatRequest, aJ as GrpcHeartbeatResponse, aK as GrpcHeartbeatResponse_Legacy, aL as GrpcJob, aM as GrpcJobStatus, aN as GrpcJobStatusNumber, aO as GrpcProcessRequest, aP as GrpcProcessResponse, aQ as GrpcQueueOperations, aR as GrpcRegisterWorkerParams, aS as GrpcRegisterWorkerRequest, aT as GrpcRegisterWorkerResponse, aU as GrpcRegisterWorkerResponse_Legacy, aV as GrpcRenewLeaseParams, aW as GrpcRenewLeaseRequest, aX as GrpcRenewLeaseResponse, aY as GrpcRenewLeaseResponse_Legacy, aZ as GrpcStreamJobsRequest, a_ as GrpcTimestamp, a$ as GrpcWorkerOperations, b0 as HealthResource, b1 as HealthResponse, b2 as HeartbeatEvent, b3 as HeartbeatJobParams, b4 as HttpClient, b5 as InboundDeliveryStatus, b6 as InboundWebhookDelivery, b7 as IngestCustomWebhookParams, b8 as IngestCustomWebhookResponse, b9 as IngestGitHubWebhookOptions, ba as IngestStripeWebhookOptions, bb as InitialApiKey, bc as Job, bd as JobCompletedEvent, be as JobContext, bf as JobCreatedEvent, bg as JobFailedEvent, bh as JobHandler, bi as JobHistoryEvent, bj as JobHistoryEventType, bk as JobHistoryParams, bl as JobProgressEvent, bm as JobResult, bn as JobSearchParams, bo as JobStartedEvent, bp as JobStats, bq as JobStatus, br as JobStatusChangedEvent, bs as JobStream, bt as JobSummary, bu as JobSummaryStats, bv as JobWithDependencies, bw as JobsResource, bx as JsonArray, by as JsonObject, bz as JsonPrimitive, bA as JsonValue, bB as ListDlqParams, bC as ListInboundDeliveriesParams, bD as ListJobsParams, bE as ListPage, bF as ListParams, bG as ListSchedulesParams, bH as ListWorkflowsParams, bI as LoginParams, bJ as LoginResponse, bK as MetricsResource, bL as NetworkError, bM as NotFoundError, bN as Organization, bO as OrganizationMember, bP as OrganizationSummary, bQ as OrganizationUsage, bR as OrganizationsResource, bS as OutgoingWebhook, bT as OutgoingWebhookDelivery, bU as PaginatedResponse, bV as PaginationParams, bW as PauseQueueResponse, bX as PayloadTooLargeError, bY as PlanCount, bZ as PlanLimits, b_ as PlanTier, b$ as ProcessJobsStream, c0 as PurgeDlqParams, c1 as PurgeDlqResponse, c2 as QueueConfig, c3 as QueueConfigSummary, c4 as QueuePausedEvent, c5 as QueueResumedEvent, c6 as QueueStats, c7 as QueueSummary, c8 as QueuesResource, c9 as RateLimitError, ca as RateLimitInfo, cb as RealtimeEventData, cc as RecentActivity, cd as RefreshTokenParams, ce as RefreshTokenResponse, cf as RegisterWorkerParams, cg as RegisterWorkerResponse, ch as ResolvedConfig, ci as ResourceUsage, cj as ResumeQueueResponse, ck as RetryDlqParams, cl as RetryDlqResponse, cm as SDK_VERSION, cn as Schedule, co as ScheduleRun, cp as ScheduleRunStatus, cq as ScheduleTriggeredEvent, cr as SchedulesResource, cs as ServerError, ct as SpooledClient, cu as SpooledClientConfig, cv as SpooledError, cw as SpooledGrpcClient, cx as SpooledRealtime, cy as SpooledRealtimeOptions, cz as SpooledWorker, cA as SpooledWorkerOptions, cB as StartEmailLoginResponse, cC as StreamOptions, cD as SystemInfo, cE as TestWebhookResponse, cF as TimeoutError, cG as TokenClaims, cH as TriggerScheduleResponse, cI as UnsupportedOperationError, cJ as UpdateApiKeyParams, cK as UpdateOrganizationParams, cL as UpdateOutgoingWebhookParams, cM as UpdateQueueConfigParams, cN as UpdateScheduleParams, cO as UsageItem, cP as UsageWarning, cQ as ValidateTokenParams, cR as ValidateTokenResponse, cS as ValidationError, cT as WebhookDeliveryStatus, cU as WebhookEventType, cV as WebhookFormat, cW as WebhookIngestionResource, cX as WebhookTokenResponse, cY as WebhooksResource, cZ as Worker, c_ as WorkerDeregisteredEvent, c$ as WorkerEvent, d0 as WorkerEventData, d1 as WorkerHeartbeatParams, d2 as WorkerRegisteredEvent, d3 as WorkerState, d4 as WorkerStatus, d5 as WorkerSummary, d6 as WorkersResource, d7 as Workflow, d8 as WorkflowJob, d9 as WorkflowJobDefinition, da as WorkflowJobStatus, db as WorkflowResponse, dc as WorkflowStatus, dd as WorkflowsResource, de as asyncIterableFromStream, df as createCircuitBreaker, dg as createClient, dh as createErrorFromResponse, di as createHttpClient, dj as createJobStream, dk as createPaginatedResponse, dl as createProcessJobsStream, dm as dateToTimestamp, dn as isCircuitBreakerFailure, dp as isRetryableError, dq as isSpooledError, dr as parseRateLimitHeaders, ds as resolveConfig, dt as timestampToDate, du as validateConfig } from './index-DzTC8ld3.js';
3
3
  import * as protoLoader from '@grpc/proto-loader';
4
4
  import { ServiceClientConstructor } from '@grpc/grpc-js';
5
5
 
@@ -171,189 +171,6 @@ declare class SseRealtimeClient {
171
171
  private scheduleReconnect;
172
172
  }
173
173
 
174
- /**
175
- * Custom Error Classes
176
- *
177
- * Provides a hierarchy of error types for the Spooled SDK.
178
- */
179
- /** Error response body from the API */
180
- interface ApiErrorBody {
181
- code: string;
182
- message: string;
183
- details?: Record<string, unknown>;
184
- }
185
- /** Rate limit information parsed from headers */
186
- interface RateLimitInfo {
187
- /** Maximum requests per window */
188
- limit?: number;
189
- /** Remaining requests in current window */
190
- remaining?: number;
191
- /** Unix timestamp when the window resets */
192
- reset?: Date;
193
- /** Seconds to wait before retrying */
194
- retryAfter?: number;
195
- }
196
- /**
197
- * Base error class for all Spooled SDK errors
198
- */
199
- declare class SpooledError extends Error {
200
- /** HTTP status code (if applicable) */
201
- readonly statusCode: number;
202
- /** Error code from API response */
203
- readonly code: string;
204
- /** Additional error details */
205
- readonly details?: Record<string, unknown>;
206
- /** Request ID for debugging */
207
- readonly requestId?: string;
208
- /** Original cause of the error */
209
- readonly cause?: Error;
210
- constructor(message: string, statusCode?: number, code?: string, details?: Record<string, unknown>, requestId?: string, cause?: Error);
211
- /**
212
- * Whether this error is retryable.
213
- *
214
- * Only 408 (Request Timeout) is retryable among the plain 4xx statuses: the
215
- * server gave up waiting for the request, so it never ran. Subclasses
216
- * override this (5xx, network, timeout, rate limit).
217
- */
218
- isRetryable(): boolean;
219
- /** Convert to plain object for logging */
220
- toJSON(): Record<string, unknown>;
221
- }
222
- /**
223
- * Authentication error (401)
224
- * Thrown when authentication fails (invalid/expired token or API key)
225
- */
226
- declare class AuthenticationError extends SpooledError {
227
- constructor(message?: string, code?: string, details?: Record<string, unknown>, requestId?: string);
228
- }
229
- /**
230
- * Authorization error (403)
231
- * Thrown when the authenticated user lacks permission
232
- */
233
- declare class AuthorizationError extends SpooledError {
234
- constructor(message?: string, code?: string, details?: Record<string, unknown>, requestId?: string);
235
- }
236
- /**
237
- * Not found error (404)
238
- * Thrown when a requested resource doesn't exist
239
- */
240
- declare class NotFoundError extends SpooledError {
241
- constructor(message?: string, code?: string, details?: Record<string, unknown>, requestId?: string);
242
- }
243
- /**
244
- * Conflict error (409)
245
- * Thrown when there's a conflict (e.g., duplicate resource)
246
- */
247
- declare class ConflictError extends SpooledError {
248
- constructor(message?: string, code?: string, details?: Record<string, unknown>, requestId?: string);
249
- }
250
- /**
251
- * Validation error (400 or 422)
252
- * Thrown when request validation fails.
253
- *
254
- * The API answers a field-rule failure (length, range) with 400 but a missing
255
- * or mistyped JSON field with 422; both are the caller's request being invalid,
256
- * so both surface as this class. `statusCode` tells them apart.
257
- */
258
- declare class ValidationError extends SpooledError {
259
- constructor(message?: string, code?: string, details?: Record<string, unknown>, requestId?: string, statusCode?: 400 | 422);
260
- }
261
- /**
262
- * Payload too large error (413)
263
- * Thrown when request body exceeds size limit
264
- */
265
- declare class PayloadTooLargeError extends SpooledError {
266
- constructor(message?: string, code?: string, details?: Record<string, unknown>, requestId?: string);
267
- }
268
- /**
269
- * Rate limit error (429)
270
- * Thrown when rate limit is exceeded, or a plan quota is (see `isQuota`)
271
- */
272
- declare class RateLimitError extends SpooledError {
273
- /** Rate limit information */
274
- readonly rateLimitInfo: RateLimitInfo;
275
- constructor(message?: string, code?: string, rateLimitInfo?: RateLimitInfo, details?: Record<string, unknown>, requestId?: string);
276
- /**
277
- * True when this 429 is a plan quota or limit (daily job cap, active jobs,
278
- * queue/worker/webhook caps) rather than per-second rate limiting.
279
- *
280
- * A quota does not clear for minutes or hours, so retrying it only blocks the
281
- * caller for the whole backoff and, via the circuit breaker, takes every
282
- * other call on the client down with it. It is never retried and never
283
- * counted as a circuit breaker failure.
284
- *
285
- * Detection: the `QUOTA_EXCEEDED` code, or, for older plan-limit paths that
286
- * answer with plain text wrapped as `RATE_LIMIT_EXCEEDED`, a "... limit
287
- * reached" message that carries no `Retry-After`.
288
- */
289
- get isQuota(): boolean;
290
- isRetryable(): boolean;
291
- /** Get the number of seconds to wait before retrying */
292
- getRetryAfter(): number;
293
- toJSON(): Record<string, unknown>;
294
- }
295
- /**
296
- * Server error (5xx)
297
- * Thrown when the server encounters an error
298
- */
299
- declare class ServerError extends SpooledError {
300
- constructor(message?: string, statusCode?: number, code?: string, details?: Record<string, unknown>, requestId?: string);
301
- isRetryable(): boolean;
302
- }
303
- /**
304
- * Network error
305
- * Thrown when a network request fails (no response received)
306
- */
307
- declare class NetworkError extends SpooledError {
308
- constructor(message?: string, cause?: Error);
309
- isRetryable(): boolean;
310
- }
311
- /**
312
- * Timeout error
313
- * Thrown when a request times out
314
- */
315
- declare class TimeoutError extends SpooledError {
316
- /** Timeout duration in milliseconds */
317
- readonly timeoutMs: number;
318
- constructor(message?: string, timeoutMs?: number);
319
- isRetryable(): boolean;
320
- }
321
- /**
322
- * Circuit breaker open error
323
- * Thrown when the circuit breaker is open and rejecting requests
324
- */
325
- declare class CircuitBreakerOpenError extends SpooledError {
326
- constructor(message?: string);
327
- isRetryable(): boolean;
328
- }
329
- /**
330
- * Unsupported operation error
331
- * Thrown by SDK methods whose route the Spooled API does not provide (or
332
- * always rejects). It is raised before any network call, so code that still
333
- * calls such a method fails loudly with an explanation instead of a 404.
334
- */
335
- declare class UnsupportedOperationError extends SpooledError {
336
- /** The SDK method that is not supported, e.g. `ingest.github` */
337
- readonly operation: string;
338
- constructor(operation: string, reason: string);
339
- }
340
- /**
341
- * Parse rate limit headers from a Response
342
- */
343
- declare function parseRateLimitHeaders(headers: Headers): RateLimitInfo;
344
- /**
345
- * Create an appropriate error from an HTTP response
346
- */
347
- declare function createErrorFromResponse(response: Response): Promise<SpooledError>;
348
- /**
349
- * Check if an error is a SpooledError instance
350
- */
351
- declare function isSpooledError(error: unknown): error is SpooledError;
352
- /**
353
- * Check if an error is retryable
354
- */
355
- declare function isRetryableError(error: unknown): boolean;
356
-
357
174
  /**
358
175
  * Proto Loader Utility
359
176
  *
@@ -497,4 +314,4 @@ declare function convertResponse<T>(body: T): T;
497
314
  */
498
315
  declare function convertQueryParams(params: Record<string, string | number | boolean | undefined>): Record<string, string>;
499
316
 
500
- export { type ApiErrorBody, AuthenticationError, AuthorizationError, CircuitBreakerOpenError, ConflictError, ConnectionState, NetworkError, NotFoundError, PROTO_LOADER_OPTIONS, PayloadTooLargeError, RateLimitError, type RateLimitInfo, RealtimeConnectionOptions, RealtimeEvent, RealtimeEventType, RetryConfig, ServerError, SpooledError, type SpooledProtoDefinition, SseRealtimeClient, SubscriptionFilter, TimeoutError, UnsupportedOperationError, ValidationError, WebSocketRealtimeClient, calculateDelay, camelToSnake, clearProtoCache, convertQueryParams, convertRequest, convertResponse, createErrorFromResponse, createRetryWrapper, getProtoPath, isRetryableError, isSpooledError, loadProtoDefinition, loadProtoDefinitionAsync, parseRateLimitHeaders, shouldRetry, sleep, snakeToCamel, toCamelCase, toSnakeCase, withRetry };
317
+ export { ConnectionState, PROTO_LOADER_OPTIONS, RealtimeConnectionOptions, RealtimeEvent, RealtimeEventType, RetryConfig, type SpooledProtoDefinition, SseRealtimeClient, SubscriptionFilter, WebSocketRealtimeClient, calculateDelay, camelToSnake, clearProtoCache, convertQueryParams, convertRequest, convertResponse, createRetryWrapper, getProtoPath, loadProtoDefinition, loadProtoDefinitionAsync, shouldRetry, sleep, snakeToCamel, toCamelCase, toSnakeCase, withRetry };