@shivaedev/jobs 0.34.0 → 0.35.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/server/adapters/clientErrorSubscription.d.ts +4 -0
  3. package/dist/server/adapters/clientErrorSubscription.d.ts.map +1 -0
  4. package/dist/server/adapters/clientErrorSubscription.js +6 -0
  5. package/dist/server/adapters/clientErrorSubscription.js.map +1 -0
  6. package/dist/server/inspection.d.ts +17 -17
  7. package/dist/server/inspection.d.ts.map +1 -1
  8. package/dist/server/inspection.js +30 -20
  9. package/dist/server/inspection.js.map +1 -1
  10. package/dist/server/internal/PgBossInitialization.d.ts +9 -0
  11. package/dist/server/internal/PgBossInitialization.d.ts.map +1 -0
  12. package/dist/server/internal/PgBossInitialization.js +4 -0
  13. package/dist/server/internal/PgBossInitialization.js.map +1 -0
  14. package/dist/server/internal/PgBossOperations.d.ts +27 -0
  15. package/dist/server/internal/PgBossOperations.d.ts.map +1 -0
  16. package/dist/server/internal/PgBossOperations.js +35 -0
  17. package/dist/server/internal/PgBossOperations.js.map +1 -0
  18. package/dist/server/internal/initializeInspection.d.ts +4 -0
  19. package/dist/server/internal/initializeInspection.d.ts.map +1 -0
  20. package/dist/server/internal/initializeInspection.js +8 -0
  21. package/dist/server/internal/initializeInspection.js.map +1 -0
  22. package/dist/server/internal/initializeJobs.d.ts +4 -0
  23. package/dist/server/internal/initializeJobs.d.ts.map +1 -0
  24. package/dist/server/internal/initializeJobs.js +4 -0
  25. package/dist/server/internal/initializeJobs.js.map +1 -0
  26. package/dist/server/internal/operations/busy.d.ts +3 -0
  27. package/dist/server/internal/operations/busy.d.ts.map +1 -0
  28. package/dist/server/internal/operations/busy.js +4 -0
  29. package/dist/server/internal/operations/busy.js.map +1 -0
  30. package/dist/server/internal/operations/changes.d.ts +5 -0
  31. package/dist/server/internal/operations/changes.d.ts.map +1 -0
  32. package/dist/server/internal/operations/changes.js +4 -0
  33. package/dist/server/internal/operations/changes.js.map +1 -0
  34. package/dist/server/internal/operations/counts.d.ts +3 -0
  35. package/dist/server/internal/operations/counts.d.ts.map +1 -0
  36. package/dist/server/internal/operations/counts.js +4 -0
  37. package/dist/server/internal/operations/counts.js.map +1 -0
  38. package/dist/server/internal/operations/deadLetteredJobs.d.ts +6 -0
  39. package/dist/server/internal/operations/deadLetteredJobs.d.ts.map +1 -0
  40. package/dist/server/internal/operations/deadLetteredJobs.js +4 -0
  41. package/dist/server/internal/operations/deadLetteredJobs.js.map +1 -0
  42. package/dist/server/internal/operations/deferred.d.ts +6 -0
  43. package/dist/server/internal/operations/deferred.d.ts.map +1 -0
  44. package/dist/server/internal/operations/deferred.js +4 -0
  45. package/dist/server/internal/operations/deferred.js.map +1 -0
  46. package/dist/server/internal/operations/deleteQueue.d.ts +3 -0
  47. package/dist/server/internal/operations/deleteQueue.d.ts.map +1 -0
  48. package/dist/server/internal/operations/deleteQueue.js +4 -0
  49. package/dist/server/internal/operations/deleteQueue.js.map +1 -0
  50. package/dist/server/internal/operations/enqueue.d.ts +3 -0
  51. package/dist/server/internal/operations/enqueue.d.ts.map +1 -0
  52. package/dist/server/internal/operations/enqueue.js +4 -0
  53. package/dist/server/internal/operations/enqueue.js.map +1 -0
  54. package/dist/server/internal/operations/failedJobs.d.ts +6 -0
  55. package/dist/server/internal/operations/failedJobs.d.ts.map +1 -0
  56. package/dist/server/internal/operations/failedJobs.js +4 -0
  57. package/dist/server/internal/operations/failedJobs.js.map +1 -0
  58. package/dist/server/internal/operations/getJob.d.ts +6 -0
  59. package/dist/server/internal/operations/getJob.d.ts.map +1 -0
  60. package/dist/server/internal/operations/getJob.js +4 -0
  61. package/dist/server/internal/operations/getJob.js.map +1 -0
  62. package/dist/server/internal/operations/health.d.ts +3 -0
  63. package/dist/server/internal/operations/health.d.ts.map +1 -0
  64. package/dist/server/internal/operations/health.js +4 -0
  65. package/dist/server/internal/operations/health.js.map +1 -0
  66. package/dist/server/internal/operations/inspection.d.ts +3 -0
  67. package/dist/server/internal/operations/inspection.d.ts.map +1 -0
  68. package/dist/server/internal/operations/inspection.js +4 -0
  69. package/dist/server/internal/operations/inspection.js.map +1 -0
  70. package/dist/server/internal/operations/inspectionHealth.d.ts +5 -0
  71. package/dist/server/internal/operations/inspectionHealth.d.ts.map +1 -0
  72. package/dist/server/internal/operations/inspectionHealth.js +4 -0
  73. package/dist/server/internal/operations/inspectionHealth.js.map +1 -0
  74. package/dist/server/internal/operations/jobs.d.ts +43 -0
  75. package/dist/server/internal/operations/jobs.d.ts.map +1 -0
  76. package/dist/server/internal/operations/jobs.js +4 -0
  77. package/dist/server/internal/operations/jobs.js.map +1 -0
  78. package/dist/server/internal/operations/queue.d.ts +3 -0
  79. package/dist/server/internal/operations/queue.d.ts.map +1 -0
  80. package/dist/server/internal/operations/queue.js +4 -0
  81. package/dist/server/internal/operations/queue.js.map +1 -0
  82. package/dist/server/internal/operations/refreshQueueStats.d.ts +3 -0
  83. package/dist/server/internal/operations/refreshQueueStats.d.ts.map +1 -0
  84. package/dist/server/internal/operations/refreshQueueStats.js +4 -0
  85. package/dist/server/internal/operations/refreshQueueStats.js.map +1 -0
  86. package/dist/server/internal/operations/retry.d.ts +3 -0
  87. package/dist/server/internal/operations/retry.d.ts.map +1 -0
  88. package/dist/server/internal/operations/retry.js +4 -0
  89. package/dist/server/internal/operations/retry.js.map +1 -0
  90. package/dist/server/internal/operations/schedules.d.ts +3 -0
  91. package/dist/server/internal/operations/schedules.d.ts.map +1 -0
  92. package/dist/server/internal/operations/schedules.js +4 -0
  93. package/dist/server/internal/operations/schedules.js.map +1 -0
  94. package/dist/server/internal/operations/schemaVersion.d.ts +3 -0
  95. package/dist/server/internal/operations/schemaVersion.d.ts.map +1 -0
  96. package/dist/server/internal/operations/schemaVersion.js +4 -0
  97. package/dist/server/internal/operations/schemaVersion.js.map +1 -0
  98. package/dist/server/internal/operations/snapshot.d.ts +3 -0
  99. package/dist/server/internal/operations/snapshot.d.ts.map +1 -0
  100. package/dist/server/internal/operations/snapshot.js +4 -0
  101. package/dist/server/internal/operations/snapshot.js.map +1 -0
  102. package/dist/server/internal/operations/storedJobs.d.ts +5 -0
  103. package/dist/server/internal/operations/storedJobs.d.ts.map +1 -0
  104. package/dist/server/internal/operations/storedJobs.js +4 -0
  105. package/dist/server/internal/operations/storedJobs.js.map +1 -0
  106. package/dist/server/internal/operations/unschedule.d.ts +3 -0
  107. package/dist/server/internal/operations/unschedule.d.ts.map +1 -0
  108. package/dist/server/internal/operations/unschedule.js +4 -0
  109. package/dist/server/internal/operations/unschedule.js.map +1 -0
  110. package/dist/server/internal/pgBossDefinitionLayer.d.ts +7 -0
  111. package/dist/server/internal/pgBossDefinitionLayer.d.ts.map +1 -0
  112. package/dist/server/internal/pgBossDefinitionLayer.js +32 -0
  113. package/dist/server/internal/pgBossDefinitionLayer.js.map +1 -0
  114. package/dist/server/service.d.ts +2 -2
  115. package/dist/server/service.d.ts.map +1 -1
  116. package/dist/server/service.js +4 -47
  117. package/dist/server/service.js.map +1 -1
  118. package/package.json +10 -11
  119. package/src/server/adapters/clientErrorSubscription.ts +7 -0
  120. package/src/server/inspection.ts +31 -20
  121. package/src/server/internal/PgBossInitialization.ts +9 -0
  122. package/src/server/internal/PgBossOperations.ts +35 -0
  123. package/src/server/internal/initializeInspection.ts +8 -0
  124. package/src/server/internal/initializeJobs.ts +4 -0
  125. package/src/server/internal/operations/busy.ts +5 -0
  126. package/src/server/internal/operations/changes.ts +5 -0
  127. package/src/server/internal/operations/counts.ts +5 -0
  128. package/src/server/internal/operations/deadLetteredJobs.ts +5 -0
  129. package/src/server/internal/operations/deferred.ts +5 -0
  130. package/src/server/internal/operations/deleteQueue.ts +5 -0
  131. package/src/server/internal/operations/enqueue.ts +5 -0
  132. package/src/server/internal/operations/failedJobs.ts +5 -0
  133. package/src/server/internal/operations/getJob.ts +5 -0
  134. package/src/server/internal/operations/health.ts +5 -0
  135. package/src/server/internal/operations/inspection.ts +5 -0
  136. package/src/server/internal/operations/inspectionHealth.ts +5 -0
  137. package/src/server/internal/operations/jobs.ts +5 -0
  138. package/src/server/internal/operations/queue.ts +5 -0
  139. package/src/server/internal/operations/refreshQueueStats.ts +5 -0
  140. package/src/server/internal/operations/retry.ts +5 -0
  141. package/src/server/internal/operations/schedules.ts +5 -0
  142. package/src/server/internal/operations/schemaVersion.ts +5 -0
  143. package/src/server/internal/operations/snapshot.ts +5 -0
  144. package/src/server/internal/operations/storedJobs.ts +5 -0
  145. package/src/server/internal/operations/unschedule.ts +5 -0
  146. package/src/server/internal/pgBossDefinitionLayer.ts +65 -0
  147. package/src/server/service.ts +9 -66
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.35.1 - 2026-11-04
4
+
5
+ ### Changed
6
+
7
+ - Update `@shivaedev/sql` from 0.37.0 to 0.38.0.
8
+
9
+ ## 0.35.0 - 2026-11-04
10
+
11
+ ### Breaking
12
+
13
+ - TypeScript source exports now use `@shivaedev/source` instead of `source`. Replace `source` with `@shivaedev/source` in Node `--conditions`, TypeScript `customConditions`, and Vite/Vitest `resolve.conditions`. Bare `source` selects built JavaScript; no compatibility alias is provided.
14
+
3
15
  ## 0.34.0 - 2026-11-04
4
16
 
5
17
  ### Breaking
@@ -0,0 +1,4 @@
1
+ import { Effect } from "effect";
2
+ import type { PgBossClient } from "#server/client.ts";
3
+ export declare function clientErrorSubscription(client: PgBossClient, report: (error: Error) => void): Effect.Effect<() => void, never, never>;
4
+ //# sourceMappingURL=clientErrorSubscription.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientErrorSubscription.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/clientErrorSubscription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGtD,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,2CAE3F"}
@@ -0,0 +1,6 @@
1
+ import { Effect } from "effect";
2
+ import { subscribeClientErrors } from "#server/internal/clientErrors.ts";
3
+ export function clientErrorSubscription(client, report) {
4
+ return Effect.sync(() => subscribeClientErrors(client, report));
5
+ }
6
+ //# sourceMappingURL=clientErrorSubscription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientErrorSubscription.js","sourceRoot":"","sources":["../../../src/server/adapters/clientErrorSubscription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAEzE,MAAM,UAAU,uBAAuB,CAAC,MAAoB,EAAE,MAA8B;IAC3F,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AACjE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { type DateTime, Effect } from "effect";
1
+ import type { DateTime } from "effect";
2
2
  import type { inspectionChanges } from "#server/adapters/inspectionChanges.ts";
3
3
  import type { inspectionReads } from "#server/adapters/inspectionReads.ts";
4
4
  import type { JobPayloadSchema, QueueDefinition } from "#server/definition.ts";
@@ -13,37 +13,37 @@ export interface UnfinishedJob<TQueue extends SnapshotQueue> {
13
13
  readonly state: "active" | "created" | "deferred" | "failed" | "retry";
14
14
  }
15
15
  export declare const PgBossInspection: import("effect/Context").Service<"@shivaedev/jobs/PgBossInspection", Readonly<{
16
- readonly busy: (queues: readonly Pick<QueueDefinition<string, JobPayloadSchema>, "name">[]) => Effect.Effect<boolean, import("./error.ts").PgBossError, never>;
16
+ readonly busy: (queues: readonly Pick<QueueDefinition<string, JobPayloadSchema>, "name">[]) => import("effect/Effect").Effect<boolean, import("./error.ts").PgBossError, never>;
17
17
  readonly changes: (queue?: {
18
18
  readonly name: string;
19
- } | undefined) => Effect.Effect<{
20
- revision: Effect.Effect<number, never, never>;
21
- waitForChange: (after: number) => Effect.Effect<number>;
19
+ } | undefined) => import("effect/Effect").Effect<{
20
+ revision: import("effect/Effect").Effect<number, never, never>;
21
+ waitForChange: (after: number) => import("effect/Effect").Effect<number>;
22
22
  }, import("./error.ts").PgBossError, import("effect/Scope").Scope>;
23
- readonly counts: (queue: Pick<QueueDefinition<string, JobPayloadSchema>, "name">) => Effect.Effect<import("./health.ts").QueueCounts, import("./error.ts").PgBossError, never>;
23
+ readonly counts: (queue: Pick<QueueDefinition<string, JobPayloadSchema>, "name">) => import("effect/Effect").Effect<import("./health.ts").QueueCounts, import("./error.ts").PgBossError, never>;
24
24
  readonly deadLetteredJobs: <const TName extends string, const TPayload extends JobPayloadSchema | typeof import("effect/Schema").Null>(queue: {
25
25
  readonly name: TName;
26
26
  readonly schema: TPayload;
27
- }, options: import("./health.ts").JobPageOptions) => Effect.Effect<import("./health.ts").JobPage<import("./health.ts").DeadLetteredJob<unknown>>, import("./error.ts").PgBossError | import("./error.ts").PgBossPayloadError | import("effect/Schema").SchemaError, TPayload["DecodingServices"]>;
28
- readonly deferred: (queue: Pick<QueueDefinition<string, JobPayloadSchema>, "name">) => Effect.Effect<{
27
+ }, options: import("./health.ts").JobPageOptions) => import("effect/Effect").Effect<import("./health.ts").JobPage<import("./health.ts").DeadLetteredJob<unknown>>, import("./error.ts").PgBossError | import("./error.ts").PgBossPayloadError | import("effect/Schema").SchemaError, TPayload["DecodingServices"]>;
28
+ readonly deferred: (queue: Pick<QueueDefinition<string, JobPayloadSchema>, "name">) => import("effect/Effect").Effect<{
29
29
  at: DateTime.Utc;
30
30
  reason: string;
31
31
  }[], import("./error.ts").PgBossError, never>;
32
32
  readonly failedJobs: <const TName extends string, const TPayload extends JobPayloadSchema | typeof import("effect/Schema").Null>(queue: {
33
33
  readonly name: TName;
34
34
  readonly schema: TPayload;
35
- }, options: import("./health.ts").JobPageOptions) => Effect.Effect<import("./health.ts").JobPage<import("./health.ts").ListedJob<unknown>>, import("./error.ts").PgBossError | import("./error.ts").PgBossPayloadError | import("effect/Schema").SchemaError, TPayload["DecodingServices"]>;
35
+ }, options: import("./health.ts").JobPageOptions) => import("effect/Effect").Effect<import("./health.ts").JobPage<import("./health.ts").ListedJob<unknown>>, import("./error.ts").PgBossError | import("./error.ts").PgBossPayloadError | import("effect/Schema").SchemaError, TPayload["DecodingServices"]>;
36
36
  readonly getJob: <const TName extends string, const TPayload extends JobPayloadSchema | typeof import("effect/Schema").Null>(queue: {
37
37
  readonly name: TName;
38
38
  readonly schema: TPayload;
39
- }, id: string) => Effect.Effect<import("effect/Option").Option<import("./job.ts").Job<unknown>>, import("./error.ts").PgBossError | import("./error.ts").PgBossPayloadError, TPayload["DecodingServices"]>;
39
+ }, id: string) => import("effect/Effect").Effect<import("effect/Option").Option<import("./job.ts").Job<unknown>>, import("./error.ts").PgBossError | import("./error.ts").PgBossPayloadError, TPayload["DecodingServices"]>;
40
40
  readonly health: (queues: readonly {
41
41
  readonly name: string;
42
- }[]) => Effect.Effect<import("./health.ts").JobsHealth, import("./error.ts").PgBossError, never>;
42
+ }[]) => import("effect/Effect").Effect<import("./health.ts").JobsHealth, import("./error.ts").PgBossError, never>;
43
43
  readonly jobs: <TName extends string, TPayload extends JobPayloadSchema | typeof import("effect/Schema").Null>(queue: {
44
44
  readonly name: TName;
45
45
  readonly schema: TPayload;
46
- }, options?: import("./client.ts").JobReadOptions) => Effect.Effect<{
46
+ }, options?: import("./client.ts").JobReadOptions) => import("effect/Effect").Effect<{
47
47
  expireInSeconds: number;
48
48
  groupId?: string | null;
49
49
  groupTier?: string | null;
@@ -81,13 +81,13 @@ export declare const PgBossInspection: import("effect/Context").Service<"@shivae
81
81
  state: import("./job.ts").JobState;
82
82
  data: TPayload["Type"];
83
83
  }[], import("./error.ts").PgBossError | import("./error.ts").PgBossPayloadError, TPayload["DecodingServices"]>;
84
- readonly queue: (queue: Pick<QueueDefinition<string, JobPayloadSchema>, "name">) => Effect.Effect<import("./client.ts").ClientQueue | null, import("./error.ts").PgBossError, never>;
85
- readonly schedules: (name?: string | undefined, key?: string | undefined) => Effect.Effect<import("./engineClient.ts").EngineSchedule[], import("./error.ts").PgBossError, never>;
86
- readonly schemaVersion: () => Effect.Effect<number | null, import("./error.ts").PgBossError, never>;
87
- readonly snapshot: <const TQueues extends readonly SnapshotQueue[]>(queues: TQueues) => Effect.Effect<readonly UnfinishedJob<TQueues[number]>[], import("./error.ts").PgBossPayloadError | import("./error.ts").PgBossError, TQueues[number]["schema"]["DecodingServices"]>;
84
+ readonly queue: (queue: Pick<QueueDefinition<string, JobPayloadSchema>, "name">) => import("effect/Effect").Effect<import("./client.ts").ClientQueue | null, import("./error.ts").PgBossError, never>;
85
+ readonly schedules: (name?: string | undefined, key?: string | undefined) => import("effect/Effect").Effect<import("./engineClient.ts").EngineSchedule[], import("./error.ts").PgBossError, never>;
86
+ readonly schemaVersion: () => import("effect/Effect").Effect<number | null, import("./error.ts").PgBossError, never>;
87
+ readonly snapshot: <const TQueues extends readonly SnapshotQueue[]>(queues: TQueues) => import("effect/Effect").Effect<readonly UnfinishedJob<TQueues[number]>[], import("./error.ts").PgBossPayloadError | import("./error.ts").PgBossError, TQueues[number]["schema"]["DecodingServices"]>;
88
88
  readonly storedJobs: (queue: {
89
89
  readonly name: string;
90
- }, options?: import("./client.ts").JobReadOptions | undefined) => Effect.Effect<readonly import("./job.ts").Job<unknown>[], import("./error.ts").PgBossError, never>;
90
+ }, options?: import("./client.ts").JobReadOptions | undefined) => import("effect/Effect").Effect<readonly import("./job.ts").Job<unknown>[], import("./error.ts").PgBossError, never>;
91
91
  }>> & {
92
92
  readonly layer: import("effect/Layer").Layer<"@shivaedev/jobs/PgBossInspection", never, PgBoss>;
93
93
  };
@@ -1 +1 @@
1
- {"version":3,"file":"inspection.d.ts","sourceRoot":"","sources":["../../src/server/inspection.ts"],"names":[],"mappings":"AA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,eAAO,MAAM,gBAAgB;;;uBAyBiB,MAAM;;;;;;;;;;;;;;;;;;;;;;;uBADE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAJ1D,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,GACvE,IAAI,CAAC,aAAa,EAAE,QAAQ,GAAG,kBAAkB,GAAG,YAAY,GAAG,QAAQ,CAAC,GAAG;IAC9E,QAAQ,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,SAAS;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,KAAK,UAAU,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;IACvG,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;CAC9F,CAAC"}
@@ -1,29 +1,39 @@
1
- import { Effect } from "effect";
2
1
  import { defineService } from "@shivaedev/service/defineService.ts";
3
2
  import { genericMethod } from "@shivaedev/service/genericMethod.ts";
4
- import { inspection } from "#server/adapters/inspection.ts";
3
+ import { initializeInspection } from "#server/internal/initializeInspection.ts";
4
+ import { busy } from "#server/internal/operations/busy.ts";
5
+ import { changes } from "#server/internal/operations/changes.ts";
6
+ import { counts } from "#server/internal/operations/counts.ts";
7
+ import { deadLetteredJobs } from "#server/internal/operations/deadLetteredJobs.ts";
8
+ import { deferred } from "#server/internal/operations/deferred.ts";
9
+ import { failedJobs } from "#server/internal/operations/failedJobs.ts";
10
+ import { getJob } from "#server/internal/operations/getJob.ts";
11
+ import { inspectionHealth } from "#server/internal/operations/inspectionHealth.ts";
12
+ import { jobs } from "#server/internal/operations/jobs.ts";
13
+ import { queue } from "#server/internal/operations/queue.ts";
14
+ import { schedules } from "#server/internal/operations/schedules.ts";
15
+ import { schemaVersion } from "#server/internal/operations/schemaVersion.ts";
16
+ import { snapshot } from "#server/internal/operations/snapshot.ts";
17
+ import { storedJobs } from "#server/internal/operations/storedJobs.ts";
5
18
  import { PgBoss } from "#server/PgBoss.ts";
6
19
  export const PgBossInspection = defineService({
7
20
  id: "@shivaedev/jobs/PgBossInspection",
8
- initialize: Effect.gen(function* () {
9
- const acquired = yield* PgBoss;
10
- return yield* inspection(acquired.client, acquired.schema);
11
- }),
21
+ initialize: initializeInspection,
12
22
  methods: (service) => ({
13
- busy: service.busy,
14
- changes: service.changes,
15
- counts: service.counts,
16
- deadLetteredJobs: genericMethod(service.deadLetteredJobs),
17
- deferred: service.deferred,
18
- failedJobs: genericMethod(service.failedJobs),
19
- getJob: genericMethod(service.getJob),
20
- health: service.health,
21
- jobs: genericMethod(service.jobs),
22
- queue: service.queue,
23
- schedules: service.schedules,
24
- schemaVersion: service.schemaVersion,
25
- snapshot: genericMethod(service.snapshot),
26
- storedJobs: service.storedJobs,
23
+ busy: busy(service),
24
+ changes: changes(service),
25
+ counts: counts(service),
26
+ deadLetteredJobs: genericMethod(deadLetteredJobs(service)),
27
+ deferred: deferred(service),
28
+ failedJobs: genericMethod(failedJobs(service)),
29
+ getJob: genericMethod(getJob(service)),
30
+ health: inspectionHealth(service),
31
+ jobs: genericMethod(jobs(service)),
32
+ queue: queue(service),
33
+ schedules: schedules(service),
34
+ schemaVersion: schemaVersion(service),
35
+ snapshot: genericMethod(snapshot(service)),
36
+ storedJobs: storedJobs(service),
27
37
  }),
28
38
  requires: [PgBoss],
29
39
  });
@@ -1 +1 @@
1
- {"version":3,"file":"inspection.js","sourceRoot":"","sources":["../../src/server/inspection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,UAAU,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AAC;QAC1D,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC;QAC3B,UAAU,EAAE,aAAa,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAC9C,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,EAAE,gBAAgB,CAAC,OAAO,CAAC;QACjC,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC;QACrB,SAAS,EAAE,SAAS,CAAC,OAAO,CAAC;QAC7B,aAAa,EAAE,aAAa,CAAC,OAAO,CAAC;QACrC,QAAQ,EAAE,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC1C,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC;KAC/B,CAAC;IACF,QAAQ,EAAE,CAAC,MAAM,CAAU;CAC3B,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { Context, type Effect, type Scope } from "effect";
2
+ import type { PgBossError, PgBossQueueNamesError, PgBossQueueOptionsError } from "#server/error.ts";
3
+ import type { PgBoss } from "#server/PgBoss.ts";
4
+ import type { PgBossService } from "#server/service.ts";
5
+ declare const PgBossInitialization_base: Context.ServiceClass<PgBossInitialization, "@shivaedev/jobs/PgBossInitialization", Effect.Effect<PgBossService, PgBossError | PgBossQueueNamesError | PgBossQueueOptionsError, PgBoss | Scope.Scope>>;
6
+ export declare class PgBossInitialization extends PgBossInitialization_base {
7
+ }
8
+ export {};
9
+ //# sourceMappingURL=PgBossInitialization.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PgBossInitialization.d.ts","sourceRoot":"","sources":["../../../src/server/internal/PgBossInitialization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AACpG,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;;AAExD,qBAAa,oBAAqB,SAAQ,yBAGC;CAAG"}
@@ -0,0 +1,4 @@
1
+ import { Context } from "effect";
2
+ export class PgBossInitialization extends Context.Service()("@shivaedev/jobs/PgBossInitialization") {
3
+ }
4
+ //# sourceMappingURL=PgBossInitialization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PgBossInitialization.js","sourceRoot":"","sources":["../../../src/server/internal/PgBossInitialization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAA2B,MAAM,QAAQ,CAAC;AAK1D,MAAM,OAAO,oBAAqB,SAAQ,OAAO,CAAC,OAAO,EAGtD,CAAC,sCAAsC,CAAC;CAAG"}
@@ -0,0 +1,27 @@
1
+ import { PgBoss } from "#server/PgBoss.ts";
2
+ import { PgBossInitialization } from "./PgBossInitialization.ts";
3
+ export declare const PgBossOperations: import("effect/Context").Service<"@shivaedev/jobs/PgBossOperations", Readonly<{
4
+ readonly counts: (queue: Pick<import("../definition.ts").QueueDefinition<string, import("../definition.ts").JobPayloadSchema>, "name">) => import("effect/Effect").Effect<import("../health.ts").QueueCounts, import("../error.ts").PgBossError, never>;
5
+ readonly deadLetteredJobs: <const TName extends string, const TPayload extends import("../definition.ts").JobPayloadSchema | typeof import("effect/Schema").Null>(queue: {
6
+ readonly name: TName;
7
+ readonly schema: TPayload;
8
+ }, options: import("../health.ts").JobPageOptions) => import("effect/Effect").Effect<import("../health.ts").JobPage<import("../health.ts").DeadLetteredJob<unknown>>, import("../error.ts").PgBossError | import("../error.ts").PgBossPayloadError | import("effect/Schema").SchemaError, TPayload["DecodingServices"]>;
9
+ readonly deleteQueue: (queue: Pick<import("../definition.ts").QueueDefinition<string, import("../definition.ts").JobPayloadSchema>, "name">) => import("effect/Effect").Effect<void, import("../error.ts").PgBossError | import("../error.ts").PgBossNotFoundError, never>;
10
+ readonly enqueue: <const TName extends string, const TPayload extends import("../definition.ts").JobPayloadSchema, const TQueue extends import("../definition.ts").QueueDefinition<TName, TPayload>>(queue: import("../definition.ts").QueueDefinition<TName, TPayload> & TQueue, payload: NoInfer<import("effect/Schema").Schema.Type<TPayload>>, options?: NoInfer<import("../enqueueOptions.ts").QueueEnqueueOptions<TQueue>>) => import("effect/Effect").Effect<import("effect/Option").Option<string>, import("../error.ts").PgBossError | import("../error.ts").PgBossPayloadError, TPayload["EncodingServices"]>;
11
+ readonly failedJobs: <const TName extends string, const TPayload extends import("../definition.ts").JobPayloadSchema | typeof import("effect/Schema").Null>(queue: {
12
+ readonly name: TName;
13
+ readonly schema: TPayload;
14
+ }, options: import("../health.ts").JobPageOptions) => import("effect/Effect").Effect<import("../health.ts").JobPage<import("../health.ts").ListedJob<unknown>>, import("../error.ts").PgBossError | import("../error.ts").PgBossPayloadError | import("effect/Schema").SchemaError, TPayload["DecodingServices"]>;
15
+ readonly getJob: <const TName extends string, const TPayload extends import("../definition.ts").JobPayloadSchema | typeof import("effect/Schema").Null>(queue: {
16
+ readonly name: TName;
17
+ readonly schema: TPayload;
18
+ }, id: string) => import("effect/Effect").Effect<import("effect/Option").Option<import("../job.ts").Job<unknown>>, import("../error.ts").PgBossError | import("../error.ts").PgBossPayloadError, TPayload["DecodingServices"]>;
19
+ readonly health: (queues?: readonly Pick<import("../definition.ts").QueueDefinition<string, import("../definition.ts").JobPayloadSchema>, "name">[] | undefined) => import("effect/Effect").Effect<import("../health.ts").JobsHealth, import("../error.ts").PgBossError, never>;
20
+ readonly inspection: () => import("effect/Effect").Effect<import("../inspection.ts").PgBossInspectionService, never, never>;
21
+ readonly refreshQueueStats: (queue?: Pick<import("../definition.ts").QueueDefinition<string, import("../definition.ts").JobPayloadSchema>, "name"> | undefined) => import("effect/Effect").Effect<void, import("../error.ts").PgBossError, never>;
22
+ readonly retry: (queue: Pick<import("../definition.ts").QueueDefinition<string, import("../definition.ts").JobPayloadSchema>, "name">, id: string) => import("effect/Effect").Effect<void, import("../error.ts").PgBossError, never>;
23
+ readonly unschedule: (schedule: Pick<import("../definition.ts").ScheduleDefinition<string>, "name" | "scheduleOptions">) => import("effect/Effect").Effect<void, import("../error.ts").PgBossError | import("../error.ts").PgBossNotFoundError, never>;
24
+ }>> & {
25
+ readonly layer: import("effect/Layer").Layer<"@shivaedev/jobs/PgBossOperations", import("../error.ts").PgBossError | import("../error.ts").PgBossQueueNamesError | import("../error.ts").PgBossQueueOptionsError, PgBoss | PgBossInitialization>;
26
+ };
27
+ //# sourceMappingURL=PgBossOperations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PgBossOperations.d.ts","sourceRoot":"","sources":["../../../src/server/internal/PgBossOperations.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;CAiB3B,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { defineService } from "@shivaedev/service/defineService.ts";
2
+ import { genericMethod } from "@shivaedev/service/genericMethod.ts";
3
+ import { counts } from "#server/internal/operations/counts.ts";
4
+ import { deadLetteredJobs } from "#server/internal/operations/deadLetteredJobs.ts";
5
+ import { deleteQueue } from "#server/internal/operations/deleteQueue.ts";
6
+ import { enqueue } from "#server/internal/operations/enqueue.ts";
7
+ import { failedJobs } from "#server/internal/operations/failedJobs.ts";
8
+ import { getJob } from "#server/internal/operations/getJob.ts";
9
+ import { health } from "#server/internal/operations/health.ts";
10
+ import { inspection } from "#server/internal/operations/inspection.ts";
11
+ import { refreshQueueStats } from "#server/internal/operations/refreshQueueStats.ts";
12
+ import { retry } from "#server/internal/operations/retry.ts";
13
+ import { unschedule } from "#server/internal/operations/unschedule.ts";
14
+ import { PgBoss } from "#server/PgBoss.ts";
15
+ import { initializeJobs } from "./initializeJobs.js";
16
+ import { PgBossInitialization } from "./PgBossInitialization.js";
17
+ export const PgBossOperations = defineService({
18
+ id: "@shivaedev/jobs/PgBossOperations",
19
+ initialize: initializeJobs,
20
+ methods: (state) => ({
21
+ counts: counts(state),
22
+ deadLetteredJobs: genericMethod(deadLetteredJobs(state)),
23
+ deleteQueue: deleteQueue(state),
24
+ enqueue: genericMethod(enqueue(state)),
25
+ failedJobs: genericMethod(failedJobs(state)),
26
+ getJob: genericMethod(getJob(state)),
27
+ health: health(state),
28
+ inspection: inspection(state),
29
+ refreshQueueStats: refreshQueueStats(state),
30
+ retry: retry(state),
31
+ unschedule: unschedule(state),
32
+ }),
33
+ requires: [PgBoss, PgBossInitialization],
34
+ });
35
+ //# sourceMappingURL=PgBossOperations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PgBossOperations.js","sourceRoot":"","sources":["../../../src/server/internal/PgBossOperations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,2CAA2C,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,2CAA2C,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AACrF,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,2CAA2C,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAC;IAC7C,EAAE,EAAE,kCAAkC;IACtC,UAAU,EAAE,cAAc;IAC1B,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACpB,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC;QACrB,gBAAgB,EAAE,aAAa,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;QACxD,WAAW,EAAE,WAAW,CAAC,KAAK,CAAC;QAC/B,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACtC,UAAU,EAAE,aAAa,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAC5C,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACpC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC;QACrB,UAAU,EAAE,UAAU,CAAC,KAAK,CAAC;QAC7B,iBAAiB,EAAE,iBAAiB,CAAC,KAAK,CAAC;QAC3C,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC;QACnB,UAAU,EAAE,UAAU,CAAC,KAAK,CAAC;KAC7B,CAAC;IACF,QAAQ,EAAE,CAAC,MAAM,EAAE,oBAAoB,CAAC;CACxC,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Effect } from "effect";
2
+ import { PgBoss } from "#server/PgBoss.ts";
3
+ export declare const initializeInspection: Effect.Effect<import("../inspection.ts").PgBossInspectionService, never, PgBoss>;
4
+ //# sourceMappingURL=initializeInspection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initializeInspection.d.ts","sourceRoot":"","sources":["../../../src/server/internal/initializeInspection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,eAAO,MAAM,oBAAoB,kFAG/B,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Effect } from "effect";
2
+ import { inspection } from "#server/adapters/inspection.ts";
3
+ import { PgBoss } from "#server/PgBoss.ts";
4
+ export const initializeInspection = Effect.gen(function* () {
5
+ const acquired = yield* PgBoss;
6
+ return yield* inspection(acquired.client, acquired.schema);
7
+ });
8
+ //# sourceMappingURL=initializeInspection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initializeInspection.js","sourceRoot":"","sources":["../../../src/server/internal/initializeInspection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IACvD,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC;IAC/B,OAAO,KAAK,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC5D,CAAC,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Effect } from "effect";
2
+ import { PgBossInitialization } from "./PgBossInitialization.ts";
3
+ export declare const initializeJobs: Effect.Effect<import("../service.ts").PgBossService, import("../error.ts").PgBossError | import("../error.ts").PgBossQueueNamesError | import("../error.ts").PgBossQueueOptionsError, import("../PgBoss.ts").PgBoss | PgBossInitialization | import("effect/Scope").Scope>;
4
+ //# sourceMappingURL=initializeJobs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initializeJobs.d.ts","sourceRoot":"","sources":["../../../src/server/internal/initializeJobs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,eAAO,MAAM,cAAc,4QAAuC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Effect } from "effect";
2
+ import { PgBossInitialization } from "./PgBossInitialization.js";
3
+ export const initializeJobs = Effect.flatten(PgBossInitialization);
4
+ //# sourceMappingURL=initializeJobs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initializeJobs.js","sourceRoot":"","sources":["../../../src/server/internal/initializeJobs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { PgBossInspectionService } from "#server/inspection.ts";
2
+ export declare function busy(state: Pick<PgBossInspectionService, "busy">): (queues: readonly Pick<import("../../definition.ts").QueueDefinition, "name">[]) => import("effect/Effect").Effect<boolean, import("../../error.ts").PgBossError, never>;
3
+ //# sourceMappingURL=busy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"busy.d.ts","sourceRoot":"","sources":["../../../../src/server/internal/operations/busy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAErE,wBAAgB,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,uBAAuB,EAAE,MAAM,CAAC,4KAEhE"}
@@ -0,0 +1,4 @@
1
+ export function busy(state) {
2
+ return state.busy;
3
+ }
4
+ //# sourceMappingURL=busy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"busy.js","sourceRoot":"","sources":["../../../../src/server/internal/operations/busy.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,IAAI,CAAC,KAA4C;IAChE,OAAO,KAAK,CAAC,IAAI,CAAC;AACnB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { PgBossInspectionService } from "#server/inspection.ts";
2
+ export declare function changes(state: Pick<PgBossInspectionService, "changes">): (queue?: {
3
+ readonly name: string;
4
+ }) => ReturnType<typeof import("../../adapters/inspectionChanges.ts").inspectionChanges>;
5
+ //# sourceMappingURL=changes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"changes.d.ts","sourceRoot":"","sources":["../../../../src/server/internal/operations/changes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAErE,wBAAgB,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,uBAAuB,EAAE,SAAS,CAAC;;yFAEtE"}
@@ -0,0 +1,4 @@
1
+ export function changes(state) {
2
+ return state.changes;
3
+ }
4
+ //# sourceMappingURL=changes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"changes.js","sourceRoot":"","sources":["../../../../src/server/internal/operations/changes.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,OAAO,CAAC,KAA+C;IACtE,OAAO,KAAK,CAAC,OAAO,CAAC;AACtB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { PgBossService } from "#server/service.ts";
2
+ export declare function counts(state: Pick<PgBossService, "counts">): (queue: Pick<import("../../definition.ts").QueueDefinition, "name">) => import("effect/Effect").Effect<import("../../health.ts").QueueCounts, import("../../error.ts").PgBossError>;
3
+ //# sourceMappingURL=counts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"counts.d.ts","sourceRoot":"","sources":["../../../../src/server/internal/operations/counts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,wBAAgB,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,uLAE1D"}
@@ -0,0 +1,4 @@
1
+ export function counts(state) {
2
+ return state.counts;
3
+ }
4
+ //# sourceMappingURL=counts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"counts.js","sourceRoot":"","sources":["../../../../src/server/internal/operations/counts.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,MAAM,CAAC,KAAoC;IAC1D,OAAO,KAAK,CAAC,MAAM,CAAC;AACrB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { PgBossService } from "#server/service.ts";
2
+ export declare function deadLetteredJobs(state: Pick<PgBossService, "deadLetteredJobs">): <const TName extends string, const TPayload extends import("../../definition.ts").JobPayloadSchema | typeof import("effect/Schema").Null>(queue: {
3
+ readonly name: TName;
4
+ readonly schema: TPayload;
5
+ }, options: import("../../health.ts").JobPageOptions) => import("effect/Effect").Effect<import("../../health.ts").JobPage<import("../../health.ts").DeadLetteredJob<unknown>>, import("../../error.ts").PgBossError | import("../../error.ts").PgBossPayloadError | import("effect/Schema").SchemaError, TPayload["DecodingServices"]>;
6
+ //# sourceMappingURL=deadLetteredJobs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deadLetteredJobs.d.ts","sourceRoot":"","sources":["../../../../src/server/internal/operations/deadLetteredJobs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,kBAAkB,CAAC;;;uUAE9E"}
@@ -0,0 +1,4 @@
1
+ export function deadLetteredJobs(state) {
2
+ return state.deadLetteredJobs;
3
+ }
4
+ //# sourceMappingURL=deadLetteredJobs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deadLetteredJobs.js","sourceRoot":"","sources":["../../../../src/server/internal/operations/deadLetteredJobs.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,gBAAgB,CAAC,KAA8C;IAC9E,OAAO,KAAK,CAAC,gBAAgB,CAAC;AAC/B,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { PgBossInspectionService } from "#server/inspection.ts";
2
+ export declare function deferred(state: Pick<PgBossInspectionService, "deferred">): (queue: Pick<import("../../definition.ts").QueueDefinition, "name">) => import("effect/Effect").Effect<{
3
+ at: import("effect/DateTime").Utc;
4
+ reason: string;
5
+ }[], import("../../error.ts").PgBossError, never>;
6
+ //# sourceMappingURL=deferred.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deferred.d.ts","sourceRoot":"","sources":["../../../../src/server/internal/operations/deferred.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAErE,wBAAgB,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,uBAAuB,EAAE,UAAU,CAAC;;;kDAExE"}
@@ -0,0 +1,4 @@
1
+ export function deferred(state) {
2
+ return state.deferred;
3
+ }
4
+ //# sourceMappingURL=deferred.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deferred.js","sourceRoot":"","sources":["../../../../src/server/internal/operations/deferred.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,QAAQ,CAAC,KAAgD;IACxE,OAAO,KAAK,CAAC,QAAQ,CAAC;AACvB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { PgBossService } from "#server/service.ts";
2
+ export declare function deleteQueue(state: Pick<PgBossService, "deleteQueue">): (queue: Pick<import("../../definition.ts").QueueDefinition, "name">) => import("effect/Effect").Effect<void, import("../../error.ts").PgBossError | import("../../error.ts").PgBossNotFoundError>;
3
+ //# sourceMappingURL=deleteQueue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deleteQueue.d.ts","sourceRoot":"","sources":["../../../../src/server/internal/operations/deleteQueue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,wBAAgB,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,aAAa,CAAC,qMAEpE"}
@@ -0,0 +1,4 @@
1
+ export function deleteQueue(state) {
2
+ return state.deleteQueue;
3
+ }
4
+ //# sourceMappingURL=deleteQueue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deleteQueue.js","sourceRoot":"","sources":["../../../../src/server/internal/operations/deleteQueue.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,WAAW,CAAC,KAAyC;IACpE,OAAO,KAAK,CAAC,WAAW,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { PgBossService } from "#server/service.ts";
2
+ export declare function enqueue(state: Pick<PgBossService, "enqueue">): <const TName extends string, const TPayload extends import("../../definition.ts").JobPayloadSchema, const TQueue extends import("../../definition.ts").QueueDefinition<TName, TPayload>>(queue: import("../../definition.ts").QueueDefinition<TName, TPayload> & TQueue, payload: NoInfer<import("effect/Schema").Schema.Type<TPayload>>, options?: NoInfer<import("../../enqueueOptions.ts").QueueEnqueueOptions<TQueue>>) => import("effect/Effect").Effect<import("effect/Option").Option<string>, import("../../error.ts").PgBossError | import("../../error.ts").PgBossPayloadError, TPayload["EncodingServices"]>;
3
+ //# sourceMappingURL=enqueue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enqueue.d.ts","sourceRoot":"","sources":["../../../../src/server/internal/operations/enqueue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,wBAAgB,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,2lBAE5D"}
@@ -0,0 +1,4 @@
1
+ export function enqueue(state) {
2
+ return state.enqueue;
3
+ }
4
+ //# sourceMappingURL=enqueue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enqueue.js","sourceRoot":"","sources":["../../../../src/server/internal/operations/enqueue.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,OAAO,CAAC,KAAqC;IAC5D,OAAO,KAAK,CAAC,OAAO,CAAC;AACtB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { PgBossService } from "#server/service.ts";
2
+ export declare function failedJobs(state: Pick<PgBossService, "failedJobs">): <const TName extends string, const TPayload extends import("../../definition.ts").JobPayloadSchema | typeof import("effect/Schema").Null>(queue: {
3
+ readonly name: TName;
4
+ readonly schema: TPayload;
5
+ }, options: import("../../health.ts").JobPageOptions) => import("effect/Effect").Effect<import("../../health.ts").JobPage<import("../../health.ts").ListedJob<unknown>>, import("../../error.ts").PgBossError | import("../../error.ts").PgBossPayloadError | import("effect/Schema").SchemaError, TPayload["DecodingServices"]>;
6
+ //# sourceMappingURL=failedJobs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"failedJobs.d.ts","sourceRoot":"","sources":["../../../../src/server/internal/operations/failedJobs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,wBAAgB,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC;;;iUAElE"}
@@ -0,0 +1,4 @@
1
+ export function failedJobs(state) {
2
+ return state.failedJobs;
3
+ }
4
+ //# sourceMappingURL=failedJobs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"failedJobs.js","sourceRoot":"","sources":["../../../../src/server/internal/operations/failedJobs.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,UAAU,CAAC,KAAwC;IAClE,OAAO,KAAK,CAAC,UAAU,CAAC;AACzB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { PgBossService } from "#server/service.ts";
2
+ export declare function getJob(state: Pick<PgBossService, "getJob">): <const TName extends string, const TPayload extends import("../../definition.ts").JobPayloadSchema | typeof import("effect/Schema").Null>(queue: {
3
+ readonly name: TName;
4
+ readonly schema: TPayload;
5
+ }, id: string) => import("effect/Effect").Effect<import("effect/Option").Option<import("../../job.ts").Job<unknown>>, import("../../error.ts").PgBossError | import("../../error.ts").PgBossPayloadError, TPayload["DecodingServices"]>;
6
+ //# sourceMappingURL=getJob.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getJob.d.ts","sourceRoot":"","sources":["../../../../src/server/internal/operations/getJob.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,wBAAgB,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC;;;wOAE1D"}
@@ -0,0 +1,4 @@
1
+ export function getJob(state) {
2
+ return state.getJob;
3
+ }
4
+ //# sourceMappingURL=getJob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getJob.js","sourceRoot":"","sources":["../../../../src/server/internal/operations/getJob.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,MAAM,CAAC,KAAoC;IAC1D,OAAO,KAAK,CAAC,MAAM,CAAC;AACrB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { PgBossService } from "#server/service.ts";
2
+ export declare function health(state: Pick<PgBossService, "health">): (queues?: readonly Pick<import("../../definition.ts").QueueDefinition, "name">[]) => import("effect/Effect").Effect<import("../../health.ts").JobsHealth, import("../../error.ts").PgBossError>;
3
+ //# sourceMappingURL=health.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../../../../src/server/internal/operations/health.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,wBAAgB,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,mMAE1D"}
@@ -0,0 +1,4 @@
1
+ export function health(state) {
2
+ return state.health;
3
+ }
4
+ //# sourceMappingURL=health.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health.js","sourceRoot":"","sources":["../../../../src/server/internal/operations/health.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,MAAM,CAAC,KAAoC;IAC1D,OAAO,KAAK,CAAC,MAAM,CAAC;AACrB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { PgBossService } from "#server/service.ts";
2
+ export declare function inspection(state: Pick<PgBossService, "inspection">): () => import("effect/Effect").Effect<import("../../inspection.ts").PgBossInspectionService>;
3
+ //# sourceMappingURL=inspection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspection.d.ts","sourceRoot":"","sources":["../../../../src/server/internal/operations/inspection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,wBAAgB,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,+FAElE"}
@@ -0,0 +1,4 @@
1
+ export function inspection(state) {
2
+ return state.inspection;
3
+ }
4
+ //# sourceMappingURL=inspection.js.map