@shivaedev/admin 0.12.1 → 0.12.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 ADDED
@@ -0,0 +1,256 @@
1
+ # Changelog
2
+
3
+ ## 0.12.3 - 2026-10-31
4
+
5
+ ### Changed
6
+
7
+ - Update `@shivaedev/contract` from 0.26.0 to 0.27.0.
8
+ - Update `@shivaedev/identity` from 0.10.0 to 0.10.1.
9
+ - Update `@shivaedev/jobs` from 0.24.0 to 0.25.0.
10
+ - Update `@shivaedev/react` from 0.26.0 to 0.27.0.
11
+
12
+ ## 0.12.2 - 2026-10-31
13
+
14
+ ### Fixed
15
+
16
+ - Include `CHANGELOG.md` in published package contents so release notes are available in `node_modules`.
17
+ - Release checks reject published package `files` lists that omit `CHANGELOG.md`, naming the package and how to include it.
18
+ - Server RPC failures, request diagnostics and traces use the sensitive keys from their own RPC schemas, so registering another RPC cannot redact their public failure tags or messages.
19
+ - Admin Jobs schemas mark job payload and failure-detail containers sensitive without marking generic `_tag` or `message` fields sensitive.
20
+
21
+ ## 0.12.1 - 2026-10-30
22
+
23
+ ### Changed
24
+
25
+ - Release with updated workspace dependencies.
26
+
27
+ ## 0.12.0 - 2026-10-30
28
+
29
+ ### Added
30
+
31
+ - Access exports `AssignRoles` and `LastRoleAssigner` from `@shivaedev/access/roles.ts` for shared role policy declarations.
32
+ - Identity provides `assignRole(access, userId, role)` for trusted seeds and operator commands. Supply `SqlClient` and `Reactivity`; it returns whether storage changed and uses the Users page's PostgreSQL lock, last-role-assigner guard and commit invalidation.
33
+
34
+ ### Breaking
35
+
36
+ - Identity mounts with `roles` close Better Auth's `/admin/set-role`, `/admin/update-user` and `/admin/create-user` HTTP endpoints and set its admin plugin's `adminRoles` to `[]`. Remove that setup from applications. Use the admin Users page for authorized requests and identity's `assignRole` for trusted server commands.
37
+ - Admin consumers import `AssignRoles` and `LastRoleAssigner` from `@shivaedev/access/roles.ts` instead of `@shivaedev/admin/permissions.ts` and `@shivaedev/admin/users/roles.ts`. The Users page uses identity's shared assignment operation; its permission checks, typed refusal and audit log remain.
38
+
39
+ ## 0.11.2 - 2026-10-30
40
+
41
+ ### Changed
42
+
43
+ - Release with updated workspace dependencies.
44
+
45
+ ## 0.11.1 - 2026-10-30
46
+
47
+ ### Fixed
48
+
49
+ - Stack UsersView users as labelled cards below 640px so role controls fit on phone screens, while retaining the desktop table.
50
+
51
+ ## 0.11.0 - 2026-10-30
52
+
53
+ ### Fixed
54
+
55
+ - Live reads and change subscriptions preserve policy failures instead of reporting read denial. Generated starter apps report notes database connection failures as `ServiceUnavailable` during the owner's live read.
56
+
57
+ ### Breaking
58
+
59
+ - Query read policies declare their error and service channels with `QueryReadPolicy<Payload, E, R>`. Declare policy errors in the query's `rejections` and provide policy services when building its handler Layer. Custom subscription adapters call `querySubscription(rpc, references, viewer)` instead of resolving requests themselves. Use the native RPC type when calling `authorizeReads` or `resolveChanges` so their inferred channels include policy requirements and errors. The generated change stream includes the queries' declared rejections and service requirements; consumers handling that stream must handle those errors too.
60
+ - Admin pages install their permission's read policy for every query, preserving additional query restrictions. Remove repeated page-grant policies from individual queries and supply the page's permission middleware with the handler Layers.
61
+
62
+ ## 0.10.2 - 2026-10-30
63
+
64
+ ### Changed
65
+
66
+ - Release with updated workspace dependencies.
67
+
68
+ ## 0.10.1 - 2026-10-30
69
+
70
+ ### Changed
71
+
72
+ - Release with updated workspace dependencies.
73
+
74
+ ## 0.10.0 - 2026-10-30
75
+
76
+ ### Added
77
+
78
+ - Access exports the `Permission` Schema and derives its type from it. Role resolution and identity session decoding use that Schema.
79
+ - Access exports `forbidden(permission)` and `unauthorized()` from `refusal.ts` for consistent permission refusals.
80
+ - Jobs services share one scoped pg-boss client through the Effect environment. Registration, worker and producer Layers use the same connection and pool settings.
81
+ - Service definitions accept marked generic methods alongside declared dependencies. Generic signatures retain their caller requirements unchanged; initialization can capture declared dependencies as private state.
82
+
83
+ ### Changed
84
+
85
+ - User reads validate rows with `SqlSchema` using the shared `AppUser` fields. User operation spans are named `Admin.listUsers` and `Admin.changeUserRole`; adjust trace filters that used the `Platform` names.
86
+
87
+ ### Fixed
88
+
89
+ - Retry wake-up reads run within the worker scope and log redacted failures without failing other jobs in the batch or spending their retries.
90
+ - Default pg-boss client error logs redact secrets in messages through `@shivaedev/errors`.
91
+
92
+ ### Breaking
93
+
94
+ - Retrying failed jobs now requires `RetryJobs` (`jobs.retry`) in addition to `ReadJobs` (`jobs.read`). Add `RetryJobs` from `@shivaedev/admin/permissions.ts` to application roles that should keep retrying jobs; roles with only `ReadJobs` can still inspect jobs but receive `Forbidden` when retrying.
95
+ - `AppUser` now decodes PostgreSQL `Date` timestamps into UTC `DateTime` values. Direct Schema callers must pass a `Date` for `createdAt`; use `Schema.toCodecJson(AppUser)` when decoding or encoding JSON timestamps. Native RPC keeps ISO strings on the wire and UTC `DateTime` values for callers.
96
+ - Jobs handler failures persist only `JobFailure` (`_tag` and a redacted `message`); failed and dead-letter listings and admin job responses expose that shape or `null`. Consumers can import the shared `JobFailure` Schema from `@shivaedev/jobs/JobFailure.ts` and must read these fields instead of arbitrary error properties, stacks or causes. Older and native pg-boss failures without a tag decode with `_tag: "Error"`, and their messages are redacted when read; outputs without a string message fail decoding.
97
+ - Jobs listings reject invalid page limits and cursors with `SchemaError`; consumers must handle it alongside `PgBossError` and `PgBossPayloadError`. Admin listings report these inputs as `BadRequest`; clients must handle that rejection instead of `JobsUnavailable`.
98
+ - Access, identity and React now share access's grant evaluator: an `any` grant covers an `own` check for the same permission name. An `own` grant still cannot cover an `any` check. Applications that need separate capabilities must declare separate permission names; record ownership checks still belong in `canAccess` or `requireAccess`.
99
+ - Replace `Access.requirePermission(user, permission)` with `requirePermission(yield* Access.resolve(user.role), permission)` from `@shivaedev/access/requirePermission.ts`. The new function takes a signed-in user; reject an absent session with `unauthorized()` from `@shivaedev/access/refusal.ts` before resolving its role. `requireAccess` continues to handle signed-out users itself.
100
+ - Replace identity's `requirePermission(permission)` with access's `requirePermission(yield* SessionUser, permission)`. There is no identity re-export. Admin's built-in handlers use this shared enforcement.
101
+ - Access's `requireAccess` now uses the shared permission refusal message, `Permission required: <name> (<strength>)`, instead of `Access denied: <name>`. Consumers should branch on the `Forbidden` tag.
102
+ - Move connection, pool, client factory, cache key and stop options from each `Jobs.layer` call into one `pgBossLayer` from `@shivaedev/jobs/server/service.ts`. Supply `connectionString` as `Redacted<string>` and provide that Layer to the merged jobs services. Keep only `jobs` and `onError` in `Jobs.layer`.
103
+ - Call `jobs.health()` instead of yielding `jobs.health`. Custom jobs service implementations must expose health as a method. Admin's built-in jobs handlers call the method automatically. Jobs services passed to webhook routes and enqueue helpers must also implement the new method shape.
104
+ - Identity treats an undeclared stored user role as a defect naming the role, rather than `AuthUnavailable`. RPC request tracing logs the defect and Better Auth's session endpoint returns HTTP 500. Consumers must correct the user's stored role or restore its application declaration; reserve `AuthUnavailable` handling for provider outages.
105
+ - Admin role assignment trusts its typed role input and leaves session role resolution to identity. RPC consumers need no change: the contract decodes the role. Direct callers of `changeUserRole` must decode untrusted role input with the application's `Role` schema before calling it.
106
+
107
+ ## 0.9.0 - 2026-10-30
108
+
109
+ ### Changed
110
+
111
+ - Require Effect 4.0.6 and align the Effect companion package peers and generated starter catalog to the same exact release. Install the 4.0.6 Effect stack together.
112
+
113
+ ### Fixed
114
+
115
+ - Register hosted RPC cache-control handling through Effect 4.0.6's request-scoped pre-response API so responses keep `private, no-store`.
116
+ - Accept native RPC's `application/x-ndjson` media type while preserving `application/ndjson` callers at the transport guard.
117
+ - Keep subscriptions open after their HTTP request body completes; closing the socket still cancels them.
118
+
119
+ ### Breaking
120
+
121
+ - `@shivaedev/admin`: Move page declarations and `registerAdmin` handler maps into their owning modules. Combine their registries with `mergeAdminRegistries` in browser composition and their registrations with `mergeAdminRegistrations` in the application host. Registration now exposes its pages; duplicate page ids are rejected by TypeScript as well as at runtime. Keep each module's handler Layer with its page registration.
122
+ - `@shivaedev/create-app`: The starter foundation owns Users and Jobs, and notes registers only its statistics page. Move application pages and handlers into their owning module registrations and combine them at the host; client modules contribute navigation through their own registry. Run `create-app update` to merge the starter side, preserving application customizations through its normal merge flow. Minimal apps retain Users and Jobs when notes is removed.
123
+
124
+ ## 0.8.2 - 2026-10-29
125
+
126
+ ### Changed
127
+
128
+ - Release with updated workspace dependencies.
129
+
130
+ ## 0.8.1 - 2026-10-29
131
+
132
+ ### Changed
133
+
134
+ - Release with updated workspace dependencies.
135
+
136
+ ## 0.8.0 - 2026-10-28
137
+
138
+ ### Added
139
+
140
+ - Register schedule definitions beside queues on the admin Jobs page, with null payloads in failed runs, dead-letter listings and job lookups. Pages with no queues can register handlers and serve health.
141
+ - Read stored jobs with null payload schemas through the jobs service without changing queue payload validation.
142
+ - Show an empty state in the starter Jobs view when no queues or schedules are registered.
143
+
144
+ ### Fixed
145
+
146
+ - Enforce declared query read policies at the hosted RPC handler boundary, including contracts without identity middleware, whose viewer is anonymous. Query RPC error schemas include `QueryReadDenied` so native clients receive typed refusals before handlers run.
147
+ - Keep collection methods and untyped schema internals from making data parameters appear to carry callable services. Direct service implementations, nested dependency fields and service arrays remain subject to `effect/service-parameters`.
148
+
149
+ ### Breaking
150
+
151
+ - Move key imports from `@shivaedev/contract/keys.ts` to `@shivaedev/changes/keys.ts`. Declare bucket fields with `collection(name, idSchema, fields)` and publish affected buckets alongside record keys.
152
+ - Replace collection policy maps, `mergeReadPolicies`, `ReadPolicy` and `ReadPolicyMemoWindow` with each query's `readPolicy(payload, viewer)`. Declare the same query's live scope with `reads(payload, viewer)`. Bound query atoms and subscriptions refuse missing policies with a declaration error; one-off query `run` calls remain available. Denied queries refuse the entire subscription. Server adapters replace `QueryReads` and `ChangesReads` with `QueryDefinition` and `ChangesQueries`. Custom middleware calls `authorizeReads(effect, request, viewer)` and declares `MissingReadPolicy` and `QueryReadDenied` errors.
153
+ - Custom subscription adapters yield `ChangesQueries.resolve(references)`, call `querySubscription(requests, viewer)` and pass the authorized result to `makeLiveServer.subscribe(subscription, context)`. Metadata values expose `QueryDefinition.definition` and `CommandInvalidation.invalidates` instead of bare definitions and callbacks. Yield the Effect returned by `queryKeys(queries, references)` when projecting keys for a custom stream. `resolveChanges` supplies the authorized subscription in hosted applications. Changed hints can carry query positions so bindings can rerun session-scoped reads without deriving session scopes in the browser.
154
+ - Remove `appHost`'s `readPolicy` option and module policy registration. Session and permission middleware apply query policies using the current session viewer. Handle the new typed policy errors in native clients, including `QueryReadDenied` on query RPCs without identity middleware; widen explicit query error annotations accordingly.
155
+ - Replace `sessionCommandChanges` with `commandChanges` for custom session middleware. Command invalidation callbacks can receive the session viewer as their third argument. Announce viewer buckets there; background writers must explicitly publish those bucket keys after commit.
156
+ - Built-in admin queries declare their permission policies alongside their schemas and read scopes. Consumers keep supplying the existing session and permission middleware layers.
157
+ - Local Work Board and Fleet queries declare their existing loopback read access explicitly so their generated live subscriptions remain available.
158
+
159
+ ## 0.7.0 - 2026-10-27
160
+
161
+ ### Added
162
+
163
+ - Admin pages declare domain permissions shared by RPC middleware and client route metadata. Generated apps declare one role per file, with explicit grants and one permission fallback page.
164
+ - Users with `roles.assign` assign a user's single role from the application's declared role set. Role changes cannot remove the final holder of that permission.
165
+
166
+ ### Breaking
167
+
168
+ - Replace `OpenAdmin` and `AdminPermission` with each page's domain permission: `ReadUsers`/`UsersPermission` or `ReadJobs`/`JobsPermission`. Custom `adminPage` declarations must pass their own `permissionMiddleware` as `permission`; provide its `permissionLayer` at the server host and use `page.route.permission` with React's `permissionGuard` and `PermissionBoundary`.
169
+ - Replace the `UsersPage` singleton with `usersPage(AppAccess)` and register `usersHandlers(UsersPage, AppAccess)`. Pass `roles={AppAccess.Role.literals}` to `UsersView`. Server callers pass `AppAccess` first to `listUsers` and `changeUserRole`.
170
+ - Replace `ChangeUserRoles` with `AssignRoles` (`roles.assign`), and handle `LastRoleAssigner` instead of `LastOwner`. User results contain `role` instead of `roles`; `changeRole` takes `{ userId, role }` without `grant`. The fixed `UserRole` Schema is removed; use `AppAccess.Role`.
171
+ - Existing generated apps must migrate stored comma-separated roles to one declared role string before running the new app. Preserve every final role assigner's access during that data migration. Run the create-app updater to merge the starter's new role files, imports, server permission Layers and client permission boundary; resolve customized wiring conflicts and install dependencies. The updater does not migrate database values. Bootstrap now creates one `owner` role, whose explicit grants include access to all admin pages.
172
+
173
+ ## 0.6.0 - 2026-10-27
174
+
175
+ ### Added
176
+
177
+ - Own the app-user modules that lived in Platform: `users/roles.ts` holds the `user`, `admin` and `owner` roles, the browser-safe user schemas, `ChangeUserRoles` and `LastOwner`, and `server/users.ts` holds `listUsers` and `changeUserRole`.
178
+
179
+ ### Changed
180
+
181
+ - Depend on `@shivaedev/identity`, `@shivaedev/errors`, `@shivaedev/access`, `@shivaedev/contract` and `@shivaedev/sql` instead of `@shivaedev/platform`.
182
+
183
+ ## 0.5.0 - 2026-10-26
184
+
185
+ ### Added
186
+
187
+ - Access role sets resolve stored role strings into their decoded role and declared permissions.
188
+ - Platform resolves application roles per request, exposes grants to handlers and the client session, and enforces declared permissions on RPCs and HTTP routes.
189
+
190
+ ### Breaking
191
+
192
+ - Platform removes `requireAdmin`, `hasRole`, `AuthenticatedAdmin`, `AuthenticatedOwner`, their Layers, and `adminRoute`. Declare roles and permissions with `@shivaedev/access`, pass the role set once in `betterAuthMount(options, { roles })` and reuse its returned `sessions`, or configure `sessions.roles` for another provider. Replace role middleware with a class extending `permissionMiddleware<Self>()(id, permission)`, provide `permissionLayer(Middleware, sessions)`, and use `permissionRoute(sessions, permission)` for HTTP routes. Read `SessionUser.permissions` or the client session's `user.permissions` with `hasPermission`; use the application's access policy for record ownership. Unknown stored roles fail visibly and must be migrated to declared strings.
193
+ - Admin pages require `AdminPermission` from `@shivaedev/admin/permissions.ts`. Grant its `OpenAdmin` permission to the application's operator roles and provide `permissionLayer(AdminPermission, sessions)`. User role writes and controls require Platform's `ChangeUserRoles` permission. The existing admin role-list editor and last-owner invariant retain their storage format; declare its stored combinations in the application role set until migrating that editor.
194
+
195
+ ## 0.4.0 - 2026-10-26
196
+
197
+ ### Added
198
+
199
+ - Add the admin Users page, native RPC handlers and React view for paginated app users and owner-managed roles. Register `UsersPage` with `usersHandlers` beside Jobs and mount `UsersView` using its bound query and role action.
200
+ - Add Platform auth user listing and transactional role changes on the existing Better Auth PostgreSQL schema, with typed owner-only and last-owner failures, change invalidation and actor/timestamp logs.
201
+ - Mount Users in the starter and generated apps. Existing apps receive the wiring with `pnpm dlx @shivaedev/create-app@latest update` after these packages are released; review template conflicts and install dependencies. Newly bootstrapped administrators also hold the owner role.
202
+ - Provide the shared expected failure schemas and `rejectedField` in `@shivaedev/effect-contract/errors/`, so browser-safe contract consumers can use them without depending on Platform. Tags, schema fields and RPC encoding remain the same.
203
+
204
+ ### Breaking
205
+
206
+ - Move all imports from `@shivaedev/platform/errors/taxonomy.ts` to `@shivaedev/effect-contract/errors/taxonomy.ts`, and from `@shivaedev/platform/errors/rejectedField.ts` to `@shivaedev/effect-contract/errors/rejectedField.ts`. The old modules are removed. Add a direct `@shivaedev/effect-contract` dependency if the consuming package does not already declare one. Admin, GitHub, Work Board and Work Fleet public failure types now refer to these shared classes.
207
+ - Generated apps use the new imports. The create-app updater applies the starter changes through its usual three-way patch; it does not rewrite imports in app-owned files. Replace both old import paths above in those files when upgrading existing apps.
208
+
209
+ ## 0.3.0 - 2026-10-25
210
+
211
+ ### Added
212
+
213
+ - Add an explicitly retry-enabled Jobs page and handlers for registered failed originals, with administrator-only RPC access and query invalidation after retry.
214
+
215
+ ## 0.2.0 - 2026-10-25
216
+
217
+ ### Added
218
+
219
+ - `@shivaedev/admin` provides a query-only Jobs page with explicitly registered queues, payload codecs, health, counts, paginated failed and dead-lettered jobs, and job lookup through the protected admin RPC group. Jobs failures remain declared and do not prevent other pages from serving requests.
220
+ - `@shivaedev/effect-pg-boss` job reads accept a queue's name and payload Schema without requiring its worker configuration.
221
+
222
+ ## 0.1.5 - 2026-10-25
223
+
224
+ ### Changed
225
+
226
+ - Release with updated workspace dependencies.
227
+
228
+ ## 0.1.4 - 2026-10-25
229
+
230
+ ### Changed
231
+
232
+ - Release with updated workspace dependencies.
233
+
234
+ ## 0.1.3 - 2026-10-25
235
+
236
+ ### Changed
237
+
238
+ - Release with updated workspace dependencies.
239
+
240
+ ## 0.1.2 - 2026-10-25
241
+
242
+ ### Changed
243
+
244
+ - Release with updated workspace dependencies.
245
+
246
+ ## 0.1.1 - 2026-10-25
247
+
248
+ ### Changed
249
+
250
+ - Release with updated workspace dependencies.
251
+
252
+ ## 0.1.0 - 2026-10-25
253
+
254
+ ### Added
255
+
256
+ - Declare admin pages with native Effect contracts protected by `AuthenticatedAdmin`, including generated change subscriptions. Merge pages into one registry with unique ids, paths and RPC tags, and register one typed handler Layer per page for the existing RPC host.
@@ -58,7 +58,7 @@ export declare function jobsPage<const TQueues extends readonly JobsEntry[]>(...
58
58
  readonly retryLimit: Schema.Number;
59
59
  readonly startedOn: Schema.OptionFromNullOr<Schema.DateTimeUtcFromString>;
60
60
  readonly state: Schema.Literals<readonly ["created", "retry", "active", "completed", "cancelled", "failed"]>;
61
- readonly data: JobsPayload<TQueues[number]>;
61
+ readonly data: JobsPayload<TQueues[number]>["Rebuild"];
62
62
  readonly queue: Schema.Literal<string>;
63
63
  }>[]>>;
64
64
  readonly next: Schema.OptionFromNullOr<Schema.String>;
@@ -91,7 +91,7 @@ export declare function jobsPage<const TQueues extends readonly JobsEntry[]>(...
91
91
  readonly retryLimit: Schema.Number;
92
92
  readonly startedOn: Schema.OptionFromNullOr<Schema.DateTimeUtcFromString>;
93
93
  readonly state: Schema.Literals<readonly ["created", "retry", "active", "completed", "cancelled", "failed"]>;
94
- readonly data: JobsPayload<TQueues[number]>;
94
+ readonly data: JobsPayload<TQueues[number]>["Rebuild"];
95
95
  readonly queue: Schema.Literal<string>;
96
96
  readonly sourceId: Schema.OptionFromNullOr<Schema.String>;
97
97
  readonly sourceOutput: Schema.NullOr<Schema.Struct<{
@@ -127,7 +127,7 @@ export declare function jobsPage<const TQueues extends readonly JobsEntry[]>(...
127
127
  readonly retryLimit: Schema.Number;
128
128
  readonly startedOn: Schema.OptionFromNullOr<Schema.DateTimeUtcFromString>;
129
129
  readonly state: Schema.Literals<readonly ["created", "retry", "active", "completed", "cancelled", "failed"]>;
130
- readonly data: JobsPayload<TQueues[number]>;
130
+ readonly data: JobsPayload<TQueues[number]>["Rebuild"];
131
131
  readonly queue: Schema.Literal<string>;
132
132
  }>[]>>, {
133
133
  BadRequest: typeof import("@shivaedev/errors/taxonomy.ts").BadRequest;
@@ -139,7 +139,25 @@ export declare function jobsPage<const TQueues extends readonly JobsEntry[]>(...
139
139
  readonly id: string;
140
140
  readonly queue: string;
141
141
  }, 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>;
142
- }], readonly [], import("effect/rpc/Rpc").Rpc<"admin.jobs.$changes", Schema.Struct<{
142
+ }], readonly [], import("effect/rpc/Rpc").Rpc<"admin.jobs.job", Schema.Struct<{
143
+ id: Schema.String;
144
+ queue: Schema.String;
145
+ }>, Schema.OptionFromNullOr<Schema.Union<Schema.Struct<{
146
+ readonly attempt: Schema.Number;
147
+ readonly completedOn: Schema.OptionFromNullOr<Schema.DateTimeUtcFromString>;
148
+ readonly createdOn: Schema.DateTimeUtcFromString;
149
+ readonly id: Schema.String;
150
+ readonly output: Schema.NullOr<Schema.Struct<{
151
+ readonly _tag: Schema.withDecodingDefaultKey<Schema.String, never>;
152
+ readonly message: Schema.decodeTo<Schema.String, Schema.String, never, never>;
153
+ }>>;
154
+ readonly retryCount: Schema.Number;
155
+ readonly retryLimit: Schema.Number;
156
+ readonly startedOn: Schema.OptionFromNullOr<Schema.DateTimeUtcFromString>;
157
+ readonly state: Schema.Literals<readonly ["created", "retry", "active", "completed", "cancelled", "failed"]>;
158
+ readonly data: JobsPayload<TQueues[number]>["Rebuild"];
159
+ readonly queue: Schema.Literal<string>;
160
+ }>[]>>, 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, never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.$changes", Schema.Struct<{
143
161
  queries: Schema.$Array<Schema.Union<readonly (Schema.Struct<{
144
162
  query: Schema.Literal<"counts">;
145
163
  payload: Schema.Struct<{
@@ -194,7 +212,21 @@ export declare function jobsPage<const TQueues extends readonly JobsEntry[]>(...
194
212
  readonly failedCount: Schema.Number;
195
213
  readonly queuedCount: Schema.Number;
196
214
  readonly totalCount: Schema.Number;
197
- }>, 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, never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.deadLettered", Schema.Struct<{
215
+ }>, 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, never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.health", Schema.Void, Schema.Struct<{
216
+ readonly activeTotal: Schema.Number;
217
+ readonly deadLetteredTotal: Schema.Number;
218
+ readonly failedTotal: Schema.Number;
219
+ readonly jobs: Schema.$Array<Schema.Struct<{
220
+ readonly activeCount: Schema.Number;
221
+ readonly deadLetteredCount: Schema.Number;
222
+ readonly failedCount: Schema.Number;
223
+ readonly name: Schema.String;
224
+ readonly queuedCount: Schema.Number;
225
+ readonly readyCount: Schema.Number;
226
+ }>>;
227
+ readonly queuedTotal: Schema.Number;
228
+ readonly readyTotal: Schema.Number;
229
+ }>, 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, never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.failed", Schema.Struct<{
198
230
  cursor: Schema.optionalKey<Schema.String>;
199
231
  limit: Schema.Number;
200
232
  queue: Schema.String;
@@ -212,16 +244,11 @@ export declare function jobsPage<const TQueues extends readonly JobsEntry[]>(...
212
244
  readonly retryLimit: Schema.Number;
213
245
  readonly startedOn: Schema.OptionFromNullOr<Schema.DateTimeUtcFromString>;
214
246
  readonly state: Schema.Literals<readonly ["created", "retry", "active", "completed", "cancelled", "failed"]>;
215
- readonly data: JobsPayload<TQueues[number]>;
247
+ readonly data: JobsPayload<TQueues[number]>["Rebuild"];
216
248
  readonly queue: Schema.Literal<string>;
217
- readonly sourceId: Schema.OptionFromNullOr<Schema.String>;
218
- readonly sourceOutput: Schema.NullOr<Schema.Struct<{
219
- readonly _tag: Schema.withDecodingDefaultKey<Schema.String, never>;
220
- readonly message: Schema.decodeTo<Schema.String, Schema.String, never, never>;
221
- }>>;
222
249
  }>[]>>;
223
250
  readonly next: Schema.OptionFromNullOr<Schema.String>;
224
- }>, 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, never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.failed", Schema.Struct<{
251
+ }>, 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, never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.deadLettered", Schema.Struct<{
225
252
  cursor: Schema.optionalKey<Schema.String>;
226
253
  limit: Schema.Number;
227
254
  queue: Schema.String;
@@ -239,43 +266,16 @@ export declare function jobsPage<const TQueues extends readonly JobsEntry[]>(...
239
266
  readonly retryLimit: Schema.Number;
240
267
  readonly startedOn: Schema.OptionFromNullOr<Schema.DateTimeUtcFromString>;
241
268
  readonly state: Schema.Literals<readonly ["created", "retry", "active", "completed", "cancelled", "failed"]>;
242
- readonly data: JobsPayload<TQueues[number]>;
269
+ readonly data: JobsPayload<TQueues[number]>["Rebuild"];
243
270
  readonly queue: Schema.Literal<string>;
271
+ readonly sourceId: Schema.OptionFromNullOr<Schema.String>;
272
+ readonly sourceOutput: Schema.NullOr<Schema.Struct<{
273
+ readonly _tag: Schema.withDecodingDefaultKey<Schema.String, never>;
274
+ readonly message: Schema.decodeTo<Schema.String, Schema.String, never, never>;
275
+ }>>;
244
276
  }>[]>>;
245
277
  readonly next: Schema.OptionFromNullOr<Schema.String>;
246
- }>, 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, never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.health", Schema.Void, Schema.Struct<{
247
- readonly activeTotal: Schema.Number;
248
- readonly deadLetteredTotal: Schema.Number;
249
- readonly failedTotal: Schema.Number;
250
- readonly jobs: Schema.$Array<Schema.Struct<{
251
- readonly activeCount: Schema.Number;
252
- readonly deadLetteredCount: Schema.Number;
253
- readonly failedCount: Schema.Number;
254
- readonly name: Schema.String;
255
- readonly queuedCount: Schema.Number;
256
- readonly readyCount: Schema.Number;
257
- }>>;
258
- readonly queuedTotal: Schema.Number;
259
- readonly readyTotal: Schema.Number;
260
- }>, 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, never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.job", Schema.Struct<{
261
- id: Schema.String;
262
- queue: Schema.String;
263
- }>, Schema.OptionFromNullOr<Schema.Union<Schema.Struct<{
264
- readonly attempt: Schema.Number;
265
- readonly completedOn: Schema.OptionFromNullOr<Schema.DateTimeUtcFromString>;
266
- readonly createdOn: Schema.DateTimeUtcFromString;
267
- readonly id: Schema.String;
268
- readonly output: Schema.NullOr<Schema.Struct<{
269
- readonly _tag: Schema.withDecodingDefaultKey<Schema.String, never>;
270
- readonly message: Schema.decodeTo<Schema.String, Schema.String, never, never>;
271
- }>>;
272
- readonly retryCount: Schema.Number;
273
- readonly retryLimit: Schema.Number;
274
- readonly startedOn: Schema.OptionFromNullOr<Schema.DateTimeUtcFromString>;
275
- readonly state: Schema.Literals<readonly ["created", "retry", "active", "completed", "cancelled", "failed"]>;
276
- readonly data: JobsPayload<TQueues[number]>;
277
- readonly queue: Schema.Literal<string>;
278
- }>[]>>, 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, never>, readonly [], undefined>;
278
+ }>, 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, never>, readonly [], undefined>;
279
279
  } & {
280
280
  queues: TQueues;
281
281
  };
@@ -71,7 +71,7 @@ export declare function jobsPageWithRetry<const TQueues extends readonly JobsEnt
71
71
  readonly retryLimit: Schema.Number;
72
72
  readonly startedOn: Schema.OptionFromNullOr<Schema.DateTimeUtcFromString>;
73
73
  readonly state: Schema.Literals<readonly ["created", "retry", "active", "completed", "cancelled", "failed"]>;
74
- readonly data: import("./entry.ts").JobsPayload<[...TQueues][number]>;
74
+ readonly data: import("./entry.ts").JobsPayload<[...TQueues][number]>["Rebuild"];
75
75
  readonly queue: Schema.Literal<string>;
76
76
  }>[]>>;
77
77
  readonly next: Schema.OptionFromNullOr<Schema.String>;
@@ -110,7 +110,7 @@ export declare function jobsPageWithRetry<const TQueues extends readonly JobsEnt
110
110
  readonly retryLimit: Schema.Number;
111
111
  readonly startedOn: Schema.OptionFromNullOr<Schema.DateTimeUtcFromString>;
112
112
  readonly state: Schema.Literals<readonly ["created", "retry", "active", "completed", "cancelled", "failed"]>;
113
- readonly data: import("./entry.ts").JobsPayload<[...TQueues][number]>;
113
+ readonly data: import("./entry.ts").JobsPayload<[...TQueues][number]>["Rebuild"];
114
114
  readonly queue: Schema.Literal<string>;
115
115
  readonly sourceId: Schema.OptionFromNullOr<Schema.String>;
116
116
  readonly sourceOutput: Schema.NullOr<Schema.Struct<{
@@ -152,7 +152,7 @@ export declare function jobsPageWithRetry<const TQueues extends readonly JobsEnt
152
152
  readonly retryLimit: Schema.Number;
153
153
  readonly startedOn: Schema.OptionFromNullOr<Schema.DateTimeUtcFromString>;
154
154
  readonly state: Schema.Literals<readonly ["created", "retry", "active", "completed", "cancelled", "failed"]>;
155
- readonly data: import("./entry.ts").JobsPayload<[...TQueues][number]>;
155
+ readonly data: import("./entry.ts").JobsPayload<[...TQueues][number]>["Rebuild"];
156
156
  readonly queue: Schema.Literal<string>;
157
157
  }>[]>>, {
158
158
  BadRequest: typeof import("@shivaedev/errors/taxonomy.ts").BadRequest;
@@ -179,25 +179,7 @@ export declare function jobsPageWithRetry<const TQueues extends readonly JobsEnt
179
179
  readonly JobsUnavailable: typeof import("./schemas.ts").JobsUnavailable;
180
180
  readonly Forbidden: typeof Forbidden;
181
181
  readonly JobsNotFailed: typeof JobsNotFailed;
182
- }>>], import("effect/rpc/Rpc").Rpc<"admin.jobs.job", Schema.Struct<{
183
- id: Schema.String;
184
- queue: Schema.String;
185
- }>, Schema.OptionFromNullOr<Schema.Union<Schema.Struct<{
186
- readonly attempt: Schema.Number;
187
- readonly completedOn: Schema.OptionFromNullOr<Schema.DateTimeUtcFromString>;
188
- readonly createdOn: Schema.DateTimeUtcFromString;
189
- readonly id: Schema.String;
190
- readonly output: Schema.NullOr<Schema.Struct<{
191
- readonly _tag: Schema.withDecodingDefaultKey<Schema.String, never>;
192
- readonly message: Schema.decodeTo<Schema.String, Schema.String, never, never>;
193
- }>>;
194
- readonly retryCount: Schema.Number;
195
- readonly retryLimit: Schema.Number;
196
- readonly startedOn: Schema.OptionFromNullOr<Schema.DateTimeUtcFromString>;
197
- readonly state: Schema.Literals<readonly ["created", "retry", "active", "completed", "cancelled", "failed"]>;
198
- readonly data: import("./entry.ts").JobsPayload<[...TQueues][number]>;
199
- readonly queue: Schema.Literal<string>;
200
- }>[]>>, 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, never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.$changes", Schema.Struct<{
182
+ }>>], import("effect/rpc/Rpc").Rpc<"admin.jobs.$changes", Schema.Struct<{
201
183
  queries: Schema.$Array<Schema.Union<readonly (Schema.Struct<{
202
184
  query: Schema.Literal<"counts">;
203
185
  payload: Schema.Struct<{
@@ -245,28 +227,17 @@ export declare function jobsPageWithRetry<const TQueues extends readonly JobsEnt
245
227
  readonly queryIndexes: Schema.optional<Schema.$Array<Schema.Number>>;
246
228
  }>, Schema.Struct<{
247
229
  readonly _tag: Schema.Literal<"Resync">;
248
- }>]>, ...never[]]>, Schema.Union<readonly [typeof import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied, ...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)[]>[]]>>, Schema.Never, typeof JobsPermission, never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.counts", Schema.Struct<{
230
+ }>]>, ...never[]]>, Schema.Union<readonly [typeof import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied, ...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)[]>[]]>>, Schema.Never, typeof JobsPermission, never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.retry", Schema.Struct<{
231
+ id: Schema.String;
232
+ queue: Schema.String;
233
+ }>, Schema.Void, 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 JobsNotFailed)[]>, typeof JobsPermission, never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.counts", Schema.Struct<{
249
234
  queue: Schema.String;
250
235
  }>, Schema.Struct<{
251
236
  readonly activeCount: Schema.Number;
252
237
  readonly failedCount: Schema.Number;
253
238
  readonly queuedCount: Schema.Number;
254
239
  readonly totalCount: Schema.Number;
255
- }>, 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, never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.health", Schema.Void, Schema.Struct<{
256
- readonly activeTotal: Schema.Number;
257
- readonly deadLetteredTotal: Schema.Number;
258
- readonly failedTotal: Schema.Number;
259
- readonly jobs: Schema.$Array<Schema.Struct<{
260
- readonly activeCount: Schema.Number;
261
- readonly deadLetteredCount: Schema.Number;
262
- readonly failedCount: Schema.Number;
263
- readonly name: Schema.String;
264
- readonly queuedCount: Schema.Number;
265
- readonly readyCount: Schema.Number;
266
- }>>;
267
- readonly queuedTotal: Schema.Number;
268
- readonly readyTotal: Schema.Number;
269
- }>, 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, never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.failed", Schema.Struct<{
240
+ }>, 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, never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.deadLettered", Schema.Struct<{
270
241
  cursor: Schema.optionalKey<Schema.String>;
271
242
  limit: Schema.Number;
272
243
  queue: Schema.String;
@@ -284,11 +255,16 @@ export declare function jobsPageWithRetry<const TQueues extends readonly JobsEnt
284
255
  readonly retryLimit: Schema.Number;
285
256
  readonly startedOn: Schema.OptionFromNullOr<Schema.DateTimeUtcFromString>;
286
257
  readonly state: Schema.Literals<readonly ["created", "retry", "active", "completed", "cancelled", "failed"]>;
287
- readonly data: import("./entry.ts").JobsPayload<[...TQueues][number]>;
258
+ readonly data: import("./entry.ts").JobsPayload<[...TQueues][number]>["Rebuild"];
288
259
  readonly queue: Schema.Literal<string>;
260
+ readonly sourceId: Schema.OptionFromNullOr<Schema.String>;
261
+ readonly sourceOutput: Schema.NullOr<Schema.Struct<{
262
+ readonly _tag: Schema.withDecodingDefaultKey<Schema.String, never>;
263
+ readonly message: Schema.decodeTo<Schema.String, Schema.String, never, never>;
264
+ }>>;
289
265
  }>[]>>;
290
266
  readonly next: Schema.OptionFromNullOr<Schema.String>;
291
- }>, 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, never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.deadLettered", Schema.Struct<{
267
+ }>, 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, never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.failed", Schema.Struct<{
292
268
  cursor: Schema.optionalKey<Schema.String>;
293
269
  limit: Schema.Number;
294
270
  queue: Schema.String;
@@ -306,19 +282,43 @@ export declare function jobsPageWithRetry<const TQueues extends readonly JobsEnt
306
282
  readonly retryLimit: Schema.Number;
307
283
  readonly startedOn: Schema.OptionFromNullOr<Schema.DateTimeUtcFromString>;
308
284
  readonly state: Schema.Literals<readonly ["created", "retry", "active", "completed", "cancelled", "failed"]>;
309
- readonly data: import("./entry.ts").JobsPayload<[...TQueues][number]>;
285
+ readonly data: import("./entry.ts").JobsPayload<[...TQueues][number]>["Rebuild"];
310
286
  readonly queue: Schema.Literal<string>;
311
- readonly sourceId: Schema.OptionFromNullOr<Schema.String>;
312
- readonly sourceOutput: Schema.NullOr<Schema.Struct<{
313
- readonly _tag: Schema.withDecodingDefaultKey<Schema.String, never>;
314
- readonly message: Schema.decodeTo<Schema.String, Schema.String, never, never>;
315
- }>>;
316
287
  }>[]>>;
317
288
  readonly next: Schema.OptionFromNullOr<Schema.String>;
318
- }>, 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, never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.retry", Schema.Struct<{
289
+ }>, 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, never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.health", Schema.Void, Schema.Struct<{
290
+ readonly activeTotal: Schema.Number;
291
+ readonly deadLetteredTotal: Schema.Number;
292
+ readonly failedTotal: Schema.Number;
293
+ readonly jobs: Schema.$Array<Schema.Struct<{
294
+ readonly activeCount: Schema.Number;
295
+ readonly deadLetteredCount: Schema.Number;
296
+ readonly failedCount: Schema.Number;
297
+ readonly name: Schema.String;
298
+ readonly queuedCount: Schema.Number;
299
+ readonly readyCount: Schema.Number;
300
+ }>>;
301
+ readonly queuedTotal: Schema.Number;
302
+ readonly readyTotal: Schema.Number;
303
+ }>, 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, never> | import("effect/rpc/Rpc").Rpc<"admin.jobs.job", Schema.Struct<{
319
304
  id: Schema.String;
320
305
  queue: Schema.String;
321
- }>, Schema.Void, 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 JobsNotFailed)[]>, typeof JobsPermission, never>, readonly [], undefined>;
306
+ }>, Schema.OptionFromNullOr<Schema.Union<Schema.Struct<{
307
+ readonly attempt: Schema.Number;
308
+ readonly completedOn: Schema.OptionFromNullOr<Schema.DateTimeUtcFromString>;
309
+ readonly createdOn: Schema.DateTimeUtcFromString;
310
+ readonly id: Schema.String;
311
+ readonly output: Schema.NullOr<Schema.Struct<{
312
+ readonly _tag: Schema.withDecodingDefaultKey<Schema.String, never>;
313
+ readonly message: Schema.decodeTo<Schema.String, Schema.String, never, never>;
314
+ }>>;
315
+ readonly retryCount: Schema.Number;
316
+ readonly retryLimit: Schema.Number;
317
+ readonly startedOn: Schema.OptionFromNullOr<Schema.DateTimeUtcFromString>;
318
+ readonly state: Schema.Literals<readonly ["created", "retry", "active", "completed", "cancelled", "failed"]>;
319
+ readonly data: import("./entry.ts").JobsPayload<[...TQueues][number]>["Rebuild"];
320
+ readonly queue: Schema.Literal<string>;
321
+ }>[]>>, 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, never>, readonly [], undefined>;
322
322
  } & {
323
323
  queues: TQueues;
324
324
  };
@@ -91,7 +91,7 @@ export declare function jobSchema<TPayload extends Schema.Top>(queue: {
91
91
  readonly retryLimit: Schema.Number;
92
92
  readonly startedOn: Schema.OptionFromNullOr<Schema.DateTimeUtcFromString>;
93
93
  readonly state: Schema.Literals<readonly ["created", "retry", "active", "completed", "cancelled", "failed"]>;
94
- readonly data: TPayload;
94
+ readonly data: TPayload["Rebuild"];
95
95
  readonly queue: Schema.Literal<string>;
96
96
  }>;
97
97
  export declare function deadLetteredSchema<TPayload extends Schema.Top>(queue: {
@@ -110,7 +110,7 @@ export declare function deadLetteredSchema<TPayload extends Schema.Top>(queue: {
110
110
  readonly retryLimit: Schema.Number;
111
111
  readonly startedOn: Schema.OptionFromNullOr<Schema.DateTimeUtcFromString>;
112
112
  readonly state: Schema.Literals<readonly ["created", "retry", "active", "completed", "cancelled", "failed"]>;
113
- readonly data: TPayload;
113
+ readonly data: TPayload["Rebuild"];
114
114
  readonly queue: Schema.Literal<string>;
115
115
  readonly sourceId: Schema.OptionFromNullOr<Schema.String>;
116
116
  readonly sourceOutput: Schema.NullOr<Schema.Struct<{
@@ -41,7 +41,7 @@ export const JobFields = {
41
41
  completedOn: Schema.OptionFromNullOr(Schema.DateTimeUtcFromString),
42
42
  createdOn: Schema.DateTimeUtcFromString,
43
43
  id: Schema.String,
44
- output: Schema.NullOr(JobFailure),
44
+ output: Schema.NullOr(JobFailure).annotate({ sensitive: true }),
45
45
  retryCount: Schema.Number,
46
46
  retryLimit: Schema.Number,
47
47
  startedOn: Schema.OptionFromNullOr(Schema.DateTimeUtcFromString),
@@ -49,16 +49,16 @@ export const JobFields = {
49
49
  };
50
50
  export const PageFields = { cursor: Schema.optionalKey(Schema.String), limit: Schema.Number };
51
51
  export function jobSchema(queue) {
52
- return Schema.Struct({ ...JobFields, data: queue.schema, queue: Schema.Literal(queue.name) });
52
+ return Schema.Struct({ ...JobFields, data: queue.schema.annotate({ sensitive: true }), queue: Schema.Literal(queue.name) });
53
53
  }
54
54
  export function deadLetteredSchema(queue) {
55
55
  const name = `${queue.name}-dlq`;
56
56
  return Schema.Struct({
57
57
  ...JobFields,
58
- data: queue.schema,
58
+ data: queue.schema.annotate({ sensitive: true }),
59
59
  queue: Schema.Literal(name),
60
60
  sourceId: Schema.OptionFromNullOr(Schema.String),
61
- sourceOutput: Schema.NullOr(JobFailure),
61
+ sourceOutput: Schema.NullOr(JobFailure).annotate({ sensitive: true }),
62
62
  });
63
63
  }
64
64
  export function jobPage(job) {
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/jobs/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAA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AAC,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AACjG,CAAC"}
@@ -71,7 +71,10 @@ export declare function usersPage<const TRole extends string>(access: Pick<Acces
71
71
  readonly queryIndexes: Schema.optional<Schema.$Array<Schema.Number>>;
72
72
  }>, Schema.Struct<{
73
73
  readonly _tag: Schema.Literal<"Resync">;
74
- }>]>, ...never[]]>, Schema.Union<readonly [typeof import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied, ...Schema.Union<readonly (typeof Forbidden | typeof AuthUnavailable)[]>[]]>>, Schema.Never, typeof UsersPermission, never> | import("effect/rpc/Rpc").Rpc<"admin.users.list", Schema.Struct<{
74
+ }>]>, ...never[]]>, Schema.Union<readonly [typeof import("@shivaedev/contract/readPolicyErrors.ts").MissingReadPolicy, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied, ...Schema.Union<readonly (typeof Forbidden | typeof AuthUnavailable)[]>[]]>>, Schema.Never, typeof UsersPermission, never> | import("effect/rpc/Rpc").Rpc<"admin.users.changeRole", Schema.Struct<{
75
+ role: Schema.Literals<TRole[]>;
76
+ userId: Schema.String;
77
+ }>, Schema.Void, Schema.Union<readonly (typeof NotFound | typeof Forbidden | typeof AuthUnavailable | typeof LastRoleAssigner)[]>, typeof UsersPermission, never> | import("effect/rpc/Rpc").Rpc<"admin.users.list", Schema.Struct<{
75
78
  readonly cursor: Schema.optionalKey<Schema.String>;
76
79
  readonly limit: Schema.Number;
77
80
  }>, Schema.Struct<{
@@ -84,9 +87,6 @@ export declare function usersPage<const TRole extends string>(access: Pick<Acces
84
87
  readonly role: Schema.String;
85
88
  }>>;
86
89
  readonly canChangeRoles: Schema.Boolean;
87
- }>, Schema.Union<readonly [Schema.Union<readonly (typeof Forbidden | typeof AuthUnavailable)[]>, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied]>, typeof UsersPermission, never> | import("effect/rpc/Rpc").Rpc<"admin.users.changeRole", Schema.Struct<{
88
- role: Schema.Literals<TRole[]>;
89
- userId: Schema.String;
90
- }>, Schema.Void, Schema.Union<readonly (typeof NotFound | typeof Forbidden | typeof AuthUnavailable | typeof LastRoleAssigner)[]>, typeof UsersPermission, never>, readonly [], undefined>;
90
+ }>, Schema.Union<readonly [Schema.Union<readonly (typeof Forbidden | typeof AuthUnavailable)[]>, typeof import("@shivaedev/contract/readPolicyErrors.ts").QueryReadDenied]>, typeof UsersPermission, never>, readonly [], undefined>;
91
91
  };
92
92
  //# sourceMappingURL=page.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shivaedev/admin",
3
- "version": "0.12.1",
3
+ "version": "0.12.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": {
@@ -38,23 +38,24 @@
38
38
  "!src/**/*.spec.ts",
39
39
  "!src/**/*.spec.tsx",
40
40
  "!src/**/test-support",
41
+ "CHANGELOG.md",
41
42
  "README.md"
42
43
  ],
43
44
  "dependencies": {
44
- "@shivaedev/access": "0.3.0",
45
+ "@shivaedev/access": "0.3.1",
45
46
  "@shivaedev/changes": "0.6.0",
46
- "@shivaedev/contract": "0.25.0",
47
- "@shivaedev/errors": "0.1.2",
48
- "@shivaedev/identity": "0.9.1",
49
- "@shivaedev/jobs": "0.23.2",
50
- "@shivaedev/react": "0.25.0"
47
+ "@shivaedev/contract": "0.27.0",
48
+ "@shivaedev/errors": "0.1.3",
49
+ "@shivaedev/identity": "0.10.1",
50
+ "@shivaedev/jobs": "0.25.0",
51
+ "@shivaedev/react": "0.27.0"
51
52
  },
52
53
  "devDependencies": {
53
54
  "@effect/atom-react": "4.0.6",
54
- "@shivaedev/quality": "0.48.1",
55
- "@shivaedev/server": "0.9.2",
55
+ "@shivaedev/quality": "0.48.2",
56
+ "@shivaedev/server": "0.10.0",
56
57
  "@shivaedev/test-sql": "0.15.0",
57
- "@shivaedev/test-story": "0.26.3",
58
+ "@shivaedev/test-story": "0.28.0",
58
59
  "@types/node": "24.19.2",
59
60
  "@types/react": "19.3.0",
60
61
  "@types/react-dom": "19.3.0",
@@ -51,7 +51,7 @@ export const JobFields = {
51
51
  completedOn: Schema.OptionFromNullOr(Schema.DateTimeUtcFromString),
52
52
  createdOn: Schema.DateTimeUtcFromString,
53
53
  id: Schema.String,
54
- output: Schema.NullOr(JobFailure),
54
+ output: Schema.NullOr(JobFailure).annotate({ sensitive: true }),
55
55
  retryCount: Schema.Number,
56
56
  retryLimit: Schema.Number,
57
57
  startedOn: Schema.OptionFromNullOr(Schema.DateTimeUtcFromString),
@@ -61,17 +61,17 @@ export const JobFields = {
61
61
  export const PageFields = { cursor: Schema.optionalKey(Schema.String), limit: Schema.Number };
62
62
 
63
63
  export function jobSchema<TPayload extends Schema.Top>(queue: { readonly name: string; readonly schema: TPayload }) {
64
- return Schema.Struct({ ...JobFields, data: queue.schema, queue: Schema.Literal(queue.name) });
64
+ return Schema.Struct({ ...JobFields, data: queue.schema.annotate({ sensitive: true }), queue: Schema.Literal(queue.name) });
65
65
  }
66
66
 
67
67
  export function deadLetteredSchema<TPayload extends Schema.Top>(queue: { readonly name: string; readonly schema: TPayload }) {
68
68
  const name: string = `${queue.name}-dlq`;
69
69
  return Schema.Struct({
70
70
  ...JobFields,
71
- data: queue.schema,
71
+ data: queue.schema.annotate({ sensitive: true }),
72
72
  queue: Schema.Literal(name),
73
73
  sourceId: Schema.OptionFromNullOr(Schema.String),
74
- sourceOutput: Schema.NullOr(JobFailure),
74
+ sourceOutput: Schema.NullOr(JobFailure).annotate({ sensitive: true }),
75
75
  });
76
76
  }
77
77