@igniter-js/jobs 0.1.1 → 0.1.12

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 (42) hide show
  1. package/AGENTS.md +1118 -96
  2. package/CHANGELOG.md +8 -0
  3. package/README.md +2146 -93
  4. package/dist/{adapter-PiDCQWQd.d.mts → adapter-CXZxomI9.d.mts} +2 -2
  5. package/dist/{adapter-PiDCQWQd.d.ts → adapter-CXZxomI9.d.ts} +2 -2
  6. package/dist/adapters/bullmq.adapter.d.mts +2 -2
  7. package/dist/adapters/bullmq.adapter.d.ts +2 -2
  8. package/dist/adapters/bullmq.adapter.js +2 -2
  9. package/dist/adapters/bullmq.adapter.js.map +1 -1
  10. package/dist/adapters/bullmq.adapter.mjs +1 -1
  11. package/dist/adapters/bullmq.adapter.mjs.map +1 -1
  12. package/dist/adapters/index.d.mts +140 -2
  13. package/dist/adapters/index.d.ts +140 -2
  14. package/dist/adapters/index.js +864 -31
  15. package/dist/adapters/index.js.map +1 -1
  16. package/dist/adapters/index.mjs +863 -31
  17. package/dist/adapters/index.mjs.map +1 -1
  18. package/dist/adapters/memory.adapter.d.mts +2 -2
  19. package/dist/adapters/memory.adapter.d.ts +2 -2
  20. package/dist/adapters/memory.adapter.js +122 -30
  21. package/dist/adapters/memory.adapter.js.map +1 -1
  22. package/dist/adapters/memory.adapter.mjs +121 -29
  23. package/dist/adapters/memory.adapter.mjs.map +1 -1
  24. package/dist/index.d.mts +452 -342
  25. package/dist/index.d.ts +452 -342
  26. package/dist/index.js +1923 -1002
  27. package/dist/index.js.map +1 -1
  28. package/dist/index.mjs +1921 -1001
  29. package/dist/index.mjs.map +1 -1
  30. package/dist/shim.d.mts +36 -0
  31. package/dist/shim.d.ts +36 -0
  32. package/dist/shim.js +75 -0
  33. package/dist/shim.js.map +1 -0
  34. package/dist/shim.mjs +67 -0
  35. package/dist/shim.mjs.map +1 -0
  36. package/dist/telemetry/index.d.mts +281 -0
  37. package/dist/telemetry/index.d.ts +281 -0
  38. package/dist/telemetry/index.js +97 -0
  39. package/dist/telemetry/index.js.map +1 -0
  40. package/dist/telemetry/index.mjs +95 -0
  41. package/dist/telemetry/index.mjs.map +1 -0
  42. package/package.json +44 -11
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @fileoverview Browser/client-side shim for @igniter-js/jobs
3
+ * @module @igniter-js/jobs/shim
4
+ *
5
+ * @description
6
+ * This module prevents @igniter-js/jobs from being used in browser environments.
7
+ * The jobs package depends on server-only APIs (queues, workers, redis) and
8
+ * should not be bundled into client-side code.
9
+ */
10
+ declare function throwServerOnlyError(): never;
11
+ declare const IgniterJobs: {
12
+ create: typeof throwServerOnlyError;
13
+ };
14
+ declare const IgniterJobsBuilder: {
15
+ create: typeof throwServerOnlyError;
16
+ };
17
+ declare const IgniterWorkerBuilder: {
18
+ create: typeof throwServerOnlyError;
19
+ };
20
+ declare const IgniterQueueBuilder: {
21
+ create: typeof throwServerOnlyError;
22
+ };
23
+ declare class IgniterJobsError extends Error {
24
+ constructor();
25
+ }
26
+ declare const IgniterJobsTelemetryEvents: {
27
+ namespace: string;
28
+ events: {};
29
+ };
30
+ declare const IgniterJobsValidationUtils: {
31
+ isStandardSchema: typeof throwServerOnlyError;
32
+ isZodLikeSchema: typeof throwServerOnlyError;
33
+ validateInput: typeof throwServerOnlyError;
34
+ };
35
+
36
+ export { IgniterJobs, IgniterJobsBuilder, IgniterJobsError, IgniterJobsTelemetryEvents, IgniterJobsValidationUtils, IgniterQueueBuilder, IgniterWorkerBuilder };
package/dist/shim.d.ts ADDED
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @fileoverview Browser/client-side shim for @igniter-js/jobs
3
+ * @module @igniter-js/jobs/shim
4
+ *
5
+ * @description
6
+ * This module prevents @igniter-js/jobs from being used in browser environments.
7
+ * The jobs package depends on server-only APIs (queues, workers, redis) and
8
+ * should not be bundled into client-side code.
9
+ */
10
+ declare function throwServerOnlyError(): never;
11
+ declare const IgniterJobs: {
12
+ create: typeof throwServerOnlyError;
13
+ };
14
+ declare const IgniterJobsBuilder: {
15
+ create: typeof throwServerOnlyError;
16
+ };
17
+ declare const IgniterWorkerBuilder: {
18
+ create: typeof throwServerOnlyError;
19
+ };
20
+ declare const IgniterQueueBuilder: {
21
+ create: typeof throwServerOnlyError;
22
+ };
23
+ declare class IgniterJobsError extends Error {
24
+ constructor();
25
+ }
26
+ declare const IgniterJobsTelemetryEvents: {
27
+ namespace: string;
28
+ events: {};
29
+ };
30
+ declare const IgniterJobsValidationUtils: {
31
+ isStandardSchema: typeof throwServerOnlyError;
32
+ isZodLikeSchema: typeof throwServerOnlyError;
33
+ validateInput: typeof throwServerOnlyError;
34
+ };
35
+
36
+ export { IgniterJobs, IgniterJobsBuilder, IgniterJobsError, IgniterJobsTelemetryEvents, IgniterJobsValidationUtils, IgniterQueueBuilder, IgniterWorkerBuilder };
package/dist/shim.js ADDED
@@ -0,0 +1,75 @@
1
+ 'use strict';
2
+
3
+ // src/shim.ts
4
+ var SERVER_ONLY_ERROR = `
5
+ ================================================================================
6
+ @igniter-js/jobs: Server-Only Package
7
+ ================================================================================
8
+
9
+ This package cannot be used in browser/client environments.
10
+
11
+ @igniter-js/jobs is designed exclusively for server-side usage because it:
12
+ - Depends on Redis and other backend infrastructure
13
+ - Manages background workers and queues
14
+ - Uses Node.js specific APIs
15
+ - Should never run in browser bundles
16
+
17
+ SOLUTIONS:
18
+
19
+ 1. Next.js App Router:
20
+ - Use Server Components (default in app/ directory)
21
+ - Use Server Actions with "use server" directive
22
+ - Use API routes (app/api/*)
23
+
24
+ 2. Next.js Pages Router:
25
+ - Use getServerSideProps
26
+ - Use API routes (pages/api/*)
27
+
28
+ 3. Other Frameworks:
29
+ - Move job dispatching logic to server-side endpoints
30
+ - Use server-side workers or background jobs
31
+
32
+ For documentation, visit: https://igniterjs.com/docs/jobs
33
+
34
+ ================================================================================
35
+ `;
36
+ function throwServerOnlyError() {
37
+ throw new Error(SERVER_ONLY_ERROR);
38
+ }
39
+ var IgniterJobs = {
40
+ create: throwServerOnlyError
41
+ };
42
+ var IgniterJobsBuilder = {
43
+ create: throwServerOnlyError
44
+ };
45
+ var IgniterWorkerBuilder = {
46
+ create: throwServerOnlyError
47
+ };
48
+ var IgniterQueueBuilder = {
49
+ create: throwServerOnlyError
50
+ };
51
+ var IgniterJobsError = class extends Error {
52
+ constructor() {
53
+ super(SERVER_ONLY_ERROR);
54
+ this.name = "IgniterJobsError";
55
+ }
56
+ };
57
+ var IgniterJobsTelemetryEvents = {
58
+ namespace: "igniter.jobs",
59
+ events: {}
60
+ };
61
+ var IgniterJobsValidationUtils = {
62
+ isStandardSchema: throwServerOnlyError,
63
+ isZodLikeSchema: throwServerOnlyError,
64
+ validateInput: throwServerOnlyError
65
+ };
66
+
67
+ exports.IgniterJobs = IgniterJobs;
68
+ exports.IgniterJobsBuilder = IgniterJobsBuilder;
69
+ exports.IgniterJobsError = IgniterJobsError;
70
+ exports.IgniterJobsTelemetryEvents = IgniterJobsTelemetryEvents;
71
+ exports.IgniterJobsValidationUtils = IgniterJobsValidationUtils;
72
+ exports.IgniterQueueBuilder = IgniterQueueBuilder;
73
+ exports.IgniterWorkerBuilder = IgniterWorkerBuilder;
74
+ //# sourceMappingURL=shim.js.map
75
+ //# sourceMappingURL=shim.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/shim.ts"],"names":[],"mappings":";;;AAUA,IAAM,iBAAA,GAAoB;AAAA;AAAA;AAAA;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;;AAAA;AAAA,CAAA;AAiC1B,SAAS,oBAAA,GAA8B;AACrC,EAAA,MAAM,IAAI,MAAM,iBAAiB,CAAA;AACnC;AAEO,IAAM,WAAA,GAAc;AAAA,EACzB,MAAA,EAAQ;AACV;AAEO,IAAM,kBAAA,GAAqB;AAAA,EAChC,MAAA,EAAQ;AACV;AAEO,IAAM,oBAAA,GAAuB;AAAA,EAClC,MAAA,EAAQ;AACV;AAEO,IAAM,mBAAA,GAAsB;AAAA,EACjC,MAAA,EAAQ;AACV;AAEO,IAAM,gBAAA,GAAN,cAA+B,KAAA,CAAM;AAAA,EAC1C,WAAA,GAAc;AACZ,IAAA,KAAA,CAAM,iBAAiB,CAAA;AACvB,IAAA,IAAA,CAAK,IAAA,GAAO,kBAAA;AAAA,EACd;AACF;AAEO,IAAM,0BAAA,GAA6B;AAAA,EACxC,SAAA,EAAW,cAAA;AAAA,EACX,QAAQ;AACV;AAEO,IAAM,0BAAA,GAA6B;AAAA,EACxC,gBAAA,EAAkB,oBAAA;AAAA,EAClB,eAAA,EAAiB,oBAAA;AAAA,EACjB,aAAA,EAAe;AACjB","file":"shim.js","sourcesContent":["/**\n * @fileoverview Browser/client-side shim for @igniter-js/jobs\n * @module @igniter-js/jobs/shim\n *\n * @description\n * This module prevents @igniter-js/jobs from being used in browser environments.\n * The jobs package depends on server-only APIs (queues, workers, redis) and\n * should not be bundled into client-side code.\n */\n\nconst SERVER_ONLY_ERROR = `\n================================================================================\n@igniter-js/jobs: Server-Only Package\n================================================================================\n\nThis package cannot be used in browser/client environments.\n\n@igniter-js/jobs is designed exclusively for server-side usage because it:\n- Depends on Redis and other backend infrastructure\n- Manages background workers and queues\n- Uses Node.js specific APIs\n- Should never run in browser bundles\n\nSOLUTIONS:\n\n1. Next.js App Router:\n - Use Server Components (default in app/ directory)\n - Use Server Actions with \"use server\" directive\n - Use API routes (app/api/*)\n\n2. Next.js Pages Router:\n - Use getServerSideProps\n - Use API routes (pages/api/*)\n\n3. Other Frameworks:\n - Move job dispatching logic to server-side endpoints\n - Use server-side workers or background jobs\n\nFor documentation, visit: https://igniterjs.com/docs/jobs\n\n================================================================================\n`;\n\nfunction throwServerOnlyError(): never {\n throw new Error(SERVER_ONLY_ERROR);\n}\n\nexport const IgniterJobs = {\n create: throwServerOnlyError,\n};\n\nexport const IgniterJobsBuilder = {\n create: throwServerOnlyError,\n};\n\nexport const IgniterWorkerBuilder = {\n create: throwServerOnlyError,\n};\n\nexport const IgniterQueueBuilder = {\n create: throwServerOnlyError,\n};\n\nexport class IgniterJobsError extends Error {\n constructor() {\n super(SERVER_ONLY_ERROR);\n this.name = \"IgniterJobsError\";\n }\n}\n\nexport const IgniterJobsTelemetryEvents = {\n namespace: \"igniter.jobs\",\n events: {},\n};\n\nexport const IgniterJobsValidationUtils = {\n isStandardSchema: throwServerOnlyError,\n isZodLikeSchema: throwServerOnlyError,\n validateInput: throwServerOnlyError,\n};\n"]}
package/dist/shim.mjs ADDED
@@ -0,0 +1,67 @@
1
+ // src/shim.ts
2
+ var SERVER_ONLY_ERROR = `
3
+ ================================================================================
4
+ @igniter-js/jobs: Server-Only Package
5
+ ================================================================================
6
+
7
+ This package cannot be used in browser/client environments.
8
+
9
+ @igniter-js/jobs is designed exclusively for server-side usage because it:
10
+ - Depends on Redis and other backend infrastructure
11
+ - Manages background workers and queues
12
+ - Uses Node.js specific APIs
13
+ - Should never run in browser bundles
14
+
15
+ SOLUTIONS:
16
+
17
+ 1. Next.js App Router:
18
+ - Use Server Components (default in app/ directory)
19
+ - Use Server Actions with "use server" directive
20
+ - Use API routes (app/api/*)
21
+
22
+ 2. Next.js Pages Router:
23
+ - Use getServerSideProps
24
+ - Use API routes (pages/api/*)
25
+
26
+ 3. Other Frameworks:
27
+ - Move job dispatching logic to server-side endpoints
28
+ - Use server-side workers or background jobs
29
+
30
+ For documentation, visit: https://igniterjs.com/docs/jobs
31
+
32
+ ================================================================================
33
+ `;
34
+ function throwServerOnlyError() {
35
+ throw new Error(SERVER_ONLY_ERROR);
36
+ }
37
+ var IgniterJobs = {
38
+ create: throwServerOnlyError
39
+ };
40
+ var IgniterJobsBuilder = {
41
+ create: throwServerOnlyError
42
+ };
43
+ var IgniterWorkerBuilder = {
44
+ create: throwServerOnlyError
45
+ };
46
+ var IgniterQueueBuilder = {
47
+ create: throwServerOnlyError
48
+ };
49
+ var IgniterJobsError = class extends Error {
50
+ constructor() {
51
+ super(SERVER_ONLY_ERROR);
52
+ this.name = "IgniterJobsError";
53
+ }
54
+ };
55
+ var IgniterJobsTelemetryEvents = {
56
+ namespace: "igniter.jobs",
57
+ events: {}
58
+ };
59
+ var IgniterJobsValidationUtils = {
60
+ isStandardSchema: throwServerOnlyError,
61
+ isZodLikeSchema: throwServerOnlyError,
62
+ validateInput: throwServerOnlyError
63
+ };
64
+
65
+ export { IgniterJobs, IgniterJobsBuilder, IgniterJobsError, IgniterJobsTelemetryEvents, IgniterJobsValidationUtils, IgniterQueueBuilder, IgniterWorkerBuilder };
66
+ //# sourceMappingURL=shim.mjs.map
67
+ //# sourceMappingURL=shim.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/shim.ts"],"names":[],"mappings":";AAUA,IAAM,iBAAA,GAAoB;AAAA;AAAA;AAAA;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;;AAAA;AAAA,CAAA;AAiC1B,SAAS,oBAAA,GAA8B;AACrC,EAAA,MAAM,IAAI,MAAM,iBAAiB,CAAA;AACnC;AAEO,IAAM,WAAA,GAAc;AAAA,EACzB,MAAA,EAAQ;AACV;AAEO,IAAM,kBAAA,GAAqB;AAAA,EAChC,MAAA,EAAQ;AACV;AAEO,IAAM,oBAAA,GAAuB;AAAA,EAClC,MAAA,EAAQ;AACV;AAEO,IAAM,mBAAA,GAAsB;AAAA,EACjC,MAAA,EAAQ;AACV;AAEO,IAAM,gBAAA,GAAN,cAA+B,KAAA,CAAM;AAAA,EAC1C,WAAA,GAAc;AACZ,IAAA,KAAA,CAAM,iBAAiB,CAAA;AACvB,IAAA,IAAA,CAAK,IAAA,GAAO,kBAAA;AAAA,EACd;AACF;AAEO,IAAM,0BAAA,GAA6B;AAAA,EACxC,SAAA,EAAW,cAAA;AAAA,EACX,QAAQ;AACV;AAEO,IAAM,0BAAA,GAA6B;AAAA,EACxC,gBAAA,EAAkB,oBAAA;AAAA,EAClB,eAAA,EAAiB,oBAAA;AAAA,EACjB,aAAA,EAAe;AACjB","file":"shim.mjs","sourcesContent":["/**\n * @fileoverview Browser/client-side shim for @igniter-js/jobs\n * @module @igniter-js/jobs/shim\n *\n * @description\n * This module prevents @igniter-js/jobs from being used in browser environments.\n * The jobs package depends on server-only APIs (queues, workers, redis) and\n * should not be bundled into client-side code.\n */\n\nconst SERVER_ONLY_ERROR = `\n================================================================================\n@igniter-js/jobs: Server-Only Package\n================================================================================\n\nThis package cannot be used in browser/client environments.\n\n@igniter-js/jobs is designed exclusively for server-side usage because it:\n- Depends on Redis and other backend infrastructure\n- Manages background workers and queues\n- Uses Node.js specific APIs\n- Should never run in browser bundles\n\nSOLUTIONS:\n\n1. Next.js App Router:\n - Use Server Components (default in app/ directory)\n - Use Server Actions with \"use server\" directive\n - Use API routes (app/api/*)\n\n2. Next.js Pages Router:\n - Use getServerSideProps\n - Use API routes (pages/api/*)\n\n3. Other Frameworks:\n - Move job dispatching logic to server-side endpoints\n - Use server-side workers or background jobs\n\nFor documentation, visit: https://igniterjs.com/docs/jobs\n\n================================================================================\n`;\n\nfunction throwServerOnlyError(): never {\n throw new Error(SERVER_ONLY_ERROR);\n}\n\nexport const IgniterJobs = {\n create: throwServerOnlyError,\n};\n\nexport const IgniterJobsBuilder = {\n create: throwServerOnlyError,\n};\n\nexport const IgniterWorkerBuilder = {\n create: throwServerOnlyError,\n};\n\nexport const IgniterQueueBuilder = {\n create: throwServerOnlyError,\n};\n\nexport class IgniterJobsError extends Error {\n constructor() {\n super(SERVER_ONLY_ERROR);\n this.name = \"IgniterJobsError\";\n }\n}\n\nexport const IgniterJobsTelemetryEvents = {\n namespace: \"igniter.jobs\",\n events: {},\n};\n\nexport const IgniterJobsValidationUtils = {\n isStandardSchema: throwServerOnlyError,\n isZodLikeSchema: throwServerOnlyError,\n validateInput: throwServerOnlyError,\n};\n"]}
@@ -0,0 +1,281 @@
1
+ import * as _igniter_js_telemetry from '@igniter-js/telemetry';
2
+ import { z } from 'zod';
3
+
4
+ /**
5
+ * Telemetry event definitions for @igniter-js/jobs.
6
+ */
7
+ declare const IgniterJobsTelemetryEvents: _igniter_js_telemetry.IgniterTelemetryEventsDescriptor<"igniter.jobs", {
8
+ job: {
9
+ enqueued: z.ZodObject<{
10
+ "ctx.job.id": z.ZodString;
11
+ "ctx.job.name": z.ZodString;
12
+ "ctx.job.queue": z.ZodString;
13
+ "ctx.job.priority": z.ZodOptional<z.ZodNumber>;
14
+ "ctx.job.delay": z.ZodOptional<z.ZodNumber>;
15
+ }, "strip", z.ZodTypeAny, {
16
+ "ctx.job.id": string;
17
+ "ctx.job.name": string;
18
+ "ctx.job.queue": string;
19
+ "ctx.job.priority"?: number | undefined;
20
+ "ctx.job.delay"?: number | undefined;
21
+ }, {
22
+ "ctx.job.id": string;
23
+ "ctx.job.name": string;
24
+ "ctx.job.queue": string;
25
+ "ctx.job.priority"?: number | undefined;
26
+ "ctx.job.delay"?: number | undefined;
27
+ }>;
28
+ } & {
29
+ started: z.ZodObject<{
30
+ "ctx.job.id": z.ZodString;
31
+ "ctx.job.name": z.ZodString;
32
+ "ctx.job.queue": z.ZodString;
33
+ "ctx.job.attempt": z.ZodNumber;
34
+ "ctx.job.maxAttempts": z.ZodNumber;
35
+ }, "strip", z.ZodTypeAny, {
36
+ "ctx.job.id": string;
37
+ "ctx.job.name": string;
38
+ "ctx.job.queue": string;
39
+ "ctx.job.attempt": number;
40
+ "ctx.job.maxAttempts": number;
41
+ }, {
42
+ "ctx.job.id": string;
43
+ "ctx.job.name": string;
44
+ "ctx.job.queue": string;
45
+ "ctx.job.attempt": number;
46
+ "ctx.job.maxAttempts": number;
47
+ }>;
48
+ } & {
49
+ completed: z.ZodObject<{
50
+ "ctx.job.id": z.ZodString;
51
+ "ctx.job.name": z.ZodString;
52
+ "ctx.job.queue": z.ZodString;
53
+ "ctx.job.duration": z.ZodNumber;
54
+ }, "strip", z.ZodTypeAny, {
55
+ "ctx.job.id": string;
56
+ "ctx.job.name": string;
57
+ "ctx.job.queue": string;
58
+ "ctx.job.duration": number;
59
+ }, {
60
+ "ctx.job.id": string;
61
+ "ctx.job.name": string;
62
+ "ctx.job.queue": string;
63
+ "ctx.job.duration": number;
64
+ }>;
65
+ } & {
66
+ failed: z.ZodObject<{
67
+ "ctx.job.id": z.ZodString;
68
+ "ctx.job.name": z.ZodString;
69
+ "ctx.job.queue": z.ZodString;
70
+ "ctx.job.error.message": z.ZodString;
71
+ "ctx.job.error.code": z.ZodOptional<z.ZodString>;
72
+ "ctx.job.attempt": z.ZodNumber;
73
+ "ctx.job.maxAttempts": z.ZodNumber;
74
+ "ctx.job.isFinalAttempt": z.ZodBoolean;
75
+ }, "strip", z.ZodTypeAny, {
76
+ "ctx.job.id": string;
77
+ "ctx.job.name": string;
78
+ "ctx.job.queue": string;
79
+ "ctx.job.attempt": number;
80
+ "ctx.job.maxAttempts": number;
81
+ "ctx.job.error.message": string;
82
+ "ctx.job.isFinalAttempt": boolean;
83
+ "ctx.job.error.code"?: string | undefined;
84
+ }, {
85
+ "ctx.job.id": string;
86
+ "ctx.job.name": string;
87
+ "ctx.job.queue": string;
88
+ "ctx.job.attempt": number;
89
+ "ctx.job.maxAttempts": number;
90
+ "ctx.job.error.message": string;
91
+ "ctx.job.isFinalAttempt": boolean;
92
+ "ctx.job.error.code"?: string | undefined;
93
+ }>;
94
+ } & {
95
+ progress: z.ZodObject<{
96
+ "ctx.job.id": z.ZodString;
97
+ "ctx.job.name": z.ZodString;
98
+ "ctx.job.queue": z.ZodString;
99
+ "ctx.job.progress": z.ZodNumber;
100
+ "ctx.job.progress.message": z.ZodOptional<z.ZodString>;
101
+ }, "strip", z.ZodTypeAny, {
102
+ "ctx.job.id": string;
103
+ "ctx.job.name": string;
104
+ "ctx.job.queue": string;
105
+ "ctx.job.progress": number;
106
+ "ctx.job.progress.message"?: string | undefined;
107
+ }, {
108
+ "ctx.job.id": string;
109
+ "ctx.job.name": string;
110
+ "ctx.job.queue": string;
111
+ "ctx.job.progress": number;
112
+ "ctx.job.progress.message"?: string | undefined;
113
+ }>;
114
+ } & {
115
+ retrying: z.ZodObject<{
116
+ "ctx.job.id": z.ZodString;
117
+ "ctx.job.name": z.ZodString;
118
+ "ctx.job.queue": z.ZodString;
119
+ "ctx.job.attempt": z.ZodNumber;
120
+ "ctx.job.maxAttempts": z.ZodNumber;
121
+ "ctx.job.nextRetryDelay": z.ZodNumber;
122
+ }, "strip", z.ZodTypeAny, {
123
+ "ctx.job.id": string;
124
+ "ctx.job.name": string;
125
+ "ctx.job.queue": string;
126
+ "ctx.job.attempt": number;
127
+ "ctx.job.maxAttempts": number;
128
+ "ctx.job.nextRetryDelay": number;
129
+ }, {
130
+ "ctx.job.id": string;
131
+ "ctx.job.name": string;
132
+ "ctx.job.queue": string;
133
+ "ctx.job.attempt": number;
134
+ "ctx.job.maxAttempts": number;
135
+ "ctx.job.nextRetryDelay": number;
136
+ }>;
137
+ } & {
138
+ scheduled: z.ZodObject<{
139
+ "ctx.job.id": z.ZodString;
140
+ "ctx.job.name": z.ZodString;
141
+ "ctx.job.queue": z.ZodString;
142
+ "ctx.job.scheduledAt": z.ZodOptional<z.ZodString>;
143
+ "ctx.job.cron": z.ZodOptional<z.ZodString>;
144
+ }, "strip", z.ZodTypeAny, {
145
+ "ctx.job.id": string;
146
+ "ctx.job.name": string;
147
+ "ctx.job.queue": string;
148
+ "ctx.job.scheduledAt"?: string | undefined;
149
+ "ctx.job.cron"?: string | undefined;
150
+ }, {
151
+ "ctx.job.id": string;
152
+ "ctx.job.name": string;
153
+ "ctx.job.queue": string;
154
+ "ctx.job.scheduledAt"?: string | undefined;
155
+ "ctx.job.cron"?: string | undefined;
156
+ }>;
157
+ };
158
+ } & {
159
+ worker: {
160
+ started: z.ZodObject<{
161
+ "ctx.worker.id": z.ZodString;
162
+ "ctx.worker.queues": z.ZodString;
163
+ "ctx.worker.concurrency": z.ZodNumber;
164
+ }, "strip", z.ZodTypeAny, {
165
+ "ctx.worker.id": string;
166
+ "ctx.worker.queues": string;
167
+ "ctx.worker.concurrency": number;
168
+ }, {
169
+ "ctx.worker.id": string;
170
+ "ctx.worker.queues": string;
171
+ "ctx.worker.concurrency": number;
172
+ }>;
173
+ } & {
174
+ stopped: z.ZodObject<{
175
+ "ctx.worker.id": z.ZodString;
176
+ "ctx.worker.processed": z.ZodNumber;
177
+ "ctx.worker.failed": z.ZodNumber;
178
+ "ctx.worker.uptime": z.ZodNumber;
179
+ }, "strip", z.ZodTypeAny, {
180
+ "ctx.worker.id": string;
181
+ "ctx.worker.processed": number;
182
+ "ctx.worker.failed": number;
183
+ "ctx.worker.uptime": number;
184
+ }, {
185
+ "ctx.worker.id": string;
186
+ "ctx.worker.processed": number;
187
+ "ctx.worker.failed": number;
188
+ "ctx.worker.uptime": number;
189
+ }>;
190
+ } & {
191
+ idle: z.ZodObject<{
192
+ "ctx.worker.id": z.ZodString;
193
+ "ctx.worker.queues": z.ZodString;
194
+ }, "strip", z.ZodTypeAny, {
195
+ "ctx.worker.id": string;
196
+ "ctx.worker.queues": string;
197
+ }, {
198
+ "ctx.worker.id": string;
199
+ "ctx.worker.queues": string;
200
+ }>;
201
+ } & {
202
+ paused: z.ZodObject<{
203
+ "ctx.worker.id": z.ZodString;
204
+ "ctx.worker.queues": z.ZodString;
205
+ }, "strip", z.ZodTypeAny, {
206
+ "ctx.worker.id": string;
207
+ "ctx.worker.queues": string;
208
+ }, {
209
+ "ctx.worker.id": string;
210
+ "ctx.worker.queues": string;
211
+ }>;
212
+ } & {
213
+ resumed: z.ZodObject<{
214
+ "ctx.worker.id": z.ZodString;
215
+ "ctx.worker.queues": z.ZodString;
216
+ }, "strip", z.ZodTypeAny, {
217
+ "ctx.worker.id": string;
218
+ "ctx.worker.queues": string;
219
+ }, {
220
+ "ctx.worker.id": string;
221
+ "ctx.worker.queues": string;
222
+ }>;
223
+ };
224
+ } & {
225
+ queue: {
226
+ paused: z.ZodObject<{
227
+ "ctx.queue.name": z.ZodString;
228
+ }, "strip", z.ZodTypeAny, {
229
+ "ctx.queue.name": string;
230
+ }, {
231
+ "ctx.queue.name": string;
232
+ }>;
233
+ } & {
234
+ resumed: z.ZodObject<{
235
+ "ctx.queue.name": z.ZodString;
236
+ }, "strip", z.ZodTypeAny, {
237
+ "ctx.queue.name": string;
238
+ }, {
239
+ "ctx.queue.name": string;
240
+ }>;
241
+ } & {
242
+ drained: z.ZodObject<{
243
+ "ctx.queue.name": z.ZodString;
244
+ "ctx.queue.drained.count": z.ZodNumber;
245
+ }, "strip", z.ZodTypeAny, {
246
+ "ctx.queue.name": string;
247
+ "ctx.queue.drained.count": number;
248
+ }, {
249
+ "ctx.queue.name": string;
250
+ "ctx.queue.drained.count": number;
251
+ }>;
252
+ } & {
253
+ cleaned: z.ZodObject<{
254
+ "ctx.queue.name": z.ZodString;
255
+ "ctx.queue.cleaned.count": z.ZodNumber;
256
+ "ctx.queue.cleaned.status": z.ZodString;
257
+ }, "strip", z.ZodTypeAny, {
258
+ "ctx.queue.name": string;
259
+ "ctx.queue.cleaned.count": number;
260
+ "ctx.queue.cleaned.status": string;
261
+ }, {
262
+ "ctx.queue.name": string;
263
+ "ctx.queue.cleaned.count": number;
264
+ "ctx.queue.cleaned.status": string;
265
+ }>;
266
+ } & {
267
+ obliterated: z.ZodObject<{
268
+ "ctx.queue.name": z.ZodString;
269
+ "ctx.queue.obliterated.force": z.ZodBoolean;
270
+ }, "strip", z.ZodTypeAny, {
271
+ "ctx.queue.name": string;
272
+ "ctx.queue.obliterated.force": boolean;
273
+ }, {
274
+ "ctx.queue.name": string;
275
+ "ctx.queue.obliterated.force": boolean;
276
+ }>;
277
+ };
278
+ }>;
279
+ type IgniterJobsTelemetryEvents = typeof IgniterJobsTelemetryEvents;
280
+
281
+ export { IgniterJobsTelemetryEvents };