@zitadel/api 0.4.0 → 0.6.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 (864) hide show
  1. package/README.md +1 -1
  2. package/dist/{api-factory-Dt5lUjyu.d.mts → api-factory-Durul-IL.d.mts} +13 -3
  3. package/dist/api-factory-Durul-IL.d.mts.map +1 -0
  4. package/dist/{api-factory-C5b1Gqwv.mjs → api-factory-DwzqkuTV.mjs} +16 -6
  5. package/dist/api-factory-DwzqkuTV.mjs.map +1 -0
  6. package/dist/{fetch-B-lgjlrf.d.mts → fetch-BzLvdm6C.d.mts} +14 -1
  7. package/dist/fetch-BzLvdm6C.d.mts.map +1 -0
  8. package/dist/generated/endpoints/zitadelNextGen.d.mts +2 -2
  9. package/dist/generated/endpoints/zitadelNextGen.mjs +1408 -627
  10. package/dist/generated/endpoints/zitadelNextGen.mjs.map +1 -1
  11. package/dist/generated/endpoints/zitadelNextGen.msw.d.mts +20 -1
  12. package/dist/generated/endpoints/zitadelNextGen.msw.d.mts.map +1 -1
  13. package/dist/generated/endpoints/zitadelNextGen.msw.mjs +2235 -482
  14. package/dist/generated/endpoints/zitadelNextGen.msw.mjs.map +1 -1
  15. package/dist/generated/endpoints/zitadelNextGen.zod.d.mts +2879 -1013
  16. package/dist/generated/endpoints/zitadelNextGen.zod.d.mts.map +1 -1
  17. package/dist/generated/endpoints/zitadelNextGen.zod.mjs +6411 -4732
  18. package/dist/generated/endpoints/zitadelNextGen.zod.mjs.map +1 -1
  19. package/dist/generated/model/index.d.mts +2 -2
  20. package/dist/generated/model/index.mjs +92 -1
  21. package/dist/generated/model/index.mjs.map +1 -1
  22. package/dist/generated/operations.d.mts +9 -0
  23. package/dist/generated/operations.d.mts.map +1 -1
  24. package/dist/generated/operations.mjs +481 -153
  25. package/dist/generated/operations.mjs.map +1 -1
  26. package/dist/{index-DGQY1rfH.d.mts → index-D0r_rLRr.d.mts} +17188 -10739
  27. package/dist/index-D0r_rLRr.d.mts.map +1 -0
  28. package/dist/runtime/api-factory.d.mts +1 -1
  29. package/dist/runtime/api-factory.mjs +1 -1
  30. package/dist/runtime/config.d.mts +1 -1
  31. package/dist/runtime/config.mjs +1 -1
  32. package/dist/runtime/fetch.d.mts +1 -1
  33. package/dist/runtime/fetch.mjs +1 -0
  34. package/dist/runtime/fetch.mjs.map +1 -1
  35. package/dist/runtime/paging.d.mts +106 -23
  36. package/dist/runtime/paging.d.mts.map +1 -1
  37. package/dist/runtime/paging.mjs +132 -32
  38. package/dist/runtime/paging.mjs.map +1 -1
  39. package/dist/zitadelNextGen-DgKtevtj.d.mts +1940 -0
  40. package/dist/zitadelNextGen-DgKtevtj.d.mts.map +1 -0
  41. package/package.json +3 -3
  42. package/src/generated/endpoints/zitadelNextGen.faker.ts +36 -8
  43. package/src/generated/endpoints/zitadelNextGen.msw.ts +148 -1
  44. package/src/generated/endpoints/zitadelNextGen.ts +1581 -653
  45. package/src/generated/endpoints/zitadelNextGen.zod.ts +6322 -4751
  46. package/src/generated/model/acceptInvitation200.ts +126 -0
  47. package/src/generated/model/acceptInvitation400.ts +20 -0
  48. package/src/generated/model/acceptInvitation400Details.ts +12 -0
  49. package/src/generated/model/acceptInvitation401.ts +20 -0
  50. package/src/generated/model/acceptInvitation401Details.ts +12 -0
  51. package/src/generated/model/acceptInvitation403.ts +20 -0
  52. package/src/generated/model/acceptInvitation403Details.ts +12 -0
  53. package/src/generated/model/acceptInvitation404.ts +20 -0
  54. package/src/generated/model/acceptInvitation404Details.ts +12 -0
  55. package/src/generated/model/acceptInvitation409.ts +20 -0
  56. package/src/generated/model/acceptInvitation409Details.ts +12 -0
  57. package/src/generated/model/acceptInvitation429.ts +20 -0
  58. package/src/generated/model/acceptInvitation429Details.ts +12 -0
  59. package/src/generated/model/acceptInvitationBody.ts +19 -0
  60. package/src/generated/model/acceptInvitationDefault.ts +99 -0
  61. package/src/generated/model/addOrigin201.ts +5 -0
  62. package/src/generated/model/addOrigin201Kind.ts +3 -0
  63. package/src/generated/model/addOriginBody.ts +17 -5
  64. package/src/generated/model/addOriginBodyKind.ts +4 -0
  65. package/src/generated/model/beginUserPasskeyRegistration201.ts +3 -3
  66. package/src/generated/model/beginUserPasskeyRegistrationBody.ts +6 -6
  67. package/src/generated/model/buildRelease200.ts +15 -15
  68. package/src/generated/model/buildRelease200Metadata.ts +8 -8
  69. package/src/generated/model/buildRelease200PointersItem.ts +13 -12
  70. package/src/generated/model/buildRelease200PointersItemKind.ts +3 -3
  71. package/src/generated/model/buildRelease201.ts +15 -15
  72. package/src/generated/model/buildRelease201Metadata.ts +8 -8
  73. package/src/generated/model/buildRelease201PointersItem.ts +13 -12
  74. package/src/generated/model/buildRelease201PointersItemKind.ts +3 -3
  75. package/src/generated/model/buildRelease400.ts +1 -3
  76. package/src/generated/model/buildRelease400DetailsResourcesItem.ts +3 -3
  77. package/src/generated/model/buildRelease400DetailsResourcesItemKind.ts +3 -3
  78. package/src/generated/model/buildReleaseBody.ts +19 -16
  79. package/src/generated/model/buildReleaseBodyBundle.ts +31 -28
  80. package/src/generated/model/buildReleaseBodyBundleBranding.ts +26 -24
  81. package/src/generated/model/buildReleaseBodyBundleBrandingLayout.ts +8 -7
  82. package/src/generated/model/buildReleaseBodyBundleBrandingShape.ts +1 -1
  83. package/src/generated/model/buildReleaseBodyBundleBrandingTheme.ts +5 -7
  84. package/src/generated/model/buildReleaseBodyBundleBrandingThemeDark.ts +8 -8
  85. package/src/generated/model/buildReleaseBodyBundleBrandingThemeDarkPalette.ts +63 -62
  86. package/src/generated/model/buildReleaseBodyBundleBrandingThemeLight.ts +8 -8
  87. package/src/generated/model/buildReleaseBodyBundleBrandingThemeLightPalette.ts +63 -62
  88. package/src/generated/model/buildReleaseBodyBundleBrandingTypography.ts +5 -5
  89. package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItem.ts +47 -26
  90. package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItemAudience.ts +1 -1
  91. package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItemStatus.ts +2 -2
  92. package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItemStepsItem.ts +46 -28
  93. package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItemStepsItemActionsItem.ts +9 -7
  94. package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItemStepsItemActionsItemKind.ts +2 -2
  95. package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItemStepsItemGates.ts +11 -10
  96. package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItemStepsItemGatesConfig.ts +1 -1
  97. package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItemStepsItemGatesKind.ts +4 -3
  98. package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItemStepsItemTransitions.ts +40 -20
  99. package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItemStepsItemTransitionsAction.ts +8 -5
  100. package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItemStepsItemTransitionsPurpose.ts +7 -8
  101. package/src/generated/model/buildReleaseBodyBundleIdpsItem.ts +7 -7
  102. package/src/generated/model/buildReleaseBodyBundleIdpsItemClaimMapping.ts +1 -1
  103. package/src/generated/model/buildReleaseBodyBundleIdpsItemOidc.ts +7 -7
  104. package/src/generated/model/buildReleaseBodyBundleIdpsItemOidcStaticAuthorizeParameters.ts +1 -1
  105. package/src/generated/model/buildReleaseBodyBundleIdpsItemProvisioning.ts +1 -1
  106. package/src/generated/model/buildReleaseBodyBundleIdpsItemVerifiedClaims.ts +1 -1
  107. package/src/generated/model/buildReleaseBodyBundlePoliciesItem.ts +3 -3
  108. package/src/generated/model/buildReleaseBodyBundleSchemasItem.ts +23 -22
  109. package/src/generated/model/buildReleaseParams.ts +3 -1
  110. package/src/generated/model/cancelInvitation401.ts +20 -0
  111. package/src/generated/model/cancelInvitation401Details.ts +12 -0
  112. package/src/generated/model/cancelInvitation403.ts +20 -0
  113. package/src/generated/model/cancelInvitation403Details.ts +12 -0
  114. package/src/generated/model/cancelInvitation404.ts +20 -0
  115. package/src/generated/model/cancelInvitation404Details.ts +12 -0
  116. package/src/generated/model/cancelInvitationDefault.ts +81 -0
  117. package/src/generated/model/cancelInvitationParams.ts +17 -0
  118. package/src/generated/model/completeClaim409.ts +2 -2
  119. package/src/generated/model/completeClaimBody.ts +1 -1
  120. package/src/generated/model/createApplication200.ts +137 -0
  121. package/src/generated/model/createApplication200ClientSecretsItem.ts +19 -0
  122. package/src/generated/model/createApplication201.ts +137 -0
  123. package/src/generated/model/createApplication201ClientSecretsItem.ts +19 -0
  124. package/src/generated/model/createApplication400.ts +20 -0
  125. package/src/generated/model/createApplication400Details.ts +12 -0
  126. package/src/generated/model/createApplication401.ts +20 -0
  127. package/src/generated/model/createApplication401Details.ts +12 -0
  128. package/src/generated/model/createApplication403.ts +20 -0
  129. package/src/generated/model/createApplication403Details.ts +12 -0
  130. package/src/generated/model/createApplication404.ts +20 -0
  131. package/src/generated/model/createApplication404Details.ts +12 -0
  132. package/src/generated/model/createApplication409.ts +20 -0
  133. package/src/generated/model/createApplication409Details.ts +12 -0
  134. package/src/generated/model/createApplicationBody.ts +20 -0
  135. package/src/generated/model/createApplicationBodyApplication.ts +35 -0
  136. package/src/generated/model/createApplicationBodyApplicationClientsItem.ts +84 -0
  137. package/src/generated/model/createApplicationBodyApplicationClientsItemGrantTypesItem.ts +15 -0
  138. package/src/generated/model/createApplicationBodyApplicationClientsItemType.ts +19 -0
  139. package/src/generated/model/createApplicationDefault.ts +54 -0
  140. package/src/generated/model/createApplicationParams.ts +17 -0
  141. package/src/generated/model/createAuthAttempt201.ts +23 -22
  142. package/src/generated/model/createAuthAttempt201ChallengesItem.ts +9 -7
  143. package/src/generated/model/createAuthAttempt201ChallengesItemState.ts +1 -1
  144. package/src/generated/model/createAuthAttempt201CompletedFactorsItem.ts +2 -2
  145. package/src/generated/model/createAuthAttempt201CompletedFactorsItemPayload.ts +5 -5
  146. package/src/generated/model/createAuthAttempt201State.ts +2 -2
  147. package/src/generated/model/createAuthAttemptBody.ts +3 -3
  148. package/src/generated/model/createAuthAttemptDefault.ts +63 -0
  149. package/src/generated/model/createBranding201.ts +10 -10
  150. package/src/generated/model/createBranding201Branding.ts +26 -24
  151. package/src/generated/model/createBranding201BrandingLayout.ts +8 -7
  152. package/src/generated/model/createBranding201BrandingShape.ts +1 -1
  153. package/src/generated/model/createBranding201BrandingTheme.ts +5 -7
  154. package/src/generated/model/createBranding201BrandingThemeDark.ts +8 -8
  155. package/src/generated/model/createBranding201BrandingThemeDarkPalette.ts +63 -62
  156. package/src/generated/model/createBranding201BrandingThemeLight.ts +8 -8
  157. package/src/generated/model/createBranding201BrandingThemeLightPalette.ts +63 -62
  158. package/src/generated/model/createBranding201BrandingTypography.ts +5 -5
  159. package/src/generated/model/createBrandingBody.ts +26 -24
  160. package/src/generated/model/createBrandingBodyLayout.ts +8 -7
  161. package/src/generated/model/createBrandingBodyShape.ts +1 -1
  162. package/src/generated/model/createBrandingBodyTheme.ts +5 -7
  163. package/src/generated/model/createBrandingBodyThemeDark.ts +8 -8
  164. package/src/generated/model/createBrandingBodyThemeDarkPalette.ts +63 -62
  165. package/src/generated/model/createBrandingBodyThemeLight.ts +8 -8
  166. package/src/generated/model/createBrandingBodyThemeLightPalette.ts +63 -62
  167. package/src/generated/model/createBrandingBodyTypography.ts +5 -5
  168. package/src/generated/model/createBrandingParams.ts +3 -1
  169. package/src/generated/model/createDeployment200.ts +19 -15
  170. package/src/generated/model/createDeployment200Metadata.ts +1 -1
  171. package/src/generated/model/createDeployment200Release.ts +15 -15
  172. package/src/generated/model/createDeployment200ReleaseMetadata.ts +8 -8
  173. package/src/generated/model/createDeployment200ReleasePointersItem.ts +13 -12
  174. package/src/generated/model/createDeployment200ReleasePointersItemKind.ts +3 -3
  175. package/src/generated/model/createDeployment200Status.ts +4 -3
  176. package/src/generated/model/createDeployment201.ts +19 -15
  177. package/src/generated/model/createDeployment201Metadata.ts +1 -1
  178. package/src/generated/model/createDeployment201Release.ts +15 -15
  179. package/src/generated/model/createDeployment201ReleaseMetadata.ts +8 -8
  180. package/src/generated/model/createDeployment201ReleasePointersItem.ts +13 -12
  181. package/src/generated/model/createDeployment201ReleasePointersItemKind.ts +3 -3
  182. package/src/generated/model/createDeployment201Status.ts +4 -3
  183. package/src/generated/model/createDeployment409.ts +42 -40
  184. package/src/generated/model/createDeploymentBody.ts +4 -10
  185. package/src/generated/model/createDeploymentParams.ts +3 -1
  186. package/src/generated/model/createFlow201.ts +16 -12
  187. package/src/generated/model/createFlow201Branding.ts +26 -24
  188. package/src/generated/model/createFlow201BrandingLayout.ts +8 -7
  189. package/src/generated/model/createFlow201BrandingShape.ts +1 -1
  190. package/src/generated/model/createFlow201BrandingTheme.ts +5 -7
  191. package/src/generated/model/createFlow201BrandingThemeDark.ts +8 -8
  192. package/src/generated/model/createFlow201BrandingThemeDarkPalette.ts +63 -62
  193. package/src/generated/model/createFlow201BrandingThemeLight.ts +8 -8
  194. package/src/generated/model/createFlow201BrandingThemeLightPalette.ts +63 -62
  195. package/src/generated/model/createFlow201BrandingTypography.ts +5 -5
  196. package/src/generated/model/createFlow201Step.ts +36 -31
  197. package/src/generated/model/createFlow201StepActionsItem.ts +3 -3
  198. package/src/generated/model/createFlow201StepActionsItemKind.ts +1 -1
  199. package/src/generated/model/createFlow201StepChallenge.ts +4 -3
  200. package/src/generated/model/createFlow201StepComplete.ts +1 -1
  201. package/src/generated/model/createFlow201StepFieldsItem.ts +19 -15
  202. package/src/generated/model/createFlow201StepFieldsItemType.ts +7 -3
  203. package/src/generated/model/createFlow201StepFieldsItemValidation.ts +2 -2
  204. package/src/generated/model/createFlow201StepFieldsItemValidationFormat.ts +1 -1
  205. package/src/generated/model/createFlow201StepGates.ts +10 -8
  206. package/src/generated/model/createFlow201StepGatesConfig.ts +1 -1
  207. package/src/generated/model/createFlow201StepGatesKind.ts +4 -3
  208. package/src/generated/model/createFlow201StepIdentifier.ts +6 -6
  209. package/src/generated/model/createFlow201StepSsoProvidersItem.ts +1 -1
  210. package/src/generated/model/createFlow201StepTexts.ts +1 -1
  211. package/src/generated/model/createFlowBody.ts +7 -2
  212. package/src/generated/model/createFlowBodyHint.ts +4 -1
  213. package/src/generated/model/createFlowBodyPurpose.ts +3 -0
  214. package/src/generated/model/createFlowDefault.ts +9 -0
  215. package/src/generated/model/createFlowDefinition201.ts +22 -10
  216. package/src/generated/model/createFlowDefinition201FlowDefinition.ts +47 -26
  217. package/src/generated/model/createFlowDefinition201FlowDefinitionAudience.ts +1 -1
  218. package/src/generated/model/createFlowDefinition201FlowDefinitionStatus.ts +2 -2
  219. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItem.ts +46 -28
  220. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemActionsItem.ts +9 -7
  221. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemActionsItemKind.ts +2 -2
  222. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemGates.ts +11 -10
  223. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemGatesConfig.ts +1 -1
  224. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemGatesKind.ts +4 -3
  225. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemTransitions.ts +40 -20
  226. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemTransitionsAction.ts +8 -5
  227. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemTransitionsPurpose.ts +7 -8
  228. package/src/generated/model/createFlowDefinition201UserSchema.ts +2 -2
  229. package/src/generated/model/createFlowDefinition201UserSchemaMetadata.ts +2 -1
  230. package/src/generated/model/createFlowDefinition201UserSchemaSchema.ts +21 -20
  231. package/src/generated/model/createFlowDefinitionBody.ts +22 -12
  232. package/src/generated/model/createFlowDefinitionBodyFlowDefinition.ts +47 -26
  233. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionAudience.ts +1 -1
  234. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStatus.ts +2 -2
  235. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItem.ts +46 -28
  236. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemActionsItem.ts +9 -7
  237. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemActionsItemKind.ts +2 -2
  238. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemGates.ts +11 -10
  239. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemGatesConfig.ts +1 -1
  240. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemGatesKind.ts +4 -3
  241. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemTransitions.ts +40 -20
  242. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemTransitionsAction.ts +8 -5
  243. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemTransitionsPurpose.ts +7 -8
  244. package/src/generated/model/createGrant201.ts +14 -14
  245. package/src/generated/model/createGrant201ObjectType.ts +1 -1
  246. package/src/generated/model/createGrant201Relation.ts +1 -1
  247. package/src/generated/model/createGrant201Team.ts +7 -7
  248. package/src/generated/model/createGrant201TeamStatus.ts +2 -2
  249. package/src/generated/model/createGrant201User.ts +5 -5
  250. package/src/generated/model/createGrant201UserMetadata.ts +10 -11
  251. package/src/generated/model/createGrant201UserMetadataLifecycleOwnerTeam.ts +11 -12
  252. package/src/generated/model/createGrant201UserMetadataLifecycleOwnerTeamStatus.ts +2 -2
  253. package/src/generated/model/createGrantBody.ts +12 -12
  254. package/src/generated/model/createGrantBodyRelation.ts +1 -1
  255. package/src/generated/model/createGrantBodyTeam.ts +3 -3
  256. package/src/generated/model/createGrantBodyUser.ts +5 -5
  257. package/src/generated/model/createGrantDefault.ts +9 -0
  258. package/src/generated/model/createGrantParams.ts +3 -1
  259. package/src/generated/model/createHandoff200.ts +9 -10
  260. package/src/generated/model/createIdp200.ts +10 -9
  261. package/src/generated/model/createIdp200Definition.ts +7 -7
  262. package/src/generated/model/createIdp200DefinitionClaimMapping.ts +1 -1
  263. package/src/generated/model/createIdp200DefinitionOidc.ts +7 -7
  264. package/src/generated/model/createIdp200DefinitionOidcStaticAuthorizeParameters.ts +1 -1
  265. package/src/generated/model/createIdp200DefinitionProvisioning.ts +1 -1
  266. package/src/generated/model/createIdp200DefinitionVerifiedClaims.ts +1 -1
  267. package/src/generated/model/createIdp201.ts +10 -9
  268. package/src/generated/model/createIdp201Definition.ts +7 -7
  269. package/src/generated/model/createIdp201DefinitionClaimMapping.ts +1 -1
  270. package/src/generated/model/createIdp201DefinitionOidc.ts +7 -7
  271. package/src/generated/model/createIdp201DefinitionOidcStaticAuthorizeParameters.ts +1 -1
  272. package/src/generated/model/createIdp201DefinitionProvisioning.ts +1 -1
  273. package/src/generated/model/createIdp201DefinitionVerifiedClaims.ts +1 -1
  274. package/src/generated/model/createIdpBody.ts +1 -1
  275. package/src/generated/model/createIdpBodyIdp.ts +7 -7
  276. package/src/generated/model/createIdpBodyIdpClaimMapping.ts +1 -1
  277. package/src/generated/model/createIdpBodyIdpOidc.ts +7 -7
  278. package/src/generated/model/createIdpBodyIdpOidcStaticAuthorizeParameters.ts +1 -1
  279. package/src/generated/model/createIdpBodyIdpProvisioning.ts +1 -1
  280. package/src/generated/model/createIdpBodyIdpVerifiedClaims.ts +1 -1
  281. package/src/generated/model/createIdpParams.ts +3 -1
  282. package/src/generated/model/createInvitation201.ts +136 -0
  283. package/src/generated/model/createInvitation400.ts +20 -0
  284. package/src/generated/model/createInvitation400Details.ts +12 -0
  285. package/src/generated/model/createInvitation401.ts +20 -0
  286. package/src/generated/model/createInvitation401Details.ts +12 -0
  287. package/src/generated/model/createInvitation403.ts +20 -0
  288. package/src/generated/model/createInvitation403Details.ts +12 -0
  289. package/src/generated/model/createInvitation404.ts +20 -0
  290. package/src/generated/model/createInvitation404Details.ts +12 -0
  291. package/src/generated/model/createInvitation409.ts +20 -0
  292. package/src/generated/model/createInvitation409Details.ts +12 -0
  293. package/src/generated/model/createInvitation501.ts +23 -0
  294. package/src/generated/model/createInvitationBody.ts +72 -0
  295. package/src/generated/model/createInvitationDefault.ts +117 -0
  296. package/src/generated/model/createInvitationParams.ts +17 -0
  297. package/src/generated/model/createProject201.ts +10 -5
  298. package/src/generated/model/createProject201OriginsItem.ts +17 -5
  299. package/src/generated/model/createProject201OriginsItemKind.ts +4 -0
  300. package/src/generated/model/createProjectBody.ts +5 -6
  301. package/src/generated/model/createProjectBodyOriginsItem.ts +17 -5
  302. package/src/generated/model/createProjectBodyOriginsItemKind.ts +4 -0
  303. package/src/generated/model/createRelease200.ts +15 -15
  304. package/src/generated/model/createRelease200Metadata.ts +8 -8
  305. package/src/generated/model/createRelease200PointersItem.ts +13 -12
  306. package/src/generated/model/createRelease200PointersItemKind.ts +3 -3
  307. package/src/generated/model/createRelease201.ts +15 -15
  308. package/src/generated/model/createRelease201Metadata.ts +8 -8
  309. package/src/generated/model/createRelease201PointersItem.ts +13 -12
  310. package/src/generated/model/createRelease201PointersItemKind.ts +3 -3
  311. package/src/generated/model/createReleaseBody.ts +7 -11
  312. package/src/generated/model/createReleaseBodyPointersItem.ts +8 -8
  313. package/src/generated/model/createReleaseBodyPointersItemKind.ts +3 -3
  314. package/src/generated/model/createReleaseParams.ts +3 -1
  315. package/src/generated/model/createSchema201.ts +1 -1
  316. package/src/generated/model/createSchemaBody.ts +23 -22
  317. package/src/generated/model/createSchemaParams.ts +4 -2
  318. package/src/generated/model/createSession201.ts +8 -8
  319. package/src/generated/model/createSession201Session.ts +16 -16
  320. package/src/generated/model/createSession201SessionFactorsItem.ts +2 -2
  321. package/src/generated/model/createSession201SessionFactorsItemPayload.ts +5 -5
  322. package/src/generated/model/createSession201SessionState.ts +1 -1
  323. package/src/generated/model/createSession201SessionUser.ts +5 -5
  324. package/src/generated/model/createSessionBody.ts +1 -1
  325. package/src/generated/model/createSessionDefault.ts +9 -0
  326. package/src/generated/model/createTeam201.ts +2 -2
  327. package/src/generated/model/createTeam201Status.ts +2 -2
  328. package/src/generated/model/createTeamBody.ts +1 -1
  329. package/src/generated/model/createTeamParams.ts +3 -1
  330. package/src/generated/model/createUser201.ts +28 -29
  331. package/src/generated/model/createUser201Metadata.ts +10 -11
  332. package/src/generated/model/createUser201MetadataLifecycleOwnerTeam.ts +11 -12
  333. package/src/generated/model/createUser201MetadataLifecycleOwnerTeamStatus.ts +2 -2
  334. package/src/generated/model/createUser201TeamsItem.ts +4 -4
  335. package/src/generated/model/createUserBody.ts +9 -8
  336. package/src/generated/model/createUserParams.ts +4 -2
  337. package/src/generated/model/deleteGrantParams.ts +3 -1
  338. package/src/generated/model/deleteVariableParams.ts +3 -1
  339. package/src/generated/model/evaluatePolicy200.ts +5 -4
  340. package/src/generated/model/evaluatePolicy200Violations.ts +4 -3
  341. package/src/generated/model/evaluatePolicyBody.ts +8 -9
  342. package/src/generated/model/evaluatePolicyParams.ts +3 -1
  343. package/src/generated/model/exchangeHandoff200.ts +8 -8
  344. package/src/generated/model/exchangeHandoff200Session.ts +16 -16
  345. package/src/generated/model/exchangeHandoff200SessionFactorsItem.ts +2 -2
  346. package/src/generated/model/exchangeHandoff200SessionFactorsItemPayload.ts +5 -5
  347. package/src/generated/model/exchangeHandoff200SessionState.ts +1 -1
  348. package/src/generated/model/exchangeHandoff200SessionUser.ts +5 -5
  349. package/src/generated/model/exchangeHandoffBody.ts +7 -5
  350. package/src/generated/model/exchangeHandoffParams.ts +3 -1
  351. package/src/generated/model/finishUserPasskeyRegistrationBody.ts +1 -1
  352. package/src/generated/model/getApplicationById200.ts +43 -0
  353. package/src/generated/model/getApplicationById200Definition.ts +35 -0
  354. package/src/generated/model/getApplicationById200DefinitionClientsItem.ts +84 -0
  355. package/src/generated/model/getApplicationById200DefinitionClientsItemGrantTypesItem.ts +15 -0
  356. package/src/generated/model/getApplicationById200DefinitionClientsItemType.ts +19 -0
  357. package/src/generated/model/getApplicationById401.ts +20 -0
  358. package/src/generated/model/getApplicationById401Details.ts +12 -0
  359. package/src/generated/model/getApplicationById403.ts +20 -0
  360. package/src/generated/model/getApplicationById403Details.ts +12 -0
  361. package/src/generated/model/getApplicationById404.ts +20 -0
  362. package/src/generated/model/getApplicationById404Details.ts +12 -0
  363. package/src/generated/model/getApplicationByIdDefault.ts +54 -0
  364. package/src/generated/model/getApplicationByIdParams.ts +17 -0
  365. package/src/generated/model/getAuthAttempt200.ts +23 -22
  366. package/src/generated/model/getAuthAttempt200ChallengesItem.ts +9 -7
  367. package/src/generated/model/getAuthAttempt200ChallengesItemState.ts +1 -1
  368. package/src/generated/model/getAuthAttempt200CompletedFactorsItem.ts +2 -2
  369. package/src/generated/model/getAuthAttempt200CompletedFactorsItemPayload.ts +5 -5
  370. package/src/generated/model/getAuthAttempt200State.ts +2 -2
  371. package/src/generated/model/getBrandingById200.ts +10 -10
  372. package/src/generated/model/getBrandingById200Branding.ts +26 -24
  373. package/src/generated/model/getBrandingById200BrandingLayout.ts +8 -7
  374. package/src/generated/model/getBrandingById200BrandingShape.ts +1 -1
  375. package/src/generated/model/getBrandingById200BrandingTheme.ts +5 -7
  376. package/src/generated/model/getBrandingById200BrandingThemeDark.ts +8 -8
  377. package/src/generated/model/getBrandingById200BrandingThemeDarkPalette.ts +63 -62
  378. package/src/generated/model/getBrandingById200BrandingThemeLight.ts +8 -8
  379. package/src/generated/model/getBrandingById200BrandingThemeLightPalette.ts +63 -62
  380. package/src/generated/model/getBrandingById200BrandingTypography.ts +5 -5
  381. package/src/generated/model/getClaimStatus200.ts +4 -5
  382. package/src/generated/model/getClaimStatusParams.ts +1 -1
  383. package/src/generated/model/getClaimWindow200.ts +6 -6
  384. package/src/generated/model/getClaimWindowParams.ts +1 -1
  385. package/src/generated/model/getDeploymentById200.ts +19 -15
  386. package/src/generated/model/getDeploymentById200Metadata.ts +1 -1
  387. package/src/generated/model/getDeploymentById200Release.ts +15 -15
  388. package/src/generated/model/getDeploymentById200ReleaseMetadata.ts +8 -8
  389. package/src/generated/model/getDeploymentById200ReleasePointersItem.ts +13 -12
  390. package/src/generated/model/getDeploymentById200ReleasePointersItemKind.ts +3 -3
  391. package/src/generated/model/getDeploymentById200Status.ts +4 -3
  392. package/src/generated/model/getDeploymentByIdParams.ts +3 -1
  393. package/src/generated/model/getDeploymentVariablesParams.ts +3 -1
  394. package/src/generated/model/getEvent200.ts +1984 -1323
  395. package/src/generated/model/getEventParams.ts +3 -1
  396. package/src/generated/model/getFlowDefinition200.ts +22 -10
  397. package/src/generated/model/getFlowDefinition200FlowDefinition.ts +47 -26
  398. package/src/generated/model/getFlowDefinition200FlowDefinitionAudience.ts +1 -1
  399. package/src/generated/model/getFlowDefinition200FlowDefinitionStatus.ts +2 -2
  400. package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItem.ts +46 -28
  401. package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemActionsItem.ts +9 -7
  402. package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemActionsItemKind.ts +2 -2
  403. package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemGates.ts +11 -10
  404. package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemGatesConfig.ts +1 -1
  405. package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemGatesKind.ts +4 -3
  406. package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemTransitions.ts +40 -20
  407. package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemTransitionsAction.ts +8 -5
  408. package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemTransitionsPurpose.ts +7 -8
  409. package/src/generated/model/getFlowDefinition200UserSchema.ts +2 -2
  410. package/src/generated/model/getFlowDefinition200UserSchemaMetadata.ts +2 -1
  411. package/src/generated/model/getFlowDefinition200UserSchemaSchema.ts +21 -20
  412. package/src/generated/model/getFlowStep200.ts +16 -12
  413. package/src/generated/model/getFlowStep200Branding.ts +26 -24
  414. package/src/generated/model/getFlowStep200BrandingLayout.ts +8 -7
  415. package/src/generated/model/getFlowStep200BrandingShape.ts +1 -1
  416. package/src/generated/model/getFlowStep200BrandingTheme.ts +5 -7
  417. package/src/generated/model/getFlowStep200BrandingThemeDark.ts +8 -8
  418. package/src/generated/model/getFlowStep200BrandingThemeDarkPalette.ts +63 -62
  419. package/src/generated/model/getFlowStep200BrandingThemeLight.ts +8 -8
  420. package/src/generated/model/getFlowStep200BrandingThemeLightPalette.ts +63 -62
  421. package/src/generated/model/getFlowStep200BrandingTypography.ts +5 -5
  422. package/src/generated/model/getFlowStep200Step.ts +36 -31
  423. package/src/generated/model/getFlowStep200StepActionsItem.ts +3 -3
  424. package/src/generated/model/getFlowStep200StepActionsItemKind.ts +1 -1
  425. package/src/generated/model/getFlowStep200StepChallenge.ts +4 -3
  426. package/src/generated/model/getFlowStep200StepComplete.ts +1 -1
  427. package/src/generated/model/getFlowStep200StepFieldsItem.ts +19 -15
  428. package/src/generated/model/getFlowStep200StepFieldsItemType.ts +7 -3
  429. package/src/generated/model/getFlowStep200StepFieldsItemValidation.ts +2 -2
  430. package/src/generated/model/getFlowStep200StepFieldsItemValidationFormat.ts +1 -1
  431. package/src/generated/model/getFlowStep200StepGates.ts +10 -8
  432. package/src/generated/model/getFlowStep200StepGatesConfig.ts +1 -1
  433. package/src/generated/model/getFlowStep200StepGatesKind.ts +4 -3
  434. package/src/generated/model/getFlowStep200StepIdentifier.ts +6 -6
  435. package/src/generated/model/getFlowStep200StepSsoProvidersItem.ts +1 -1
  436. package/src/generated/model/getFlowStep200StepTexts.ts +1 -1
  437. package/src/generated/model/getFlowStepDefault.ts +18 -0
  438. package/src/generated/model/getGrant200.ts +14 -14
  439. package/src/generated/model/getGrant200ObjectType.ts +1 -1
  440. package/src/generated/model/getGrant200Relation.ts +1 -1
  441. package/src/generated/model/getGrant200Team.ts +7 -7
  442. package/src/generated/model/getGrant200TeamStatus.ts +2 -2
  443. package/src/generated/model/getGrant200User.ts +5 -5
  444. package/src/generated/model/getGrant200UserMetadata.ts +10 -11
  445. package/src/generated/model/getGrant200UserMetadataLifecycleOwnerTeam.ts +11 -12
  446. package/src/generated/model/getGrant200UserMetadataLifecycleOwnerTeamStatus.ts +2 -2
  447. package/src/generated/model/getGrantDefault.ts +0 -9
  448. package/src/generated/model/getGrantExpandItem.ts +8 -5
  449. package/src/generated/model/getGrantParams.ts +6 -3
  450. package/src/generated/model/getIdpById200.ts +10 -9
  451. package/src/generated/model/getIdpById200Definition.ts +7 -7
  452. package/src/generated/model/getIdpById200DefinitionClaimMapping.ts +1 -1
  453. package/src/generated/model/getIdpById200DefinitionOidc.ts +7 -7
  454. package/src/generated/model/getIdpById200DefinitionOidcStaticAuthorizeParameters.ts +1 -1
  455. package/src/generated/model/getIdpById200DefinitionProvisioning.ts +1 -1
  456. package/src/generated/model/getIdpById200DefinitionVerifiedClaims.ts +1 -1
  457. package/src/generated/model/getIdpByIdParams.ts +3 -1
  458. package/src/generated/model/getIdpRevisionById200.ts +10 -9
  459. package/src/generated/model/getIdpRevisionById200Definition.ts +7 -7
  460. package/src/generated/model/getIdpRevisionById200DefinitionClaimMapping.ts +1 -1
  461. package/src/generated/model/getIdpRevisionById200DefinitionOidc.ts +7 -7
  462. package/src/generated/model/getIdpRevisionById200DefinitionOidcStaticAuthorizeParameters.ts +1 -1
  463. package/src/generated/model/getIdpRevisionById200DefinitionProvisioning.ts +1 -1
  464. package/src/generated/model/getIdpRevisionById200DefinitionVerifiedClaims.ts +1 -1
  465. package/src/generated/model/getIdpRevisionByIdParams.ts +3 -1
  466. package/src/generated/model/getInvitation200.ts +126 -0
  467. package/src/generated/model/getInvitation401.ts +20 -0
  468. package/src/generated/model/getInvitation401Details.ts +12 -0
  469. package/src/generated/model/getInvitation403.ts +20 -0
  470. package/src/generated/model/getInvitation403Details.ts +12 -0
  471. package/src/generated/model/getInvitation404.ts +20 -0
  472. package/src/generated/model/getInvitation404Details.ts +12 -0
  473. package/src/generated/model/getInvitationDefault.ts +72 -0
  474. package/src/generated/model/getInvitationParams.ts +17 -0
  475. package/src/generated/model/getMyPasswordState200.ts +2 -2
  476. package/src/generated/model/getMySession200.ts +16 -16
  477. package/src/generated/model/getMySession200FactorsItem.ts +2 -2
  478. package/src/generated/model/getMySession200FactorsItemPayload.ts +5 -5
  479. package/src/generated/model/getMySession200State.ts +1 -1
  480. package/src/generated/model/getMySession200User.ts +5 -5
  481. package/src/generated/model/getMySessionCsrfToken200.ts +1 -1
  482. package/src/generated/model/getMyUser200.ts +28 -29
  483. package/src/generated/model/getMyUser200Metadata.ts +10 -11
  484. package/src/generated/model/getMyUser200MetadataLifecycleOwnerTeam.ts +11 -12
  485. package/src/generated/model/getMyUser200MetadataLifecycleOwnerTeamStatus.ts +2 -2
  486. package/src/generated/model/getMyUser200TeamsItem.ts +4 -4
  487. package/src/generated/model/getMyUserSchema200.ts +4 -4
  488. package/src/generated/model/getMyUserSchema200Metadata.ts +2 -1
  489. package/src/generated/model/getMyUserSchema200Schema.ts +21 -20
  490. package/src/generated/model/getPolicy200.ts +3 -3
  491. package/src/generated/model/getPolicyParams.ts +3 -1
  492. package/src/generated/model/getPolicyRevision200.ts +3 -3
  493. package/src/generated/model/getPolicyRevisionParams.ts +3 -1
  494. package/src/generated/model/getProject200.ts +34 -30
  495. package/src/generated/model/getReleaseById200.ts +15 -15
  496. package/src/generated/model/getReleaseById200Metadata.ts +8 -8
  497. package/src/generated/model/getReleaseById200PointersItem.ts +13 -12
  498. package/src/generated/model/getReleaseById200PointersItemKind.ts +3 -3
  499. package/src/generated/model/getReleaseByIdParams.ts +3 -1
  500. package/src/generated/model/getSchemaById200.ts +4 -4
  501. package/src/generated/model/getSchemaById200Metadata.ts +2 -1
  502. package/src/generated/model/getSchemaById200Schema.ts +21 -20
  503. package/src/generated/model/getSchemaByIdParams.ts +3 -3
  504. package/src/generated/model/getSession200.ts +16 -16
  505. package/src/generated/model/getSession200FactorsItem.ts +2 -2
  506. package/src/generated/model/getSession200FactorsItemPayload.ts +5 -5
  507. package/src/generated/model/getSession200State.ts +1 -1
  508. package/src/generated/model/getSession200User.ts +5 -5
  509. package/src/generated/model/getTeam200.ts +2 -2
  510. package/src/generated/model/getTeam200Status.ts +2 -2
  511. package/src/generated/model/getUserByID200.ts +28 -29
  512. package/src/generated/model/getUserByID200Metadata.ts +10 -11
  513. package/src/generated/model/getUserByID200MetadataLifecycleOwnerTeam.ts +11 -12
  514. package/src/generated/model/getUserByID200MetadataLifecycleOwnerTeamStatus.ts +2 -2
  515. package/src/generated/model/getUserByID200TeamsItem.ts +4 -4
  516. package/src/generated/model/getUserByIDParams.ts +4 -3
  517. package/src/generated/model/getUserPasswordState200.ts +2 -2
  518. package/src/generated/model/getVariable200.ts +4 -4
  519. package/src/generated/model/getVariable200Preview.ts +2 -2
  520. package/src/generated/model/getVariable200Primary.ts +2 -2
  521. package/src/generated/model/getVariableParams.ts +3 -1
  522. package/src/generated/model/getVariables200.ts +4 -4
  523. package/src/generated/model/getVariables200Preview.ts +2 -2
  524. package/src/generated/model/getVariables200Primary.ts +2 -2
  525. package/src/generated/model/getVariablesParams.ts +3 -1
  526. package/src/generated/model/index.ts +138 -0
  527. package/src/generated/model/initClaim201.ts +3 -3
  528. package/src/generated/model/initClaim409.ts +2 -2
  529. package/src/generated/model/issueChallenge201.ts +9 -7
  530. package/src/generated/model/issueChallenge201State.ts +1 -1
  531. package/src/generated/model/issueChallengeBody.ts +2 -2
  532. package/src/generated/model/listBrandingParams.ts +3 -1
  533. package/src/generated/model/listDeployments200DeploymentsItem.ts +19 -15
  534. package/src/generated/model/listDeployments200DeploymentsItemMetadata.ts +1 -1
  535. package/src/generated/model/listDeployments200DeploymentsItemRelease.ts +15 -15
  536. package/src/generated/model/listDeployments200DeploymentsItemReleaseMetadata.ts +8 -8
  537. package/src/generated/model/listDeployments200DeploymentsItemReleasePointersItem.ts +13 -12
  538. package/src/generated/model/listDeployments200DeploymentsItemReleasePointersItemKind.ts +3 -3
  539. package/src/generated/model/listDeployments200DeploymentsItemStatus.ts +4 -3
  540. package/src/generated/model/listDeploymentsExpandItem.ts +4 -4
  541. package/src/generated/model/listDeploymentsParams.ts +3 -1
  542. package/src/generated/model/listEvents200.ts +9 -2
  543. package/src/generated/model/listEvents200DataItem.ts +1984 -1323
  544. package/src/generated/model/listEventsParams.ts +53 -6
  545. package/src/generated/model/listEventsStatusClassItem.ts +18 -0
  546. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItem.ts +22 -10
  547. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinition.ts +47 -26
  548. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionAudience.ts +1 -1
  549. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStatus.ts +2 -2
  550. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItem.ts +46 -28
  551. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemActionsItem.ts +9 -7
  552. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemActionsItemKind.ts +2 -2
  553. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemGates.ts +11 -10
  554. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemGatesConfig.ts +1 -1
  555. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemGatesKind.ts +4 -3
  556. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemTransitions.ts +40 -20
  557. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemTransitionsAction.ts +8 -5
  558. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemTransitionsPurpose.ts +7 -8
  559. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemUserSchema.ts +2 -2
  560. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemUserSchemaMetadata.ts +2 -1
  561. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemUserSchemaSchema.ts +21 -20
  562. package/src/generated/model/listFlowDefinitionsExpandItem.ts +2 -2
  563. package/src/generated/model/listFlowDefinitionsParams.ts +8 -6
  564. package/src/generated/model/listIdpRevisions200.ts +1 -2
  565. package/src/generated/model/listIdpRevisions200RevisionsItem.ts +10 -9
  566. package/src/generated/model/listIdpRevisions200RevisionsItemDefinition.ts +7 -7
  567. package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionClaimMapping.ts +1 -1
  568. package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionOidc.ts +7 -7
  569. package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionOidcStaticAuthorizeParameters.ts +1 -1
  570. package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionProvisioning.ts +1 -1
  571. package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionVerifiedClaims.ts +1 -1
  572. package/src/generated/model/listIdpRevisionsParams.ts +3 -1
  573. package/src/generated/model/listInvitations200.ts +20 -0
  574. package/src/generated/model/listInvitations200InvitationsItem.ts +126 -0
  575. package/src/generated/model/listInvitations400.ts +20 -0
  576. package/src/generated/model/listInvitations400Details.ts +12 -0
  577. package/src/generated/model/listInvitations401.ts +20 -0
  578. package/src/generated/model/listInvitations401Details.ts +12 -0
  579. package/src/generated/model/listInvitations403.ts +20 -0
  580. package/src/generated/model/listInvitations403Details.ts +12 -0
  581. package/src/generated/model/listInvitations404.ts +20 -0
  582. package/src/generated/model/listInvitations404Details.ts +12 -0
  583. package/src/generated/model/listInvitationsDefault.ts +72 -0
  584. package/src/generated/model/listInvitationsParams.ts +42 -0
  585. package/src/generated/model/listInvitationsStatus.ts +17 -0
  586. package/src/generated/model/listInvitationsType.ts +15 -0
  587. package/src/generated/model/listMyIdentityLinks200IdentityLinksItem.ts +2 -2
  588. package/src/generated/model/listMyProjects200.ts +1 -1
  589. package/src/generated/model/listMyProjects200ProjectsItem.ts +2 -3
  590. package/src/generated/model/listMyProjects200ProjectsItemOriginsItem.ts +17 -5
  591. package/src/generated/model/listMyProjects200ProjectsItemOriginsItemKind.ts +4 -0
  592. package/src/generated/model/listMyProjects200ProjectsItemPasswordHash.ts +12 -15
  593. package/src/generated/model/listMyProjects200ProjectsItemPasswordHashAlgorithm.ts +1 -1
  594. package/src/generated/model/listMyProjects200ProjectsItemPasswordHashParams.ts +15 -18
  595. package/src/generated/model/listMyProjects200ProjectsItemPasswordHashParamsHash.ts +4 -4
  596. package/src/generated/model/listMyProjectsOrder.ts +15 -0
  597. package/src/generated/model/listMyProjectsParams.ts +10 -0
  598. package/src/generated/model/listMyTeams200TeamsItem.ts +4 -4
  599. package/src/generated/model/listPolicies200.ts +2 -2
  600. package/src/generated/model/listPolicies200PoliciesItem.ts +3 -3
  601. package/src/generated/model/listPoliciesParams.ts +3 -1
  602. package/src/generated/model/listPolicyRevisions200.ts +1 -1
  603. package/src/generated/model/listPolicyRevisions200RevisionsItem.ts +3 -3
  604. package/src/generated/model/listPolicyRevisionsParams.ts +3 -1
  605. package/src/generated/model/listPreviews200PreviewsItem.ts +4 -5
  606. package/src/generated/model/listProjectAdmins200AdminsItem.ts +3 -3
  607. package/src/generated/model/listProjectAdmins200AdminsItemSourcesItem.ts +13 -15
  608. package/src/generated/model/listProjectAdmins200AdminsItemUser.ts +5 -5
  609. package/src/generated/model/listReleases200.ts +1 -1
  610. package/src/generated/model/listReleases200ReleasesItem.ts +4 -4
  611. package/src/generated/model/listReleases200ReleasesItemMetadata.ts +8 -8
  612. package/src/generated/model/listReleasesParams.ts +4 -2
  613. package/src/generated/model/listSchemas200.ts +1 -1
  614. package/src/generated/model/listSchemas200SchemasItem.ts +4 -4
  615. package/src/generated/model/listSchemas200SchemasItemMetadata.ts +2 -1
  616. package/src/generated/model/listSchemas200SchemasItemSchema.ts +21 -20
  617. package/src/generated/model/listSchemasExpandItem.ts +2 -2
  618. package/src/generated/model/listSchemasParams.ts +7 -5
  619. package/src/generated/model/listUserIdentityLinks200IdentityLinksItem.ts +2 -2
  620. package/src/generated/model/listUserTeams200TeamsItem.ts +4 -4
  621. package/src/generated/model/lookupInvitation200.ts +63 -0
  622. package/src/generated/model/lookupInvitation400.ts +20 -0
  623. package/src/generated/model/lookupInvitation400Details.ts +12 -0
  624. package/src/generated/model/lookupInvitation401.ts +20 -0
  625. package/src/generated/model/lookupInvitation401Details.ts +12 -0
  626. package/src/generated/model/lookupInvitation404.ts +20 -0
  627. package/src/generated/model/lookupInvitation404Details.ts +12 -0
  628. package/src/generated/model/lookupInvitation429.ts +20 -0
  629. package/src/generated/model/lookupInvitation429Details.ts +12 -0
  630. package/src/generated/model/lookupInvitationBody.ts +19 -0
  631. package/src/generated/model/lookupInvitationDefault.ts +72 -0
  632. package/src/generated/model/patchMyUser200.ts +28 -29
  633. package/src/generated/model/patchMyUser200Metadata.ts +10 -11
  634. package/src/generated/model/patchMyUser200MetadataLifecycleOwnerTeam.ts +11 -12
  635. package/src/generated/model/patchMyUser200MetadataLifecycleOwnerTeamStatus.ts +2 -2
  636. package/src/generated/model/patchMyUser200TeamsItem.ts +4 -4
  637. package/src/generated/model/patchMyUserBody.ts +2 -2
  638. package/src/generated/model/patchProject200.ts +34 -30
  639. package/src/generated/model/patchProjectBody.ts +3 -3
  640. package/src/generated/model/patchProjectBodyPasswordHash.ts +15 -18
  641. package/src/generated/model/patchProjectBodyPasswordHashAlgorithm.ts +1 -1
  642. package/src/generated/model/patchProjectBodyPasswordHashParams.ts +15 -18
  643. package/src/generated/model/patchProjectBodyPasswordHashParamsHash.ts +4 -4
  644. package/src/generated/model/patchUserByID200.ts +28 -29
  645. package/src/generated/model/patchUserByID200Metadata.ts +10 -11
  646. package/src/generated/model/patchUserByID200MetadataLifecycleOwnerTeam.ts +11 -12
  647. package/src/generated/model/patchUserByID200MetadataLifecycleOwnerTeamStatus.ts +2 -2
  648. package/src/generated/model/patchUserByID200TeamsItem.ts +4 -4
  649. package/src/generated/model/patchUserByIDBody.ts +21 -13
  650. package/src/generated/model/publishPolicy201.ts +3 -3
  651. package/src/generated/model/publishPolicyBody.ts +3 -3
  652. package/src/generated/model/publishPolicyParams.ts +3 -1
  653. package/src/generated/model/queryGrants200GrantsItem.ts +14 -14
  654. package/src/generated/model/queryGrants200GrantsItemObjectType.ts +1 -1
  655. package/src/generated/model/queryGrants200GrantsItemRelation.ts +1 -1
  656. package/src/generated/model/queryGrants200GrantsItemTeam.ts +7 -7
  657. package/src/generated/model/queryGrants200GrantsItemTeamStatus.ts +2 -2
  658. package/src/generated/model/queryGrants200GrantsItemUser.ts +5 -5
  659. package/src/generated/model/queryGrants200GrantsItemUserMetadata.ts +10 -11
  660. package/src/generated/model/queryGrants200GrantsItemUserMetadataLifecycleOwnerTeam.ts +11 -12
  661. package/src/generated/model/queryGrants200GrantsItemUserMetadataLifecycleOwnerTeamStatus.ts +2 -2
  662. package/src/generated/model/queryGrantsBody.ts +2 -3
  663. package/src/generated/model/queryGrantsBodyExpandItem.ts +8 -5
  664. package/src/generated/model/queryGrantsBodyFilterItem.ts +5 -6
  665. package/src/generated/model/queryGrantsBodyFilterItemOperation.ts +4 -3
  666. package/src/generated/model/queryGrantsDefault.ts +0 -9
  667. package/src/generated/model/queryGrantsParams.ts +3 -1
  668. package/src/generated/model/queryIdps200.ts +1 -1
  669. package/src/generated/model/queryIdps200IdpsItem.ts +10 -9
  670. package/src/generated/model/queryIdps200IdpsItemDefinition.ts +7 -7
  671. package/src/generated/model/queryIdps200IdpsItemDefinitionClaimMapping.ts +1 -1
  672. package/src/generated/model/queryIdps200IdpsItemDefinitionOidc.ts +7 -7
  673. package/src/generated/model/queryIdps200IdpsItemDefinitionOidcStaticAuthorizeParameters.ts +1 -1
  674. package/src/generated/model/queryIdps200IdpsItemDefinitionProvisioning.ts +1 -1
  675. package/src/generated/model/queryIdps200IdpsItemDefinitionVerifiedClaims.ts +1 -1
  676. package/src/generated/model/queryIdpsBody.ts +2 -2
  677. package/src/generated/model/queryIdpsBodyFilterItem.ts +7 -8
  678. package/src/generated/model/queryIdpsBodyFilterItemField.ts +2 -2
  679. package/src/generated/model/queryIdpsBodyFilterItemOperation.ts +4 -3
  680. package/src/generated/model/queryIdpsBodySorting.ts +2 -2
  681. package/src/generated/model/queryIdpsBodySortingField.ts +2 -2
  682. package/src/generated/model/queryIdpsParams.ts +3 -1
  683. package/src/generated/model/queryProjects200ProjectsItem.ts +2 -3
  684. package/src/generated/model/queryProjects200ProjectsItemOriginsItem.ts +17 -5
  685. package/src/generated/model/queryProjects200ProjectsItemOriginsItemKind.ts +4 -0
  686. package/src/generated/model/queryProjects200ProjectsItemPasswordHash.ts +12 -15
  687. package/src/generated/model/queryProjects200ProjectsItemPasswordHashAlgorithm.ts +1 -1
  688. package/src/generated/model/queryProjects200ProjectsItemPasswordHashParams.ts +15 -18
  689. package/src/generated/model/queryProjects200ProjectsItemPasswordHashParamsHash.ts +4 -4
  690. package/src/generated/model/queryProjectsBodyFilterItem.ts +5 -6
  691. package/src/generated/model/queryProjectsBodyFilterItemOperation.ts +4 -3
  692. package/src/generated/model/querySessions200SessionsItem.ts +16 -16
  693. package/src/generated/model/querySessions200SessionsItemFactorsItem.ts +2 -2
  694. package/src/generated/model/querySessions200SessionsItemFactorsItemPayload.ts +5 -5
  695. package/src/generated/model/querySessions200SessionsItemState.ts +1 -1
  696. package/src/generated/model/querySessions200SessionsItemUser.ts +5 -5
  697. package/src/generated/model/querySessionsBodyFilterItem.ts +6 -7
  698. package/src/generated/model/querySessionsBodyFilterItemField.ts +1 -1
  699. package/src/generated/model/querySessionsBodyFilterItemOperation.ts +4 -3
  700. package/src/generated/model/querySessionsBodySorting.ts +2 -3
  701. package/src/generated/model/querySessionsBodySortingField.ts +2 -3
  702. package/src/generated/model/querySessionsParams.ts +3 -1
  703. package/src/generated/model/queryTeams200TeamsItem.ts +2 -2
  704. package/src/generated/model/queryTeams200TeamsItemStatus.ts +2 -2
  705. package/src/generated/model/queryTeamsBodyFilterItem.ts +5 -6
  706. package/src/generated/model/queryTeamsBodyFilterItemOperation.ts +4 -3
  707. package/src/generated/model/queryTeamsParams.ts +2 -2
  708. package/src/generated/model/queryUsers200UsersItem.ts +28 -29
  709. package/src/generated/model/queryUsers200UsersItemMetadata.ts +10 -11
  710. package/src/generated/model/queryUsers200UsersItemMetadataLifecycleOwnerTeam.ts +11 -12
  711. package/src/generated/model/queryUsers200UsersItemMetadataLifecycleOwnerTeamStatus.ts +2 -2
  712. package/src/generated/model/queryUsers200UsersItemTeamsItem.ts +4 -4
  713. package/src/generated/model/queryUsersBody.ts +2 -2
  714. package/src/generated/model/queryUsersBodyExpandItem.ts +8 -8
  715. package/src/generated/model/queryUsersBodyFilterItem.ts +23 -17
  716. package/src/generated/model/queryUsersBodyFilterItemField.ts +19 -11
  717. package/src/generated/model/queryUsersBodyFilterItemOperation.ts +4 -3
  718. package/src/generated/model/queryUsersBodySorting.ts +4 -5
  719. package/src/generated/model/queryUsersBodySortingField.ts +4 -5
  720. package/src/generated/model/queryUsersParams.ts +2 -2
  721. package/src/generated/model/rejectInvitation200.ts +126 -0
  722. package/src/generated/model/rejectInvitation400.ts +20 -0
  723. package/src/generated/model/rejectInvitation400Details.ts +12 -0
  724. package/src/generated/model/rejectInvitation401.ts +20 -0
  725. package/src/generated/model/rejectInvitation401Details.ts +12 -0
  726. package/src/generated/model/rejectInvitation403.ts +20 -0
  727. package/src/generated/model/rejectInvitation403Details.ts +12 -0
  728. package/src/generated/model/rejectInvitation404.ts +20 -0
  729. package/src/generated/model/rejectInvitation404Details.ts +12 -0
  730. package/src/generated/model/rejectInvitation429.ts +20 -0
  731. package/src/generated/model/rejectInvitation429Details.ts +12 -0
  732. package/src/generated/model/rejectInvitationBody.ts +19 -0
  733. package/src/generated/model/rejectInvitationDefault.ts +72 -0
  734. package/src/generated/model/removeOriginBody.ts +2 -2
  735. package/src/generated/model/revokeRelease200.ts +15 -15
  736. package/src/generated/model/revokeRelease200Metadata.ts +8 -8
  737. package/src/generated/model/revokeRelease200PointersItem.ts +13 -12
  738. package/src/generated/model/revokeRelease200PointersItemKind.ts +3 -3
  739. package/src/generated/model/revokeRelease409DetailsOriginsItem.ts +3 -0
  740. package/src/generated/model/revokeRelease409DetailsOriginsItemKind.ts +18 -0
  741. package/src/generated/model/revokeReleaseParams.ts +3 -1
  742. package/src/generated/model/rollbackDeployment200.ts +19 -15
  743. package/src/generated/model/rollbackDeployment200Metadata.ts +1 -1
  744. package/src/generated/model/rollbackDeployment200Release.ts +15 -15
  745. package/src/generated/model/rollbackDeployment200ReleaseMetadata.ts +8 -8
  746. package/src/generated/model/rollbackDeployment200ReleasePointersItem.ts +13 -12
  747. package/src/generated/model/rollbackDeployment200ReleasePointersItemKind.ts +3 -3
  748. package/src/generated/model/rollbackDeployment200Status.ts +4 -3
  749. package/src/generated/model/rollbackDeployment201.ts +19 -15
  750. package/src/generated/model/rollbackDeployment201Metadata.ts +1 -1
  751. package/src/generated/model/rollbackDeployment201Release.ts +15 -15
  752. package/src/generated/model/rollbackDeployment201ReleaseMetadata.ts +8 -8
  753. package/src/generated/model/rollbackDeployment201ReleasePointersItem.ts +13 -12
  754. package/src/generated/model/rollbackDeployment201ReleasePointersItemKind.ts +3 -3
  755. package/src/generated/model/rollbackDeployment201Status.ts +4 -3
  756. package/src/generated/model/rollbackDeployment409.ts +42 -40
  757. package/src/generated/model/rollbackDeploymentDefault.ts +0 -9
  758. package/src/generated/model/rollbackDeploymentParams.ts +3 -1
  759. package/src/generated/model/search200.ts +27 -0
  760. package/src/generated/model/search200IncompleteTypesItem.ts +30 -0
  761. package/src/generated/model/search200ResultsItem.ts +54 -0
  762. package/src/generated/model/search200ResultsItemType.ts +30 -0
  763. package/src/generated/model/search400.ts +20 -0
  764. package/src/generated/model/search400Details.ts +12 -0
  765. package/src/generated/model/search401.ts +20 -0
  766. package/src/generated/model/search401Details.ts +12 -0
  767. package/src/generated/model/search403.ts +20 -0
  768. package/src/generated/model/search403Details.ts +12 -0
  769. package/src/generated/model/search404.ts +20 -0
  770. package/src/generated/model/search404Details.ts +12 -0
  771. package/src/generated/model/searchBody.ts +33 -0
  772. package/src/generated/model/searchBodyTypesItem.ts +30 -0
  773. package/src/generated/model/searchDefault.ts +198 -0
  774. package/src/generated/model/searchParams.ts +16 -0
  775. package/src/generated/model/setUserPasswordBody.ts +1 -1
  776. package/src/generated/model/setUserPasswordDefault.ts +63 -0
  777. package/src/generated/model/submitFlowStep200.ts +16 -12
  778. package/src/generated/model/submitFlowStep200Branding.ts +26 -24
  779. package/src/generated/model/submitFlowStep200BrandingLayout.ts +8 -7
  780. package/src/generated/model/submitFlowStep200BrandingShape.ts +1 -1
  781. package/src/generated/model/submitFlowStep200BrandingTheme.ts +5 -7
  782. package/src/generated/model/submitFlowStep200BrandingThemeDark.ts +8 -8
  783. package/src/generated/model/submitFlowStep200BrandingThemeDarkPalette.ts +63 -62
  784. package/src/generated/model/submitFlowStep200BrandingThemeLight.ts +8 -8
  785. package/src/generated/model/submitFlowStep200BrandingThemeLightPalette.ts +63 -62
  786. package/src/generated/model/submitFlowStep200BrandingTypography.ts +5 -5
  787. package/src/generated/model/submitFlowStep200Step.ts +36 -31
  788. package/src/generated/model/submitFlowStep200StepActionsItem.ts +3 -3
  789. package/src/generated/model/submitFlowStep200StepActionsItemKind.ts +1 -1
  790. package/src/generated/model/submitFlowStep200StepChallenge.ts +4 -3
  791. package/src/generated/model/submitFlowStep200StepComplete.ts +1 -1
  792. package/src/generated/model/submitFlowStep200StepFieldsItem.ts +19 -15
  793. package/src/generated/model/submitFlowStep200StepFieldsItemType.ts +7 -3
  794. package/src/generated/model/submitFlowStep200StepFieldsItemValidation.ts +2 -2
  795. package/src/generated/model/submitFlowStep200StepFieldsItemValidationFormat.ts +1 -1
  796. package/src/generated/model/submitFlowStep200StepGates.ts +10 -8
  797. package/src/generated/model/submitFlowStep200StepGatesConfig.ts +1 -1
  798. package/src/generated/model/submitFlowStep200StepGatesKind.ts +4 -3
  799. package/src/generated/model/submitFlowStep200StepIdentifier.ts +6 -6
  800. package/src/generated/model/submitFlowStep200StepSsoProvidersItem.ts +1 -1
  801. package/src/generated/model/submitFlowStep200StepTexts.ts +1 -1
  802. package/src/generated/model/submitFlowStep400.ts +16 -12
  803. package/src/generated/model/submitFlowStep400Branding.ts +26 -24
  804. package/src/generated/model/submitFlowStep400BrandingLayout.ts +8 -7
  805. package/src/generated/model/submitFlowStep400BrandingShape.ts +1 -1
  806. package/src/generated/model/submitFlowStep400BrandingTheme.ts +5 -7
  807. package/src/generated/model/submitFlowStep400BrandingThemeDark.ts +8 -8
  808. package/src/generated/model/submitFlowStep400BrandingThemeDarkPalette.ts +63 -62
  809. package/src/generated/model/submitFlowStep400BrandingThemeLight.ts +8 -8
  810. package/src/generated/model/submitFlowStep400BrandingThemeLightPalette.ts +63 -62
  811. package/src/generated/model/submitFlowStep400BrandingTypography.ts +5 -5
  812. package/src/generated/model/submitFlowStep400Step.ts +36 -31
  813. package/src/generated/model/submitFlowStep400StepActionsItem.ts +3 -3
  814. package/src/generated/model/submitFlowStep400StepActionsItemKind.ts +1 -1
  815. package/src/generated/model/submitFlowStep400StepChallenge.ts +4 -3
  816. package/src/generated/model/submitFlowStep400StepComplete.ts +1 -1
  817. package/src/generated/model/submitFlowStep400StepFieldsItem.ts +19 -15
  818. package/src/generated/model/submitFlowStep400StepFieldsItemType.ts +7 -3
  819. package/src/generated/model/submitFlowStep400StepFieldsItemValidation.ts +2 -2
  820. package/src/generated/model/submitFlowStep400StepFieldsItemValidationFormat.ts +1 -1
  821. package/src/generated/model/submitFlowStep400StepGates.ts +10 -8
  822. package/src/generated/model/submitFlowStep400StepGatesConfig.ts +1 -1
  823. package/src/generated/model/submitFlowStep400StepGatesKind.ts +4 -3
  824. package/src/generated/model/submitFlowStep400StepIdentifier.ts +6 -6
  825. package/src/generated/model/submitFlowStep400StepSsoProvidersItem.ts +1 -1
  826. package/src/generated/model/submitFlowStep400StepTexts.ts +1 -1
  827. package/src/generated/model/submitFlowStepBody.ts +10 -7
  828. package/src/generated/model/submitFlowStepBodyChallengeResponse.ts +2 -2
  829. package/src/generated/model/submitFlowStepBodyGateProofs.ts +1 -1
  830. package/src/generated/model/submitFlowStepDefault.ts +18 -0
  831. package/src/generated/model/updateTeam200.ts +2 -2
  832. package/src/generated/model/updateTeam200Status.ts +2 -2
  833. package/src/generated/model/updateTeamBody.ts +1 -1
  834. package/src/generated/model/updateVariables200.ts +4 -4
  835. package/src/generated/model/updateVariables200Preview.ts +2 -2
  836. package/src/generated/model/updateVariables200Primary.ts +2 -2
  837. package/src/generated/model/updateVariablesBody.ts +14 -14
  838. package/src/generated/model/updateVariablesParams.ts +3 -1
  839. package/src/generated/model/userProperty.ts +11 -9
  840. package/src/generated/model/userPropertyProperties.ts +2 -2
  841. package/src/generated/model/userPropertyXUnique.ts +1 -1
  842. package/src/generated/model/verifyChallengeProof200.ts +23 -22
  843. package/src/generated/model/verifyChallengeProof200ChallengesItem.ts +9 -7
  844. package/src/generated/model/verifyChallengeProof200ChallengesItemState.ts +1 -1
  845. package/src/generated/model/verifyChallengeProof200CompletedFactorsItem.ts +2 -2
  846. package/src/generated/model/verifyChallengeProof200CompletedFactorsItemPayload.ts +5 -5
  847. package/src/generated/model/verifyChallengeProof200State.ts +2 -2
  848. package/src/generated/model/verifyChallengeProofBody.ts +2 -2
  849. package/src/generated/operations.ts +508 -152
  850. package/src/generated/paging.ts +5 -0
  851. package/src/runtime/api-factory.spec.ts +50 -0
  852. package/src/runtime/api-factory.ts +11 -2
  853. package/src/runtime/base-url.spec.ts +1 -1
  854. package/src/runtime/fetch.ts +16 -0
  855. package/src/runtime/paged.spec.ts +11 -0
  856. package/src/runtime/paged.ts +9 -8
  857. package/src/runtime/paging.spec.ts +164 -39
  858. package/src/runtime/paging.ts +162 -43
  859. package/dist/api-factory-C5b1Gqwv.mjs.map +0 -1
  860. package/dist/api-factory-Dt5lUjyu.d.mts.map +0 -1
  861. package/dist/fetch-B-lgjlrf.d.mts.map +0 -1
  862. package/dist/index-DGQY1rfH.d.mts.map +0 -1
  863. package/dist/zitadelNextGen-BVO4sdKD.d.mts +0 -1367
  864. package/dist/zitadelNextGen-BVO4sdKD.d.mts.map +0 -1
@@ -10,10 +10,13 @@ import { customFetch } from "../../runtime/fetch.mjs";
10
10
  * OpenAPI spec version: 0.0.1
11
11
  */
12
12
  var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
13
+ acceptInvitation: () => acceptInvitation,
13
14
  addOrigin: () => addOrigin,
14
15
  beginUserPasskeyRegistration: () => beginUserPasskeyRegistration,
15
16
  buildRelease: () => buildRelease,
17
+ cancelInvitation: () => cancelInvitation,
16
18
  completeClaim: () => completeClaim,
19
+ createApplication: () => createApplication,
17
20
  createAuthAttempt: () => createAuthAttempt,
18
21
  createBranding: () => createBranding,
19
22
  createDeployment: () => createDeployment,
@@ -22,6 +25,7 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
22
25
  createGrant: () => createGrant,
23
26
  createHandoff: () => createHandoff,
24
27
  createIdp: () => createIdp,
28
+ createInvitation: () => createInvitation,
25
29
  createProject: () => createProject,
26
30
  createRelease: () => createRelease,
27
31
  createSchema: () => createSchema,
@@ -35,14 +39,18 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
35
39
  evaluatePolicy: () => evaluatePolicy,
36
40
  exchangeHandoff: () => exchangeHandoff,
37
41
  finishUserPasskeyRegistration: () => finishUserPasskeyRegistration,
42
+ getAcceptInvitationUrl: () => getAcceptInvitationUrl,
38
43
  getAddOriginUrl: () => getAddOriginUrl,
44
+ getApplicationById: () => getApplicationById,
39
45
  getAuthAttempt: () => getAuthAttempt,
40
46
  getBeginUserPasskeyRegistrationUrl: () => getBeginUserPasskeyRegistrationUrl,
41
47
  getBrandingById: () => getBrandingById,
42
48
  getBuildReleaseUrl: () => getBuildReleaseUrl,
49
+ getCancelInvitationUrl: () => getCancelInvitationUrl,
43
50
  getClaimStatus: () => getClaimStatus,
44
51
  getClaimWindow: () => getClaimWindow,
45
52
  getCompleteClaimUrl: () => getCompleteClaimUrl,
53
+ getCreateApplicationUrl: () => getCreateApplicationUrl,
46
54
  getCreateAuthAttemptUrl: () => getCreateAuthAttemptUrl,
47
55
  getCreateBrandingUrl: () => getCreateBrandingUrl,
48
56
  getCreateDeploymentUrl: () => getCreateDeploymentUrl,
@@ -51,6 +59,7 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
51
59
  getCreateGrantUrl: () => getCreateGrantUrl,
52
60
  getCreateHandoffUrl: () => getCreateHandoffUrl,
53
61
  getCreateIdpUrl: () => getCreateIdpUrl,
62
+ getCreateInvitationUrl: () => getCreateInvitationUrl,
54
63
  getCreateProjectUrl: () => getCreateProjectUrl,
55
64
  getCreateReleaseUrl: () => getCreateReleaseUrl,
56
65
  getCreateSchemaUrl: () => getCreateSchemaUrl,
@@ -69,6 +78,7 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
69
78
  getFinishUserPasskeyRegistrationUrl: () => getFinishUserPasskeyRegistrationUrl,
70
79
  getFlowDefinition: () => getFlowDefinition,
71
80
  getFlowStep: () => getFlowStep,
81
+ getGetApplicationByIdUrl: () => getGetApplicationByIdUrl,
72
82
  getGetAuthAttemptUrl: () => getGetAuthAttemptUrl,
73
83
  getGetBrandingByIdUrl: () => getGetBrandingByIdUrl,
74
84
  getGetClaimStatusUrl: () => getGetClaimStatusUrl,
@@ -81,6 +91,7 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
81
91
  getGetGrantUrl: () => getGetGrantUrl,
82
92
  getGetIdpByIdUrl: () => getGetIdpByIdUrl,
83
93
  getGetIdpRevisionByIdUrl: () => getGetIdpRevisionByIdUrl,
94
+ getGetInvitationUrl: () => getGetInvitationUrl,
84
95
  getGetLiveUrl: () => getGetLiveUrl,
85
96
  getGetMyPasswordStateUrl: () => getGetMyPasswordStateUrl,
86
97
  getGetMySessionCsrfTokenUrl: () => getGetMySessionCsrfTokenUrl,
@@ -103,12 +114,14 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
103
114
  getIdpById: () => getIdpById,
104
115
  getIdpRevisionById: () => getIdpRevisionById,
105
116
  getInitClaimUrl: () => getInitClaimUrl,
117
+ getInvitation: () => getInvitation,
106
118
  getIssueChallengeUrl: () => getIssueChallengeUrl,
107
119
  getListBrandingUrl: () => getListBrandingUrl,
108
120
  getListDeploymentsUrl: () => getListDeploymentsUrl,
109
121
  getListEventsUrl: () => getListEventsUrl,
110
122
  getListFlowDefinitionsUrl: () => getListFlowDefinitionsUrl,
111
123
  getListIdpRevisionsUrl: () => getListIdpRevisionsUrl,
124
+ getListInvitationsUrl: () => getListInvitationsUrl,
112
125
  getListMyIdentityLinksUrl: () => getListMyIdentityLinksUrl,
113
126
  getListMyPasskeysUrl: () => getListMyPasskeysUrl,
114
127
  getListMyProjectsUrl: () => getListMyProjectsUrl,
@@ -123,6 +136,7 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
123
136
  getListUserPasskeysUrl: () => getListUserPasskeysUrl,
124
137
  getListUserTeamsUrl: () => getListUserTeamsUrl,
125
138
  getLive: () => getLive,
139
+ getLookupInvitationUrl: () => getLookupInvitationUrl,
126
140
  getMyPasswordState: () => getMyPasswordState,
127
141
  getMySession: () => getMySession,
128
142
  getMySessionCsrfToken: () => getMySessionCsrfToken,
@@ -142,6 +156,7 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
142
156
  getQueryTeamsUrl: () => getQueryTeamsUrl,
143
157
  getQueryUsersUrl: () => getQueryUsersUrl,
144
158
  getReady: () => getReady,
159
+ getRejectInvitationUrl: () => getRejectInvitationUrl,
145
160
  getReleaseById: () => getReleaseById,
146
161
  getRemoveOriginUrl: () => getRemoveOriginUrl,
147
162
  getRemovePreviewUrl: () => getRemovePreviewUrl,
@@ -150,6 +165,7 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
150
165
  getRevokeSessionUrl: () => getRevokeSessionUrl,
151
166
  getRollbackDeploymentUrl: () => getRollbackDeploymentUrl,
152
167
  getSchemaById: () => getSchemaById,
168
+ getSearchUrl: () => getSearchUrl,
153
169
  getSession: () => getSession,
154
170
  getSetUserPasswordUrl: () => getSetUserPasswordUrl,
155
171
  getSubmitFlowStepUrl: () => getSubmitFlowStepUrl,
@@ -168,6 +184,7 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
168
184
  listEvents: () => listEvents,
169
185
  listFlowDefinitions: () => listFlowDefinitions,
170
186
  listIdpRevisions: () => listIdpRevisions,
187
+ listInvitations: () => listInvitations,
171
188
  listMyIdentityLinks: () => listMyIdentityLinks,
172
189
  listMyPasskeys: () => listMyPasskeys,
173
190
  listMyProjects: () => listMyProjects,
@@ -181,6 +198,7 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
181
198
  listUserIdentityLinks: () => listUserIdentityLinks,
182
199
  listUserPasskeys: () => listUserPasskeys,
183
200
  listUserTeams: () => listUserTeams,
201
+ lookupInvitation: () => lookupInvitation,
184
202
  patchMyUser: () => patchMyUser,
185
203
  patchProject: () => patchProject,
186
204
  patchUserByID: () => patchUserByID,
@@ -191,12 +209,14 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
191
209
  querySessions: () => querySessions,
192
210
  queryTeams: () => queryTeams,
193
211
  queryUsers: () => queryUsers,
212
+ rejectInvitation: () => rejectInvitation,
194
213
  removeOrigin: () => removeOrigin,
195
214
  removePreview: () => removePreview,
196
215
  revokeMySession: () => revokeMySession,
197
216
  revokeRelease: () => revokeRelease,
198
217
  revokeSession: () => revokeSession,
199
218
  rollbackDeployment: () => rollbackDeployment,
219
+ search: () => search,
200
220
  setUserPassword: () => setUserPassword,
201
221
  submitFlowStep: () => submitFlowStep,
202
222
  updateTeam: () => updateTeam,
@@ -207,13 +227,15 @@ const getGetLiveUrl = () => {
207
227
  return `${getApiBaseUrl()}/livez`;
208
228
  };
209
229
  /**
210
- * Answers `ok` while the server process serves HTTP, and checks nothing behind it.
230
+ * Answers `ok` while the server process serves HTTP, and checks nothing
231
+ * behind it.
211
232
  *
212
- * Point a liveness probe at `/livez` at the root, where the probes stay,
213
- * not under `/api/v1`. It never checks the database, so an outage of the
214
- * database does not restart every instance; `GET /readyz` takes an instance
215
- * out of rotation instead.
216
- * @summary Check server liveness
233
+ * A liveness probe tells an orchestrator such as Kubernetes whether to
234
+ * restart the process. Point it at `/livez` at the root, where the probes
235
+ * stay, not under `/api/v1`. It never checks the database, so an outage of
236
+ * the database does not restart every instance. `GET /readyz` takes an
237
+ * instance out of rotation instead.
238
+ * @summary Check the server's liveness
217
239
  */
218
240
  const getLive = async (options) => {
219
241
  return customFetch(getGetLiveUrl(), {
@@ -225,12 +247,15 @@ const getGetReadyUrl = () => {
225
247
  return `${getApiBaseUrl()}/readyz`;
226
248
  };
227
249
  /**
228
- * Answers whether the server can serve requests, which takes its database answering within a second.
250
+ * Answers `ok` when the server can serve requests, which takes its database
251
+ * answering within a second, and `fail` with `503` otherwise.
229
252
  *
230
- * Point a readiness probe at `/readyz` at the root, where the probes stay,
231
- * not under `/api/v1`, so that a server whose database does not answer gets
232
- * no requests until it does. The check is one round trip to the database.
233
- * @summary Check server readiness
253
+ * A readiness probe tells an orchestrator such as Kubernetes whether to send
254
+ * the instance requests. Point it at `/readyz` at the root, where the probes
255
+ * stay, not under `/api/v1`, so that a server whose database does not answer
256
+ * gets no requests until it does. The check is one round trip to the
257
+ * database.
258
+ * @summary Check the server's readiness
234
259
  */
235
260
  const getReady = async (options) => {
236
261
  return customFetch(getGetReadyUrl(), {
@@ -247,12 +272,14 @@ const getCreateUserUrl = (params) => {
247
272
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users?${stringifiedParams}` : `${getApiBaseUrl()}/users`;
248
273
  };
249
274
  /**
250
- * Creates a user whose attributes satisfy the user schema the request names.
275
+ * Creates a user whose attributes satisfy the user schema named in the request.
251
276
  *
252
- * The server assigns the user's id. With `team_id`, the user also becomes an
253
- * active member of that team. A value the schema marks unique that another
254
- * user already holds is refused with `409`.
255
- * @summary Create user
277
+ * The server assigns the user's ID and returns it. `schema` is the `id` of a
278
+ * schema, as `createSchema` (`POST /schemas`) returns it or `listSchemas` (`GET /schemas`) lists it. With
279
+ * `team_id`, the user also becomes an active member of that team. A value the
280
+ * schema marks unique that another user already holds is refused with `409`;
281
+ * send a different value.
282
+ * @summary Create a user
256
283
  */
257
284
  const createUser = async (createUserBody, params, options) => {
258
285
  const getHeaders = (h) => {
@@ -287,9 +314,15 @@ const getQueryUsersUrl = (params) => {
287
314
  * `project_id` names the project to list; without it, the credential's own
288
315
  * project is listed.
289
316
  *
290
- * Accepts either a project secret (`oauth2`) or a user-bound Console
317
+ * Accepts either a project secret (`oauth2`) or a user-bound console
291
318
  * session cookie (`sessionCookie`). Cookie-authenticated requests
292
319
  * follow the scheme's CSRF rules (`sessionCookie`).
320
+ *
321
+ * With a project secret, embedding `teams` with `expand`, or filtering by
322
+ * `team_id`, also needs `team_membership.read`. Embedding
323
+ * `lifecycle_owner_team` needs `team.read`. A console session carries no
324
+ * scopes: it may do both when it may read the whole project, and gets
325
+ * `403 user.permission_denied` otherwise.
293
326
  * @summary Query users
294
327
  */
295
328
  const queryUsers = async (queryUsersBody, params, options) => {
@@ -320,11 +353,11 @@ const getGetUserByIDUrl = (userId, params) => {
320
353
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}?${stringifiedParams}` : `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}`;
321
354
  };
322
355
  /**
323
- * Returns a user by its id, with the attributes its schema defines.
356
+ * Returns a user by ID, with the attributes its schema defines.
324
357
  *
325
- * With `team_id`, the user is returned only while they are an active member of
326
- * that team.
327
- * @summary Get user by ID
358
+ * With `team_id`, the user is returned only while they are an active member
359
+ * of that team.
360
+ * @summary Get a user by ID
328
361
  */
329
362
  const getUserByID = async (userId, params, options) => {
330
363
  return customFetch(getGetUserByIDUrl(userId, params), {
@@ -340,7 +373,20 @@ const getPatchUserByIDUrl = (userId) => {
340
373
  * moves the user to another registered schema. The merged result is
341
374
  * validated against the schema before commit. Concurrent writes are
342
375
  * last-write-wins.
343
- * @summary Update user by ID
376
+ *
377
+ * To move the user, send `schema` with the `id` of a registered schema, as
378
+ * `createSchema` (`POST /schemas`) returns it or `listSchemas` (`GET /schemas`) lists it.
379
+ *
380
+ * To ask whether a patch would succeed, send it with `"dry_run": true`. It takes
381
+ * the same permission and answers the same status and `details` as the real
382
+ * request, and it changes nothing and emits no `user.updated`. The request
383
+ * itself is still recorded as `request.api`, like any other API call. A `200`
384
+ * holds for the moment of the check: a unique value that is free then can be
385
+ * taken before the real request, which then answers `409`.
386
+ *
387
+ * `dry_run` is a body field so that a server from before it refuses the
388
+ * request as malformed (`400 req.invalid`) instead of applying the patch.
389
+ * @summary Update a user by ID
344
390
  */
345
391
  const patchUserByID = async (userId, patchUserByIDBody, options) => {
346
392
  const getHeaders = (h) => {
@@ -374,7 +420,7 @@ const getDeleteUserByIDUrl = (userId) => {
374
420
  * in no project succeeds without changing anything. Deleting the last active
375
421
  * member of a project's owning team returns 409 `proj.last_owner` and changes
376
422
  * nothing.
377
- * @summary Delete user by ID
423
+ * @summary Delete a user by ID
378
424
  */
379
425
  const deleteUserByID = async (userId, options) => {
380
426
  return customFetch(getDeleteUserByIDUrl(userId), {
@@ -391,8 +437,9 @@ const getListUserIdentityLinksUrl = (userId, params) => {
391
437
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/identity_links?${stringifiedParams}` : `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/identity_links`;
392
438
  };
393
439
  /**
394
- * The identity provider accounts a sign-in linked to the user, oldest first.
395
- * The provider's subject and claims are never returned.
440
+ * Lists the identity provider accounts a sign-in linked to the user, oldest
441
+ * first. The provider's subject and claims, the data it asserts about the
442
+ * account, are never returned.
396
443
  * @summary List the provider accounts linked to a user
397
444
  */
398
445
  const listUserIdentityLinks = async (userId, params, options) => {
@@ -410,12 +457,13 @@ const getListUserPasskeysUrl = (userId, params) => {
410
457
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/passkeys?${stringifiedParams}` : `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/passkeys`;
411
458
  };
412
459
  /**
413
- * Returns the passkeys registered for a user, newest first, paginated with a
414
- * cursor.
460
+ * Lists the passkeys registered for a user, newest first, paginated with a
461
+ * cursor. A passkey is a WebAuthn credential that signs a user in without a
462
+ * password.
415
463
  *
416
- * Each passkey carries its id, its name and when it was registered, never the
464
+ * Each passkey carries its ID, its name and when it was registered, never the
417
465
  * credential itself.
418
- * @summary List user passkeys
466
+ * @summary List a user's passkeys
419
467
  */
420
468
  const listUserPasskeys = async (userId, params, options) => {
421
469
  return customFetch(getListUserPasskeysUrl(userId, params), {
@@ -428,11 +476,15 @@ const getBeginUserPasskeyRegistrationUrl = (userId) => {
428
476
  };
429
477
  /**
430
478
  * Starts a WebAuthn registration ceremony for the user and returns the
431
- * creation options for `navigator.credentials.create()`. Complete the
432
- * ceremony with `POST /users/{user_id}/passkeys/registrations/{registration_id}` within
433
- * five minutes. Credentials already registered for the user are excluded
434
- * automatically.
435
- * @summary Begin passkey registration
479
+ * creation options for `navigator.credentials.create()`. A passkey is
480
+ * registered in two steps: this one returns options for the browser, and
481
+ * `finishUserPasskeyRegistration` (`POST /users/{user_id}/passkeys/registrations/{registration_id}`) verifies the browser's answer.
482
+ *
483
+ * Complete the ceremony with
484
+ * `POST /users/{user_id}/passkeys/registrations/{registration_id}` within five
485
+ * minutes, using the `registration_id` this response returns. Credentials
486
+ * already registered for the user are excluded automatically.
487
+ * @summary Begin a passkey registration
436
488
  */
437
489
  const beginUserPasskeyRegistration = async (userId, beginUserPasskeyRegistrationBody, options) => {
438
490
  const getHeaders = (h) => {
@@ -457,13 +509,16 @@ const getFinishUserPasskeyRegistrationUrl = (userId, registrationId) => {
457
509
  return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/passkeys/registrations/${encodeURIComponent(String(registrationId))}`;
458
510
  };
459
511
  /**
460
- * Verifies the attestation against the ceremony started by
461
- * `POST /users/{user_id}/passkeys/registrations` and persists the new credential. A
462
- * rejected attestation counts against the ceremony's failure budget and the
463
- * ceremony stays open for a retry. An expired ceremony surfaces as
464
- * `att.stale_challenge`; an unknown or already-consumed registration id
465
- * surfaces as `att.not_found`.
466
- * @summary Finish passkey registration
512
+ * Verifies the attestation against the registration ceremony and stores
513
+ * the new passkey for the user. `registration_id` is the one that
514
+ * `beginUserPasskeyRegistration` (`POST /users/{user_id}/passkeys/registrations`)
515
+ * returned when it started the ceremony. The attestation is
516
+ * the browser's answer from `navigator.credentials.create()`.
517
+ *
518
+ * A rejected attestation leaves the ceremony open for a retry. An expired ceremony answers
519
+ * `att.stale_challenge`: begin a new registration. An unknown or
520
+ * already-consumed registration ID answers `att.not_found`.
521
+ * @summary Finish a passkey registration
467
522
  */
468
523
  const finishUserPasskeyRegistration = async (userId, registrationId, finishUserPasskeyRegistrationBody, options) => {
469
524
  const getHeaders = (h) => {
@@ -488,10 +543,10 @@ const getGetUserPasswordStateUrl = (userId) => {
488
543
  return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/password`;
489
544
  };
490
545
  /**
491
- * Reports when the user's current password was set, and leaves `set_at` out
546
+ * Returns when the user's current password was set, and leaves `set_at` out
492
547
  * when the user has none. The password and its hash are never returned;
493
- * setting one is `PUT` on the same path.
494
- * @summary Get user password state
548
+ * `setUserPassword` (`PUT` on the same path) sets one.
549
+ * @summary Get a user's password state
495
550
  */
496
551
  const getUserPasswordState = async (userId, options) => {
497
552
  return customFetch(getGetUserPasswordStateUrl(userId), {
@@ -507,8 +562,28 @@ const getSetUserPasswordUrl = (userId) => {
507
562
  * policy.
508
563
  *
509
564
  * The new password replaces the current one, and setting it emits
510
- * `auth.factor.password.set`.
511
- * @summary Set user password
565
+ * `auth.factor.password.set`. A password the project's password policy
566
+ * refuses answers `user.password_policy_violation`; send one that meets the
567
+ * policy.
568
+ *
569
+ * The password policy is the one in the release that serves the caller's
570
+ * `Origin`, chosen as `createFlow` (`POST /flow`) chooses it. A frontend on a
571
+ * preview URL gets that preview's policy, and one on a primary origin the
572
+ * newest primary deployment's. A request with no `Origin`, or from the
573
+ * console when the project does not list the console's origin, gets the
574
+ * project's newest primary deployment.
575
+ *
576
+ * If the request is refused:
577
+ * - `403 proj.origin_not_allowed`: the project admits no such origin. Add it
578
+ * with `zitadel origin add`.
579
+ * - `403 proj.preview_not_live`: the origin matches a preview pattern but has
580
+ * no live preview. Run `zitadel preview` on the branch.
581
+ * - `409 rel.not_deployed`: nothing is deployed to the origin. Run
582
+ * `zitadel deploy`.
583
+ * - `409 rel.no_default`: the request names no origin and the project has no
584
+ * primary deployment. Run `zitadel deploy`.
585
+ * - `409 rel.revoked`: the release that serves the origin is revoked.
586
+ * @summary Set a user's password
512
587
  */
513
588
  const setUserPassword = async (userId, setUserPasswordBody, options) => {
514
589
  const getHeaders = (h) => {
@@ -538,13 +613,14 @@ const getListUserTeamsUrl = (userId, params) => {
538
613
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/teams?${stringifiedParams}` : `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/teams`;
539
614
  };
540
615
  /**
541
- * The user's team roster, ordered by team name. Each entry carries the
542
- * team's name, so a client renders a page without resolving ids one by one.
616
+ * Lists the teams a user belongs to, ordered by team name. Each entry carries
617
+ * the team's name, so a client renders a page without resolving IDs one by
618
+ * one.
543
619
  *
544
- * This is the N:N roster and it is not lifecycle ownership: the single team
545
- * that owns the user's lifecycle is reported as `metadata.lifecycle_owner_team_id`
546
- * on the user read endpoints. Memberships the user was removed from are not
547
- * returned.
620
+ * This is the user's team memberships, not lifecycle ownership: the single
621
+ * team that owns the user's lifecycle is reported as
622
+ * `metadata.lifecycle_owner_team_id` on the user read endpoints. Memberships
623
+ * the user was removed from are not returned.
548
624
  * @summary List the teams a user belongs to
549
625
  */
550
626
  const listUserTeams = async (userId, params, options) => {
@@ -622,8 +698,9 @@ const getListMyIdentityLinksUrl = (params) => {
622
698
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/identity_links?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/identity_links`;
623
699
  };
624
700
  /**
625
- * The identity provider accounts a sign-in linked to the signed-in user,
626
- * oldest first. The provider's subject and claims are never returned.
701
+ * Lists the identity provider accounts a sign-in linked to the signed-in user,
702
+ * oldest first. The provider's subject and claims, the data it asserts about
703
+ * the account, are never returned.
627
704
  *
628
705
  * With `project_id`, the links are listed only when the session belongs to
629
706
  * that project.
@@ -644,9 +721,10 @@ const getListMyPasskeysUrl = (params) => {
644
721
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/passkeys?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/passkeys`;
645
722
  };
646
723
  /**
647
- * The signed-in user's own passkeys, newest first, paginated with a cursor.
648
- * Each passkey carries its id, its name and when it was registered, never the
649
- * credential itself.
724
+ * Lists the signed-in user's own passkeys, newest first, paginated with a
725
+ * cursor. A passkey is a WebAuthn credential that signs a user in without a
726
+ * password. Each passkey carries its ID, its name and when it was registered,
727
+ * never the credential itself.
650
728
  *
651
729
  * With `project_id`, the passkeys are listed only when the session belongs to
652
730
  * that project.
@@ -667,7 +745,7 @@ const getGetMyPasswordStateUrl = (params) => {
667
745
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/password?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/password`;
668
746
  };
669
747
  /**
670
- * Reports when the signed-in user's current password was set, and leaves
748
+ * Returns when the signed-in user's current password was set, and leaves
671
749
  * `set_at` out when they have none. The password and its hash are never
672
750
  * returned.
673
751
  *
@@ -690,12 +768,13 @@ const getListMyProjectsUrl = (params) => {
690
768
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/projects?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/projects`;
691
769
  };
692
770
  /**
693
- * The projects the signed-in user can act on: those they hold an active grant
694
- * on, either directly or through a team they are a member of. For a platform
695
- * operator (ADR 075) that is every project of the deployment. Ordered by
696
- * project id and paged with an opaque cursor.
771
+ * Lists the projects the signed-in user can act on: those they hold an active
772
+ * grant on, either directly or through a team they are a member of. For a
773
+ * platform operator, someone who runs the deployment, that is every project of
774
+ * the deployment. Ordered by project ID unless `order` asks for creation
775
+ * time, and paged with an opaque cursor.
697
776
  *
698
- * This is not the same question as `queryProjects`, which answers with the one
777
+ * This is not the same question as `queryProjects` (`POST /projects/query`), which answers with the one
699
778
  * project the calling credential is bound to. Here the session is the caller
700
779
  * and the grants are the answer, so the list spans projects.
701
780
  *
@@ -724,7 +803,7 @@ const getGetMyUserSchemaUrl = (params) => {
724
803
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/schema?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/schema`;
725
804
  };
726
805
  /**
727
- * The schema the signed-in user's own record is validated against.
806
+ * Returns the schema that validates the signed-in user's own record.
728
807
  *
729
808
  * With `project_id`, the schema is returned only when the session belongs to
730
809
  * that project.
@@ -745,7 +824,7 @@ const getListMyTeamsUrl = (params) => {
745
824
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/teams?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/teams`;
746
825
  };
747
826
  /**
748
- * The signed-in user's own team roster, ordered by team name.
827
+ * Lists the teams the signed-in user belongs to, ordered by team name.
749
828
  *
750
829
  * With `project_id`, the teams are listed only when the session belongs to
751
830
  * that project.
@@ -761,34 +840,56 @@ const getCreateFlowUrl = () => {
761
840
  return `${getApiBaseUrl()}/flow`;
762
841
  };
763
842
  /**
764
- * Resolves a flow definition based on purpose + audience context and returns
765
- * the first capability step. Creates a new session implicitly unless
766
- * `session_id` is provided, together with that session's `session_token`
767
- * (for step-up / reauth on an existing session).
768
- *
769
- * The browser `Origin` header selects which deployment serves this attempt:
770
- * the gate admits the origin against the project's origin patterns and live
771
- * previews, the newest deployment to that exact origin is the target, and
772
- * that deployment's release supplies flow definitions, user schemas and
773
- * branding. The resolved deployment is sealed into the `_zflow` cookie so
774
- * later steps keep the same configuration. An origin that matches no pattern
775
- * answers `403` with `proj.origin_not_allowed`; one that matches a preview
776
- * pattern with no live preview answers `403` with `proj.preview_not_live`;
777
- * nothing deployed to the target answers `409` with `rel.not_deployed`; a
778
- * revoked release answers `409` with `rel.revoked`. A request with no
779
- * `Origin` passes the gate and still needs a deployment target. A loopback
780
- * origin passes it too, and so does the server's own origin, from which its
781
- * console previews a project's login; a step submitted from the server's
782
- * own origin is still refused unless the project lists it.
783
- *
784
- * The response contains an `id` field — the flow handle. Use it as the path
843
+ * Starts a flow: resolves a flow definition from the request's purpose and
844
+ * audience, and returns the first step.
845
+ *
846
+ * The flow endpoints are the runtime calls the login component
847
+ * (`<zitadel-login>`) makes, step by step. It starts a flow here, renders the
848
+ * step it gets back, and submits the user's input with `submitFlowStep` (`POST /flow/{id}/submit`) to
849
+ * get the next step. This call creates a new session implicitly, unless
850
+ * `session_id` is provided together with that session's `session_token`
851
+ * (for step-up or reauthentication on an existing session).
852
+ *
853
+ * The browser `Origin` header selects which deployment serves this attempt.
854
+ * The server checks the origin against the project's origin patterns and live
855
+ * previews, and the deployment that origin serves is the target: the
856
+ * project's newest primary deployment when it names a primary origin, or the
857
+ * newest live deployment to a preview URL. A
858
+ * deployment is a release, the immutable bundle of the project's
859
+ * configuration, made live at an origin. The deployment's release supplies
860
+ * flow definitions, user schemas and branding. The resolved deployment is
861
+ * sealed into the `_zflow` cookie so later steps keep the same
862
+ * configuration.
863
+ *
864
+ * - An origin that matches no pattern answers `403` with
865
+ * `proj.origin_not_allowed`, including when the project lists no origins.
866
+ * Add the origin with `zitadel origin add`.
867
+ * - An origin that matches a preview pattern with no live preview answers
868
+ * `403` with `proj.preview_not_live`. Run `zitadel preview` on the branch.
869
+ * - Nothing deployed to a listed origin or a live preview answers `409`
870
+ * with `rel.not_deployed`. Run `zitadel deploy`: a primary origin added
871
+ * since the last deploy serves nothing until the next one.
872
+ * - A loopback origin the project does not list answers `409` with
873
+ * `rel.not_deployed` too, as no deployment can name it. Add it with
874
+ * `zitadel origin add <origin> --kind primary`, then run `zitadel deploy`.
875
+ * - A revoked release answers `409` with `rel.revoked`.
876
+ *
877
+ * A request with no `Origin` passes the check, and so does the server's own
878
+ * origin, from which its console previews a project's login. Both are served
879
+ * the project's newest primary deployment unless the project lists that
880
+ * origin; with no primary deployment they answer `409` with
881
+ * `rel.no_default`. A loopback origin passes the check and is its own
882
+ * target. A step submitted from the server's own origin is still refused
883
+ * unless the project lists it.
884
+ *
885
+ * The response contains an `id` field, the flow handle. Use it as the path
785
886
  * parameter for all subsequent `/flow/{id}/submit` calls.
786
887
  *
787
888
  * The response also sets an encrypted `HttpOnly` cookie (`_zflow`) containing
788
889
  * the flow's orchestration state (current step, collected data, history).
789
- * The server is stateless between requests — all flow state lives in this
890
+ * The server is stateless between requests: all flow state lives in this
790
891
  * cookie. The browser sends it automatically on subsequent requests.
791
- * @summary Start a new flow
892
+ * @summary Start a flow
792
893
  */
793
894
  const createFlow = async (createFlowBody, options) => {
794
895
  const getHeaders = (h) => {
@@ -813,13 +914,17 @@ const getGetFlowStepUrl = (id) => {
813
914
  return `${getApiBaseUrl()}/flow/${encodeURIComponent(String(id))}`;
814
915
  };
815
916
  /**
816
- * Returns the current capability step without advancing the state machine.
817
- * Useful for page reloads or re-rendering after a network error.
917
+ * Returns the current step of a flow without advancing it. Use it to render
918
+ * the step again after a page reload or a network error.
919
+ *
920
+ * The flow endpoints are the runtime calls the login component
921
+ * (`<zitadel-login>`) makes, step by step. `createFlow` (`POST /flow`) starts a flow, and
922
+ * `submitFlowStep` (`POST /flow/{id}/submit`) advances it.
818
923
  *
819
924
  * Reuses the deployment sealed into `_zflow` at `createFlow`; it does not
820
925
  * re-resolve from `Origin`. If that release was revoked since the attempt
821
926
  * started, the response is `409` with `rel.revoked`.
822
- * @summary Get current step (re-render)
927
+ * @summary Get the current step of a flow
823
928
  */
824
929
  const getFlowStep = async (id, options) => {
825
930
  return customFetch(getGetFlowStepUrl(id), {
@@ -831,12 +936,14 @@ const getSubmitFlowStepUrl = (id) => {
831
936
  return `${getApiBaseUrl()}/flow/${encodeURIComponent(String(id))}/submit`;
832
937
  };
833
938
  /**
834
- * Submits user input for the current step. The server validates,
835
- * processes (e.g., verifies a credential), advances the state machine
836
- * through any invisible steps, and returns the next visible step.
939
+ * Submits the user's input for the current step of a flow. The server
940
+ * validates it, processes it (for example, verifies a credential), advances
941
+ * the flow through any invisible steps, and returns the next visible step.
942
+ * The flow endpoints are the runtime calls the login component
943
+ * (`<zitadel-login>`) makes, step by step; `createFlow` (`POST /flow`) starts a flow.
837
944
  *
838
945
  * The response sets an updated encrypted `HttpOnly` cookie (`_zflow`)
839
- * with the new flow state. The server is stateless — all orchestration
946
+ * with the new flow state. The server is stateless: all orchestration
840
947
  * state is carried in this cookie between requests.
841
948
  *
842
949
  * **Important:** The `id` in the response may differ from the `id` used in
@@ -852,17 +959,17 @@ const getSubmitFlowStepUrl = (id) => {
852
959
  * | `behavior` | Action |
853
960
  * |------------- |------------------------------------------------------------|
854
961
  * | `redirect` | Navigate to `redirect_uri` (OIDC/SAML auth request done). |
855
- * | `show` | Render the step as a success screen (e.g., registration). |
962
+ * | `show` | Render the step as a success screen, such as registration. |
856
963
  *
857
964
  * A `complete` step is only returned when the **entire flow stack** is done.
858
- * If a stacked flow (e.g., recovery pivoted from login) finishes, the server
859
- * auto-pops to the parent flow and returns the parent's next step — the
860
- * frontend never sees a `complete` for intermediate flows.
965
+ * If a stacked flow (for example, recovery pivoted from login) finishes, the
966
+ * server auto-pops to the parent flow and returns the parent's next step.
967
+ * The frontend never sees a `complete` for intermediate flows.
861
968
  *
862
969
  * ## External sign-in
863
970
  *
864
971
  * `{action: "sso", sso_provider_id, return_target}` on a step that offers
865
- * `sso_providers` returns the engine-emitted `sso-redirect` step, whose
972
+ * `sso_providers` returns the server-emitted `sso-redirect` step, whose
866
973
  * `redirect_url` the frontend navigates to.
867
974
  *
868
975
  * - The flow state does not change, but `_zflow` is re-sealed like on
@@ -875,15 +982,16 @@ const getSubmitFlowStepUrl = (id) => {
875
982
  * Safari rejects `Secure`), it is `_zsso` with no `Secure`; the
876
983
  * `__Host-` prefix is dropped because it requires `Secure`.
877
984
  *
878
- * A connection whose `client_id` is a `${{ NAME }}` reference has it filled
879
- * from the project's variables. A provider the engine cannot start a
880
- * sign-in with, including a reference with no variable behind it,
881
- * re-renders the step with `error.sso_unavailable`.
985
+ * An identity provider (an external sign-in such as Google) whose
986
+ * `client_id` is a `${{ NAME }}` reference has it filled from the project's
987
+ * variables. A provider the server cannot start a sign-in with, including a
988
+ * reference with no variable behind it, re-renders the step with
989
+ * `error.sso_unavailable`.
882
990
  *
883
991
  * Reuses the deployment sealed into `_zflow` at `createFlow`; it does not
884
992
  * re-resolve from `Origin`. If that release was revoked since the attempt
885
993
  * started, the response is `409` with `rel.revoked`.
886
- * @summary Submit step data and advance
994
+ * @summary Submit a flow step
887
995
  */
888
996
  const submitFlowStep = async (id, submitFlowStepBody, options) => {
889
997
  const getHeaders = (h) => {
@@ -908,20 +1016,36 @@ const getCreateAuthAttemptUrl = () => {
908
1016
  return `${getApiBaseUrl()}/auth_attempts`;
909
1017
  };
910
1018
  /**
911
- * Starts a new authentication attempt. This is the entry point for the auth_attempts state machine.
912
- *
913
- * An attempt is an ephemeral (15-minute TTL) state machine that drives a single authentication round.
914
- * It accepts factor challenges, verifies proofs, and completes into a session or handoff token.
915
- *
916
- * Accepts a project_id and challenge_nonce (from POST /bootstrap/challenge). For step-up re-auth,
917
- * also include session_id and that session's session_token to add factors to an existing session.
918
- *
919
- * The project comes from the project secret. A body `project_id` that disagrees
920
- * answers `403` with `proj.mismatch`. Sealed `deployment_id` / `release_id` are
921
- * filled only when create runs with a runtime resolution already on the
922
- * context (the flow create path); this HTTP entry point does not resolve
923
- * Origin or refuse a revoked release itself.
924
- * @summary Create a new authentication attempt
1019
+ * Creates an authentication attempt, one sign-in round that expires 15 minutes after creation.
1020
+ *
1021
+ * An authentication attempt collects the proofs for one sign-in and ends in a
1022
+ * handoff token. A handoff token is the short-lived, single-use credential that
1023
+ * a completed attempt hands to the session exchange. A client makes these calls
1024
+ * in order:
1025
+ *
1026
+ * 1. `createAuthAttempt` (`POST /auth_attempts`) creates the attempt.
1027
+ * 2. `issueChallenge` (`POST /auth_attempts/{attempt_id}/challenges`) issues a challenge, a request to prove one factor such as
1028
+ * `identifier`, `password` or `passkey`.
1029
+ * 3. `verifyChallengeProof` (`POST /auth_attempts/{attempt_id}/challenges/{challenge_id}/verify`) submits the proof for that challenge: the
1030
+ * credential, code or assertion. Repeat steps 2 and 3 until
1031
+ * `getAuthAttempt` (`GET /auth_attempts/{attempt_id}`) reports state `completed`, which means every factor in
1032
+ * `required_factors` is verified.
1033
+ * 4. `createHandoff` (`POST /auth_attempts/{attempt_id}/handoff`) completes the attempt and returns the `handoff_token`.
1034
+ * 5. `exchangeHandoff` (`POST /sessions/exchange`) exchanges the handoff token
1035
+ * for the session and its `session_token`.
1036
+ *
1037
+ * The body takes a `project_id` and a `challenge_nonce` (from
1038
+ * `POST /bootstrap/challenge`). For step-up authentication, which adds factors
1039
+ * to an existing session, also send that session's `session_id` and its
1040
+ * `session_token`, as `createSession` (`POST /sessions`) or `exchangeHandoff` returned them.
1041
+ * The attempt's `attempt_id` in the response is the ID every later call takes.
1042
+ *
1043
+ * The project comes from the project secret. A body `project_id` that names
1044
+ * another project answers `403` with `proj.mismatch`: send the credential's own
1045
+ * project. The attempt seals the project's newest primary deployment, whatever
1046
+ * the caller's `Origin`. With none it answers `409` with `rel.no_default`, and a
1047
+ * revoked release answers `409` with `rel.revoked`.
1048
+ * @summary Create an authentication attempt
925
1049
  */
926
1050
  const createAuthAttempt = async (createAuthAttemptBody, options) => {
927
1051
  const getHeaders = (h) => {
@@ -946,14 +1070,14 @@ const getGetAuthAttemptUrl = (attemptId) => {
946
1070
  return `${getApiBaseUrl()}/auth_attempts/${encodeURIComponent(String(attemptId))}`;
947
1071
  };
948
1072
  /**
949
- * Polls the current state of an authentication attempt.
1073
+ * Returns the current state of an authentication attempt, one sign-in round.
950
1074
  *
951
- * Returns the attempt's state, available factors for the next challenge,
952
- * challenges issued so far, and any errors preventing progress.
1075
+ * The response holds the attempt's state, available factors for the next
1076
+ * challenge, challenges issued so far, and any errors preventing progress.
953
1077
  *
954
- * Use this for polling during long-running factor verifications (e.g., waiting for
955
- * a federated IdP callback or a device flow).
956
- * @summary Get authentication attempt state
1078
+ * Use it to poll during long-running factor verifications, for example waiting
1079
+ * for a federated identity provider (IdP) callback or a device flow.
1080
+ * @summary Get an authentication attempt by ID
957
1081
  */
958
1082
  const getAuthAttempt = async (attemptId, options) => {
959
1083
  return customFetch(getGetAuthAttemptUrl(attemptId), {
@@ -965,12 +1089,12 @@ const getIssueChallengeUrl = (attemptId) => {
965
1089
  return `${getApiBaseUrl()}/auth_attempts/${encodeURIComponent(String(attemptId))}/challenges`;
966
1090
  };
967
1091
  /**
968
- * Issues a single-factor verification challenge within an auth attempt.
1092
+ * Issues a challenge, a request to prove one factor, within an authentication attempt.
969
1093
  *
970
- * This advances the authentication state machine by requesting a specific factor method
971
- * (password, passkey, TOTP, OTP via SMS, etc.). The server responds with challenge details
972
- * including method, metadata, and any UI hints. The client then verifies the proof
973
- * by calling POST /auth_attempts/{attempt_id}/challenges/{challenge_id}/verify.
1094
+ * A challenge names one factor method, such as password, passkey, TOTP or OTP
1095
+ * via SMS. The response carries the challenge's `challenge_id`, method,
1096
+ * metadata and any UI hints. The client then submits the proof with
1097
+ * `verifyChallengeProof` (`POST /auth_attempts/{attempt_id}/challenges/{challenge_id}/verify`), using that `challenge_id`.
974
1098
  * @summary Issue a factor challenge
975
1099
  */
976
1100
  const issueChallenge = async (attemptId, issueChallengeBody, options) => {
@@ -996,17 +1120,22 @@ const getVerifyChallengeProofUrl = (attemptId, challengeId) => {
996
1120
  return `${getApiBaseUrl()}/auth_attempts/${encodeURIComponent(String(attemptId))}/challenges/${encodeURIComponent(String(challengeId))}/verify`;
997
1121
  };
998
1122
  /**
999
- * Submits a proof (credential, code, assertion) to verify a factor challenge.
1123
+ * Verifies a challenge by submitting its proof: the credential, code or assertion for the factor.
1000
1124
  *
1001
1125
  * The proof format depends on the challenge method. For example:
1126
+ *
1002
1127
  * - `password` method: { password: "…" }
1003
1128
  * - `totp` method: { totp: { code: "123456" } }
1004
1129
  * - `passkey` method: { passkey: { assertion: "…" } }
1005
1130
  * - `recovery_code` method: { recovery_code: "…" }
1006
1131
  *
1007
- * On successful verification, the factor is written to the auth attempt.
1008
- * The attempt moves to the next pending challenge or completes if all required factors are verified.
1009
- * @summary Verify a factor proof
1132
+ * On success, the factor is recorded on the authentication attempt. The
1133
+ * attempt moves to the next pending challenge, or completes when every required
1134
+ * factor is verified. Then call `createHandoff` (`POST /auth_attempts/{attempt_id}/handoff`).
1135
+ *
1136
+ * A `409` with `att.proof_rejected` means the proof was wrong. Check it and try
1137
+ * again. There is no retry limit: you can retry until the attempt expires.
1138
+ * @summary Verify a challenge proof
1010
1139
  */
1011
1140
  const verifyChallengeProof = async (attemptId, challengeId, verifyChallengeProofBody, options) => {
1012
1141
  const getHeaders = (h) => {
@@ -1031,19 +1160,24 @@ const getCreateHandoffUrl = (attemptId) => {
1031
1160
  return `${getApiBaseUrl()}/auth_attempts/${encodeURIComponent(String(attemptId))}/handoff`;
1032
1161
  };
1033
1162
  /**
1034
- * Completes the authentication attempt and mints a `handoff_token`.
1163
+ * Completes an authentication attempt and mints a `handoff_token`.
1164
+ *
1165
+ * A handoff token is the short-lived credential that a completed attempt hands
1166
+ * to the session exchange. Call this after every required factor is verified and
1167
+ * the attempt is in `completed` state. Otherwise it answers `409` with
1168
+ * `att.not_completed`: verify the remaining factors, then call again.
1035
1169
  *
1036
- * Call this after all required factors have been verified and the attempt is in `completed` state.
1037
- * The handoff token is short-lived (≤60 seconds) and must be exchanged at
1038
- * POST /sessions/exchange to receive the final session and session_token.
1170
+ * Exchange the token at `POST /sessions/exchange` (`exchangeHandoff` (`POST /sessions/exchange`)) within 60
1171
+ * seconds to receive the session and its `session_token`. The handoff token is:
1039
1172
  *
1040
- * The handoff token is:
1041
- * - Single-use (atomic exchange, no retry)
1042
- * - Audience-bound (requires matching project key for exchange)
1043
- * - Idempotency-safe within a 5-minute window (see conventions)
1173
+ * - Single-use: exchange it once, with no retry.
1174
+ * - Bound to the project: the exchange needs the same project's credential.
1175
+ * - Created once: a second call answers `409 att.already_handed_off`, even
1176
+ * with the same idempotency key.
1044
1177
  *
1045
- * Revoke refusal for a sealed release happens at handoff exchange, not here.
1046
- * @summary Complete authentication and create handoff token
1178
+ * A revoked release is refused when the handoff is exchanged, not here. A
1179
+ * release is the configuration that `zitadel deploy` publishes.
1180
+ * @summary Complete an authentication attempt and create a handoff token
1047
1181
  */
1048
1182
  const createHandoff = async (attemptId, options) => {
1049
1183
  return customFetch(getCreateHandoffUrl(attemptId), {
@@ -1058,10 +1192,13 @@ const getCreateProjectUrl = () => {
1058
1192
  * Creates a project and returns its project secret and preview secret, which no
1059
1193
  * other endpoint returns.
1060
1194
  *
1061
- * The request needs no credential and is rate-limited. Unless `seed_defaults` is
1062
- * `false`, the project starts with a default user schema and flow; the CLI turns
1063
- * that off and uploads its own from `.zitadel/`.
1064
- * @summary Create project
1195
+ * A project is the top-level boundary that holds users, sessions and
1196
+ * configuration. It has no owning team until someone claims it; see `initClaim` (`POST /projects/{project_id}/claim/init`).
1197
+ *
1198
+ * The request needs no credential and is rate-limited. On `429`, wait and retry.
1199
+ * Unless `seed_defaults` is `false`, the project starts with a default user schema
1200
+ * and flow. The CLI sets it to `false` and uploads its own from `.zitadel/`.
1201
+ * @summary Create a project
1065
1202
  */
1066
1203
  const createProject = async (createProjectBody, options) => {
1067
1204
  const getHeaders = (h) => {
@@ -1089,9 +1226,9 @@ const getQueryProjectsUrl = () => {
1089
1226
  * Returns the project the project secret belongs to, as a page of at most one
1090
1227
  * project.
1091
1228
  *
1092
- * A credential is scoped to one project until ADR 036 widens it, so the filters
1093
- * and sorting apply to that project alone. The projects a signed-in person can
1094
- * act on are listed by `GET /users/me/projects`.
1229
+ * A credential is scoped to one project today, so the filters and sorting
1230
+ * apply to that project alone. A signed-in person lists the projects they can
1231
+ * act on with `GET /users/me/projects`.
1095
1232
  * @summary Query projects
1096
1233
  */
1097
1234
  const queryProjects = async (queryProjectsBody, options) => {
@@ -1117,8 +1254,12 @@ const getGetProjectUrl = (projectId) => {
1117
1254
  return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}`;
1118
1255
  };
1119
1256
  /**
1120
- * Returns the current state of a project.
1121
- * @summary Get project
1257
+ * Returns a project's current state: its name, origins, password hashing
1258
+ * method and owning team.
1259
+ *
1260
+ * Authenticate with the project secret, or with the session of a signed-in
1261
+ * person who holds a grant on the project.
1262
+ * @summary Get a project by ID
1122
1263
  */
1123
1264
  const getProject = async (projectId, options) => {
1124
1265
  return customFetch(getGetProjectUrl(projectId), {
@@ -1130,8 +1271,16 @@ const getPatchProjectUrl = (projectId) => {
1130
1271
  return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}`;
1131
1272
  };
1132
1273
  /**
1133
- * Updates the state of a project.
1134
- * @summary Update project
1274
+ * Updates a project's name or password hashing method.
1275
+ *
1276
+ * Fields you leave out keep their value. Sending `password_hash: null` drops
1277
+ * the project's own method and returns to the server default. A change of
1278
+ * method rewrites no stored password: each moves to the new method when its
1279
+ * owner next signs in or sets a new password.
1280
+ *
1281
+ * Authenticate with the project secret, or with the session of a signed-in
1282
+ * person who can act on the project.
1283
+ * @summary Update a project
1135
1284
  */
1136
1285
  const patchProject = async (projectId, patchProjectBody, options) => {
1137
1286
  const getHeaders = (h) => {
@@ -1161,35 +1310,35 @@ const getListProjectAdminsUrl = (projectId, params) => {
1161
1310
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/admins?${stringifiedParams}` : `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/admins`;
1162
1311
  };
1163
1312
  /**
1164
- * Lists the people who can administer the project, and how each of them
1165
- * gets that access. A person appears once, with one entry in `sources` per
1166
- * way they hold it:
1313
+ * Lists the people who can administer a project, and how each of them
1314
+ * holds that access.
1167
1315
  *
1168
- * - `owning_team`: an active member of the team that owns the project
1169
- * (ADR 054 §2). Removing a grant does not remove this access; it ends
1170
- * only when the person leaves the team or the project changes owner.
1171
- * - `grant`: an unexpired `admin` grant on the project, either to the
1172
- * person (`grant_id` only) or to a team they are an active member of
1173
- * (`grant_id` and `team`). Revoking that grant removes this source.
1316
+ * A person appears once, with one entry in `sources` per way they hold it:
1174
1317
  *
1175
- * The list follows the authorization check: team membership is read from
1176
- * the same membership projection the check expands, so a person who left a
1177
- * team, or whose team or user was deactivated, is not listed through it.
1178
- * Grants that expired or carry a lower role are left out. A person whose
1179
- * only access is a `viewer` or `editor` grant is not an admin and is not
1180
- * listed. Like the check, the list does not look at a person's user status
1181
- * beyond that, so a direct grant to a suspended person is listed.
1318
+ * - `owning_team`: an active member of the team that owns the project, the
1319
+ * team a claim attaches the project to. Removing a grant does not remove
1320
+ * this access. It ends only when the person leaves the team or the
1321
+ * project changes owner.
1322
+ * - `grant`: an unexpired `admin` grant on the project, which is a role
1323
+ * given to the person (`grant_id` only) or to a team they are an active
1324
+ * member of (`grant_id` and `team`). Revoking that grant removes this
1325
+ * source.
1182
1326
  *
1183
- * A person whose access comes only through teams the caller is not a
1184
- * member of is left out, and a team the caller is not in is named by
1185
- * `team_id` only. The grant to such a team still shows in the project's
1186
- * grants.
1327
+ * The list follows the authorization check. A person who left a team, or
1328
+ * whose team or user was deactivated, is not listed through it. Grants that
1329
+ * expired or carry a lower role are left out. A person whose only access is a
1330
+ * `viewer` or `editor` grant is not an admin and is not listed. Like the
1331
+ * check, the list does not look at a person's user status beyond that, so a
1332
+ * direct grant to a suspended person is listed.
1187
1333
  *
1188
- * Ordered by `user_id` and paginated with `page_token`.
1334
+ * A person whose access comes only through teams the caller is not a
1335
+ * member of is left out. A team the caller is not in is named by `team_id`
1336
+ * only. The grant to such a team still shows in the project's grants.
1189
1337
  *
1190
- * Accepts either a project secret (`oauth2`) or a user-bound Console
1191
- * session cookie (`sessionCookie`) that can read the project.
1192
- * @summary List project admins
1338
+ * The list is ordered by `user_id` and paginated with `page_token`.
1339
+ * Authenticate with a project secret (`oauth2`), or with the session cookie
1340
+ * (`sessionCookie`) of a signed-in person who can read the project.
1341
+ * @summary List the admins of a project
1193
1342
  */
1194
1343
  const listProjectAdmins = async (projectId, params, options) => {
1195
1344
  return customFetch(getListProjectAdminsUrl(projectId, params), {
@@ -1201,11 +1350,22 @@ const getInitClaimUrl = (projectId) => {
1201
1350
  return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/init`;
1202
1351
  };
1203
1352
  /**
1204
- * Starts a claim challenge for an unclaimed project. Authenticated by the
1205
- * project secret, this mints a single-use, short-lived challenge and returns
1206
- * the `claim_url` the developer opens in a browser to complete the claim,
1207
- * together with the `challenge_id` the CLI polls with. The exact expiry is
1208
- * carried by `expires_at` on the response.
1353
+ * Starts a claim, which attaches a project created before sign-in to a
1354
+ * team, and returns the `claim_url` to open in a browser.
1355
+ *
1356
+ * A claim [attaches a project to a team](https://preview.zitadel.com/docs/concepts/project-team-user#claim)
1357
+ * so that the team's members administer it. This operation mints a
1358
+ * single-use, short-lived challenge for an unclaimed project. The developer
1359
+ * opens `claim_url`, signs in and completes the claim in the browser; see
1360
+ * `completeClaim` (`POST /projects/{project_id}/claim/complete`). Poll `getClaimStatus` (`GET /projects/{project_id}/claim/status`) with the returned `challenge_id`,
1361
+ * as `zitadel claim` does. The response's `expires_at` carries the exact expiry.
1362
+ *
1363
+ * Authenticate with the project secret that `createProject` (`POST /projects`) returns as
1364
+ * `project_secret`.
1365
+ *
1366
+ * A `409` means a team already claimed the project, and its details name
1367
+ * that team. A `410` means the project's 14-day claim window has closed,
1368
+ * which is final.
1209
1369
  * @summary Initialize a project claim
1210
1370
  */
1211
1371
  const initClaim = async (projectId, options) => {
@@ -1223,15 +1383,23 @@ const getGetClaimStatusUrl = (projectId, params) => {
1223
1383
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/status?${stringifiedParams}` : `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/status`;
1224
1384
  };
1225
1385
  /**
1226
- * Polled by the CLI while a browser completes the claim. Authorized by the
1227
- * project secret that initiated the challenge. Returns `pending`, or
1228
- * `completed` with the owning team, the claim timestamp, and the dashboard
1229
- * URL once the project is claimed. The claim grant, not the polled
1230
- * challenge, is the source of truth: a project claimed through another
1231
- * concurrent challenge also reports `completed`, and a completed claim
1232
- * keeps reporting `completed` past this challenge's expiry and past the
1233
- * project's claim window.
1234
- * @summary Get claim status
1386
+ * Returns the status of a claim challenge, `pending` or `completed`, while a
1387
+ * browser completes the claim.
1388
+ *
1389
+ * A [claim attaches a project to a team](https://preview.zitadel.com/docs/concepts/project-team-user#claim).
1390
+ * `zitadel claim` polls this operation after `initClaim` (`POST /projects/{project_id}/claim/init`) starts the claim.
1391
+ * Once the project is claimed, the response is `completed` with the owning
1392
+ * team, the claim timestamp and the dashboard URL.
1393
+ *
1394
+ * The claim itself, not the polled challenge, decides the status. A project
1395
+ * claimed through another concurrent challenge also reports `completed`. A
1396
+ * completed claim keeps reporting `completed` past this challenge's expiry
1397
+ * and past the project's claim window.
1398
+ *
1399
+ * Pass the `challenge_id` that `initClaim` returns. Authenticate with the
1400
+ * project secret that started the challenge. On `410` with `proj.claim_expired`, call
1401
+ * `initClaim` again for a fresh challenge.
1402
+ * @summary Get the status of a project claim
1235
1403
  */
1236
1404
  const getClaimStatus = async (projectId, params, options) => {
1237
1405
  return customFetch(getGetClaimStatusUrl(projectId, params), {
@@ -1243,10 +1411,18 @@ const getCompleteClaimUrl = (projectId) => {
1243
1411
  return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/complete`;
1244
1412
  };
1245
1413
  /**
1246
- * Called by the browser after the developer authenticates on the claim page.
1247
- * Authenticated by the session cookie, it attaches the project to
1248
- * the developer's personal team using the `challenge_id` from the claim URL as
1249
- * its single-use, browser-safe authorization.
1414
+ * Completes a claim by attaching the project to the signed-in developer's
1415
+ * personal team.
1416
+ *
1417
+ * A [claim attaches a project to a team](https://preview.zitadel.com/docs/concepts/project-team-user#claim),
1418
+ * so that the team's members administer it. The claim page in the browser
1419
+ * calls this operation after the developer signs in, with the session cookie.
1420
+ * The `challenge_id` from the claim URL that `initClaim` (`POST /projects/{project_id}/claim/init`) returns is the
1421
+ * request's single-use, browser-safe authorization.
1422
+ *
1423
+ * Claims are first-claim-wins and spend the challenge. If a team already
1424
+ * claimed the project, the request answers `409`. If the challenge lapsed
1425
+ * (`410` with `proj.claim_expired`), call `initClaim` again for a fresh one.
1250
1426
  * @summary Complete a project claim
1251
1427
  */
1252
1428
  const completeClaim = async (projectId, completeClaimBody, options) => {
@@ -1277,12 +1453,18 @@ const getGetClaimWindowUrl = (projectId, params) => {
1277
1453
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/window?${stringifiedParams}` : `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/window`;
1278
1454
  };
1279
1455
  /**
1280
- * Read by the claim page in the browser to show how long is left to claim the
1281
- * project. Unauthenticated by design: the claim page runs this before the
1282
- * developer has signed in, and holding the `challenge_id` from the claim URL
1283
- * is the authorization — the same capability `claim/complete` accepts. It
1284
- * reveals only the window, never the project itself, and unlike
1285
- * `claim/complete` it spends nothing, so a reload is free.
1456
+ * Returns when a project's claim window closes and whether it has already
1457
+ * closed.
1458
+ *
1459
+ * The claim window is the 14 days after a project is created during which a
1460
+ * team can [claim it](https://preview.zitadel.com/docs/concepts/project-team-user#claim). The claim page
1461
+ * in the browser calls this operation to show how long is left.
1462
+ *
1463
+ * The request needs no credential, because the claim page calls it before the
1464
+ * developer has signed in. Holding the `challenge_id` from the claim URL that
1465
+ * `initClaim` (`POST /projects/{project_id}/claim/init`) returns is the authorization, the same one `completeClaim` (`POST /projects/{project_id}/claim/complete`)
1466
+ * accepts. The response reveals only the window, never the project itself.
1467
+ * Unlike `completeClaim` it spends nothing, so reloading the page is safe.
1286
1468
  * @summary Get the claim window for a project
1287
1469
  */
1288
1470
  const getClaimWindow = async (projectId, params, options) => {
@@ -1295,10 +1477,22 @@ const getAddOriginUrl = (projectId) => {
1295
1477
  return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/origins`;
1296
1478
  };
1297
1479
  /**
1298
- * Adds one `{pattern, kind}` to the project's origins. A primary pattern
1299
- * must be an exact URL (no wildcard). Preview patterns may include a single
1300
- * DNS-label wildcard. Adding a pattern that already exists with the same
1301
- * kind is idempotent and answers 201 with the stored origin.
1480
+ * Adds an origin pattern, a `pattern` and its `kind`, to the project's origins.
1481
+ *
1482
+ * An origin pattern says which web origins the project accepts. A `primary`
1483
+ * pattern must be an exact URL with no wildcard. A `preview` pattern may
1484
+ * include a single DNS-label wildcard.
1485
+ *
1486
+ * While the project has no patterns, it admits no origin except a loopback
1487
+ * origin, so the first pattern you add opens it to the origins that
1488
+ * pattern matches. Admitting an origin is not serving it: a new `primary`
1489
+ * origin answers `rel.not_deployed` until the next deploy to primary
1490
+ * (`zitadel deploy`).
1491
+ *
1492
+ * Adding a pattern that already exists with the same kind is idempotent and
1493
+ * answers `201` with the stored origin. If the pattern exists with the other
1494
+ * kind, the request is refused with `origin.kind_conflict`: remove it with
1495
+ * `removeOrigin` (`POST /projects/{project_id}/origins/remove`), then add it again.
1302
1496
  * @summary Add an origin pattern
1303
1497
  */
1304
1498
  const addOrigin = async (projectId, addOriginBody, options) => {
@@ -1324,10 +1518,15 @@ const getRemoveOriginUrl = (projectId) => {
1324
1518
  return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/origins/remove`;
1325
1519
  };
1326
1520
  /**
1327
- * Removes one pattern from the project's origins. Requests from URLs only
1328
- * that pattern admitted are refused from then on; live previews and
1329
- * deployment history are untouched. Removing a pattern that is already
1330
- * absent is idempotent and answers 204.
1521
+ * Removes one origin pattern from the project's origins.
1522
+ *
1523
+ * Requests from URLs only that pattern admitted are refused from then on.
1524
+ * Live previews and deployment history are untouched. Removing the last
1525
+ * pattern leaves an empty list, which admits no origin except a loopback
1526
+ * origin.
1527
+ * Removing a pattern that is already absent is idempotent and answers `204`.
1528
+ *
1529
+ * The body's `pattern` is a pattern `addOrigin` (`POST /projects/{project_id}/origins`) stored.
1331
1530
  * @summary Remove an origin pattern
1332
1531
  */
1333
1532
  const removeOrigin = async (projectId, removeOriginBody, options) => {
@@ -1358,10 +1557,12 @@ const getListPreviewsUrl = (projectId, params) => {
1358
1557
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/previews?${stringifiedParams}` : `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/previews`;
1359
1558
  };
1360
1559
  /**
1361
- * Lists the project's live previews, newest first by `created_at`. An
1362
- * expired or removed preview is not listed; what was deployed to it stays
1560
+ * Lists the project's live previews, newest first by `created_at`.
1561
+ *
1562
+ * A preview is a URL with a deployment on it, served until it expires.
1563
+ * An expired or removed preview is not listed. What was deployed to it stays
1363
1564
  * in `GET /deployments`.
1364
- * @summary List previews
1565
+ * @summary List a project's previews
1365
1566
  */
1366
1567
  const listPreviews = async (projectId, params, options) => {
1367
1568
  return customFetch(getListPreviewsUrl(projectId, params), {
@@ -1374,14 +1575,14 @@ const getRemovePreviewUrl = (projectId) => {
1374
1575
  };
1375
1576
  /**
1376
1577
  * Ends a preview before it expires: the URL stops being served at once.
1377
- * The deployments to it stay in the history.
1378
1578
  *
1379
- * Idempotent: a URL with no live preview, including one that has already
1380
- * expired or was removed before, answers `204` too, so a cleanup that
1381
- * races the expiry still succeeds.
1579
+ * The deployments to it stay in the history. The call is idempotent.
1580
+ * A URL with no live preview answers `204` too. That includes one that
1581
+ * expired or was removed before, so a cleanup that races the expiry still
1582
+ * succeeds.
1382
1583
  *
1383
1584
  * The URL travels in the body rather than the path because an origin
1384
- * contains `/`.
1585
+ * contains `/`. Take it from `listPreviews` (`GET /projects/{project_id}/previews`).
1385
1586
  * @summary Remove a preview
1386
1587
  */
1387
1588
  const removePreview = async (projectId, removePreviewBody, options) => {
@@ -1407,29 +1608,36 @@ const getCreateSessionUrl = () => {
1407
1608
  return `${getApiBaseUrl()}/sessions`;
1408
1609
  };
1409
1610
  /**
1410
- * Creates an anonymous session shell with no user and no factors (`state: building`).
1611
+ * Creates an anonymous session with no user and no factors (`state: building`).
1612
+ *
1613
+ * A session is the durable record of a signed-in user. This call is optional: an
1614
+ * authentication attempt creates a session implicitly if none is provided.
1615
+ * Create one explicitly when you want to:
1411
1616
  *
1412
- * This is optional — an `auth_attempt` will create a session implicitly if none is provided.
1413
- * Use this explicitly when you want to:
1414
- * - Pre-allocate a `session_id` before the user is known, so device/telemetry signals
1617
+ * - Pre-allocate a `session_id` before the user is known, so device and telemetry signals
1415
1618
  * can be correlated with the eventual authenticated session from the start.
1416
1619
  * - Track anonymous state (bot detection, device fingerprint) that survives until authentication.
1417
1620
  *
1418
- * Creating a session is an app-plane operation on the project credential
1419
- * (`session.write`). The returned `session_token` is a session credential for the
1420
- * end-user client, not a management scope: it is delivered as the
1421
- * `__Host-zitadel_session` cookie (`zitadel_session` over plain http to a
1422
- * loopback host) and authorises the self-service operations
1423
- * `GET /sessions/me` and `DELETE /sessions/me` (`sessionCookie` scheme). The
1424
- * by-id operations `GET /sessions/{session_id}` and `DELETE /sessions/{session_id}`
1425
- * are operator endpoints and require `session.read` / `session.delete` instead.
1621
+ * The session belongs to the project of the project secret. A `project_id` that
1622
+ * names another project answers `403` with `proj.mismatch` and creates nothing:
1623
+ * send the credential's own project.
1426
1624
  *
1427
- * The `session_token` is superseded when a handoff exchange completes — clients must
1428
- * replace it at that point.
1625
+ * Creating a session runs on the project credential (`session.write`). The returned
1626
+ * `session_token` is a session credential for the end-user client, not a
1627
+ * management scope. It is delivered as the `__Host-zitadel_session` cookie
1628
+ * (`zitadel_session` over plain http to a loopback host) and authorises the
1629
+ * self-service operations `GET /sessions/me` and `DELETE /sessions/me`
1630
+ * (`sessionCookie` scheme). The by-id operations `GET /sessions/{session_id}`
1631
+ * and `DELETE /sessions/{session_id}` are operator endpoints and require
1632
+ * `session.read` / `session.delete` instead.
1429
1633
  *
1430
- * Anonymous sessions expire aggressively (10-minute TTL). The TTL resets to the configured
1431
- * full session TTL when the first authentication factor is written via a completing `auth_attempt`.
1432
- * @summary Create an anonymous session shell
1634
+ * The `session_token` is superseded when a handoff exchange completes. Clients
1635
+ * must replace it at that point.
1636
+ *
1637
+ * Anonymous sessions expire after 10 minutes. The lifetime resets to the
1638
+ * configured full session lifetime when a completing authentication attempt
1639
+ * writes the first authentication factor.
1640
+ * @summary Create an anonymous session
1433
1641
  */
1434
1642
  const createSession = async (createSessionBody, options) => {
1435
1643
  const getHeaders = (h) => {
@@ -1459,9 +1667,10 @@ const getQuerySessionsUrl = (params) => {
1459
1667
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/query?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/query`;
1460
1668
  };
1461
1669
  /**
1462
- * Returns the sessions of a project, paginated with a cursor.
1670
+ * Returns a page of a project's sessions.
1671
+ *
1463
1672
  * Sessions of every lifecycle state are returned; each carries its `state`.
1464
- * Requires `session.read` permission.
1673
+ * Requires the `session.read` scope.
1465
1674
  * @summary Query sessions
1466
1675
  */
1467
1676
  const querySessions = async (querySessionsBody, params, options) => {
@@ -1492,31 +1701,38 @@ const getExchangeHandoffUrl = (params) => {
1492
1701
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/exchange?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/exchange`;
1493
1702
  };
1494
1703
  /**
1495
- * Consumes a one-time `handoff_token` minted by `POST /auth_attempts/{id}/handoff`
1496
- * and returns the resulting session and a `session_token`.
1704
+ * Exchanges a handoff token for a session and a `session_token`.
1497
1705
  *
1498
- * The server resolves the originating `auth_attempt` from the token and then:
1706
+ * A handoff token is the short-lived, single-use credential that
1707
+ * `createHandoff` (`POST /auth_attempts/{attempt_id}/handoff`) returns as `handoff_token` once an authentication attempt is
1708
+ * complete. This call consumes it. It is the last step of the sign-in sequence:
1709
+ * create the attempt, issue a challenge, verify the proof, create the handoff,
1710
+ * exchange it.
1499
1711
  *
1500
- * | Originating auth_attempt | Outcome |
1712
+ * The server resolves the originating authentication attempt from the token and then:
1713
+ *
1714
+ * | Originating authentication attempt | Outcome |
1501
1715
  * |---|---|
1502
1716
  * | No `session_id` | A new authenticated session is **created**. |
1503
- * | `session_id` points to an anonymous shell | Existing session is **upgraded** — user and factors written in, TTL reset to full session TTL. |
1504
- * | `session_id` points to an active session (step-up) | Existing session is **upgraded** — new factors merged, `assurance_levels[]` expanded. |
1717
+ * | `session_id` points to an anonymous session | Existing session is **upgraded**: user and factors written in, lifetime reset to the full session lifetime. |
1718
+ * | `session_id` points to an active session (step-up) | Existing session is **upgraded**: new factors merged, `assurance_levels[]` expanded. |
1505
1719
  *
1506
1720
  * The response shape is identical in all three cases.
1507
1721
  *
1508
- * The `session_token` supersedes any previously issued `session_token` for the same session.
1509
- * Clients must replace their stored token at this point.
1722
+ * The `session_token` supersedes any previously issued `session_token` for the
1723
+ * same session. Clients must replace their stored token at this point.
1510
1724
  *
1511
- * Requires a project service key (OAuth2 client credentials).
1725
+ * Requires a project service key (OAuth2 client credentials). The project comes
1726
+ * from the project secret. A query `project_id` that disagrees answers `403`
1727
+ * with `proj.mismatch`.
1512
1728
  *
1513
- * The project comes from the project secret. A query `project_id` that
1514
- * disagrees answers `403` with `proj.mismatch`. The exchange resolves a
1515
- * deployment the same way as other runtime operations; with no browser
1516
- * `Origin` and nothing deployed to the resolved target the response is
1517
- * `409` with `rel.not_deployed`. A revoked release answers `409` with
1518
- * `rel.revoked`.
1519
- * @summary Exchange handoff token for a session
1729
+ * The exchange resolves a deployment the same way as other runtime operations.
1730
+ * A deployment makes a release live, and a release is the configuration that
1731
+ * `zitadel deploy` publishes. With no browser `Origin` and
1732
+ * nothing deployed to the resolved target, the response is `409` with
1733
+ * `rel.not_deployed`: run `zitadel deploy`, then retry. A revoked release
1734
+ * answers `409` with `rel.revoked`.
1735
+ * @summary Exchange a handoff token for a session
1520
1736
  */
1521
1737
  const exchangeHandoff = async (exchangeHandoffBody, params, options) => {
1522
1738
  const getHeaders = (h) => {
@@ -1541,13 +1757,14 @@ const getGetSessionUrl = (sessionId) => {
1541
1757
  return `${getApiBaseUrl()}/sessions/${encodeURIComponent(String(sessionId))}`;
1542
1758
  };
1543
1759
  /**
1544
- * Returns the current state of a session including its factors and all currently
1545
- * satisfied assurance levels.
1760
+ * Returns the current state of a session, including its factors and all currently satisfied assurance levels.
1546
1761
  *
1547
- * `assurance_levels[]` may shrink over time as factor freshness windows expire,
1548
- * without the session itself expiring. Use step-up authentication (a new `auth_attempt`
1549
- * against the same `session_id`) to restore a dropped assurance level.
1550
- * @summary Get session state
1762
+ * An assurance level is a profile, such as `urn:nist:aal:2`, that the
1763
+ * session's verified factors satisfy. `assurance_levels[]` may shrink over time
1764
+ * as factor freshness windows expire, without the session itself expiring.
1765
+ * To restore a dropped level, use step-up authentication: create an
1766
+ * authentication attempt with the same `session_id`.
1767
+ * @summary Get a session by ID
1551
1768
  */
1552
1769
  const getSession = async (sessionId, options) => {
1553
1770
  return customFetch(getGetSessionUrl(sessionId), {
@@ -1559,16 +1776,17 @@ const getRevokeSessionUrl = (sessionId) => {
1559
1776
  return `${getApiBaseUrl()}/sessions/${encodeURIComponent(String(sessionId))}`;
1560
1777
  };
1561
1778
  /**
1562
- * Permanently deletes the session, terminating it immediately.
1779
+ * Revokes a session by deleting it, immediately and for good. A later
1780
+ * `getSession` (`GET /sessions/{session_id}`) for it answers `404`.
1563
1781
  *
1564
- * This is the operator revoke path and requires the `session.delete` scope on a
1565
- * project-bound credential. End-user logout with the session cookie is
1782
+ * This is the operator revoke path. It requires the `session.delete` scope on a
1783
+ * project-bound credential. End-user sign-out with the session cookie is
1566
1784
  * `DELETE /sessions/me` (`sessionCookie` scheme).
1567
1785
  *
1568
- * Idempotent: deleting a session that does not exist (or was already deleted)
1569
- * still returns 204. After deletion, any tokens derived from the session are
1786
+ * Idempotent: revoking a session that does not exist, or was already revoked,
1787
+ * still returns `204`. After revocation, any tokens derived from the session are
1570
1788
  * invalidated.
1571
- * @summary Revoke session
1789
+ * @summary Revoke a session
1572
1790
  */
1573
1791
  const revokeSession = async (sessionId, options) => {
1574
1792
  return customFetch(getRevokeSessionUrl(sessionId), {
@@ -1585,15 +1803,16 @@ const getGetMySessionUrl = (params) => {
1585
1803
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/me?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/me`;
1586
1804
  };
1587
1805
  /**
1588
- * Returns the current state of the current session including its factors and all currently
1589
- * satisfied assurance levels.
1806
+ * Returns the current state of the caller's session, including its factors and all currently satisfied assurance levels.
1590
1807
  *
1591
1808
  * With `project_id`, the session is returned only when it belongs to that project.
1592
1809
  *
1593
- * `assurance_levels[]` may shrink over time as factor freshness windows expire,
1594
- * without the session itself expiring. Use step-up authentication (a new `auth_attempt`
1595
- * against the same `session_id`) to restore a dropped assurance level.
1596
- * @summary Get my session state
1810
+ * An assurance level is a profile, such as `urn:nist:aal:2`, that the
1811
+ * session's verified factors satisfy. `assurance_levels[]` may shrink over time
1812
+ * as factor freshness windows expire, without the session itself expiring.
1813
+ * To restore a dropped level, use step-up authentication: create an
1814
+ * authentication attempt with the same `session_id`.
1815
+ * @summary Get my session
1597
1816
  */
1598
1817
  const getMySession = async (params, options) => {
1599
1818
  return customFetch(getGetMySessionUrl(params), {
@@ -1610,15 +1829,15 @@ const getRevokeMySessionUrl = (params) => {
1610
1829
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/me?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/me`;
1611
1830
  };
1612
1831
  /**
1613
- * Logs out by permanently deleting the session.
1832
+ * Revokes the caller's own session by deleting it, which signs the user out.
1614
1833
  *
1615
- * The session cookie issued at creation (or superseded by a handoff
1616
- * exchange) is required, with the session's token from `GET /sessions/me/csrf`
1617
- * in the `X-Zitadel-CSRF` header. Idempotent: if the session is already gone
1618
- * this still returns 204. Any tokens derived from the session are invalidated,
1619
- * and the cookie itself is cleared in the response.
1834
+ * The request needs the session cookie issued at creation (or superseded by a
1835
+ * handoff exchange). It also needs the session's CSRF token from
1836
+ * `GET /sessions/me/csrf` in the `X-Zitadel-CSRF` header. Idempotent: if the session is already gone,
1837
+ * this still returns `204`. Any tokens derived from the session are
1838
+ * invalidated, and the response clears the cookie.
1620
1839
  *
1621
- * With `project_id`, only a session of that project is deleted. A session of
1840
+ * With `project_id`, only a session of that project is revoked. A session of
1622
1841
  * another project is left alone, and so is its cookie.
1623
1842
  * @summary Revoke my session
1624
1843
  */
@@ -1637,13 +1856,13 @@ const getGetMySessionCsrfTokenUrl = (params) => {
1637
1856
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/me/csrf?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/me/csrf`;
1638
1857
  };
1639
1858
  /**
1640
- * Returns the session-bound token for cross-site request forgery protection
1641
- * (ADR 053 §5). Browser code sends it in the `X-Zitadel-CSRF` header on the
1642
- * state-changing requests the session cookie authenticates that require it
1643
- * — see the `sessionCookie` scheme. It authorizes nothing on its own: the
1644
- * HttpOnly cookie is still the credential, and a cross-site page cannot
1645
- * read this response. It stays the same for the life of the session, so a
1646
- * client fetches it once per session.
1859
+ * Returns the session-bound token that protects against cross-site request
1860
+ * forgery (CSRF). Browser code sends it in the `X-Zitadel-CSRF` header on the
1861
+ * state-changing requests that the session cookie authenticates and that
1862
+ * require it; see the `sessionCookie` scheme. It authorizes nothing on its
1863
+ * own: the HttpOnly cookie is still the credential, and a cross-site page
1864
+ * cannot read this response. It stays the same for the life of the session,
1865
+ * so a client fetches it once per session.
1647
1866
  *
1648
1867
  * With `project_id`, the token is returned only when the session belongs to
1649
1868
  * that project.
@@ -1664,16 +1883,21 @@ const getCreateSchemaUrl = (params) => {
1664
1883
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/schemas?${stringifiedParams}` : `${getApiBaseUrl()}/schemas`;
1665
1884
  };
1666
1885
  /**
1667
- * Create a new schema. The optional `$id` field is the JSON Schema document
1668
- * URI used to identify the schema in future requests (GitOps-stable identity,
1669
- * not a free-form resource primary key). When `$id` is omitted, the server
1670
- * generates a `sch_*` URL. When provided, `$id` must be unique within the
1671
- * project and should ideally be a valid URI pointing at where the schema can
1672
- * be accessed.
1886
+ * Creates a user schema, the JSON Schema that says which attributes a user
1887
+ * has and which attribute identifies the user.
1888
+ *
1889
+ * The request is either a user schema (`kind: user-schema`) or a schema URL
1890
+ * (`kind: schema-url`) that the server resolves. The response's `id` is what
1891
+ * `createUser` (`POST /users`) takes as `schema`.
1673
1892
  *
1674
- * The schema can either be a concrete schema, e.g. a user schema, or a
1675
- * schema-url which will be resolved by the server.
1676
- * @summary Create new schema
1893
+ * The optional `$id` is the JSON Schema document URI that identifies the
1894
+ * schema in later requests. It is a stable identity for GitOps, not a
1895
+ * free-form resource key. When `$id` is omitted, the server generates a
1896
+ * `sch_*` URL. When provided, `$id` must be unique within the project and
1897
+ * should ideally be a valid URI pointing at where the schema can be accessed.
1898
+ * A `$id` that already exists in the project is refused; pick another or
1899
+ * omit it.
1900
+ * @summary Create a schema
1677
1901
  */
1678
1902
  const createSchema = async (createSchemaBody, params, options) => {
1679
1903
  const getHeaders = (h) => {
@@ -1709,9 +1933,12 @@ const getListSchemasUrl = (params) => {
1709
1933
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/schemas?${stringifiedParams}` : `${getApiBaseUrl()}/schemas`;
1710
1934
  };
1711
1935
  /**
1712
- * Retrieve a list of all schemas available in the system. This endpoint
1713
- * supports pagination and filtering based on schema attributes.
1714
- * @summary List all schemas
1936
+ * Lists the schemas of a project, newest first, paginated with a cursor.
1937
+ * Filter by `object_type` or `kind`, and choose which revisions to return
1938
+ * with `revisions`.
1939
+ *
1940
+ * A schema's `id` is what `createUser` (`POST /users`) takes as `schema`.
1941
+ * @summary List schemas
1715
1942
  */
1716
1943
  const listSchemas = async (params, options) => {
1717
1944
  return customFetch(getListSchemasUrl(params), {
@@ -1728,17 +1955,17 @@ const getGetSchemaByIdUrl = (id, params) => {
1728
1955
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/schemas/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/schemas/${encodeURIComponent(String(id))}`;
1729
1956
  };
1730
1957
  /**
1731
- * Get a schema by its ID. A schema ID identifies one immutable revision, so
1958
+ * Returns a schema by ID. A schema ID identifies one immutable revision, so
1732
1959
  * this returns exactly that revision. To find the current revision of an
1733
- * object type, list with `revisions=latest`.
1960
+ * object type, call `listSchemas` (`GET /schemas`) with `revisions=latest`.
1734
1961
  *
1735
1962
  * Schema IDs are unique within a project, not across projects (the seeded
1736
- * default schema carries the same `$id` in every project). A Console
1963
+ * default schema carries the same `$id` in every project). A console
1737
1964
  * session that manages more than one project names the project with
1738
1965
  * `project_id`; without it, the ID is resolved in the credential's own
1739
1966
  * project when it is ambiguous. A project secret always resolves in its
1740
1967
  * own project and ignores `project_id`.
1741
- * @summary Get schema by ID
1968
+ * @summary Get a schema by ID
1742
1969
  */
1743
1970
  const getSchemaById = async (id, params, options) => {
1744
1971
  return customFetch(getGetSchemaByIdUrl(id, params), {
@@ -1750,17 +1977,22 @@ const getCreateFlowDefinitionUrl = () => {
1750
1977
  return `${getApiBaseUrl()}/flow_definitions`;
1751
1978
  };
1752
1979
  /**
1753
- * Publishes a new flow definition revision.
1754
- * Flow definitions are templates that define the sequence of steps (capabilities)
1755
- * for a particular user journey (e.g., registration, login, password reset).
1980
+ * Creates a flow definition by publishing a new revision of it. It records a
1981
+ * `flowdef.created` event.
1982
+ *
1983
+ * A [flow definition](https://preview.zitadel.com/docs/concepts/flows-and-schemas) is a template that
1984
+ * defines the sequence of steps (capabilities) for one user journey, such as
1985
+ * registration, login or password reset. The body follows the flow
1986
+ * definition schema, which includes the flow's purpose, audience and steps.
1756
1987
  *
1757
- * Flow definitions are created based on the flow definition schema, which includes the flow's purpose, audience, and the steps involved.
1988
+ * Every call allocates a new opaque ID. That `id` is the `revision_id` a
1989
+ * release pins for `kind: flow_definition`.
1758
1990
  *
1759
- * Every call allocates a new opaque id. Revisions of one flow share its
1760
- * `name`; posting a definition under an existing `name` publishes a new
1761
- * revision of that flow, it is not a conflict. List with `name` to see a
1762
- * flow's revisions, newest by creation time first.
1763
- * @summary Create a new flow definition
1991
+ * Revisions of one flow share its `name`. Posting a definition under an
1992
+ * existing `name` publishes a new revision of that flow, which is not a
1993
+ * conflict. List with `name` to see a flow's revisions, newest by creation
1994
+ * time first.
1995
+ * @summary Create a flow definition
1764
1996
  */
1765
1997
  const createFlowDefinition = async (createFlowDefinitionBody, options) => {
1766
1998
  const getHeaders = (h) => {
@@ -1796,9 +2028,12 @@ const getListFlowDefinitionsUrl = (params) => {
1796
2028
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/flow_definitions?${stringifiedParams}` : `${getApiBaseUrl()}/flow_definitions`;
1797
2029
  };
1798
2030
  /**
1799
- * Retrieves a list of all flow definitions, newest by creation time first.
1800
- * This endpoint can be used to view existing flow definitions and their configurations.
1801
- * Filter by `name` to list the revisions of one flow.
2031
+ * Lists the project's flow definitions with their configurations, newest by
2032
+ * creation time first. A flow definition sets which step of a sign-in
2033
+ * renders when, and which fields each step collects.
2034
+ *
2035
+ * The `id` of an entry is the flow definition ID that `getFlowDefinition` (`GET /flow_definitions/{id}`)
2036
+ * takes. Filter by `name` to list the revisions of one flow.
1802
2037
  * @summary List flow definitions
1803
2038
  */
1804
2039
  const listFlowDefinitions = async (params, options) => {
@@ -1811,8 +2046,9 @@ const getGetFlowDefinitionUrl = (id) => {
1811
2046
  return `${getApiBaseUrl()}/flow_definitions/${encodeURIComponent(String(id))}`;
1812
2047
  };
1813
2048
  /**
1814
- * Get a flow definition by id
1815
- * @summary Get a flow definition by id
2049
+ * Returns one flow definition revision. Pass the `id` that
2050
+ * `createFlowDefinition` (`POST /flow_definitions`) or `listFlowDefinitions` (`GET /flow_definitions`) returns.
2051
+ * @summary Get a flow definition by ID
1816
2052
  */
1817
2053
  const getFlowDefinition = async (id, options) => {
1818
2054
  return customFetch(getGetFlowDefinitionUrl(id), {
@@ -1831,9 +2067,10 @@ const getCreateTeamUrl = (params) => {
1831
2067
  /**
1832
2068
  * Creates a team in the project, with a name no other team in the project has.
1833
2069
  *
1834
- * A taken name is refused with `409 team.already_exists`. The new team has no
1835
- * members yet.
1836
- * @summary Create team
2070
+ * A team groups users inside a project and can represent a customer. A taken
2071
+ * name is refused with `409 team.already_exists`: choose another name. The
2072
+ * new team has no members yet.
2073
+ * @summary Create a team
1837
2074
  */
1838
2075
  const createTeam = async (createTeamBody, params, options) => {
1839
2076
  const getHeaders = (h) => {
@@ -1863,10 +2100,11 @@ const getQueryTeamsUrl = (params) => {
1863
2100
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/teams/query?${stringifiedParams}` : `${getApiBaseUrl()}/teams/query`;
1864
2101
  };
1865
2102
  /**
1866
- * Returns the teams of a project, paginated with a cursor.
2103
+ * Returns a page of a project's teams.
1867
2104
  *
1868
- * `project_id` names the project to list; without it, the credential's own
1869
- * project is listed.
2105
+ * Pass the response's `next_page_token` as `page_token` to fetch the next
2106
+ * page. `project_id` names the project to list; without it, the credential's
2107
+ * own project is listed.
1870
2108
  * @summary Query teams
1871
2109
  */
1872
2110
  const queryTeams = async (queryTeamsBody, params, options) => {
@@ -1892,8 +2130,10 @@ const getGetTeamUrl = (teamId) => {
1892
2130
  return `${getApiBaseUrl()}/teams/${encodeURIComponent(String(teamId))}`;
1893
2131
  };
1894
2132
  /**
1895
- * Returns a Team by its id.
1896
- * @summary Get team
2133
+ * Returns a team, a group of users inside a project, by ID.
2134
+ *
2135
+ * A deactivated team is still returned, with status `deactivated`.
2136
+ * @summary Get a team by ID
1897
2137
  */
1898
2138
  const getTeam = async (teamId, options) => {
1899
2139
  return customFetch(getGetTeamUrl(teamId), {
@@ -1905,20 +2145,20 @@ const getDeleteTeamUrl = (teamId) => {
1905
2145
  return `${getApiBaseUrl()}/teams/${encodeURIComponent(String(teamId))}`;
1906
2146
  };
1907
2147
  /**
1908
- * Deactivates the team.
2148
+ * Deactivates a team and removes its memberships.
1909
2149
  *
1910
- * The team is tombstoned rather than erased: it stays readable through
1911
- * getTeam with status `deactivated`. Its memberships are removed and the
1912
- * users whose lifecycle it owns are deactivated with it.
2150
+ * The team is kept rather than erased: `getTeam` (`GET /teams/{team_id}`) still returns it with
2151
+ * status `deactivated`. The users whose lifecycle the team owns are
2152
+ * deactivated with it.
1913
2153
  *
1914
2154
  * The request is idempotent. Deleting a team that is already deactivated
1915
- * or doesn't exist succeeds without changing anything.
2155
+ * or does not exist succeeds without changing anything.
1916
2156
  *
1917
- * A team that still owns a project is refused with `409
1918
- * team.owns_project`: deactivating it would leave the project owned by a
1919
- * dead team and so unmanageable. No endpoint releases that ownership yet,
1920
- * so such a team cannot currently be deactivated through the API.
1921
- * @summary Delete team
2157
+ * A team that still owns a project is refused with `409 team.owns_project`.
2158
+ * Deactivating it would leave the project owned by a deactivated team and so
2159
+ * unmanageable. No endpoint ends a team's ownership of a project yet, so for
2160
+ * now such a team cannot be deactivated through the API.
2161
+ * @summary Deactivate a team
1922
2162
  */
1923
2163
  const deleteTeam = async (teamId, options) => {
1924
2164
  return customFetch(getDeleteTeamUrl(teamId), {
@@ -1930,8 +2170,12 @@ const getUpdateTeamUrl = (teamId) => {
1930
2170
  return `${getApiBaseUrl()}/teams/${encodeURIComponent(String(teamId))}`;
1931
2171
  };
1932
2172
  /**
1933
- * Update team. Only active teams can be updated.
1934
- * @summary Update team
2173
+ * Renames an active team.
2174
+ *
2175
+ * Only active teams can be updated. A deactivated team answers `404`. The new
2176
+ * name must be unique within the project, and a taken name answers `409`:
2177
+ * choose another name.
2178
+ * @summary Update a team
1935
2179
  */
1936
2180
  const updateTeam = async (teamId, updateTeamBody, options) => {
1937
2181
  const getHeaders = (h) => {
@@ -1952,6 +2196,73 @@ const updateTeam = async (teamId, updateTeamBody, options) => {
1952
2196
  body: JSON.stringify(updateTeamBody)
1953
2197
  });
1954
2198
  };
2199
+ const getSearchUrl = (params) => {
2200
+ const normalizedParams = new URLSearchParams();
2201
+ Object.entries(params || {}).forEach(([key, value]) => {
2202
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2203
+ });
2204
+ const stringifiedParams = normalizedParams.toString();
2205
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/search?${stringifiedParams}` : `${getApiBaseUrl()}/search`;
2206
+ };
2207
+ /**
2208
+ * Finds the resources of a project that match a text, across resource types.
2209
+ *
2210
+ * `query` is what the person typed and `types` names the kinds of result to
2211
+ * look for; only those are searched. Each result is a reference: its `type`,
2212
+ * its `id`, a `title` and sometimes a `subtitle`. Read the resource itself
2213
+ * with the type's own operation, for example `GetUserByID`
2214
+ * (`GET /users/{user_id}`) or `getTeam` (`GET /teams/{team_id}`).
2215
+ *
2216
+ * What a type matches on:
2217
+ * - `user`: the start of the value they carry as `identifier` or of a part
2218
+ * of their `display` name, from three characters on
2219
+ * - `team`: its name
2220
+ * - `schema`: the `title` and the `objectType` of a user schema
2221
+ * - `flow_definition`: its name
2222
+ * - `idp`: the `slug` and the `display_name` of an identity provider
2223
+ * connection
2224
+ *
2225
+ * A user matches from the start of the value; every other type matches the
2226
+ * text anywhere in it. Matching ignores case. A `query` that is the `id` of
2227
+ * a resource of a requested type finds that one. A schema and a flow
2228
+ * definition are found at their newest revision. `project_id` names the
2229
+ * project to search; without it, the credential's own project is searched. A
2230
+ * caller with access to part of the project finds only what that access
2231
+ * covers.
2232
+ *
2233
+ * Authenticate with the project secret (`oauth2`) or a console session cookie
2234
+ * (`sessionCookie`). A preview secret is refused, as on every management
2235
+ * operation.
2236
+ *
2237
+ * Results come best match first, at most `limit_per_type` of each type, and
2238
+ * types can be mixed in the order. `incomplete_types` lists the types that
2239
+ * have more to show: page those with the type's own list, such as
2240
+ * `queryUsers` (`POST /users/query`) or `queryTeams` (`POST /teams/query`).
2241
+ *
2242
+ * How text is matched and ranked can change, and later versions can match
2243
+ * more of a resource. Treat the results as suggestions; to filter by an exact
2244
+ * rule, use the type's own list.
2245
+ * @summary Search a project
2246
+ */
2247
+ const search = async (searchBody, params, options) => {
2248
+ const getHeaders = (h) => {
2249
+ if (!h) return {};
2250
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
2251
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
2252
+ const headers = {};
2253
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
2254
+ return headers;
2255
+ };
2256
+ return customFetch(getSearchUrl(params), {
2257
+ ...options,
2258
+ method: "POST",
2259
+ headers: {
2260
+ "Content-Type": "application/json",
2261
+ ...getHeaders(options?.headers)
2262
+ },
2263
+ body: JSON.stringify(searchBody)
2264
+ });
2265
+ };
1955
2266
  const getCreateBrandingUrl = (params) => {
1956
2267
  const normalizedParams = new URLSearchParams();
1957
2268
  Object.entries(params || {}).forEach(([key, value]) => {
@@ -1961,15 +2272,19 @@ const getCreateBrandingUrl = (params) => {
1961
2272
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/branding?${stringifiedParams}` : `${getApiBaseUrl()}/branding`;
1962
2273
  };
1963
2274
  /**
1964
- * Publishes a new immutable branding revision for the project. Branding
1965
- * revisions cannot be updated or deleted; every edit publishes a new
1966
- * revision, and flow responses resolve the latest revision per project.
2275
+ * Publishes a new immutable branding revision for the project, and records a
2276
+ * `branding.created` event. Branding revisions cannot be updated or deleted.
2277
+ * Every edit publishes a new revision. Flow responses carry the branding
2278
+ * revision the request's release pins.
2279
+ *
2280
+ * The `id` of the new revision is the revision ID a release pins for
2281
+ * `kind: branding`.
1967
2282
  *
1968
2283
  * The `liquid_template` is validated lexically on save (size, encoding,
1969
2284
  * banned patterns such as `<script>` tags, inline event handlers, and the
1970
2285
  * `| raw` filter). Authoritative LiquidJS validation runs at authoring
1971
- * time via `zitadel plan` / `zitadel apply`.
1972
- * @summary Publish a new branding revision
2286
+ * time, in `zitadel deploy` and `zitadel deploy --dry-run`.
2287
+ * @summary Publish a branding revision
1973
2288
  */
1974
2289
  const createBranding = async (createBrandingBody, params, options) => {
1975
2290
  const getHeaders = (h) => {
@@ -1999,11 +2314,11 @@ const getListBrandingUrl = (params) => {
1999
2314
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/branding?${stringifiedParams}` : `${getApiBaseUrl()}/branding`;
2000
2315
  };
2001
2316
  /**
2002
- * Lists branding revisions for the project, newest first, capped at the
2003
- * 100 most recent. The first entry is the revision flow responses
2004
- * currently resolve. Deliberately unpaginated in v1 — list endpoints gain a
2005
- * real query mechanism together; advertising pagination parameters the
2006
- * server ignores would be worse than none.
2317
+ * Lists a project's branding revisions, newest first, capped at the 100 most
2318
+ * recent and not paginated. The first entry is the newest revision.
2319
+ *
2320
+ * The `id` of an entry is the revision ID that `getBrandingById` (`GET /branding/{id}`) takes and
2321
+ * that a release pins for `kind: branding`.
2007
2322
  * @summary List branding revisions
2008
2323
  */
2009
2324
  const listBranding = async (params, options) => {
@@ -2016,7 +2331,8 @@ const getGetBrandingByIdUrl = (id) => {
2016
2331
  return `${getApiBaseUrl()}/branding/${encodeURIComponent(String(id))}`;
2017
2332
  };
2018
2333
  /**
2019
- * Retrieves a single branding revision, including its stored configuration.
2334
+ * Returns one branding revision, including its stored configuration. Pass the
2335
+ * `id` that `createBranding` (`POST /branding`) or `listBranding` (`GET /branding`) returns.
2020
2336
  * @summary Get a branding revision by ID
2021
2337
  */
2022
2338
  const getBrandingById = async (id, options) => {
@@ -2034,17 +2350,19 @@ const getCreateIdpUrl = (params) => {
2034
2350
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps?${stringifiedParams}` : `${getApiBaseUrl()}/idps`;
2035
2351
  };
2036
2352
  /**
2037
- * Creates or revises a connection document. If the slug does not already
2038
- * exist, a new connection is created. If a connection with that slug already
2039
- * exists, a revision is created.
2353
+ * Creates or revises an identity provider, an external sign-in such as
2354
+ * Google, from its connection document. If the slug does not already exist,
2355
+ * a new identity provider is created. If one with that slug already exists,
2356
+ * a revision is created.
2040
2357
  *
2041
- * A revision gets a new `revision_id` and does not modify the connection
2042
- * `id`, so identity links that reference the connection keep resolving while
2043
- * releases and auth attempts stay pinned to the revision they captured.
2358
+ * A revision gets a new `revision_id` and does not modify the identity
2359
+ * provider's `id`. Identity links, which tie a user to an account at the
2360
+ * provider, keep resolving. Releases and authentication attempts stay pinned
2361
+ * to the revision they captured.
2044
2362
  *
2045
- * Identity fields are fixed for the life of the connection and a revision
2046
- * that changes one is rejected: `protocol`, `subject_claim`, and `issuer`,
2047
- * the field that names the authority. Their values decide which provider
2363
+ * Identity fields are fixed for the life of the identity provider and a
2364
+ * revision that changes one is rejected: `protocol`, `subject_claim`, and
2365
+ * `issuer`, the field that names the authority. Their values decide which provider
2048
2366
  * account a stored subject belongs to, so changing one would silently
2049
2367
  * repoint existing identities at a different provider.
2050
2368
  *
@@ -2055,18 +2373,18 @@ const getCreateIdpUrl = (params) => {
2055
2373
  * OIDC is the only protocol.
2056
2374
  *
2057
2375
  * The document is validated against the `idp-connection.json` schema before
2058
- * anything is stored. The rules the engine applies when it starts a sign-in
2059
- * then run on the document, so a connection that could never start one is
2060
- * refused here instead with `idp.endpoints_partial`: the OIDC block sets an
2061
- * endpoint without the others. It either sets no endpoint, and discovery
2062
- * fills them, or sets `authorization_endpoint`, `token_endpoint`, `jwks_uri`,
2063
- * and `userinfo_endpoint`. `userinfo_endpoint` may be left out when
2376
+ * anything is stored. The rules the server applies when it starts a sign-in
2377
+ * then run on the document, so a document that could never start one is
2378
+ * refused here with `idp.endpoints_partial`: the OIDC block sets an endpoint
2379
+ * without the others. Set no endpoint, and discovery fills them, or set
2380
+ * `authorization_endpoint`, `token_endpoint`, `jwks_uri`, and
2381
+ * `userinfo_endpoint`. `userinfo_endpoint` may be left out when
2064
2382
  * `id_token_mapping` is on, but setting it alone still counts as setting an
2065
2383
  * endpoint. The details list the missing endpoints.
2066
2384
  *
2067
2385
  * A refused document stores nothing, and on a revise the current revision
2068
2386
  * stays unchanged.
2069
- * @summary Create or revise an identity provider connection
2387
+ * @summary Create or revise an identity provider
2070
2388
  */
2071
2389
  const createIdp = async (createIdpBody, params, options) => {
2072
2390
  const getHeaders = (h) => {
@@ -2096,9 +2414,10 @@ const getQueryIdpsUrl = (params) => {
2096
2414
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps/query?${stringifiedParams}` : `${getApiBaseUrl()}/idps/query`;
2097
2415
  };
2098
2416
  /**
2099
- * Returns the identity provider connections of a project, paginated with a
2100
- * cursor. One row per connection, carrying its newest revision.
2101
- * @summary Query identity provider connections
2417
+ * Returns the identity providers of a project, external sign-ins such as
2418
+ * Google, paginated with a cursor. Each identity provider appears once, with
2419
+ * its newest revision.
2420
+ * @summary Query identity providers
2102
2421
  */
2103
2422
  const queryIdps = async (queryIdpsBody, params, options) => {
2104
2423
  const getHeaders = (h) => {
@@ -2128,11 +2447,12 @@ const getGetIdpByIdUrl = (id, params) => {
2128
2447
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/idps/${encodeURIComponent(String(id))}`;
2129
2448
  };
2130
2449
  /**
2131
- * Reads a connection by its id, at its newest revision.
2132
- * `GET /idps/{id}/revisions` lists every revision of the connection.
2450
+ * Returns an identity provider, an external sign-in such as Google, by ID at
2451
+ * its newest revision. `listIdpRevisions` (`GET /idps/{id}/revisions`) lists
2452
+ * every revision of it.
2133
2453
  *
2134
2454
  * The lookup is scoped to the project in `project_id`.
2135
- * @summary Get an identity provider connection by id
2455
+ * @summary Get an identity provider by ID
2136
2456
  */
2137
2457
  const getIdpById = async (id, params, options) => {
2138
2458
  return customFetch(getGetIdpByIdUrl(id, params), {
@@ -2149,11 +2469,12 @@ const getListIdpRevisionsUrl = (id, params) => {
2149
2469
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps/${encodeURIComponent(String(id))}/revisions?${stringifiedParams}` : `${getApiBaseUrl()}/idps/${encodeURIComponent(String(id))}/revisions`;
2150
2470
  };
2151
2471
  /**
2152
- * Returns every revision of one connection, newest first, paginated with a
2153
- * cursor. The order is fixed, so there is no `sorting`.
2472
+ * Lists every revision of one identity provider, an external sign-in such as
2473
+ * Google, newest first, paginated with a cursor. The order is fixed, so there
2474
+ * is no `sorting`.
2154
2475
  *
2155
2476
  * The lookup is scoped to the project in `project_id`.
2156
- * @summary List the revisions of an identity provider connection
2477
+ * @summary List the revisions of an identity provider
2157
2478
  */
2158
2479
  const listIdpRevisions = async (id, params, options) => {
2159
2480
  return customFetch(getListIdpRevisionsUrl(id, params), {
@@ -2170,11 +2491,12 @@ const getGetIdpRevisionByIdUrl = (revisionId, params) => {
2170
2491
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps/revisions/${encodeURIComponent(String(revisionId))}?${stringifiedParams}` : `${getApiBaseUrl()}/idps/revisions/${encodeURIComponent(String(revisionId))}`;
2171
2492
  };
2172
2493
  /**
2173
- * Reads one revision of a connection by its `revision_id`, the value an auth
2174
- * attempt or a release pins.
2494
+ * Returns one revision of an identity provider, an external sign-in such as
2495
+ * Google, by its `revision_id`, the value an authentication attempt or a
2496
+ * release pins.
2175
2497
  *
2176
2498
  * The lookup is scoped to the project in `project_id`.
2177
- * @summary Get one revision of an identity provider connection
2499
+ * @summary Get a revision of an identity provider
2178
2500
  */
2179
2501
  const getIdpRevisionById = async (revisionId, params, options) => {
2180
2502
  return customFetch(getGetIdpRevisionByIdUrl(revisionId, params), {
@@ -2182,6 +2504,90 @@ const getIdpRevisionById = async (revisionId, params, options) => {
2182
2504
  method: "GET"
2183
2505
  });
2184
2506
  };
2507
+ const getCreateApplicationUrl = (params) => {
2508
+ const normalizedParams = new URLSearchParams();
2509
+ Object.entries(params || {}).forEach(([key, value]) => {
2510
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2511
+ });
2512
+ const stringifiedParams = normalizedParams.toString();
2513
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/applications?${stringifiedParams}` : `${getApiBaseUrl()}/applications`;
2514
+ };
2515
+ /**
2516
+ * Creates or revises a registered application that authenticates its users
2517
+ * via Zitadel. If the slug does not already exist in the project, a new
2518
+ * application is created. If one with that slug already exists, a revision
2519
+ * is created.
2520
+ *
2521
+ * A revision gets a new `revision_id` and does not modify the application's
2522
+ * `id`. Sending an unchanged document also creates a revision. Each client
2523
+ * is matched to the stored one by its slug and keeps its `client_id`: a
2524
+ * revision that changes a client's `client_id` is rejected with
2525
+ * `application.field_immutable`. A revision keeps every client of the
2526
+ * stored document: one that omits a client is also rejected with
2527
+ * `application.field_immutable`, since removing a client is not available
2528
+ * yet. A client with a new slug is a new client. It takes the `client_id`
2529
+ * the document supplies, or the server generates one, and every response
2530
+ * carries it in `definition`. A `client_id` another client of the project
2531
+ * holds, or ever held, is rejected with `application.client_id_taken`.
2532
+ *
2533
+ * Every new client gets a secret, generated by the server and returned once
2534
+ * in `client_secrets`. The server stores only its hash, so no later read
2535
+ * returns it.
2536
+ *
2537
+ * The document is validated against the `application.json` schema before
2538
+ * anything is stored, and then against the rules the authorization server
2539
+ * applies: `refresh_token` comes with `authorization_code`, a client with
2540
+ * `authorization_code` has at least one redirect URI, and each redirect
2541
+ * URI meets the rules `redirect_uris` states. A document that breaks one
2542
+ * is refused with `application.invalid`, whose details identify the
2543
+ * setting.
2544
+ *
2545
+ * If the document is refused, no change is stored and an existing
2546
+ * application keeps its current revision.
2547
+ * @summary Create or revise a registered application
2548
+ */
2549
+ const createApplication = async (createApplicationBody, params, options) => {
2550
+ const getHeaders = (h) => {
2551
+ if (!h) return {};
2552
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
2553
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
2554
+ const headers = {};
2555
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
2556
+ return headers;
2557
+ };
2558
+ return customFetch(getCreateApplicationUrl(params), {
2559
+ ...options,
2560
+ method: "POST",
2561
+ headers: {
2562
+ "Content-Type": "application/json",
2563
+ ...getHeaders(options?.headers)
2564
+ },
2565
+ body: JSON.stringify(createApplicationBody)
2566
+ });
2567
+ };
2568
+ const getGetApplicationByIdUrl = (id, params) => {
2569
+ const normalizedParams = new URLSearchParams();
2570
+ Object.entries(params || {}).forEach(([key, value]) => {
2571
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2572
+ });
2573
+ const stringifiedParams = normalizedParams.toString();
2574
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/applications/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/applications/${encodeURIComponent(String(id))}`;
2575
+ };
2576
+ /**
2577
+ * Returns an application that authenticates its users via Zitadel, by ID
2578
+ * at its newest revision, with each client's `client_id` in `definition`. It
2579
+ * never returns a client secret: `createApplication` (`POST /applications`)
2580
+ * shows one once, when it creates the client.
2581
+ *
2582
+ * The lookup is scoped to the project in `project_id`.
2583
+ * @summary Get an application by ID
2584
+ */
2585
+ const getApplicationById = async (id, params, options) => {
2586
+ return customFetch(getGetApplicationByIdUrl(id, params), {
2587
+ ...options,
2588
+ method: "GET"
2589
+ });
2590
+ };
2185
2591
  const getListPoliciesUrl = (params) => {
2186
2592
  const normalizedParams = new URLSearchParams();
2187
2593
  Object.entries(params || {}).forEach(([key, value]) => {
@@ -2192,9 +2598,12 @@ const getListPoliciesUrl = (params) => {
2192
2598
  };
2193
2599
  /**
2194
2600
  * Lists the project's policies, one per operation, each as its newest
2195
- * revision, ordered by `created_at` (first publish) and then `id`. Filter
2196
- * by `operation` to read the policy of one operation; a project that never
2197
- * published one gets an empty list.
2601
+ * revision.
2602
+ *
2603
+ * A policy holds a project's rules for one operation, such as setting a
2604
+ * password. The list is ordered by `created_at` (first publish) and then
2605
+ * `id`. Filter by `operation` to read the policy of one operation; a project
2606
+ * that never published one gets an empty list.
2198
2607
  *
2199
2608
  * The lookup is scoped to the project in `project_id`.
2200
2609
  * @summary List policies
@@ -2215,22 +2624,31 @@ const getPublishPolicyUrl = (params) => {
2215
2624
  };
2216
2625
  /**
2217
2626
  * Publishes the project's policy for an operation as a new immutable
2218
- * revision, creating the policy on its first publish. The newest revision
2219
- * applies to the next time the operation runs; nothing already stored is
2627
+ * revision, creating the policy on its first publish. A revision applies
2628
+ * once a deployed release pins it. Nothing already stored is
2220
2629
  * re-evaluated, so a stricter password policy applies the next time a
2221
2630
  * password is set.
2222
2631
  *
2223
- * The request is typed by `operation`: an unknown operation or setting, or
2632
+ * A policy holds a project's rules for one operation, such as setting a
2633
+ * password. The first publish records a `policy.created` event and every
2634
+ * later one a `policy.updated` event.
2635
+ *
2636
+ * The request is typed by `operation`. An unknown operation or setting, or
2224
2637
  * a value of the wrong type or outside its bounds, answers `req.invalid`
2225
- * like any malformed request. The operation's template then checks the
2226
- * config again, together with the rules that relate settings to each other
2227
- * (a `min_length` above `max_length`), and answers `pol.invalid`. Its
2228
- * `details.details.violations` lists everything that failed, settings
2229
- * first, then rules: `{"setting": "min_length"}` for one setting, or
2230
- * `{"config_rule": "min_length_not_above_max_length", "settings":
2231
- * ["min_length", "max_length"]}` for a rule across settings, with the
2232
- * settings it reads. A setting left out is off, and `{}` switches every
2233
- * rule off; there are no defaults.
2638
+ * like any malformed request.
2639
+ *
2640
+ * The operation's template then checks the config again, together with the
2641
+ * rules that relate settings to each other (a `min_length` above
2642
+ * `max_length`), and answers `pol.invalid`. Its `details.details.violations`
2643
+ * lists everything that failed, settings first, then rules.
2644
+ * `{"setting": "min_length"}` names one setting. `{"config_rule":
2645
+ * "min_length_not_above_max_length", "settings": ["min_length",
2646
+ * "max_length"]}` names a rule across settings, with the settings it reads.
2647
+ * Fix what the violations list and publish again. To check a config without
2648
+ * publishing it, call `evaluatePolicy` (`POST /policies/evaluate`).
2649
+ *
2650
+ * A setting left out is off, and `{}` switches every rule off; there are no
2651
+ * defaults.
2234
2652
  * @summary Publish a policy
2235
2653
  */
2236
2654
  const publishPolicy = async (publishPolicyBody, params, options) => {
@@ -2262,24 +2680,27 @@ const getEvaluatePolicyUrl = (params) => {
2262
2680
  };
2263
2681
  /**
2264
2682
  * Evaluates a policy config against one request, without side effects, and
2265
- * answers the decision the operation would reach. Nothing is read from or
2266
- * written to the project: the config is the one in the body, checked
2267
- * exactly as a publish checks it, so an invalid config answers `pol.invalid`
2268
- * with the same violations.
2683
+ * answers the decision the operation would reach. A policy holds a
2684
+ * project's rules for one operation, such as setting a password.
2685
+ *
2686
+ * Nothing is read from or written to the project. The config is the one in
2687
+ * the body, checked exactly as a publish checks it, so an invalid config
2688
+ * answers `pol.invalid` with the same violations. Fix the settings the
2689
+ * violations list and send the request again.
2269
2690
  *
2270
2691
  * `input` is what the operation's request carries, in the operation's own
2271
- * terms (a password, not its length): the server derives what the policy
2692
+ * terms (a password, not its length). The server derives what the policy
2272
2693
  * checks with the code the live operation runs, guards included. `facts`
2273
2694
  * states what the operation would look up at runtime, such as whether the
2274
2695
  * candidate matches one of the user's kept passwords.
2275
2696
  *
2276
2697
  * The decision and the names of the failed rules hold wherever the
2277
- * operation runs. `code` and `violations` are what an API call answers; a
2698
+ * operation runs. `code` and `violations` are what an API call answers. A
2278
2699
  * login flow shows the same rules as field errors on the password field
2279
2700
  * (`error.x-auth-methods#password_<rule>` in `step.error`).
2280
2701
  *
2281
- * Which policy a project or release applies is not decided here: read it
2282
- * and pass its config.
2702
+ * This operation does not choose which policy a project or release applies.
2703
+ * Read that policy, for example with `getPolicy` (`GET /policies/{policy_id}`), and pass its `config`.
2283
2704
  *
2284
2705
  * The caller needs read access to the project in `project_id`.
2285
2706
  * @summary Evaluate a policy
@@ -2312,12 +2733,15 @@ const getGetPolicyUrl = (policyId, params) => {
2312
2733
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies/${encodeURIComponent(String(policyId))}?${stringifiedParams}` : `${getApiBaseUrl()}/policies/${encodeURIComponent(String(policyId))}`;
2313
2734
  };
2314
2735
  /**
2315
- * Reads a policy as its newest revision, the one that applies the next time
2316
- * its operation runs.
2736
+ * Returns a policy as its newest revision. A revision applies once a deployed
2737
+ * release pins it.
2738
+ *
2739
+ * A policy holds a project's rules for one operation, such as setting a
2740
+ * password. Pass the `id` that `listPolicies` (`GET /policies`) or `publishPolicy` (`POST /policies`) returns.
2317
2741
  *
2318
2742
  * The lookup is scoped to the project in `project_id`: a policy of another
2319
- * project answers not found exactly as an unknown id does.
2320
- * @summary Get a policy
2743
+ * project answers not found exactly as an unknown ID does.
2744
+ * @summary Get a policy by ID
2321
2745
  */
2322
2746
  const getPolicy = async (policyId, params, options) => {
2323
2747
  return customFetch(getGetPolicyUrl(policyId, params), {
@@ -2334,11 +2758,14 @@ const getListPolicyRevisionsUrl = (policyId, params) => {
2334
2758
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies/${encodeURIComponent(String(policyId))}/revisions?${stringifiedParams}` : `${getApiBaseUrl()}/policies/${encodeURIComponent(String(policyId))}/revisions`;
2335
2759
  };
2336
2760
  /**
2337
- * Returns every revision of one policy, newest first, paginated with a
2338
- * cursor. The order is fixed, so there is no `sorting`.
2761
+ * Lists every revision of one policy, newest first, one page at a time. The
2762
+ * order is fixed, so there is no `sorting`.
2763
+ *
2764
+ * Each publish of a policy adds a revision. Pass the policy `id` that
2765
+ * `listPolicies` (`GET /policies`) or `publishPolicy` (`POST /policies`) returns.
2339
2766
  *
2340
2767
  * The lookup is scoped to the project in `project_id`: a policy of another
2341
- * project answers not found exactly as an unknown id does.
2768
+ * project answers not found exactly as an unknown ID does.
2342
2769
  * @summary List the revisions of a policy
2343
2770
  */
2344
2771
  const listPolicyRevisions = async (policyId, params, options) => {
@@ -2356,11 +2783,14 @@ const getGetPolicyRevisionUrl = (revisionId, params) => {
2356
2783
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies/revisions/${encodeURIComponent(String(revisionId))}?${stringifiedParams}` : `${getApiBaseUrl()}/policies/revisions/${encodeURIComponent(String(revisionId))}`;
2357
2784
  };
2358
2785
  /**
2359
- * Reads one revision of a policy, newest or not.
2786
+ * Returns one revision of a policy, the newest or an older one.
2787
+ *
2788
+ * Pass the `revision_id` that `publishPolicy` (`POST /policies`) or `listPolicyRevisions` (`GET /policies/{policy_id}/revisions`)
2789
+ * returns.
2360
2790
  *
2361
2791
  * The lookup is scoped to the project in `project_id`: a revision of another
2362
- * project answers not found exactly as an unknown id does.
2363
- * @summary Get a policy revision
2792
+ * project answers not found exactly as an unknown ID does.
2793
+ * @summary Get a policy revision by ID
2364
2794
  */
2365
2795
  const getPolicyRevision = async (revisionId, params, options) => {
2366
2796
  return customFetch(getGetPolicyRevisionUrl(revisionId, params), {
@@ -2377,25 +2807,34 @@ const getCreateReleaseUrl = (params) => {
2377
2807
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases?${stringifiedParams}` : `${getApiBaseUrl()}/releases`;
2378
2808
  };
2379
2809
  /**
2380
- * Assembles a release from existing revisions, given as
2381
- * `(kind, revision_id)` pairs. To build one from files on disk, use
2382
- * `POST /releases/build`.
2810
+ * Creates a release from existing revisions, given as `(kind, revision_id)`
2811
+ * pairs. To build one from files on disk, use `buildRelease` (`POST /releases/build`)
2812
+ * (`POST /releases/build`).
2813
+ *
2814
+ * A release is a snapshot of the project's configuration: it pins one
2815
+ * revision of each resource it includes, and it is not tied to an origin.
2816
+ * Take each `revision_id` from the operation that created the revision, for
2817
+ * example the `id` that `createBranding` (`POST /branding`) or `createFlowDefinition` (`POST /flow_definitions`) returns.
2383
2818
  *
2384
2819
  * Each revision must exist in the project and is recorded under the handle
2385
2820
  * it declares. The release must be complete and consistent:
2386
2821
  *
2387
2822
  * - Every handle its revisions name must be in the release: a flow's
2388
- * `user_schema`, and the IDP connections named by a flow step's
2389
- * `sso_providers` or a schema's `x-auth-methods.sso.providers`. A missing
2390
- * one answers `rel.unresolved_reference`, naming the resource and the
2391
- * handle, e.g. `flow_definition default-login: user_schema human-user not found`.
2392
- * - Every flow is validated as on save, against the user schema revision
2393
- * in the release. A flow that fails answers `rel.invalid`, with the
2394
- * reason in `details`.
2395
- *
2396
- * Idempotent on the set of revisions: the same revisions with a different
2397
- * `message` answer `200` with the existing release. A new release answers
2398
- * `201`. Creating a release does not deploy it.
2823
+ * `user_schema`, and the identity provider (IdP) connections named by a
2824
+ * flow step's `sso_providers` or a schema's `x-auth-methods.sso.providers`.
2825
+ * A missing one answers `rel.unresolved_reference`, naming the resource and
2826
+ * the handle, for example `flow_definition default-login: user_schema
2827
+ * human-user not found`. Add the missing revision to the request.
2828
+ * - Every flow is validated as on save, against the user schema revision in
2829
+ * the release. A flow that fails answers `rel.invalid`, with the reason in
2830
+ * `details`. Fix the flow and send the request again.
2831
+ *
2832
+ * The call is idempotent on the set of revisions: the same revisions with a
2833
+ * different `message` answer `200` with the existing release. A new release
2834
+ * answers `201`.
2835
+ *
2836
+ * Creating a release does not deploy it. Pass the returned `id` to
2837
+ * `createDeployment` (`POST /deployments`) to make the release live.
2399
2838
  * @summary Create a release
2400
2839
  */
2401
2840
  const createRelease = async (createReleaseBody, params, options) => {
@@ -2426,17 +2865,20 @@ const getListReleasesUrl = (params) => {
2426
2865
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases?${stringifiedParams}` : `${getApiBaseUrl()}/releases`;
2427
2866
  };
2428
2867
  /**
2429
- * Lists the project's releases, newest first.
2868
+ * Lists the project's releases, newest first. A release is a snapshot of the
2869
+ * project's configuration.
2430
2870
  *
2431
- * Entries carry the digest, the metadata and `revoked_at` — the pinned set
2432
- * is omitted.
2433
- * Read one release with `GET /releases/{release_id}` to get its pointers.
2871
+ * Entries carry the digest, the metadata and `revoked_at`. The pinned set is
2872
+ * omitted: read one release with `getReleaseById` (`GET /releases/{release_id}`) to get its pointers.
2873
+ *
2874
+ * The `id` of an entry is the release ID that `getReleaseById`,
2875
+ * `revokeRelease` (`POST /releases/{release_id}/revoke`) and `createDeployment` (`POST /deployments`) take.
2434
2876
  *
2435
2877
  * `content_hash` looks a release up by its content, as the CLI does when a
2436
2878
  * person types the digest a transcript printed. The project holds at most
2437
- * one release per digest, so the filtered list has one entry or none, and
2438
- * an unknown digest is an empty list rather than an error. Paths take the
2439
- * `rel_` id only; the matched entry's `id` is what to use there.
2879
+ * one release per digest, so the filtered list has one entry or none. An
2880
+ * unknown digest is an empty list rather than an error. Paths take the
2881
+ * `rel_` ID only, so use the matched entry's `id` there.
2440
2882
  * @summary List releases
2441
2883
  */
2442
2884
  const listReleases = async (params, options) => {
@@ -2454,38 +2896,44 @@ const getBuildReleaseUrl = (params) => {
2454
2896
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases/build?${stringifiedParams}` : `${getApiBaseUrl()}/releases/build`;
2455
2897
  };
2456
2898
  /**
2457
- * Builds a release from the resources of `.zitadel/` as authored on disk,
2458
- * grouped by kind, in one transaction: a failure anywhere leaves no
2459
- * revision and no release. The caller records nothing.
2899
+ * Builds a release from the resources in `.zitadel/` as authored on disk,
2900
+ * grouped by kind, in one transaction.
2901
+ *
2902
+ * A release is a snapshot of the project's configuration. A failure anywhere
2903
+ * leaves no revision and no release. The caller records nothing. The CLI's
2904
+ * `deploy` command builds its release with this operation.
2460
2905
  *
2461
2906
  * If the project already holds a release with the same content, the same
2462
- * `content_hash`, the request answers `200` with that release and
2463
- * allocates nothing, however long ago it was built. Otherwise every resource is compared against the
2464
- * project's newest revision of the same handle: unchanged content reuses
2465
- * that revision, changed content allocates a new one, and the request
2466
- * answers `201` with the new release. A policy whose config matches only an
2467
- * older revision allocates a new one too, so a request that resolves no
2468
- * release, which reads the newest revision, applies it as well. Metadata is excluded from the
2907
+ * `content_hash`, the request answers `200` with that release and allocates
2908
+ * nothing, however long ago it was built. Metadata is excluded from the
2469
2909
  * comparison, so the same content under a different `message` is the same
2470
2910
  * release.
2471
2911
  *
2912
+ * Otherwise every resource is compared with the project's newest revision of
2913
+ * the same handle. Unchanged content reuses that revision, and changed
2914
+ * content allocates a new one. The request answers `201` with the new
2915
+ * release. A policy whose config matches only an older revision allocates a
2916
+ * new one too, so the policy reads back as the config the build carried.
2917
+ *
2472
2918
  * A structurally malformed request is refused while decoding with
2473
2919
  * `req.invalid`, naming the offending fields. A well-formed bundle is then
2474
2920
  * checked resource by resource, as each kind's create endpoint checks it,
2475
- * and every failure is reported at once: the request answers `400` with
2921
+ * and every failure is reported at once. The request answers `400` with
2476
2922
  * `rel.invalid`, and `details.resources` lists each resource that failed.
2477
- * A handle that resolves neither in the bundle nor in the project answers
2478
- * `rel.unresolved_reference`, naming the pointer and the handle.
2923
+ * Fix each listed resource and build again. A handle that resolves neither
2924
+ * in the bundle nor in the project answers `rel.unresolved_reference`,
2925
+ * naming the pointer and the handle. Add the missing resource to the bundle.
2479
2926
  *
2480
2927
  * Building writes revisions, so besides `release.write` it needs the write
2481
2928
  * scope of every kind the bundle carries a resource of: `schema.write`,
2482
- * `flow_definition.write`, `branding.write`, `idp.write` and
2483
- * `policy.write`, as the per-kind create endpoints do. A missing scope answers `403` with `rel.permission_denied`,
2484
- * naming the kind. An empty kind needs no scope.
2485
- *
2486
- * Building a release does not deploy it. A release is not tied to an
2487
- * origin, and the same release can later be deployed to any number of
2488
- * origins unchanged.
2929
+ * `flow_definition.write`, `branding.write`, `idp.write` and `policy.write`,
2930
+ * as the per-kind create endpoints do. A missing scope answers `403` with
2931
+ * `rel.permission_denied`, naming the kind. Request a token with that scope.
2932
+ * An empty kind needs no scope.
2933
+ *
2934
+ * Building a release does not deploy it. A release is not tied to an origin,
2935
+ * and the same release can later be deployed to any number of origins
2936
+ * unchanged. Pass the returned `id` to `createDeployment` (`POST /deployments`).
2489
2937
  * @summary Build a release from files
2490
2938
  */
2491
2939
  const buildRelease = async (buildReleaseBody, params, options) => {
@@ -2516,20 +2964,23 @@ const getGetReleaseByIdUrl = (releaseId, params) => {
2516
2964
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases/${encodeURIComponent(String(releaseId))}?${stringifiedParams}` : `${getApiBaseUrl()}/releases/${encodeURIComponent(String(releaseId))}`;
2517
2965
  };
2518
2966
  /**
2519
- * Reads one release: its digest, its metadata, whether it was revoked, and
2520
- * the `(kind, handle, revision_id)` tuples it pins.
2967
+ * Returns one release: its digest, its metadata, whether it was revoked, and
2968
+ * the `(kind, handle, revision_id)` tuples it pins. A release is a snapshot
2969
+ * of the project's configuration.
2521
2970
  *
2522
- * The path takes the `rel_` id only. To find a release from its digest,
2523
- * list with the `content_hash` filter and read the matched entry's `id`.
2971
+ * The path takes the `rel_` ID only: the `id` that `createRelease` (`POST /releases`),
2972
+ * `buildRelease` (`POST /releases/build`) or `listReleases` (`GET /releases`) returns. To find a release from its
2973
+ * digest, list with the `content_hash` filter and read the matched entry's
2974
+ * `id`.
2524
2975
  *
2525
- * Does not embed resource content. Resolve each `revision_id` through the
2526
- * per-kind read endpoints when the bytes are needed.
2976
+ * The response does not embed resource content. Resolve each `revision_id`
2977
+ * through the per-kind read endpoints when the bytes are needed.
2527
2978
  *
2528
- * The lookup is scoped to the project in `project_id`: a release id belonging
2529
- * to another project answers not found exactly as an unknown id does, so the
2530
- * endpoint cannot be used to probe for releases in projects the caller cannot
2531
- * read.
2532
- * @summary Get a release by id
2979
+ * The lookup is scoped to the project in `project_id`. A release ID
2980
+ * belonging to another project answers not found exactly as an unknown ID
2981
+ * does, so the endpoint cannot be used to probe for releases in projects the
2982
+ * caller cannot read.
2983
+ * @summary Get a release by ID
2533
2984
  */
2534
2985
  const getReleaseById = async (releaseId, params, options) => {
2535
2986
  return customFetch(getGetReleaseByIdUrl(releaseId, params), {
@@ -2546,25 +2997,30 @@ const getRevokeReleaseUrl = (releaseId, params) => {
2546
2997
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases/${encodeURIComponent(String(releaseId))}/revoke?${stringifiedParams}` : `${getApiBaseUrl()}/releases/${encodeURIComponent(String(releaseId))}/revoke`;
2547
2998
  };
2548
2999
  /**
2549
- * Marks the release revoked, so that its content is never served again.
2550
- * From then on the release cannot be deployed and is refused on every path
2551
- * that would serve it, including to a build that pins its digest, with
2552
- * `rel.revoked`.
3000
+ * Revokes a release, so that its content is never served again. Pass the
3001
+ * `id` that `createRelease` (`POST /releases`), `buildRelease` (`POST /releases/build`) or `listReleases` (`GET /releases`) returns. It
3002
+ * records a `release.revoked` event.
3003
+ *
3004
+ * From then on the release cannot be deployed. Every path that would serve
3005
+ * it refuses it with `rel.revoked`, including a build that pins its digest.
2553
3006
  *
2554
- * A release that any origin still serves cannot be revoked. An origin
2555
- * serves the release of the newest deployment to it, so the call answers
2556
- * `409` with `rel.in_use`, naming each such origin and that deployment.
2557
- * Deploy another release there or roll back first, then revoke. Revoking
2558
- * therefore never takes an origin down. Deployments that named the release
2559
- * earlier stay in the history.
3007
+ * A release that any origin still serves cannot be revoked. An origin serves
3008
+ * the release of the newest deployment to it, so the call answers `409` with
3009
+ * `rel.in_use`, naming each such origin, that deployment and whether the
3010
+ * origin is primary or a preview. Deploy another release to a primary origin
3011
+ * or roll it back, and remove a preview, then revoke. Revoking therefore
3012
+ * never takes an origin down. Deployments that named the release earlier stay in
3013
+ * the history.
2560
3014
  *
2561
- * Idempotent: revoking a release that is already revoked answers `200`
2562
- * with the release unchanged, `revoked_at` still naming the first
2563
- * revocation. There is no un-revoke; build a new release instead.
3015
+ * The call is idempotent: revoking a release that is already revoked answers
3016
+ * `200` with the release unchanged, and `revoked_at` still names the first
3017
+ * revocation. There is no un-revoke. To serve that configuration again,
3018
+ * change it and build a new release: rebuilding unchanged content returns
3019
+ * the same revoked release.
2564
3020
  *
2565
- * Takes no body. The lookup is scoped to the project in `project_id`, so a
2566
- * release id of another project answers not found exactly as an unknown id
2567
- * does.
3021
+ * The call takes no body. The lookup is scoped to the project in
3022
+ * `project_id`, so a release ID of another project answers not found exactly
3023
+ * as an unknown ID does.
2568
3024
  * @summary Revoke a release
2569
3025
  */
2570
3026
  const revokeRelease = async (releaseId, params, options) => {
@@ -2582,26 +3038,32 @@ const getCreateGrantUrl = (params) => {
2582
3038
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/grants?${stringifiedParams}` : `${getApiBaseUrl()}/grants`;
2583
3039
  };
2584
3040
  /**
2585
- * Bind a user or team to `project.viewer`, `project.editor`, or
2586
- * `project.admin` on the project identified by the `project-id` header.
2587
- * Name the principal with `user` (`user_id` or `identifier`) or `team`
2588
- * (`team_id` or `name`). IDs are `asgn_<opaque>`. Owning-team
2589
- * (`project.team`) grants are not created here — claim owns that path. An
2590
- * unrevoked grant with the same principal and relation occupies the unique
2591
- * key even after `expires_at`; DELETE it before re-creating.
2592
- * Create does not accept `expand`. The `user_id` and team locators
2593
- * return 201, whose `user` / `team` carry only `user_id` / `team_id`,
2594
- * and still 404 / 409 when the principal is missing or the tuple
2595
- * already exists. Creating by `user.identifier` answers 202 with no
2596
- * body on every outcome. Granting the session caller's own user is
2597
- * `grant.invalid` on either user locator. Read the grant back for
2598
- * identifier and display.
2599
- *
2600
- * Accepts either a project secret (`oauth2`) or a user-bound Console
2601
- * session cookie (`sessionCookie`). Session callers are authorized as
2602
- * the human against the target project (home may differ). Cookie-authenticated
2603
- * requests follow the scheme's CSRF rules (`sessionCookie`).
2604
- * @summary Create grant
3041
+ * Creates a grant that gives a user or a team the `project.viewer`, `project.editor` or `project.admin` role on a project.
3042
+ *
3043
+ * The project is the one named by the `project_id` query parameter. Name the
3044
+ * principal with `user` (`user_id` or `identifier`) or `team` (`team_id` or
3045
+ * `name`). The `id` in the response (`asgn_<opaque>`) is the grant ID that
3046
+ * `getGrant` (`GET /grants/{id}`) and `deleteGrant` (`DELETE /grants/{id}`) take. Owning-team (`project.team`) grants are not
3047
+ * created here: a claim, which attaches a project to a team, creates them.
3048
+ *
3049
+ * An unrevoked grant with the same principal and relation holds that binding
3050
+ * even after `expires_at`. Revoke it with `deleteGrant` before you create it
3051
+ * again.
3052
+ *
3053
+ * Create does not accept `expand`. The `user_id` and team locators return `201`,
3054
+ * whose `user` and `team` carry only `user_id` and `team_id`. They still answer
3055
+ * `404` or `409` when the principal is missing or the grant already exists.
3056
+ * Creating by `user.identifier` answers `202` with no body on every outcome.
3057
+ * Granting the session caller's own user is `grant.invalid` on either user
3058
+ * locator. A `201` grant names its user or team by ID only: read it back
3059
+ * with `getGrant` for the identifier and display name. A `202` returns no
3060
+ * grant ID: find the grant with `queryGrants` (`POST /grants/query`), filtered by `user_id`.
3061
+ *
3062
+ * Authenticate with a project secret (`oauth2`) or a console session cookie
3063
+ * (`sessionCookie`). A session caller is authorized as the signed-in person
3064
+ * against the target project, even when the session belongs to another project.
3065
+ * Cookie requests follow that scheme's CSRF rules.
3066
+ * @summary Create a grant
2605
3067
  */
2606
3068
  const createGrant = async (createGrantBody, params, options) => {
2607
3069
  const getHeaders = (h) => {
@@ -2631,22 +3093,20 @@ const getQueryGrantsUrl = (params) => {
2631
3093
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/grants/query?${stringifiedParams}` : `${getApiBaseUrl()}/grants/query`;
2632
3094
  };
2633
3095
  /**
2634
- * Returns the collaboration grants of a project, paginated with a cursor.
2635
- * Only unrevoked grants this API manages are listed (user or team bound to
2636
- * viewer, editor, or admin), including expired grants so a client can
2637
- * DELETE before re-granting. Project-secret setup (`sk_proj`) and
2638
- * owning-team (`relation=team`) rows are not returned. Grants are not in
2639
- * `resource_scope_index`; project scope is required on the query (same as
2640
- * get). Requires `project.read`. `expand: ["principal"]` adds envelope
2641
- * fields on `user` / `team` and additionally requires `user.read` and
2642
- * `team.read` for project secrets (documented on the expand enum; those
2643
- * scopes cannot be ANDed onto this security block because they are
2644
- * body-conditional). A user-bound Console session that already passed
2645
- * the project Check may expand without those scopes.
2646
- *
2647
- * Accepts either a project secret (`oauth2`) or a user-bound Console
2648
- * session cookie (`sessionCookie`). Cookie-authenticated requests
2649
- * follow the scheme's CSRF rules (`sessionCookie`).
3096
+ * Returns a page of a project's grants.
3097
+ *
3098
+ * Only unrevoked grants this API manages are listed, which bind a user or team
3099
+ * to the viewer, editor or admin role. Expired grants are included, so a client
3100
+ * can revoke them with `deleteGrant` (`DELETE /grants/{id}`) before it grants the same binding again.
3101
+ * Project-secret setup (`sk_proj`) and owning-team (`relation=team`) rows are
3102
+ * not returned. Requires `project.read`.
3103
+ *
3104
+ * `expand: ["principal"]` adds envelope fields on `user` and `team`. For project
3105
+ * secrets it additionally requires `user.read` and `team.read`. A user-bound
3106
+ * console session that already passed the project check may expand without those scopes.
3107
+ *
3108
+ * Authenticate with a project secret (`oauth2`) or a console session cookie
3109
+ * (`sessionCookie`). Cookie requests follow that scheme's CSRF rules.
2650
3110
  * @summary Query grants
2651
3111
  */
2652
3112
  const queryGrants = async (queryGrantsBody, params, options) => {
@@ -2683,23 +3143,23 @@ const getGetGrantUrl = (id, params) => {
2683
3143
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/grants/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/grants/${encodeURIComponent(String(id))}`;
2684
3144
  };
2685
3145
  /**
2686
- * Loads a grant by `(project_id, id)` that this API manages (user or team
2687
- * bound to viewer, editor, or admin) and that has not been revoked.
2688
- * "Active" here means not revoked: expired grants stay visible so the
2689
- * client can DELETE before re-granting the same binding. Authorization
2690
- * still ignores expired grants. Grants are not registered in
2691
- * `resource_scope_index`; project scope is required on the query (same as
2692
- * events). Misses, revoked rows, project-secret setup (`sk_proj`),
2693
- * owning-team (`relation=team`) rows, and cross-project ids return 404.
2694
- * `expand=principal` adds envelope fields on `user` or `team` and requires
2695
- * `user.read` and `team.read` in addition to `project.read` for project
2696
- * secrets. A user-bound Console session that already passed the project
2697
- * Check may expand without those scopes.
2698
- *
2699
- * Accepts either a project secret (`oauth2`) or a user-bound Console
2700
- * session cookie (`sessionCookie`). Cookie-authenticated requests
2701
- * follow the scheme's CSRF rules (`sessionCookie`).
2702
- * @summary Get grant
3146
+ * Returns a grant by ID, when this API manages it and it has not been revoked.
3147
+ *
3148
+ * This API manages grants that bind a user or team to the viewer, editor or
3149
+ * admin role. An expired grant is still returned, so you can revoke it with
3150
+ * `deleteGrant` (`DELETE /grants/{id}`) before you grant the same binding again. Authorization still
3151
+ * ignores expired grants. Send `project_id` as well as the grant ID.
3152
+ * Misses, revoked grants, project-secret setup rows (`sk_proj`), owning-team
3153
+ * (`relation=team`) rows and grants of another project all return `404`.
3154
+ *
3155
+ * `expand=principal` adds envelope fields on `user` or `team`. For project
3156
+ * secrets it requires `user.read` and `team.read` in addition to `project.read`.
3157
+ * A user-bound console session that already passed the project check may expand
3158
+ * without those scopes.
3159
+ *
3160
+ * Authenticate with a project secret (`oauth2`) or a console session cookie
3161
+ * (`sessionCookie`). Cookie requests follow that scheme's CSRF rules.
3162
+ * @summary Get a grant by ID
2703
3163
  */
2704
3164
  const getGrant = async (id, params, options) => {
2705
3165
  return customFetch(getGetGrantUrl(id, params), {
@@ -2716,15 +3176,15 @@ const getDeleteGrantUrl = (id, params) => {
2716
3176
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/grants/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/grants/${encodeURIComponent(String(id))}`;
2717
3177
  };
2718
3178
  /**
2719
- * Soft-revokes a grant this API manages and emits `authz.revoked`.
2720
- * Already-revoked, missing, project-secret setup, and owning-team grants
2721
- * return 404. The row is not un-revoked. Expired grants can still be
2722
- * revoked so the unique binding can be reused.
3179
+ * Revokes a grant this API manages and emits `authz.revoked`.
2723
3180
  *
2724
- * Accepts either a project secret (`oauth2`) or a user-bound Console
2725
- * session cookie (`sessionCookie`). Cookie-authenticated requests
2726
- * follow the scheme's CSRF rules (`sessionCookie`).
2727
- * @summary Revoke grant
3181
+ * A revoked grant cannot be restored: create a new one. Already-revoked, missing,
3182
+ * project-secret setup and owning-team grants return `404`. Expired grants can
3183
+ * still be revoked, so the binding can be reused.
3184
+ *
3185
+ * Authenticate with a project secret (`oauth2`) or a console session cookie
3186
+ * (`sessionCookie`). Cookie requests follow that scheme's CSRF rules.
3187
+ * @summary Revoke a grant
2728
3188
  */
2729
3189
  const deleteGrant = async (id, params, options) => {
2730
3190
  return customFetch(getDeleteGrantUrl(id, params), {
@@ -2732,10 +3192,240 @@ const deleteGrant = async (id, params, options) => {
2732
3192
  method: "DELETE"
2733
3193
  });
2734
3194
  };
3195
+ const getCreateInvitationUrl = (params) => {
3196
+ const normalizedParams = new URLSearchParams();
3197
+ Object.entries(params || {}).forEach(([key, value]) => {
3198
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
3199
+ });
3200
+ const stringifiedParams = normalizedParams.toString();
3201
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/invitations?${stringifiedParams}` : `${getApiBaseUrl()}/invitations`;
3202
+ };
3203
+ /**
3204
+ * Creates an invitation for a project, or replaces an existing one, and
3205
+ * returns the invitation and its one-shot link.
3206
+ *
3207
+ * Send `type` and the object named after it. `project_member` takes
3208
+ * `relation` (`viewer`, `editor` or `admin`). `team_member` takes `team_id`
3209
+ * and `role`, and answers `501` `not_implemented` until team invitations
3210
+ * ship. Optional `metadata.name` labels who the link is for. Optional
3211
+ * `replaces_invitation_id` replaces that invitation: the new row keeps the
3212
+ * original's `journey_id`, and a pending original is deleted in the same
3213
+ * transaction.
3214
+ *
3215
+ * The `link` appears only in this response. Share it out of band; whoever
3216
+ * opens it and is signed in can redeem the role. It expires in 72 hours.
3217
+ * Refused for an unclaimed project, on a server without a platform project,
3218
+ * and when the project's pending-invitation cap is reached.
3219
+ *
3220
+ * Authenticate with a project secret (`oauth2`) or a console session cookie
3221
+ * (`sessionCookie`). Creation needs the same project `admin` check as
3222
+ * `createGrant` (`POST /grants`). Cookie requests follow that scheme's CSRF
3223
+ * rules.
3224
+ * @summary Create an invitation
3225
+ */
3226
+ const createInvitation = async (createInvitationBody, params, options) => {
3227
+ const getHeaders = (h) => {
3228
+ if (!h) return {};
3229
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
3230
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
3231
+ const headers = {};
3232
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
3233
+ return headers;
3234
+ };
3235
+ return customFetch(getCreateInvitationUrl(params), {
3236
+ ...options,
3237
+ method: "POST",
3238
+ headers: {
3239
+ "Content-Type": "application/json",
3240
+ ...getHeaders(options?.headers)
3241
+ },
3242
+ body: JSON.stringify(createInvitationBody)
3243
+ });
3244
+ };
3245
+ const getListInvitationsUrl = (params) => {
3246
+ const normalizedParams = new URLSearchParams();
3247
+ Object.entries(params || {}).forEach(([key, value]) => {
3248
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
3249
+ });
3250
+ const stringifiedParams = normalizedParams.toString();
3251
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/invitations?${stringifiedParams}` : `${getApiBaseUrl()}/invitations`;
3252
+ };
3253
+ /**
3254
+ * Lists a project's invitations, newest first, in any status, paginated with
3255
+ * `limit` and `page_token`.
3256
+ *
3257
+ * Optional `status` and `type` filters narrow the page. `expired` is derived
3258
+ * on read from `expires_at`. Authenticate with a project secret (`oauth2`) or
3259
+ * a console session cookie (`sessionCookie`). Listing needs the same project
3260
+ * `admin` check as `createGrant` (`POST /grants`).
3261
+ * @summary List invitations
3262
+ */
3263
+ const listInvitations = async (params, options) => {
3264
+ return customFetch(getListInvitationsUrl(params), {
3265
+ ...options,
3266
+ method: "GET"
3267
+ });
3268
+ };
3269
+ const getLookupInvitationUrl = () => {
3270
+ return `${getApiBaseUrl()}/invitations/lookup`;
3271
+ };
3272
+ /**
3273
+ * Returns a lean view of the invitation for the signed-in accept page:
3274
+ * project, role, inviter and expiry.
3275
+ *
3276
+ * Send the plaintext token from the invitation link fragment. Every unknown
3277
+ * or finished token answers the same opaque `404`. Authenticate with a
3278
+ * platform-project user session cookie (`sessionCookie`). Lookup is a read:
3279
+ * same-origin cookie requests need no `X-Zitadel-CSRF` token (accept and
3280
+ * reject still do). The call is rate-limited.
3281
+ * @summary Look up an invitation by token
3282
+ */
3283
+ const lookupInvitation = async (lookupInvitationBody, options) => {
3284
+ const getHeaders = (h) => {
3285
+ if (!h) return {};
3286
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
3287
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
3288
+ const headers = {};
3289
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
3290
+ return headers;
3291
+ };
3292
+ return customFetch(getLookupInvitationUrl(), {
3293
+ ...options,
3294
+ method: "POST",
3295
+ headers: {
3296
+ "Content-Type": "application/json",
3297
+ ...getHeaders(options?.headers)
3298
+ },
3299
+ body: JSON.stringify(lookupInvitationBody)
3300
+ });
3301
+ };
3302
+ const getAcceptInvitationUrl = () => {
3303
+ return `${getApiBaseUrl()}/invitations/accept`;
3304
+ };
3305
+ /**
3306
+ * Accepts a pending invitation for the signed-in user and returns the updated
3307
+ * invitation.
3308
+ *
3309
+ * Send the plaintext token from the invitation link fragment. Acceptance
3310
+ * grants the invitation's role (a project grant for `project_member`) when
3311
+ * the invitation is pending and unexpired, the project is active and claimed,
3312
+ * and the creator still holds `admin` unless `created_by` is null. The
3313
+ * inviter cannot accept their own invitation. Every unknown or finished token
3314
+ * answers the same opaque `404`.
3315
+ *
3316
+ * Authenticate with a platform-project user session cookie (`sessionCookie`).
3317
+ * Cookie requests follow that scheme's CSRF rules. The call is rate-limited.
3318
+ * @summary Accept an invitation
3319
+ */
3320
+ const acceptInvitation = async (acceptInvitationBody, options) => {
3321
+ const getHeaders = (h) => {
3322
+ if (!h) return {};
3323
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
3324
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
3325
+ const headers = {};
3326
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
3327
+ return headers;
3328
+ };
3329
+ return customFetch(getAcceptInvitationUrl(), {
3330
+ ...options,
3331
+ method: "POST",
3332
+ headers: {
3333
+ "Content-Type": "application/json",
3334
+ ...getHeaders(options?.headers)
3335
+ },
3336
+ body: JSON.stringify(acceptInvitationBody)
3337
+ });
3338
+ };
3339
+ const getRejectInvitationUrl = () => {
3340
+ return `${getApiBaseUrl()}/invitations/reject`;
3341
+ };
3342
+ /**
3343
+ * Declines a pending invitation for the signed-in user and returns the
3344
+ * updated invitation with status `rejected`.
3345
+ *
3346
+ * Send the plaintext token from the invitation link fragment. Metadata is
3347
+ * cleared. Every unknown or finished token answers the same opaque `404`.
3348
+ * Authenticate with a platform-project user session cookie (`sessionCookie`).
3349
+ * Cookie requests follow that scheme's CSRF rules. The call is rate-limited.
3350
+ * @summary Decline an invitation
3351
+ */
3352
+ const rejectInvitation = async (rejectInvitationBody, options) => {
3353
+ const getHeaders = (h) => {
3354
+ if (!h) return {};
3355
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
3356
+ if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
3357
+ const headers = {};
3358
+ for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
3359
+ return headers;
3360
+ };
3361
+ return customFetch(getRejectInvitationUrl(), {
3362
+ ...options,
3363
+ method: "POST",
3364
+ headers: {
3365
+ "Content-Type": "application/json",
3366
+ ...getHeaders(options?.headers)
3367
+ },
3368
+ body: JSON.stringify(rejectInvitationBody)
3369
+ });
3370
+ };
3371
+ const getGetInvitationUrl = (id, params) => {
3372
+ const normalizedParams = new URLSearchParams();
3373
+ Object.entries(params || {}).forEach(([key, value]) => {
3374
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
3375
+ });
3376
+ const stringifiedParams = normalizedParams.toString();
3377
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/invitations/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/invitations/${encodeURIComponent(String(id))}`;
3378
+ };
3379
+ /**
3380
+ * Returns one invitation by ID for the project named by `project_id`.
3381
+ *
3382
+ * The response never includes the redeem token or the create-time `link`.
3383
+ * Authenticate with a project secret (`oauth2`) or a console session cookie
3384
+ * (`sessionCookie`). Reading needs the same project `admin` check as
3385
+ * `createGrant` (`POST /grants`).
3386
+ * @summary Get an invitation
3387
+ */
3388
+ const getInvitation = async (id, params, options) => {
3389
+ return customFetch(getGetInvitationUrl(id, params), {
3390
+ ...options,
3391
+ method: "GET"
3392
+ });
3393
+ };
3394
+ const getCancelInvitationUrl = (id, params) => {
3395
+ const normalizedParams = new URLSearchParams();
3396
+ Object.entries(params || {}).forEach(([key, value]) => {
3397
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
3398
+ });
3399
+ const stringifiedParams = normalizedParams.toString();
3400
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/invitations/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/invitations/${encodeURIComponent(String(id))}`;
3401
+ };
3402
+ /**
3403
+ * Deletes a pending invitation. Its link can no longer be redeemed. Only a
3404
+ * `pending` invitation can be cancelled; a finished invitation answers the
3405
+ * same opaque `404` as a miss. Expired invitations keep their row until a
3406
+ * later cleanup job removes them.
3407
+ *
3408
+ * Authenticate with a project secret (`oauth2`) or a console session cookie
3409
+ * (`sessionCookie`). Cancelling needs the same project `admin` check as
3410
+ * `createGrant` (`POST /grants`). Cookie requests follow that scheme's CSRF
3411
+ * rules.
3412
+ * @summary Cancel an invitation
3413
+ */
3414
+ const cancelInvitation = async (id, params, options) => {
3415
+ return customFetch(getCancelInvitationUrl(id, params), {
3416
+ ...options,
3417
+ method: "DELETE"
3418
+ });
3419
+ };
2735
3420
  const getListEventsUrl = (params) => {
2736
3421
  const normalizedParams = new URLSearchParams();
2737
3422
  Object.entries(params || {}).forEach(([key, value]) => {
2738
- if (Array.isArray(value) && ["category", "event_type"].includes(key)) {
3423
+ if (Array.isArray(value) && [
3424
+ "category",
3425
+ "event_type",
3426
+ "operation_id",
3427
+ "status_class"
3428
+ ].includes(key)) {
2739
3429
  value.forEach((v) => {
2740
3430
  normalizedParams.append(key, v === null ? "null" : String(v));
2741
3431
  });
@@ -2747,17 +3437,28 @@ const getListEventsUrl = (params) => {
2747
3437
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/events?${stringifiedParams}` : `${getApiBaseUrl()}/events`;
2748
3438
  };
2749
3439
  /**
2750
- * Returns project-scoped audit events, newest-first by keyset on
2751
- * `(created_at, id)` (ADR 027 / ADR 049). Pass `order=asc` for oldest-first.
2752
- * Requires `events.read`.
3440
+ * Lists a project's audit events, newest first. Pass `order=asc` for oldest
3441
+ * first. Requires `events.read`.
3442
+ *
3443
+ * A project that is not claimed yet returns an empty list: its events are
3444
+ * stored but stay invisible until the
3445
+ * [claim](https://preview.zitadel.com/docs/concepts/project-team-user#claim) succeeds. The deployment's
3446
+ * platform operators read them from the start.
3447
+ *
3448
+ * Team-scoped credentials see only the events whose `team_id` matches the
3449
+ * credential's team. Team-scoped credentials are not issued today.
2753
3450
  *
2754
- * Pre-claim projects return an empty list (events are stored but not
2755
- * visible until claim succeeds). Team-scoped credentials see only events
2756
- * whose emit-time `team_id` matches the credential team (enforced when
2757
- * team-scoped tokens exist).
3451
+ * Each item carries an `event_type` that says which type of event it is, and
3452
+ * the matching `payload`. To read one event, pass its `id` to `getEvent` (`GET /events/{id}`).
2758
3453
  *
2759
- * Clients discriminate each item via `event_type` (OpenAPI Event oneOf) —
2760
- * see docs/design/api/events-catalog.md.
3454
+ * Filters combine. These are answered from an index and fill their pages: no
3455
+ * filter, `category`, `event_type`, `status_class`, `operation_id` with or
3456
+ * without `status_class`, `request_id`, `flow_id`, and `session_id`,
3457
+ * `entity_id`, `actor_id` or `entity_type` with or without `category`, each
3458
+ * with or without the time bounds. Any other filter or combination is
3459
+ * matched event by event, over at most a few thousand events per request.
3460
+ * Such a page can hold fewer events than `limit`, or none, and still carry
3461
+ * `next_page_token`: keep passing the token until a response has none.
2761
3462
  * @summary List events
2762
3463
  */
2763
3464
  const listEvents = async (params, options) => {
@@ -2775,12 +3476,17 @@ const getGetEventUrl = (id, params) => {
2775
3476
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/events/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/events/${encodeURIComponent(String(id))}`;
2776
3477
  };
2777
3478
  /**
2778
- * Loads a single event by `(project_id, id)`. Requires `events.read`.
2779
- * Events are not registered in `resource_scope_index`; project scope is
2780
- * required on the query (ADR 049). Misses and cross-project ids return 404.
3479
+ * Returns one event of a project by its ID. Requires `events.read`.
2781
3480
  *
2782
- * Pre-claim projects return 404 (stored events stay invisible until claim).
2783
- * @summary Get event by ID
3481
+ * Pass the `id` of an event that `listEvents` (`GET /events`) returns, with its
3482
+ * `project_id`. An unknown ID and the ID of another project's event both
3483
+ * answer `404`.
3484
+ *
3485
+ * A project that is not claimed yet also answers `404`: its events are
3486
+ * stored but stay invisible until the
3487
+ * [claim](https://preview.zitadel.com/docs/concepts/project-team-user#claim) succeeds. The deployment's
3488
+ * platform operators read them from the start.
3489
+ * @summary Get an event by ID
2784
3490
  */
2785
3491
  const getEvent = async (id, params, options) => {
2786
3492
  return customFetch(getGetEventUrl(id, params), {
@@ -2797,12 +3503,13 @@ const getGetVariablesUrl = (params) => {
2797
3503
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/variables?${stringifiedParams}` : `${getApiBaseUrl()}/variables`;
2798
3504
  };
2799
3505
  /**
2800
- * Returns the project's variables, keyed by name, each with its value per
2801
- * kind. With `kind`, only that kind's values are returned.
3506
+ * Returns the project's variables, keyed by name, each with its value for
3507
+ * each kind: `primary` for primary origins and `preview` for preview URLs.
3508
+ * With `kind`, only that kind's values are returned.
2802
3509
  *
2803
3510
  * Secret values are not returned. A secret appears as `{"secret": true}`,
2804
3511
  * which says a value is held without disclosing it.
2805
- * @summary Get variables
3512
+ * @summary Get a project's variables
2806
3513
  */
2807
3514
  const getVariables = async (params, options) => {
2808
3515
  return customFetch(getGetVariablesUrl(params), {
@@ -2819,25 +3526,29 @@ const getUpdateVariablesUrl = (params) => {
2819
3526
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/variables?${stringifiedParams}` : `${getApiBaseUrl()}/variables`;
2820
3527
  };
2821
3528
  /**
2822
- * Enters, replaces and removes the project's variables for the requested
2823
- * kind. Names not in the body are untouched. Existing deployments keep the
2824
- * values they froze.
2825
- *
2826
- * Without `kind`, a plain value is written for both kinds. A secret is
2827
- * written for `primary` only and removes the name's `preview` value, so a
2828
- * preview never keeps a plaintext copy; set a preview secret with
2829
- * `kind=preview`. `null` removes the name from both.
3529
+ * Sets, replaces and removes the project's variables for the requested
3530
+ * kind, in one request. Names not in the body are untouched. Existing
3531
+ * deployments keep the values they froze.
2830
3532
  *
2831
3533
  * A bare scalar enters a non-secret value. `{"value": …, "secret": true}`
2832
3534
  * stores the value encrypted under the project's active `secret` key, after
2833
3535
  * which it can be referenced but not read back. `null` removes the name
2834
- * (RFC 7386), which is how several variables are removed in one request;
2835
- * removing a name the project does not hold is a no-op rather than an error.
3536
+ * (RFC 7386), which is how several variables are removed in one request.
3537
+ * Removing a name the project does not hold is a no-op rather than an error.
3538
+ *
3539
+ * Without `kind`, a plain value is written for both kinds. A secret is
3540
+ * written for `primary` only and removes the name's `preview` value, so a
3541
+ * preview never keeps a plaintext copy. Set a preview secret with
3542
+ * `kind=preview`. `null` removes the name from both kinds.
2836
3543
  *
2837
3544
  * The body is applied whole or not at all, so a rejected request leaves the
2838
- * project's variables exactly as they were. Writing the same name twice
2839
- * replaces the value rather than duplicating it, which makes a retry safe.
2840
- * @summary Update variables
3545
+ * project's variables exactly as they were. Fix what the error reports and
3546
+ * send the request again. Writing the same name twice replaces the value
3547
+ * rather than duplicating it, which makes a retry safe.
3548
+ *
3549
+ * Each kind written records a `variable.set` event, and each kind removed a
3550
+ * `variable.removed` event. The value never appears in either.
3551
+ * @summary Update a project's variables
2841
3552
  */
2842
3553
  const updateVariables = async (updateVariablesBody, params, options) => {
2843
3554
  const getHeaders = (h) => {
@@ -2867,10 +3578,14 @@ const getGetVariableUrl = (variableName, params) => {
2867
3578
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/variables/${encodeURIComponent(String(variableName))}?${stringifiedParams}` : `${getApiBaseUrl()}/variables/${encodeURIComponent(String(variableName))}`;
2868
3579
  };
2869
3580
  /**
2870
- * Reads one variable by name, with its value per kind. A name with no
2871
- * value for the requested kind answers `var.not_found`. A secret reads
2872
- * back as `{"secret": true}`.
2873
- * @summary Get a variable
3581
+ * Returns one variable by name, with its value for each kind. A variable
3582
+ * holds a value per kind: `primary` for primary origins and `preview` for
3583
+ * preview URLs.
3584
+ *
3585
+ * Pass the name of a variable the project holds, as `getVariables` (`GET /variables`) lists
3586
+ * it. A name with no value for the requested kind answers `var.not_found`;
3587
+ * set it with `updateVariables` (`PATCH /variables`). A secret reads back as `{"secret": true}`.
3588
+ * @summary Get a variable by name
2874
3589
  */
2875
3590
  const getVariable = async (variableName, params, options) => {
2876
3591
  return customFetch(getGetVariableUrl(variableName, params), {
@@ -2887,10 +3602,15 @@ const getDeleteVariableUrl = (variableName, params) => {
2887
3602
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/variables/${encodeURIComponent(String(variableName))}?${stringifiedParams}` : `${getApiBaseUrl()}/variables/${encodeURIComponent(String(variableName))}`;
2888
3603
  };
2889
3604
  /**
2890
- * Removes a variable for the requested kind, or for both kinds without
2891
- * `kind`. A name with no value for that kind answers `var.not_found`.
2892
- * Existing deployments keep the values they froze.
2893
- * @summary Delete a variable
3605
+ * Deletes a variable for the requested kind, or for both kinds without
3606
+ * `kind`. Existing deployments keep the values they froze. Each kind removed
3607
+ * records a `variable.removed` event.
3608
+ *
3609
+ * A name with no value for that kind answers `var.not_found`: there is
3610
+ * nothing to delete. `getVariables` (`GET /variables`) lists the names the project holds. To
3611
+ * remove several names in one request, or to remove a name that may already
3612
+ * be absent, send `null` for each name to `updateVariables` (`PATCH /variables`).
3613
+ * @summary Delete a variable by name
2894
3614
  */
2895
3615
  const deleteVariable = async (variableName, params, options) => {
2896
3616
  return customFetch(getDeleteVariableUrl(variableName, params), {
@@ -2907,34 +3627,58 @@ const getCreateDeploymentUrl = (params) => {
2907
3627
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments?${stringifiedParams}` : `${getApiBaseUrl()}/deployments`;
2908
3628
  };
2909
3629
  /**
2910
- * Makes a release live on its targets by recording a deployment,
2911
- * atomically: on success every target serves the release and the record
2912
- * exists; on failure nothing changes and no record is written.
3630
+ * Creates a deployment: it makes a release live on the project's primary
3631
+ * origins or on preview URLs.
3632
+ *
3633
+ * A release is a snapshot of the project's configuration. A deployment makes
3634
+ * a release live on origins and freezes the project's variable values for
3635
+ * its kind, with no fallback between primary and preview values. The call is
3636
+ * atomic: on success every target serves the release and the deployment is
3637
+ * recorded, and it records a `deployment.created` event. On failure nothing
3638
+ * changes and nothing is recorded.
3639
+ *
3640
+ * Name the release by exactly one of `release_id` or `content_hash`. Take the
3641
+ * release ID from the `id` that `createRelease` (`POST /releases`), `buildRelease` (`POST /releases/build`) or
3642
+ * `listReleases` (`GET /releases`) returns. The release must already exist in the project.
3643
+ * `targets` is `primary`, which means every primary origin, or a list of
3644
+ * preview URLs. `["primary"]`, which clients released before this shape
3645
+ * send, still deploys to every primary origin until 1.0.0; its answer
3646
+ * carries a `Deprecation` header (RFC 9745) and a `Link` to these docs.
2913
3647
  *
2914
- * Name the release by exactly one of `release_id` or `content_hash`; it
2915
- * must already exist in the project. `targets` is `primary` or preview
2916
- * URLs. The deployment freezes the project's variable values for its kind,
2917
- * with no fallback between primary and preview values.
3648
+ * The project's newest primary deployment also serves every request with no
3649
+ * `Origin`, such as a backend, a native app or the CLI, and the console's
3650
+ * login preview of a project that does not list the console's origin. A
3651
+ * preview URL serves only itself.
3652
+ *
3653
+ * `primary` records the project's current primary origins. One added later
3654
+ * serves nothing until the next deployment to `primary`; one removed stops
3655
+ * being served at once.
2918
3656
  *
2919
3657
  * A deployment to `primary` changes nothing when the project's newest
2920
3658
  * primary deployment has the same release and frozen values and covers
2921
- * exactly the current primary origins: the call answers `200` with that
2922
- * deployment. Any other request writes a new deployment and answers `201`;
2923
- * for preview URLs that record renews their previews.
2924
- *
2925
- * Failures:
2926
- * - `400 dep.invalid`: both or neither of `release_id` and `content_hash`;
2927
- * a primary origin named exactly; `primary` mixed with preview URLs;
2928
- * `primary` on a project with no primary origin; `ttl` with `primary`;
2929
- * `ttl` above 365 days (`P365D`).
2930
- * - `400 dep.variables_missing`: a referenced variable has no value for
2931
- * the kind; `details` names the kind and every missing variable.
2932
- * - `403 proj.origin_not_allowed`: a preview URL matches no preview
2933
- * pattern, or is a loopback URL.
2934
- * - `404 rel.not_found`: the release id or digest names no release here.
2935
- * - `409 dep.conflict`: `expected_deployment_id` is not the deployment
2936
- * this write replaces; `details.deployment` is that deployment.
2937
- * - `409 rel.revoked`: the release is revoked.
3659
+ * exactly the current primary origins. The call then answers `200` with that
3660
+ * deployment. Any other request writes a new deployment and answers `201`.
3661
+ * For preview URLs, that deployment renews their previews.
3662
+ *
3663
+ * If the request is refused, fix the cause and send it again:
3664
+ * - `400 dep.invalid`: the request names both or neither of `release_id` and
3665
+ * `content_hash`, names a primary origin among the preview URLs, sends
3666
+ * `primary` for a project with no primary origin, sends
3667
+ * `ttl` with `primary`, or sends a `ttl` above 365 days (`P365D`). Correct
3668
+ * the request.
3669
+ * - `400 dep.variables_missing`: a variable the release references has no
3670
+ * value for the kind. `details` names the kind and every missing variable.
3671
+ * Set each one for that kind with `updateVariables` (`PATCH /variables`), then deploy again.
3672
+ * - `403 proj.origin_not_allowed`: a preview URL matches no preview pattern
3673
+ * of the project, or is a loopback URL. Use a URL that matches a pattern.
3674
+ * - `404 rel.not_found`: the release ID or digest names no release in this
3675
+ * project. List the project's releases with `listReleases`.
3676
+ * - `409 dep.conflict`: `expected_deployment_id` is not the deployment this
3677
+ * write replaces, and `details.deployment` is that deployment. Inspect it,
3678
+ * then retry with its ID as `expected_deployment_id`, or stop.
3679
+ * - `409 rel.revoked`: the release is revoked and cannot be deployed. Change
3680
+ * the configuration and build a new release, or deploy a release that is
3681
+ * not revoked. Rebuilding unchanged content returns the same revoked release.
2938
3682
  * @summary Create a deployment
2939
3683
  */
2940
3684
  const createDeployment = async (createDeploymentBody, params, options) => {
@@ -2971,19 +3715,26 @@ const getListDeploymentsUrl = (params) => {
2971
3715
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments?${stringifiedParams}` : `${getApiBaseUrl()}/deployments`;
2972
3716
  };
2973
3717
  /**
2974
- * Lists what ran where, and when.
3718
+ * Lists the project's deployments: the history of what ran where and when,
3719
+ * or with `live=true` what is served now.
3720
+ *
3721
+ * A deployment makes a release live on origins. By default the list is the
3722
+ * history, newest first: every deployment of the project, with every target
3723
+ * it made the release live on. With `origin`, it is the history of that
3724
+ * origin alone.
2975
3725
  *
2976
- * By default the list is the history, newest first: every deployment of
2977
- * the project with every target it made the release live on. With
2978
- * `origin`, the history of that origin alone.
3726
+ * With `live=true`, the list is what is served now, newest first. It holds
3727
+ * the project's newest primary deployment with every origin it names, an
3728
+ * origin the project no longer lists included: that deployment also serves
3729
+ * requests with no `Origin`, so it stays live. It also holds the newest
3730
+ * deployment to each live preview URL, narrowed to the URLs it still
3731
+ * serves. Combined with `origin`, it is the one deployment that origin
3732
+ * serves, or empty, as it is for an origin the project no longer lists.
2979
3733
  *
2980
- * With `live=true`, the list is what is served now, newest first: the
2981
- * project's newest primary deployment, narrowed to origins that are still
2982
- * primary, and the newest deployment to each live preview URL, narrowed to
2983
- * the URLs it still serves. Combined with `origin`, it is the one
2984
- * deployment that origin serves, or empty.
3734
+ * The `id` of an entry is the deployment ID that `getDeploymentById` (`GET /deployments/{deployment_id}`),
3735
+ * `getDeploymentVariables` (`GET /deployments/{deployment_id}/variables`) and `rollbackDeployment` (`POST /deployments/{deployment_id}/rollback`) take.
2985
3736
  *
2986
- * `expand: ["release"]` embeds the release each deployment made live; it
3737
+ * `expand: ["release"]` embeds the release each deployment made live. It
2987
3738
  * requires `release.read` and does not change the ordering or the page
2988
3739
  * tokens.
2989
3740
  * @summary List deployments
@@ -3003,13 +3754,17 @@ const getGetDeploymentByIdUrl = (deploymentId, params) => {
3003
3754
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}?${stringifiedParams}` : `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}`;
3004
3755
  };
3005
3756
  /**
3006
- * Reads one deployment record.
3757
+ * Returns one deployment: the release it made live, the origins it made it
3758
+ * live on, and whether they still serve it.
3759
+ *
3760
+ * Pass the `id` that `createDeployment` (`POST /deployments`), `rollbackDeployment` (`POST /deployments/{deployment_id}/rollback`) or
3761
+ * `listDeployments` (`GET /deployments`) returns.
3007
3762
  *
3008
- * The lookup is scoped to the project in `project_id`: a deployment id
3009
- * belonging to another project answers not found exactly as an unknown id
3763
+ * The lookup is scoped to the project in `project_id`. A deployment ID
3764
+ * belonging to another project answers not found exactly as an unknown ID
3010
3765
  * does, so the endpoint cannot be used to probe for deployments in projects
3011
3766
  * the caller cannot read.
3012
- * @summary Get a deployment by id
3767
+ * @summary Get a deployment by ID
3013
3768
  */
3014
3769
  const getDeploymentById = async (deploymentId, params, options) => {
3015
3770
  return customFetch(getGetDeploymentByIdUrl(deploymentId, params), {
@@ -3026,20 +3781,44 @@ const getRollbackDeploymentUrl = (deploymentId, params) => {
3026
3781
  return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}/rollback?${stringifiedParams}` : `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}/rollback`;
3027
3782
  };
3028
3783
  /**
3029
- * Re-deploys the release of the deployment named in the path to `primary`,
3030
- * with the variable values it froze: a new deployment with `reason:
3031
- * rollback` and `rollback_to` naming it. Like any deployment to `primary`,
3032
- * it covers every current primary origin. Idempotent like a deployment to
3033
- * `primary`: when nothing would change it answers `200` with the newest
3034
- * primary deployment.
3784
+ * Rolls back to an earlier deployment by deploying its release again to the
3785
+ * same origins, with the same variable values. A listed primary origin that
3786
+ * deployment left out serves nothing until the next deployment to `primary`,
3787
+ * and one it named serves its release again, even when the live deployment
3788
+ * left it out.
3789
+ *
3790
+ * A release is a snapshot of the project's configuration. A deployment makes
3791
+ * a release live on origins and freezes the project's variable values with
3792
+ * it.
3793
+ *
3794
+ * The deployment ID in the path is the deployment to return to, not the one
3795
+ * to undo. Take it from the `id` that `listDeployments` (`GET /deployments`) returns, which lists
3796
+ * the newest deployment first.
3035
3797
  *
3036
- * Failures:
3037
- * - `400 dep.invalid`: the deployment went to preview URLs (deploy to the
3038
- * preview again instead), or the project has no primary origin.
3039
- * - `404 dep.not_found`: no deployment of the project has that id.
3798
+ * A rollback is a new deployment, not an undo. It has `reason: rollback`,
3799
+ * and its `rollback_to` names the deployment you returned to. It uses the
3800
+ * variable values that deployment froze, not the project's current ones, and
3801
+ * creates no release.
3802
+ *
3803
+ * To guard against a deployment that landed since you looked, set
3804
+ * `expected_deployment_id` in the request body to the newest primary
3805
+ * deployment, the one live now. The call then fails with `409 dep.conflict`
3806
+ * if another deployment has replaced it.
3807
+ *
3808
+ * A rollback is idempotent like a deployment to `primary`. When nothing
3809
+ * would change, it answers `200` with the newest primary deployment.
3810
+ *
3811
+ * If the request is refused:
3812
+ * - `400 dep.invalid`: the deployment went to preview URLs, which cannot be
3813
+ * rolled back. Deploy to the preview again with `createDeployment` (`POST /deployments`).
3814
+ * - `404 dep.not_found`: no deployment of the project has that ID, or that
3815
+ * deployment recorded no variables to restore, so it cannot be a rollback
3816
+ * target. List them with `listDeployments` and pick another.
3040
3817
  * - `409 dep.conflict`: `expected_deployment_id` is not the project's
3041
- * newest primary deployment; `details.deployment` is that deployment.
3042
- * - `409 rel.revoked`: the release is revoked.
3818
+ * newest primary deployment, and `details.deployment` is that deployment.
3819
+ * Inspect it, then retry with its ID, or stop.
3820
+ * - `409 rel.revoked`: the release of that deployment is revoked and cannot
3821
+ * be deployed. Roll back to a deployment of a release that is not revoked.
3043
3822
  * @summary Roll back to a deployment
3044
3823
  */
3045
3824
  const rollbackDeployment = async (deploymentId, params, rollbackDeploymentBody, options) => {
@@ -3073,6 +3852,8 @@ const getGetDeploymentVariablesUrl = (deploymentId, params) => {
3073
3852
  * Returns the variable values the deployment froze when it was made. Later
3074
3853
  * changes to the project's variables do not affect them. A secret reads
3075
3854
  * back as `{"secret": true}`.
3855
+ *
3856
+ * Pass the `id` that `createDeployment` (`POST /deployments`) or `listDeployments` (`GET /deployments`) returns.
3076
3857
  * @summary Get a deployment's variables
3077
3858
  */
3078
3859
  const getDeploymentVariables = async (deploymentId, params, options) => {
@@ -3082,6 +3863,6 @@ const getDeploymentVariables = async (deploymentId, params, options) => {
3082
3863
  });
3083
3864
  };
3084
3865
  //#endregion
3085
- export { addOrigin, beginUserPasskeyRegistration, buildRelease, completeClaim, createAuthAttempt, createBranding, createDeployment, createFlow, createFlowDefinition, createGrant, createHandoff, createIdp, createProject, createRelease, createSchema, createSession, createTeam, createUser, deleteGrant, deleteTeam, deleteUserByID, deleteVariable, evaluatePolicy, exchangeHandoff, finishUserPasskeyRegistration, getAddOriginUrl, getAuthAttempt, getBeginUserPasskeyRegistrationUrl, getBrandingById, getBuildReleaseUrl, getClaimStatus, getClaimWindow, getCompleteClaimUrl, getCreateAuthAttemptUrl, getCreateBrandingUrl, getCreateDeploymentUrl, getCreateFlowDefinitionUrl, getCreateFlowUrl, getCreateGrantUrl, getCreateHandoffUrl, getCreateIdpUrl, getCreateProjectUrl, getCreateReleaseUrl, getCreateSchemaUrl, getCreateSessionUrl, getCreateTeamUrl, getCreateUserUrl, getDeleteGrantUrl, getDeleteTeamUrl, getDeleteUserByIDUrl, getDeleteVariableUrl, getDeploymentById, getDeploymentVariables, getEvaluatePolicyUrl, getEvent, getExchangeHandoffUrl, getFinishUserPasskeyRegistrationUrl, getFlowDefinition, getFlowStep, getGetAuthAttemptUrl, getGetBrandingByIdUrl, getGetClaimStatusUrl, getGetClaimWindowUrl, getGetDeploymentByIdUrl, getGetDeploymentVariablesUrl, getGetEventUrl, getGetFlowDefinitionUrl, getGetFlowStepUrl, getGetGrantUrl, getGetIdpByIdUrl, getGetIdpRevisionByIdUrl, getGetLiveUrl, getGetMyPasswordStateUrl, getGetMySessionCsrfTokenUrl, getGetMySessionUrl, getGetMyUserSchemaUrl, getGetMyUserUrl, getGetPolicyRevisionUrl, getGetPolicyUrl, getGetProjectUrl, getGetReadyUrl, getGetReleaseByIdUrl, getGetSchemaByIdUrl, getGetSessionUrl, getGetTeamUrl, getGetUserByIDUrl, getGetUserPasswordStateUrl, getGetVariableUrl, getGetVariablesUrl, getGrant, getIdpById, getIdpRevisionById, getInitClaimUrl, getIssueChallengeUrl, getListBrandingUrl, getListDeploymentsUrl, getListEventsUrl, getListFlowDefinitionsUrl, getListIdpRevisionsUrl, getListMyIdentityLinksUrl, getListMyPasskeysUrl, getListMyProjectsUrl, getListMyTeamsUrl, getListPoliciesUrl, getListPolicyRevisionsUrl, getListPreviewsUrl, getListProjectAdminsUrl, getListReleasesUrl, getListSchemasUrl, getListUserIdentityLinksUrl, getListUserPasskeysUrl, getListUserTeamsUrl, getLive, getMyPasswordState, getMySession, getMySessionCsrfToken, getMyUser, getMyUserSchema, getPatchMyUserUrl, getPatchProjectUrl, getPatchUserByIDUrl, getPolicy, getPolicyRevision, getProject, getPublishPolicyUrl, getQueryGrantsUrl, getQueryIdpsUrl, getQueryProjectsUrl, getQuerySessionsUrl, getQueryTeamsUrl, getQueryUsersUrl, getReady, getReleaseById, getRemoveOriginUrl, getRemovePreviewUrl, getRevokeMySessionUrl, getRevokeReleaseUrl, getRevokeSessionUrl, getRollbackDeploymentUrl, getSchemaById, getSession, getSetUserPasswordUrl, getSubmitFlowStepUrl, getTeam, getUpdateTeamUrl, getUpdateVariablesUrl, getUserByID, getUserPasswordState, getVariable, getVariables, getVerifyChallengeProofUrl, initClaim, issueChallenge, listBranding, listDeployments, listEvents, listFlowDefinitions, listIdpRevisions, listMyIdentityLinks, listMyPasskeys, listMyProjects, listMyTeams, listPolicies, listPolicyRevisions, listPreviews, listProjectAdmins, listReleases, listSchemas, listUserIdentityLinks, listUserPasskeys, listUserTeams, patchMyUser, patchProject, patchUserByID, publishPolicy, queryGrants, queryIdps, queryProjects, querySessions, queryTeams, queryUsers, removeOrigin, removePreview, revokeMySession, revokeRelease, revokeSession, rollbackDeployment, setUserPassword, submitFlowStep, zitadelNextGen_exports as t, updateTeam, updateVariables, verifyChallengeProof };
3866
+ export { acceptInvitation, addOrigin, beginUserPasskeyRegistration, buildRelease, cancelInvitation, completeClaim, createApplication, createAuthAttempt, createBranding, createDeployment, createFlow, createFlowDefinition, createGrant, createHandoff, createIdp, createInvitation, createProject, createRelease, createSchema, createSession, createTeam, createUser, deleteGrant, deleteTeam, deleteUserByID, deleteVariable, evaluatePolicy, exchangeHandoff, finishUserPasskeyRegistration, getAcceptInvitationUrl, getAddOriginUrl, getApplicationById, getAuthAttempt, getBeginUserPasskeyRegistrationUrl, getBrandingById, getBuildReleaseUrl, getCancelInvitationUrl, getClaimStatus, getClaimWindow, getCompleteClaimUrl, getCreateApplicationUrl, getCreateAuthAttemptUrl, getCreateBrandingUrl, getCreateDeploymentUrl, getCreateFlowDefinitionUrl, getCreateFlowUrl, getCreateGrantUrl, getCreateHandoffUrl, getCreateIdpUrl, getCreateInvitationUrl, getCreateProjectUrl, getCreateReleaseUrl, getCreateSchemaUrl, getCreateSessionUrl, getCreateTeamUrl, getCreateUserUrl, getDeleteGrantUrl, getDeleteTeamUrl, getDeleteUserByIDUrl, getDeleteVariableUrl, getDeploymentById, getDeploymentVariables, getEvaluatePolicyUrl, getEvent, getExchangeHandoffUrl, getFinishUserPasskeyRegistrationUrl, getFlowDefinition, getFlowStep, getGetApplicationByIdUrl, getGetAuthAttemptUrl, getGetBrandingByIdUrl, getGetClaimStatusUrl, getGetClaimWindowUrl, getGetDeploymentByIdUrl, getGetDeploymentVariablesUrl, getGetEventUrl, getGetFlowDefinitionUrl, getGetFlowStepUrl, getGetGrantUrl, getGetIdpByIdUrl, getGetIdpRevisionByIdUrl, getGetInvitationUrl, getGetLiveUrl, getGetMyPasswordStateUrl, getGetMySessionCsrfTokenUrl, getGetMySessionUrl, getGetMyUserSchemaUrl, getGetMyUserUrl, getGetPolicyRevisionUrl, getGetPolicyUrl, getGetProjectUrl, getGetReadyUrl, getGetReleaseByIdUrl, getGetSchemaByIdUrl, getGetSessionUrl, getGetTeamUrl, getGetUserByIDUrl, getGetUserPasswordStateUrl, getGetVariableUrl, getGetVariablesUrl, getGrant, getIdpById, getIdpRevisionById, getInitClaimUrl, getInvitation, getIssueChallengeUrl, getListBrandingUrl, getListDeploymentsUrl, getListEventsUrl, getListFlowDefinitionsUrl, getListIdpRevisionsUrl, getListInvitationsUrl, getListMyIdentityLinksUrl, getListMyPasskeysUrl, getListMyProjectsUrl, getListMyTeamsUrl, getListPoliciesUrl, getListPolicyRevisionsUrl, getListPreviewsUrl, getListProjectAdminsUrl, getListReleasesUrl, getListSchemasUrl, getListUserIdentityLinksUrl, getListUserPasskeysUrl, getListUserTeamsUrl, getLive, getLookupInvitationUrl, getMyPasswordState, getMySession, getMySessionCsrfToken, getMyUser, getMyUserSchema, getPatchMyUserUrl, getPatchProjectUrl, getPatchUserByIDUrl, getPolicy, getPolicyRevision, getProject, getPublishPolicyUrl, getQueryGrantsUrl, getQueryIdpsUrl, getQueryProjectsUrl, getQuerySessionsUrl, getQueryTeamsUrl, getQueryUsersUrl, getReady, getRejectInvitationUrl, getReleaseById, getRemoveOriginUrl, getRemovePreviewUrl, getRevokeMySessionUrl, getRevokeReleaseUrl, getRevokeSessionUrl, getRollbackDeploymentUrl, getSchemaById, getSearchUrl, getSession, getSetUserPasswordUrl, getSubmitFlowStepUrl, getTeam, getUpdateTeamUrl, getUpdateVariablesUrl, getUserByID, getUserPasswordState, getVariable, getVariables, getVerifyChallengeProofUrl, initClaim, issueChallenge, listBranding, listDeployments, listEvents, listFlowDefinitions, listIdpRevisions, listInvitations, listMyIdentityLinks, listMyPasskeys, listMyProjects, listMyTeams, listPolicies, listPolicyRevisions, listPreviews, listProjectAdmins, listReleases, listSchemas, listUserIdentityLinks, listUserPasskeys, listUserTeams, lookupInvitation, patchMyUser, patchProject, patchUserByID, publishPolicy, queryGrants, queryIdps, queryProjects, querySessions, queryTeams, queryUsers, rejectInvitation, removeOrigin, removePreview, revokeMySession, revokeRelease, revokeSession, rollbackDeployment, search, setUserPassword, submitFlowStep, zitadelNextGen_exports as t, updateTeam, updateVariables, verifyChallengeProof };
3086
3867
 
3087
3868
  //# sourceMappingURL=zitadelNextGen.mjs.map