@shivaedev/admin 0.24.3 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +88 -76
  3. package/dist/Jobs.d.ts +71 -0
  4. package/dist/Jobs.d.ts.map +1 -0
  5. package/dist/Jobs.js +13 -0
  6. package/dist/Jobs.js.map +1 -0
  7. package/dist/JobsWithRetry.d.ts +92 -0
  8. package/dist/JobsWithRetry.d.ts.map +1 -0
  9. package/dist/JobsWithRetry.js +40 -0
  10. package/dist/JobsWithRetry.js.map +1 -0
  11. package/dist/Users.d.ts +35 -0
  12. package/dist/Users.d.ts.map +1 -0
  13. package/dist/Users.js +35 -0
  14. package/dist/Users.js.map +1 -0
  15. package/dist/client/adapters/SessionConfirmation.d.ts +1 -1
  16. package/dist/client/adapters/SessionConfirmation.d.ts.map +1 -1
  17. package/dist/client/adapters/SessionListView.d.ts +1 -1
  18. package/dist/client/adapters/SessionListView.d.ts.map +1 -1
  19. package/dist/client/adapters/SessionPagination.d.ts +2 -2
  20. package/dist/client/adapters/SessionPagination.d.ts.map +1 -1
  21. package/dist/client/adapters/SessionsView.d.ts +2 -2
  22. package/dist/client/adapters/SessionsView.d.ts.map +1 -1
  23. package/dist/client/adapters/UsersTable.d.ts +2 -2
  24. package/dist/client/adapters/UsersTable.d.ts.map +1 -1
  25. package/dist/client/adapters/UsersTable.js.map +1 -1
  26. package/dist/client/adapters/UsersView.d.ts +2 -2
  27. package/dist/client/adapters/UsersView.d.ts.map +1 -1
  28. package/dist/client/adapters/jobsTypes.d.ts +8 -8
  29. package/dist/client/adapters/jobsTypes.d.ts.map +1 -1
  30. package/dist/generated/Jobs.d.ts +144 -0
  31. package/dist/generated/Jobs.d.ts.map +1 -0
  32. package/dist/generated/Jobs.js +35 -0
  33. package/dist/generated/Jobs.js.map +1 -0
  34. package/dist/generated/JobsWithRetry.d.ts +182 -0
  35. package/dist/generated/JobsWithRetry.d.ts.map +1 -0
  36. package/dist/generated/JobsWithRetry.js +50 -0
  37. package/dist/generated/JobsWithRetry.js.map +1 -0
  38. package/dist/generated/Users.d.ts +65 -0
  39. package/dist/generated/Users.d.ts.map +1 -0
  40. package/dist/generated/Users.js +27 -0
  41. package/dist/generated/Users.js.map +1 -0
  42. package/dist/jobs/DeadLetter.d.ts +27 -0
  43. package/dist/jobs/DeadLetter.d.ts.map +1 -0
  44. package/dist/jobs/DeadLetter.js +11 -0
  45. package/dist/jobs/DeadLetter.js.map +1 -0
  46. package/dist/jobs/NotFailed.d.ts +9 -0
  47. package/dist/jobs/NotFailed.d.ts.map +1 -0
  48. package/dist/jobs/NotFailed.js +7 -0
  49. package/dist/jobs/NotFailed.js.map +1 -0
  50. package/dist/jobs/Page.d.ts +272 -0
  51. package/dist/jobs/Page.d.ts.map +1 -0
  52. package/dist/jobs/Page.js +10 -0
  53. package/dist/jobs/Page.js.map +1 -0
  54. package/dist/jobs/PageWithRetry.d.ts +296 -0
  55. package/dist/jobs/PageWithRetry.d.ts.map +1 -0
  56. package/dist/jobs/PageWithRetry.js +10 -0
  57. package/dist/jobs/PageWithRetry.js.map +1 -0
  58. package/dist/jobs/Row.d.ts +21 -0
  59. package/dist/jobs/Row.d.ts.map +1 -0
  60. package/dist/jobs/Row.js +5 -0
  61. package/dist/jobs/Row.js.map +1 -0
  62. package/dist/jobs/schemas.d.ts +2 -55
  63. package/dist/jobs/schemas.d.ts.map +1 -1
  64. package/dist/jobs/schemas.js +2 -19
  65. package/dist/jobs/schemas.js.map +1 -1
  66. package/dist/page.d.ts +4 -3
  67. package/dist/page.d.ts.map +1 -1
  68. package/dist/page.js.map +1 -1
  69. package/dist/server/RegisteredQueues.d.ts +21 -0
  70. package/dist/server/RegisteredQueues.d.ts.map +1 -0
  71. package/dist/server/RegisteredQueues.js +4 -0
  72. package/dist/server/RegisteredQueues.js.map +1 -0
  73. package/dist/server/adapters/pgBossQueues.d.ts +6 -0
  74. package/dist/server/adapters/pgBossQueues.d.ts.map +1 -0
  75. package/dist/server/adapters/pgBossQueues.js +57 -0
  76. package/dist/server/adapters/pgBossQueues.js.map +1 -0
  77. package/dist/server/jobsReads.d.ts +40 -0
  78. package/dist/server/jobsReads.d.ts.map +1 -0
  79. package/dist/server/jobsReads.js +65 -0
  80. package/dist/server/jobsReads.js.map +1 -0
  81. package/dist/sessions/Page.d.ts +29 -25
  82. package/dist/sessions/Page.d.ts.map +1 -1
  83. package/dist/sessions/Page.js +1 -1
  84. package/dist/sessions/Page.js.map +1 -1
  85. package/dist/users/List.d.ts +5 -0
  86. package/dist/users/List.d.ts.map +1 -0
  87. package/dist/users/List.js +2 -0
  88. package/dist/users/List.js.map +1 -0
  89. package/dist/users/Page.d.ts +104 -0
  90. package/dist/users/Page.d.ts.map +1 -0
  91. package/dist/users/Page.js +10 -0
  92. package/dist/users/Page.js.map +1 -0
  93. package/package.json +13 -11
  94. package/src/Jobs.ts +13 -0
  95. package/src/JobsWithRetry.ts +42 -0
  96. package/src/Users.ts +38 -0
  97. package/src/client/adapters/SessionConfirmation.tsx +1 -1
  98. package/src/client/adapters/SessionListView.tsx +1 -1
  99. package/src/client/adapters/SessionPagination.tsx +2 -2
  100. package/src/client/adapters/SessionsView.ts +2 -2
  101. package/src/client/adapters/UsersTable.tsx +3 -3
  102. package/src/client/adapters/UsersView.ts +2 -2
  103. package/src/client/adapters/jobsTypes.ts +8 -8
  104. package/src/generated/Jobs.ts +40 -0
  105. package/src/generated/JobsWithRetry.ts +55 -0
  106. package/src/generated/README.md +1 -0
  107. package/src/generated/Users.ts +32 -0
  108. package/src/jobs/DeadLetter.ts +10 -0
  109. package/src/jobs/NotFailed.ts +6 -0
  110. package/src/jobs/Page.ts +10 -0
  111. package/src/jobs/PageWithRetry.ts +10 -0
  112. package/src/jobs/Row.ts +4 -0
  113. package/src/jobs/schemas.ts +2 -23
  114. package/src/page.ts +8 -9
  115. package/src/server/RegisteredQueues.ts +22 -0
  116. package/src/server/adapters/pgBossQueues.ts +94 -0
  117. package/src/server/jobsReads.ts +72 -0
  118. package/src/sessions/Page.ts +1 -1
  119. package/src/users/List.ts +3 -0
  120. package/src/users/Page.ts +10 -0
  121. package/dist/jobs/page.d.ts +0 -425
  122. package/dist/jobs/page.d.ts.map +0 -1
  123. package/dist/jobs/page.js +0 -58
  124. package/dist/jobs/page.js.map +0 -1
  125. package/dist/jobs/retryPage.d.ts +0 -480
  126. package/dist/jobs/retryPage.d.ts.map +0 -1
  127. package/dist/jobs/retryPage.js +0 -50
  128. package/dist/jobs/retryPage.js.map +0 -1
  129. package/dist/server/jobsHandlers.d.ts +0 -62
  130. package/dist/server/jobsHandlers.d.ts.map +0 -1
  131. package/dist/server/jobsHandlers.js +0 -73
  132. package/dist/server/jobsHandlers.js.map +0 -1
  133. package/dist/server/jobsHandlersWithRetry.d.ts +0 -7
  134. package/dist/server/jobsHandlersWithRetry.d.ts.map +0 -1
  135. package/dist/server/jobsHandlersWithRetry.js +0 -43
  136. package/dist/server/jobsHandlersWithRetry.js.map +0 -1
  137. package/dist/server/usersHandlers.d.ts +0 -3
  138. package/dist/server/usersHandlers.d.ts.map +0 -1
  139. package/dist/server/usersHandlers.js +0 -15
  140. package/dist/server/usersHandlers.js.map +0 -1
  141. package/dist/users/page.d.ts +0 -115
  142. package/dist/users/page.d.ts.map +0 -1
  143. package/dist/users/page.js +0 -35
  144. package/dist/users/page.js.map +0 -1
  145. package/src/jobs/page.ts +0 -58
  146. package/src/jobs/retryPage.ts +0 -54
  147. package/src/server/jobsHandlers.ts +0 -95
  148. package/src/server/jobsHandlersWithRetry.ts +0 -59
  149. package/src/server/usersHandlers.ts +0 -17
  150. package/src/users/page.ts +0 -36
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.25.0 - 2026-11-11
4
+
5
+ ### Added
6
+
7
+ - `RegisteredQueues` from `@shivaedev/admin/server/RegisteredQueues.ts` holds the queues operators may administer; `pgBossQueues` builds it from the application's jobs service, keeping the payload Schemas' decoding services on its Layer.
8
+ - An admin page's operations can be a module built with `defineModule`: pass the generated client contract to `adminPage` and register `moduleHandlers(Module)` for the page, beside pages with hand-written handlers in the same registry.
9
+ - The package's build writes `src/generated` and `dist/generated` before compiling, so the published archive holds the generated client contracts.
10
+
11
+ ### Changed
12
+
13
+ - The sessions page uses identity's generated sessions contract, so a browser bundle with the page holds none of identity's server code.
14
+
15
+ ### Fixed
16
+
17
+ - `adminPage` keeps each query's own payload and success types for a generated contract with several queries, so its bound client's queries no longer return the union of every query's success.
18
+
19
+ ### Breaking
20
+
21
+ - The Jobs pages are fixed pages instead of factories over the queue list. Replace `jobsPage(...queues)` from `@shivaedev/admin/jobs/page.ts` with `JobsPage` from `@shivaedev/admin/jobs/Page.ts`, and `jobsPageWithRetry(...queues)` from `@shivaedev/admin/jobs/retryPage.ts` with `JobsPageWithRetry` from `@shivaedev/admin/jobs/PageWithRetry.ts`. The pages no longer carry `queues` or `schedules`: pass the application's queue and schedule declarations to `JobsView` directly.
22
+ - Their operations are the modules `Jobs` from `@shivaedev/admin/Jobs.ts` and `JobsWithRetry` from `@shivaedev/admin/JobsWithRetry.ts`, which are server code. Replace `jobsHandlers(page, JobsService)` (`@shivaedev/admin/server/jobsHandlers.ts`) with `moduleHandlers(Jobs)` and `jobsHandlersWithRetry(page, JobsService)` (`@shivaedev/admin/server/jobsHandlersWithRetry.ts`) with `moduleHandlers(JobsWithRetry)`, with `moduleHandlers` from `@shivaedev/contract/moduleHandlers.ts`, and provide `pgBossQueues(JobsService, ...queues)` from `@shivaedev/admin/server/adapters/pgBossQueues.ts` to the handlers. `jobsReadHandlers` and `jobsFailures` are removed. Browser code that needs the client contracts imports `Jobs` from `@shivaedev/admin/generated/Jobs.ts` and `JobsWithRetry` from `@shivaedev/admin/generated/JobsWithRetry.ts`.
23
+ - Listed jobs and job details are `JobsRow` from `@shivaedev/admin/jobs/Row.ts` and dead-letter copies are `JobsDeadLetter` from `@shivaedev/admin/jobs/DeadLetter.ts`; `jobSchema`, `deadLetteredSchema`, `jobPage` and `JobsFailures` from `@shivaedev/admin/jobs/schemas.ts` are removed. A job's `queue` and a copy's `sourceQueue` are strings. `JobsNotFailed` moved from `@shivaedev/admin/jobs/retryPage.ts` to `@shivaedev/admin/jobs/NotFailed.ts`.
24
+ - Each Jobs operation declares only the rejections it can raise, and `next`, job lookups and `runScheduleNow` travel as encoded `Option` values instead of nullable ones; deploy the browser and the server together.
25
+ - The Users page is a fixed page instead of a factory: replace `usersPage(AppAccess)` from `@shivaedev/admin/users/page.ts` with `UsersPage` from `@shivaedev/admin/users/Page.ts`. Its operations are the module `Users` from `@shivaedev/admin/Users.ts`, which is server code; register them with `users: moduleHandlers(Users)`, with `moduleHandlers` from `@shivaedev/contract/moduleHandlers.ts`. `usersHandlers` (`@shivaedev/admin/server/usersHandlers.ts`) is removed. Browser code that needs the client contract imports `Users` from `@shivaedev/admin/generated/Users.ts`.
26
+ - `admin.users.changeRole` takes the role as a string. The application's role set still decides which roles exist: `betterAuthUserDirectory(AppAccess, ...)` refuses an undeclared role with `AuthUnavailable` before writing anything.
27
+ - The `UsersList` schema from `@shivaedev/admin/users/page.ts` is now the `UsersList` type from `@shivaedev/admin/users/List.ts`: replace `typeof UsersList.Type` with `UsersList`.
28
+ - `admin.users.list` takes its success from what the operation returns, so `next` travels as an encoded `Option` instead of a nullable cursor; deploy the browser and the server together.
29
+
3
30
  ## 0.24.3 - 2026-11-11
4
31
 
5
32
  ### Changed
package/README.md CHANGED
@@ -75,6 +75,36 @@ Declare application roles with `@shivaedev/access`, grant the relevant domain pe
75
75
 
76
76
  Pass `registration.group` and `handlers` to the existing application's RPC host on `/rpc`, merging them with its other groups and Layers as needed. The Platform host supplies generated change handlers; registration requires the page's application handlers. Handler Layer errors and service requirements remain inferred. Missing or extra page ids defect when the handler Layer is built; TypeScript also checks each Layer provides the handlers for its page.
77
77
 
78
+ ### Write a page's operations once
79
+
80
+ A page's operations can instead be a module built with `defineModule` from `@shivaedev/contract/defineModule.ts`: each operation is its `payload` and `*run`, and `pnpm generate` writes the browser contract from the module. Give the module the page's permission middleware, so `run` can read `SessionUser`. The module file is server code, for example `src/modules/admin/jobs/Failed.ts`:
81
+
82
+ ```ts
83
+ export const Failed = defineModule({
84
+ middleware: JobsPermission,
85
+ name: "admin.jobs",
86
+ operations: [ListFailed],
87
+ requires: [JobStore],
88
+ wire: adminJobsWire,
89
+ });
90
+ ```
91
+
92
+ The browser-safe page imports the generated contract, which has the module's name:
93
+
94
+ ```ts
95
+ import { Failed } from "#generated/modules/admin/jobs/Failed.ts";
96
+
97
+ export const Jobs = adminPage({ contract: Failed, id: "jobs", permission: JobsPermission, route: { path: "/admin/jobs", title: "Jobs" } });
98
+ ```
99
+
100
+ Server registration serves the module itself with `moduleHandlers` from `@shivaedev/contract/moduleHandlers.ts`, which runs each query's read policy inside its handler:
101
+
102
+ ```ts
103
+ registerAdmin(Admin, { jobs: moduleHandlers(Failed) });
104
+ ```
105
+
106
+ The page's permission covers every operation as for any page. Pages in this form and pages with hand-written handlers share one registry, so an application moves one page at a time.
107
+
78
108
  ### Protect documents and detail routes
79
109
 
80
110
  Provide the application's session policy through `SessionPolicy` once. Registration builds each page's permission layer with that policy. The handler Layer requires identity's `SessionPolicy` service.
@@ -101,44 +131,42 @@ Browser composition uses `mergeAdminRegistries` from `@shivaedev/admin/registry.
101
131
 
102
132
  An `admin/` path segment means admin-only code. A wholly admin-only feature lives under `src/modules/admin/<name>`, with its shared declarations, `server/` and `client/` there. Admin tools for a member feature stay inside that feature: `admin/` for browser-safe page declarations, `server/admin/` for reads and handlers, and `client/admin/` for bindings and views. Each module reads only its own tables; compose another module's exposed operations for data it owns. Permissions enforce access regardless of the path.
103
133
 
104
- The starter declares `StatisticsPage` with `adminPage` in [`src/modules/notes/admin/pages.ts`](https://github.com/ShivaeDev/platform/blob/main/examples/starter/src/modules/notes/admin/pages.ts). Its all-user read lives in [`src/modules/notes/server/admin/readStatistics.ts`](https://github.com/ShivaeDev/platform/blob/main/examples/starter/src/modules/notes/server/admin/readStatistics.ts):
134
+ The starter writes the statistics read once as an operation in [`src/modules/notes/server/admin/Read.ts`](https://github.com/ShivaeDev/platform/blob/main/examples/starter/src/modules/notes/server/admin/Read.ts):
105
135
 
106
136
  ```ts
107
137
  import { Effect, Schema } from "effect";
108
138
  import { SqlClient, SqlSchema } from "effect/sql";
109
- import { NoteStatistics } from "#modules/notes/admin/pages.ts";
110
- import { notesSqlFailure } from "#modules/notes/server/sqlFailure.ts";
111
-
112
- export const readStatistics = Effect.fn("Notes.readStatistics")(function* () {
113
- const sql = yield* SqlClient.SqlClient;
114
- const read = SqlSchema.findOne({
115
- execute: () => sql`select count(*)::int as notes, count(*) filter (where word_count is null)::int as pending,
116
- coalesce(sum(word_count), 0)::int as words from notes`,
117
- Request: Schema.Void,
118
- Result: NoteStatistics,
119
- });
120
- return yield* read(undefined).pipe(Effect.catchTag("SqlError", (cause) => Effect.fail(notesSqlFailure(cause))));
139
+ import { query } from "@shivaedev/contract/operation.ts";
140
+ import { notes } from "#modules/notes/model.ts";
141
+
142
+ const Totals = Schema.Struct({ notes: Schema.Number, pending: Schema.Number, words: Schema.Number });
143
+
144
+ export const Read = query("statistics", {
145
+ reads: () => [notes.list],
146
+ *run() {
147
+ const sql = yield* SqlClient.SqlClient;
148
+ const read = SqlSchema.findOne({
149
+ execute: () => sql`select count(*)::int as notes, count(*) filter (where word_count is null)::int as pending,
150
+ coalesce(sum(word_count), 0)::int as words from notes`,
151
+ Request: Schema.Void,
152
+ Result: Totals,
153
+ });
154
+ // An aggregate without grouping always returns one row.
155
+ return yield* read(undefined).pipe(Effect.catchTag("NoSuchElementError", Effect.die));
156
+ },
121
157
  });
122
158
  ```
123
159
 
124
- [`src/modules/notes/server/admin/registration.ts`](https://github.com/ShivaeDev/platform/blob/main/examples/starter/src/modules/notes/server/admin/registration.ts) pairs that read with the page:
160
+ Its module, [`src/modules/notes/admin/Statistics.ts`](https://github.com/ShivaeDev/platform/blob/main/examples/starter/src/modules/notes/admin/Statistics.ts), lists that operation under the page's permission. [`src/modules/notes/admin/pages.ts`](https://github.com/ShivaeDev/platform/blob/main/examples/starter/src/modules/notes/admin/pages.ts) declares `StatisticsPage` with `adminPage` over the generated contract, and [`src/modules/notes/server/admin/registration.ts`](https://github.com/ShivaeDev/platform/blob/main/examples/starter/src/modules/notes/server/admin/registration.ts) serves the module:
125
161
 
126
162
  ```ts
127
163
  import { registerAdmin } from "@shivaedev/admin/server/registerAdmin.ts";
128
- import { rpcBoundary } from "@shivaedev/errors/boundary.ts";
129
- import { InternalServerError } from "@shivaedev/errors/taxonomy.ts";
130
- import { Admin, StatisticsPage } from "#modules/notes/admin/pages.ts";
131
- import { readStatistics } from "./readStatistics.ts";
132
-
133
- const statistics = StatisticsPage.contract.application.toLayer({
134
- "admin.notes.statistics": () =>
135
- readStatistics().pipe(
136
- rpcBoundary(StatisticsPage.contract.declaration.queries[0].error, { unexpected: (message) => new InternalServerError({ message }) }),
137
- ),
138
- });
164
+ import { moduleHandlers } from "@shivaedev/contract/moduleHandlers.ts";
165
+ import { Admin } from "#modules/notes/admin/pages.ts";
166
+ import { Statistics } from "#modules/notes/admin/Statistics.ts";
139
167
 
140
168
  export const adminRegistration = registerAdmin(Admin, {
141
- "note-statistics": statistics,
169
+ "note-statistics": moduleHandlers(Statistics),
142
170
  });
143
171
  ```
144
172
 
@@ -146,54 +174,48 @@ The read stays in notes because notes owns the table. The [client registration](
146
174
 
147
175
  ### Built-in Jobs page
148
176
 
149
- Share each queue's name, optional display label, subject columns and payload Schema with the browser declaration. The page exposes only the queues passed to `jobsPage`; a queue registered with the jobs runtime is not automatically available to operators.
177
+ Add `JobsPage` from `@shivaedev/admin/jobs/Page.ts` to the registry and register `jobs: moduleHandlers(Jobs)`, with `Jobs` from `@shivaedev/admin/Jobs.ts`, the module behind the page, which is server code. The module requires `RegisteredQueues` from `@shivaedev/admin/server/RegisteredQueues.ts`: the queues operators may administer and the jobs runtime they run on. Provide it with `pgBossQueues` from `@shivaedev/admin/server/adapters/pgBossQueues.ts`, passing the application's existing `makePgBoss` service and each queue's name, optional display label, subject columns and payload Schema. The page exposes only those queues; a queue registered with the jobs runtime is not automatically available to operators.
150
178
 
151
179
  ```ts
152
- import { Schema } from "effect";
153
- import { jobsPage } from "@shivaedev/admin/jobs/page.ts";
180
+ import { Layer, Schema } from "effect";
181
+ import { Jobs } from "@shivaedev/admin/Jobs.ts";
182
+ import { JobsPage } from "@shivaedev/admin/jobs/Page.ts";
154
183
  import { adminRegistry } from "@shivaedev/admin/registry.ts";
184
+ import { pgBossQueues } from "@shivaedev/admin/server/adapters/pgBossQueues.ts";
185
+ import { registerAdmin } from "@shivaedev/admin/server/registerAdmin.ts";
186
+ import { moduleHandlers } from "@shivaedev/contract/moduleHandlers.ts";
155
187
 
156
- const MailPayload = Schema.Struct({ id: Schema.NumberFromString });
157
- const JobsPage = jobsPage({
188
+ const Mail = {
158
189
  name: "mail",
159
190
  label: "Email delivery",
160
- schema: MailPayload,
191
+ schema: Schema.Struct({ id: Schema.NumberFromString }),
161
192
  subject: [{ field: "id", label: "Message" }],
162
- });
163
- const Admin = adminRegistry(JobsPage);
164
- ```
165
-
166
- Register its handlers with the application's existing `makePgBoss` service:
167
-
168
- ```ts
169
- import { jobsHandlers } from "@shivaedev/admin/server/jobsHandlers.ts";
170
- import { registerAdmin } from "@shivaedev/admin/server/registerAdmin.ts";
171
-
172
- const registration = registerAdmin(Admin, {
173
- jobs: jobsHandlers(JobsPage, JobsService),
174
- });
193
+ };
194
+ const registration = registerAdmin(adminRegistry(JobsPage), { jobs: moduleHandlers(Jobs) });
195
+ const queues = pgBossQueues(JobsService, Mail);
196
+ const handlers = registration.handlers.pipe(Layer.provide(queues));
175
197
  ```
176
198
 
177
- `jobsHandlers` uses the shared `PgBossInspection` service internally and provides it from the application-specific jobs service tag. Direct calls to `jobsReadHandlers` use the `PgBossInspection` service from the caller's Effect environment.
199
+ The `pgBossQueues` Layer requires the jobs service and the payload Schemas' decoding services, so the page's operations require only `RegisteredQueues`.
178
200
 
179
- The queries are `admin.jobs.health`, `admin.jobs.counts`, `admin.jobs.failed`, `admin.jobs.deadLettered` and `admin.jobs.job`. Counts take `{ queue }`; listings take `{ queue, limit, cursor? }` and return `{ jobs, next }`, where `next` is an `Option<string>`. Job lookup takes `{ queue, id }` and returns `Option<Job>`. Each job carries its queue, decoded payload, state, attempt and retry counts, output and timestamps. Dead-letter listings also carry `sourceQueue`, `sourceId` and `sourceOutput`. `sourceQueue` names the original queue, so readers can route to it directly. Once the original succeeds, its copies leave the dead-letter listing. Output and source output use the jobs package's `JobFailure | null` shape (`_tag` and redacted `message`). A zero page limit or malformed listing cursor is rejected as `BadRequest`. Timestamps use UTC `DateTime` values; the RPC encodes timestamps as strings and Options as nullable values. Jobs decodes the durable payload and masks native `Redacted` values and sensitive keys before the RPC response. Payloads are diagnostic `data: unknown`; narrow them before reading fields. Result serialization does not run the queue's payload encoder or require its encoding services.
201
+ The queries are `admin.jobs.health`, `admin.jobs.counts`, `admin.jobs.failed`, `admin.jobs.deadLettered` and `admin.jobs.job`. Counts take `{ queue }`; listings take `{ queue, limit, cursor? }` and return `{ jobs, next }`, where `next` is an `Option<string>`. Job lookup takes `{ queue, id }` and returns `Option<JobsRow>`. Each job is a `JobsRow` from `@shivaedev/admin/jobs/Row.ts` carrying its queue, decoded payload, state, attempt and retry counts, output and timestamps. Dead-letter listings return `JobsDeadLetter` from `@shivaedev/admin/jobs/DeadLetter.ts`, which also carries `sourceQueue`, `sourceId` and `sourceOutput`. `sourceQueue` names the original queue, so readers can route to it directly. Once the original succeeds, its copies leave the dead-letter listing. Output and source output use the jobs package's `JobFailure | null` shape (`_tag` and redacted `message`). A zero page limit or malformed listing cursor is rejected as `BadRequest`. Timestamps use UTC `DateTime` values. Jobs decodes the durable payload and masks native `Redacted` values and sensitive keys before the RPC response. Payloads are diagnostic `data: unknown`; narrow them before reading fields. Result serialization does not run the queue's payload encoder or require its encoding services.
180
202
 
181
- Schedule definitions from `defineSchedule` can be passed beside queues. For a worker-only schedule, share a browser-safe object such as `const Cleanup = { name: "cleanup" } as const`. Pass `Cleanup` to `jobsPage` and spread it into the worker's `defineSchedule({ ...Cleanup, cron: "17 3 * * *" })`. The page needs no server import or worker registration. Scheduled runs use a null payload schema for failed and dead-letter listings and job lookup. Calling `jobsPage()` with no arguments registers the same read-only page and serves health with no jobs and zero totals.
203
+ Schedule definitions from `defineSchedule` can be passed beside queues. For a worker-only schedule, share a browser-safe object such as `const Cleanup = { name: "cleanup" } as const`. Pass `Cleanup` to `pgBossQueues` and spread it into the worker's `defineSchedule({ ...Cleanup, cron: "17 3 * * *" })`. Scheduled runs use a null payload schema for failed and dead-letter listings and job lookup. With no queues, `pgBossQueues(JobsService)` serves health with no jobs and zero totals.
182
204
 
183
- Health reads the page's declared queues in declaration order, including schedules registered by a separate worker service, and totals only those queues. It has the same refresh timing as jobs health. Unregistered names, including dead-letter queue names passed directly, fail with `JobsQueueUnregistered`. Stored payload decoding failures become `JobsPayloadInvalid`; jobs operation failures become `JobsUnavailable`, carrying the operation name. These declared failures do not expose the original database error.
205
+ Health reads the declared queues in declaration order, including schedules registered by a separate worker service, and totals only those queues. It has the same refresh timing as jobs health. Unregistered names, including dead-letter queue names passed directly, fail with `JobsQueueUnregistered`. Stored payload decoding failures become `JobsPayloadInvalid`; jobs operation failures become `JobsUnavailable`, carrying the operation name. These declared failures do not expose the original database error.
184
206
 
185
- The default `jobsPage` declares no commands, and its bound client has no retry operation. Handler registration performs no jobs read, and a failed jobs request leaves other pages available. The application mounts the registration on its existing RPC host.
207
+ The `Jobs` module declares no commands, and its bound client has no retry operation. Handler registration performs no jobs read, and a failed jobs request leaves other pages available. The application mounts the registration on its existing RPC host.
186
208
 
187
209
  #### Mount the Jobs view
188
210
 
189
- Bind the page contract to the application's AtomRpc client and pass `JobsPage.queues` to `JobsView`. The view lists failed and dead-lettered jobs with readable failure messages, health, counts, pagination and detail. A caller without `jobs.read` sees a permission refusal. Tailwind applications include `@source "../../node_modules/@shivaedev/admin/src/client/adapters";` in their client CSS.
211
+ Bind the page contract to the application's AtomRpc client and pass the queues given to `pgBossQueues` to `JobsView`. The view lists failed and dead-lettered jobs with readable failure messages, health, counts, pagination and detail. A caller without `jobs.read` sees a permission refusal. Tailwind applications include `@source "../../node_modules/@shivaedev/admin/src/client/adapters";` in their client CSS.
190
212
 
191
213
  ```tsx
192
214
  import { JobsView } from "@shivaedev/admin/client/adapters/JobsView.ts";
193
215
 
194
216
  const jobs = bind(JobsPage.contract, Client);
195
217
 
196
- <JobsView api={jobs} queues={JobsPage.queues} />;
218
+ <JobsView api={jobs} queues={[Mail]} />;
197
219
  ```
198
220
 
199
221
  For a retry-enabled page, pass `retry={Client.runtime.fn(jobs.retry.run)}`. The view offers retry on failed originals; the server also requires `jobs.retry`. Omit both action props for a read-only view. Keep the view inside the application's admin shell and protect its route with `JobsPage.route.permission`.
@@ -202,43 +224,33 @@ Queue and schedule labels replace internal names in the queue picker and selecte
202
224
 
203
225
  ## Declare retry explicitly
204
226
 
205
- Use `jobsPageWithRetry` and `jobsHandlersWithRetry` when administrators should be able to retry failed original jobs:
227
+ Use `JobsPageWithRetry` from `@shivaedev/admin/jobs/PageWithRetry.ts` and its module `JobsWithRetry` from `@shivaedev/admin/JobsWithRetry.ts` when administrators should be able to retry failed original jobs:
206
228
 
207
229
  ```ts
208
- import { jobsPageWithRetry } from "@shivaedev/admin/jobs/retryPage.ts";
209
- import { jobsHandlersWithRetry } from "@shivaedev/admin/server/jobsHandlersWithRetry.ts";
210
- import { Effect, Layer } from "effect";
211
- import { PgBossInspection } from "@shivaedev/jobs/server/inspection.ts";
230
+ import { JobsWithRetry } from "@shivaedev/admin/JobsWithRetry.ts";
231
+ import { JobsPageWithRetry } from "@shivaedev/admin/jobs/PageWithRetry.ts";
212
232
 
213
- const JobsPage = jobsPageWithRetry({ name: "mail", schema: MailPayload });
214
- const Admin = adminRegistry(JobsPage);
215
- const registration = registerAdmin(Admin, {
216
- jobs: jobsHandlersWithRetry(JobsPage, JobsService),
217
- });
218
- const inspection = Layer.effect(
219
- PgBossInspection,
220
- Effect.flatMap(JobsService, (jobs) => jobs.inspection()),
221
- );
222
- const handlers = registration.handlers.pipe(Layer.provide(inspection));
233
+ const registration = registerAdmin(adminRegistry(JobsPageWithRetry), { jobs: moduleHandlers(JobsWithRetry) });
234
+ const handlers = registration.handlers.pipe(Layer.provide(pgBossQueues(JobsService, Mail)));
223
235
  ```
224
236
 
225
- This variant adds `admin.jobs.retry`, taking `{ queue, id }` and returning void. It requires `ReadJobs` (`jobs.read`) through the page middleware and `RetryJobs` (`jobs.retry`) from `@shivaedev/admin/permissions.ts` in the handler. A caller with only `jobs.read` receives `Forbidden` and the job stays failed. The handler uses the jobs package's existing retry for a failed job in a declared queue. Missing jobs and jobs in other states fail with `JobsNotFailed`; unregistered queue names, including dead-letter queues, fail with `JobsQueueUnregistered`. A dead-letter copy's id cannot retry its original.
237
+ This variant adds `admin.jobs.retry`, taking `{ queue, id }` and returning void. It requires `ReadJobs` (`jobs.read`) through the page middleware and `RetryJobs` (`jobs.retry`) from `@shivaedev/admin/permissions.ts` in the operation. A caller with only `jobs.read` receives `Forbidden` and the job stays failed. The operation uses the jobs package's existing retry for a failed job in a declared queue. Missing jobs and jobs in other states fail with `JobsNotFailed` from `@shivaedev/admin/jobs/NotFailed.ts`; unregistered queue names, including dead-letter queues, fail with `JobsQueueUnregistered`. A dead-letter copy's id cannot retry its original.
226
238
 
227
239
  A successful bound retry invalidates health, the affected queue's counts and both listings, and the original job's detail. Health retains the runtime monitor's refresh timing.
228
240
 
229
241
  ### Run a schedule now
230
242
 
231
- The retry-enabled page also exposes `admin.jobs.runScheduleNow`, taking `{ queue }` and returning `Option<string>` with the enqueued run ID. Declare a schedule as `{ name, label?, scheduleOptions?: { key? } }` without a payload Schema, or pass its `defineSchedule` definition. The handler calls the jobs service's `runScheduleNow` and requires the same `ReadJobs` and `RetryJobs` permissions as retry. It rejects queues and schedules omitted from the page with `JobsQueueUnregistered`. The schedule's normal handler processes the run and its timetable stays unchanged.
243
+ The retry-enabled page also exposes `admin.jobs.runScheduleNow`, taking `{ queue }` and returning `Option<string>` with the enqueued run ID. Declare a schedule as `{ name, label?, scheduleOptions?: { key? } }` without a payload Schema, or pass its `defineSchedule` definition. The operation calls the jobs service's `runScheduleNow` and requires the same `ReadJobs` and `RetryJobs` permissions as retry. It rejects queues and schedules not passed to `pgBossQueues` with `JobsQueueUnregistered`. The schedule's normal handler processes the run and its timetable stays unchanged.
232
244
 
233
- Pass the page's schedule declarations and bound action to show **Run now** for a selected schedule:
245
+ Pass the schedule declarations and bound action to show **Run now** for a selected schedule:
234
246
 
235
247
  ```tsx
236
- <JobsView api={jobs} queues={JobsPage.queues} schedules={JobsPage.schedules} runScheduleNow={Client.runtime.fn(jobs.runScheduleNow.run)} />;
248
+ <JobsView api={jobs} queues={[Mail, Cleanup]} schedules={[Cleanup]} runScheduleNow={Client.runtime.fn(jobs.runScheduleNow.run)} />;
237
249
  ```
238
250
 
239
251
  ### Built-in Users page
240
252
 
241
- Call `usersPage(AppAccess)` from `@shivaedev/admin/users/page.ts` with the application's code-defined role set. Add the returned page to the same registry as Jobs and register `users: usersHandlers(UsersPage)` from `@shivaedev/admin/server/usersHandlers.ts`. The handlers require identity's `UserDirectory` service. Provide `betterAuthUserDirectory(AppAccess, authOptions)` from `@shivaedev/identity/server/better-auth/adapters/userDirectory.ts` with the same options used by `betterAuthMount`. Identity owns the PostgreSQL reads and role writes, including custom auth mappings. For example, `authOptions.user.modelName: "users"` makes the Users view open and page through `users`; mapped name, email, role and creation-time columns are used as well. The page reads identity's exported `userKeys.list` collection, so role changes refresh open user lists.
253
+ Add `UsersPage` from `@shivaedev/admin/users/Page.ts` to the same registry as Jobs and register `users: moduleHandlers(Users)`, with `Users` from `@shivaedev/admin/Users.ts`, the module behind the page, which is server code. The module requires identity's `UserDirectory` service. Provide `betterAuthUserDirectory(AppAccess, authOptions)` from `@shivaedev/identity/server/better-auth/adapters/userDirectory.ts` with the same options used by `betterAuthMount`. Identity owns the PostgreSQL reads and role writes, including custom auth mappings. For example, `authOptions.user.modelName: "users"` makes the Users view open and page through `users`; mapped name, email, role and creation-time columns are used as well. The page reads identity's exported `userKeys.list` collection, so role changes refresh open user lists.
242
254
 
243
255
  Each user stores one role string accepted by `AppAccess.Role`. Each role declares an explicit permission list in application code. The Users area assigns roles; it does not edit their grants.
244
256
 
@@ -255,15 +267,15 @@ const changeRole = Client.runtime.fn(users.changeRole.run);
255
267
 
256
268
  `admin.users.list` takes `{ limit, cursor? }` (1–100 users) and returns `{ users, next, canChangeRoles }` ordered by user id. Each user has id, name, email, role and a UTC sign-up time. The page's operations and generated subscription require `ReadUsers` (`users.read`), enforced by `UsersPermission`. Registration installs this middleware using `SessionPolicy`.
257
269
 
258
- `admin.users.changeRole` takes `{ userId, role }`; its role Schema is the application's declared role union. The handler also requires `AssignRoles` (`roles.assign`) from `@shivaedev/identity/roles.ts`. The view shows a role select only to callers with that permission. Role writes use identity’s `assignRole` verb, serialize in a transaction and return `LastRoleAssigner` (from `@shivaedev/identity/roles.ts`) if replacing the final holder's role would remove `roles.assign`, regardless of the role's name. A missing user returns `NotFound`. Changes invalidate the list after commit and emit an Effect log with actor id, target id, role and timestamp.
270
+ `admin.users.changeRole` takes `{ userId, role }` with the role as a string, since one page serves every application. The user directory refuses a role the application does not declare with `AuthUnavailable`, before anything is written, so the role set passed to `betterAuthUserDirectory` decides which roles exist. The operation also requires `AssignRoles` (`roles.assign`) from `@shivaedev/identity/roles.ts`. The view shows a role select only to callers with that permission. Role writes use identity’s `assignRole` verb, serialize in a transaction and return `LastRoleAssigner` (from `@shivaedev/identity/roles.ts`) if replacing the final holder's role would remove `roles.assign`, regardless of the role's name. A missing user returns `NotFound`. Changes invalidate the list after commit and emit an Effect log with actor id, target id, role and timestamp.
259
271
 
260
- Applications can call `listUsers(input)` and `changeUserRole(input)` from `@shivaedev/admin/server/users.ts` on the server. Both require `UserDirectory` from the Effect environment. These enforce their respective domain permissions using `SessionUser`. Decode untrusted role input with `AppAccess.Role` before calling `changeUserRole` directly; native RPC performs that decode at the contract boundary. Identity resolves the caller's stored role through the session policy.
272
+ Applications can call `listUsers(input)` and `changeUserRole(input)` from `@shivaedev/admin/server/users.ts` on the server. Both require `UserDirectory` from the Effect environment. These enforce their respective domain permissions using `SessionUser`. Identity resolves the caller's stored role through the session policy.
261
273
 
262
274
  Keep Better Auth cookie caching disabled so requests see current permissions. Route role writes through `UserDirectory.assignRole` to retain the final-assigner policy. Keep Better Auth's `/admin/set-role`, `/admin/update-user` and `/admin/create-user` browser endpoints disabled because they write roles outside that policy. Better Auth's server-side APIs stay available for trusted code such as a bootstrap command.
263
275
 
264
276
  ### Built-in Sessions page
265
277
 
266
- Add `SessionsPage` from `@shivaedev/admin/sessions/Page.ts` to the admin registry and register `sessions: sessionsHandlers` from `@shivaedev/identity/server/better-auth/sessionsHandlers.ts`. Registration installs this middleware using `SessionPolicy`. The page uses identity's `identity.sessions` contract and `sessions.manage` permission.
278
+ Add `SessionsPage` from `@shivaedev/admin/sessions/Page.ts` to the admin registry and register `sessions: moduleHandlers(Sessions)`, with `moduleHandlers` from `@shivaedev/contract/moduleHandlers.ts` and `Sessions` from `@shivaedev/identity/Sessions.ts`. Registration installs this middleware using `SessionPolicy`. The page uses identity's `identity.sessions` contract and `sessions.manage` permission.
267
279
 
268
280
  ```tsx
269
281
  import { SessionsView } from "@shivaedev/admin/client/adapters/SessionsView.ts";
@@ -289,6 +301,6 @@ The view lists signed-in sessions with the user's name and email, started, last
289
301
 
290
302
  Install `@shivaedev/admin` with its required `effect` peer. Registry, contract and guard consumers need no React stack. To use the optional default views, also install the optional peers `react`, `@effect/atom-react` and `@shivaedev/react`. The package has no root entry; import the module that defines the name.
291
303
 
292
- Page declarations and the registry are browser-safe and add no transport. Server registration lives under `/server`, and the optional default Jobs, Users and Sessions views under `/client/adapters` use React. Applications own route composition and styling.
304
+ Page declarations and the registry are browser-safe and add no transport. Server registration lives under `/server`, and modules built with `defineModule`, such as `Users.ts`, are server code whose browser contracts are in `/generated`. The package's build writes `src/generated` and `dist/generated` before compiling, so the published archive holds them although the repository does not commit them. The optional default Jobs, Users and Sessions views under `/client/adapters` use React. Applications own route composition and styling.
293
305
 
294
306
  This package declares the permission middleware and does not resolve sessions. `permissionLayer` from `@shivaedev/identity/server/permissionLayer.ts` resolves each request's session through the session policy the application supplies, then checks the page's permission.
package/dist/Jobs.d.ts ADDED
@@ -0,0 +1,71 @@
1
+ import { JobsPermission } from "#permissions.ts";
2
+ import { RegisteredQueues } from "#server/RegisteredQueues.ts";
3
+ export declare const Jobs: import("@shivaedev/contract/defineModule.ts").Module<"admin.jobs", readonly [import("@shivaedev/contract/servedOperation.ts").ServedQuery<"health", import("effect/Schema").Void, import("effect/Schema").Struct<{
4
+ readonly activeTotal: import("effect/Schema").Number;
5
+ readonly deadLetteredTotal: import("effect/Schema").Number;
6
+ readonly failedTotal: import("effect/Schema").Number;
7
+ readonly jobs: import("effect/Schema").$Array<import("effect/Schema").Struct<{
8
+ readonly activeCount: import("effect/Schema").Number;
9
+ readonly deadLetteredCount: import("effect/Schema").Number;
10
+ readonly failedCount: import("effect/Schema").Number;
11
+ readonly name: import("effect/Schema").String;
12
+ readonly queuedCount: import("effect/Schema").Number;
13
+ readonly readyCount: import("effect/Schema").Number;
14
+ }>>;
15
+ readonly queuedTotal: import("effect/Schema").Number;
16
+ readonly readyTotal: import("effect/Schema").Number;
17
+ }>, {
18
+ readonly InternalServerError: typeof import("@shivaedev/errors/taxonomy.ts").InternalServerError;
19
+ readonly ServiceUnavailable: typeof import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable;
20
+ readonly JobsUnavailable: typeof import("./jobs/schemas.ts").JobsUnavailable;
21
+ }, never, never, import("effect/Effect").Effect<import("@shivaedev/jobs/server/health.ts").JobsHealth, import("./jobs/schemas.ts").JobsUnavailable, RegisteredQueues>>, import("@shivaedev/contract/servedOperation.ts").ServedQuery<"counts", import("effect/Schema").Struct<{
22
+ queue: import("effect/Schema").String;
23
+ }>, import("effect/Schema").Struct<{
24
+ readonly activeCount: import("effect/Schema").Number;
25
+ readonly failedCount: import("effect/Schema").Number;
26
+ readonly queuedCount: import("effect/Schema").Number;
27
+ readonly totalCount: import("effect/Schema").Number;
28
+ }>, {
29
+ readonly InternalServerError: typeof import("@shivaedev/errors/taxonomy.ts").InternalServerError;
30
+ readonly ServiceUnavailable: typeof import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable;
31
+ readonly JobsQueueUnregistered: typeof import("./jobs/schemas.ts").JobsQueueUnregistered;
32
+ readonly JobsUnavailable: typeof import("./jobs/schemas.ts").JobsUnavailable;
33
+ }, never, never, import("effect/Effect").Effect<import("@shivaedev/jobs/server/health.ts").QueueCounts, import("./jobs/schemas.ts").JobsQueueUnregistered | import("./jobs/schemas.ts").JobsUnavailable, RegisteredQueues>>, import("@shivaedev/contract/servedOperation.ts").ServedQuery<"failed", import("effect/Schema").Struct<{
34
+ cursor: import("effect/Schema").optionalKey<import("effect/Schema").String>;
35
+ limit: import("effect/Schema").Number;
36
+ queue: import("effect/Schema").String;
37
+ }>, import("effect/Schema").Struct<{
38
+ readonly jobs: import("effect/Schema").$Array<typeof import("./jobs/Row.ts").JobsRow>;
39
+ readonly next: import("effect/Schema").Option<import("effect/Schema").String>;
40
+ }>, {
41
+ readonly InternalServerError: typeof import("@shivaedev/errors/taxonomy.ts").InternalServerError;
42
+ readonly ServiceUnavailable: typeof import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable;
43
+ readonly BadRequest: typeof import("@shivaedev/errors/taxonomy.ts").BadRequest;
44
+ readonly JobsPayloadInvalid: typeof import("./jobs/schemas.ts").JobsPayloadInvalid;
45
+ readonly JobsQueueUnregistered: typeof import("./jobs/schemas.ts").JobsQueueUnregistered;
46
+ readonly JobsUnavailable: typeof import("./jobs/schemas.ts").JobsUnavailable;
47
+ }, never, never, import("effect/Effect").Effect<import("@shivaedev/jobs/server/health.ts").JobPage<import("./jobs/Row.ts").JobsRow>, import("@shivaedev/errors/taxonomy.ts").BadRequest | import("./jobs/schemas.ts").JobsPayloadInvalid | (import("./jobs/schemas.ts").JobsQueueUnregistered | import("./jobs/schemas.ts").JobsUnavailable), RegisteredQueues>>, import("@shivaedev/contract/servedOperation.ts").ServedQuery<"deadLettered", import("effect/Schema").Struct<{
48
+ cursor: import("effect/Schema").optionalKey<import("effect/Schema").String>;
49
+ limit: import("effect/Schema").Number;
50
+ queue: import("effect/Schema").String;
51
+ }>, import("effect/Schema").Struct<{
52
+ readonly jobs: import("effect/Schema").$Array<typeof import("./jobs/DeadLetter.ts").JobsDeadLetter>;
53
+ readonly next: import("effect/Schema").Option<import("effect/Schema").String>;
54
+ }>, {
55
+ readonly InternalServerError: typeof import("@shivaedev/errors/taxonomy.ts").InternalServerError;
56
+ readonly ServiceUnavailable: typeof import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable;
57
+ readonly BadRequest: typeof import("@shivaedev/errors/taxonomy.ts").BadRequest;
58
+ readonly JobsPayloadInvalid: typeof import("./jobs/schemas.ts").JobsPayloadInvalid;
59
+ readonly JobsQueueUnregistered: typeof import("./jobs/schemas.ts").JobsQueueUnregistered;
60
+ readonly JobsUnavailable: typeof import("./jobs/schemas.ts").JobsUnavailable;
61
+ }, never, never, import("effect/Effect").Effect<import("@shivaedev/jobs/server/health.ts").JobPage<import("./jobs/DeadLetter.ts").JobsDeadLetter>, import("@shivaedev/errors/taxonomy.ts").BadRequest | import("./jobs/schemas.ts").JobsPayloadInvalid | (import("./jobs/schemas.ts").JobsQueueUnregistered | import("./jobs/schemas.ts").JobsUnavailable), RegisteredQueues>>, import("@shivaedev/contract/servedOperation.ts").ServedQuery<"job", import("effect/Schema").Struct<{
62
+ id: import("effect/Schema").String;
63
+ queue: import("effect/Schema").String;
64
+ }>, import("effect/Schema").Option<typeof import("./jobs/Row.ts").JobsRow>, {
65
+ readonly InternalServerError: typeof import("@shivaedev/errors/taxonomy.ts").InternalServerError;
66
+ readonly ServiceUnavailable: typeof import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable;
67
+ readonly JobsPayloadInvalid: typeof import("./jobs/schemas.ts").JobsPayloadInvalid;
68
+ readonly JobsQueueUnregistered: typeof import("./jobs/schemas.ts").JobsQueueUnregistered;
69
+ readonly JobsUnavailable: typeof import("./jobs/schemas.ts").JobsUnavailable;
70
+ }, never, never, import("effect/Effect").Effect<import("effect/Option").Option<import("./jobs/Row.ts").JobsRow>, import("./jobs/schemas.ts").JobsPayloadInvalid | (import("./jobs/schemas.ts").JobsQueueUnregistered | import("./jobs/schemas.ts").JobsUnavailable), RegisteredQueues>>] & readonly import("@shivaedev/contract/defineModule.ts").ModuleOperation[], readonly [typeof RegisteredQueues], typeof JobsPermission, undefined, undefined>;
71
+ //# sourceMappingURL=Jobs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Jobs.d.ts","sourceRoot":"","sources":["../src/Jobs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qbAMf,CAAC"}
package/dist/Jobs.js ADDED
@@ -0,0 +1,13 @@
1
+ import { defineModule } from "@shivaedev/contract/defineModule.ts";
2
+ import { adminJobsWire } from "#generated/Jobs.ts";
3
+ import { JobsPermission } from "#permissions.ts";
4
+ import { Counts, DeadLettered, Detail, Failed, Health } from "#server/jobsReads.ts";
5
+ import { RegisteredQueues } from "#server/RegisteredQueues.ts";
6
+ export const Jobs = defineModule({
7
+ middleware: JobsPermission,
8
+ name: "admin.jobs",
9
+ operations: [Health, Counts, Failed, DeadLettered, Detail],
10
+ requires: [RegisteredQueues],
11
+ wire: adminJobsWire,
12
+ });
13
+ //# sourceMappingURL=Jobs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Jobs.js","sourceRoot":"","sources":["../src/Jobs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,MAAM,CAAC,MAAM,IAAI,GAAG,YAAY,CAAC;IAChC,UAAU,EAAE,cAAc;IAC1B,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,CAAC;IAC1D,QAAQ,EAAE,CAAC,gBAAgB,CAAC;IAC5B,IAAI,EAAE,aAAa;CACnB,CAAC,CAAC"}
@@ -0,0 +1,92 @@
1
+ import { Schema } from "effect";
2
+ import { SessionUser } from "@shivaedev/identity/identity.ts";
3
+ import { JobsPermission } from "#permissions.ts";
4
+ import { RegisteredQueues } from "#server/RegisteredQueues.ts";
5
+ export declare const JobsWithRetry: import("@shivaedev/contract/defineModule.ts").Module<"admin.jobs", readonly [import("@shivaedev/contract/servedOperation.ts").ServedQuery<"health", Schema.Void, Schema.Struct<{
6
+ readonly activeTotal: Schema.Number;
7
+ readonly deadLetteredTotal: Schema.Number;
8
+ readonly failedTotal: Schema.Number;
9
+ readonly jobs: Schema.$Array<Schema.Struct<{
10
+ readonly activeCount: Schema.Number;
11
+ readonly deadLetteredCount: Schema.Number;
12
+ readonly failedCount: Schema.Number;
13
+ readonly name: Schema.String;
14
+ readonly queuedCount: Schema.Number;
15
+ readonly readyCount: Schema.Number;
16
+ }>>;
17
+ readonly queuedTotal: Schema.Number;
18
+ readonly readyTotal: Schema.Number;
19
+ }>, {
20
+ readonly InternalServerError: typeof import("@shivaedev/errors/taxonomy.ts").InternalServerError;
21
+ readonly ServiceUnavailable: typeof import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable;
22
+ readonly JobsUnavailable: typeof import("./jobs/schemas.ts").JobsUnavailable;
23
+ }, never, never, import("effect/Effect").Effect<import("@shivaedev/jobs/server/health.ts").JobsHealth, import("./jobs/schemas.ts").JobsUnavailable, RegisteredQueues>>, import("@shivaedev/contract/servedOperation.ts").ServedQuery<"counts", Schema.Struct<{
24
+ queue: Schema.String;
25
+ }>, Schema.Struct<{
26
+ readonly activeCount: Schema.Number;
27
+ readonly failedCount: Schema.Number;
28
+ readonly queuedCount: Schema.Number;
29
+ readonly totalCount: Schema.Number;
30
+ }>, {
31
+ readonly InternalServerError: typeof import("@shivaedev/errors/taxonomy.ts").InternalServerError;
32
+ readonly ServiceUnavailable: typeof import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable;
33
+ readonly JobsQueueUnregistered: typeof import("./jobs/schemas.ts").JobsQueueUnregistered;
34
+ readonly JobsUnavailable: typeof import("./jobs/schemas.ts").JobsUnavailable;
35
+ }, never, never, import("effect/Effect").Effect<import("@shivaedev/jobs/server/health.ts").QueueCounts, import("./jobs/schemas.ts").JobsQueueUnregistered | import("./jobs/schemas.ts").JobsUnavailable, RegisteredQueues>>, import("@shivaedev/contract/servedOperation.ts").ServedQuery<"failed", Schema.Struct<{
36
+ cursor: Schema.optionalKey<Schema.String>;
37
+ limit: Schema.Number;
38
+ queue: Schema.String;
39
+ }>, Schema.Struct<{
40
+ readonly jobs: Schema.$Array<typeof import("./jobs/Row.ts").JobsRow>;
41
+ readonly next: Schema.Option<Schema.String>;
42
+ }>, {
43
+ readonly InternalServerError: typeof import("@shivaedev/errors/taxonomy.ts").InternalServerError;
44
+ readonly ServiceUnavailable: typeof import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable;
45
+ readonly BadRequest: typeof import("@shivaedev/errors/taxonomy.ts").BadRequest;
46
+ readonly JobsPayloadInvalid: typeof import("./jobs/schemas.ts").JobsPayloadInvalid;
47
+ readonly JobsQueueUnregistered: typeof import("./jobs/schemas.ts").JobsQueueUnregistered;
48
+ readonly JobsUnavailable: typeof import("./jobs/schemas.ts").JobsUnavailable;
49
+ }, never, never, import("effect/Effect").Effect<import("@shivaedev/jobs/server/health.ts").JobPage<import("./jobs/Row.ts").JobsRow>, import("@shivaedev/errors/taxonomy.ts").BadRequest | import("./jobs/schemas.ts").JobsPayloadInvalid | (import("./jobs/schemas.ts").JobsQueueUnregistered | import("./jobs/schemas.ts").JobsUnavailable), RegisteredQueues>>, import("@shivaedev/contract/servedOperation.ts").ServedQuery<"deadLettered", Schema.Struct<{
50
+ cursor: Schema.optionalKey<Schema.String>;
51
+ limit: Schema.Number;
52
+ queue: Schema.String;
53
+ }>, Schema.Struct<{
54
+ readonly jobs: Schema.$Array<typeof import("./jobs/DeadLetter.ts").JobsDeadLetter>;
55
+ readonly next: Schema.Option<Schema.String>;
56
+ }>, {
57
+ readonly InternalServerError: typeof import("@shivaedev/errors/taxonomy.ts").InternalServerError;
58
+ readonly ServiceUnavailable: typeof import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable;
59
+ readonly BadRequest: typeof import("@shivaedev/errors/taxonomy.ts").BadRequest;
60
+ readonly JobsPayloadInvalid: typeof import("./jobs/schemas.ts").JobsPayloadInvalid;
61
+ readonly JobsQueueUnregistered: typeof import("./jobs/schemas.ts").JobsQueueUnregistered;
62
+ readonly JobsUnavailable: typeof import("./jobs/schemas.ts").JobsUnavailable;
63
+ }, never, never, import("effect/Effect").Effect<import("@shivaedev/jobs/server/health.ts").JobPage<import("./jobs/DeadLetter.ts").JobsDeadLetter>, import("@shivaedev/errors/taxonomy.ts").BadRequest | import("./jobs/schemas.ts").JobsPayloadInvalid | (import("./jobs/schemas.ts").JobsQueueUnregistered | import("./jobs/schemas.ts").JobsUnavailable), RegisteredQueues>>, import("@shivaedev/contract/servedOperation.ts").ServedQuery<"job", Schema.Struct<{
64
+ id: Schema.String;
65
+ queue: Schema.String;
66
+ }>, Schema.Option<typeof import("./jobs/Row.ts").JobsRow>, {
67
+ readonly InternalServerError: typeof import("@shivaedev/errors/taxonomy.ts").InternalServerError;
68
+ readonly ServiceUnavailable: typeof import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable;
69
+ readonly JobsPayloadInvalid: typeof import("./jobs/schemas.ts").JobsPayloadInvalid;
70
+ readonly JobsQueueUnregistered: typeof import("./jobs/schemas.ts").JobsQueueUnregistered;
71
+ readonly JobsUnavailable: typeof import("./jobs/schemas.ts").JobsUnavailable;
72
+ }, never, never, import("effect/Effect").Effect<import("effect/Option").Option<import("./jobs/Row.ts").JobsRow>, import("./jobs/schemas.ts").JobsPayloadInvalid | (import("./jobs/schemas.ts").JobsQueueUnregistered | import("./jobs/schemas.ts").JobsUnavailable), RegisteredQueues>>, import("@shivaedev/contract/servedOperation.ts").ServedCommand<"retry", Schema.Struct<{
73
+ id: Schema.String;
74
+ queue: Schema.String;
75
+ }>, Schema.Void, {
76
+ readonly InternalServerError: typeof import("@shivaedev/errors/taxonomy.ts").InternalServerError;
77
+ readonly ServiceUnavailable: typeof import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable;
78
+ readonly Forbidden: typeof import("@shivaedev/errors/taxonomy.ts").Forbidden;
79
+ readonly JobsNotFailed: typeof import("./jobs/NotFailed.ts").JobsNotFailed;
80
+ readonly JobsPayloadInvalid: typeof import("./jobs/schemas.ts").JobsPayloadInvalid;
81
+ readonly JobsQueueUnregistered: typeof import("./jobs/schemas.ts").JobsQueueUnregistered;
82
+ readonly JobsUnavailable: typeof import("./jobs/schemas.ts").JobsUnavailable;
83
+ }, import("effect/Effect").Effect<void, import("@shivaedev/errors/taxonomy.ts").Forbidden | import("./jobs/NotFailed.ts").JobsNotFailed | import("./jobs/schemas.ts").JobsPayloadInvalid | (import("./jobs/schemas.ts").JobsQueueUnregistered | import("./jobs/schemas.ts").JobsUnavailable), RegisteredQueues | SessionUser>>, import("@shivaedev/contract/servedOperation.ts").ServedCommand<"runScheduleNow", Schema.Struct<{
84
+ queue: Schema.String;
85
+ }>, Schema.Option<Schema.String>, {
86
+ readonly InternalServerError: typeof import("@shivaedev/errors/taxonomy.ts").InternalServerError;
87
+ readonly ServiceUnavailable: typeof import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable;
88
+ readonly Forbidden: typeof import("@shivaedev/errors/taxonomy.ts").Forbidden;
89
+ readonly JobsQueueUnregistered: typeof import("./jobs/schemas.ts").JobsQueueUnregistered;
90
+ readonly JobsUnavailable: typeof import("./jobs/schemas.ts").JobsUnavailable;
91
+ }, import("effect/Effect").Effect<import("effect/Option").Option<string>, import("@shivaedev/errors/taxonomy.ts").Forbidden | (import("./jobs/schemas.ts").JobsQueueUnregistered | import("./jobs/schemas.ts").JobsUnavailable), RegisteredQueues | SessionUser>>] & readonly import("@shivaedev/contract/defineModule.ts").ModuleOperation[], readonly [typeof RegisteredQueues], typeof JobsPermission, undefined, undefined>;
92
+ //# sourceMappingURL=JobsWithRetry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JobsWithRetry.d.ts","sourceRoot":"","sources":["../src/JobsWithRetry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIhC,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAG9D,OAAO,EAAE,cAAc,EAAa,MAAM,iBAAiB,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AA0B/D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+ZAMxB,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { Schema } from "effect";
2
+ import { requirePermission } from "@shivaedev/access/requirePermission.ts";
3
+ import { defineModule } from "@shivaedev/contract/defineModule.ts";
4
+ import { command } from "@shivaedev/contract/operation.ts";
5
+ import { SessionUser } from "@shivaedev/identity/identity.ts";
6
+ import { adminJobsWire } from "#generated/JobsWithRetry.ts";
7
+ import { jobsKeys } from "#jobs/keys.ts";
8
+ import { JobsPermission, RetryJobs } from "#permissions.ts";
9
+ import { Counts, DeadLettered, Detail, Failed, Health } from "#server/jobsReads.ts";
10
+ import { RegisteredQueues } from "#server/RegisteredQueues.ts";
11
+ const Retry = command("retry", {
12
+ invalidates: ({ queue, id }) => [
13
+ jobsKeys.health.list,
14
+ jobsKeys.counts.item(queue),
15
+ jobsKeys.failed.item(queue),
16
+ jobsKeys.deadLettered.item(queue),
17
+ jobsKeys.job(queue).item(id),
18
+ ],
19
+ payload: { id: Schema.String, queue: Schema.String },
20
+ *run({ id, queue }) {
21
+ yield* requirePermission(yield* SessionUser, RetryJobs);
22
+ yield* (yield* RegisteredQueues).retry(queue, id);
23
+ },
24
+ });
25
+ const RunScheduleNow = command("runScheduleNow", {
26
+ invalidates: ({ queue }) => [jobsKeys.health.list, jobsKeys.counts.item(queue), jobsKeys.failed.item(queue), jobsKeys.deadLettered.item(queue)],
27
+ payload: { queue: Schema.String },
28
+ *run({ queue }) {
29
+ yield* requirePermission(yield* SessionUser, RetryJobs);
30
+ return yield* (yield* RegisteredQueues).runScheduleNow(queue);
31
+ },
32
+ });
33
+ export const JobsWithRetry = defineModule({
34
+ middleware: JobsPermission,
35
+ name: "admin.jobs",
36
+ operations: [Health, Counts, Failed, DeadLettered, Detail, Retry, RunScheduleNow],
37
+ requires: [RegisteredQueues],
38
+ wire: adminJobsWire,
39
+ });
40
+ //# sourceMappingURL=JobsWithRetry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JobsWithRetry.js","sourceRoot":"","sources":["../src/JobsWithRetry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,EAAE;IAC9B,WAAW,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;QAC/B,QAAQ,CAAC,MAAM,CAAC,IAAI;QACpB,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;QAC3B,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;QAC3B,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC;QACjC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;KAC5B;IACD,OAAO,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE;IACpD,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE;QACjB,KAAK,CAAC,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;QACxD,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,gBAAgB,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACnD,CAAC;CACD,CAAC,CAAC;AAEH,MAAM,cAAc,GAAG,OAAO,CAAC,gBAAgB,EAAE;IAChD,WAAW,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/I,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE;IACjC,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE;QACb,KAAK,CAAC,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;QACxD,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,gBAAgB,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC/D,CAAC;CACD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAC;IACzC,UAAU,EAAE,cAAc;IAC1B,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,CAAC;IACjF,QAAQ,EAAE,CAAC,gBAAgB,CAAC;IAC5B,IAAI,EAAE,aAAa;CACnB,CAAC,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { Schema } from "effect";
2
+ import { SessionUser } from "@shivaedev/identity/identity.ts";
3
+ import { UserDirectory } from "@shivaedev/identity/server/UserDirectory.ts";
4
+ import { UsersPermission } from "#permissions.ts";
5
+ import type { UsersList } from "#users/List.ts";
6
+ export declare const Users: import("@shivaedev/contract/defineModule.ts").Module<"admin.users", readonly [import("@shivaedev/contract/servedOperation.ts").ServedQuery<"list", Schema.Struct<{
7
+ readonly cursor: Schema.optionalKey<Schema.String>;
8
+ readonly limit: Schema.Number;
9
+ }>, Schema.Struct<{
10
+ readonly next: Schema.Option<Schema.String>;
11
+ readonly users: Schema.$Array<Schema.Struct<{
12
+ readonly createdAt: Schema.DateTimeUtc;
13
+ readonly email: Schema.String;
14
+ readonly id: Schema.String;
15
+ readonly name: Schema.String;
16
+ readonly role: Schema.String;
17
+ }>>;
18
+ readonly canChangeRoles: Schema.Boolean;
19
+ }>, {
20
+ readonly InternalServerError: typeof import("@shivaedev/errors/taxonomy.ts").InternalServerError;
21
+ readonly ServiceUnavailable: typeof import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable;
22
+ readonly AuthUnavailable: typeof import("@shivaedev/errors/taxonomy.ts").AuthUnavailable;
23
+ readonly Forbidden: typeof import("@shivaedev/errors/taxonomy.ts").Forbidden;
24
+ }, never, never, import("effect/Effect").Effect<UsersList, import("@shivaedev/errors/taxonomy.ts").AuthUnavailable | import("@shivaedev/errors/taxonomy.ts").Forbidden, SessionUser | UserDirectory>>, import("@shivaedev/contract/servedOperation.ts").ServedCommand<"changeRole", Schema.Struct<{
25
+ role: Schema.String;
26
+ userId: Schema.String;
27
+ }>, Schema.Void, {
28
+ readonly InternalServerError: typeof import("@shivaedev/errors/taxonomy.ts").InternalServerError;
29
+ readonly ServiceUnavailable: typeof import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable;
30
+ readonly AuthUnavailable: typeof import("@shivaedev/errors/taxonomy.ts").AuthUnavailable;
31
+ readonly Forbidden: typeof import("@shivaedev/errors/taxonomy.ts").Forbidden;
32
+ readonly LastRoleAssigner: typeof import("@shivaedev/identity/roles.ts").LastRoleAssigner;
33
+ readonly NotFound: typeof import("@shivaedev/errors/taxonomy.ts").NotFound;
34
+ }, import("effect/Effect").Effect<void, import("@shivaedev/errors/taxonomy.ts").AuthUnavailable | import("@shivaedev/errors/taxonomy.ts").Forbidden | import("@shivaedev/identity/roles.ts").LastRoleAssigner | import("@shivaedev/errors/taxonomy.ts").NotFound, SessionUser | UserDirectory>>] & readonly import("@shivaedev/contract/defineModule.ts").ModuleOperation[], readonly [typeof UserDirectory], typeof UsersPermission, undefined, undefined>;
35
+ //# sourceMappingURL=Users.d.ts.map