@zitadel/api 0.1.0 → 0.3.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 (232) hide show
  1. package/dist/{fetch-DD3lSbnp.d.mts → fetch-CtYe0OvX.d.mts} +8 -2
  2. package/dist/fetch-CtYe0OvX.d.mts.map +1 -0
  3. package/dist/generated/endpoints/zitadelNextGen.d.mts +2 -2
  4. package/dist/generated/endpoints/zitadelNextGen.mjs +291 -44
  5. package/dist/generated/endpoints/zitadelNextGen.mjs.map +1 -1
  6. package/dist/generated/endpoints/zitadelNextGen.msw.d.mts +17 -4
  7. package/dist/generated/endpoints/zitadelNextGen.msw.d.mts.map +1 -1
  8. package/dist/generated/endpoints/zitadelNextGen.msw.mjs +3184 -1471
  9. package/dist/generated/endpoints/zitadelNextGen.msw.mjs.map +1 -1
  10. package/dist/generated/endpoints/zitadelNextGen.zod.d.mts +1342 -85
  11. package/dist/generated/endpoints/zitadelNextGen.zod.d.mts.map +1 -1
  12. package/dist/generated/endpoints/zitadelNextGen.zod.mjs +1865 -648
  13. package/dist/generated/endpoints/zitadelNextGen.zod.mjs.map +1 -1
  14. package/dist/generated/model/index.d.mts +2 -2
  15. package/dist/generated/model/index.mjs +76 -65
  16. package/dist/generated/model/index.mjs.map +1 -1
  17. package/dist/generated/operations.mjs +202 -29
  18. package/dist/generated/operations.mjs.map +1 -1
  19. package/dist/{index-DuuFQkA8.d.mts → index-DAm3tCA7.d.mts} +6562 -1257
  20. package/dist/index-DAm3tCA7.d.mts.map +1 -0
  21. package/dist/runtime/api-factory.d.mts +1 -1
  22. package/dist/runtime/fetch.d.mts +1 -1
  23. package/dist/runtime/fetch.mjs +9 -2
  24. package/dist/runtime/fetch.mjs.map +1 -1
  25. package/dist/{zitadelNextGen-BdUDEEuX.d.mts → zitadelNextGen-B_VRpP2W.d.mts} +165 -39
  26. package/dist/zitadelNextGen-B_VRpP2W.d.mts.map +1 -0
  27. package/package.json +3 -2
  28. package/src/generated/endpoints/zitadelNextGen.faker.ts +46 -25
  29. package/src/generated/endpoints/zitadelNextGen.msw.ts +106 -13
  30. package/src/generated/endpoints/zitadelNextGen.ts +404 -54
  31. package/src/generated/endpoints/zitadelNextGen.zod.ts +1159 -133
  32. package/src/generated/model/addOriginDefault.ts +27 -0
  33. package/src/generated/model/beginUserPasskeyRegistrationDefault.ts +18 -0
  34. package/src/generated/model/buildRelease200PointersItem.ts +2 -0
  35. package/src/generated/model/buildRelease200PointersItemKind.ts +1 -0
  36. package/src/generated/model/buildRelease201PointersItem.ts +2 -0
  37. package/src/generated/model/buildRelease201PointersItemKind.ts +1 -0
  38. package/src/generated/model/buildRelease400DetailsResourcesItemKind.ts +1 -0
  39. package/src/generated/model/buildReleaseBody.ts +3 -3
  40. package/src/generated/model/buildReleaseBodyBundle.ts +20 -3
  41. package/src/generated/model/buildReleaseBodyBundlePoliciesItem.ts +47 -0
  42. package/src/generated/model/buildReleaseDefault.ts +36 -0
  43. package/src/generated/model/createAuthAttemptDefault.ts +27 -0
  44. package/src/generated/model/createBrandingDefault.ts +18 -0
  45. package/src/generated/model/createDeployment200ReleasePointersItem.ts +2 -0
  46. package/src/generated/model/createDeployment200ReleasePointersItemKind.ts +1 -0
  47. package/src/generated/model/createDeployment201ReleasePointersItem.ts +2 -0
  48. package/src/generated/model/createDeployment201ReleasePointersItemKind.ts +1 -0
  49. package/src/generated/model/createDeployment409.ts +3 -1
  50. package/src/generated/model/createDeploymentBody.ts +2 -4
  51. package/src/generated/model/createDeploymentDefault.ts +54 -0
  52. package/src/generated/model/createFlow201Step.ts +19 -0
  53. package/src/generated/model/createFlow201StepPurpose.ts +26 -0
  54. package/src/generated/model/createFlowDefault.ts +18 -0
  55. package/src/generated/model/createFlowDefinition201UserSchemaMetadata.ts +5 -0
  56. package/src/generated/model/createFlowDefinitionDefault.ts +18 -0
  57. package/src/generated/model/createGrant201Team.ts +4 -1
  58. package/src/generated/model/createGrantDefault.ts +18 -0
  59. package/src/generated/model/createHandoffDefault.ts +18 -0
  60. package/src/generated/model/createIdpDefault.ts +18 -0
  61. package/src/generated/model/createRelease200PointersItem.ts +2 -0
  62. package/src/generated/model/createRelease200PointersItemKind.ts +1 -0
  63. package/src/generated/model/createRelease201PointersItem.ts +2 -0
  64. package/src/generated/model/createRelease201PointersItemKind.ts +1 -0
  65. package/src/generated/model/createReleaseBodyPointersItemKind.ts +1 -0
  66. package/src/generated/model/createReleaseDefault.ts +18 -0
  67. package/src/generated/model/createSchemaDefault.ts +18 -0
  68. package/src/generated/model/createSessionDefault.ts +18 -0
  69. package/src/generated/model/createTeamDefault.ts +18 -0
  70. package/src/generated/model/createUserDefault.ts +18 -0
  71. package/src/generated/model/deleteGrantDefault.ts +18 -0
  72. package/src/generated/model/deleteTeamDefault.ts +18 -0
  73. package/src/generated/model/deleteUserByIDDefault.ts +18 -0
  74. package/src/generated/model/deleteVariableDefault.ts +18 -0
  75. package/src/generated/model/evaluatePolicy200.ts +30 -0
  76. package/src/generated/model/evaluatePolicy200Violations.ts +14 -0
  77. package/src/generated/model/evaluatePolicyBody.ts +82 -0
  78. package/src/generated/model/evaluatePolicyDefault.ts +90 -0
  79. package/src/generated/model/evaluatePolicyParams.ts +15 -0
  80. package/src/generated/model/exchangeHandoffDefault.ts +36 -0
  81. package/src/generated/model/finishUserPasskeyRegistrationDefault.ts +18 -0
  82. package/src/generated/model/getAuthAttemptDefault.ts +18 -0
  83. package/src/generated/model/getBrandingByIdDefault.ts +18 -0
  84. package/src/generated/model/getClaimStatusDefault.ts +18 -0
  85. package/src/generated/model/getDeploymentById200ReleasePointersItem.ts +2 -0
  86. package/src/generated/model/getDeploymentById200ReleasePointersItemKind.ts +1 -0
  87. package/src/generated/model/getDeploymentByIdDefault.ts +18 -0
  88. package/src/generated/model/getDeploymentVariablesDefault.ts +9 -0
  89. package/src/generated/model/getEvent200.ts +788 -0
  90. package/src/generated/model/getEventDefault.ts +18 -0
  91. package/src/generated/model/getFlowDefinition200UserSchemaMetadata.ts +5 -0
  92. package/src/generated/model/getFlowDefinitionDefault.ts +18 -0
  93. package/src/generated/model/getFlowStep200Step.ts +19 -0
  94. package/src/generated/model/getFlowStep200StepPurpose.ts +26 -0
  95. package/src/generated/model/getFlowStepDefault.ts +36 -0
  96. package/src/generated/model/getGrant200Team.ts +4 -1
  97. package/src/generated/model/getGrantDefault.ts +18 -0
  98. package/src/generated/model/getIdpByIdDefault.ts +18 -0
  99. package/src/generated/model/getIdpRevisionByIdDefault.ts +18 -0
  100. package/src/generated/model/getMyPasswordStateDefault.ts +18 -0
  101. package/src/generated/model/getMySessionCsrfTokenDefault.ts +18 -0
  102. package/src/generated/model/getMySessionDefault.ts +18 -0
  103. package/src/generated/model/getMyUserDefault.ts +18 -0
  104. package/src/generated/model/getMyUserSchema200Metadata.ts +5 -0
  105. package/src/generated/model/getMyUserSchemaDefault.ts +18 -0
  106. package/src/generated/model/getPolicy200.ts +62 -0
  107. package/src/generated/model/getPolicyDefault.ts +72 -0
  108. package/src/generated/model/getPolicyParams.ts +15 -0
  109. package/src/generated/model/getPolicyRevision200.ts +62 -0
  110. package/src/generated/model/getPolicyRevisionDefault.ts +72 -0
  111. package/src/generated/model/getPolicyRevisionParams.ts +15 -0
  112. package/src/generated/model/getProject200.ts +64 -6
  113. package/src/generated/model/getReleaseById200PointersItem.ts +2 -0
  114. package/src/generated/model/getReleaseById200PointersItemKind.ts +1 -0
  115. package/src/generated/model/getReleaseByIdDefault.ts +18 -0
  116. package/src/generated/model/getSchemaById200Metadata.ts +5 -0
  117. package/src/generated/model/getSchemaByIdDefault.ts +18 -0
  118. package/src/generated/model/getSessionDefault.ts +18 -0
  119. package/src/generated/model/getTeamDefault.ts +18 -0
  120. package/src/generated/model/getUserByIDDefault.ts +18 -0
  121. package/src/generated/model/getUserPasswordStateDefault.ts +18 -0
  122. package/src/generated/model/getVariableDefault.ts +18 -0
  123. package/src/generated/model/getVariablesDefault.ts +18 -0
  124. package/src/generated/model/index.ts +44 -21
  125. package/src/generated/model/initClaimDefault.ts +18 -0
  126. package/src/generated/model/issueChallengeDefault.ts +18 -0
  127. package/src/generated/model/listBrandingDefault.ts +18 -0
  128. package/src/generated/model/listDeployments200DeploymentsItemReleasePointersItem.ts +2 -0
  129. package/src/generated/model/listDeployments200DeploymentsItemReleasePointersItemKind.ts +1 -0
  130. package/src/generated/model/listDeploymentsDefault.ts +18 -0
  131. package/src/generated/model/listEvents200DataItem.ts +788 -0
  132. package/src/generated/model/listEventsDefault.ts +18 -0
  133. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemUserSchemaMetadata.ts +5 -0
  134. package/src/generated/model/listFlowDefinitionsDefault.ts +18 -0
  135. package/src/generated/model/listIdpRevisionsDefault.ts +18 -0
  136. package/src/generated/model/listMyIdentityLinksDefault.ts +18 -0
  137. package/src/generated/model/listMyPasskeysDefault.ts +18 -0
  138. package/src/generated/model/listMyProjectsDefault.ts +18 -0
  139. package/src/generated/model/listMyProjectsParams.ts +8 -0
  140. package/src/generated/model/listMyTeamsDefault.ts +18 -0
  141. package/src/generated/model/listPolicies200.ts +21 -0
  142. package/src/generated/model/listPolicies200PoliciesItem.ts +62 -0
  143. package/src/generated/model/listPoliciesDefault.ts +72 -0
  144. package/src/generated/model/listPoliciesOperation.ts +14 -0
  145. package/src/generated/model/listPoliciesParams.ts +33 -0
  146. package/src/generated/model/listPolicyRevisions200.ts +20 -0
  147. package/src/generated/model/listPolicyRevisions200RevisionsItem.ts +62 -0
  148. package/src/generated/model/listPolicyRevisionsDefault.ts +72 -0
  149. package/src/generated/model/listPolicyRevisionsParams.ts +28 -0
  150. package/src/generated/model/listPreviewsDefault.ts +9 -0
  151. package/src/generated/model/listProjectAdmins200.ts +20 -0
  152. package/src/generated/model/listProjectAdmins200AdminsItem.ts +31 -0
  153. package/src/generated/model/listProjectAdmins200AdminsItemSourcesItem.ts +57 -0
  154. package/src/generated/model/listProjectAdmins200AdminsItemUser.ts +40 -0
  155. package/src/generated/model/{createAuthAttempt409.ts → listProjectAdmins400.ts} +3 -3
  156. package/src/generated/model/{createAuthAttempt409Details.ts → listProjectAdmins400Details.ts} +1 -1
  157. package/src/generated/model/{issueChallenge409.ts → listProjectAdmins401.ts} +3 -3
  158. package/src/generated/model/{issueChallenge409Details.ts → listProjectAdmins401Details.ts} +1 -1
  159. package/src/generated/model/{getAuthAttempt409.ts → listProjectAdmins403.ts} +3 -3
  160. package/src/generated/model/{getHealth4xxDetails.ts → listProjectAdmins403Details.ts} +1 -1
  161. package/src/generated/model/{getHealth4xx.ts → listProjectAdmins404.ts} +3 -3
  162. package/src/generated/model/{getAuthAttempt409Details.ts → listProjectAdmins404Details.ts} +1 -1
  163. package/src/generated/model/listProjectAdminsDefault.ts +81 -0
  164. package/src/generated/model/listProjectAdminsParams.ts +23 -0
  165. package/src/generated/model/listReleasesDefault.ts +18 -0
  166. package/src/generated/model/listSchemas200SchemasItemMetadata.ts +5 -0
  167. package/src/generated/model/listSchemasDefault.ts +18 -0
  168. package/src/generated/model/listSchemasExpandItem.ts +28 -0
  169. package/src/generated/model/listSchemasParams.ts +5 -0
  170. package/src/generated/model/listUserIdentityLinksDefault.ts +18 -0
  171. package/src/generated/model/listUserPasskeysDefault.ts +18 -0
  172. package/src/generated/model/listUserTeamsDefault.ts +18 -0
  173. package/src/generated/model/patchMyUserDefault.ts +18 -0
  174. package/src/generated/model/patchProject200.ts +64 -6
  175. package/src/generated/model/patchProjectDefault.ts +18 -0
  176. package/src/generated/model/patchUserByIDDefault.ts +18 -0
  177. package/src/generated/model/publishPolicy201.ts +62 -0
  178. package/src/generated/model/publishPolicyBody.ts +47 -0
  179. package/src/generated/model/publishPolicyDefault.ts +99 -0
  180. package/src/generated/model/publishPolicyParams.ts +15 -0
  181. package/src/generated/model/queryGrants200GrantsItemTeam.ts +4 -1
  182. package/src/generated/model/queryGrantsDefault.ts +9 -0
  183. package/src/generated/model/queryIdpsDefault.ts +9 -0
  184. package/src/generated/model/queryProjectsDefault.ts +9 -0
  185. package/src/generated/model/querySessionsDefault.ts +9 -0
  186. package/src/generated/model/queryTeamsDefault.ts +9 -0
  187. package/src/generated/model/queryUsersBodyFilterItem.ts +11 -3
  188. package/src/generated/model/queryUsersBodyFilterItemField.ts +12 -3
  189. package/src/generated/model/queryUsersDefault.ts +9 -0
  190. package/src/generated/model/removeOriginDefault.ts +27 -0
  191. package/src/generated/model/removePreviewDefault.ts +18 -0
  192. package/src/generated/model/revokeMySessionDefault.ts +18 -0
  193. package/src/generated/model/revokeRelease200PointersItem.ts +2 -0
  194. package/src/generated/model/revokeRelease200PointersItemKind.ts +1 -0
  195. package/src/generated/model/revokeRelease409DetailsOriginsItem.ts +9 -1
  196. package/src/generated/model/revokeReleaseDefault.ts +63 -0
  197. package/src/generated/model/revokeSessionDefault.ts +18 -0
  198. package/src/generated/model/rollbackDeployment200ReleasePointersItem.ts +2 -0
  199. package/src/generated/model/rollbackDeployment200ReleasePointersItemKind.ts +1 -0
  200. package/src/generated/model/rollbackDeployment201ReleasePointersItem.ts +2 -0
  201. package/src/generated/model/rollbackDeployment201ReleasePointersItemKind.ts +1 -0
  202. package/src/generated/model/rollbackDeployment409.ts +3 -1
  203. package/src/generated/model/rollbackDeploymentDefault.ts +99 -0
  204. package/src/generated/model/setUserPasswordDefault.ts +18 -0
  205. package/src/generated/model/submitFlowStep200Step.ts +19 -0
  206. package/src/generated/model/submitFlowStep200StepPurpose.ts +26 -0
  207. package/src/generated/model/submitFlowStep400Step.ts +19 -0
  208. package/src/generated/model/submitFlowStep400StepPurpose.ts +26 -0
  209. package/src/generated/model/submitFlowStepDefault.ts +36 -0
  210. package/src/generated/model/updateTeamDefault.ts +18 -0
  211. package/src/generated/model/updateVariablesDefault.ts +18 -0
  212. package/src/generated/model/verifyChallengeProofDefault.ts +18 -0
  213. package/src/generated/operations.ts +212 -29
  214. package/src/runtime/config.spec.ts +2 -2
  215. package/src/runtime/fetch.spec.ts +13 -1
  216. package/src/runtime/fetch.ts +15 -2
  217. package/dist/fetch-DD3lSbnp.d.mts.map +0 -1
  218. package/dist/index-DuuFQkA8.d.mts.map +0 -1
  219. package/dist/zitadelNextGen-BdUDEEuX.d.mts.map +0 -1
  220. package/src/generated/model/getHealthDefault.ts +0 -27
  221. package/src/generated/model/getProject200OriginsItem.ts +0 -23
  222. package/src/generated/model/getProject200OriginsItemKind.ts +0 -15
  223. package/src/generated/model/getProject200PasswordHash.ts +0 -42
  224. package/src/generated/model/getProject200PasswordHashAlgorithm.ts +0 -24
  225. package/src/generated/model/getProject200PasswordHashParams.ts +0 -47
  226. package/src/generated/model/getProject200PasswordHashParamsHash.ts +0 -24
  227. package/src/generated/model/patchProject200OriginsItem.ts +0 -23
  228. package/src/generated/model/patchProject200OriginsItemKind.ts +0 -15
  229. package/src/generated/model/patchProject200PasswordHash.ts +0 -42
  230. package/src/generated/model/patchProject200PasswordHashAlgorithm.ts +0 -24
  231. package/src/generated/model/patchProject200PasswordHashParams.ts +0 -47
  232. package/src/generated/model/patchProject200PasswordHashParamsHash.ts +0 -24
@@ -60,6 +60,9 @@ import type {
60
60
  CreateUserParams,
61
61
  DeleteGrantParams,
62
62
  DeleteVariableParams,
63
+ EvaluatePolicy200,
64
+ EvaluatePolicyBody,
65
+ EvaluatePolicyParams,
63
66
  ExchangeHandoff200,
64
67
  ExchangeHandoffBody,
65
68
  ExchangeHandoffParams,
@@ -81,7 +84,6 @@ import type {
81
84
  GetFlowStep200,
82
85
  GetGrant200,
83
86
  GetGrantParams,
84
- GetHealthDefault,
85
87
  GetIdpById200,
86
88
  GetIdpByIdParams,
87
89
  GetIdpRevisionById200,
@@ -97,6 +99,10 @@ import type {
97
99
  GetMyUserParams,
98
100
  GetMyUserSchema200,
99
101
  GetMyUserSchemaParams,
102
+ GetPolicy200,
103
+ GetPolicyParams,
104
+ GetPolicyRevision200,
105
+ GetPolicyRevisionParams,
100
106
  GetProject200,
101
107
  GetReadyDefault,
102
108
  GetReleaseById200,
@@ -133,8 +139,14 @@ import type {
133
139
  ListMyProjectsParams,
134
140
  ListMyTeams200,
135
141
  ListMyTeamsParams,
142
+ ListPolicies200,
143
+ ListPoliciesParams,
144
+ ListPolicyRevisions200,
145
+ ListPolicyRevisionsParams,
136
146
  ListPreviews200,
137
147
  ListPreviewsParams,
148
+ ListProjectAdmins200,
149
+ ListProjectAdminsParams,
138
150
  ListReleases200,
139
151
  ListReleasesParams,
140
152
  ListSchemas200,
@@ -152,6 +164,9 @@ import type {
152
164
  PatchProjectBody,
153
165
  PatchUserByID200,
154
166
  PatchUserByIDBody,
167
+ PublishPolicy201,
168
+ PublishPolicyBody,
169
+ PublishPolicyParams,
155
170
  QueryGrants200,
156
171
  QueryGrantsBody,
157
172
  QueryGrantsParams,
@@ -192,31 +207,6 @@ import type {
192
207
 
193
208
  import { customFetch } from '../../runtime/fetch.ts';
194
209
 
195
- export const getGetHealthUrl = () => {
196
-
197
-
198
-
199
-
200
- return `${getProxyPath()}/healthz`
201
- }
202
-
203
- /**
204
- * Check whether the server is healthy
205
- * @summary Check server health
206
- */
207
- export const getHealth = async ( options?: Parameters<typeof customFetch>[1]): Promise<GetHealthDefault> => {
208
-
209
- return customFetch<GetHealthDefault>(getGetHealthUrl(),
210
- {
211
- ...options,
212
- method: 'GET'
213
-
214
-
215
- }
216
- );}
217
-
218
-
219
-
220
210
  export const getGetLiveUrl = () => {
221
211
 
222
212
 
@@ -226,7 +216,11 @@ export const getGetLiveUrl = () => {
226
216
  }
227
217
 
228
218
  /**
229
- * Check whether the server is started
219
+ * Answers `ok` while the server process serves HTTP, and checks nothing behind it.
220
+ *
221
+ * Point a liveness probe here. It never checks the database, so an outage
222
+ * of the database does not restart every instance; `GET /readyz` takes an
223
+ * instance out of rotation instead.
230
224
  * @summary Check server liveness
231
225
  */
232
226
  export const getLive = async ( options?: Parameters<typeof customFetch>[1]): Promise<GetLiveDefault> => {
@@ -251,7 +245,11 @@ export const getGetReadyUrl = () => {
251
245
  }
252
246
 
253
247
  /**
254
- * Check whether the server is ready to accept requests
248
+ * Answers whether the server can serve requests, which takes its database answering within a second.
249
+ *
250
+ * Point a readiness probe here, so that a server whose database does not
251
+ * answer gets no requests until it does. The check is one round trip to the
252
+ * database.
255
253
  * @summary Check server readiness
256
254
  */
257
255
  export const getReady = async ( options?: Parameters<typeof customFetch>[1]): Promise<GetReadyDefault> => {
@@ -461,9 +459,11 @@ export const getDeleteUserByIDUrl = (userId: string,) => {
461
459
  }
462
460
 
463
461
  /**
464
- * Deletes a user and removes them from every team they belong to.
462
+ * Deletes a user, removes them from every team they belong to, and revokes
463
+ * every grant they hold, on any project.
465
464
  *
466
- * The user is removed, not deactivated, and the deletion emits `user.deleted`.
465
+ * The user is removed, not deactivated, and the deletion emits `user.deleted`,
466
+ * plus `authz.revoked` for each grant on that grant's project.
467
467
  * With a project secret the request is idempotent: deleting a user that exists
468
468
  * in no project succeeds without changing anything.
469
469
  * @summary Delete user by ID
@@ -972,14 +972,20 @@ export const getListMyProjectsUrl = (params?: ListMyProjectsParams,) => {
972
972
  }
973
973
 
974
974
  /**
975
- * The projects the signed-in user holds an active grant on, either directly or
976
- * through a team they are a member of. Ordered by project id and paged with an
977
- * opaque cursor.
975
+ * The projects the signed-in user can act on: those they hold an active grant
976
+ * on, either directly or through a team they are a member of. For a platform
977
+ * operator (ADR 075) that is every project of the deployment. Ordered by
978
+ * project id and paged with an opaque cursor.
978
979
  *
979
980
  * This is not the same question as `queryProjects`, which answers with the one
980
981
  * project the calling credential is bound to. Here the session is the caller
981
982
  * and the grants are the answer, so the list spans projects.
982
983
  *
984
+ * With `name_contains`, only the projects whose name contains that text are
985
+ * listed. The search runs on the server together with the grants, so it
986
+ * reaches every project the user can act on, however many there are, and
987
+ * pages like the full list.
988
+ *
983
989
  * With `project_id`, the projects are listed only when the session belongs to
984
990
  * that project. It names the project the session was signed in to, not one to
985
991
  * list.
@@ -1092,7 +1098,10 @@ export const getCreateFlowUrl = () => {
1092
1098
  * pattern with no live preview answers `403` with `proj.preview_not_live`;
1093
1099
  * nothing deployed to the target answers `409` with `rel.not_deployed`; a
1094
1100
  * revoked release answers `409` with `rel.revoked`. A request with no
1095
- * `Origin` passes the gate and still needs a deployment target.
1101
+ * `Origin` passes the gate and still needs a deployment target. A loopback
1102
+ * origin passes it too, and so does the server's own origin, from which its
1103
+ * console previews a project's login; a step submitted from the server's
1104
+ * own origin is still refused unless the project lists it.
1096
1105
  *
1097
1106
  * The response contains an `id` field — the flow handle. Use it as the path
1098
1107
  * parameter for all subsequent `/flow/{id}/submit` calls.
@@ -1269,10 +1278,10 @@ export const getCreateAuthAttemptUrl = () => {
1269
1278
  * also include session_id and that session's session_token to add factors to an existing session.
1270
1279
  *
1271
1280
  * The project comes from the project secret. A body `project_id` that disagrees
1272
- * answers `403` with `proj.mismatch`. The attempt resolves a deployment the
1273
- * same way as other runtime operations and seals it; with no browser `Origin`
1274
- * and nothing deployed to the resolved target the response is `409` with
1275
- * `rel.not_deployed`. A revoked release answers `409` with `rel.revoked`.
1281
+ * answers `403` with `proj.mismatch`. Sealed `deployment_id` / `release_id` are
1282
+ * filled only when create runs with a runtime resolution already on the
1283
+ * context (the flow create path); this HTTP entry point does not resolve
1284
+ * Origin or refuse a revoked release itself.
1276
1285
  * @summary Create a new authentication attempt
1277
1286
  */
1278
1287
  export const createAuthAttempt = async (createAuthAttemptBody: CreateAuthAttemptBody, options?: Parameters<typeof customFetch>[1]): Promise<CreateAuthAttempt201> => {
@@ -1318,9 +1327,6 @@ export const getGetAuthAttemptUrl = (attemptId: string,) => {
1318
1327
  *
1319
1328
  * Use this for polling during long-running factor verifications (e.g., waiting for
1320
1329
  * a federated IdP callback or a device flow).
1321
- *
1322
- * Reuses the deployment sealed when the attempt was created. If that release
1323
- * was revoked since, the response is `409` with `rel.revoked`.
1324
1330
  * @summary Get authentication attempt state
1325
1331
  */
1326
1332
  export const getAuthAttempt = async (attemptId: string, options?: Parameters<typeof customFetch>[1]): Promise<GetAuthAttempt200> => {
@@ -1351,9 +1357,6 @@ export const getIssueChallengeUrl = (attemptId: string,) => {
1351
1357
  * (password, passkey, TOTP, OTP via SMS, etc.). The server responds with challenge details
1352
1358
  * including method, metadata, and any UI hints. The client then verifies the proof
1353
1359
  * by calling POST /auth_attempts/{attempt_id}/challenges/{challenge_id}/verify.
1354
- *
1355
- * Reuses the deployment sealed when the attempt was created. If that release
1356
- * was revoked since, the response is `409` with `rel.revoked`.
1357
1360
  * @summary Issue a factor challenge
1358
1361
  */
1359
1362
  export const issueChallenge = async (attemptId: string,
@@ -1404,9 +1407,6 @@ export const getVerifyChallengeProofUrl = (attemptId: string,
1404
1407
  *
1405
1408
  * On successful verification, the factor is written to the auth attempt.
1406
1409
  * The attempt moves to the next pending challenge or completes if all required factors are verified.
1407
- *
1408
- * Reuses the deployment sealed when the attempt was created. If that release
1409
- * was revoked since, the response is `409` with `rel.revoked`.
1410
1410
  * @summary Verify a factor proof
1411
1411
  */
1412
1412
  export const verifyChallengeProof = async (attemptId: string,
@@ -1458,8 +1458,7 @@ export const getCreateHandoffUrl = (attemptId: string,) => {
1458
1458
  * - Audience-bound (requires matching project key for exchange)
1459
1459
  * - Idempotency-safe within a 5-minute window (see conventions)
1460
1460
  *
1461
- * Reuses the deployment sealed when the attempt was created. If that release
1462
- * was revoked since, the response is `409` with `rel.revoked`.
1461
+ * Revoke refusal for a sealed release happens at handoff exchange, not here.
1463
1462
  * @summary Complete authentication and create handoff token
1464
1463
  */
1465
1464
  export const createHandoff = async (attemptId: string, options?: Parameters<typeof customFetch>[1]): Promise<CreateHandoff200> => {
@@ -1628,6 +1627,67 @@ return customFetch<PatchProject200>(getPatchProjectUrl(projectId),
1628
1627
 
1629
1628
 
1630
1629
 
1630
+ export const getListProjectAdminsUrl = (projectId: string,
1631
+ params?: ListProjectAdminsParams,) => {
1632
+ const normalizedParams = new URLSearchParams();
1633
+
1634
+ Object.entries(params || {}).forEach(([key, value]) => {
1635
+
1636
+ if (value !== undefined) {
1637
+ normalizedParams.append(key, value === null ? 'null' : String(value))
1638
+ }
1639
+ });
1640
+
1641
+ const stringifiedParams = normalizedParams.toString();
1642
+
1643
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/admins?${stringifiedParams}` : `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/admins`
1644
+ }
1645
+
1646
+ /**
1647
+ * Lists the people who can administer the project, and how each of them
1648
+ * gets that access. A person appears once, with one entry in `sources` per
1649
+ * way they hold it:
1650
+ *
1651
+ * - `owning_team`: an active member of the team that owns the project
1652
+ * (ADR 054 §2). Removing a grant does not remove this access; it ends
1653
+ * only when the person leaves the team or the project changes owner.
1654
+ * - `grant`: an unexpired `admin` grant on the project, either to the
1655
+ * person (`grant_id` only) or to a team they are an active member of
1656
+ * (`grant_id` and `team`). Revoking that grant removes this source.
1657
+ *
1658
+ * The list follows the authorization check: team membership is read from
1659
+ * the same membership projection the check expands, so a person who left a
1660
+ * team, or whose team or user was deactivated, is not listed through it.
1661
+ * Grants that expired or carry a lower role are left out. A person whose
1662
+ * only access is a `viewer` or `editor` grant is not an admin and is not
1663
+ * listed. Like the check, the list does not look at a person's user status
1664
+ * beyond that, so a direct grant to a suspended person is listed.
1665
+ *
1666
+ * A person whose access comes only through teams the caller is not a
1667
+ * member of is left out, and a team the caller is not in is named by
1668
+ * `team_id` only. The grant to such a team still shows in the project's
1669
+ * grants.
1670
+ *
1671
+ * Ordered by `user_id` and paginated with `page_token`.
1672
+ *
1673
+ * Accepts either a project secret (`oauth2`) or a user-bound Console
1674
+ * session cookie (`nextgenSession`) that can read the project.
1675
+ * @summary List project admins
1676
+ */
1677
+ export const listProjectAdmins = async (projectId: string,
1678
+ params?: ListProjectAdminsParams, options?: Parameters<typeof customFetch>[1]): Promise<ListProjectAdmins200> => {
1679
+
1680
+ return customFetch<ListProjectAdmins200>(getListProjectAdminsUrl(projectId,params),
1681
+ {
1682
+ ...options,
1683
+ method: 'GET'
1684
+
1685
+
1686
+ }
1687
+ );}
1688
+
1689
+
1690
+
1631
1691
  export const getInitClaimUrl = (projectId: string,) => {
1632
1692
 
1633
1693
 
@@ -2371,6 +2431,14 @@ export const getListSchemasUrl = (params: ListSchemasParams,) => {
2371
2431
  const normalizedParams = new URLSearchParams();
2372
2432
 
2373
2433
  Object.entries(params || {}).forEach(([key, value]) => {
2434
+ const explodeParameters = ["expand"];
2435
+
2436
+ if (Array.isArray(value) && explodeParameters.includes(key)) {
2437
+ value.forEach((v) => {
2438
+ normalizedParams.append(key, v === null ? 'null' : String(v));
2439
+ });
2440
+ return;
2441
+ }
2374
2442
 
2375
2443
  if (value !== undefined) {
2376
2444
  normalizedParams.append(key, value === null ? 'null' : String(value))
@@ -3109,6 +3177,286 @@ export const getIdpRevisionById = async (revisionId: string,
3109
3177
 
3110
3178
 
3111
3179
 
3180
+ export const getListPoliciesUrl = (params: ListPoliciesParams,) => {
3181
+ const normalizedParams = new URLSearchParams();
3182
+
3183
+ Object.entries(params || {}).forEach(([key, value]) => {
3184
+
3185
+ if (value !== undefined) {
3186
+ normalizedParams.append(key, value === null ? 'null' : String(value))
3187
+ }
3188
+ });
3189
+
3190
+ const stringifiedParams = normalizedParams.toString();
3191
+
3192
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/policies?${stringifiedParams}` : `${getProxyPath()}/policies`
3193
+ }
3194
+
3195
+ /**
3196
+ * Lists the project's policies, one per operation, each as its newest
3197
+ * revision, ordered by `created_at` (first publish) and then `id`. Filter
3198
+ * by `operation` to read the policy of one operation; a project that never
3199
+ * published one gets an empty list.
3200
+ *
3201
+ * The lookup is scoped to the project in `project_id`.
3202
+ * @summary List policies
3203
+ */
3204
+ export const listPolicies = async (params: ListPoliciesParams, options?: Parameters<typeof customFetch>[1]): Promise<ListPolicies200> => {
3205
+
3206
+ return customFetch<ListPolicies200>(getListPoliciesUrl(params),
3207
+ {
3208
+ ...options,
3209
+ method: 'GET'
3210
+
3211
+
3212
+ }
3213
+ );}
3214
+
3215
+
3216
+
3217
+ export const getPublishPolicyUrl = (params: PublishPolicyParams,) => {
3218
+ const normalizedParams = new URLSearchParams();
3219
+
3220
+ Object.entries(params || {}).forEach(([key, value]) => {
3221
+
3222
+ if (value !== undefined) {
3223
+ normalizedParams.append(key, value === null ? 'null' : String(value))
3224
+ }
3225
+ });
3226
+
3227
+ const stringifiedParams = normalizedParams.toString();
3228
+
3229
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/policies?${stringifiedParams}` : `${getProxyPath()}/policies`
3230
+ }
3231
+
3232
+ /**
3233
+ * Publishes the project's policy for an operation as a new immutable
3234
+ * revision, creating the policy on its first publish. The newest revision
3235
+ * applies to the next time the operation runs; nothing already stored is
3236
+ * re-evaluated, so a stricter password policy applies the next time a
3237
+ * password is set.
3238
+ *
3239
+ * The request is typed by `operation`: an unknown operation or setting, or
3240
+ * a value of the wrong type or outside its bounds, answers `req.invalid`
3241
+ * like any malformed request. The operation's template then checks the
3242
+ * config again, together with the rules that relate settings to each other
3243
+ * (a `min_length` above `max_length`), and answers `pol.invalid`. Its
3244
+ * `details.details.violations` lists everything that failed, settings
3245
+ * first, then rules: `{"setting": "min_length"}` for one setting, or
3246
+ * `{"config_rule": "min_length_not_above_max_length", "settings":
3247
+ * ["min_length", "max_length"]}` for a rule across settings, with the
3248
+ * settings it reads. A setting left out is off, and `{}` switches every
3249
+ * rule off; there are no defaults.
3250
+ * @summary Publish a policy
3251
+ */
3252
+ export const publishPolicy = async (publishPolicyBody: PublishPolicyBody,
3253
+ params: PublishPolicyParams, options?: Parameters<typeof customFetch>[1]): Promise<PublishPolicy201> => {
3254
+
3255
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
3256
+ if (!h) return {};
3257
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
3258
+ if (Symbol.iterator in h) {
3259
+ return Object.fromEntries(
3260
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
3261
+ );
3262
+ }
3263
+ const headers: Record<string, string | readonly string[]> = {};
3264
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
3265
+ if (value !== undefined) headers[name] = value;
3266
+ }
3267
+ return headers;
3268
+ };
3269
+ return customFetch<PublishPolicy201>(getPublishPolicyUrl(params),
3270
+ {
3271
+ ...options,
3272
+ method: 'POST',
3273
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
3274
+ body: JSON.stringify(publishPolicyBody)
3275
+ }
3276
+ );}
3277
+
3278
+
3279
+
3280
+ export const getEvaluatePolicyUrl = (params: EvaluatePolicyParams,) => {
3281
+ const normalizedParams = new URLSearchParams();
3282
+
3283
+ Object.entries(params || {}).forEach(([key, value]) => {
3284
+
3285
+ if (value !== undefined) {
3286
+ normalizedParams.append(key, value === null ? 'null' : String(value))
3287
+ }
3288
+ });
3289
+
3290
+ const stringifiedParams = normalizedParams.toString();
3291
+
3292
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/policies/evaluate?${stringifiedParams}` : `${getProxyPath()}/policies/evaluate`
3293
+ }
3294
+
3295
+ /**
3296
+ * Evaluates a policy config against one request, without side effects, and
3297
+ * answers the decision the operation would reach. Nothing is read from or
3298
+ * written to the project: the config is the one in the body, checked
3299
+ * exactly as a publish checks it, so an invalid config answers `pol.invalid`
3300
+ * with the same violations.
3301
+ *
3302
+ * `input` is what the operation's request carries, in the operation's own
3303
+ * terms (a password, not its length): the server derives what the policy
3304
+ * checks with the code the live operation runs, guards included. `facts`
3305
+ * states what the operation would look up at runtime, such as whether the
3306
+ * candidate matches one of the user's kept passwords.
3307
+ *
3308
+ * The decision and the names of the failed rules hold wherever the
3309
+ * operation runs. `code` and `violations` are what an API call answers; a
3310
+ * login flow shows the same rules as field errors on the password field
3311
+ * (`error.x-auth-methods#password_<rule>` in `step.error`).
3312
+ *
3313
+ * Which policy a project or release applies is not decided here: read it
3314
+ * and pass its config.
3315
+ *
3316
+ * The caller needs read access to the project in `project_id`.
3317
+ * @summary Evaluate a policy
3318
+ */
3319
+ export const evaluatePolicy = async (evaluatePolicyBody: EvaluatePolicyBody,
3320
+ params: EvaluatePolicyParams, options?: Parameters<typeof customFetch>[1]): Promise<EvaluatePolicy200> => {
3321
+
3322
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
3323
+ if (!h) return {};
3324
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
3325
+ if (Symbol.iterator in h) {
3326
+ return Object.fromEntries(
3327
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
3328
+ );
3329
+ }
3330
+ const headers: Record<string, string | readonly string[]> = {};
3331
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
3332
+ if (value !== undefined) headers[name] = value;
3333
+ }
3334
+ return headers;
3335
+ };
3336
+ return customFetch<EvaluatePolicy200>(getEvaluatePolicyUrl(params),
3337
+ {
3338
+ ...options,
3339
+ method: 'POST',
3340
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
3341
+ body: JSON.stringify(evaluatePolicyBody)
3342
+ }
3343
+ );}
3344
+
3345
+
3346
+
3347
+ export const getGetPolicyUrl = (policyId: string,
3348
+ params: GetPolicyParams,) => {
3349
+ const normalizedParams = new URLSearchParams();
3350
+
3351
+ Object.entries(params || {}).forEach(([key, value]) => {
3352
+
3353
+ if (value !== undefined) {
3354
+ normalizedParams.append(key, value === null ? 'null' : String(value))
3355
+ }
3356
+ });
3357
+
3358
+ const stringifiedParams = normalizedParams.toString();
3359
+
3360
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/policies/${encodeURIComponent(String(policyId))}?${stringifiedParams}` : `${getProxyPath()}/policies/${encodeURIComponent(String(policyId))}`
3361
+ }
3362
+
3363
+ /**
3364
+ * Reads a policy as its newest revision, the one that applies the next time
3365
+ * its operation runs.
3366
+ *
3367
+ * The lookup is scoped to the project in `project_id`: a policy of another
3368
+ * project answers not found exactly as an unknown id does.
3369
+ * @summary Get a policy
3370
+ */
3371
+ export const getPolicy = async (policyId: string,
3372
+ params: GetPolicyParams, options?: Parameters<typeof customFetch>[1]): Promise<GetPolicy200> => {
3373
+
3374
+ return customFetch<GetPolicy200>(getGetPolicyUrl(policyId,params),
3375
+ {
3376
+ ...options,
3377
+ method: 'GET'
3378
+
3379
+
3380
+ }
3381
+ );}
3382
+
3383
+
3384
+
3385
+ export const getListPolicyRevisionsUrl = (policyId: string,
3386
+ params: ListPolicyRevisionsParams,) => {
3387
+ const normalizedParams = new URLSearchParams();
3388
+
3389
+ Object.entries(params || {}).forEach(([key, value]) => {
3390
+
3391
+ if (value !== undefined) {
3392
+ normalizedParams.append(key, value === null ? 'null' : String(value))
3393
+ }
3394
+ });
3395
+
3396
+ const stringifiedParams = normalizedParams.toString();
3397
+
3398
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/policies/${encodeURIComponent(String(policyId))}/revisions?${stringifiedParams}` : `${getProxyPath()}/policies/${encodeURIComponent(String(policyId))}/revisions`
3399
+ }
3400
+
3401
+ /**
3402
+ * Returns every revision of one policy, newest first, paginated with a
3403
+ * cursor. The order is fixed, so there is no `sorting`.
3404
+ *
3405
+ * The lookup is scoped to the project in `project_id`: a policy of another
3406
+ * project answers not found exactly as an unknown id does.
3407
+ * @summary List the revisions of a policy
3408
+ */
3409
+ export const listPolicyRevisions = async (policyId: string,
3410
+ params: ListPolicyRevisionsParams, options?: Parameters<typeof customFetch>[1]): Promise<ListPolicyRevisions200> => {
3411
+
3412
+ return customFetch<ListPolicyRevisions200>(getListPolicyRevisionsUrl(policyId,params),
3413
+ {
3414
+ ...options,
3415
+ method: 'GET'
3416
+
3417
+
3418
+ }
3419
+ );}
3420
+
3421
+
3422
+
3423
+ export const getGetPolicyRevisionUrl = (revisionId: string,
3424
+ params: GetPolicyRevisionParams,) => {
3425
+ const normalizedParams = new URLSearchParams();
3426
+
3427
+ Object.entries(params || {}).forEach(([key, value]) => {
3428
+
3429
+ if (value !== undefined) {
3430
+ normalizedParams.append(key, value === null ? 'null' : String(value))
3431
+ }
3432
+ });
3433
+
3434
+ const stringifiedParams = normalizedParams.toString();
3435
+
3436
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/policies/revisions/${encodeURIComponent(String(revisionId))}?${stringifiedParams}` : `${getProxyPath()}/policies/revisions/${encodeURIComponent(String(revisionId))}`
3437
+ }
3438
+
3439
+ /**
3440
+ * Reads one revision of a policy, newest or not.
3441
+ *
3442
+ * The lookup is scoped to the project in `project_id`: a revision of another
3443
+ * project answers not found exactly as an unknown id does.
3444
+ * @summary Get a policy revision
3445
+ */
3446
+ export const getPolicyRevision = async (revisionId: string,
3447
+ params: GetPolicyRevisionParams, options?: Parameters<typeof customFetch>[1]): Promise<GetPolicyRevision200> => {
3448
+
3449
+ return customFetch<GetPolicyRevision200>(getGetPolicyRevisionUrl(revisionId,params),
3450
+ {
3451
+ ...options,
3452
+ method: 'GET'
3453
+
3454
+
3455
+ }
3456
+ );}
3457
+
3458
+
3459
+
3112
3460
  export const getCreateReleaseUrl = (params: CreateReleaseParams,) => {
3113
3461
  const normalizedParams = new URLSearchParams();
3114
3462
 
@@ -3241,7 +3589,9 @@ export const getBuildReleaseUrl = (params: BuildReleaseParams,) => {
3241
3589
  * allocates nothing, however long ago it was built. Otherwise every resource is compared against the
3242
3590
  * project's newest revision of the same handle: unchanged content reuses
3243
3591
  * that revision, changed content allocates a new one, and the request
3244
- * answers `201` with the new release. Metadata is excluded from the
3592
+ * answers `201` with the new release. A policy whose config matches only an
3593
+ * older revision allocates a new one too, so a request that resolves no
3594
+ * release, which reads the newest revision, applies it as well. Metadata is excluded from the
3245
3595
  * comparison, so the same content under a different `message` is the same
3246
3596
  * release.
3247
3597
  *
@@ -3255,8 +3605,8 @@ export const getBuildReleaseUrl = (params: BuildReleaseParams,) => {
3255
3605
  *
3256
3606
  * Building writes revisions, so besides `release.write` it needs the write
3257
3607
  * scope of every kind the bundle carries a resource of: `schema.write`,
3258
- * `flow_definition.write`, `branding.write` and `idp.write`, as the
3259
- * per-kind create endpoints do. A missing scope answers `403` with `rel.permission_denied`,
3608
+ * `flow_definition.write`, `branding.write`, `idp.write` and
3609
+ * `policy.write`, as the per-kind create endpoints do. A missing scope answers `403` with `rel.permission_denied`,
3260
3610
  * naming the kind. An empty kind needs no scope.
3261
3611
  *
3262
3612
  * Building a release does not deploy it. A release is not tied to an
@@ -3910,11 +4260,11 @@ export const getCreateDeploymentUrl = (params: CreateDeploymentParams,) => {
3910
4260
  * - `400 dep.invalid`: both or neither of `release_id` and `content_hash`;
3911
4261
  * a primary origin named exactly; `primary` mixed with preview URLs;
3912
4262
  * `primary` on a project with no primary origin; `ttl` with `primary`;
3913
- * `ttl` above the project's maximum.
4263
+ * `ttl` above 365 days (`P365D`).
3914
4264
  * - `400 dep.variables_missing`: a referenced variable has no value for
3915
4265
  * the kind; `details` names the kind and every missing variable.
3916
4266
  * - `403 proj.origin_not_allowed`: a preview URL matches no preview
3917
- * pattern.
4267
+ * pattern, or is a loopback URL.
3918
4268
  * - `404 rel.not_found`: the release id or digest names no release here.
3919
4269
  * - `409 dep.conflict`: `expected_deployment_id` is not the deployment
3920
4270
  * this write replaces; `details.deployment` is that deployment.