@fabrika/iam 0.0.0-stage → 0.9.0-dev.26

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 (312) hide show
  1. package/fabrika.config.ts +267 -0
  2. package/migrations/0001_init.sql +316 -0
  3. package/migrations/0002_oauth.sql +38 -0
  4. package/migrations/0003_contract_apps.sql +11 -0
  5. package/migrations/0004_membership.sql +93 -0
  6. package/migrations/0005_workloads.sql +23 -0
  7. package/migrations/0006_membership_transport_keys.sql +16 -0
  8. package/migrations/0007_member_directory.sql +7 -0
  9. package/migrations/0008_durable_audit.sql +28 -0
  10. package/migrations/0009_member_lookups.sql +7 -0
  11. package/migrations/0010_workload_issues.sql +6 -0
  12. package/migrations/0011_app_presentation.sql +15 -0
  13. package/migrations/0012_external_principals.sql +10 -0
  14. package/migrations/0013_app_mail_templates.sql +14 -0
  15. package/migrations/0014_invitation_wording.sql +8 -0
  16. package/migrations/0015_app_schema_revisions.sql +15 -0
  17. package/migrations/0016_principal_grant_revision.sql +9 -0
  18. package/migrations/0017_app_sign_ins.sql +12 -0
  19. package/migrations/0018_app_members.sql +13 -0
  20. package/migrations/0019_app_mail_html.sql +7 -0
  21. package/migrations/0020_public_workloads.sql +34 -0
  22. package/migrations/0021_installation_brand.sql +19 -0
  23. package/migrations/0022_password_policy.sql +12 -0
  24. package/migrations/0023_terminals.sql +155 -0
  25. package/migrations/0024_app_terminals.sql +10 -0
  26. package/migrations/0025_terminal_completion.sql +10 -0
  27. package/migrations/0026_terminal_generation.sql +12 -0
  28. package/migrations/0027_application_exact_actions.sql +28 -0
  29. package/migrations/0028_oauth_client_assertions.sql +10 -0
  30. package/migrations/0029_role_via.sql +6 -0
  31. package/migrations/0030_membership_role_via.sql +12 -0
  32. package/migrations/0031_person_locale.sql +11 -0
  33. package/migrations-postgres/0001_init.sql +331 -0
  34. package/migrations-postgres/0002_oauth.sql +36 -0
  35. package/migrations-postgres/0003_contract_apps.sql +8 -0
  36. package/migrations-postgres/0004_membership.sql +92 -0
  37. package/migrations-postgres/0005_workloads.sql +18 -0
  38. package/migrations-postgres/0006_membership_transport_keys.sql +12 -0
  39. package/migrations-postgres/0007_member_directory.sql +7 -0
  40. package/migrations-postgres/0008_durable_audit.sql +8 -0
  41. package/migrations-postgres/0009_member_lookups.sql +7 -0
  42. package/migrations-postgres/0010_workload_issues.sql +6 -0
  43. package/migrations-postgres/0011_app_presentation.sql +15 -0
  44. package/migrations-postgres/0012_external_principals.sql +10 -0
  45. package/migrations-postgres/0013_app_mail_templates.sql +14 -0
  46. package/migrations-postgres/0014_invitation_wording.sql +8 -0
  47. package/migrations-postgres/0015_app_schema_revisions.sql +15 -0
  48. package/migrations-postgres/0016_principal_grant_revision.sql +9 -0
  49. package/migrations-postgres/0017_app_sign_ins.sql +12 -0
  50. package/migrations-postgres/0018_app_members.sql +13 -0
  51. package/migrations-postgres/0019_app_mail_html.sql +7 -0
  52. package/migrations-postgres/0020_public_workloads.sql +9 -0
  53. package/migrations-postgres/0021_installation_brand.sql +19 -0
  54. package/migrations-postgres/0022_password_policy.sql +12 -0
  55. package/migrations-postgres/0023_terminals.sql +70 -0
  56. package/migrations-postgres/0024_app_terminals.sql +10 -0
  57. package/migrations-postgres/0025_terminal_completion.sql +10 -0
  58. package/migrations-postgres/0026_terminal_generation.sql +12 -0
  59. package/migrations-postgres/0027_application_exact_actions.sql +28 -0
  60. package/migrations-postgres/0028_oauth_client_assertions.sql +9 -0
  61. package/migrations-postgres/0029_role_via.sql +4 -0
  62. package/migrations-postgres/0030_membership_role_via.sql +7 -0
  63. package/migrations-postgres/0031_person_locale.sql +11 -0
  64. package/package.json +70 -5
  65. package/src/admin/access.ts +47 -0
  66. package/src/admin/api-keys.ts +280 -0
  67. package/src/admin/app-people.ts +209 -0
  68. package/src/admin/app-schema.ts +308 -0
  69. package/src/admin/audit.ts +81 -0
  70. package/src/admin/brand.ts +54 -0
  71. package/src/admin/connections.ts +48 -0
  72. package/src/admin/context.ts +70 -0
  73. package/src/admin/grant-support.ts +192 -0
  74. package/src/admin/grants.ts +189 -0
  75. package/src/admin/handlers.ts +102 -0
  76. package/src/admin/http.ts +24 -0
  77. package/src/admin/membership-keys.ts +38 -0
  78. package/src/admin/pagination.ts +28 -0
  79. package/src/admin/password-policy.ts +48 -0
  80. package/src/admin/passwords.ts +78 -0
  81. package/src/admin/policies.ts +136 -0
  82. package/src/admin/principals.ts +226 -0
  83. package/src/admin/router.ts +291 -0
  84. package/src/admin/rpc.ts +387 -0
  85. package/src/admin/sessions.ts +115 -0
  86. package/src/admin/share-links.ts +127 -0
  87. package/src/admin/terminals.ts +115 -0
  88. package/src/admin/user-admin.ts +76 -0
  89. package/src/admin/workloads.ts +85 -0
  90. package/src/app-presentation.ts +178 -0
  91. package/src/app.ts +158 -0
  92. package/src/auth/cookies.ts +64 -0
  93. package/src/auth/failure.ts +25 -0
  94. package/src/auth/handoff.ts +136 -0
  95. package/src/auth/http.ts +88 -0
  96. package/src/auth/invitations.ts +220 -0
  97. package/src/auth/known-device.ts +44 -0
  98. package/src/auth/login.ts +162 -0
  99. package/src/auth/oidc-flight.ts +91 -0
  100. package/src/auth/oidc.ts +148 -0
  101. package/src/auth/password.ts +416 -0
  102. package/src/auth/routes.ts +108 -0
  103. package/src/auth/sessions.ts +249 -0
  104. package/src/auth/terminals.ts +284 -0
  105. package/src/auth.ts +193 -0
  106. package/src/binding-identity.ts +25 -0
  107. package/src/bounded-body.ts +35 -0
  108. package/src/catalog/cs.ts +147 -0
  109. package/src/catalog/en.ts +148 -0
  110. package/src/catalog/index.ts +122 -0
  111. package/src/catalog/uk.ts +164 -0
  112. package/src/client-address.ts +39 -0
  113. package/src/common-passwords.ts +37 -0
  114. package/src/contract-rules.ts +80 -0
  115. package/src/cron.ts +54 -0
  116. package/src/db.ts +128 -0
  117. package/src/delegation.ts +100 -0
  118. package/src/device-http.ts +39 -0
  119. package/src/device.ts +269 -0
  120. package/src/email-identity.ts +2 -0
  121. package/src/env.ts +132 -0
  122. package/src/handoff.ts +175 -0
  123. package/src/html.ts +4 -0
  124. package/src/human-admission.ts +40 -0
  125. package/src/identification.ts +185 -0
  126. package/src/index.ts +292 -0
  127. package/src/installation-brand.ts +82 -0
  128. package/src/issue.ts +265 -0
  129. package/src/json.ts +30 -0
  130. package/src/log.ts +26 -0
  131. package/src/membership-http.ts +135 -0
  132. package/src/membership.ts +1210 -0
  133. package/src/messages.ts +44 -0
  134. package/src/narrow-permissions.ts +26 -0
  135. package/src/node/browser-identity.ts +69 -0
  136. package/src/node/migrate.ts +52 -0
  137. package/src/node/prune.ts +34 -0
  138. package/src/node/runtime.ts +221 -0
  139. package/src/node/server.ts +104 -0
  140. package/src/oauth-client-auth.ts +93 -0
  141. package/src/oauth-client.ts +145 -0
  142. package/src/oauth-config.ts +72 -0
  143. package/src/oauth-http.ts +262 -0
  144. package/src/oauth.ts +272 -0
  145. package/src/oidc.ts +260 -0
  146. package/src/origin.ts +29 -0
  147. package/src/password-crypto.ts +148 -0
  148. package/src/password-db.ts +419 -0
  149. package/src/password-minimum.ts +44 -0
  150. package/src/password-pages.ts +397 -0
  151. package/src/password-policy.ts +79 -0
  152. package/src/password-service.ts +67 -0
  153. package/src/person-locale.ts +103 -0
  154. package/src/proxy-proof.ts +36 -0
  155. package/src/relay-mail.ts +64 -0
  156. package/src/repositories/app-schema.ts +550 -0
  157. package/src/repositories/audit.ts +405 -0
  158. package/src/repositories/brand.ts +66 -0
  159. package/src/repositories/credentials.ts +331 -0
  160. package/src/repositories/device.ts +137 -0
  161. package/src/repositories/grants.ts +404 -0
  162. package/src/repositories/handoff.ts +103 -0
  163. package/src/repositories/membership-transport.ts +49 -0
  164. package/src/repositories/membership.ts +875 -0
  165. package/src/repositories/oauth.ts +122 -0
  166. package/src/repositories/password-policy.ts +44 -0
  167. package/src/repositories/principals.ts +358 -0
  168. package/src/repositories/sessions.ts +339 -0
  169. package/src/repositories/sql.ts +23 -0
  170. package/src/repositories/terminals.ts +346 -0
  171. package/src/repositories/workloads.ts +134 -0
  172. package/src/request-id.ts +46 -0
  173. package/src/resolve.ts +396 -0
  174. package/src/retention.ts +34 -0
  175. package/src/roles.ts +54 -0
  176. package/src/rpc-http.ts +333 -0
  177. package/src/rpc-inputs.ts +110 -0
  178. package/src/rpc.ts +440 -0
  179. package/src/secret.ts +45 -0
  180. package/src/service.ts +59 -0
  181. package/src/services.ts +199 -0
  182. package/src/signing.ts +260 -0
  183. package/src/stored-chain.ts +23 -0
  184. package/src/stored-permissions.ts +34 -0
  185. package/src/terminals.ts +15 -0
  186. package/src/tokens.ts +506 -0
  187. package/src/workload-token.ts +130 -0
  188. package/types/fabrika.config.d.ts +11 -0
  189. package/types/src/admin/access.d.ts +19 -0
  190. package/types/src/admin/api-keys.d.ts +26 -0
  191. package/types/src/admin/app-people.d.ts +8 -0
  192. package/types/src/admin/app-schema.d.ts +32 -0
  193. package/types/src/admin/audit.d.ts +10 -0
  194. package/types/src/admin/brand.d.ts +10 -0
  195. package/types/src/admin/connections.d.ts +5 -0
  196. package/types/src/admin/context.d.ts +46 -0
  197. package/types/src/admin/grant-support.d.ts +59 -0
  198. package/types/src/admin/grants.d.ts +8 -0
  199. package/types/src/admin/handlers.d.ts +82 -0
  200. package/types/src/admin/http.d.ts +9 -0
  201. package/types/src/admin/membership-keys.d.ts +8 -0
  202. package/types/src/admin/pagination.d.ts +5 -0
  203. package/types/src/admin/password-policy.d.ts +9 -0
  204. package/types/src/admin/passwords.d.ts +5 -0
  205. package/types/src/admin/policies.d.ts +15 -0
  206. package/types/src/admin/principals.d.ts +15 -0
  207. package/types/src/admin/router.d.ts +75 -0
  208. package/types/src/admin/rpc.d.ts +6 -0
  209. package/types/src/admin/sessions.d.ts +14 -0
  210. package/types/src/admin/share-links.d.ts +21 -0
  211. package/types/src/admin/terminals.d.ts +13 -0
  212. package/types/src/admin/user-admin.d.ts +30 -0
  213. package/types/src/admin/workloads.d.ts +5 -0
  214. package/types/src/app-presentation.d.ts +86 -0
  215. package/types/src/app.d.ts +62 -0
  216. package/types/src/auth/cookies.d.ts +29 -0
  217. package/types/src/auth/failure.d.ts +47 -0
  218. package/types/src/auth/handoff.d.ts +66 -0
  219. package/types/src/auth/http.d.ts +29 -0
  220. package/types/src/auth/invitations.d.ts +18 -0
  221. package/types/src/auth/known-device.d.ts +12 -0
  222. package/types/src/auth/login.d.ts +10 -0
  223. package/types/src/auth/oidc-flight.d.ts +39 -0
  224. package/types/src/auth/oidc.d.ts +7 -0
  225. package/types/src/auth/password.d.ts +7 -0
  226. package/types/src/auth/routes.d.ts +15 -0
  227. package/types/src/auth/sessions.d.ts +60 -0
  228. package/types/src/auth/terminals.d.ts +47 -0
  229. package/types/src/auth.d.ts +70 -0
  230. package/types/src/binding-identity.d.ts +12 -0
  231. package/types/src/bounded-body.d.ts +12 -0
  232. package/types/src/catalog/cs.d.ts +2 -0
  233. package/types/src/catalog/en.d.ts +2 -0
  234. package/types/src/catalog/index.d.ts +112 -0
  235. package/types/src/catalog/uk.d.ts +2 -0
  236. package/types/src/client-address.d.ts +31 -0
  237. package/types/src/common-passwords.d.ts +2 -0
  238. package/types/src/contract-rules.d.ts +25 -0
  239. package/types/src/cron.d.ts +15 -0
  240. package/types/src/db.d.ts +58 -0
  241. package/types/src/delegation.d.ts +38 -0
  242. package/types/src/device-http.d.ts +2 -0
  243. package/types/src/device.d.ts +11 -0
  244. package/types/src/email-identity.d.ts +1 -0
  245. package/types/src/env.d.ts +127 -0
  246. package/types/src/handoff.d.ts +57 -0
  247. package/types/src/html.d.ts +2 -0
  248. package/types/src/human-admission.d.ts +22 -0
  249. package/types/src/identification.d.ts +30 -0
  250. package/types/src/index.d.ts +62 -0
  251. package/types/src/installation-brand.d.ts +22 -0
  252. package/types/src/issue.d.ts +62 -0
  253. package/types/src/json.d.ts +15 -0
  254. package/types/src/log.d.ts +15 -0
  255. package/types/src/membership-http.d.ts +8 -0
  256. package/types/src/membership.d.ts +156 -0
  257. package/types/src/messages.d.ts +20 -0
  258. package/types/src/narrow-permissions.d.ts +7 -0
  259. package/types/src/node/browser-identity.d.ts +1 -0
  260. package/types/src/node/migrate.d.ts +4 -0
  261. package/types/src/node/prune.d.ts +1 -0
  262. package/types/src/node/runtime.d.ts +51 -0
  263. package/types/src/node/server.d.ts +5 -0
  264. package/types/src/oauth-client-auth.d.ts +26 -0
  265. package/types/src/oauth-client.d.ts +17 -0
  266. package/types/src/oauth-config.d.ts +16 -0
  267. package/types/src/oauth-http.d.ts +7 -0
  268. package/types/src/oauth.d.ts +51 -0
  269. package/types/src/oidc.d.ts +81 -0
  270. package/types/src/origin.d.ts +9 -0
  271. package/types/src/password-crypto.d.ts +37 -0
  272. package/types/src/password-db.d.ts +134 -0
  273. package/types/src/password-minimum.d.ts +23 -0
  274. package/types/src/password-pages.d.ts +143 -0
  275. package/types/src/password-policy.d.ts +19 -0
  276. package/types/src/password-service.d.ts +24 -0
  277. package/types/src/person-locale.d.ts +50 -0
  278. package/types/src/proxy-proof.d.ts +21 -0
  279. package/types/src/relay-mail.d.ts +25 -0
  280. package/types/src/repositories/app-schema.d.ts +244 -0
  281. package/types/src/repositories/audit.d.ts +187 -0
  282. package/types/src/repositories/brand.d.ts +41 -0
  283. package/types/src/repositories/credentials.d.ts +148 -0
  284. package/types/src/repositories/device.d.ts +50 -0
  285. package/types/src/repositories/grants.d.ts +177 -0
  286. package/types/src/repositories/handoff.d.ts +52 -0
  287. package/types/src/repositories/membership-transport.d.ts +31 -0
  288. package/types/src/repositories/membership.d.ts +273 -0
  289. package/types/src/repositories/oauth.d.ts +55 -0
  290. package/types/src/repositories/password-policy.d.ts +25 -0
  291. package/types/src/repositories/principals.d.ts +159 -0
  292. package/types/src/repositories/sessions.d.ts +150 -0
  293. package/types/src/repositories/sql.d.ts +13 -0
  294. package/types/src/repositories/terminals.d.ts +144 -0
  295. package/types/src/repositories/workloads.d.ts +61 -0
  296. package/types/src/request-id.d.ts +25 -0
  297. package/types/src/resolve.d.ts +118 -0
  298. package/types/src/retention.d.ts +18 -0
  299. package/types/src/roles.d.ts +34 -0
  300. package/types/src/rpc-http.d.ts +53 -0
  301. package/types/src/rpc-inputs.d.ts +707 -0
  302. package/types/src/rpc.d.ts +4 -0
  303. package/types/src/secret.d.ts +21 -0
  304. package/types/src/service.d.ts +19 -0
  305. package/types/src/services.d.ts +72 -0
  306. package/types/src/signing.d.ts +72 -0
  307. package/types/src/stored-chain.d.ts +6 -0
  308. package/types/src/stored-permissions.d.ts +12 -0
  309. package/types/src/terminals.d.ts +7 -0
  310. package/types/src/tokens.d.ts +113 -0
  311. package/types/src/workload-token.d.ts +7 -0
  312. package/README.md +0 -3
@@ -0,0 +1,707 @@
1
+ import { z } from 'zod';
2
+ export declare const mintTokenSchema: z.ZodCatch<z.ZodObject<{
3
+ app: z.ZodString;
4
+ session: z.ZodNullable<z.ZodString>;
5
+ requestId: z.ZodString;
6
+ }, "strip", z.ZodTypeAny, {
7
+ app: string;
8
+ requestId: string;
9
+ session: string | null;
10
+ }, {
11
+ app: string;
12
+ requestId: string;
13
+ session: string | null;
14
+ }>>;
15
+ export declare const mintFromKeySchema: z.ZodCatch<z.ZodObject<{
16
+ app: z.ZodString;
17
+ key: z.ZodString;
18
+ requestId: z.ZodString;
19
+ }, "strip", z.ZodTypeAny, {
20
+ app: string;
21
+ key: string;
22
+ requestId: string;
23
+ }, {
24
+ app: string;
25
+ key: string;
26
+ requestId: string;
27
+ }>>;
28
+ export declare const exchangeAuthCodeSchema: z.ZodCatch<z.ZodObject<{
29
+ app: z.ZodString;
30
+ code: z.ZodString;
31
+ verifier: z.ZodString;
32
+ requestId: z.ZodString;
33
+ }, "strip", z.ZodTypeAny, {
34
+ code: string;
35
+ app: string;
36
+ requestId: string;
37
+ verifier: string;
38
+ }, {
39
+ code: string;
40
+ app: string;
41
+ requestId: string;
42
+ verifier: string;
43
+ }>>;
44
+ export declare const issueKeySchema: z.ZodCatch<z.ZodEffects<z.ZodObject<{
45
+ app: z.ZodString;
46
+ credential: z.ZodNullable<z.ZodString>;
47
+ requestId: z.ZodString;
48
+ service: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodObject<{
49
+ label: z.ZodString;
50
+ permissions: z.ZodArray<z.ZodString, "many">;
51
+ scope: z.ZodOptional<z.ZodNullable<z.ZodObject<{
52
+ type: z.ZodString;
53
+ value: z.ZodString;
54
+ }, "strip", z.ZodTypeAny, {
55
+ value: string;
56
+ type: string;
57
+ }, {
58
+ value: string;
59
+ type: string;
60
+ }>>>;
61
+ }, "strip", z.ZodTypeAny, {
62
+ label: string;
63
+ permissions: string[];
64
+ scope?: {
65
+ value: string;
66
+ type: string;
67
+ } | null | undefined;
68
+ }, {
69
+ label: string;
70
+ permissions: string[];
71
+ scope?: {
72
+ value: string;
73
+ type: string;
74
+ } | null | undefined;
75
+ }>, {
76
+ scope?: {
77
+ value: string;
78
+ type: string;
79
+ } | null | undefined;
80
+ label: string;
81
+ permissions: string[];
82
+ }, {
83
+ label: string;
84
+ permissions: string[];
85
+ scope?: {
86
+ value: string;
87
+ type: string;
88
+ } | null | undefined;
89
+ }>>>, {
90
+ scope?: {
91
+ value: string;
92
+ type: string;
93
+ } | null | undefined;
94
+ label: string;
95
+ permissions: string[];
96
+ } | undefined, {
97
+ label: string;
98
+ permissions: string[];
99
+ scope?: {
100
+ value: string;
101
+ type: string;
102
+ } | null | undefined;
103
+ } | null | undefined>;
104
+ principalId: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
105
+ permissions: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEffects<z.ZodObject<{
106
+ action: z.ZodString;
107
+ scope: z.ZodOptional<z.ZodNullable<z.ZodObject<{
108
+ type: z.ZodString;
109
+ value: z.ZodString;
110
+ }, "strip", z.ZodTypeAny, {
111
+ value: string;
112
+ type: string;
113
+ }, {
114
+ value: string;
115
+ type: string;
116
+ }>>>;
117
+ }, "strip", z.ZodTypeAny, {
118
+ action: string;
119
+ scope?: {
120
+ value: string;
121
+ type: string;
122
+ } | null | undefined;
123
+ }, {
124
+ action: string;
125
+ scope?: {
126
+ value: string;
127
+ type: string;
128
+ } | null | undefined;
129
+ }>, {
130
+ scope?: {
131
+ value: string;
132
+ type: string;
133
+ } | null | undefined;
134
+ action: string;
135
+ }, {
136
+ action: string;
137
+ scope?: {
138
+ value: string;
139
+ type: string;
140
+ } | null | undefined;
141
+ }>, "many">>>, {
142
+ scope?: {
143
+ value: string;
144
+ type: string;
145
+ } | null | undefined;
146
+ action: string;
147
+ }[] | undefined, {
148
+ action: string;
149
+ scope?: {
150
+ value: string;
151
+ type: string;
152
+ } | null | undefined;
153
+ }[] | null | undefined>;
154
+ label: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
155
+ expiresAt: z.ZodNumber;
156
+ }, "strip", z.ZodTypeAny, {
157
+ expiresAt: number;
158
+ app: string;
159
+ credential: string | null;
160
+ requestId: string;
161
+ service?: {
162
+ scope?: {
163
+ value: string;
164
+ type: string;
165
+ } | null | undefined;
166
+ label: string;
167
+ permissions: string[];
168
+ } | undefined;
169
+ label?: string | undefined;
170
+ permissions?: {
171
+ scope?: {
172
+ value: string;
173
+ type: string;
174
+ } | null | undefined;
175
+ action: string;
176
+ }[] | undefined;
177
+ principalId?: string | undefined;
178
+ }, {
179
+ expiresAt: number;
180
+ app: string;
181
+ credential: string | null;
182
+ requestId: string;
183
+ service?: {
184
+ label: string;
185
+ permissions: string[];
186
+ scope?: {
187
+ value: string;
188
+ type: string;
189
+ } | null | undefined;
190
+ } | null | undefined;
191
+ label?: string | null | undefined;
192
+ permissions?: {
193
+ action: string;
194
+ scope?: {
195
+ value: string;
196
+ type: string;
197
+ } | null | undefined;
198
+ }[] | null | undefined;
199
+ principalId?: string | null | undefined;
200
+ }>, {
201
+ expiresAt: number;
202
+ label?: string | undefined;
203
+ permissions?: {
204
+ scope?: {
205
+ value: string;
206
+ type: string;
207
+ } | null | undefined;
208
+ action: string;
209
+ }[] | undefined;
210
+ principalId?: string | undefined;
211
+ service?: {
212
+ scope?: {
213
+ value: string;
214
+ type: string;
215
+ } | null | undefined;
216
+ label: string;
217
+ permissions: string[];
218
+ } | undefined;
219
+ app: string;
220
+ credential: string | null;
221
+ requestId: string;
222
+ }, {
223
+ expiresAt: number;
224
+ app: string;
225
+ credential: string | null;
226
+ requestId: string;
227
+ service?: {
228
+ label: string;
229
+ permissions: string[];
230
+ scope?: {
231
+ value: string;
232
+ type: string;
233
+ } | null | undefined;
234
+ } | null | undefined;
235
+ label?: string | null | undefined;
236
+ permissions?: {
237
+ action: string;
238
+ scope?: {
239
+ value: string;
240
+ type: string;
241
+ } | null | undefined;
242
+ }[] | null | undefined;
243
+ principalId?: string | null | undefined;
244
+ }>>;
245
+ export declare const revokeKeySchema: z.ZodCatch<z.ZodObject<{
246
+ id: z.ZodString;
247
+ app: z.ZodString;
248
+ credential: z.ZodNullable<z.ZodString>;
249
+ requestId: z.ZodString;
250
+ }, "strip", z.ZodTypeAny, {
251
+ id: string;
252
+ app: string;
253
+ credential: string | null;
254
+ requestId: string;
255
+ }, {
256
+ id: string;
257
+ app: string;
258
+ credential: string | null;
259
+ requestId: string;
260
+ }>>;
261
+ export declare const listPrincipalsSchema: z.ZodCatch<z.ZodObject<{
262
+ app: z.ZodString;
263
+ credential: z.ZodNullable<z.ZodString>;
264
+ requestId: z.ZodString;
265
+ }, "strip", z.ZodTypeAny, {
266
+ app: string;
267
+ credential: string | null;
268
+ requestId: string;
269
+ }, {
270
+ app: string;
271
+ credential: string | null;
272
+ requestId: string;
273
+ }>>;
274
+ export declare const auditSchema: z.ZodCatch<z.ZodEffects<z.ZodObject<{
275
+ credentialId: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
276
+ resourceId: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
277
+ credential: z.ZodString;
278
+ requestId: z.ZodString;
279
+ principalId: z.ZodNullable<z.ZodString>;
280
+ principalLabel: z.ZodString;
281
+ action: z.ZodString;
282
+ resourceType: z.ZodString;
283
+ diff: z.ZodUnknown;
284
+ metadata: z.ZodUnknown;
285
+ }, "strip", z.ZodTypeAny, {
286
+ action: string;
287
+ principalId: string | null;
288
+ credential: string;
289
+ requestId: string;
290
+ resourceType: string;
291
+ principalLabel: string;
292
+ credentialId?: string | undefined;
293
+ metadata?: unknown;
294
+ diff?: unknown;
295
+ resourceId?: string | undefined;
296
+ }, {
297
+ action: string;
298
+ principalId: string | null;
299
+ credential: string;
300
+ requestId: string;
301
+ resourceType: string;
302
+ principalLabel: string;
303
+ credentialId?: string | null | undefined;
304
+ metadata?: unknown;
305
+ diff?: unknown;
306
+ resourceId?: string | null | undefined;
307
+ }>, {
308
+ metadata?: {} | null | undefined;
309
+ diff?: {} | null | undefined;
310
+ resourceId?: string | undefined;
311
+ credentialId?: string | undefined;
312
+ action: string;
313
+ principalId: string | null;
314
+ credential: string;
315
+ requestId: string;
316
+ resourceType: string;
317
+ principalLabel: string;
318
+ }, {
319
+ action: string;
320
+ principalId: string | null;
321
+ credential: string;
322
+ requestId: string;
323
+ resourceType: string;
324
+ principalLabel: string;
325
+ credentialId?: string | null | undefined;
326
+ metadata?: unknown;
327
+ diff?: unknown;
328
+ resourceId?: string | null | undefined;
329
+ }>>;
330
+ export declare const requestDelegationSchema: z.ZodCatch<z.ZodObject<{
331
+ endpoint: z.ZodString;
332
+ app: z.ZodString;
333
+ credential: z.ZodNullable<z.ZodString>;
334
+ requestId: z.ZodString;
335
+ }, "strip", z.ZodTypeAny, {
336
+ app: string;
337
+ credential: string | null;
338
+ requestId: string;
339
+ endpoint: string;
340
+ }, {
341
+ app: string;
342
+ credential: string | null;
343
+ requestId: string;
344
+ endpoint: string;
345
+ }>>;
346
+ export declare const createScopeSchema: z.ZodCatch<z.ZodObject<{
347
+ delegation: z.ZodString;
348
+ dimension: z.ZodString;
349
+ app: z.ZodString;
350
+ credential: z.ZodNullable<z.ZodString>;
351
+ requestId: z.ZodString;
352
+ }, "strip", z.ZodTypeAny, {
353
+ app: string;
354
+ dimension: string;
355
+ credential: string | null;
356
+ requestId: string;
357
+ delegation: string;
358
+ }, {
359
+ app: string;
360
+ dimension: string;
361
+ credential: string | null;
362
+ requestId: string;
363
+ delegation: string;
364
+ }>>;
365
+ export declare const assignMemberSchema: z.ZodCatch<z.ZodObject<{
366
+ delegation: z.ZodString;
367
+ scope: z.ZodObject<{
368
+ type: z.ZodString;
369
+ value: z.ZodString;
370
+ }, "strip", z.ZodTypeAny, {
371
+ value: string;
372
+ type: string;
373
+ }, {
374
+ value: string;
375
+ type: string;
376
+ }>;
377
+ role: z.ZodString;
378
+ member: z.ZodUnion<[z.ZodObject<{
379
+ principalId: z.ZodString;
380
+ }, "strict", z.ZodTypeAny, {
381
+ principalId: string;
382
+ }, {
383
+ principalId: string;
384
+ }>, z.ZodObject<{
385
+ email: z.ZodString;
386
+ }, "strict", z.ZodTypeAny, {
387
+ email: string;
388
+ }, {
389
+ email: string;
390
+ }>]>;
391
+ invitation: z.ZodOptional<z.ZodObject<{
392
+ label: z.ZodOptional<z.ZodString>;
393
+ message: z.ZodOptional<z.ZodString>;
394
+ resend: z.ZodOptional<z.ZodBoolean>;
395
+ locale: z.ZodOptional<z.ZodEnum<["en", "cs", "uk"]>>;
396
+ }, "strict", z.ZodTypeAny, {
397
+ message?: string | undefined;
398
+ resend?: boolean | undefined;
399
+ locale?: "en" | "cs" | "uk" | undefined;
400
+ label?: string | undefined;
401
+ }, {
402
+ message?: string | undefined;
403
+ resend?: boolean | undefined;
404
+ locale?: "en" | "cs" | "uk" | undefined;
405
+ label?: string | undefined;
406
+ }>>;
407
+ app: z.ZodString;
408
+ credential: z.ZodNullable<z.ZodString>;
409
+ requestId: z.ZodString;
410
+ }, "strip", z.ZodTypeAny, {
411
+ app: string;
412
+ member: {
413
+ principalId: string;
414
+ } | {
415
+ email: string;
416
+ };
417
+ scope: {
418
+ value: string;
419
+ type: string;
420
+ };
421
+ credential: string | null;
422
+ requestId: string;
423
+ delegation: string;
424
+ role: string;
425
+ invitation?: {
426
+ message?: string | undefined;
427
+ resend?: boolean | undefined;
428
+ locale?: "en" | "cs" | "uk" | undefined;
429
+ label?: string | undefined;
430
+ } | undefined;
431
+ }, {
432
+ app: string;
433
+ member: {
434
+ principalId: string;
435
+ } | {
436
+ email: string;
437
+ };
438
+ scope: {
439
+ value: string;
440
+ type: string;
441
+ };
442
+ credential: string | null;
443
+ requestId: string;
444
+ delegation: string;
445
+ role: string;
446
+ invitation?: {
447
+ message?: string | undefined;
448
+ resend?: boolean | undefined;
449
+ locale?: "en" | "cs" | "uk" | undefined;
450
+ label?: string | undefined;
451
+ } | undefined;
452
+ }>>;
453
+ export declare const revokeMemberSchema: z.ZodCatch<z.ZodObject<{
454
+ delegation: z.ZodString;
455
+ scope: z.ZodObject<{
456
+ type: z.ZodString;
457
+ value: z.ZodString;
458
+ }, "strip", z.ZodTypeAny, {
459
+ value: string;
460
+ type: string;
461
+ }, {
462
+ value: string;
463
+ type: string;
464
+ }>;
465
+ member: z.ZodUnion<[z.ZodObject<{
466
+ principalId: z.ZodString;
467
+ role: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null, string | null | undefined>;
468
+ }, "strict", z.ZodTypeAny, {
469
+ principalId: string;
470
+ role: string | null;
471
+ }, {
472
+ principalId: string;
473
+ role?: string | null | undefined;
474
+ }>, z.ZodObject<{
475
+ invitationId: z.ZodString;
476
+ }, "strict", z.ZodTypeAny, {
477
+ invitationId: string;
478
+ }, {
479
+ invitationId: string;
480
+ }>]>;
481
+ app: z.ZodString;
482
+ credential: z.ZodNullable<z.ZodString>;
483
+ requestId: z.ZodString;
484
+ }, "strip", z.ZodTypeAny, {
485
+ app: string;
486
+ member: {
487
+ principalId: string;
488
+ role: string | null;
489
+ } | {
490
+ invitationId: string;
491
+ };
492
+ scope: {
493
+ value: string;
494
+ type: string;
495
+ };
496
+ credential: string | null;
497
+ requestId: string;
498
+ delegation: string;
499
+ }, {
500
+ app: string;
501
+ member: {
502
+ principalId: string;
503
+ role?: string | null | undefined;
504
+ } | {
505
+ invitationId: string;
506
+ };
507
+ scope: {
508
+ value: string;
509
+ type: string;
510
+ };
511
+ credential: string | null;
512
+ requestId: string;
513
+ delegation: string;
514
+ }>>;
515
+ export declare const listMembersSchema: z.ZodCatch<z.ZodObject<{
516
+ scope: z.ZodObject<{
517
+ type: z.ZodString;
518
+ value: z.ZodString;
519
+ }, "strip", z.ZodTypeAny, {
520
+ value: string;
521
+ type: string;
522
+ }, {
523
+ value: string;
524
+ type: string;
525
+ }>;
526
+ app: z.ZodString;
527
+ credential: z.ZodNullable<z.ZodString>;
528
+ requestId: z.ZodString;
529
+ }, "strip", z.ZodTypeAny, {
530
+ app: string;
531
+ scope: {
532
+ value: string;
533
+ type: string;
534
+ };
535
+ credential: string | null;
536
+ requestId: string;
537
+ }, {
538
+ app: string;
539
+ scope: {
540
+ value: string;
541
+ type: string;
542
+ };
543
+ credential: string | null;
544
+ requestId: string;
545
+ }>>;
546
+ export declare const listAppMembersSchema: z.ZodCatch<z.ZodObject<{
547
+ after: z.ZodOptional<z.ZodString>;
548
+ limit: z.ZodOptional<z.ZodNumber>;
549
+ app: z.ZodString;
550
+ credential: z.ZodNullable<z.ZodString>;
551
+ requestId: z.ZodString;
552
+ }, "strip", z.ZodTypeAny, {
553
+ app: string;
554
+ credential: string | null;
555
+ requestId: string;
556
+ limit?: number | undefined;
557
+ after?: string | undefined;
558
+ }, {
559
+ app: string;
560
+ credential: string | null;
561
+ requestId: string;
562
+ limit?: number | undefined;
563
+ after?: string | undefined;
564
+ }>>;
565
+ export declare const findMemberSchema: z.ZodCatch<z.ZodObject<{
566
+ scope: z.ZodObject<{
567
+ type: z.ZodString;
568
+ value: z.ZodString;
569
+ }, "strip", z.ZodTypeAny, {
570
+ value: string;
571
+ type: string;
572
+ }, {
573
+ value: string;
574
+ type: string;
575
+ }>;
576
+ principalId: z.ZodString;
577
+ action: z.ZodString;
578
+ app: z.ZodString;
579
+ credential: z.ZodNullable<z.ZodString>;
580
+ requestId: z.ZodString;
581
+ }, "strip", z.ZodTypeAny, {
582
+ app: string;
583
+ action: string;
584
+ scope: {
585
+ value: string;
586
+ type: string;
587
+ };
588
+ principalId: string;
589
+ credential: string | null;
590
+ requestId: string;
591
+ }, {
592
+ app: string;
593
+ action: string;
594
+ scope: {
595
+ value: string;
596
+ type: string;
597
+ };
598
+ principalId: string;
599
+ credential: string | null;
600
+ requestId: string;
601
+ }>>;
602
+ export declare const issueLinkSchema: z.ZodCatch<z.ZodObject<{
603
+ mount: z.ZodString;
604
+ chain: z.ZodArray<z.ZodObject<{
605
+ type: z.ZodString;
606
+ value: z.ZodString;
607
+ }, "strip", z.ZodTypeAny, {
608
+ value: string;
609
+ type: string;
610
+ }, {
611
+ value: string;
612
+ type: string;
613
+ }>, "many">;
614
+ days: z.ZodNumber;
615
+ app: z.ZodString;
616
+ credential: z.ZodNullable<z.ZodString>;
617
+ requestId: z.ZodString;
618
+ }, "strip", z.ZodTypeAny, {
619
+ app: string;
620
+ mount: string;
621
+ credential: string | null;
622
+ requestId: string;
623
+ chain: {
624
+ value: string;
625
+ type: string;
626
+ }[];
627
+ days: number;
628
+ }, {
629
+ app: string;
630
+ mount: string;
631
+ credential: string | null;
632
+ requestId: string;
633
+ chain: {
634
+ value: string;
635
+ type: string;
636
+ }[];
637
+ days: number;
638
+ }>>;
639
+ export declare const revokeLinkSchema: z.ZodCatch<z.ZodObject<{
640
+ id: z.ZodString;
641
+ app: z.ZodString;
642
+ credential: z.ZodNullable<z.ZodString>;
643
+ requestId: z.ZodString;
644
+ }, "strip", z.ZodTypeAny, {
645
+ id: string;
646
+ app: string;
647
+ credential: string | null;
648
+ requestId: string;
649
+ }, {
650
+ id: string;
651
+ app: string;
652
+ credential: string | null;
653
+ requestId: string;
654
+ }>>;
655
+ export declare const inspectIdentificationSchema: z.ZodCatch<z.ZodObject<{
656
+ id: z.ZodString;
657
+ app: z.ZodString;
658
+ credential: z.ZodNullable<z.ZodString>;
659
+ requestId: z.ZodString;
660
+ }, "strip", z.ZodTypeAny, {
661
+ id: string;
662
+ app: string;
663
+ credential: string | null;
664
+ requestId: string;
665
+ }, {
666
+ id: string;
667
+ app: string;
668
+ credential: string | null;
669
+ requestId: string;
670
+ }>>;
671
+ export declare const assertIdentitySchema: z.ZodCatch<z.ZodObject<{
672
+ id: z.ZodString;
673
+ principalId: z.ZodString;
674
+ app: z.ZodString;
675
+ credential: z.ZodNullable<z.ZodString>;
676
+ requestId: z.ZodString;
677
+ }, "strip", z.ZodTypeAny, {
678
+ id: string;
679
+ app: string;
680
+ principalId: string;
681
+ credential: string | null;
682
+ requestId: string;
683
+ }, {
684
+ id: string;
685
+ app: string;
686
+ principalId: string;
687
+ credential: string | null;
688
+ requestId: string;
689
+ }>>;
690
+ export declare const cancelIdentificationSchema: z.ZodCatch<z.ZodObject<{
691
+ id: z.ZodString;
692
+ app: z.ZodString;
693
+ credential: z.ZodNullable<z.ZodString>;
694
+ requestId: z.ZodString;
695
+ }, "strip", z.ZodTypeAny, {
696
+ id: string;
697
+ app: string;
698
+ credential: string | null;
699
+ requestId: string;
700
+ }, {
701
+ id: string;
702
+ app: string;
703
+ credential: string | null;
704
+ requestId: string;
705
+ }>>;
706
+ export declare class RpcInputError extends Error {
707
+ }
@@ -0,0 +1,4 @@
1
+ import type { IamHandoffRpc, IamMembershipRpc, IamRpc, IamTerminalRpc } from '@fabrika/auth-core';
2
+ import type { Env, RequestContext } from './env';
3
+ /** Build the RPC surface bound to one env + request context. */
4
+ export declare function createIamRpc(env: Env, ctx: RequestContext): IamRpc & IamHandoffRpc & IamMembershipRpc & IamTerminalRpc;