@shivaedev/admin 0.23.1 → 0.23.3
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/CHANGELOG.md +20 -0
- package/dist/client/adapters/JobDetail.d.ts +1 -1
- package/dist/client/adapters/JobDetail.d.ts.map +1 -1
- package/dist/client/adapters/JobDetail.js +2 -2
- package/dist/client/adapters/JobDetail.js.map +1 -1
- package/dist/client/adapters/JobList.d.ts +1 -1
- package/dist/client/adapters/JobList.d.ts.map +1 -1
- package/dist/client/adapters/JobList.js +4 -4
- package/dist/client/adapters/JobList.js.map +1 -1
- package/dist/client/adapters/JobPagination.js +1 -1
- package/dist/client/adapters/JobPagination.js.map +1 -1
- package/dist/client/adapters/JobTable.d.ts +1 -1
- package/dist/client/adapters/JobTable.d.ts.map +1 -1
- package/dist/client/adapters/JobTable.js +1 -1
- package/dist/client/adapters/JobTable.js.map +1 -1
- package/dist/client/adapters/JobsMetrics.d.ts.map +1 -1
- package/dist/client/adapters/JobsMetrics.js +1 -1
- package/dist/client/adapters/JobsMetrics.js.map +1 -1
- package/dist/client/adapters/JobsQueryPanel.js +1 -1
- package/dist/client/adapters/JobsQueryPanel.js.map +1 -1
- package/dist/client/adapters/JobsQueueView.d.ts +1 -1
- package/dist/client/adapters/JobsQueueView.d.ts.map +1 -1
- package/dist/client/adapters/JobsQueueView.js +3 -3
- package/dist/client/adapters/JobsQueueView.js.map +1 -1
- package/dist/client/adapters/JobsView.d.ts +1 -1
- package/dist/client/adapters/JobsView.d.ts.map +1 -1
- package/dist/client/adapters/JobsView.js +3 -3
- package/dist/client/adapters/JobsView.js.map +1 -1
- package/dist/client/adapters/RunScheduleControl.d.ts +1 -1
- package/dist/client/adapters/RunScheduleControl.d.ts.map +1 -1
- package/dist/client/adapters/RunScheduleControl.js +1 -1
- package/dist/client/adapters/RunScheduleControl.js.map +1 -1
- package/dist/client/adapters/SessionsView.js +3 -3
- package/dist/client/adapters/SessionsView.js.map +1 -1
- package/dist/client/adapters/UsersView.d.ts.map +1 -1
- package/dist/client/adapters/UsersView.js +1 -1
- package/dist/client/adapters/UsersView.js.map +1 -1
- package/dist/jobs/entry.d.ts +1 -1
- package/dist/jobs/entry.d.ts.map +1 -1
- package/dist/jobs/retryPage.d.ts +96 -96
- package/dist/jobs/retryPage.d.ts.map +1 -1
- package/dist/jobs/retryPage.js +3 -3
- package/dist/jobs/retryPage.js.map +1 -1
- package/dist/registry.d.ts +1 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/server/jobsHandlersWithRetry.js +1 -1
- package/dist/server/jobsHandlersWithRetry.js.map +1 -1
- package/dist/server/registerAdmin.js +1 -1
- package/dist/server/registerAdmin.js.map +1 -1
- package/package.json +25 -20
- package/src/client/adapters/JobDetail.tsx +3 -3
- package/src/client/adapters/JobList.tsx +5 -5
- package/src/client/adapters/JobPagination.tsx +1 -1
- package/src/client/adapters/JobTable.tsx +2 -2
- package/src/client/adapters/JobsMetrics.tsx +1 -1
- package/src/client/adapters/JobsQueryPanel.tsx +1 -1
- package/src/client/adapters/JobsQueueView.tsx +4 -4
- package/src/client/adapters/JobsView.ts +4 -4
- package/src/client/adapters/RunScheduleControl.tsx +2 -2
- package/src/client/adapters/SessionsView.ts +3 -3
- package/src/client/adapters/UsersView.ts +1 -1
- package/src/jobs/entry.ts +1 -1
- package/src/jobs/retryPage.ts +4 -4
- package/src/registry.ts +1 -1
- package/src/server/jobsHandlersWithRetry.ts +1 -1
- package/src/server/registerAdmin.ts +1 -1
package/dist/jobs/retryPage.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { Forbidden } from "@shivaedev/errors/taxonomy.ts";
|
|
3
|
+
import type { JobsEntry } from "#jobs/entry.ts";
|
|
3
4
|
import { JobsPermission } from "#permissions.ts";
|
|
4
|
-
import type { JobsEntry } from "./entry.ts";
|
|
5
5
|
declare const JobsNotFailed_base: Schema.Class<JobsNotFailed, Schema.TaggedStruct<"JobsNotFailed", {
|
|
6
6
|
readonly id: Schema.String;
|
|
7
7
|
readonly queue: Schema.String;
|
|
@@ -33,13 +33,13 @@ export declare function jobsPageWithRetry<const TQueues extends readonly JobsEnt
|
|
|
33
33
|
readonly readyTotal: Schema.Number;
|
|
34
34
|
}>, {
|
|
35
35
|
BadRequest: typeof import("@shivaedev/errors/taxonomy.ts").BadRequest;
|
|
36
|
-
JobsPayloadInvalid: typeof import("
|
|
37
|
-
JobsQueueUnregistered: typeof import("
|
|
38
|
-
JobsUnavailable: typeof import("
|
|
36
|
+
JobsPayloadInvalid: typeof import("#jobs/schemas.ts").JobsPayloadInvalid;
|
|
37
|
+
JobsQueueUnregistered: typeof import("#jobs/schemas.ts").JobsQueueUnregistered;
|
|
38
|
+
JobsUnavailable: typeof import("#jobs/schemas.ts").JobsUnavailable;
|
|
39
39
|
}, never>>, "readPolicy"> & {
|
|
40
|
-
readonly readPolicy: import("@shivaedev/contract/readPolicy.ts").QueryReadPolicy<void, import("@shivaedev/errors/taxonomy.ts").BadRequest | import("
|
|
40
|
+
readonly readPolicy: import("@shivaedev/contract/readPolicy.ts").QueryReadPolicy<void, import("@shivaedev/errors/taxonomy.ts").BadRequest | import("#jobs/schemas.ts").JobsPayloadInvalid | import("#jobs/schemas.ts").JobsQueueUnregistered | import("#jobs/schemas.ts").JobsUnavailable, import("@shivaedev/identity/identity.ts").SessionUser>;
|
|
41
41
|
}, "readPolicy"> & {
|
|
42
|
-
readonly readPolicy: import("@shivaedev/contract/readPolicy.ts").QueryReadPolicy<void, import("@shivaedev/errors/taxonomy.ts").BadRequest | import("
|
|
42
|
+
readonly readPolicy: import("@shivaedev/contract/readPolicy.ts").QueryReadPolicy<void, import("@shivaedev/errors/taxonomy.ts").BadRequest | import("#jobs/schemas.ts").JobsPayloadInvalid | import("#jobs/schemas.ts").JobsQueueUnregistered | import("#jobs/schemas.ts").JobsUnavailable, import("@shivaedev/identity/identity.ts").SessionUser>;
|
|
43
43
|
}, Omit<Omit<NoInfer<import("@shivaedev/contract/operation.ts").Query<"counts", Schema.Struct<{
|
|
44
44
|
queue: Schema.String;
|
|
45
45
|
}>, Schema.Struct<{
|
|
@@ -49,17 +49,17 @@ export declare function jobsPageWithRetry<const TQueues extends readonly JobsEnt
|
|
|
49
49
|
readonly totalCount: Schema.Number;
|
|
50
50
|
}>, {
|
|
51
51
|
BadRequest: typeof import("@shivaedev/errors/taxonomy.ts").BadRequest;
|
|
52
|
-
JobsPayloadInvalid: typeof import("
|
|
53
|
-
JobsQueueUnregistered: typeof import("
|
|
54
|
-
JobsUnavailable: typeof import("
|
|
52
|
+
JobsPayloadInvalid: typeof import("#jobs/schemas.ts").JobsPayloadInvalid;
|
|
53
|
+
JobsQueueUnregistered: typeof import("#jobs/schemas.ts").JobsQueueUnregistered;
|
|
54
|
+
JobsUnavailable: typeof import("#jobs/schemas.ts").JobsUnavailable;
|
|
55
55
|
}, never>>, "readPolicy"> & {
|
|
56
56
|
readonly readPolicy: import("@shivaedev/contract/readPolicy.ts").QueryReadPolicy<{
|
|
57
57
|
readonly queue: string;
|
|
58
|
-
}, import("@shivaedev/errors/taxonomy.ts").BadRequest | import("
|
|
58
|
+
}, import("@shivaedev/errors/taxonomy.ts").BadRequest | import("#jobs/schemas.ts").JobsPayloadInvalid | import("#jobs/schemas.ts").JobsQueueUnregistered | import("#jobs/schemas.ts").JobsUnavailable, import("@shivaedev/identity/identity.ts").SessionUser>;
|
|
59
59
|
}, "readPolicy"> & {
|
|
60
60
|
readonly readPolicy: import("@shivaedev/contract/readPolicy.ts").QueryReadPolicy<{
|
|
61
61
|
readonly queue: string;
|
|
62
|
-
}, import("@shivaedev/errors/taxonomy.ts").BadRequest | import("
|
|
62
|
+
}, import("@shivaedev/errors/taxonomy.ts").BadRequest | import("#jobs/schemas.ts").JobsPayloadInvalid | import("#jobs/schemas.ts").JobsQueueUnregistered | import("#jobs/schemas.ts").JobsUnavailable, import("@shivaedev/identity/identity.ts").SessionUser>;
|
|
63
63
|
}, Omit<Omit<NoInfer<import("@shivaedev/contract/operation.ts").Query<"failed", Schema.Struct<{
|
|
64
64
|
cursor: Schema.optionalKey<Schema.String>;
|
|
65
65
|
limit: Schema.Number;
|
|
@@ -84,21 +84,21 @@ export declare function jobsPageWithRetry<const TQueues extends readonly JobsEnt
|
|
|
84
84
|
readonly next: Schema.OptionFromNullOr<Schema.String>;
|
|
85
85
|
}>, {
|
|
86
86
|
BadRequest: typeof import("@shivaedev/errors/taxonomy.ts").BadRequest;
|
|
87
|
-
JobsPayloadInvalid: typeof import("
|
|
88
|
-
JobsQueueUnregistered: typeof import("
|
|
89
|
-
JobsUnavailable: typeof import("
|
|
87
|
+
JobsPayloadInvalid: typeof import("#jobs/schemas.ts").JobsPayloadInvalid;
|
|
88
|
+
JobsQueueUnregistered: typeof import("#jobs/schemas.ts").JobsQueueUnregistered;
|
|
89
|
+
JobsUnavailable: typeof import("#jobs/schemas.ts").JobsUnavailable;
|
|
90
90
|
}, never>>, "readPolicy"> & {
|
|
91
91
|
readonly readPolicy: import("@shivaedev/contract/readPolicy.ts").QueryReadPolicy<{
|
|
92
92
|
readonly cursor?: string;
|
|
93
93
|
readonly limit: number;
|
|
94
94
|
readonly queue: string;
|
|
95
|
-
}, import("@shivaedev/errors/taxonomy.ts").BadRequest | import("
|
|
95
|
+
}, import("@shivaedev/errors/taxonomy.ts").BadRequest | import("#jobs/schemas.ts").JobsPayloadInvalid | import("#jobs/schemas.ts").JobsQueueUnregistered | import("#jobs/schemas.ts").JobsUnavailable, import("@shivaedev/identity/identity.ts").SessionUser>;
|
|
96
96
|
}, "readPolicy"> & {
|
|
97
97
|
readonly readPolicy: import("@shivaedev/contract/readPolicy.ts").QueryReadPolicy<{
|
|
98
98
|
readonly cursor?: string;
|
|
99
99
|
readonly limit: number;
|
|
100
100
|
readonly queue: string;
|
|
101
|
-
}, import("@shivaedev/errors/taxonomy.ts").BadRequest | import("
|
|
101
|
+
}, import("@shivaedev/errors/taxonomy.ts").BadRequest | import("#jobs/schemas.ts").JobsPayloadInvalid | import("#jobs/schemas.ts").JobsQueueUnregistered | import("#jobs/schemas.ts").JobsUnavailable, import("@shivaedev/identity/identity.ts").SessionUser>;
|
|
102
102
|
}, Omit<Omit<NoInfer<import("@shivaedev/contract/operation.ts").Query<"deadLettered", Schema.Struct<{
|
|
103
103
|
cursor: Schema.optionalKey<Schema.String>;
|
|
104
104
|
limit: Schema.Number;
|
|
@@ -129,21 +129,21 @@ export declare function jobsPageWithRetry<const TQueues extends readonly JobsEnt
|
|
|
129
129
|
readonly next: Schema.OptionFromNullOr<Schema.String>;
|
|
130
130
|
}>, {
|
|
131
131
|
BadRequest: typeof import("@shivaedev/errors/taxonomy.ts").BadRequest;
|
|
132
|
-
JobsPayloadInvalid: typeof import("
|
|
133
|
-
JobsQueueUnregistered: typeof import("
|
|
134
|
-
JobsUnavailable: typeof import("
|
|
132
|
+
JobsPayloadInvalid: typeof import("#jobs/schemas.ts").JobsPayloadInvalid;
|
|
133
|
+
JobsQueueUnregistered: typeof import("#jobs/schemas.ts").JobsQueueUnregistered;
|
|
134
|
+
JobsUnavailable: typeof import("#jobs/schemas.ts").JobsUnavailable;
|
|
135
135
|
}, never>>, "readPolicy"> & {
|
|
136
136
|
readonly readPolicy: import("@shivaedev/contract/readPolicy.ts").QueryReadPolicy<{
|
|
137
137
|
readonly cursor?: string;
|
|
138
138
|
readonly limit: number;
|
|
139
139
|
readonly queue: string;
|
|
140
|
-
}, import("@shivaedev/errors/taxonomy.ts").BadRequest | import("
|
|
140
|
+
}, import("@shivaedev/errors/taxonomy.ts").BadRequest | import("#jobs/schemas.ts").JobsPayloadInvalid | import("#jobs/schemas.ts").JobsQueueUnregistered | import("#jobs/schemas.ts").JobsUnavailable, import("@shivaedev/identity/identity.ts").SessionUser>;
|
|
141
141
|
}, "readPolicy"> & {
|
|
142
142
|
readonly readPolicy: import("@shivaedev/contract/readPolicy.ts").QueryReadPolicy<{
|
|
143
143
|
readonly cursor?: string;
|
|
144
144
|
readonly limit: number;
|
|
145
145
|
readonly queue: string;
|
|
146
|
-
}, import("@shivaedev/errors/taxonomy.ts").BadRequest | import("
|
|
146
|
+
}, import("@shivaedev/errors/taxonomy.ts").BadRequest | import("#jobs/schemas.ts").JobsPayloadInvalid | import("#jobs/schemas.ts").JobsQueueUnregistered | import("#jobs/schemas.ts").JobsUnavailable, import("@shivaedev/identity/identity.ts").SessionUser>;
|
|
147
147
|
}, Omit<Omit<NoInfer<import("@shivaedev/contract/operation.ts").Query<"job", Schema.Struct<{
|
|
148
148
|
id: Schema.String;
|
|
149
149
|
queue: Schema.String;
|
|
@@ -164,38 +164,66 @@ export declare function jobsPageWithRetry<const TQueues extends readonly JobsEnt
|
|
|
164
164
|
readonly queue: Schema.Literal<string>;
|
|
165
165
|
}>[]>>, {
|
|
166
166
|
BadRequest: typeof import("@shivaedev/errors/taxonomy.ts").BadRequest;
|
|
167
|
-
JobsPayloadInvalid: typeof import("
|
|
168
|
-
JobsQueueUnregistered: typeof import("
|
|
169
|
-
JobsUnavailable: typeof import("
|
|
167
|
+
JobsPayloadInvalid: typeof import("#jobs/schemas.ts").JobsPayloadInvalid;
|
|
168
|
+
JobsQueueUnregistered: typeof import("#jobs/schemas.ts").JobsQueueUnregistered;
|
|
169
|
+
JobsUnavailable: typeof import("#jobs/schemas.ts").JobsUnavailable;
|
|
170
170
|
}, never>>, "readPolicy"> & {
|
|
171
171
|
readonly readPolicy: import("@shivaedev/contract/readPolicy.ts").QueryReadPolicy<{
|
|
172
172
|
readonly id: string;
|
|
173
173
|
readonly queue: string;
|
|
174
|
-
}, import("@shivaedev/errors/taxonomy.ts").BadRequest | import("
|
|
174
|
+
}, import("@shivaedev/errors/taxonomy.ts").BadRequest | import("#jobs/schemas.ts").JobsPayloadInvalid | import("#jobs/schemas.ts").JobsQueueUnregistered | import("#jobs/schemas.ts").JobsUnavailable, import("@shivaedev/identity/identity.ts").SessionUser>;
|
|
175
175
|
}, "readPolicy"> & {
|
|
176
176
|
readonly readPolicy: import("@shivaedev/contract/readPolicy.ts").QueryReadPolicy<{
|
|
177
177
|
readonly id: string;
|
|
178
178
|
readonly queue: string;
|
|
179
|
-
}, import("@shivaedev/errors/taxonomy.ts").BadRequest | import("
|
|
179
|
+
}, import("@shivaedev/errors/taxonomy.ts").BadRequest | import("#jobs/schemas.ts").JobsPayloadInvalid | import("#jobs/schemas.ts").JobsQueueUnregistered | import("#jobs/schemas.ts").JobsUnavailable, import("@shivaedev/identity/identity.ts").SessionUser>;
|
|
180
180
|
}], readonly [NoInfer<import("@shivaedev/contract/operation.ts").Command<"retry", Schema.Struct<{
|
|
181
181
|
id: Schema.String;
|
|
182
182
|
queue: Schema.String;
|
|
183
183
|
}>, Schema.Void, {
|
|
184
184
|
readonly BadRequest: typeof import("@shivaedev/errors/taxonomy.ts").BadRequest;
|
|
185
|
-
readonly JobsPayloadInvalid: typeof import("
|
|
186
|
-
readonly JobsQueueUnregistered: typeof import("
|
|
187
|
-
readonly JobsUnavailable: typeof import("
|
|
185
|
+
readonly JobsPayloadInvalid: typeof import("#jobs/schemas.ts").JobsPayloadInvalid;
|
|
186
|
+
readonly JobsQueueUnregistered: typeof import("#jobs/schemas.ts").JobsQueueUnregistered;
|
|
187
|
+
readonly JobsUnavailable: typeof import("#jobs/schemas.ts").JobsUnavailable;
|
|
188
188
|
readonly Forbidden: typeof Forbidden;
|
|
189
189
|
readonly JobsNotFailed: typeof JobsNotFailed;
|
|
190
190
|
}>>, NoInfer<import("@shivaedev/contract/operation.ts").Command<"runScheduleNow", Schema.Struct<{
|
|
191
191
|
queue: Schema.String;
|
|
192
192
|
}>, Schema.OptionFromNullOr<Schema.String>, {
|
|
193
193
|
readonly BadRequest: typeof import("@shivaedev/errors/taxonomy.ts").BadRequest;
|
|
194
|
-
readonly JobsPayloadInvalid: typeof import("
|
|
195
|
-
readonly JobsQueueUnregistered: typeof import("
|
|
196
|
-
readonly JobsUnavailable: typeof import("
|
|
194
|
+
readonly JobsPayloadInvalid: typeof import("#jobs/schemas.ts").JobsPayloadInvalid;
|
|
195
|
+
readonly JobsQueueUnregistered: typeof import("#jobs/schemas.ts").JobsQueueUnregistered;
|
|
196
|
+
readonly JobsUnavailable: typeof import("#jobs/schemas.ts").JobsUnavailable;
|
|
197
197
|
readonly Forbidden: typeof Forbidden;
|
|
198
|
-
}>>], import("effect/rpc/Rpc").Rpc<"admin.jobs
|
|
198
|
+
}>>], import("effect/rpc/Rpc").Rpc<"admin.jobs.runScheduleNow", Schema.Struct<{
|
|
199
|
+
queue: Schema.String;
|
|
200
|
+
}>, Schema.OptionFromNullOr<Schema.String>, Schema.Union<readonly (typeof Forbidden | typeof import("@shivaedev/errors/taxonomy.ts").BadRequest | typeof import("#jobs/schemas.ts").JobsUnavailable | typeof import("#jobs/schemas.ts").JobsPayloadInvalid | typeof import("#jobs/schemas.ts").JobsQueueUnregistered)[]>, typeof JobsPermission, never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.job", Schema.Struct<{
|
|
201
|
+
id: Schema.String;
|
|
202
|
+
queue: Schema.String;
|
|
203
|
+
}>, Schema.OptionFromNullOr<Schema.Union<Schema.Struct<{
|
|
204
|
+
readonly attempt: Schema.Number;
|
|
205
|
+
readonly completedOn: Schema.OptionFromNullOr<Schema.DateTimeUtcFromString>;
|
|
206
|
+
readonly createdOn: Schema.DateTimeUtcFromString;
|
|
207
|
+
readonly id: Schema.String;
|
|
208
|
+
readonly output: Schema.NullOr<Schema.Struct<{
|
|
209
|
+
readonly _tag: Schema.withDecodingDefaultKey<Schema.String, never>;
|
|
210
|
+
readonly message: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
211
|
+
}>>;
|
|
212
|
+
readonly retryCount: Schema.Number;
|
|
213
|
+
readonly retryLimit: Schema.Number;
|
|
214
|
+
readonly startedOn: Schema.OptionFromNullOr<Schema.DateTimeUtcFromString>;
|
|
215
|
+
readonly state: Schema.Literals<readonly ["created", "retry", "active", "completed", "cancelled", "failed"]>;
|
|
216
|
+
readonly data: Schema.Unknown;
|
|
217
|
+
readonly queue: Schema.Literal<string>;
|
|
218
|
+
}>[]>>, Schema.Union<readonly [Schema.Union<readonly (typeof import("@shivaedev/errors/taxonomy.ts").BadRequest | typeof import("#jobs/schemas.ts").JobsUnavailable | typeof import("#jobs/schemas.ts").JobsPayloadInvalid | typeof import("#jobs/schemas.ts").JobsQueueUnregistered)[]>, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied]>, typeof JobsPermission | (import("effect/Context").Reference<<A, E, R>(effect: import("effect/Effect").Effect<A, E, R>, request: {
|
|
219
|
+
readonly rpc: import("effect/rpc/Rpc").Any;
|
|
220
|
+
readonly payload: unknown;
|
|
221
|
+
}) => import("effect/Effect").Effect<A, E | import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy | import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied | import("@shivaedev/contract/WebSocketRequired.ts").WebSocketRequired | import("effect/Types").unhandled, R>> & {
|
|
222
|
+
"~effect/rpc/RpcMiddleware": "~effect/rpc/RpcMiddleware";
|
|
223
|
+
"~ClientError": never;
|
|
224
|
+
error: Schema.Union<readonly [typeof import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied, typeof import("@shivaedev/contract/WebSocketRequired.ts").WebSocketRequired]>;
|
|
225
|
+
requiredForClient: false;
|
|
226
|
+
}), never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.$changes", Schema.Struct<{
|
|
199
227
|
queries: Schema.$Array<Schema.Union<readonly (Schema.Struct<{
|
|
200
228
|
query: Schema.Literal<"counts">;
|
|
201
229
|
payload: Schema.Struct<{
|
|
@@ -329,7 +357,7 @@ export declare function jobsPageWithRetry<const TQueues extends readonly JobsEnt
|
|
|
329
357
|
readonly data: Schema.Unknown;
|
|
330
358
|
readonly queue: Schema.Literal<string>;
|
|
331
359
|
}>[]>>;
|
|
332
|
-
}>)[]]>, Schema.Union<readonly [typeof import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied, typeof import("@shivaedev/contract/WebSocketRequired.ts").WebSocketRequired, ...Schema.Union<readonly (typeof import("@shivaedev/errors/taxonomy.ts").BadRequest | typeof import("
|
|
360
|
+
}>)[]]>, Schema.Union<readonly [typeof import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied, typeof import("@shivaedev/contract/WebSocketRequired.ts").WebSocketRequired, ...Schema.Union<readonly (typeof import("@shivaedev/errors/taxonomy.ts").BadRequest | typeof import("#jobs/schemas.ts").JobsUnavailable | typeof import("#jobs/schemas.ts").JobsPayloadInvalid | typeof import("#jobs/schemas.ts").JobsQueueUnregistered)[]>[]]>>, Schema.Never, typeof JobsPermission | (import("effect/Context").Reference<<A, E, R>(effect: import("effect/Effect").Effect<A, E, R>, request: {
|
|
333
361
|
readonly rpc: import("effect/rpc/Rpc").Any;
|
|
334
362
|
readonly payload: unknown;
|
|
335
363
|
}) => import("effect/Effect").Effect<A, E | import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy | import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied | import("@shivaedev/contract/WebSocketRequired.ts").WebSocketRequired | import("effect/Types").unhandled, R>> & {
|
|
@@ -344,7 +372,7 @@ export declare function jobsPageWithRetry<const TQueues extends readonly JobsEnt
|
|
|
344
372
|
readonly failedCount: Schema.Number;
|
|
345
373
|
readonly queuedCount: Schema.Number;
|
|
346
374
|
readonly totalCount: Schema.Number;
|
|
347
|
-
}>, Schema.Union<readonly [Schema.Union<readonly (typeof import("@shivaedev/errors/taxonomy.ts").BadRequest | typeof import("
|
|
375
|
+
}>, Schema.Union<readonly [Schema.Union<readonly (typeof import("@shivaedev/errors/taxonomy.ts").BadRequest | typeof import("#jobs/schemas.ts").JobsUnavailable | typeof import("#jobs/schemas.ts").JobsPayloadInvalid | typeof import("#jobs/schemas.ts").JobsQueueUnregistered)[]>, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied]>, typeof JobsPermission | (import("effect/Context").Reference<<A, E, R>(effect: import("effect/Effect").Effect<A, E, R>, request: {
|
|
348
376
|
readonly rpc: import("effect/rpc/Rpc").Any;
|
|
349
377
|
readonly payload: unknown;
|
|
350
378
|
}) => import("effect/Effect").Effect<A, E | import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy | import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied | import("@shivaedev/contract/WebSocketRequired.ts").WebSocketRequired | import("effect/Types").unhandled, R>> & {
|
|
@@ -352,7 +380,29 @@ export declare function jobsPageWithRetry<const TQueues extends readonly JobsEnt
|
|
|
352
380
|
"~ClientError": never;
|
|
353
381
|
error: Schema.Union<readonly [typeof import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied, typeof import("@shivaedev/contract/WebSocketRequired.ts").WebSocketRequired]>;
|
|
354
382
|
requiredForClient: false;
|
|
355
|
-
}), never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.
|
|
383
|
+
}), never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.health", Schema.Void, Schema.Struct<{
|
|
384
|
+
readonly activeTotal: Schema.Number;
|
|
385
|
+
readonly deadLetteredTotal: Schema.Number;
|
|
386
|
+
readonly failedTotal: Schema.Number;
|
|
387
|
+
readonly jobs: Schema.$Array<Schema.Struct<{
|
|
388
|
+
readonly activeCount: Schema.Number;
|
|
389
|
+
readonly deadLetteredCount: Schema.Number;
|
|
390
|
+
readonly failedCount: Schema.Number;
|
|
391
|
+
readonly name: Schema.String;
|
|
392
|
+
readonly queuedCount: Schema.Number;
|
|
393
|
+
readonly readyCount: Schema.Number;
|
|
394
|
+
}>>;
|
|
395
|
+
readonly queuedTotal: Schema.Number;
|
|
396
|
+
readonly readyTotal: Schema.Number;
|
|
397
|
+
}>, Schema.Union<readonly [Schema.Union<readonly (typeof import("@shivaedev/errors/taxonomy.ts").BadRequest | typeof import("#jobs/schemas.ts").JobsUnavailable | typeof import("#jobs/schemas.ts").JobsPayloadInvalid | typeof import("#jobs/schemas.ts").JobsQueueUnregistered)[]>, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied]>, typeof JobsPermission | (import("effect/Context").Reference<<A, E, R>(effect: import("effect/Effect").Effect<A, E, R>, request: {
|
|
398
|
+
readonly rpc: import("effect/rpc/Rpc").Any;
|
|
399
|
+
readonly payload: unknown;
|
|
400
|
+
}) => import("effect/Effect").Effect<A, E | import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy | import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied | import("@shivaedev/contract/WebSocketRequired.ts").WebSocketRequired | import("effect/Types").unhandled, R>> & {
|
|
401
|
+
"~effect/rpc/RpcMiddleware": "~effect/rpc/RpcMiddleware";
|
|
402
|
+
"~ClientError": never;
|
|
403
|
+
error: Schema.Union<readonly [typeof import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied, typeof import("@shivaedev/contract/WebSocketRequired.ts").WebSocketRequired]>;
|
|
404
|
+
requiredForClient: false;
|
|
405
|
+
}), never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.failed", Schema.Struct<{
|
|
356
406
|
cursor: Schema.optionalKey<Schema.String>;
|
|
357
407
|
limit: Schema.Number;
|
|
358
408
|
queue: Schema.String;
|
|
@@ -372,15 +422,9 @@ export declare function jobsPageWithRetry<const TQueues extends readonly JobsEnt
|
|
|
372
422
|
readonly state: Schema.Literals<readonly ["created", "retry", "active", "completed", "cancelled", "failed"]>;
|
|
373
423
|
readonly data: Schema.Unknown;
|
|
374
424
|
readonly queue: Schema.Literal<string>;
|
|
375
|
-
readonly sourceId: Schema.OptionFromNullOr<Schema.String>;
|
|
376
|
-
readonly sourceOutput: Schema.NullOr<Schema.Struct<{
|
|
377
|
-
readonly _tag: Schema.withDecodingDefaultKey<Schema.String, never>;
|
|
378
|
-
readonly message: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
379
|
-
}>>;
|
|
380
|
-
readonly sourceQueue: Schema.Literal<string>;
|
|
381
425
|
}>[]>>;
|
|
382
426
|
readonly next: Schema.OptionFromNullOr<Schema.String>;
|
|
383
|
-
}>, Schema.Union<readonly [Schema.Union<readonly (typeof import("@shivaedev/errors/taxonomy.ts").BadRequest | typeof import("
|
|
427
|
+
}>, Schema.Union<readonly [Schema.Union<readonly (typeof import("@shivaedev/errors/taxonomy.ts").BadRequest | typeof import("#jobs/schemas.ts").JobsUnavailable | typeof import("#jobs/schemas.ts").JobsPayloadInvalid | typeof import("#jobs/schemas.ts").JobsQueueUnregistered)[]>, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied]>, typeof JobsPermission | (import("effect/Context").Reference<<A, E, R>(effect: import("effect/Effect").Effect<A, E, R>, request: {
|
|
384
428
|
readonly rpc: import("effect/rpc/Rpc").Any;
|
|
385
429
|
readonly payload: unknown;
|
|
386
430
|
}) => import("effect/Effect").Effect<A, E | import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy | import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied | import("@shivaedev/contract/WebSocketRequired.ts").WebSocketRequired | import("effect/Types").unhandled, R>> & {
|
|
@@ -388,7 +432,7 @@ export declare function jobsPageWithRetry<const TQueues extends readonly JobsEnt
|
|
|
388
432
|
"~ClientError": never;
|
|
389
433
|
error: Schema.Union<readonly [typeof import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied, typeof import("@shivaedev/contract/WebSocketRequired.ts").WebSocketRequired]>;
|
|
390
434
|
requiredForClient: false;
|
|
391
|
-
}), never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.
|
|
435
|
+
}), never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.deadLettered", Schema.Struct<{
|
|
392
436
|
cursor: Schema.optionalKey<Schema.String>;
|
|
393
437
|
limit: Schema.Number;
|
|
394
438
|
queue: Schema.String;
|
|
@@ -408,57 +452,15 @@ export declare function jobsPageWithRetry<const TQueues extends readonly JobsEnt
|
|
|
408
452
|
readonly state: Schema.Literals<readonly ["created", "retry", "active", "completed", "cancelled", "failed"]>;
|
|
409
453
|
readonly data: Schema.Unknown;
|
|
410
454
|
readonly queue: Schema.Literal<string>;
|
|
455
|
+
readonly sourceId: Schema.OptionFromNullOr<Schema.String>;
|
|
456
|
+
readonly sourceOutput: Schema.NullOr<Schema.Struct<{
|
|
457
|
+
readonly _tag: Schema.withDecodingDefaultKey<Schema.String, never>;
|
|
458
|
+
readonly message: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
459
|
+
}>>;
|
|
460
|
+
readonly sourceQueue: Schema.Literal<string>;
|
|
411
461
|
}>[]>>;
|
|
412
462
|
readonly next: Schema.OptionFromNullOr<Schema.String>;
|
|
413
|
-
}>, Schema.Union<readonly [Schema.Union<readonly (typeof import("@shivaedev/errors/taxonomy.ts").BadRequest | typeof import("
|
|
414
|
-
readonly rpc: import("effect/rpc/Rpc").Any;
|
|
415
|
-
readonly payload: unknown;
|
|
416
|
-
}) => import("effect/Effect").Effect<A, E | import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy | import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied | import("@shivaedev/contract/WebSocketRequired.ts").WebSocketRequired | import("effect/Types").unhandled, R>> & {
|
|
417
|
-
"~effect/rpc/RpcMiddleware": "~effect/rpc/RpcMiddleware";
|
|
418
|
-
"~ClientError": never;
|
|
419
|
-
error: Schema.Union<readonly [typeof import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied, typeof import("@shivaedev/contract/WebSocketRequired.ts").WebSocketRequired]>;
|
|
420
|
-
requiredForClient: false;
|
|
421
|
-
}), never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.health", Schema.Void, Schema.Struct<{
|
|
422
|
-
readonly activeTotal: Schema.Number;
|
|
423
|
-
readonly deadLetteredTotal: Schema.Number;
|
|
424
|
-
readonly failedTotal: Schema.Number;
|
|
425
|
-
readonly jobs: Schema.$Array<Schema.Struct<{
|
|
426
|
-
readonly activeCount: Schema.Number;
|
|
427
|
-
readonly deadLetteredCount: Schema.Number;
|
|
428
|
-
readonly failedCount: Schema.Number;
|
|
429
|
-
readonly name: Schema.String;
|
|
430
|
-
readonly queuedCount: Schema.Number;
|
|
431
|
-
readonly readyCount: Schema.Number;
|
|
432
|
-
}>>;
|
|
433
|
-
readonly queuedTotal: Schema.Number;
|
|
434
|
-
readonly readyTotal: Schema.Number;
|
|
435
|
-
}>, Schema.Union<readonly [Schema.Union<readonly (typeof import("@shivaedev/errors/taxonomy.ts").BadRequest | typeof import("./schemas.ts").JobsUnavailable | typeof import("./schemas.ts").JobsPayloadInvalid | typeof import("./schemas.ts").JobsQueueUnregistered)[]>, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied]>, typeof JobsPermission | (import("effect/Context").Reference<<A, E, R>(effect: import("effect/Effect").Effect<A, E, R>, request: {
|
|
436
|
-
readonly rpc: import("effect/rpc/Rpc").Any;
|
|
437
|
-
readonly payload: unknown;
|
|
438
|
-
}) => import("effect/Effect").Effect<A, E | import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy | import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied | import("@shivaedev/contract/WebSocketRequired.ts").WebSocketRequired | import("effect/Types").unhandled, R>> & {
|
|
439
|
-
"~effect/rpc/RpcMiddleware": "~effect/rpc/RpcMiddleware";
|
|
440
|
-
"~ClientError": never;
|
|
441
|
-
error: Schema.Union<readonly [typeof import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied, typeof import("@shivaedev/contract/WebSocketRequired.ts").WebSocketRequired]>;
|
|
442
|
-
requiredForClient: false;
|
|
443
|
-
}), never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.job", Schema.Struct<{
|
|
444
|
-
id: Schema.String;
|
|
445
|
-
queue: Schema.String;
|
|
446
|
-
}>, Schema.OptionFromNullOr<Schema.Union<Schema.Struct<{
|
|
447
|
-
readonly attempt: Schema.Number;
|
|
448
|
-
readonly completedOn: Schema.OptionFromNullOr<Schema.DateTimeUtcFromString>;
|
|
449
|
-
readonly createdOn: Schema.DateTimeUtcFromString;
|
|
450
|
-
readonly id: Schema.String;
|
|
451
|
-
readonly output: Schema.NullOr<Schema.Struct<{
|
|
452
|
-
readonly _tag: Schema.withDecodingDefaultKey<Schema.String, never>;
|
|
453
|
-
readonly message: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
454
|
-
}>>;
|
|
455
|
-
readonly retryCount: Schema.Number;
|
|
456
|
-
readonly retryLimit: Schema.Number;
|
|
457
|
-
readonly startedOn: Schema.OptionFromNullOr<Schema.DateTimeUtcFromString>;
|
|
458
|
-
readonly state: Schema.Literals<readonly ["created", "retry", "active", "completed", "cancelled", "failed"]>;
|
|
459
|
-
readonly data: Schema.Unknown;
|
|
460
|
-
readonly queue: Schema.Literal<string>;
|
|
461
|
-
}>[]>>, Schema.Union<readonly [Schema.Union<readonly (typeof import("@shivaedev/errors/taxonomy.ts").BadRequest | typeof import("./schemas.ts").JobsUnavailable | typeof import("./schemas.ts").JobsPayloadInvalid | typeof import("./schemas.ts").JobsQueueUnregistered)[]>, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied]>, typeof JobsPermission | (import("effect/Context").Reference<<A, E, R>(effect: import("effect/Effect").Effect<A, E, R>, request: {
|
|
463
|
+
}>, Schema.Union<readonly [Schema.Union<readonly (typeof import("@shivaedev/errors/taxonomy.ts").BadRequest | typeof import("#jobs/schemas.ts").JobsUnavailable | typeof import("#jobs/schemas.ts").JobsPayloadInvalid | typeof import("#jobs/schemas.ts").JobsQueueUnregistered)[]>, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied]>, typeof JobsPermission | (import("effect/Context").Reference<<A, E, R>(effect: import("effect/Effect").Effect<A, E, R>, request: {
|
|
462
464
|
readonly rpc: import("effect/rpc/Rpc").Any;
|
|
463
465
|
readonly payload: unknown;
|
|
464
466
|
}) => import("effect/Effect").Effect<A, E | import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy | import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied | import("@shivaedev/contract/WebSocketRequired.ts").WebSocketRequired | import("effect/Types").unhandled, R>> & {
|
|
@@ -469,9 +471,7 @@ export declare function jobsPageWithRetry<const TQueues extends readonly JobsEnt
|
|
|
469
471
|
}), never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.retry", Schema.Struct<{
|
|
470
472
|
id: Schema.String;
|
|
471
473
|
queue: Schema.String;
|
|
472
|
-
}>, Schema.Void, Schema.Union<readonly (typeof Forbidden | typeof import("@shivaedev/errors/taxonomy.ts").BadRequest | typeof import("
|
|
473
|
-
queue: Schema.String;
|
|
474
|
-
}>, Schema.OptionFromNullOr<Schema.String>, Schema.Union<readonly (typeof Forbidden | typeof import("@shivaedev/errors/taxonomy.ts").BadRequest | typeof import("./schemas.ts").JobsUnavailable | typeof import("./schemas.ts").JobsPayloadInvalid | typeof import("./schemas.ts").JobsQueueUnregistered)[]>, typeof JobsPermission, never>, readonly [], undefined>;
|
|
474
|
+
}>, Schema.Void, Schema.Union<readonly (typeof Forbidden | typeof import("@shivaedev/errors/taxonomy.ts").BadRequest | typeof import("#jobs/schemas.ts").JobsUnavailable | typeof import("#jobs/schemas.ts").JobsPayloadInvalid | typeof import("#jobs/schemas.ts").JobsQueueUnregistered | typeof JobsNotFailed)[]>, typeof JobsPermission, never>, readonly [], undefined>;
|
|
475
475
|
} & {
|
|
476
476
|
queues: TQueues;
|
|
477
477
|
schedules: JobsEntry[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retryPage.d.ts","sourceRoot":"","sources":["../../src/jobs/retryPage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"retryPage.d.ts","sourceRoot":"","sources":["../../src/jobs/retryPage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAKhD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;;;;;AAEjD,qBAAa,aAAc,SAAQ,kBAGjC;CAAG;AAEL,wBAAgB,iBAAiB,CAAC,KAAK,CAAC,OAAO,SAAS,SAAS,SAAS,EAAE,EAAE,GAAG,MAAM,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqC/F"}
|
package/dist/jobs/retryPage.js
CHANGED
|
@@ -2,11 +2,11 @@ import { Schema } from "effect";
|
|
|
2
2
|
import { contract } from "@shivaedev/contract/contract.ts";
|
|
3
3
|
import { command } from "@shivaedev/contract/operation.ts";
|
|
4
4
|
import { Forbidden } from "@shivaedev/errors/taxonomy.ts";
|
|
5
|
+
import { jobsKeys } from "#jobs/keys.ts";
|
|
6
|
+
import { jobsPage } from "#jobs/page.ts";
|
|
7
|
+
import { JobsFailures } from "#jobs/schemas.ts";
|
|
5
8
|
import { adminPage } from "#page.ts";
|
|
6
9
|
import { JobsPermission } from "#permissions.ts";
|
|
7
|
-
import { jobsKeys } from "./keys.js";
|
|
8
|
-
import { jobsPage } from "./page.js";
|
|
9
|
-
import { JobsFailures } from "./schemas.js";
|
|
10
10
|
export class JobsNotFailed extends Schema.TaggedError()("JobsNotFailed", {
|
|
11
11
|
id: Schema.String,
|
|
12
12
|
queue: Schema.String,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retryPage.js","sourceRoot":"","sources":["../../src/jobs/retryPage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"retryPage.js","sourceRoot":"","sources":["../../src/jobs/retryPage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE1D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,O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,EAAE,CAAC;wBAC3B,QAAQ,CAAC,MAAM,CAAC,IAAI;wBACpB,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;wBAC3B,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;wBAC3B,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC;qBACjC;oBACD,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE;oBACjC,UAAU,EAAE,EAAE,GAAG,YAAY,EAAE,SAAS,EAAE;oBAC1C,OAAO,EAAE,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC;iBAC/C,CAAC;aACF;YACD,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,OAAO;SAC1C,CAAC;QACF,EAAE,EAAE,IAAI,CAAC,EAAE;QACX,UAAU,EAAE,cAAc;QAC1B,KAAK,EAAE,IAAI,CAAC,KAAK;KACjB,CAAC,EACF,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,IAAI,KAAK,CAAC,CAAC,EAAE,CACrE,CAAC;AACH,CAAC"}
|
package/dist/registry.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RpcGroup } from "effect/rpc";
|
|
2
|
-
import type { AdminPage } from "
|
|
2
|
+
import type { AdminPage } from "#page.ts";
|
|
3
3
|
export interface AdminRegistry<TPages extends readonly AdminPage[]> {
|
|
4
4
|
readonly group: RpcGroup.RpcGroup<RpcGroup.Rpcs<TPages[number]["contract"]>>;
|
|
5
5
|
readonly pages: TPages;
|
package/dist/registry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,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AAC,CAAC,GACtD,MAAM,SAAS,WAAW,CAAC,QAAQ,CAAC,GACnC,SAAS,WAAW,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,EAAE,GAC/C,SAAS,EAAE,CAAC;AAEhB,wBAAgB,oBAAoB,CAAC,KAAK,CAAC,WAAW,SAAS,SAAS,gBAAgB,EAAE,EACzF,GAAG,UAAU,EAAE,WAAW,GAAG,aAAa,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,GACpE,aAAa,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC;AAK7C,wBAAgB,aAAa,CAAC,KAAK,CAAC,MAAM,SAAS,SAAS,SAAS,EAAE,EAAE,GAAG,KAAK,EAAE,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,GAAG,aAAa,CAAC,MAAM,CAAC,CAiBxI"}
|
|
@@ -5,7 +5,7 @@ import { jobsQueue } from "#jobs/entry.ts";
|
|
|
5
5
|
import { JobsNotFailed } from "#jobs/retryPage.ts";
|
|
6
6
|
import { JobsQueueUnregistered } from "#jobs/schemas.ts";
|
|
7
7
|
import { RetryJobs } from "#permissions.ts";
|
|
8
|
-
import { jobsFailures, jobsReadHandlers } from "
|
|
8
|
+
import { jobsFailures, jobsReadHandlers } from "#server/jobsHandlers.ts";
|
|
9
9
|
export function jobsHandlersWithRetry(page, service) {
|
|
10
10
|
return page.contract.application.toLayer({
|
|
11
11
|
...jobsReadHandlers(page, service),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobsHandlersWithRetry.js","sourceRoot":"","sources":["../../src/server/jobsHandlersWithRetry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,OAAO,EAAoC,SAAS,EAAE,MAA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AAK,IAAI,CAAC,CAAC,QAAQ,IAAI,SAAS,CAAC,CAAC,CAAC;YAChG,IAAI,KAAK,KAAK,SAAS,IAAI,QAAQ,IAAI,KAAK,EAAE,CAAC;gBAC9C,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,qBAAqB,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;YACjE,CAAC;YACD,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,OAAO,CAAC;YAC/B,OAAO,KAAK,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,eAAe,EAAE,KAAK,CAAC,eAAe,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAC5G,MAAM,CAAC,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,qBAAqB,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAC/F,MAAM,CAAC,QAAQ,CAAC,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAC3E,CAAC;QACH,CAAC,CAAC;KACH,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Effect, Layer } from "effect";
|
|
2
|
-
import { pagePermissions } from "
|
|
2
|
+
import { pagePermissions } from "#server/pagePermissions.ts";
|
|
3
3
|
export function registerAdmin(registry, handlers) {
|
|
4
4
|
const registered = Layer.suspend(() => {
|
|
5
5
|
const ids = new Set(registry.pages.map((page) => page.id));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerAdmin.js","sourceRoot":"","sources":["../../src/server/registerAdmin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAKvC,OAAO,EAAE,eA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AAC;IACpH,CAAC,CAAC,CAAC;IACH,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC;AAC/E,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shivaedev/admin",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.3",
|
|
4
4
|
"description": "Explicit admin page contracts and a protected native Effect RPC registry",
|
|
5
5
|
"homepage": "https://github.com/ShivaeDev/platform/tree/main/packages/admin#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -20,6 +20,11 @@
|
|
|
20
20
|
"@shivaedev/source": "./src/*.ts",
|
|
21
21
|
"types": "./dist/*.d.ts",
|
|
22
22
|
"default": "./dist/*.js"
|
|
23
|
+
},
|
|
24
|
+
"#*.tsx": {
|
|
25
|
+
"@shivaedev/source": "./src/*.tsx",
|
|
26
|
+
"types": "./dist/*.d.ts",
|
|
27
|
+
"default": "./dist/*.js"
|
|
23
28
|
}
|
|
24
29
|
},
|
|
25
30
|
"exports": {
|
|
@@ -42,27 +47,27 @@
|
|
|
42
47
|
"README.md"
|
|
43
48
|
],
|
|
44
49
|
"dependencies": {
|
|
45
|
-
"@shivaedev/access": "0.6.
|
|
46
|
-
"@shivaedev/changes": "0.11.
|
|
47
|
-
"@shivaedev/contract": "0.43.
|
|
48
|
-
"@shivaedev/errors": "0.10.
|
|
49
|
-
"@shivaedev/identity": "0.30.
|
|
50
|
-
"@shivaedev/jobs": "0.41.
|
|
50
|
+
"@shivaedev/access": "0.6.1",
|
|
51
|
+
"@shivaedev/changes": "0.11.1",
|
|
52
|
+
"@shivaedev/contract": "0.43.1",
|
|
53
|
+
"@shivaedev/errors": "0.10.1",
|
|
54
|
+
"@shivaedev/identity": "0.30.2",
|
|
55
|
+
"@shivaedev/jobs": "0.41.2"
|
|
51
56
|
},
|
|
52
57
|
"devDependencies": {
|
|
53
|
-
"@effect/atom-react": "4.1.
|
|
54
|
-
"@shivaedev/quality": "0.
|
|
55
|
-
"@shivaedev/rate-limit": "0.6.
|
|
56
|
-
"@shivaedev/react": "0.46.
|
|
57
|
-
"@shivaedev/server": "0.
|
|
58
|
-
"@shivaedev/sql": "0.
|
|
59
|
-
"@shivaedev/test-kits": "0.10.
|
|
60
|
-
"@shivaedev/test-sql": "0.24.
|
|
61
|
-
"@shivaedev/test-story": "0.45.
|
|
58
|
+
"@effect/atom-react": "4.1.1",
|
|
59
|
+
"@shivaedev/quality": "0.70.1",
|
|
60
|
+
"@shivaedev/rate-limit": "0.6.5",
|
|
61
|
+
"@shivaedev/react": "0.46.2",
|
|
62
|
+
"@shivaedev/server": "0.32.1",
|
|
63
|
+
"@shivaedev/sql": "0.46.1",
|
|
64
|
+
"@shivaedev/test-kits": "0.10.2",
|
|
65
|
+
"@shivaedev/test-sql": "0.24.5",
|
|
66
|
+
"@shivaedev/test-story": "0.45.2",
|
|
62
67
|
"@types/node": "24.19.2",
|
|
63
68
|
"@types/react": "19.3.0",
|
|
64
69
|
"@types/react-dom": "19.3.0",
|
|
65
|
-
"effect": "4.1.
|
|
70
|
+
"effect": "4.1.1",
|
|
66
71
|
"happy-dom": "21.0.4",
|
|
67
72
|
"react": "19.3.1",
|
|
68
73
|
"react-dom": "19.3.1",
|
|
@@ -70,9 +75,9 @@
|
|
|
70
75
|
"vitest": "5.0.5"
|
|
71
76
|
},
|
|
72
77
|
"peerDependencies": {
|
|
73
|
-
"@effect/atom-react": "4.1.
|
|
74
|
-
"@shivaedev/react": "0.46.
|
|
75
|
-
"effect": "4.1.
|
|
78
|
+
"@effect/atom-react": "4.1.1",
|
|
79
|
+
"@shivaedev/react": "0.46.2",
|
|
80
|
+
"effect": "4.1.1",
|
|
76
81
|
"react": "19.3.1"
|
|
77
82
|
},
|
|
78
83
|
"peerDependenciesMeta": {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DateTime, Option } from "effect";
|
|
2
2
|
import { useAction, useQuery } from "@shivaedev/react/client/resultState.ts";
|
|
3
|
-
import { JobButton } from "
|
|
4
|
-
import { JobsQueryPanel } from "
|
|
5
|
-
import type { AdminJob, JobsViewClient, RetryJob } from "
|
|
3
|
+
import { JobButton } from "#client/adapters/JobButton.tsx";
|
|
4
|
+
import { JobsQueryPanel } from "#client/adapters/JobsQueryPanel.tsx";
|
|
5
|
+
import type { AdminJob, JobsViewClient, RetryJob } from "#client/adapters/jobsTypes.ts";
|
|
6
6
|
|
|
7
7
|
export function JobDetail({
|
|
8
8
|
api,
|
|
@@ -2,11 +2,11 @@ import { Option } from "effect";
|
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import type { QueueDisplay } from "@shivaedev/jobs/display.ts";
|
|
4
4
|
import { useQuery } from "@shivaedev/react/client/resultState.ts";
|
|
5
|
-
import { JobDetail, JobRecord } from "
|
|
6
|
-
import { JobPagination } from "
|
|
7
|
-
import { JobsQueryPanel } from "
|
|
8
|
-
import { JobTable } from "
|
|
9
|
-
import type { AdminJob, JobsViewClient, RetryJob } from "
|
|
5
|
+
import { JobDetail, JobRecord } from "#client/adapters/JobDetail.tsx";
|
|
6
|
+
import { JobPagination } from "#client/adapters/JobPagination.tsx";
|
|
7
|
+
import { JobsQueryPanel } from "#client/adapters/JobsQueryPanel.tsx";
|
|
8
|
+
import { JobTable } from "#client/adapters/JobTable.tsx";
|
|
9
|
+
import type { AdminJob, JobsViewClient, RetryJob } from "#client/adapters/jobsTypes.ts";
|
|
10
10
|
|
|
11
11
|
export function JobList({
|
|
12
12
|
api,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Predicate } from "effect";
|
|
2
2
|
import type { ReactNode } from "react";
|
|
3
3
|
import type { QueueDisplay } from "@shivaedev/jobs/display.ts";
|
|
4
|
-
import { JobButton } from "
|
|
5
|
-
import type { AdminJob } from "
|
|
4
|
+
import { JobButton } from "#client/adapters/JobButton.tsx";
|
|
5
|
+
import type { AdminJob } from "#client/adapters/jobsTypes.ts";
|
|
6
6
|
|
|
7
7
|
interface JobTableProps {
|
|
8
8
|
readonly jobs: readonly AdminJob[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { QueryState } from "@shivaedev/react/client/resultState.ts";
|
|
2
|
+
import { JobsQueryPanel } from "#client/adapters/JobsQueryPanel.tsx";
|
|
2
3
|
import type { JobsHealth } from "#jobs/schemas.ts";
|
|
3
|
-
import { JobsQueryPanel } from "./JobsQueryPanel.tsx";
|
|
4
4
|
|
|
5
5
|
export function JobsMetrics({ values }: { readonly values: Readonly<Record<string, number>> }) {
|
|
6
6
|
return (
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Cause, Option, Predicate } from "effect";
|
|
2
2
|
import type { ReactNode } from "react";
|
|
3
3
|
import type { QueryState } from "@shivaedev/react/client/resultState.ts";
|
|
4
|
-
import { JobButton } from "
|
|
4
|
+
import { JobButton } from "#client/adapters/JobButton.tsx";
|
|
5
5
|
|
|
6
6
|
export function JobsQueryPanel<A, E>({ state, children }: { readonly state: QueryState<A, E>; readonly children: (value: A) => ReactNode }) {
|
|
7
7
|
const denied = Option.exists(Option.flatMap(state.cause, Cause.findErrorOption), (error) => Predicate.isTagged(error, "Forbidden"));
|