@spooled/sdk 1.0.25 → 1.0.26
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-BpdxwqW0.d.cts → index-IEVN5SWw.d.cts} +2 -2
- package/dist/{index-BpdxwqW0.d.ts → index-IEVN5SWw.d.ts} +2 -2
- package/dist/index.cjs +23 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +23 -14
- package/dist/index.js.map +1 -1
- package/dist/worker/index.cjs +1 -1
- package/dist/worker/index.cjs.map +1 -1
- package/dist/worker/index.d.cts +1 -1
- package/dist/worker/index.d.ts +1 -1
- package/dist/worker/index.js +1 -1
- package/dist/worker/index.js.map +1 -1
- package/package.json +1 -1
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-
|
|
2
|
-
export { A as API_VERSION, b5 as AddDependenciesParams, b6 as AddDependenciesResponse, bU as AdminApiKeyResponse, bW as AdminCreateApiKeyParams, bT as AdminCreateOrganizationParams, bV as AdminCreateOrganizationResponse, bX as AdminDeleteOrganizationParams, bN as AdminListOrganizationsParams, bR as AdminOrganizationDetail, bQ as AdminOrganizationList, bP as AdminOrganizationSummary, b_ as AdminPlanLimits, bZ as AdminPlatformStats, q as AdminResource, bS as AdminUpdateOrganizationParams, bO as AdminUsageStats, be as ApiKeySummary, o as ApiKeysResource, k as AuthResource, as as BatchJobStatus, B as BillingResource, bD as BillingStatus, az as BoostPriorityResponse, aB as BulkEnqueueParams, aC as BulkEnqueueResponse, aA as BulkJobItem, bu as CheckSlugResponse, a1 as CircuitBreaker, h as CircuitBreakerConfig, a2 as CircuitState, au as ClaimJobsParams, av as ClaimJobsResult, at as ClaimedJob, aw as CompleteJobParams, bf as CreateApiKeyParams, bg as CreateApiKeyResponse, bE as CreateBillingPortalParams, bF as CreateBillingPortalResponse, ao as CreateJobParams, ap as CreateJobResult, bk as CreateOrganizationParams, bm as CreateOrganizationResponse, ba as CreateOutgoingWebhookParams, aU as CreateScheduleParams, aV as CreateScheduleResponse, b1 as CreateWorkflowParams, b2 as CreateWorkflowResponse, bA as CurrentUserResponse, i as DEFAULT_CONFIG, bG as DashboardData, p as DashboardResource, bK as DashboardWorkerSummary, D as DebugFn, ah as DependencyMode, ax as FailJobParams, cF as GrpcClientOptions, cK as GrpcCompleteJobParams, cL as GrpcCompleteJobResponse, cl as GrpcCompleteRequest, cm as GrpcCompleteResponse, cI as GrpcDequeueJobParams, cJ as GrpcDequeueJobResponse, cj as GrpcDequeueRequest, ck as GrpcDequeueResponse, cD as GrpcDeregisterRequest, cE as GrpcDeregisterResponse, cG as GrpcEnqueueJobParams, cH as GrpcEnqueueJobResponse, ch as GrpcEnqueueRequest, ci as GrpcEnqueueResponse, cx as GrpcErrorResponse, cM as GrpcFailJobParams, cN as GrpcFailJobResponse, cn as GrpcFailRequest, co as GrpcFailResponse, cr as GrpcGetJobRequest, cs as GrpcGetJobResponse, ct as GrpcGetQueueStatsRequest, cu as GrpcGetQueueStatsResponse, cQ as GrpcGetQueueStatsResponse_Legacy, cT as GrpcHeartbeatParams, cB as GrpcHeartbeatRequest, cC as GrpcHeartbeatResponse, cU as GrpcHeartbeatResponse_Legacy, cg as GrpcJob, cb as GrpcJobStatus, cc as GrpcJobStatusNumber, cw as GrpcProcessRequest, cy as GrpcProcessResponse, c3 as GrpcQueueOperations, cR as GrpcRegisterWorkerParams, cz as GrpcRegisterWorkerRequest, cA as GrpcRegisterWorkerResponse, cS as GrpcRegisterWorkerResponse_Legacy, cO as GrpcRenewLeaseParams, cp as GrpcRenewLeaseRequest, cq as GrpcRenewLeaseResponse, cP as GrpcRenewLeaseResponse_Legacy, cv as GrpcStreamJobsRequest, cd as GrpcTimestamp, c4 as GrpcWorkerOperations, H as HealthResource, bM as HealthResponse, T as HeartbeatEvent, ay as HeartbeatJobParams, a4 as HttpClient, b$ as IngestCustomWebhookParams, c0 as IngestGitHubWebhookOptions, c1 as IngestStripeWebhookOptions, bl as InitialApiKey, am as Job, z as JobCompletedEvent, Z as JobContext, x as JobCreatedEvent, E as JobFailedEvent, Y as JobHandler, F as JobProgressEvent, _ as JobResult, y as JobStartedEvent, ar as JobStats, aa as JobStatus, G as JobStatusChangedEvent, c9 as JobStream, an as JobSummary, bI as JobSummaryStats, b4 as JobWithDependencies, J as JobsResource, a9 as JsonArray, a8 as JsonObject, a6 as JsonPrimitive, a7 as JsonValue, aD as ListDlqParams, aq as ListJobsParams, aj as ListParams, aX as ListSchedulesParams, b3 as ListWorkflowsParams, bw as LoginParams, bx as LoginResponse, M as MetricsResource, bi as Organization, bt as OrganizationMember, bj as OrganizationSummary, bo as OrganizationUsage, O as OrganizationsResource, b9 as OutgoingWebhook, bd as OutgoingWebhookDelivery, ak as PaginatedResponse, ai as PaginationParams, aM as PauseQueueResponse, bY as PlanCount, bp as PlanLimits, ad as PlanTier, ca as ProcessJobsStream, aG as PurgeDlqParams, aH as PurgeDlqResponse, aI as QueueConfig, aJ as QueueConfigSummary, I as QueuePausedEvent, K as QueueResumedEvent, aK as QueueStats, bJ as QueueSummary, Q as QueuesResource, w as RealtimeEventData, bL as RecentActivity, by as RefreshTokenParams, bz as RefreshTokenResponse, aQ as RegisterWorkerParams, aR as RegisterWorkerResponse, g as ResolvedConfig, bq as ResourceUsage, aN as ResumeQueueResponse, aE as RetryDlqParams, aF as RetryDlqResponse, j as SDK_VERSION, aT as Schedule, aZ as ScheduleRun, ae as ScheduleRunStatus, P as ScheduleTriggeredEvent, l as SchedulesResource, d as SpooledClient, f as SpooledClientConfig, c2 as SpooledGrpcClient, t as SpooledRealtime, u as SpooledRealtimeOptions, U as SpooledWorker, V as SpooledWorkerOptions, c8 as StreamOptions, bH as SystemInfo, bc as TestWebhookResponse, aY as TriggerScheduleResponse, bh as UpdateApiKeyParams, bn as UpdateOrganizationParams, bb as UpdateOutgoingWebhookParams, aL as UpdateQueueConfigParams, aW as UpdateScheduleParams, br as UsageItem, bs as UsageWarning, bB as ValidateTokenParams, bC as ValidateTokenResponse, af as WebhookDeliveryStatus, ag as WebhookEventType, s as WebhookIngestionResource, bv as WebhookTokenResponse, n as WebhooksResource, aO as Worker, N as WorkerDeregisteredEvent, $ as WorkerEvent, a0 as WorkerEventData, aS as WorkerHeartbeatParams, L as WorkerRegisteredEvent, X as WorkerState, ab as WorkerStatus, aP as WorkerSummary, W as WorkersResource, a_ as Workflow, b7 as WorkflowJob, b0 as WorkflowJobDefinition, b8 as WorkflowJobStatus, a$ as WorkflowResponse, ac as WorkflowStatus, m as WorkflowsResource, c5 as asyncIterableFromStream, a3 as createCircuitBreaker, e as createClient, a5 as createHttpClient, c6 as createJobStream, al as createPaginatedResponse, c7 as createProcessJobsStream, cf as dateToTimestamp, r as resolveConfig, ce as timestampToDate, v as validateConfig } from './index-
|
|
1
|
+
import { R as RealtimeConnectionOptions, C as ConnectionState, S as SubscriptionFilter, a as RealtimeEventType, b as RealtimeEvent, c as RetryConfig } from './index-IEVN5SWw.cjs';
|
|
2
|
+
export { A as API_VERSION, b5 as AddDependenciesParams, b6 as AddDependenciesResponse, bU as AdminApiKeyResponse, bW as AdminCreateApiKeyParams, bT as AdminCreateOrganizationParams, bV as AdminCreateOrganizationResponse, bX as AdminDeleteOrganizationParams, bN as AdminListOrganizationsParams, bR as AdminOrganizationDetail, bQ as AdminOrganizationList, bP as AdminOrganizationSummary, b_ as AdminPlanLimits, bZ as AdminPlatformStats, q as AdminResource, bS as AdminUpdateOrganizationParams, bO as AdminUsageStats, be as ApiKeySummary, o as ApiKeysResource, k as AuthResource, as as BatchJobStatus, B as BillingResource, bD as BillingStatus, az as BoostPriorityResponse, aB as BulkEnqueueParams, aC as BulkEnqueueResponse, aA as BulkJobItem, bu as CheckSlugResponse, a1 as CircuitBreaker, h as CircuitBreakerConfig, a2 as CircuitState, au as ClaimJobsParams, av as ClaimJobsResult, at as ClaimedJob, aw as CompleteJobParams, bf as CreateApiKeyParams, bg as CreateApiKeyResponse, bE as CreateBillingPortalParams, bF as CreateBillingPortalResponse, ao as CreateJobParams, ap as CreateJobResult, bk as CreateOrganizationParams, bm as CreateOrganizationResponse, ba as CreateOutgoingWebhookParams, aU as CreateScheduleParams, aV as CreateScheduleResponse, b1 as CreateWorkflowParams, b2 as CreateWorkflowResponse, bA as CurrentUserResponse, i as DEFAULT_CONFIG, bG as DashboardData, p as DashboardResource, bK as DashboardWorkerSummary, D as DebugFn, ah as DependencyMode, ax as FailJobParams, cF as GrpcClientOptions, cK as GrpcCompleteJobParams, cL as GrpcCompleteJobResponse, cl as GrpcCompleteRequest, cm as GrpcCompleteResponse, cI as GrpcDequeueJobParams, cJ as GrpcDequeueJobResponse, cj as GrpcDequeueRequest, ck as GrpcDequeueResponse, cD as GrpcDeregisterRequest, cE as GrpcDeregisterResponse, cG as GrpcEnqueueJobParams, cH as GrpcEnqueueJobResponse, ch as GrpcEnqueueRequest, ci as GrpcEnqueueResponse, cx as GrpcErrorResponse, cM as GrpcFailJobParams, cN as GrpcFailJobResponse, cn as GrpcFailRequest, co as GrpcFailResponse, cr as GrpcGetJobRequest, cs as GrpcGetJobResponse, ct as GrpcGetQueueStatsRequest, cu as GrpcGetQueueStatsResponse, cQ as GrpcGetQueueStatsResponse_Legacy, cT as GrpcHeartbeatParams, cB as GrpcHeartbeatRequest, cC as GrpcHeartbeatResponse, cU as GrpcHeartbeatResponse_Legacy, cg as GrpcJob, cb as GrpcJobStatus, cc as GrpcJobStatusNumber, cw as GrpcProcessRequest, cy as GrpcProcessResponse, c3 as GrpcQueueOperations, cR as GrpcRegisterWorkerParams, cz as GrpcRegisterWorkerRequest, cA as GrpcRegisterWorkerResponse, cS as GrpcRegisterWorkerResponse_Legacy, cO as GrpcRenewLeaseParams, cp as GrpcRenewLeaseRequest, cq as GrpcRenewLeaseResponse, cP as GrpcRenewLeaseResponse_Legacy, cv as GrpcStreamJobsRequest, cd as GrpcTimestamp, c4 as GrpcWorkerOperations, H as HealthResource, bM as HealthResponse, T as HeartbeatEvent, ay as HeartbeatJobParams, a4 as HttpClient, b$ as IngestCustomWebhookParams, c0 as IngestGitHubWebhookOptions, c1 as IngestStripeWebhookOptions, bl as InitialApiKey, am as Job, z as JobCompletedEvent, Z as JobContext, x as JobCreatedEvent, E as JobFailedEvent, Y as JobHandler, F as JobProgressEvent, _ as JobResult, y as JobStartedEvent, ar as JobStats, aa as JobStatus, G as JobStatusChangedEvent, c9 as JobStream, an as JobSummary, bI as JobSummaryStats, b4 as JobWithDependencies, J as JobsResource, a9 as JsonArray, a8 as JsonObject, a6 as JsonPrimitive, a7 as JsonValue, aD as ListDlqParams, aq as ListJobsParams, aj as ListParams, aX as ListSchedulesParams, b3 as ListWorkflowsParams, bw as LoginParams, bx as LoginResponse, M as MetricsResource, bi as Organization, bt as OrganizationMember, bj as OrganizationSummary, bo as OrganizationUsage, O as OrganizationsResource, b9 as OutgoingWebhook, bd as OutgoingWebhookDelivery, ak as PaginatedResponse, ai as PaginationParams, aM as PauseQueueResponse, bY as PlanCount, bp as PlanLimits, ad as PlanTier, ca as ProcessJobsStream, aG as PurgeDlqParams, aH as PurgeDlqResponse, aI as QueueConfig, aJ as QueueConfigSummary, I as QueuePausedEvent, K as QueueResumedEvent, aK as QueueStats, bJ as QueueSummary, Q as QueuesResource, w as RealtimeEventData, bL as RecentActivity, by as RefreshTokenParams, bz as RefreshTokenResponse, aQ as RegisterWorkerParams, aR as RegisterWorkerResponse, g as ResolvedConfig, bq as ResourceUsage, aN as ResumeQueueResponse, aE as RetryDlqParams, aF as RetryDlqResponse, j as SDK_VERSION, aT as Schedule, aZ as ScheduleRun, ae as ScheduleRunStatus, P as ScheduleTriggeredEvent, l as SchedulesResource, d as SpooledClient, f as SpooledClientConfig, c2 as SpooledGrpcClient, t as SpooledRealtime, u as SpooledRealtimeOptions, U as SpooledWorker, V as SpooledWorkerOptions, c8 as StreamOptions, bH as SystemInfo, bc as TestWebhookResponse, aY as TriggerScheduleResponse, bh as UpdateApiKeyParams, bn as UpdateOrganizationParams, bb as UpdateOutgoingWebhookParams, aL as UpdateQueueConfigParams, aW as UpdateScheduleParams, br as UsageItem, bs as UsageWarning, bB as ValidateTokenParams, bC as ValidateTokenResponse, af as WebhookDeliveryStatus, ag as WebhookEventType, s as WebhookIngestionResource, bv as WebhookTokenResponse, n as WebhooksResource, aO as Worker, N as WorkerDeregisteredEvent, $ as WorkerEvent, a0 as WorkerEventData, aS as WorkerHeartbeatParams, L as WorkerRegisteredEvent, X as WorkerState, ab as WorkerStatus, aP as WorkerSummary, W as WorkersResource, a_ as Workflow, b7 as WorkflowJob, b0 as WorkflowJobDefinition, b8 as WorkflowJobStatus, a$ as WorkflowResponse, ac as WorkflowStatus, m as WorkflowsResource, c5 as asyncIterableFromStream, a3 as createCircuitBreaker, e as createClient, a5 as createHttpClient, c6 as createJobStream, al as createPaginatedResponse, c7 as createProcessJobsStream, cf as dateToTimestamp, r as resolveConfig, ce as timestampToDate, v as validateConfig } from './index-IEVN5SWw.cjs';
|
|
3
3
|
import * as protoLoader from '@grpc/proto-loader';
|
|
4
4
|
import { ServiceClientConstructor } from '@grpc/grpc-js';
|
|
5
5
|
|
|
@@ -34,6 +34,10 @@ declare class WebSocketRealtimeClient {
|
|
|
34
34
|
* Get current connection state
|
|
35
35
|
*/
|
|
36
36
|
getState(): ConnectionState;
|
|
37
|
+
/**
|
|
38
|
+
* Get WebSocket implementation (browser native or Node.js ws package)
|
|
39
|
+
*/
|
|
40
|
+
private getWebSocketImpl;
|
|
37
41
|
/**
|
|
38
42
|
* Connect to the WebSocket server
|
|
39
43
|
*/
|
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-
|
|
2
|
-
export { A as API_VERSION, b5 as AddDependenciesParams, b6 as AddDependenciesResponse, bU as AdminApiKeyResponse, bW as AdminCreateApiKeyParams, bT as AdminCreateOrganizationParams, bV as AdminCreateOrganizationResponse, bX as AdminDeleteOrganizationParams, bN as AdminListOrganizationsParams, bR as AdminOrganizationDetail, bQ as AdminOrganizationList, bP as AdminOrganizationSummary, b_ as AdminPlanLimits, bZ as AdminPlatformStats, q as AdminResource, bS as AdminUpdateOrganizationParams, bO as AdminUsageStats, be as ApiKeySummary, o as ApiKeysResource, k as AuthResource, as as BatchJobStatus, B as BillingResource, bD as BillingStatus, az as BoostPriorityResponse, aB as BulkEnqueueParams, aC as BulkEnqueueResponse, aA as BulkJobItem, bu as CheckSlugResponse, a1 as CircuitBreaker, h as CircuitBreakerConfig, a2 as CircuitState, au as ClaimJobsParams, av as ClaimJobsResult, at as ClaimedJob, aw as CompleteJobParams, bf as CreateApiKeyParams, bg as CreateApiKeyResponse, bE as CreateBillingPortalParams, bF as CreateBillingPortalResponse, ao as CreateJobParams, ap as CreateJobResult, bk as CreateOrganizationParams, bm as CreateOrganizationResponse, ba as CreateOutgoingWebhookParams, aU as CreateScheduleParams, aV as CreateScheduleResponse, b1 as CreateWorkflowParams, b2 as CreateWorkflowResponse, bA as CurrentUserResponse, i as DEFAULT_CONFIG, bG as DashboardData, p as DashboardResource, bK as DashboardWorkerSummary, D as DebugFn, ah as DependencyMode, ax as FailJobParams, cF as GrpcClientOptions, cK as GrpcCompleteJobParams, cL as GrpcCompleteJobResponse, cl as GrpcCompleteRequest, cm as GrpcCompleteResponse, cI as GrpcDequeueJobParams, cJ as GrpcDequeueJobResponse, cj as GrpcDequeueRequest, ck as GrpcDequeueResponse, cD as GrpcDeregisterRequest, cE as GrpcDeregisterResponse, cG as GrpcEnqueueJobParams, cH as GrpcEnqueueJobResponse, ch as GrpcEnqueueRequest, ci as GrpcEnqueueResponse, cx as GrpcErrorResponse, cM as GrpcFailJobParams, cN as GrpcFailJobResponse, cn as GrpcFailRequest, co as GrpcFailResponse, cr as GrpcGetJobRequest, cs as GrpcGetJobResponse, ct as GrpcGetQueueStatsRequest, cu as GrpcGetQueueStatsResponse, cQ as GrpcGetQueueStatsResponse_Legacy, cT as GrpcHeartbeatParams, cB as GrpcHeartbeatRequest, cC as GrpcHeartbeatResponse, cU as GrpcHeartbeatResponse_Legacy, cg as GrpcJob, cb as GrpcJobStatus, cc as GrpcJobStatusNumber, cw as GrpcProcessRequest, cy as GrpcProcessResponse, c3 as GrpcQueueOperations, cR as GrpcRegisterWorkerParams, cz as GrpcRegisterWorkerRequest, cA as GrpcRegisterWorkerResponse, cS as GrpcRegisterWorkerResponse_Legacy, cO as GrpcRenewLeaseParams, cp as GrpcRenewLeaseRequest, cq as GrpcRenewLeaseResponse, cP as GrpcRenewLeaseResponse_Legacy, cv as GrpcStreamJobsRequest, cd as GrpcTimestamp, c4 as GrpcWorkerOperations, H as HealthResource, bM as HealthResponse, T as HeartbeatEvent, ay as HeartbeatJobParams, a4 as HttpClient, b$ as IngestCustomWebhookParams, c0 as IngestGitHubWebhookOptions, c1 as IngestStripeWebhookOptions, bl as InitialApiKey, am as Job, z as JobCompletedEvent, Z as JobContext, x as JobCreatedEvent, E as JobFailedEvent, Y as JobHandler, F as JobProgressEvent, _ as JobResult, y as JobStartedEvent, ar as JobStats, aa as JobStatus, G as JobStatusChangedEvent, c9 as JobStream, an as JobSummary, bI as JobSummaryStats, b4 as JobWithDependencies, J as JobsResource, a9 as JsonArray, a8 as JsonObject, a6 as JsonPrimitive, a7 as JsonValue, aD as ListDlqParams, aq as ListJobsParams, aj as ListParams, aX as ListSchedulesParams, b3 as ListWorkflowsParams, bw as LoginParams, bx as LoginResponse, M as MetricsResource, bi as Organization, bt as OrganizationMember, bj as OrganizationSummary, bo as OrganizationUsage, O as OrganizationsResource, b9 as OutgoingWebhook, bd as OutgoingWebhookDelivery, ak as PaginatedResponse, ai as PaginationParams, aM as PauseQueueResponse, bY as PlanCount, bp as PlanLimits, ad as PlanTier, ca as ProcessJobsStream, aG as PurgeDlqParams, aH as PurgeDlqResponse, aI as QueueConfig, aJ as QueueConfigSummary, I as QueuePausedEvent, K as QueueResumedEvent, aK as QueueStats, bJ as QueueSummary, Q as QueuesResource, w as RealtimeEventData, bL as RecentActivity, by as RefreshTokenParams, bz as RefreshTokenResponse, aQ as RegisterWorkerParams, aR as RegisterWorkerResponse, g as ResolvedConfig, bq as ResourceUsage, aN as ResumeQueueResponse, aE as RetryDlqParams, aF as RetryDlqResponse, j as SDK_VERSION, aT as Schedule, aZ as ScheduleRun, ae as ScheduleRunStatus, P as ScheduleTriggeredEvent, l as SchedulesResource, d as SpooledClient, f as SpooledClientConfig, c2 as SpooledGrpcClient, t as SpooledRealtime, u as SpooledRealtimeOptions, U as SpooledWorker, V as SpooledWorkerOptions, c8 as StreamOptions, bH as SystemInfo, bc as TestWebhookResponse, aY as TriggerScheduleResponse, bh as UpdateApiKeyParams, bn as UpdateOrganizationParams, bb as UpdateOutgoingWebhookParams, aL as UpdateQueueConfigParams, aW as UpdateScheduleParams, br as UsageItem, bs as UsageWarning, bB as ValidateTokenParams, bC as ValidateTokenResponse, af as WebhookDeliveryStatus, ag as WebhookEventType, s as WebhookIngestionResource, bv as WebhookTokenResponse, n as WebhooksResource, aO as Worker, N as WorkerDeregisteredEvent, $ as WorkerEvent, a0 as WorkerEventData, aS as WorkerHeartbeatParams, L as WorkerRegisteredEvent, X as WorkerState, ab as WorkerStatus, aP as WorkerSummary, W as WorkersResource, a_ as Workflow, b7 as WorkflowJob, b0 as WorkflowJobDefinition, b8 as WorkflowJobStatus, a$ as WorkflowResponse, ac as WorkflowStatus, m as WorkflowsResource, c5 as asyncIterableFromStream, a3 as createCircuitBreaker, e as createClient, a5 as createHttpClient, c6 as createJobStream, al as createPaginatedResponse, c7 as createProcessJobsStream, cf as dateToTimestamp, r as resolveConfig, ce as timestampToDate, v as validateConfig } from './index-
|
|
1
|
+
import { R as RealtimeConnectionOptions, C as ConnectionState, S as SubscriptionFilter, a as RealtimeEventType, b as RealtimeEvent, c as RetryConfig } from './index-IEVN5SWw.js';
|
|
2
|
+
export { A as API_VERSION, b5 as AddDependenciesParams, b6 as AddDependenciesResponse, bU as AdminApiKeyResponse, bW as AdminCreateApiKeyParams, bT as AdminCreateOrganizationParams, bV as AdminCreateOrganizationResponse, bX as AdminDeleteOrganizationParams, bN as AdminListOrganizationsParams, bR as AdminOrganizationDetail, bQ as AdminOrganizationList, bP as AdminOrganizationSummary, b_ as AdminPlanLimits, bZ as AdminPlatformStats, q as AdminResource, bS as AdminUpdateOrganizationParams, bO as AdminUsageStats, be as ApiKeySummary, o as ApiKeysResource, k as AuthResource, as as BatchJobStatus, B as BillingResource, bD as BillingStatus, az as BoostPriorityResponse, aB as BulkEnqueueParams, aC as BulkEnqueueResponse, aA as BulkJobItem, bu as CheckSlugResponse, a1 as CircuitBreaker, h as CircuitBreakerConfig, a2 as CircuitState, au as ClaimJobsParams, av as ClaimJobsResult, at as ClaimedJob, aw as CompleteJobParams, bf as CreateApiKeyParams, bg as CreateApiKeyResponse, bE as CreateBillingPortalParams, bF as CreateBillingPortalResponse, ao as CreateJobParams, ap as CreateJobResult, bk as CreateOrganizationParams, bm as CreateOrganizationResponse, ba as CreateOutgoingWebhookParams, aU as CreateScheduleParams, aV as CreateScheduleResponse, b1 as CreateWorkflowParams, b2 as CreateWorkflowResponse, bA as CurrentUserResponse, i as DEFAULT_CONFIG, bG as DashboardData, p as DashboardResource, bK as DashboardWorkerSummary, D as DebugFn, ah as DependencyMode, ax as FailJobParams, cF as GrpcClientOptions, cK as GrpcCompleteJobParams, cL as GrpcCompleteJobResponse, cl as GrpcCompleteRequest, cm as GrpcCompleteResponse, cI as GrpcDequeueJobParams, cJ as GrpcDequeueJobResponse, cj as GrpcDequeueRequest, ck as GrpcDequeueResponse, cD as GrpcDeregisterRequest, cE as GrpcDeregisterResponse, cG as GrpcEnqueueJobParams, cH as GrpcEnqueueJobResponse, ch as GrpcEnqueueRequest, ci as GrpcEnqueueResponse, cx as GrpcErrorResponse, cM as GrpcFailJobParams, cN as GrpcFailJobResponse, cn as GrpcFailRequest, co as GrpcFailResponse, cr as GrpcGetJobRequest, cs as GrpcGetJobResponse, ct as GrpcGetQueueStatsRequest, cu as GrpcGetQueueStatsResponse, cQ as GrpcGetQueueStatsResponse_Legacy, cT as GrpcHeartbeatParams, cB as GrpcHeartbeatRequest, cC as GrpcHeartbeatResponse, cU as GrpcHeartbeatResponse_Legacy, cg as GrpcJob, cb as GrpcJobStatus, cc as GrpcJobStatusNumber, cw as GrpcProcessRequest, cy as GrpcProcessResponse, c3 as GrpcQueueOperations, cR as GrpcRegisterWorkerParams, cz as GrpcRegisterWorkerRequest, cA as GrpcRegisterWorkerResponse, cS as GrpcRegisterWorkerResponse_Legacy, cO as GrpcRenewLeaseParams, cp as GrpcRenewLeaseRequest, cq as GrpcRenewLeaseResponse, cP as GrpcRenewLeaseResponse_Legacy, cv as GrpcStreamJobsRequest, cd as GrpcTimestamp, c4 as GrpcWorkerOperations, H as HealthResource, bM as HealthResponse, T as HeartbeatEvent, ay as HeartbeatJobParams, a4 as HttpClient, b$ as IngestCustomWebhookParams, c0 as IngestGitHubWebhookOptions, c1 as IngestStripeWebhookOptions, bl as InitialApiKey, am as Job, z as JobCompletedEvent, Z as JobContext, x as JobCreatedEvent, E as JobFailedEvent, Y as JobHandler, F as JobProgressEvent, _ as JobResult, y as JobStartedEvent, ar as JobStats, aa as JobStatus, G as JobStatusChangedEvent, c9 as JobStream, an as JobSummary, bI as JobSummaryStats, b4 as JobWithDependencies, J as JobsResource, a9 as JsonArray, a8 as JsonObject, a6 as JsonPrimitive, a7 as JsonValue, aD as ListDlqParams, aq as ListJobsParams, aj as ListParams, aX as ListSchedulesParams, b3 as ListWorkflowsParams, bw as LoginParams, bx as LoginResponse, M as MetricsResource, bi as Organization, bt as OrganizationMember, bj as OrganizationSummary, bo as OrganizationUsage, O as OrganizationsResource, b9 as OutgoingWebhook, bd as OutgoingWebhookDelivery, ak as PaginatedResponse, ai as PaginationParams, aM as PauseQueueResponse, bY as PlanCount, bp as PlanLimits, ad as PlanTier, ca as ProcessJobsStream, aG as PurgeDlqParams, aH as PurgeDlqResponse, aI as QueueConfig, aJ as QueueConfigSummary, I as QueuePausedEvent, K as QueueResumedEvent, aK as QueueStats, bJ as QueueSummary, Q as QueuesResource, w as RealtimeEventData, bL as RecentActivity, by as RefreshTokenParams, bz as RefreshTokenResponse, aQ as RegisterWorkerParams, aR as RegisterWorkerResponse, g as ResolvedConfig, bq as ResourceUsage, aN as ResumeQueueResponse, aE as RetryDlqParams, aF as RetryDlqResponse, j as SDK_VERSION, aT as Schedule, aZ as ScheduleRun, ae as ScheduleRunStatus, P as ScheduleTriggeredEvent, l as SchedulesResource, d as SpooledClient, f as SpooledClientConfig, c2 as SpooledGrpcClient, t as SpooledRealtime, u as SpooledRealtimeOptions, U as SpooledWorker, V as SpooledWorkerOptions, c8 as StreamOptions, bH as SystemInfo, bc as TestWebhookResponse, aY as TriggerScheduleResponse, bh as UpdateApiKeyParams, bn as UpdateOrganizationParams, bb as UpdateOutgoingWebhookParams, aL as UpdateQueueConfigParams, aW as UpdateScheduleParams, br as UsageItem, bs as UsageWarning, bB as ValidateTokenParams, bC as ValidateTokenResponse, af as WebhookDeliveryStatus, ag as WebhookEventType, s as WebhookIngestionResource, bv as WebhookTokenResponse, n as WebhooksResource, aO as Worker, N as WorkerDeregisteredEvent, $ as WorkerEvent, a0 as WorkerEventData, aS as WorkerHeartbeatParams, L as WorkerRegisteredEvent, X as WorkerState, ab as WorkerStatus, aP as WorkerSummary, W as WorkersResource, a_ as Workflow, b7 as WorkflowJob, b0 as WorkflowJobDefinition, b8 as WorkflowJobStatus, a$ as WorkflowResponse, ac as WorkflowStatus, m as WorkflowsResource, c5 as asyncIterableFromStream, a3 as createCircuitBreaker, e as createClient, a5 as createHttpClient, c6 as createJobStream, al as createPaginatedResponse, c7 as createProcessJobsStream, cf as dateToTimestamp, r as resolveConfig, ce as timestampToDate, v as validateConfig } from './index-IEVN5SWw.js';
|
|
3
3
|
import * as protoLoader from '@grpc/proto-loader';
|
|
4
4
|
import { ServiceClientConstructor } from '@grpc/grpc-js';
|
|
5
5
|
|
|
@@ -34,6 +34,10 @@ declare class WebSocketRealtimeClient {
|
|
|
34
34
|
* Get current connection state
|
|
35
35
|
*/
|
|
36
36
|
getState(): ConnectionState;
|
|
37
|
+
/**
|
|
38
|
+
* Get WebSocket implementation (browser native or Node.js ws package)
|
|
39
|
+
*/
|
|
40
|
+
private getWebSocketImpl;
|
|
37
41
|
/**
|
|
38
42
|
* Connect to the WebSocket server
|
|
39
43
|
*/
|
package/dist/index.js
CHANGED
|
@@ -6,13 +6,6 @@ import { fileURLToPath } from 'url';
|
|
|
6
6
|
import { dirname, join } from 'path';
|
|
7
7
|
import { hostname } from 'os';
|
|
8
8
|
|
|
9
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
10
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
11
|
-
}) : x)(function(x) {
|
|
12
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
13
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
14
|
-
});
|
|
15
|
-
|
|
16
9
|
// src/config.ts
|
|
17
10
|
var DEFAULT_CONFIG = {
|
|
18
11
|
baseUrl: "https://api.spooled.cloud",
|
|
@@ -32,10 +25,10 @@ var DEFAULT_CONFIG = {
|
|
|
32
25
|
successThreshold: 3,
|
|
33
26
|
timeout: 3e4
|
|
34
27
|
},
|
|
35
|
-
userAgent: "@spooled/sdk-nodejs/1.0.
|
|
28
|
+
userAgent: "@spooled/sdk-nodejs/1.0.26",
|
|
36
29
|
autoRefreshToken: true
|
|
37
30
|
};
|
|
38
|
-
var SDK_VERSION = "1.0.
|
|
31
|
+
var SDK_VERSION = "1.0.26";
|
|
39
32
|
var API_VERSION = "v1";
|
|
40
33
|
var API_BASE_PATH = `/api/${API_VERSION}`;
|
|
41
34
|
function resolveConfig(options) {
|
|
@@ -1788,6 +1781,16 @@ var WebSocketRealtimeClient = class {
|
|
|
1788
1781
|
getState() {
|
|
1789
1782
|
return this.state;
|
|
1790
1783
|
}
|
|
1784
|
+
/**
|
|
1785
|
+
* Get WebSocket implementation (browser native or Node.js ws package)
|
|
1786
|
+
*/
|
|
1787
|
+
async getWebSocketImpl() {
|
|
1788
|
+
if (typeof WebSocket !== "undefined") {
|
|
1789
|
+
return WebSocket;
|
|
1790
|
+
}
|
|
1791
|
+
const wsModule = await import('ws');
|
|
1792
|
+
return wsModule.default;
|
|
1793
|
+
}
|
|
1791
1794
|
/**
|
|
1792
1795
|
* Connect to the WebSocket server
|
|
1793
1796
|
*/
|
|
@@ -1795,12 +1798,18 @@ var WebSocketRealtimeClient = class {
|
|
|
1795
1798
|
if (this.state === "connected" || this.state === "connecting") {
|
|
1796
1799
|
return;
|
|
1797
1800
|
}
|
|
1801
|
+
this.setState("connecting");
|
|
1802
|
+
const wsUrl = this.buildWsUrl();
|
|
1803
|
+
this.options.debug(`Connecting to ${wsUrl}`);
|
|
1804
|
+
let WebSocketImpl;
|
|
1805
|
+
try {
|
|
1806
|
+
WebSocketImpl = await this.getWebSocketImpl();
|
|
1807
|
+
} catch (error) {
|
|
1808
|
+
this.setState("disconnected");
|
|
1809
|
+
throw new Error(`Failed to load WebSocket implementation: ${error}`);
|
|
1810
|
+
}
|
|
1798
1811
|
return new Promise((resolve, reject) => {
|
|
1799
|
-
this.setState("connecting");
|
|
1800
|
-
const wsUrl = this.buildWsUrl();
|
|
1801
|
-
this.options.debug(`Connecting to ${wsUrl}`);
|
|
1802
1812
|
try {
|
|
1803
|
-
const WebSocketImpl = typeof WebSocket !== "undefined" ? WebSocket : __require("ws");
|
|
1804
1813
|
this.ws = new WebSocketImpl(wsUrl);
|
|
1805
1814
|
this.ws.onopen = () => {
|
|
1806
1815
|
this.options.debug("WebSocket connected");
|
|
@@ -3026,7 +3035,7 @@ var SpooledWorker = class {
|
|
|
3026
3035
|
...DEFAULT_OPTIONS,
|
|
3027
3036
|
hostname: hostname(),
|
|
3028
3037
|
workerType: "nodejs",
|
|
3029
|
-
version: "1.0.
|
|
3038
|
+
version: "1.0.26",
|
|
3030
3039
|
metadata: {},
|
|
3031
3040
|
...options
|
|
3032
3041
|
};
|