@zitadel/api 0.6.0 → 0.8.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 (1175) hide show
  1. package/dist/api-factory-B2kd991F.mjs +384 -0
  2. package/dist/api-factory-B2kd991F.mjs.map +1 -0
  3. package/dist/api-factory-DW48-EMM.d.mts +228 -0
  4. package/dist/api-factory-DW48-EMM.d.mts.map +1 -0
  5. package/dist/fetch-BLgYBrzi.d.mts +134 -0
  6. package/dist/fetch-BLgYBrzi.d.mts.map +1 -0
  7. package/dist/generated/endpoints/zitadelNextGen.d.mts +2 -2
  8. package/dist/generated/endpoints/zitadelNextGen.mjs +1 -3868
  9. package/dist/generated/endpoints/zitadelNextGen.msw.d.mts +257 -143
  10. package/dist/generated/endpoints/zitadelNextGen.msw.d.mts.map +1 -1
  11. package/dist/generated/endpoints/zitadelNextGen.msw.mjs +2980 -795
  12. package/dist/generated/endpoints/zitadelNextGen.msw.mjs.map +1 -1
  13. package/dist/generated/endpoints/zitadelNextGen.zod.d.mts +2588 -1366
  14. package/dist/generated/endpoints/zitadelNextGen.zod.d.mts.map +1 -1
  15. package/dist/generated/endpoints/zitadelNextGen.zod.mjs +3134 -1943
  16. package/dist/generated/endpoints/zitadelNextGen.zod.mjs.map +1 -1
  17. package/dist/generated/model/index.d.mts +2 -2
  18. package/dist/generated/model/index.mjs +530 -890
  19. package/dist/generated/model/index.mjs.map +1 -1
  20. package/dist/generated/operations.d.mts +1 -3
  21. package/dist/generated/operations.d.mts.map +1 -1
  22. package/dist/generated/operations.mjs +200 -112
  23. package/dist/generated/operations.mjs.map +1 -1
  24. package/dist/index-REGtKmAu.d.mts +60693 -0
  25. package/dist/index-REGtKmAu.d.mts.map +1 -0
  26. package/dist/rolldown-runtime-D8jQpDG7.mjs +12 -0
  27. package/dist/runtime/api-factory.d.mts +1 -1
  28. package/dist/runtime/api-factory.mjs +1 -2
  29. package/dist/runtime/auth.d.mts +0 -2
  30. package/dist/runtime/auth.d.mts.map +1 -1
  31. package/dist/runtime/auth.mjs +1 -2
  32. package/dist/runtime/base-url.d.mts +0 -2
  33. package/dist/runtime/base-url.d.mts.map +1 -1
  34. package/dist/runtime/base-url.mjs +1 -2
  35. package/dist/runtime/config.d.mts +1 -3
  36. package/dist/runtime/config.d.mts.map +1 -1
  37. package/dist/runtime/config.mjs +2 -3
  38. package/dist/runtime/fetch.d.mts +1 -1
  39. package/dist/runtime/fetch.mjs +2 -3
  40. package/dist/runtime/paging.d.mts +0 -2
  41. package/dist/runtime/paging.d.mts.map +1 -1
  42. package/dist/runtime/paging.mjs +1 -2
  43. package/dist/zitadelNextGen-C2Qcm9jl.d.mts +2034 -0
  44. package/dist/zitadelNextGen-C2Qcm9jl.d.mts.map +1 -0
  45. package/dist/zitadelNextGen-CDqt2m_4.mjs +3509 -0
  46. package/dist/zitadelNextGen-CDqt2m_4.mjs.map +1 -0
  47. package/package.json +8 -10
  48. package/src/generated/endpoints/zitadelNextGen.faker.ts +102 -93
  49. package/src/generated/endpoints/zitadelNextGen.msw.ts +417 -340
  50. package/src/generated/endpoints/zitadelNextGen.ts +630 -1087
  51. package/src/generated/endpoints/zitadelNextGen.zod.ts +2676 -1663
  52. package/src/generated/model/acceptInvitation200.ts +88 -16
  53. package/src/generated/model/acceptInvitationDefault.ts +18 -0
  54. package/src/generated/model/addProjectOrigin201.ts +18 -0
  55. package/src/generated/model/addProjectOrigin201Kind.ts +18 -0
  56. package/src/generated/model/addProjectOriginBody.ts +35 -0
  57. package/src/generated/model/addProjectOriginBodyKind.ts +19 -0
  58. package/src/generated/model/addProjectOriginDefault.ts +135 -0
  59. package/src/generated/model/buildRelease200.ts +4 -4
  60. package/src/generated/model/buildRelease200PointersItem.ts +3 -1
  61. package/src/generated/model/buildRelease200PointersItemKind.ts +2 -1
  62. package/src/generated/model/buildRelease201.ts +4 -4
  63. package/src/generated/model/buildRelease201PointersItem.ts +3 -1
  64. package/src/generated/model/buildRelease201PointersItemKind.ts +2 -1
  65. package/src/generated/model/buildRelease400DetailsResourcesItem.ts +2 -2
  66. package/src/generated/model/buildRelease400DetailsResourcesItemKind.ts +2 -1
  67. package/src/generated/model/buildReleaseBody.ts +7 -5
  68. package/src/generated/model/buildReleaseBodyBundle.ts +22 -6
  69. package/src/generated/model/buildReleaseBodyBundleBranding.ts +1 -1
  70. package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItem.ts +2 -12
  71. package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItemStepsItemGates.ts +2 -9
  72. package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItemStepsItemGatesConfig.ts +1 -2
  73. package/src/generated/model/buildReleaseBodyBundleOauth.ts +29 -0
  74. package/src/generated/model/buildReleaseBodyBundlePoliciesItem.ts +20 -0
  75. package/src/generated/model/buildReleaseParams.ts +7 -7
  76. package/src/generated/model/cancelInvitationDefault.ts +9 -0
  77. package/src/generated/model/cancelInvitationParams.ts +7 -7
  78. package/src/generated/model/completeProjectClaim200.ts +19 -0
  79. package/src/generated/model/completeProjectClaim400.ts +20 -0
  80. package/src/generated/model/completeProjectClaim400Details.ts +12 -0
  81. package/src/generated/model/completeProjectClaim401.ts +23 -0
  82. package/src/generated/model/completeProjectClaim403.ts +36 -0
  83. package/src/generated/model/completeProjectClaim404.ts +20 -0
  84. package/src/generated/model/completeProjectClaim404Details.ts +12 -0
  85. package/src/generated/model/completeProjectClaim409.ts +25 -0
  86. package/src/generated/model/completeProjectClaim409Details.ts +14 -0
  87. package/src/generated/model/completeProjectClaim410.ts +27 -0
  88. package/src/generated/model/completeProjectClaim429.ts +20 -0
  89. package/src/generated/model/completeProjectClaim429Details.ts +12 -0
  90. package/src/generated/model/completeProjectClaimBody.ts +18 -0
  91. package/src/generated/model/completeProjectClaimDefault.ts +144 -0
  92. package/src/generated/model/completeUserPasskeyRegistration201.ts +19 -0
  93. package/src/generated/model/completeUserPasskeyRegistration400.ts +20 -0
  94. package/src/generated/model/completeUserPasskeyRegistration400Details.ts +12 -0
  95. package/src/generated/model/completeUserPasskeyRegistration401.ts +20 -0
  96. package/src/generated/model/completeUserPasskeyRegistration401Details.ts +12 -0
  97. package/src/generated/model/completeUserPasskeyRegistration403.ts +20 -0
  98. package/src/generated/model/completeUserPasskeyRegistration403Details.ts +12 -0
  99. package/src/generated/model/completeUserPasskeyRegistration404.ts +20 -0
  100. package/src/generated/model/completeUserPasskeyRegistration404Details.ts +12 -0
  101. package/src/generated/model/completeUserPasskeyRegistration429.ts +23 -0
  102. package/src/generated/model/completeUserPasskeyRegistration500.ts +20 -0
  103. package/src/generated/model/completeUserPasskeyRegistration500Details.ts +12 -0
  104. package/src/generated/model/completeUserPasskeyRegistrationBody.ts +21 -0
  105. package/src/generated/model/completeUserPasskeyRegistrationBodyAttestation.ts +12 -0
  106. package/src/generated/model/completeUserPasskeyRegistrationDefault.ts +189 -0
  107. package/src/generated/model/createAuthAttempt201ChallengesItem.ts +1 -1
  108. package/src/generated/model/createAuthAttempt201ChallengesItemPayload.ts +1 -1
  109. package/src/generated/model/createAuthAttemptChallenge201.ts +49 -0
  110. package/src/generated/model/createAuthAttemptChallenge201Method.ts +20 -0
  111. package/src/generated/model/createAuthAttemptChallenge201Payload.ts +34 -0
  112. package/src/generated/model/createAuthAttemptChallenge201State.ts +22 -0
  113. package/src/generated/model/createAuthAttemptChallengeBody.ts +28 -0
  114. package/src/generated/model/createAuthAttemptChallengeBodyMethod.ts +20 -0
  115. package/src/generated/model/createAuthAttemptChallengeBodyPasskeyOptions.ts +19 -0
  116. package/src/generated/model/createAuthAttemptChallengeBodyPasskeyOptionsUserVerification.ts +16 -0
  117. package/src/generated/model/createAuthAttemptChallengeDefault.ts +90 -0
  118. package/src/generated/model/createAuthAttemptHandoff200.ts +30 -0
  119. package/src/generated/model/createAuthAttemptHandoff409.ts +20 -0
  120. package/src/generated/model/createAuthAttemptHandoff409Details.ts +12 -0
  121. package/src/generated/model/createAuthAttemptHandoffDefault.ts +99 -0
  122. package/src/generated/model/createDeployment200.ts +2 -2
  123. package/src/generated/model/createDeployment200Release.ts +4 -4
  124. package/src/generated/model/createDeployment200ReleasePointersItem.ts +3 -1
  125. package/src/generated/model/createDeployment200ReleasePointersItemKind.ts +2 -1
  126. package/src/generated/model/createDeployment200TargetsItem.ts +0 -5
  127. package/src/generated/model/createDeployment201.ts +2 -2
  128. package/src/generated/model/createDeployment201Release.ts +4 -4
  129. package/src/generated/model/createDeployment201ReleasePointersItem.ts +3 -1
  130. package/src/generated/model/createDeployment201ReleasePointersItemKind.ts +2 -1
  131. package/src/generated/model/createDeployment201TargetsItem.ts +0 -5
  132. package/src/generated/model/createDeployment409.ts +8 -11
  133. package/src/generated/model/createDeploymentBody.ts +2 -2
  134. package/src/generated/model/createDeploymentParams.ts +7 -7
  135. package/src/generated/model/createFlow201.ts +1 -1
  136. package/src/generated/model/createFlow201Branding.ts +1 -1
  137. package/src/generated/model/createFlow201StepGates.ts +22 -9
  138. package/src/generated/model/createFlow201StepGatesChallenge.ts +30 -0
  139. package/src/generated/model/createFlow201StepGatesConfig.ts +2 -2
  140. package/src/generated/model/createFlow201StepGatesKind.ts +3 -4
  141. package/src/generated/model/createGrantParams.ts +7 -7
  142. package/src/generated/model/createInvitation201.ts +88 -16
  143. package/src/generated/model/createInvitationBody.ts +4 -4
  144. package/src/generated/model/createInvitationDefault.ts +54 -0
  145. package/src/generated/model/createInvitationParams.ts +7 -7
  146. package/src/generated/model/createProjectClaim201.ts +25 -0
  147. package/src/generated/model/createProjectClaim401.ts +20 -0
  148. package/src/generated/model/createProjectClaim401Details.ts +12 -0
  149. package/src/generated/model/createProjectClaim404.ts +23 -0
  150. package/src/generated/model/createProjectClaim409.ts +25 -0
  151. package/src/generated/model/createProjectClaim409Details.ts +14 -0
  152. package/src/generated/model/createProjectClaim410.ts +23 -0
  153. package/src/generated/model/createProjectClaimDefault.ts +99 -0
  154. package/src/generated/model/createRelease200.ts +4 -4
  155. package/src/generated/model/createRelease200PointersItem.ts +3 -1
  156. package/src/generated/model/createRelease200PointersItemKind.ts +2 -1
  157. package/src/generated/model/createRelease201.ts +4 -4
  158. package/src/generated/model/createRelease201PointersItem.ts +3 -1
  159. package/src/generated/model/createRelease201PointersItemKind.ts +2 -1
  160. package/src/generated/model/createReleaseBodyPointersItem.ts +1 -1
  161. package/src/generated/model/createReleaseBodyPointersItemKind.ts +2 -1
  162. package/src/generated/model/createReleaseParams.ts +7 -7
  163. package/src/generated/model/createTeamParams.ts +7 -7
  164. package/src/generated/model/createUser201.ts +1 -1
  165. package/src/generated/model/createUserBody.ts +1 -1
  166. package/src/generated/model/createUserParams.ts +23 -23
  167. package/src/generated/model/createUserPasskeyRegistration201.ts +25 -0
  168. package/src/generated/model/createUserPasskeyRegistration201Options.ts +13 -0
  169. package/src/generated/model/createUserPasskeyRegistration400.ts +20 -0
  170. package/src/generated/model/createUserPasskeyRegistration400Details.ts +12 -0
  171. package/src/generated/model/createUserPasskeyRegistration401.ts +20 -0
  172. package/src/generated/model/createUserPasskeyRegistration401Details.ts +12 -0
  173. package/src/generated/model/createUserPasskeyRegistration403.ts +20 -0
  174. package/src/generated/model/createUserPasskeyRegistration403Details.ts +12 -0
  175. package/src/generated/model/createUserPasskeyRegistration404.ts +20 -0
  176. package/src/generated/model/createUserPasskeyRegistration404Details.ts +12 -0
  177. package/src/generated/model/createUserPasskeyRegistration500.ts +20 -0
  178. package/src/generated/model/createUserPasskeyRegistration500Details.ts +12 -0
  179. package/src/generated/model/createUserPasskeyRegistrationBody.ts +33 -0
  180. package/src/generated/model/createUserPasskeyRegistrationDefault.ts +126 -0
  181. package/src/generated/model/deactivateTeam400.ts +20 -0
  182. package/src/generated/model/deactivateTeam400Details.ts +12 -0
  183. package/src/generated/model/deactivateTeam401.ts +20 -0
  184. package/src/generated/model/deactivateTeam401Details.ts +12 -0
  185. package/src/generated/model/deactivateTeam403.ts +20 -0
  186. package/src/generated/model/deactivateTeam403Details.ts +12 -0
  187. package/src/generated/model/deactivateTeam409.ts +20 -0
  188. package/src/generated/model/deactivateTeam409Details.ts +12 -0
  189. package/src/generated/model/deactivateTeamDefault.ts +90 -0
  190. package/src/generated/model/deleteGrantParams.ts +7 -7
  191. package/src/generated/model/deleteUser401.ts +20 -0
  192. package/src/generated/model/deleteUser401Details.ts +12 -0
  193. package/src/generated/model/deleteUser404.ts +20 -0
  194. package/src/generated/model/deleteUser404Details.ts +12 -0
  195. package/src/generated/model/deleteUser409.ts +20 -0
  196. package/src/generated/model/deleteUser409Details.ts +12 -0
  197. package/src/generated/model/deleteUserDefault.ts +99 -0
  198. package/src/generated/model/deleteVariableParams.ts +12 -12
  199. package/src/generated/model/evaluatePolicy200.ts +2 -2
  200. package/src/generated/model/evaluatePolicyBody.ts +31 -0
  201. package/src/generated/model/evaluatePolicyParams.ts +7 -7
  202. package/src/generated/model/exchangeHandoffBody.ts +2 -2
  203. package/src/generated/model/exchangeHandoffParams.ts +7 -7
  204. package/src/generated/model/getApplication200.ts +43 -0
  205. package/src/generated/model/getApplication200Definition.ts +35 -0
  206. package/src/generated/model/getApplication200DefinitionClientsItem.ts +84 -0
  207. package/src/generated/model/getApplication200DefinitionClientsItemGrantTypesItem.ts +15 -0
  208. package/src/generated/model/getApplication200DefinitionClientsItemType.ts +19 -0
  209. package/src/generated/model/getApplication401.ts +20 -0
  210. package/src/generated/model/getApplication401Details.ts +12 -0
  211. package/src/generated/model/getApplication403.ts +20 -0
  212. package/src/generated/model/getApplication403Details.ts +12 -0
  213. package/src/generated/model/getApplication404.ts +20 -0
  214. package/src/generated/model/getApplication404Details.ts +12 -0
  215. package/src/generated/model/getApplicationDefault.ts +72 -0
  216. package/src/generated/model/getApplicationParams.ts +17 -0
  217. package/src/generated/model/getAuthAttempt200ChallengesItem.ts +1 -1
  218. package/src/generated/model/getAuthAttempt200ChallengesItemPayload.ts +1 -1
  219. package/src/generated/model/getBranding200.ts +32 -0
  220. package/src/generated/model/getBranding200Branding.ts +80 -0
  221. package/src/generated/model/getBranding200BrandingLayout.ts +27 -0
  222. package/src/generated/model/getBranding200BrandingShape.ts +30 -0
  223. package/src/generated/model/getBranding200BrandingShapeDensity.ts +19 -0
  224. package/src/generated/model/getBranding200BrandingTheme.ts +41 -0
  225. package/src/generated/model/getBranding200BrandingThemeDark.ts +34 -0
  226. package/src/generated/model/getBranding200BrandingThemeDarkPalette.ts +210 -0
  227. package/src/generated/model/getBranding200BrandingThemeLight.ts +34 -0
  228. package/src/generated/model/getBranding200BrandingThemeLightPalette.ts +210 -0
  229. package/src/generated/model/getBranding200BrandingThemeMode.ts +19 -0
  230. package/src/generated/model/getBranding200BrandingTypography.ts +47 -0
  231. package/src/generated/model/getBranding404.ts +20 -0
  232. package/src/generated/model/getBranding404Details.ts +12 -0
  233. package/src/generated/model/getBrandingDefault.ts +72 -0
  234. package/src/generated/model/getDeployment200.ts +78 -0
  235. package/src/generated/model/getDeployment200Kind.ts +18 -0
  236. package/src/generated/model/getDeployment200Metadata.ts +35 -0
  237. package/src/generated/model/getDeployment200MetadataDeployedByType.ts +20 -0
  238. package/src/generated/model/getDeployment200MetadataReason.ts +20 -0
  239. package/src/generated/model/getDeployment200Release.ts +96 -0
  240. package/src/generated/model/getDeployment200ReleaseMetadata.ts +43 -0
  241. package/src/generated/model/getDeployment200ReleaseMetadataCreatedByType.ts +20 -0
  242. package/src/generated/model/getDeployment200ReleasePointersItem.ts +63 -0
  243. package/src/generated/model/getDeployment200ReleasePointersItemKind.ts +29 -0
  244. package/src/generated/model/getDeployment200Status.ts +23 -0
  245. package/src/generated/model/getDeployment200TargetsItem.ts +23 -0
  246. package/src/generated/model/getDeploymentDefault.ts +72 -0
  247. package/src/generated/model/getDeploymentParams.ts +17 -0
  248. package/src/generated/model/getEvent200.ts +1014 -160
  249. package/src/generated/model/getEventParams.ts +7 -7
  250. package/src/generated/model/getFlowDefinition200.ts +2 -2
  251. package/src/generated/model/getFlowDefinition200FlowDefinition.ts +2 -12
  252. package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemGates.ts +2 -9
  253. package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemGatesConfig.ts +1 -2
  254. package/src/generated/model/getFlowDefinition200UserSchema.ts +1 -1
  255. package/src/generated/model/getFlowStep200.ts +1 -1
  256. package/src/generated/model/getFlowStep200Branding.ts +1 -1
  257. package/src/generated/model/getFlowStep200StepGates.ts +22 -9
  258. package/src/generated/model/getFlowStep200StepGatesChallenge.ts +30 -0
  259. package/src/generated/model/getFlowStep200StepGatesConfig.ts +2 -2
  260. package/src/generated/model/getFlowStep200StepGatesKind.ts +3 -4
  261. package/src/generated/model/getFlowStep429.ts +23 -0
  262. package/src/generated/model/getFlowStepDefault.ts +18 -0
  263. package/src/generated/model/getGrantParams.ts +13 -13
  264. package/src/generated/model/getIdp200.ts +39 -0
  265. package/src/generated/model/getIdp200Definition.ts +44 -0
  266. package/src/generated/model/getIdp200DefinitionClaimMapping.ts +12 -0
  267. package/src/generated/model/getIdp200DefinitionOidc.ts +65 -0
  268. package/src/generated/model/getIdp200DefinitionOidcStaticAuthorizeParameters.ts +12 -0
  269. package/src/generated/model/getIdp200DefinitionOidcTokenEndpointAuthMethod.ts +18 -0
  270. package/src/generated/model/getIdp200DefinitionProtocol.ts +17 -0
  271. package/src/generated/model/getIdp200DefinitionProvisioning.ts +15 -0
  272. package/src/generated/model/getIdp200DefinitionProvisioningCreation.ts +15 -0
  273. package/src/generated/model/getIdp200DefinitionVerifiedClaims.ts +12 -0
  274. package/src/generated/model/getIdp401.ts +20 -0
  275. package/src/generated/model/getIdp401Details.ts +12 -0
  276. package/src/generated/model/getIdp403.ts +20 -0
  277. package/src/generated/model/getIdp403Details.ts +12 -0
  278. package/src/generated/model/getIdp404.ts +20 -0
  279. package/src/generated/model/getIdp404Details.ts +12 -0
  280. package/src/generated/model/getIdpDefault.ts +72 -0
  281. package/src/generated/model/getIdpParams.ts +17 -0
  282. package/src/generated/model/getIdpRevision200.ts +39 -0
  283. package/src/generated/model/getIdpRevision200Definition.ts +44 -0
  284. package/src/generated/model/getIdpRevision200DefinitionClaimMapping.ts +12 -0
  285. package/src/generated/model/getIdpRevision200DefinitionOidc.ts +65 -0
  286. package/src/generated/model/getIdpRevision200DefinitionOidcStaticAuthorizeParameters.ts +12 -0
  287. package/src/generated/model/getIdpRevision200DefinitionOidcTokenEndpointAuthMethod.ts +18 -0
  288. package/src/generated/model/getIdpRevision200DefinitionProtocol.ts +17 -0
  289. package/src/generated/model/getIdpRevision200DefinitionProvisioning.ts +15 -0
  290. package/src/generated/model/getIdpRevision200DefinitionProvisioningCreation.ts +15 -0
  291. package/src/generated/model/getIdpRevision200DefinitionVerifiedClaims.ts +12 -0
  292. package/src/generated/model/getIdpRevision401.ts +20 -0
  293. package/src/generated/model/getIdpRevision401Details.ts +12 -0
  294. package/src/generated/model/getIdpRevision403.ts +20 -0
  295. package/src/generated/model/getIdpRevision403Details.ts +12 -0
  296. package/src/generated/model/getIdpRevision404.ts +20 -0
  297. package/src/generated/model/getIdpRevision404Details.ts +12 -0
  298. package/src/generated/model/getIdpRevisionDefault.ts +72 -0
  299. package/src/generated/model/getIdpRevisionParams.ts +17 -0
  300. package/src/generated/model/getInvitation200.ts +88 -16
  301. package/src/generated/model/getInvitationParams.ts +7 -7
  302. package/src/generated/model/getMyPasswordStateParams.ts +16 -16
  303. package/src/generated/model/getMySessionCsrfTokenParams.ts +16 -16
  304. package/src/generated/model/getMySessionParams.ts +16 -16
  305. package/src/generated/model/getMyUser200.ts +1 -1
  306. package/src/generated/model/getMyUserParams.ts +16 -16
  307. package/src/generated/model/getMyUserSchemaParams.ts +16 -16
  308. package/src/generated/model/getOAuthSettings200.ts +33 -0
  309. package/src/generated/model/getOAuthSettings200Oauth.ts +29 -0
  310. package/src/generated/model/getOAuthSettings404.ts +20 -0
  311. package/src/generated/model/getOAuthSettings404Details.ts +12 -0
  312. package/src/generated/model/getOAuthSettingsDefault.ts +72 -0
  313. package/src/generated/model/getPolicy200.ts +36 -0
  314. package/src/generated/model/getPolicyParams.ts +7 -7
  315. package/src/generated/model/getPolicyRevision200.ts +36 -0
  316. package/src/generated/model/getPolicyRevisionParams.ts +7 -7
  317. package/src/generated/model/getProjectClaimStatus200.ts +27 -0
  318. package/src/generated/model/getProjectClaimStatus401.ts +20 -0
  319. package/src/generated/model/getProjectClaimStatus401Details.ts +12 -0
  320. package/src/generated/model/getProjectClaimStatus403.ts +23 -0
  321. package/src/generated/model/getProjectClaimStatus404.ts +20 -0
  322. package/src/generated/model/getProjectClaimStatus404Details.ts +12 -0
  323. package/src/generated/model/getProjectClaimStatus410.ts +27 -0
  324. package/src/generated/model/getProjectClaimStatus429.ts +20 -0
  325. package/src/generated/model/getProjectClaimStatus429Details.ts +12 -0
  326. package/src/generated/model/getProjectClaimStatusDefault.ts +99 -0
  327. package/src/generated/model/getProjectClaimStatusParams.ts +15 -0
  328. package/src/generated/model/getProjectClaimWindow200.ts +23 -0
  329. package/src/generated/model/getProjectClaimWindow404.ts +20 -0
  330. package/src/generated/model/getProjectClaimWindow404Details.ts +12 -0
  331. package/src/generated/model/getProjectClaimWindow429.ts +20 -0
  332. package/src/generated/model/getProjectClaimWindow429Details.ts +12 -0
  333. package/src/generated/model/getProjectClaimWindowDefault.ts +36 -0
  334. package/src/generated/model/getProjectClaimWindowParams.ts +15 -0
  335. package/src/generated/model/getRelease200.ts +96 -0
  336. package/src/generated/model/getRelease200Metadata.ts +43 -0
  337. package/src/generated/model/getRelease200MetadataCreatedByType.ts +20 -0
  338. package/src/generated/model/getRelease200PointersItem.ts +63 -0
  339. package/src/generated/model/getRelease200PointersItemKind.ts +29 -0
  340. package/src/generated/model/getReleaseDefault.ts +72 -0
  341. package/src/generated/model/getReleaseParams.ts +17 -0
  342. package/src/generated/model/getSchema200.ts +31 -0
  343. package/src/generated/model/getSchema200Metadata.ts +18 -0
  344. package/src/generated/model/getSchema200Schema.ts +84 -0
  345. package/src/generated/model/getSchemaDefault.ts +72 -0
  346. package/src/generated/model/getSchemaParams.ts +21 -0
  347. package/src/generated/model/getUser200.ts +76 -0
  348. package/src/generated/model/getUser200Attributes.ts +13 -0
  349. package/src/generated/model/getUser200Metadata.ts +44 -0
  350. package/src/generated/model/getUser200MetadataLifecycleOwnerTeam.ts +43 -0
  351. package/src/generated/model/getUser200MetadataLifecycleOwnerTeamStatus.ts +21 -0
  352. package/src/generated/model/getUser200MetadataStatus.ts +20 -0
  353. package/src/generated/model/getUser200TeamsItem.ts +33 -0
  354. package/src/generated/model/getUser200TeamsItemMembershipStatus.ts +20 -0
  355. package/src/generated/model/getUser401.ts +20 -0
  356. package/src/generated/model/getUser401Details.ts +12 -0
  357. package/src/generated/model/getUser404.ts +20 -0
  358. package/src/generated/model/getUser404Details.ts +12 -0
  359. package/src/generated/model/getUserDefault.ts +72 -0
  360. package/src/generated/model/getUserParams.ts +31 -0
  361. package/src/generated/model/getVariableParams.ts +12 -12
  362. package/src/generated/model/index.ts +462 -468
  363. package/src/generated/model/listBranding200.ts +20 -0
  364. package/src/generated/model/listBranding200BrandingItem.ts +18 -0
  365. package/src/generated/model/listBrandingParams.ts +20 -7
  366. package/src/generated/model/listDeploymentVariables200.ts +17 -0
  367. package/src/generated/model/listDeploymentVariablesDefault.ts +90 -0
  368. package/src/generated/model/listDeploymentVariablesParams.ts +17 -0
  369. package/src/generated/model/listDeployments200DeploymentsItem.ts +2 -2
  370. package/src/generated/model/listDeployments200DeploymentsItemRelease.ts +4 -4
  371. package/src/generated/model/listDeployments200DeploymentsItemReleasePointersItem.ts +3 -1
  372. package/src/generated/model/listDeployments200DeploymentsItemReleasePointersItemKind.ts +2 -1
  373. package/src/generated/model/listDeployments200DeploymentsItemTargetsItem.ts +0 -5
  374. package/src/generated/model/listDeploymentsParams.ts +42 -39
  375. package/src/generated/model/listEvents200.ts +2 -2
  376. package/src/generated/model/listEvents200EventsItem.ts +5220 -0
  377. package/src/generated/model/listEventsParams.ts +83 -97
  378. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItem.ts +2 -2
  379. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinition.ts +2 -12
  380. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemGates.ts +2 -9
  381. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemGatesConfig.ts +1 -2
  382. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemUserSchema.ts +1 -1
  383. package/src/generated/model/listFlowDefinitionsExpandItem.ts +1 -1
  384. package/src/generated/model/listFlowDefinitionsParams.ts +44 -48
  385. package/src/generated/model/listIdpRevisions200RevisionsItem.ts +2 -2
  386. package/src/generated/model/listIdpRevisionsParams.ts +20 -20
  387. package/src/generated/model/listInvitations200InvitationsItem.ts +88 -16
  388. package/src/generated/model/listInvitationsExpandItem.ts +25 -0
  389. package/src/generated/model/listInvitationsParams.ts +31 -31
  390. package/src/generated/model/listInvitationsStatusItem.ts +22 -0
  391. package/src/generated/model/listMyIdentityLinks200IdentityLinksItem.ts +1 -1
  392. package/src/generated/model/listMyIdentityLinksParams.ts +29 -29
  393. package/src/generated/model/listMyPasskeysParams.ts +29 -29
  394. package/src/generated/model/listMyProjectsParams.ts +52 -46
  395. package/src/generated/model/listMyTeamsParams.ts +29 -29
  396. package/src/generated/model/listPolicies200PoliciesItem.ts +36 -0
  397. package/src/generated/model/listPoliciesOperation.ts +1 -0
  398. package/src/generated/model/listPoliciesParams.ts +22 -24
  399. package/src/generated/model/listPolicyRevisions200RevisionsItem.ts +36 -0
  400. package/src/generated/model/listPolicyRevisionsParams.ts +20 -20
  401. package/src/generated/model/listProjectAdmins200AdminsItemSourcesItem.ts +1 -1
  402. package/src/generated/model/listProjectAdminsParams.ts +13 -13
  403. package/src/generated/model/listProjectMembers200.ts +20 -0
  404. package/src/generated/model/listProjectMembers200MembersItem.ts +38 -0
  405. package/src/generated/model/listProjectMembers200MembersItemRelation.ts +20 -0
  406. package/src/generated/model/listProjectMembers200MembersItemSourcesItem.ts +55 -0
  407. package/src/generated/model/listProjectMembers200MembersItemUser.ts +40 -0
  408. package/src/generated/model/listProjectMembers400.ts +20 -0
  409. package/src/generated/model/listProjectMembers400Details.ts +12 -0
  410. package/src/generated/model/listProjectMembers401.ts +20 -0
  411. package/src/generated/model/listProjectMembers401Details.ts +12 -0
  412. package/src/generated/model/listProjectMembers403.ts +20 -0
  413. package/src/generated/model/listProjectMembers403Details.ts +12 -0
  414. package/src/generated/model/listProjectMembers404.ts +20 -0
  415. package/src/generated/model/listProjectMembers404Details.ts +12 -0
  416. package/src/generated/model/listProjectMembersDefault.ts +81 -0
  417. package/src/generated/model/listProjectMembersParams.ts +29 -0
  418. package/src/generated/model/listProjectMembersRelation.ts +16 -0
  419. package/src/generated/model/listProjectPreviews200.ts +20 -0
  420. package/src/generated/model/listProjectPreviews200PreviewsItem.ts +37 -0
  421. package/src/generated/model/listProjectPreviewsDefault.ts +72 -0
  422. package/src/generated/model/listProjectPreviewsParams.ts +23 -0
  423. package/src/generated/model/listReleases200ReleasesItem.ts +2 -2
  424. package/src/generated/model/listReleasesParams.ts +60 -60
  425. package/src/generated/model/listSchemasParams.ts +54 -56
  426. package/src/generated/model/listUserIdentityLinks200IdentityLinksItem.ts +1 -1
  427. package/src/generated/model/listUserIdentityLinksParams.ts +13 -13
  428. package/src/generated/model/listUserPasskeysParams.ts +13 -13
  429. package/src/generated/model/listUserTeamsParams.ts +13 -13
  430. package/src/generated/model/listVariables200.ts +35 -0
  431. package/src/generated/model/listVariables200Preview.ts +20 -0
  432. package/src/generated/model/listVariables200Primary.ts +20 -0
  433. package/src/generated/model/listVariablesDefault.ts +72 -0
  434. package/src/generated/model/listVariablesKind.ts +15 -0
  435. package/src/generated/model/listVariablesParams.ts +23 -0
  436. package/src/generated/model/lookupInvitation200.ts +62 -4
  437. package/src/generated/model/publishApplication200.ts +137 -0
  438. package/src/generated/model/publishApplication200ClientSecretsItem.ts +19 -0
  439. package/src/generated/model/publishApplication201.ts +137 -0
  440. package/src/generated/model/publishApplication201ClientSecretsItem.ts +19 -0
  441. package/src/generated/model/publishApplication400.ts +20 -0
  442. package/src/generated/model/publishApplication400Details.ts +12 -0
  443. package/src/generated/model/publishApplication401.ts +20 -0
  444. package/src/generated/model/publishApplication401Details.ts +12 -0
  445. package/src/generated/model/publishApplication403.ts +20 -0
  446. package/src/generated/model/publishApplication403Details.ts +12 -0
  447. package/src/generated/model/publishApplication404.ts +20 -0
  448. package/src/generated/model/publishApplication404Details.ts +12 -0
  449. package/src/generated/model/publishApplication409.ts +20 -0
  450. package/src/generated/model/publishApplication409Details.ts +12 -0
  451. package/src/generated/model/publishApplicationBody.ts +20 -0
  452. package/src/generated/model/publishApplicationBodyApplication.ts +35 -0
  453. package/src/generated/model/publishApplicationBodyApplicationClientsItem.ts +84 -0
  454. package/src/generated/model/publishApplicationBodyApplicationClientsItemGrantTypesItem.ts +15 -0
  455. package/src/generated/model/publishApplicationBodyApplicationClientsItemType.ts +19 -0
  456. package/src/generated/model/publishApplicationDefault.ts +117 -0
  457. package/src/generated/model/publishApplicationParams.ts +17 -0
  458. package/src/generated/model/publishBranding201.ts +32 -0
  459. package/src/generated/model/publishBranding201Branding.ts +80 -0
  460. package/src/generated/model/publishBranding201BrandingLayout.ts +27 -0
  461. package/src/generated/model/publishBranding201BrandingShape.ts +30 -0
  462. package/src/generated/model/publishBranding201BrandingShapeDensity.ts +19 -0
  463. package/src/generated/model/publishBranding201BrandingTheme.ts +41 -0
  464. package/src/generated/model/publishBranding201BrandingThemeDark.ts +34 -0
  465. package/src/generated/model/publishBranding201BrandingThemeDarkPalette.ts +210 -0
  466. package/src/generated/model/publishBranding201BrandingThemeLight.ts +34 -0
  467. package/src/generated/model/publishBranding201BrandingThemeLightPalette.ts +210 -0
  468. package/src/generated/model/publishBranding201BrandingThemeMode.ts +19 -0
  469. package/src/generated/model/publishBranding201BrandingTypography.ts +47 -0
  470. package/src/generated/model/publishBranding400.ts +20 -0
  471. package/src/generated/model/publishBranding400Details.ts +12 -0
  472. package/src/generated/model/publishBrandingBody.ts +80 -0
  473. package/src/generated/model/publishBrandingBodyLayout.ts +27 -0
  474. package/src/generated/model/publishBrandingBodyShape.ts +30 -0
  475. package/src/generated/model/publishBrandingBodyShapeDensity.ts +19 -0
  476. package/src/generated/model/publishBrandingBodyTheme.ts +41 -0
  477. package/src/generated/model/publishBrandingBodyThemeDark.ts +34 -0
  478. package/src/generated/model/publishBrandingBodyThemeDarkPalette.ts +210 -0
  479. package/src/generated/model/publishBrandingBodyThemeLight.ts +34 -0
  480. package/src/generated/model/publishBrandingBodyThemeLightPalette.ts +210 -0
  481. package/src/generated/model/publishBrandingBodyThemeMode.ts +19 -0
  482. package/src/generated/model/publishBrandingBodyTypography.ts +47 -0
  483. package/src/generated/model/publishBrandingDefault.ts +99 -0
  484. package/src/generated/model/publishBrandingParams.ts +17 -0
  485. package/src/generated/model/publishFlowDefinition201.ts +48 -0
  486. package/src/generated/model/publishFlowDefinition201FlowDefinition.ts +85 -0
  487. package/src/generated/model/publishFlowDefinition201FlowDefinitionAudience.ts +20 -0
  488. package/src/generated/model/publishFlowDefinition201FlowDefinitionStepsItem.ts +109 -0
  489. package/src/generated/model/publishFlowDefinition201FlowDefinitionStepsItemActionsItem.ts +49 -0
  490. package/src/generated/model/publishFlowDefinition201FlowDefinitionStepsItemActionsItemKind.ts +29 -0
  491. package/src/generated/model/publishFlowDefinition201FlowDefinitionStepsItemComplete.ts +20 -0
  492. package/src/generated/model/publishFlowDefinition201FlowDefinitionStepsItemGates.ts +29 -0
  493. package/src/generated/model/publishFlowDefinition201FlowDefinitionStepsItemGatesConfig.ts +12 -0
  494. package/src/generated/model/publishFlowDefinition201FlowDefinitionStepsItemGatesKind.ts +20 -0
  495. package/src/generated/model/publishFlowDefinition201FlowDefinitionStepsItemOnSuccess.ts +25 -0
  496. package/src/generated/model/publishFlowDefinition201FlowDefinitionStepsItemTransitions.ts +68 -0
  497. package/src/generated/model/publishFlowDefinition201FlowDefinitionStepsItemTransitionsAction.ts +28 -0
  498. package/src/generated/model/publishFlowDefinition201FlowDefinitionStepsItemTransitionsPurpose.ts +29 -0
  499. package/src/generated/model/publishFlowDefinition201UserSchema.ts +26 -0
  500. package/src/generated/model/publishFlowDefinition201UserSchemaMetadata.ts +18 -0
  501. package/src/generated/model/publishFlowDefinition201UserSchemaSchema.ts +84 -0
  502. package/src/generated/model/publishFlowDefinition400.ts +20 -0
  503. package/src/generated/model/publishFlowDefinition400Details.ts +12 -0
  504. package/src/generated/model/publishFlowDefinitionBody.ts +43 -0
  505. package/src/generated/model/publishFlowDefinitionBodyFlowDefinition.ts +85 -0
  506. package/src/generated/model/publishFlowDefinitionBodyFlowDefinitionAudience.ts +20 -0
  507. package/src/generated/model/publishFlowDefinitionBodyFlowDefinitionStepsItem.ts +109 -0
  508. package/src/generated/model/publishFlowDefinitionBodyFlowDefinitionStepsItemActionsItem.ts +49 -0
  509. package/src/generated/model/publishFlowDefinitionBodyFlowDefinitionStepsItemActionsItemKind.ts +29 -0
  510. package/src/generated/model/publishFlowDefinitionBodyFlowDefinitionStepsItemComplete.ts +20 -0
  511. package/src/generated/model/publishFlowDefinitionBodyFlowDefinitionStepsItemGates.ts +29 -0
  512. package/src/generated/model/publishFlowDefinitionBodyFlowDefinitionStepsItemGatesConfig.ts +12 -0
  513. package/src/generated/model/publishFlowDefinitionBodyFlowDefinitionStepsItemGatesKind.ts +20 -0
  514. package/src/generated/model/publishFlowDefinitionBodyFlowDefinitionStepsItemOnSuccess.ts +25 -0
  515. package/src/generated/model/publishFlowDefinitionBodyFlowDefinitionStepsItemTransitions.ts +68 -0
  516. package/src/generated/model/publishFlowDefinitionBodyFlowDefinitionStepsItemTransitionsAction.ts +28 -0
  517. package/src/generated/model/publishFlowDefinitionBodyFlowDefinitionStepsItemTransitionsPurpose.ts +29 -0
  518. package/src/generated/model/publishFlowDefinitionDefault.ts +117 -0
  519. package/src/generated/model/publishIdp200.ts +39 -0
  520. package/src/generated/model/publishIdp200Definition.ts +44 -0
  521. package/src/generated/model/publishIdp200DefinitionClaimMapping.ts +12 -0
  522. package/src/generated/model/publishIdp200DefinitionOidc.ts +65 -0
  523. package/src/generated/model/publishIdp200DefinitionOidcStaticAuthorizeParameters.ts +12 -0
  524. package/src/generated/model/publishIdp200DefinitionOidcTokenEndpointAuthMethod.ts +18 -0
  525. package/src/generated/model/publishIdp200DefinitionProtocol.ts +17 -0
  526. package/src/generated/model/publishIdp200DefinitionProvisioning.ts +15 -0
  527. package/src/generated/model/publishIdp200DefinitionProvisioningCreation.ts +15 -0
  528. package/src/generated/model/publishIdp200DefinitionVerifiedClaims.ts +12 -0
  529. package/src/generated/model/publishIdp201.ts +39 -0
  530. package/src/generated/model/publishIdp201Definition.ts +44 -0
  531. package/src/generated/model/publishIdp201DefinitionClaimMapping.ts +12 -0
  532. package/src/generated/model/publishIdp201DefinitionOidc.ts +65 -0
  533. package/src/generated/model/publishIdp201DefinitionOidcStaticAuthorizeParameters.ts +12 -0
  534. package/src/generated/model/publishIdp201DefinitionOidcTokenEndpointAuthMethod.ts +18 -0
  535. package/src/generated/model/publishIdp201DefinitionProtocol.ts +17 -0
  536. package/src/generated/model/publishIdp201DefinitionProvisioning.ts +15 -0
  537. package/src/generated/model/publishIdp201DefinitionProvisioningCreation.ts +15 -0
  538. package/src/generated/model/publishIdp201DefinitionVerifiedClaims.ts +12 -0
  539. package/src/generated/model/publishIdp400.ts +20 -0
  540. package/src/generated/model/publishIdp400Details.ts +12 -0
  541. package/src/generated/model/publishIdp401.ts +20 -0
  542. package/src/generated/model/publishIdp401Details.ts +12 -0
  543. package/src/generated/model/publishIdp403.ts +20 -0
  544. package/src/generated/model/publishIdp403Details.ts +12 -0
  545. package/src/generated/model/publishIdp404.ts +20 -0
  546. package/src/generated/model/publishIdp404Details.ts +12 -0
  547. package/src/generated/model/publishIdpBody.ts +15 -0
  548. package/src/generated/model/publishIdpBodyIdp.ts +44 -0
  549. package/src/generated/model/publishIdpBodyIdpClaimMapping.ts +12 -0
  550. package/src/generated/model/publishIdpBodyIdpOidc.ts +65 -0
  551. package/src/generated/model/publishIdpBodyIdpOidcStaticAuthorizeParameters.ts +12 -0
  552. package/src/generated/model/publishIdpBodyIdpOidcTokenEndpointAuthMethod.ts +18 -0
  553. package/src/generated/model/publishIdpBodyIdpProtocol.ts +17 -0
  554. package/src/generated/model/publishIdpBodyIdpProvisioning.ts +15 -0
  555. package/src/generated/model/publishIdpBodyIdpProvisioningCreation.ts +15 -0
  556. package/src/generated/model/publishIdpBodyIdpVerifiedClaims.ts +12 -0
  557. package/src/generated/model/publishIdpDefault.ts +108 -0
  558. package/src/generated/model/publishIdpParams.ts +17 -0
  559. package/src/generated/model/publishPolicy201.ts +36 -0
  560. package/src/generated/model/publishPolicyBody.ts +20 -0
  561. package/src/generated/model/publishPolicyParams.ts +7 -7
  562. package/src/generated/model/publishSchema201.ts +31 -0
  563. package/src/generated/model/publishSchema201Metadata.ts +18 -0
  564. package/src/generated/model/publishSchema201Schema.ts +84 -0
  565. package/src/generated/model/publishSchemaBody.ts +86 -0
  566. package/src/generated/model/publishSchemaDefault.ts +153 -0
  567. package/src/generated/model/publishSchemaParams.ts +22 -0
  568. package/src/generated/model/queryGrantsParams.ts +7 -7
  569. package/src/generated/model/queryIdps200IdpsItem.ts +2 -2
  570. package/src/generated/model/queryIdpsParams.ts +7 -7
  571. package/src/generated/model/querySessionsParams.ts +7 -7
  572. package/src/generated/model/queryTeamsParams.ts +6 -6
  573. package/src/generated/model/queryUsers200UsersItem.ts +1 -1
  574. package/src/generated/model/queryUsersParams.ts +6 -6
  575. package/src/generated/model/rejectInvitation200.ts +88 -16
  576. package/src/generated/model/rejectInvitationDefault.ts +18 -0
  577. package/src/generated/model/removeProjectOriginBody.ts +15 -0
  578. package/src/generated/model/removeProjectOriginDefault.ts +108 -0
  579. package/src/generated/model/removeProjectPreviewBody.ts +23 -0
  580. package/src/generated/model/removeProjectPreviewDefault.ts +90 -0
  581. package/src/generated/model/revokeMySessionParams.ts +16 -16
  582. package/src/generated/model/revokeRelease200.ts +4 -4
  583. package/src/generated/model/revokeRelease200PointersItem.ts +3 -1
  584. package/src/generated/model/revokeRelease200PointersItemKind.ts +2 -1
  585. package/src/generated/model/revokeReleaseParams.ts +7 -7
  586. package/src/generated/model/rollbackDeployment200.ts +2 -2
  587. package/src/generated/model/rollbackDeployment200Release.ts +4 -4
  588. package/src/generated/model/rollbackDeployment200ReleasePointersItem.ts +3 -1
  589. package/src/generated/model/rollbackDeployment200ReleasePointersItemKind.ts +2 -1
  590. package/src/generated/model/rollbackDeployment200TargetsItem.ts +0 -5
  591. package/src/generated/model/rollbackDeployment201.ts +2 -2
  592. package/src/generated/model/rollbackDeployment201Release.ts +4 -4
  593. package/src/generated/model/rollbackDeployment201ReleasePointersItem.ts +3 -1
  594. package/src/generated/model/rollbackDeployment201ReleasePointersItemKind.ts +2 -1
  595. package/src/generated/model/rollbackDeployment201TargetsItem.ts +0 -5
  596. package/src/generated/model/rollbackDeployment409.ts +8 -11
  597. package/src/generated/model/rollbackDeploymentParams.ts +7 -7
  598. package/src/generated/model/search200.ts +9 -2
  599. package/src/generated/model/searchDefault.ts +2 -74
  600. package/src/generated/model/searchParams.ts +7 -6
  601. package/src/generated/model/setUserPassword429.ts +23 -0
  602. package/src/generated/model/setUserPasswordDefault.ts +9 -0
  603. package/src/generated/model/setVariables200.ts +35 -0
  604. package/src/generated/model/setVariables200Preview.ts +20 -0
  605. package/src/generated/model/setVariables200Primary.ts +20 -0
  606. package/src/generated/model/setVariablesBody.ts +48 -0
  607. package/src/generated/model/setVariablesDefault.ts +162 -0
  608. package/src/generated/model/setVariablesKind.ts +15 -0
  609. package/src/generated/model/setVariablesParams.ts +23 -0
  610. package/src/generated/model/submitFlowStep200.ts +1 -1
  611. package/src/generated/model/submitFlowStep200Branding.ts +1 -1
  612. package/src/generated/model/submitFlowStep200StepGates.ts +22 -9
  613. package/src/generated/model/submitFlowStep200StepGatesChallenge.ts +30 -0
  614. package/src/generated/model/submitFlowStep200StepGatesConfig.ts +2 -2
  615. package/src/generated/model/submitFlowStep200StepGatesKind.ts +3 -4
  616. package/src/generated/model/submitFlowStep400.ts +885 -8
  617. package/src/generated/model/submitFlowStep429.ts +23 -0
  618. package/src/generated/model/submitFlowStepBody.ts +5 -2
  619. package/src/generated/model/submitFlowStepBodyGateProofs.ts +4 -1
  620. package/src/generated/model/submitFlowStepDefault.ts +27 -0
  621. package/src/generated/model/updateMyUser200.ts +76 -0
  622. package/src/generated/model/updateMyUser200Attributes.ts +13 -0
  623. package/src/generated/model/updateMyUser200Metadata.ts +44 -0
  624. package/src/generated/model/updateMyUser200MetadataLifecycleOwnerTeam.ts +43 -0
  625. package/src/generated/model/updateMyUser200MetadataLifecycleOwnerTeamStatus.ts +21 -0
  626. package/src/generated/model/updateMyUser200MetadataStatus.ts +20 -0
  627. package/src/generated/model/updateMyUser200TeamsItem.ts +33 -0
  628. package/src/generated/model/updateMyUser200TeamsItemMembershipStatus.ts +20 -0
  629. package/src/generated/model/updateMyUser400.ts +20 -0
  630. package/src/generated/model/updateMyUser400Details.ts +12 -0
  631. package/src/generated/model/updateMyUser401.ts +20 -0
  632. package/src/generated/model/updateMyUser401Details.ts +12 -0
  633. package/src/generated/model/updateMyUser403.ts +20 -0
  634. package/src/generated/model/updateMyUser403Details.ts +12 -0
  635. package/src/generated/model/updateMyUser404.ts +23 -0
  636. package/src/generated/model/updateMyUser409.ts +20 -0
  637. package/src/generated/model/updateMyUser409Details.ts +12 -0
  638. package/src/generated/model/updateMyUserBody.ts +25 -0
  639. package/src/generated/model/updateMyUserBodyAttributes.ts +13 -0
  640. package/src/generated/model/updateMyUserDefault.ts +117 -0
  641. package/src/generated/model/updateMyUserParams.ts +26 -0
  642. package/src/generated/model/updateProject200.ts +96 -0
  643. package/src/generated/model/updateProject400.ts +20 -0
  644. package/src/generated/model/updateProject400Details.ts +12 -0
  645. package/src/generated/model/updateProject401.ts +20 -0
  646. package/src/generated/model/updateProject401Details.ts +12 -0
  647. package/src/generated/model/updateProject404.ts +20 -0
  648. package/src/generated/model/updateProject404Details.ts +12 -0
  649. package/src/generated/model/updateProjectBody.ts +19 -0
  650. package/src/generated/model/updateProjectBodyPasswordHash.ts +40 -0
  651. package/src/generated/model/updateProjectBodyPasswordHashAlgorithm.ts +24 -0
  652. package/src/generated/model/updateProjectBodyPasswordHashParams.ts +44 -0
  653. package/src/generated/model/updateProjectBodyPasswordHashParamsHash.ts +24 -0
  654. package/src/generated/model/updateProjectDefault.ts +117 -0
  655. package/src/generated/model/updateUser200.ts +76 -0
  656. package/src/generated/model/updateUser200Attributes.ts +13 -0
  657. package/src/generated/model/updateUser200Metadata.ts +44 -0
  658. package/src/generated/model/updateUser200MetadataLifecycleOwnerTeam.ts +43 -0
  659. package/src/generated/model/updateUser200MetadataLifecycleOwnerTeamStatus.ts +21 -0
  660. package/src/generated/model/updateUser200MetadataStatus.ts +20 -0
  661. package/src/generated/model/updateUser200TeamsItem.ts +33 -0
  662. package/src/generated/model/updateUser200TeamsItemMembershipStatus.ts +20 -0
  663. package/src/generated/model/updateUser400.ts +20 -0
  664. package/src/generated/model/updateUser400Details.ts +12 -0
  665. package/src/generated/model/updateUser401.ts +20 -0
  666. package/src/generated/model/updateUser401Details.ts +12 -0
  667. package/src/generated/model/updateUser403.ts +20 -0
  668. package/src/generated/model/updateUser403Details.ts +12 -0
  669. package/src/generated/model/updateUser404.ts +20 -0
  670. package/src/generated/model/updateUser404Details.ts +12 -0
  671. package/src/generated/model/updateUser409.ts +20 -0
  672. package/src/generated/model/updateUser409Details.ts +12 -0
  673. package/src/generated/model/updateUserBody.ts +53 -0
  674. package/src/generated/model/updateUserBodyAttributes.ts +13 -0
  675. package/src/generated/model/updateUserDefault.ts +117 -0
  676. package/src/generated/model/verifyAuthAttemptChallenge200.ts +76 -0
  677. package/src/generated/model/verifyAuthAttemptChallenge200ChallengesItem.ts +49 -0
  678. package/src/generated/model/verifyAuthAttemptChallenge200ChallengesItemMethod.ts +20 -0
  679. package/src/generated/model/verifyAuthAttemptChallenge200ChallengesItemPayload.ts +34 -0
  680. package/src/generated/model/verifyAuthAttemptChallenge200ChallengesItemState.ts +22 -0
  681. package/src/generated/model/verifyAuthAttemptChallenge200CompletedFactorsItem.ts +28 -0
  682. package/src/generated/model/verifyAuthAttemptChallenge200CompletedFactorsItemMethod.ts +20 -0
  683. package/src/generated/model/verifyAuthAttemptChallenge200CompletedFactorsItemPayload.ts +37 -0
  684. package/src/generated/model/verifyAuthAttemptChallenge200RequiredFactorsItem.ts +20 -0
  685. package/src/generated/model/verifyAuthAttemptChallenge200State.ts +24 -0
  686. package/src/generated/model/verifyAuthAttemptChallenge409.ts +20 -0
  687. package/src/generated/model/verifyAuthAttemptChallenge409Details.ts +12 -0
  688. package/src/generated/model/verifyAuthAttemptChallenge429.ts +23 -0
  689. package/src/generated/model/verifyAuthAttemptChallengeBody.ts +27 -0
  690. package/src/generated/model/verifyAuthAttemptChallengeDefault.ts +189 -0
  691. package/src/generated/operations.ts +195 -106
  692. package/src/generated/paging.ts +17 -7
  693. package/src/runtime/api-factory.spec.ts +3 -3
  694. package/src/runtime/api-factory.ts +1 -1
  695. package/src/runtime/base-url.spec.ts +5 -5
  696. package/dist/api-factory-Durul-IL.d.mts +0 -222
  697. package/dist/api-factory-Durul-IL.d.mts.map +0 -1
  698. package/dist/api-factory-DwzqkuTV.mjs +0 -367
  699. package/dist/api-factory-DwzqkuTV.mjs.map +0 -1
  700. package/dist/fetch-BzLvdm6C.d.mts +0 -136
  701. package/dist/fetch-BzLvdm6C.d.mts.map +0 -1
  702. package/dist/generated/endpoints/zitadelNextGen.mjs.map +0 -1
  703. package/dist/index-D0r_rLRr.d.mts +0 -60777
  704. package/dist/index-D0r_rLRr.d.mts.map +0 -1
  705. package/dist/rolldown-runtime-D7D4PA-g.mjs +0 -13
  706. package/dist/zitadelNextGen-DgKtevtj.d.mts +0 -1940
  707. package/dist/zitadelNextGen-DgKtevtj.d.mts.map +0 -1
  708. package/src/generated/model/acceptInvitation429.ts +0 -20
  709. package/src/generated/model/acceptInvitation429Details.ts +0 -12
  710. package/src/generated/model/addOrigin201.ts +0 -18
  711. package/src/generated/model/addOrigin201Kind.ts +0 -18
  712. package/src/generated/model/addOriginBody.ts +0 -35
  713. package/src/generated/model/addOriginBodyKind.ts +0 -19
  714. package/src/generated/model/addOriginDefault.ts +0 -135
  715. package/src/generated/model/beginUserPasskeyRegistration201.ts +0 -25
  716. package/src/generated/model/beginUserPasskeyRegistration201Options.ts +0 -13
  717. package/src/generated/model/beginUserPasskeyRegistration400.ts +0 -20
  718. package/src/generated/model/beginUserPasskeyRegistration400Details.ts +0 -12
  719. package/src/generated/model/beginUserPasskeyRegistration401.ts +0 -20
  720. package/src/generated/model/beginUserPasskeyRegistration401Details.ts +0 -12
  721. package/src/generated/model/beginUserPasskeyRegistration403.ts +0 -20
  722. package/src/generated/model/beginUserPasskeyRegistration403Details.ts +0 -12
  723. package/src/generated/model/beginUserPasskeyRegistration404.ts +0 -20
  724. package/src/generated/model/beginUserPasskeyRegistration404Details.ts +0 -12
  725. package/src/generated/model/beginUserPasskeyRegistration500.ts +0 -20
  726. package/src/generated/model/beginUserPasskeyRegistration500Details.ts +0 -12
  727. package/src/generated/model/beginUserPasskeyRegistrationBody.ts +0 -33
  728. package/src/generated/model/beginUserPasskeyRegistrationDefault.ts +0 -126
  729. package/src/generated/model/buildReleaseBodyBundleFlowDefinitionsItemStatus.ts +0 -23
  730. package/src/generated/model/completeClaim200.ts +0 -19
  731. package/src/generated/model/completeClaim400.ts +0 -20
  732. package/src/generated/model/completeClaim400Details.ts +0 -12
  733. package/src/generated/model/completeClaim401.ts +0 -23
  734. package/src/generated/model/completeClaim403.ts +0 -36
  735. package/src/generated/model/completeClaim404.ts +0 -20
  736. package/src/generated/model/completeClaim404Details.ts +0 -12
  737. package/src/generated/model/completeClaim409.ts +0 -25
  738. package/src/generated/model/completeClaim409Details.ts +0 -14
  739. package/src/generated/model/completeClaim410.ts +0 -27
  740. package/src/generated/model/completeClaim429.ts +0 -20
  741. package/src/generated/model/completeClaim429Details.ts +0 -12
  742. package/src/generated/model/completeClaimBody.ts +0 -18
  743. package/src/generated/model/completeClaimDefault.ts +0 -144
  744. package/src/generated/model/createApplication200.ts +0 -137
  745. package/src/generated/model/createApplication200ClientSecretsItem.ts +0 -19
  746. package/src/generated/model/createApplication201.ts +0 -137
  747. package/src/generated/model/createApplication201ClientSecretsItem.ts +0 -19
  748. package/src/generated/model/createApplication400.ts +0 -20
  749. package/src/generated/model/createApplication400Details.ts +0 -12
  750. package/src/generated/model/createApplication401.ts +0 -20
  751. package/src/generated/model/createApplication401Details.ts +0 -12
  752. package/src/generated/model/createApplication403.ts +0 -20
  753. package/src/generated/model/createApplication403Details.ts +0 -12
  754. package/src/generated/model/createApplication404.ts +0 -20
  755. package/src/generated/model/createApplication404Details.ts +0 -12
  756. package/src/generated/model/createApplication409.ts +0 -20
  757. package/src/generated/model/createApplication409Details.ts +0 -12
  758. package/src/generated/model/createApplicationBody.ts +0 -20
  759. package/src/generated/model/createApplicationBodyApplication.ts +0 -35
  760. package/src/generated/model/createApplicationBodyApplicationClientsItem.ts +0 -84
  761. package/src/generated/model/createApplicationBodyApplicationClientsItemGrantTypesItem.ts +0 -15
  762. package/src/generated/model/createApplicationBodyApplicationClientsItemType.ts +0 -19
  763. package/src/generated/model/createApplicationDefault.ts +0 -54
  764. package/src/generated/model/createApplicationParams.ts +0 -17
  765. package/src/generated/model/createBranding201.ts +0 -32
  766. package/src/generated/model/createBranding201Branding.ts +0 -80
  767. package/src/generated/model/createBranding201BrandingLayout.ts +0 -27
  768. package/src/generated/model/createBranding201BrandingShape.ts +0 -30
  769. package/src/generated/model/createBranding201BrandingShapeDensity.ts +0 -19
  770. package/src/generated/model/createBranding201BrandingTheme.ts +0 -41
  771. package/src/generated/model/createBranding201BrandingThemeDark.ts +0 -34
  772. package/src/generated/model/createBranding201BrandingThemeDarkPalette.ts +0 -210
  773. package/src/generated/model/createBranding201BrandingThemeLight.ts +0 -34
  774. package/src/generated/model/createBranding201BrandingThemeLightPalette.ts +0 -210
  775. package/src/generated/model/createBranding201BrandingThemeMode.ts +0 -19
  776. package/src/generated/model/createBranding201BrandingTypography.ts +0 -47
  777. package/src/generated/model/createBranding400.ts +0 -20
  778. package/src/generated/model/createBranding400Details.ts +0 -12
  779. package/src/generated/model/createBrandingBody.ts +0 -80
  780. package/src/generated/model/createBrandingBodyLayout.ts +0 -27
  781. package/src/generated/model/createBrandingBodyShape.ts +0 -30
  782. package/src/generated/model/createBrandingBodyShapeDensity.ts +0 -19
  783. package/src/generated/model/createBrandingBodyTheme.ts +0 -41
  784. package/src/generated/model/createBrandingBodyThemeDark.ts +0 -34
  785. package/src/generated/model/createBrandingBodyThemeDarkPalette.ts +0 -210
  786. package/src/generated/model/createBrandingBodyThemeLight.ts +0 -34
  787. package/src/generated/model/createBrandingBodyThemeLightPalette.ts +0 -210
  788. package/src/generated/model/createBrandingBodyThemeMode.ts +0 -19
  789. package/src/generated/model/createBrandingBodyTypography.ts +0 -47
  790. package/src/generated/model/createBrandingDefault.ts +0 -99
  791. package/src/generated/model/createBrandingParams.ts +0 -17
  792. package/src/generated/model/createFlowDefinition201.ts +0 -48
  793. package/src/generated/model/createFlowDefinition201FlowDefinition.ts +0 -95
  794. package/src/generated/model/createFlowDefinition201FlowDefinitionAudience.ts +0 -20
  795. package/src/generated/model/createFlowDefinition201FlowDefinitionStatus.ts +0 -23
  796. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItem.ts +0 -109
  797. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemActionsItem.ts +0 -49
  798. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemActionsItemKind.ts +0 -29
  799. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemComplete.ts +0 -20
  800. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemGates.ts +0 -36
  801. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemGatesConfig.ts +0 -13
  802. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemGatesKind.ts +0 -20
  803. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemOnSuccess.ts +0 -25
  804. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemTransitions.ts +0 -68
  805. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemTransitionsAction.ts +0 -28
  806. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemTransitionsPurpose.ts +0 -29
  807. package/src/generated/model/createFlowDefinition201UserSchema.ts +0 -26
  808. package/src/generated/model/createFlowDefinition201UserSchemaMetadata.ts +0 -18
  809. package/src/generated/model/createFlowDefinition201UserSchemaSchema.ts +0 -84
  810. package/src/generated/model/createFlowDefinition400.ts +0 -20
  811. package/src/generated/model/createFlowDefinition400Details.ts +0 -12
  812. package/src/generated/model/createFlowDefinitionBody.ts +0 -45
  813. package/src/generated/model/createFlowDefinitionBodyFlowDefinition.ts +0 -95
  814. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionAudience.ts +0 -20
  815. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStatus.ts +0 -23
  816. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItem.ts +0 -109
  817. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemActionsItem.ts +0 -49
  818. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemActionsItemKind.ts +0 -29
  819. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemComplete.ts +0 -20
  820. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemGates.ts +0 -36
  821. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemGatesConfig.ts +0 -13
  822. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemGatesKind.ts +0 -20
  823. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemOnSuccess.ts +0 -25
  824. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemTransitions.ts +0 -68
  825. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemTransitionsAction.ts +0 -28
  826. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemTransitionsPurpose.ts +0 -29
  827. package/src/generated/model/createFlowDefinitionDefault.ts +0 -117
  828. package/src/generated/model/createHandoff200.ts +0 -30
  829. package/src/generated/model/createHandoff409.ts +0 -20
  830. package/src/generated/model/createHandoff409Details.ts +0 -12
  831. package/src/generated/model/createHandoffDefault.ts +0 -99
  832. package/src/generated/model/createIdp200.ts +0 -39
  833. package/src/generated/model/createIdp200Definition.ts +0 -44
  834. package/src/generated/model/createIdp200DefinitionClaimMapping.ts +0 -12
  835. package/src/generated/model/createIdp200DefinitionOidc.ts +0 -65
  836. package/src/generated/model/createIdp200DefinitionOidcStaticAuthorizeParameters.ts +0 -12
  837. package/src/generated/model/createIdp200DefinitionOidcTokenEndpointAuthMethod.ts +0 -18
  838. package/src/generated/model/createIdp200DefinitionProtocol.ts +0 -17
  839. package/src/generated/model/createIdp200DefinitionProvisioning.ts +0 -15
  840. package/src/generated/model/createIdp200DefinitionProvisioningCreation.ts +0 -15
  841. package/src/generated/model/createIdp200DefinitionVerifiedClaims.ts +0 -12
  842. package/src/generated/model/createIdp201.ts +0 -39
  843. package/src/generated/model/createIdp201Definition.ts +0 -44
  844. package/src/generated/model/createIdp201DefinitionClaimMapping.ts +0 -12
  845. package/src/generated/model/createIdp201DefinitionOidc.ts +0 -65
  846. package/src/generated/model/createIdp201DefinitionOidcStaticAuthorizeParameters.ts +0 -12
  847. package/src/generated/model/createIdp201DefinitionOidcTokenEndpointAuthMethod.ts +0 -18
  848. package/src/generated/model/createIdp201DefinitionProtocol.ts +0 -17
  849. package/src/generated/model/createIdp201DefinitionProvisioning.ts +0 -15
  850. package/src/generated/model/createIdp201DefinitionProvisioningCreation.ts +0 -15
  851. package/src/generated/model/createIdp201DefinitionVerifiedClaims.ts +0 -12
  852. package/src/generated/model/createIdp400.ts +0 -20
  853. package/src/generated/model/createIdp400Details.ts +0 -12
  854. package/src/generated/model/createIdp401.ts +0 -20
  855. package/src/generated/model/createIdp401Details.ts +0 -12
  856. package/src/generated/model/createIdp403.ts +0 -20
  857. package/src/generated/model/createIdp403Details.ts +0 -12
  858. package/src/generated/model/createIdp404.ts +0 -20
  859. package/src/generated/model/createIdp404Details.ts +0 -12
  860. package/src/generated/model/createIdpBody.ts +0 -15
  861. package/src/generated/model/createIdpBodyIdp.ts +0 -44
  862. package/src/generated/model/createIdpBodyIdpClaimMapping.ts +0 -12
  863. package/src/generated/model/createIdpBodyIdpOidc.ts +0 -65
  864. package/src/generated/model/createIdpBodyIdpOidcStaticAuthorizeParameters.ts +0 -12
  865. package/src/generated/model/createIdpBodyIdpOidcTokenEndpointAuthMethod.ts +0 -18
  866. package/src/generated/model/createIdpBodyIdpProtocol.ts +0 -17
  867. package/src/generated/model/createIdpBodyIdpProvisioning.ts +0 -15
  868. package/src/generated/model/createIdpBodyIdpProvisioningCreation.ts +0 -15
  869. package/src/generated/model/createIdpBodyIdpVerifiedClaims.ts +0 -12
  870. package/src/generated/model/createIdpDefault.ts +0 -108
  871. package/src/generated/model/createIdpParams.ts +0 -17
  872. package/src/generated/model/createSchema201.ts +0 -12
  873. package/src/generated/model/createSchemaBody.ts +0 -86
  874. package/src/generated/model/createSchemaDefault.ts +0 -153
  875. package/src/generated/model/createSchemaParams.ts +0 -22
  876. package/src/generated/model/deleteTeam400.ts +0 -20
  877. package/src/generated/model/deleteTeam400Details.ts +0 -12
  878. package/src/generated/model/deleteTeam401.ts +0 -20
  879. package/src/generated/model/deleteTeam401Details.ts +0 -12
  880. package/src/generated/model/deleteTeam403.ts +0 -20
  881. package/src/generated/model/deleteTeam403Details.ts +0 -12
  882. package/src/generated/model/deleteTeam409.ts +0 -20
  883. package/src/generated/model/deleteTeam409Details.ts +0 -12
  884. package/src/generated/model/deleteTeamDefault.ts +0 -90
  885. package/src/generated/model/deleteUserByID401.ts +0 -20
  886. package/src/generated/model/deleteUserByID401Details.ts +0 -12
  887. package/src/generated/model/deleteUserByID404.ts +0 -20
  888. package/src/generated/model/deleteUserByID404Details.ts +0 -12
  889. package/src/generated/model/deleteUserByID409.ts +0 -20
  890. package/src/generated/model/deleteUserByID409Details.ts +0 -12
  891. package/src/generated/model/deleteUserByIDDefault.ts +0 -99
  892. package/src/generated/model/finishUserPasskeyRegistration201.ts +0 -19
  893. package/src/generated/model/finishUserPasskeyRegistration400.ts +0 -20
  894. package/src/generated/model/finishUserPasskeyRegistration400Details.ts +0 -12
  895. package/src/generated/model/finishUserPasskeyRegistration401.ts +0 -20
  896. package/src/generated/model/finishUserPasskeyRegistration401Details.ts +0 -12
  897. package/src/generated/model/finishUserPasskeyRegistration403.ts +0 -20
  898. package/src/generated/model/finishUserPasskeyRegistration403Details.ts +0 -12
  899. package/src/generated/model/finishUserPasskeyRegistration404.ts +0 -20
  900. package/src/generated/model/finishUserPasskeyRegistration404Details.ts +0 -12
  901. package/src/generated/model/finishUserPasskeyRegistration500.ts +0 -20
  902. package/src/generated/model/finishUserPasskeyRegistration500Details.ts +0 -12
  903. package/src/generated/model/finishUserPasskeyRegistrationBody.ts +0 -21
  904. package/src/generated/model/finishUserPasskeyRegistrationBodyAttestation.ts +0 -12
  905. package/src/generated/model/finishUserPasskeyRegistrationDefault.ts +0 -180
  906. package/src/generated/model/getApplicationById200.ts +0 -43
  907. package/src/generated/model/getApplicationById200Definition.ts +0 -35
  908. package/src/generated/model/getApplicationById200DefinitionClientsItem.ts +0 -84
  909. package/src/generated/model/getApplicationById200DefinitionClientsItemGrantTypesItem.ts +0 -15
  910. package/src/generated/model/getApplicationById200DefinitionClientsItemType.ts +0 -19
  911. package/src/generated/model/getApplicationById401.ts +0 -20
  912. package/src/generated/model/getApplicationById401Details.ts +0 -12
  913. package/src/generated/model/getApplicationById403.ts +0 -20
  914. package/src/generated/model/getApplicationById403Details.ts +0 -12
  915. package/src/generated/model/getApplicationById404.ts +0 -20
  916. package/src/generated/model/getApplicationById404Details.ts +0 -12
  917. package/src/generated/model/getApplicationByIdDefault.ts +0 -54
  918. package/src/generated/model/getApplicationByIdParams.ts +0 -17
  919. package/src/generated/model/getBrandingById200.ts +0 -32
  920. package/src/generated/model/getBrandingById200Branding.ts +0 -80
  921. package/src/generated/model/getBrandingById200BrandingLayout.ts +0 -27
  922. package/src/generated/model/getBrandingById200BrandingShape.ts +0 -30
  923. package/src/generated/model/getBrandingById200BrandingShapeDensity.ts +0 -19
  924. package/src/generated/model/getBrandingById200BrandingTheme.ts +0 -41
  925. package/src/generated/model/getBrandingById200BrandingThemeDark.ts +0 -34
  926. package/src/generated/model/getBrandingById200BrandingThemeDarkPalette.ts +0 -210
  927. package/src/generated/model/getBrandingById200BrandingThemeLight.ts +0 -34
  928. package/src/generated/model/getBrandingById200BrandingThemeLightPalette.ts +0 -210
  929. package/src/generated/model/getBrandingById200BrandingThemeMode.ts +0 -19
  930. package/src/generated/model/getBrandingById200BrandingTypography.ts +0 -47
  931. package/src/generated/model/getBrandingById404.ts +0 -20
  932. package/src/generated/model/getBrandingById404Details.ts +0 -12
  933. package/src/generated/model/getBrandingByIdDefault.ts +0 -72
  934. package/src/generated/model/getClaimStatus200.ts +0 -27
  935. package/src/generated/model/getClaimStatus401.ts +0 -20
  936. package/src/generated/model/getClaimStatus401Details.ts +0 -12
  937. package/src/generated/model/getClaimStatus403.ts +0 -23
  938. package/src/generated/model/getClaimStatus404.ts +0 -20
  939. package/src/generated/model/getClaimStatus404Details.ts +0 -12
  940. package/src/generated/model/getClaimStatus410.ts +0 -27
  941. package/src/generated/model/getClaimStatus429.ts +0 -20
  942. package/src/generated/model/getClaimStatus429Details.ts +0 -12
  943. package/src/generated/model/getClaimStatusDefault.ts +0 -99
  944. package/src/generated/model/getClaimStatusParams.ts +0 -15
  945. package/src/generated/model/getClaimWindow200.ts +0 -23
  946. package/src/generated/model/getClaimWindow404.ts +0 -20
  947. package/src/generated/model/getClaimWindow404Details.ts +0 -12
  948. package/src/generated/model/getClaimWindow429.ts +0 -20
  949. package/src/generated/model/getClaimWindow429Details.ts +0 -12
  950. package/src/generated/model/getClaimWindowDefault.ts +0 -36
  951. package/src/generated/model/getClaimWindowParams.ts +0 -15
  952. package/src/generated/model/getDeploymentById200.ts +0 -78
  953. package/src/generated/model/getDeploymentById200Kind.ts +0 -18
  954. package/src/generated/model/getDeploymentById200Metadata.ts +0 -35
  955. package/src/generated/model/getDeploymentById200MetadataDeployedByType.ts +0 -20
  956. package/src/generated/model/getDeploymentById200MetadataReason.ts +0 -20
  957. package/src/generated/model/getDeploymentById200Release.ts +0 -96
  958. package/src/generated/model/getDeploymentById200ReleaseMetadata.ts +0 -43
  959. package/src/generated/model/getDeploymentById200ReleaseMetadataCreatedByType.ts +0 -20
  960. package/src/generated/model/getDeploymentById200ReleasePointersItem.ts +0 -61
  961. package/src/generated/model/getDeploymentById200ReleasePointersItemKind.ts +0 -28
  962. package/src/generated/model/getDeploymentById200Status.ts +0 -23
  963. package/src/generated/model/getDeploymentById200TargetsItem.ts +0 -28
  964. package/src/generated/model/getDeploymentByIdDefault.ts +0 -72
  965. package/src/generated/model/getDeploymentByIdParams.ts +0 -17
  966. package/src/generated/model/getDeploymentVariables200.ts +0 -17
  967. package/src/generated/model/getDeploymentVariablesDefault.ts +0 -90
  968. package/src/generated/model/getDeploymentVariablesParams.ts +0 -17
  969. package/src/generated/model/getFlowDefinition200FlowDefinitionStatus.ts +0 -23
  970. package/src/generated/model/getIdpById200.ts +0 -39
  971. package/src/generated/model/getIdpById200Definition.ts +0 -44
  972. package/src/generated/model/getIdpById200DefinitionClaimMapping.ts +0 -12
  973. package/src/generated/model/getIdpById200DefinitionOidc.ts +0 -65
  974. package/src/generated/model/getIdpById200DefinitionOidcStaticAuthorizeParameters.ts +0 -12
  975. package/src/generated/model/getIdpById200DefinitionOidcTokenEndpointAuthMethod.ts +0 -18
  976. package/src/generated/model/getIdpById200DefinitionProtocol.ts +0 -17
  977. package/src/generated/model/getIdpById200DefinitionProvisioning.ts +0 -15
  978. package/src/generated/model/getIdpById200DefinitionProvisioningCreation.ts +0 -15
  979. package/src/generated/model/getIdpById200DefinitionVerifiedClaims.ts +0 -12
  980. package/src/generated/model/getIdpById401.ts +0 -20
  981. package/src/generated/model/getIdpById401Details.ts +0 -12
  982. package/src/generated/model/getIdpById403.ts +0 -20
  983. package/src/generated/model/getIdpById403Details.ts +0 -12
  984. package/src/generated/model/getIdpById404.ts +0 -20
  985. package/src/generated/model/getIdpById404Details.ts +0 -12
  986. package/src/generated/model/getIdpByIdDefault.ts +0 -72
  987. package/src/generated/model/getIdpByIdParams.ts +0 -17
  988. package/src/generated/model/getIdpRevisionById200.ts +0 -39
  989. package/src/generated/model/getIdpRevisionById200Definition.ts +0 -44
  990. package/src/generated/model/getIdpRevisionById200DefinitionClaimMapping.ts +0 -12
  991. package/src/generated/model/getIdpRevisionById200DefinitionOidc.ts +0 -65
  992. package/src/generated/model/getIdpRevisionById200DefinitionOidcStaticAuthorizeParameters.ts +0 -12
  993. package/src/generated/model/getIdpRevisionById200DefinitionOidcTokenEndpointAuthMethod.ts +0 -18
  994. package/src/generated/model/getIdpRevisionById200DefinitionProtocol.ts +0 -17
  995. package/src/generated/model/getIdpRevisionById200DefinitionProvisioning.ts +0 -15
  996. package/src/generated/model/getIdpRevisionById200DefinitionProvisioningCreation.ts +0 -15
  997. package/src/generated/model/getIdpRevisionById200DefinitionVerifiedClaims.ts +0 -12
  998. package/src/generated/model/getIdpRevisionById401.ts +0 -20
  999. package/src/generated/model/getIdpRevisionById401Details.ts +0 -12
  1000. package/src/generated/model/getIdpRevisionById403.ts +0 -20
  1001. package/src/generated/model/getIdpRevisionById403Details.ts +0 -12
  1002. package/src/generated/model/getIdpRevisionById404.ts +0 -20
  1003. package/src/generated/model/getIdpRevisionById404Details.ts +0 -12
  1004. package/src/generated/model/getIdpRevisionByIdDefault.ts +0 -72
  1005. package/src/generated/model/getIdpRevisionByIdParams.ts +0 -17
  1006. package/src/generated/model/getReleaseById200.ts +0 -96
  1007. package/src/generated/model/getReleaseById200Metadata.ts +0 -43
  1008. package/src/generated/model/getReleaseById200MetadataCreatedByType.ts +0 -20
  1009. package/src/generated/model/getReleaseById200PointersItem.ts +0 -61
  1010. package/src/generated/model/getReleaseById200PointersItemKind.ts +0 -28
  1011. package/src/generated/model/getReleaseByIdDefault.ts +0 -72
  1012. package/src/generated/model/getReleaseByIdParams.ts +0 -17
  1013. package/src/generated/model/getSchemaById200.ts +0 -31
  1014. package/src/generated/model/getSchemaById200Metadata.ts +0 -18
  1015. package/src/generated/model/getSchemaById200Schema.ts +0 -84
  1016. package/src/generated/model/getSchemaByIdDefault.ts +0 -72
  1017. package/src/generated/model/getSchemaByIdParams.ts +0 -21
  1018. package/src/generated/model/getUserByID200.ts +0 -76
  1019. package/src/generated/model/getUserByID200Attributes.ts +0 -13
  1020. package/src/generated/model/getUserByID200Metadata.ts +0 -44
  1021. package/src/generated/model/getUserByID200MetadataLifecycleOwnerTeam.ts +0 -43
  1022. package/src/generated/model/getUserByID200MetadataLifecycleOwnerTeamStatus.ts +0 -21
  1023. package/src/generated/model/getUserByID200MetadataStatus.ts +0 -20
  1024. package/src/generated/model/getUserByID200TeamsItem.ts +0 -33
  1025. package/src/generated/model/getUserByID200TeamsItemMembershipStatus.ts +0 -20
  1026. package/src/generated/model/getUserByID401.ts +0 -20
  1027. package/src/generated/model/getUserByID401Details.ts +0 -12
  1028. package/src/generated/model/getUserByID404.ts +0 -20
  1029. package/src/generated/model/getUserByID404Details.ts +0 -12
  1030. package/src/generated/model/getUserByIDDefault.ts +0 -72
  1031. package/src/generated/model/getUserByIDParams.ts +0 -31
  1032. package/src/generated/model/getVariables200.ts +0 -35
  1033. package/src/generated/model/getVariables200Preview.ts +0 -20
  1034. package/src/generated/model/getVariables200Primary.ts +0 -20
  1035. package/src/generated/model/getVariablesDefault.ts +0 -72
  1036. package/src/generated/model/getVariablesKind.ts +0 -15
  1037. package/src/generated/model/getVariablesParams.ts +0 -23
  1038. package/src/generated/model/initClaim201.ts +0 -25
  1039. package/src/generated/model/initClaim401.ts +0 -20
  1040. package/src/generated/model/initClaim401Details.ts +0 -12
  1041. package/src/generated/model/initClaim404.ts +0 -23
  1042. package/src/generated/model/initClaim409.ts +0 -25
  1043. package/src/generated/model/initClaim409Details.ts +0 -14
  1044. package/src/generated/model/initClaim410.ts +0 -23
  1045. package/src/generated/model/initClaimDefault.ts +0 -99
  1046. package/src/generated/model/issueChallenge201.ts +0 -49
  1047. package/src/generated/model/issueChallenge201Method.ts +0 -20
  1048. package/src/generated/model/issueChallenge201Payload.ts +0 -34
  1049. package/src/generated/model/issueChallenge201State.ts +0 -22
  1050. package/src/generated/model/issueChallengeBody.ts +0 -28
  1051. package/src/generated/model/issueChallengeBodyMethod.ts +0 -20
  1052. package/src/generated/model/issueChallengeBodyPasskeyOptions.ts +0 -19
  1053. package/src/generated/model/issueChallengeBodyPasskeyOptionsUserVerification.ts +0 -16
  1054. package/src/generated/model/issueChallengeDefault.ts +0 -90
  1055. package/src/generated/model/listBranding200Item.ts +0 -14
  1056. package/src/generated/model/listEvents200DataItem.ts +0 -4366
  1057. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStatus.ts +0 -23
  1058. package/src/generated/model/listInvitationsStatus.ts +0 -17
  1059. package/src/generated/model/listPreviews200.ts +0 -20
  1060. package/src/generated/model/listPreviews200PreviewsItem.ts +0 -37
  1061. package/src/generated/model/listPreviewsDefault.ts +0 -72
  1062. package/src/generated/model/listPreviewsParams.ts +0 -23
  1063. package/src/generated/model/lookupInvitation429.ts +0 -20
  1064. package/src/generated/model/lookupInvitation429Details.ts +0 -12
  1065. package/src/generated/model/patchMyUser200.ts +0 -76
  1066. package/src/generated/model/patchMyUser200Attributes.ts +0 -13
  1067. package/src/generated/model/patchMyUser200Metadata.ts +0 -44
  1068. package/src/generated/model/patchMyUser200MetadataLifecycleOwnerTeam.ts +0 -43
  1069. package/src/generated/model/patchMyUser200MetadataLifecycleOwnerTeamStatus.ts +0 -21
  1070. package/src/generated/model/patchMyUser200MetadataStatus.ts +0 -20
  1071. package/src/generated/model/patchMyUser200TeamsItem.ts +0 -33
  1072. package/src/generated/model/patchMyUser200TeamsItemMembershipStatus.ts +0 -20
  1073. package/src/generated/model/patchMyUser400.ts +0 -20
  1074. package/src/generated/model/patchMyUser400Details.ts +0 -12
  1075. package/src/generated/model/patchMyUser401.ts +0 -20
  1076. package/src/generated/model/patchMyUser401Details.ts +0 -12
  1077. package/src/generated/model/patchMyUser403.ts +0 -20
  1078. package/src/generated/model/patchMyUser403Details.ts +0 -12
  1079. package/src/generated/model/patchMyUser404.ts +0 -23
  1080. package/src/generated/model/patchMyUser409.ts +0 -20
  1081. package/src/generated/model/patchMyUser409Details.ts +0 -12
  1082. package/src/generated/model/patchMyUserBody.ts +0 -25
  1083. package/src/generated/model/patchMyUserBodyAttributes.ts +0 -13
  1084. package/src/generated/model/patchMyUserDefault.ts +0 -117
  1085. package/src/generated/model/patchMyUserParams.ts +0 -26
  1086. package/src/generated/model/patchProject200.ts +0 -96
  1087. package/src/generated/model/patchProject400.ts +0 -20
  1088. package/src/generated/model/patchProject400Details.ts +0 -12
  1089. package/src/generated/model/patchProject401.ts +0 -20
  1090. package/src/generated/model/patchProject401Details.ts +0 -12
  1091. package/src/generated/model/patchProject404.ts +0 -20
  1092. package/src/generated/model/patchProject404Details.ts +0 -12
  1093. package/src/generated/model/patchProjectBody.ts +0 -19
  1094. package/src/generated/model/patchProjectBodyPasswordHash.ts +0 -40
  1095. package/src/generated/model/patchProjectBodyPasswordHashAlgorithm.ts +0 -24
  1096. package/src/generated/model/patchProjectBodyPasswordHashParams.ts +0 -44
  1097. package/src/generated/model/patchProjectBodyPasswordHashParamsHash.ts +0 -24
  1098. package/src/generated/model/patchProjectDefault.ts +0 -117
  1099. package/src/generated/model/patchUserByID200.ts +0 -76
  1100. package/src/generated/model/patchUserByID200Attributes.ts +0 -13
  1101. package/src/generated/model/patchUserByID200Metadata.ts +0 -44
  1102. package/src/generated/model/patchUserByID200MetadataLifecycleOwnerTeam.ts +0 -43
  1103. package/src/generated/model/patchUserByID200MetadataLifecycleOwnerTeamStatus.ts +0 -21
  1104. package/src/generated/model/patchUserByID200MetadataStatus.ts +0 -20
  1105. package/src/generated/model/patchUserByID200TeamsItem.ts +0 -33
  1106. package/src/generated/model/patchUserByID200TeamsItemMembershipStatus.ts +0 -20
  1107. package/src/generated/model/patchUserByID400.ts +0 -20
  1108. package/src/generated/model/patchUserByID400Details.ts +0 -12
  1109. package/src/generated/model/patchUserByID401.ts +0 -20
  1110. package/src/generated/model/patchUserByID401Details.ts +0 -12
  1111. package/src/generated/model/patchUserByID403.ts +0 -20
  1112. package/src/generated/model/patchUserByID403Details.ts +0 -12
  1113. package/src/generated/model/patchUserByID404.ts +0 -20
  1114. package/src/generated/model/patchUserByID404Details.ts +0 -12
  1115. package/src/generated/model/patchUserByID409.ts +0 -20
  1116. package/src/generated/model/patchUserByID409Details.ts +0 -12
  1117. package/src/generated/model/patchUserByIDBody.ts +0 -53
  1118. package/src/generated/model/patchUserByIDBodyAttributes.ts +0 -13
  1119. package/src/generated/model/patchUserByIDDefault.ts +0 -117
  1120. package/src/generated/model/rejectInvitation429.ts +0 -20
  1121. package/src/generated/model/rejectInvitation429Details.ts +0 -12
  1122. package/src/generated/model/removeOriginBody.ts +0 -15
  1123. package/src/generated/model/removeOriginDefault.ts +0 -108
  1124. package/src/generated/model/removePreviewBody.ts +0 -23
  1125. package/src/generated/model/removePreviewDefault.ts +0 -90
  1126. package/src/generated/model/submitFlowStep400Branding.ts +0 -80
  1127. package/src/generated/model/submitFlowStep400BrandingLayout.ts +0 -27
  1128. package/src/generated/model/submitFlowStep400BrandingShape.ts +0 -30
  1129. package/src/generated/model/submitFlowStep400BrandingShapeDensity.ts +0 -19
  1130. package/src/generated/model/submitFlowStep400BrandingTheme.ts +0 -41
  1131. package/src/generated/model/submitFlowStep400BrandingThemeDark.ts +0 -34
  1132. package/src/generated/model/submitFlowStep400BrandingThemeDarkPalette.ts +0 -210
  1133. package/src/generated/model/submitFlowStep400BrandingThemeLight.ts +0 -34
  1134. package/src/generated/model/submitFlowStep400BrandingThemeLightPalette.ts +0 -210
  1135. package/src/generated/model/submitFlowStep400BrandingThemeMode.ts +0 -19
  1136. package/src/generated/model/submitFlowStep400BrandingTypography.ts +0 -47
  1137. package/src/generated/model/submitFlowStep400Step.ts +0 -142
  1138. package/src/generated/model/submitFlowStep400StepActionsItem.ts +0 -41
  1139. package/src/generated/model/submitFlowStep400StepActionsItemKind.ts +0 -27
  1140. package/src/generated/model/submitFlowStep400StepChallenge.ts +0 -36
  1141. package/src/generated/model/submitFlowStep400StepChallengeMethod.ts +0 -18
  1142. package/src/generated/model/submitFlowStep400StepChallengeOptions.ts +0 -15
  1143. package/src/generated/model/submitFlowStep400StepComplete.ts +0 -20
  1144. package/src/generated/model/submitFlowStep400StepFieldsItem.ts +0 -87
  1145. package/src/generated/model/submitFlowStep400StepFieldsItemType.ts +0 -34
  1146. package/src/generated/model/submitFlowStep400StepFieldsItemValidation.ts +0 -46
  1147. package/src/generated/model/submitFlowStep400StepFieldsItemValidationFormat.ts +0 -24
  1148. package/src/generated/model/submitFlowStep400StepGates.ts +0 -36
  1149. package/src/generated/model/submitFlowStep400StepGatesConfig.ts +0 -13
  1150. package/src/generated/model/submitFlowStep400StepGatesKind.ts +0 -20
  1151. package/src/generated/model/submitFlowStep400StepIdentifier.ts +0 -58
  1152. package/src/generated/model/submitFlowStep400StepPurpose.ts +0 -26
  1153. package/src/generated/model/submitFlowStep400StepSsoProvidersItem.ts +0 -19
  1154. package/src/generated/model/submitFlowStep400StepTexts.ts +0 -23
  1155. package/src/generated/model/updateVariables200.ts +0 -35
  1156. package/src/generated/model/updateVariables200Preview.ts +0 -20
  1157. package/src/generated/model/updateVariables200Primary.ts +0 -20
  1158. package/src/generated/model/updateVariablesBody.ts +0 -48
  1159. package/src/generated/model/updateVariablesDefault.ts +0 -162
  1160. package/src/generated/model/updateVariablesKind.ts +0 -15
  1161. package/src/generated/model/updateVariablesParams.ts +0 -23
  1162. package/src/generated/model/verifyChallengeProof200.ts +0 -76
  1163. package/src/generated/model/verifyChallengeProof200ChallengesItem.ts +0 -49
  1164. package/src/generated/model/verifyChallengeProof200ChallengesItemMethod.ts +0 -20
  1165. package/src/generated/model/verifyChallengeProof200ChallengesItemPayload.ts +0 -34
  1166. package/src/generated/model/verifyChallengeProof200ChallengesItemState.ts +0 -22
  1167. package/src/generated/model/verifyChallengeProof200CompletedFactorsItem.ts +0 -28
  1168. package/src/generated/model/verifyChallengeProof200CompletedFactorsItemMethod.ts +0 -20
  1169. package/src/generated/model/verifyChallengeProof200CompletedFactorsItemPayload.ts +0 -37
  1170. package/src/generated/model/verifyChallengeProof200RequiredFactorsItem.ts +0 -20
  1171. package/src/generated/model/verifyChallengeProof200State.ts +0 -24
  1172. package/src/generated/model/verifyChallengeProof409.ts +0 -20
  1173. package/src/generated/model/verifyChallengeProof409Details.ts +0 -12
  1174. package/src/generated/model/verifyChallengeProofBody.ts +0 -27
  1175. package/src/generated/model/verifyChallengeProofDefault.ts +0 -180
@@ -0,0 +1,3509 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-D8jQpDG7.mjs";
2
+ import { getApiBaseUrl } from "./runtime/base-url.mjs";
3
+ import { customFetch } from "./runtime/fetch.mjs";
4
+ // src/generated/endpoints/zitadelNextGen.ts
5
+ /**
6
+ * Generated by orval 🍺
7
+ * Do not edit manually.
8
+ * Zitadel NextGen
9
+ * This is the next generation of the Zitadel identity platform.
10
+ * OpenAPI spec version: 0.0.1
11
+ */
12
+ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
13
+ acceptInvitation: () => acceptInvitation,
14
+ addProjectOrigin: () => addProjectOrigin,
15
+ buildRelease: () => buildRelease,
16
+ cancelInvitation: () => cancelInvitation,
17
+ completeProjectClaim: () => completeProjectClaim,
18
+ completeUserPasskeyRegistration: () => completeUserPasskeyRegistration,
19
+ createAuthAttempt: () => createAuthAttempt,
20
+ createAuthAttemptChallenge: () => createAuthAttemptChallenge,
21
+ createAuthAttemptHandoff: () => createAuthAttemptHandoff,
22
+ createDeployment: () => createDeployment,
23
+ createFlow: () => createFlow,
24
+ createGrant: () => createGrant,
25
+ createInvitation: () => createInvitation,
26
+ createProject: () => createProject,
27
+ createProjectClaim: () => createProjectClaim,
28
+ createRelease: () => createRelease,
29
+ createSession: () => createSession,
30
+ createTeam: () => createTeam,
31
+ createUser: () => createUser,
32
+ createUserPasskeyRegistration: () => createUserPasskeyRegistration,
33
+ deactivateTeam: () => deactivateTeam,
34
+ deleteGrant: () => deleteGrant,
35
+ deleteUser: () => deleteUser,
36
+ deleteVariable: () => deleteVariable,
37
+ evaluatePolicy: () => evaluatePolicy,
38
+ exchangeHandoff: () => exchangeHandoff,
39
+ getAcceptInvitationUrl: () => getAcceptInvitationUrl,
40
+ getAddProjectOriginUrl: () => getAddProjectOriginUrl,
41
+ getApplication: () => getApplication,
42
+ getAuthAttempt: () => getAuthAttempt,
43
+ getBranding: () => getBranding,
44
+ getBuildReleaseUrl: () => getBuildReleaseUrl,
45
+ getCancelInvitationUrl: () => getCancelInvitationUrl,
46
+ getCompleteProjectClaimUrl: () => getCompleteProjectClaimUrl,
47
+ getCompleteUserPasskeyRegistrationUrl: () => getCompleteUserPasskeyRegistrationUrl,
48
+ getCreateAuthAttemptChallengeUrl: () => getCreateAuthAttemptChallengeUrl,
49
+ getCreateAuthAttemptHandoffUrl: () => getCreateAuthAttemptHandoffUrl,
50
+ getCreateAuthAttemptUrl: () => getCreateAuthAttemptUrl,
51
+ getCreateDeploymentUrl: () => getCreateDeploymentUrl,
52
+ getCreateFlowUrl: () => getCreateFlowUrl,
53
+ getCreateGrantUrl: () => getCreateGrantUrl,
54
+ getCreateInvitationUrl: () => getCreateInvitationUrl,
55
+ getCreateProjectClaimUrl: () => getCreateProjectClaimUrl,
56
+ getCreateProjectUrl: () => getCreateProjectUrl,
57
+ getCreateReleaseUrl: () => getCreateReleaseUrl,
58
+ getCreateSessionUrl: () => getCreateSessionUrl,
59
+ getCreateTeamUrl: () => getCreateTeamUrl,
60
+ getCreateUserPasskeyRegistrationUrl: () => getCreateUserPasskeyRegistrationUrl,
61
+ getCreateUserUrl: () => getCreateUserUrl,
62
+ getDeactivateTeamUrl: () => getDeactivateTeamUrl,
63
+ getDeleteGrantUrl: () => getDeleteGrantUrl,
64
+ getDeleteUserUrl: () => getDeleteUserUrl,
65
+ getDeleteVariableUrl: () => getDeleteVariableUrl,
66
+ getDeployment: () => getDeployment,
67
+ getEvaluatePolicyUrl: () => getEvaluatePolicyUrl,
68
+ getEvent: () => getEvent,
69
+ getExchangeHandoffUrl: () => getExchangeHandoffUrl,
70
+ getFlowDefinition: () => getFlowDefinition,
71
+ getFlowStep: () => getFlowStep,
72
+ getGetApplicationUrl: () => getGetApplicationUrl,
73
+ getGetAuthAttemptUrl: () => getGetAuthAttemptUrl,
74
+ getGetBrandingUrl: () => getGetBrandingUrl,
75
+ getGetDeploymentUrl: () => getGetDeploymentUrl,
76
+ getGetEventUrl: () => getGetEventUrl,
77
+ getGetFlowDefinitionUrl: () => getGetFlowDefinitionUrl,
78
+ getGetFlowStepUrl: () => getGetFlowStepUrl,
79
+ getGetGrantUrl: () => getGetGrantUrl,
80
+ getGetIdpRevisionUrl: () => getGetIdpRevisionUrl,
81
+ getGetIdpUrl: () => getGetIdpUrl,
82
+ getGetInvitationUrl: () => getGetInvitationUrl,
83
+ getGetLiveUrl: () => getGetLiveUrl,
84
+ getGetMyPasswordStateUrl: () => getGetMyPasswordStateUrl,
85
+ getGetMySessionCsrfTokenUrl: () => getGetMySessionCsrfTokenUrl,
86
+ getGetMySessionUrl: () => getGetMySessionUrl,
87
+ getGetMyUserSchemaUrl: () => getGetMyUserSchemaUrl,
88
+ getGetMyUserUrl: () => getGetMyUserUrl,
89
+ getGetOAuthSettingsUrl: () => getGetOAuthSettingsUrl,
90
+ getGetPolicyRevisionUrl: () => getGetPolicyRevisionUrl,
91
+ getGetPolicyUrl: () => getGetPolicyUrl,
92
+ getGetProjectClaimStatusUrl: () => getGetProjectClaimStatusUrl,
93
+ getGetProjectClaimWindowUrl: () => getGetProjectClaimWindowUrl,
94
+ getGetProjectUrl: () => getGetProjectUrl,
95
+ getGetReadyUrl: () => getGetReadyUrl,
96
+ getGetReleaseUrl: () => getGetReleaseUrl,
97
+ getGetSchemaUrl: () => getGetSchemaUrl,
98
+ getGetSessionUrl: () => getGetSessionUrl,
99
+ getGetTeamUrl: () => getGetTeamUrl,
100
+ getGetUserPasswordStateUrl: () => getGetUserPasswordStateUrl,
101
+ getGetUserUrl: () => getGetUserUrl,
102
+ getGetVariableUrl: () => getGetVariableUrl,
103
+ getGrant: () => getGrant,
104
+ getIdp: () => getIdp,
105
+ getIdpRevision: () => getIdpRevision,
106
+ getInvitation: () => getInvitation,
107
+ getListBrandingUrl: () => getListBrandingUrl,
108
+ getListDeploymentVariablesUrl: () => getListDeploymentVariablesUrl,
109
+ getListDeploymentsUrl: () => getListDeploymentsUrl,
110
+ getListEventsUrl: () => getListEventsUrl,
111
+ getListFlowDefinitionsUrl: () => getListFlowDefinitionsUrl,
112
+ getListIdpRevisionsUrl: () => getListIdpRevisionsUrl,
113
+ getListInvitationsUrl: () => getListInvitationsUrl,
114
+ getListMyIdentityLinksUrl: () => getListMyIdentityLinksUrl,
115
+ getListMyPasskeysUrl: () => getListMyPasskeysUrl,
116
+ getListMyProjectsUrl: () => getListMyProjectsUrl,
117
+ getListMyTeamsUrl: () => getListMyTeamsUrl,
118
+ getListPoliciesUrl: () => getListPoliciesUrl,
119
+ getListPolicyRevisionsUrl: () => getListPolicyRevisionsUrl,
120
+ getListProjectAdminsUrl: () => getListProjectAdminsUrl,
121
+ getListProjectMembersUrl: () => getListProjectMembersUrl,
122
+ getListProjectPreviewsUrl: () => getListProjectPreviewsUrl,
123
+ getListReleasesUrl: () => getListReleasesUrl,
124
+ getListSchemasUrl: () => getListSchemasUrl,
125
+ getListUserIdentityLinksUrl: () => getListUserIdentityLinksUrl,
126
+ getListUserPasskeysUrl: () => getListUserPasskeysUrl,
127
+ getListUserTeamsUrl: () => getListUserTeamsUrl,
128
+ getListVariablesUrl: () => getListVariablesUrl,
129
+ getLive: () => getLive,
130
+ getLookupInvitationUrl: () => getLookupInvitationUrl,
131
+ getMyPasswordState: () => getMyPasswordState,
132
+ getMySession: () => getMySession,
133
+ getMySessionCsrfToken: () => getMySessionCsrfToken,
134
+ getMyUser: () => getMyUser,
135
+ getMyUserSchema: () => getMyUserSchema,
136
+ getOAuthSettings: () => getOAuthSettings,
137
+ getPolicy: () => getPolicy,
138
+ getPolicyRevision: () => getPolicyRevision,
139
+ getProject: () => getProject,
140
+ getProjectClaimStatus: () => getProjectClaimStatus,
141
+ getProjectClaimWindow: () => getProjectClaimWindow,
142
+ getPublishApplicationUrl: () => getPublishApplicationUrl,
143
+ getPublishBrandingUrl: () => getPublishBrandingUrl,
144
+ getPublishFlowDefinitionUrl: () => getPublishFlowDefinitionUrl,
145
+ getPublishIdpUrl: () => getPublishIdpUrl,
146
+ getPublishPolicyUrl: () => getPublishPolicyUrl,
147
+ getPublishSchemaUrl: () => getPublishSchemaUrl,
148
+ getQueryGrantsUrl: () => getQueryGrantsUrl,
149
+ getQueryIdpsUrl: () => getQueryIdpsUrl,
150
+ getQueryProjectsUrl: () => getQueryProjectsUrl,
151
+ getQuerySessionsUrl: () => getQuerySessionsUrl,
152
+ getQueryTeamsUrl: () => getQueryTeamsUrl,
153
+ getQueryUsersUrl: () => getQueryUsersUrl,
154
+ getReady: () => getReady,
155
+ getRejectInvitationUrl: () => getRejectInvitationUrl,
156
+ getRelease: () => getRelease,
157
+ getRemoveProjectOriginUrl: () => getRemoveProjectOriginUrl,
158
+ getRemoveProjectPreviewUrl: () => getRemoveProjectPreviewUrl,
159
+ getRevokeMySessionUrl: () => getRevokeMySessionUrl,
160
+ getRevokeReleaseUrl: () => getRevokeReleaseUrl,
161
+ getRevokeSessionUrl: () => getRevokeSessionUrl,
162
+ getRollbackDeploymentUrl: () => getRollbackDeploymentUrl,
163
+ getSchema: () => getSchema,
164
+ getSearchUrl: () => getSearchUrl,
165
+ getSession: () => getSession,
166
+ getSetUserPasswordUrl: () => getSetUserPasswordUrl,
167
+ getSetVariablesUrl: () => getSetVariablesUrl,
168
+ getSubmitFlowStepUrl: () => getSubmitFlowStepUrl,
169
+ getTeam: () => getTeam,
170
+ getUpdateMyUserUrl: () => getUpdateMyUserUrl,
171
+ getUpdateProjectUrl: () => getUpdateProjectUrl,
172
+ getUpdateTeamUrl: () => getUpdateTeamUrl,
173
+ getUpdateUserUrl: () => getUpdateUserUrl,
174
+ getUser: () => getUser,
175
+ getUserPasswordState: () => getUserPasswordState,
176
+ getVariable: () => getVariable,
177
+ getVerifyAuthAttemptChallengeUrl: () => getVerifyAuthAttemptChallengeUrl,
178
+ listBranding: () => listBranding,
179
+ listDeploymentVariables: () => listDeploymentVariables,
180
+ listDeployments: () => listDeployments,
181
+ listEvents: () => listEvents,
182
+ listFlowDefinitions: () => listFlowDefinitions,
183
+ listIdpRevisions: () => listIdpRevisions,
184
+ listInvitations: () => listInvitations,
185
+ listMyIdentityLinks: () => listMyIdentityLinks,
186
+ listMyPasskeys: () => listMyPasskeys,
187
+ listMyProjects: () => listMyProjects,
188
+ listMyTeams: () => listMyTeams,
189
+ listPolicies: () => listPolicies,
190
+ listPolicyRevisions: () => listPolicyRevisions,
191
+ listProjectAdmins: () => listProjectAdmins,
192
+ listProjectMembers: () => listProjectMembers,
193
+ listProjectPreviews: () => listProjectPreviews,
194
+ listReleases: () => listReleases,
195
+ listSchemas: () => listSchemas,
196
+ listUserIdentityLinks: () => listUserIdentityLinks,
197
+ listUserPasskeys: () => listUserPasskeys,
198
+ listUserTeams: () => listUserTeams,
199
+ listVariables: () => listVariables,
200
+ lookupInvitation: () => lookupInvitation,
201
+ publishApplication: () => publishApplication,
202
+ publishBranding: () => publishBranding,
203
+ publishFlowDefinition: () => publishFlowDefinition,
204
+ publishIdp: () => publishIdp,
205
+ publishPolicy: () => publishPolicy,
206
+ publishSchema: () => publishSchema,
207
+ queryGrants: () => queryGrants,
208
+ queryIdps: () => queryIdps,
209
+ queryProjects: () => queryProjects,
210
+ querySessions: () => querySessions,
211
+ queryTeams: () => queryTeams,
212
+ queryUsers: () => queryUsers,
213
+ rejectInvitation: () => rejectInvitation,
214
+ removeProjectOrigin: () => removeProjectOrigin,
215
+ removeProjectPreview: () => removeProjectPreview,
216
+ revokeMySession: () => revokeMySession,
217
+ revokeRelease: () => revokeRelease,
218
+ revokeSession: () => revokeSession,
219
+ rollbackDeployment: () => rollbackDeployment,
220
+ search: () => search,
221
+ setUserPassword: () => setUserPassword,
222
+ setVariables: () => setVariables,
223
+ submitFlowStep: () => submitFlowStep,
224
+ updateMyUser: () => updateMyUser,
225
+ updateProject: () => updateProject,
226
+ updateTeam: () => updateTeam,
227
+ updateUser: () => updateUser,
228
+ verifyAuthAttemptChallenge: () => verifyAuthAttemptChallenge
229
+ });
230
+ const getHeaders = (...sources) => {
231
+ const seen = /* @__PURE__ */ new Set();
232
+ const layers = [];
233
+ for (const source of sources.reverse()) {
234
+ if (!source) continue;
235
+ const entries = source instanceof Headers ? source.entries() : Symbol.iterator in source ? Array.from(source, (entry) => Array.from(entry)) : Object.entries(source);
236
+ const layer = [];
237
+ for (const [name, value] of entries) if (value !== void 0 && !seen.has(name.toLowerCase())) layer.push([name, value]);
238
+ for (const [name] of layer) seen.add(name.toLowerCase());
239
+ layers.push(layer);
240
+ }
241
+ return Object.fromEntries(layers.reverse().flat());
242
+ };
243
+ const getGetLiveUrl = () => {
244
+ return `${getApiBaseUrl()}/livez`;
245
+ };
246
+ /**
247
+ * Answers `ok` while the server process serves HTTP, and checks nothing
248
+ * behind it.
249
+ *
250
+ * A liveness probe tells an orchestrator such as Kubernetes whether to
251
+ * restart the process. Point it at `/livez` at the root, where the probes
252
+ * stay, not under `/api/v1`. It never checks the database, so an outage of
253
+ * the database does not restart every instance. `GET /readyz` takes an
254
+ * instance out of rotation instead.
255
+ * @summary Check the server's liveness
256
+ */
257
+ const getLive = async (options) => {
258
+ return customFetch(getGetLiveUrl(), {
259
+ ...options,
260
+ method: "GET"
261
+ });
262
+ };
263
+ const getGetReadyUrl = () => {
264
+ return `${getApiBaseUrl()}/readyz`;
265
+ };
266
+ /**
267
+ * Answers `ok` when the server can serve requests, which takes its database
268
+ * answering within a second, and `fail` with `503` otherwise.
269
+ *
270
+ * A readiness probe tells an orchestrator such as Kubernetes whether to send
271
+ * the instance requests. Point it at `/readyz` at the root, where the probes
272
+ * stay, not under `/api/v1`, so that a server whose database does not answer
273
+ * gets no requests until it does. The check is one round trip to the
274
+ * database.
275
+ * @summary Check the server's readiness
276
+ */
277
+ const getReady = async (options) => {
278
+ return customFetch(getGetReadyUrl(), {
279
+ ...options,
280
+ method: "GET"
281
+ });
282
+ };
283
+ const getCreateUserUrl = (params) => {
284
+ const normalizedParams = new URLSearchParams();
285
+ Object.entries(params || {}).forEach(([key, value]) => {
286
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
287
+ });
288
+ const stringifiedParams = normalizedParams.toString();
289
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users?${stringifiedParams}` : `${getApiBaseUrl()}/users`;
290
+ };
291
+ /**
292
+ * Creates a user whose attributes satisfy the user schema named in the request.
293
+ *
294
+ * The server assigns the user's ID and returns it. `schema` is the `id` of a
295
+ * schema, as `publishSchema` (`POST /schemas`) returns it or `listSchemas` (`GET /schemas`) lists it. With
296
+ * `team_id`, the user also becomes an active member of that team. A value the
297
+ * schema marks unique that another user already holds is refused with `409`;
298
+ * send a different value.
299
+ * @summary Create a user
300
+ */
301
+ const createUser = async (createUserBody, params, options) => {
302
+ return customFetch(getCreateUserUrl(params), {
303
+ ...options,
304
+ method: "POST",
305
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
306
+ body: JSON.stringify(createUserBody)
307
+ });
308
+ };
309
+ const getQueryUsersUrl = (params) => {
310
+ const normalizedParams = new URLSearchParams();
311
+ Object.entries(params || {}).forEach(([key, value]) => {
312
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
313
+ });
314
+ const stringifiedParams = normalizedParams.toString();
315
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/query?${stringifiedParams}` : `${getApiBaseUrl()}/users/query`;
316
+ };
317
+ /**
318
+ * Returns the users of a project, paginated with a cursor.
319
+ *
320
+ * `project_id` names the project to list; without it, the credential's own
321
+ * project is listed.
322
+ *
323
+ * Accepts either a project secret (`oauth2`) or a user-bound console
324
+ * session cookie (`sessionCookie`). Cookie-authenticated requests
325
+ * follow the scheme's CSRF rules (`sessionCookie`).
326
+ *
327
+ * With a project secret, embedding `teams` with `expand`, or filtering by
328
+ * `team_id`, also needs `team_membership.read`. Embedding
329
+ * `lifecycle_owner_team` needs `team.read`. A console session carries no
330
+ * scopes: it may do both when it may read the whole project, and gets
331
+ * `403 user.permission_denied` otherwise.
332
+ * @summary Query users
333
+ */
334
+ const queryUsers = async (queryUsersBody, params, options) => {
335
+ return customFetch(getQueryUsersUrl(params), {
336
+ ...options,
337
+ method: "POST",
338
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
339
+ body: JSON.stringify(queryUsersBody)
340
+ });
341
+ };
342
+ const getGetUserUrl = (userId, params) => {
343
+ const normalizedParams = new URLSearchParams();
344
+ Object.entries(params || {}).forEach(([key, value]) => {
345
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
346
+ });
347
+ const stringifiedParams = normalizedParams.toString();
348
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}?${stringifiedParams}` : `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}`;
349
+ };
350
+ /**
351
+ * Returns a user by ID, with the attributes its schema defines.
352
+ *
353
+ * With `team_id`, the user is returned only while they are an active member
354
+ * of that team.
355
+ * @summary Get a user by ID
356
+ */
357
+ const getUser = async (userId, params, options) => {
358
+ return customFetch(getGetUserUrl(userId, params), {
359
+ ...options,
360
+ method: "GET"
361
+ });
362
+ };
363
+ const getUpdateUserUrl = (userId) => {
364
+ return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}`;
365
+ };
366
+ /**
367
+ * Partially updates a user's schema-defined attributes, and optionally
368
+ * moves the user to another registered schema. The merged result is
369
+ * validated against the schema before commit. Concurrent writes are
370
+ * last-write-wins.
371
+ *
372
+ * To move the user, send `schema` with the `id` of a registered schema, as
373
+ * `publishSchema` (`POST /schemas`) returns it or `listSchemas` (`GET /schemas`) lists it.
374
+ *
375
+ * To ask whether a patch would succeed, send it with `"dry_run": true`. It takes
376
+ * the same permission and answers the same status and `details` as the real
377
+ * request, and it changes nothing and emits no `user.updated`. The request
378
+ * itself is still recorded as `request.api`, like any other API call. A `200`
379
+ * holds for the moment of the check: a unique value that is free then can be
380
+ * taken before the real request, which then answers `409`.
381
+ *
382
+ * `dry_run` is a body field so that a server from before it refuses the
383
+ * request as malformed (`400 req.invalid`) instead of applying the patch.
384
+ * @summary Update a user by ID
385
+ */
386
+ const updateUser = async (userId, updateUserBody, options) => {
387
+ return customFetch(getUpdateUserUrl(userId), {
388
+ ...options,
389
+ method: "PATCH",
390
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
391
+ body: JSON.stringify(updateUserBody)
392
+ });
393
+ };
394
+ const getDeleteUserUrl = (userId) => {
395
+ return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}`;
396
+ };
397
+ /**
398
+ * Deletes a user, removes them from every team they belong to, and revokes
399
+ * every grant they hold, on any project.
400
+ *
401
+ * The user is removed, not deactivated, and the deletion emits `user.deleted`,
402
+ * plus `authz.revoked` for each grant on that grant's project.
403
+ * With a project secret the request is idempotent: deleting a user that exists
404
+ * in no project succeeds without changing anything. Deleting the last active
405
+ * member of a project's owning team returns 409 `proj.last_owner` and changes
406
+ * nothing.
407
+ * @summary Delete a user by ID
408
+ */
409
+ const deleteUser = async (userId, options) => {
410
+ return customFetch(getDeleteUserUrl(userId), {
411
+ ...options,
412
+ method: "DELETE"
413
+ });
414
+ };
415
+ const getListUserIdentityLinksUrl = (userId, params) => {
416
+ const normalizedParams = new URLSearchParams();
417
+ Object.entries(params || {}).forEach(([key, value]) => {
418
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
419
+ });
420
+ const stringifiedParams = normalizedParams.toString();
421
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/identity_links?${stringifiedParams}` : `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/identity_links`;
422
+ };
423
+ /**
424
+ * Lists the identity provider accounts a sign-in linked to the user, oldest
425
+ * first. The provider's subject and claims, the data it asserts about the
426
+ * account, are never returned.
427
+ * @summary List the provider accounts linked to a user
428
+ */
429
+ const listUserIdentityLinks = async (userId, params, options) => {
430
+ return customFetch(getListUserIdentityLinksUrl(userId, params), {
431
+ ...options,
432
+ method: "GET"
433
+ });
434
+ };
435
+ const getListUserPasskeysUrl = (userId, params) => {
436
+ const normalizedParams = new URLSearchParams();
437
+ Object.entries(params || {}).forEach(([key, value]) => {
438
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
439
+ });
440
+ const stringifiedParams = normalizedParams.toString();
441
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/passkeys?${stringifiedParams}` : `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/passkeys`;
442
+ };
443
+ /**
444
+ * Lists the passkeys registered for a user, newest first, paginated with a
445
+ * cursor. A passkey is a WebAuthn credential that signs a user in without a
446
+ * password.
447
+ *
448
+ * Each passkey carries its ID, its name and when it was registered, never the
449
+ * credential itself.
450
+ * @summary List a user's passkeys
451
+ */
452
+ const listUserPasskeys = async (userId, params, options) => {
453
+ return customFetch(getListUserPasskeysUrl(userId, params), {
454
+ ...options,
455
+ method: "GET"
456
+ });
457
+ };
458
+ const getCreateUserPasskeyRegistrationUrl = (userId) => {
459
+ return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/passkeys/registrations`;
460
+ };
461
+ /**
462
+ * Starts a WebAuthn registration ceremony for the user and returns the
463
+ * creation options for `navigator.credentials.create()`. A passkey is
464
+ * registered in two steps: this one returns options for the browser, and
465
+ * `completeUserPasskeyRegistration` (`POST /users/{user_id}/passkeys/registrations/{registration_id}`) verifies the browser's answer.
466
+ *
467
+ * Complete the ceremony with
468
+ * `POST /users/{user_id}/passkeys/registrations/{registration_id}` within five
469
+ * minutes, using the `registration_id` this response returns. Credentials
470
+ * already registered for the user are excluded automatically.
471
+ * @summary Begin a passkey registration
472
+ */
473
+ const createUserPasskeyRegistration = async (userId, createUserPasskeyRegistrationBody, options) => {
474
+ return customFetch(getCreateUserPasskeyRegistrationUrl(userId), {
475
+ ...options,
476
+ method: "POST",
477
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
478
+ body: JSON.stringify(createUserPasskeyRegistrationBody)
479
+ });
480
+ };
481
+ const getCompleteUserPasskeyRegistrationUrl = (userId, registrationId) => {
482
+ return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/passkeys/registrations/${encodeURIComponent(String(registrationId))}`;
483
+ };
484
+ /**
485
+ * Verifies the attestation against the registration ceremony and stores
486
+ * the new passkey for the user. `registration_id` is the one that
487
+ * `createUserPasskeyRegistration` (`POST /users/{user_id}/passkeys/registrations`)
488
+ * returned when it started the ceremony. The attestation is
489
+ * the browser's answer from `navigator.credentials.create()`.
490
+ *
491
+ * A rejected attestation leaves the ceremony open for a retry. An expired ceremony answers
492
+ * `att.stale_challenge`: begin a new registration. An unknown or
493
+ * already-consumed registration ID answers `att.not_found`.
494
+ * @summary Finish a passkey registration
495
+ */
496
+ const completeUserPasskeyRegistration = async (userId, registrationId, completeUserPasskeyRegistrationBody, options) => {
497
+ return customFetch(getCompleteUserPasskeyRegistrationUrl(userId, registrationId), {
498
+ ...options,
499
+ method: "POST",
500
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
501
+ body: JSON.stringify(completeUserPasskeyRegistrationBody)
502
+ });
503
+ };
504
+ const getGetUserPasswordStateUrl = (userId) => {
505
+ return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/password`;
506
+ };
507
+ /**
508
+ * Returns when the user's current password was set, and leaves `set_at` out
509
+ * when the user has none. The password and its hash are never returned;
510
+ * `setUserPassword` (`PUT` on the same path) sets one.
511
+ * @summary Get a user's password state
512
+ */
513
+ const getUserPasswordState = async (userId, options) => {
514
+ return customFetch(getGetUserPasswordStateUrl(userId), {
515
+ ...options,
516
+ method: "GET"
517
+ });
518
+ };
519
+ const getSetUserPasswordUrl = (userId) => {
520
+ return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/password`;
521
+ };
522
+ /**
523
+ * Sets a user's password, hashed with the project's current password hashing
524
+ * policy.
525
+ *
526
+ * The new password replaces the current one, and setting it emits
527
+ * `auth.factor.password.set`. A password the project's password policy
528
+ * refuses answers `user.password_policy_violation`; send one that meets the
529
+ * policy.
530
+ *
531
+ * The password policy is the one in the release that serves the caller's
532
+ * `Origin`, chosen as `createFlow` (`POST /flows`) chooses it. A frontend on a
533
+ * preview URL gets that preview's policy, and one on a primary origin the
534
+ * newest primary deployment's. A request with no `Origin`, or from the
535
+ * console when the project does not list the console's origin, gets the
536
+ * project's newest primary deployment.
537
+ *
538
+ * If the request is refused:
539
+ * - `403 proj.origin_not_allowed`: the project admits no such origin. Add it
540
+ * with `zitadel origin add`.
541
+ * - `403 proj.preview_not_live`: the origin matches a preview pattern but has
542
+ * no live preview. Run `zitadel preview` on the branch.
543
+ * - `409 rel.not_deployed`: nothing is deployed to the origin. Run
544
+ * `zitadel deploy`.
545
+ * - `409 rel.no_default`: the request names no origin and the project has no
546
+ * primary deployment. Run `zitadel deploy`.
547
+ * - `409 rel.revoked`: the release that serves the origin is revoked.
548
+ * @summary Set a user's password
549
+ */
550
+ const setUserPassword = async (userId, setUserPasswordBody, options) => {
551
+ return customFetch(getSetUserPasswordUrl(userId), {
552
+ ...options,
553
+ method: "PUT",
554
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
555
+ body: JSON.stringify(setUserPasswordBody)
556
+ });
557
+ };
558
+ const getListUserTeamsUrl = (userId, params) => {
559
+ const normalizedParams = new URLSearchParams();
560
+ Object.entries(params || {}).forEach(([key, value]) => {
561
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
562
+ });
563
+ const stringifiedParams = normalizedParams.toString();
564
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/teams?${stringifiedParams}` : `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/teams`;
565
+ };
566
+ /**
567
+ * Lists the teams a user belongs to, ordered by team name. Each entry carries
568
+ * the team's name, so a client renders a page without resolving IDs one by
569
+ * one.
570
+ *
571
+ * This is the user's team memberships, not lifecycle ownership: the single
572
+ * team that owns the user's lifecycle is reported as
573
+ * `metadata.lifecycle_owner_team_id` on the user read endpoints. Memberships
574
+ * the user was removed from are not returned.
575
+ * @summary List the teams a user belongs to
576
+ */
577
+ const listUserTeams = async (userId, params, options) => {
578
+ return customFetch(getListUserTeamsUrl(userId, params), {
579
+ ...options,
580
+ method: "GET"
581
+ });
582
+ };
583
+ const getGetMyUserUrl = (params) => {
584
+ const normalizedParams = new URLSearchParams();
585
+ Object.entries(params || {}).forEach(([key, value]) => {
586
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
587
+ });
588
+ const stringifiedParams = normalizedParams.toString();
589
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me?${stringifiedParams}` : `${getApiBaseUrl()}/users/me`;
590
+ };
591
+ /**
592
+ * Returns the user signed in to the session that authenticates the request.
593
+ *
594
+ * The project and the user both come from the session cookie, so a caller only
595
+ * ever reads their own user.
596
+ *
597
+ * With `project_id`, the user is returned only when the session belongs to
598
+ * that project.
599
+ * @summary Get my user information
600
+ */
601
+ const getMyUser = async (params, options) => {
602
+ return customFetch(getGetMyUserUrl(params), {
603
+ ...options,
604
+ method: "GET"
605
+ });
606
+ };
607
+ const getUpdateMyUserUrl = (params) => {
608
+ const normalizedParams = new URLSearchParams();
609
+ Object.entries(params || {}).forEach(([key, value]) => {
610
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
611
+ });
612
+ const stringifiedParams = normalizedParams.toString();
613
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me?${stringifiedParams}` : `${getApiBaseUrl()}/users/me`;
614
+ };
615
+ /**
616
+ * Partially updates the caller's own schema-defined attributes. The merged
617
+ * result is validated against the user's schema before commit. Concurrent
618
+ * writes are last-write-wins.
619
+ *
620
+ * With `project_id`, the user is updated only when the session belongs to
621
+ * that project.
622
+ * @summary Update my user information
623
+ */
624
+ const updateMyUser = async (updateMyUserBody, params, options) => {
625
+ return customFetch(getUpdateMyUserUrl(params), {
626
+ ...options,
627
+ method: "PATCH",
628
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
629
+ body: JSON.stringify(updateMyUserBody)
630
+ });
631
+ };
632
+ const getListMyIdentityLinksUrl = (params) => {
633
+ const normalizedParams = new URLSearchParams();
634
+ Object.entries(params || {}).forEach(([key, value]) => {
635
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
636
+ });
637
+ const stringifiedParams = normalizedParams.toString();
638
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/identity_links?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/identity_links`;
639
+ };
640
+ /**
641
+ * Lists the identity provider accounts a sign-in linked to the signed-in user,
642
+ * oldest first. The provider's subject and claims, the data it asserts about
643
+ * the account, are never returned.
644
+ *
645
+ * With `project_id`, the links are listed only when the session belongs to
646
+ * that project.
647
+ * @summary List the provider accounts linked to me
648
+ */
649
+ const listMyIdentityLinks = async (params, options) => {
650
+ return customFetch(getListMyIdentityLinksUrl(params), {
651
+ ...options,
652
+ method: "GET"
653
+ });
654
+ };
655
+ const getListMyPasskeysUrl = (params) => {
656
+ const normalizedParams = new URLSearchParams();
657
+ Object.entries(params || {}).forEach(([key, value]) => {
658
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
659
+ });
660
+ const stringifiedParams = normalizedParams.toString();
661
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/passkeys?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/passkeys`;
662
+ };
663
+ /**
664
+ * Lists the signed-in user's own passkeys, newest first, paginated with a
665
+ * cursor. A passkey is a WebAuthn credential that signs a user in without a
666
+ * password. Each passkey carries its ID, its name and when it was registered,
667
+ * never the credential itself.
668
+ *
669
+ * With `project_id`, the passkeys are listed only when the session belongs to
670
+ * that project.
671
+ * @summary List my passkeys
672
+ */
673
+ const listMyPasskeys = async (params, options) => {
674
+ return customFetch(getListMyPasskeysUrl(params), {
675
+ ...options,
676
+ method: "GET"
677
+ });
678
+ };
679
+ const getGetMyPasswordStateUrl = (params) => {
680
+ const normalizedParams = new URLSearchParams();
681
+ Object.entries(params || {}).forEach(([key, value]) => {
682
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
683
+ });
684
+ const stringifiedParams = normalizedParams.toString();
685
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/password?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/password`;
686
+ };
687
+ /**
688
+ * Returns when the signed-in user's current password was set, and leaves
689
+ * `set_at` out when they have none. The password and its hash are never
690
+ * returned.
691
+ *
692
+ * With `project_id`, the state is read only when the session belongs to that
693
+ * project.
694
+ * @summary Get my password state
695
+ */
696
+ const getMyPasswordState = async (params, options) => {
697
+ return customFetch(getGetMyPasswordStateUrl(params), {
698
+ ...options,
699
+ method: "GET"
700
+ });
701
+ };
702
+ const getListMyProjectsUrl = (params) => {
703
+ const normalizedParams = new URLSearchParams();
704
+ Object.entries(params || {}).forEach(([key, value]) => {
705
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
706
+ });
707
+ const stringifiedParams = normalizedParams.toString();
708
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/projects?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/projects`;
709
+ };
710
+ /**
711
+ * Lists the projects the signed-in user can act on: those they hold an active
712
+ * grant on, either directly or through a team they are a member of. For a
713
+ * platform operator, someone who runs the deployment, that is every project of
714
+ * the deployment. Ordered by project ID unless `order` asks for creation
715
+ * time, and paged with an opaque cursor.
716
+ *
717
+ * This is not the same question as `queryProjects` (`POST /projects/query`), which answers with the one
718
+ * project the calling credential is bound to. Here the session is the caller
719
+ * and the grants are the answer, so the list spans projects.
720
+ *
721
+ * With `name_contains`, only the projects whose name contains that text are
722
+ * listed. The search runs on the server together with the grants, so it
723
+ * reaches every project the user can act on, however many there are, and
724
+ * pages like the full list.
725
+ *
726
+ * With `project_id`, the projects are listed only when the session belongs to
727
+ * that project. It names the project the session was signed in to, not one to
728
+ * list.
729
+ *
730
+ * With `exclude_platform`, the deployment's reserved platform project is left
731
+ * out: the project the console signs in to, which holds the console's
732
+ * accounts rather than an application's users. A deployment without one lists
733
+ * the same projects either way.
734
+ * @summary List the projects I can act on
735
+ */
736
+ const listMyProjects = async (params, options) => {
737
+ return customFetch(getListMyProjectsUrl(params), {
738
+ ...options,
739
+ method: "GET"
740
+ });
741
+ };
742
+ const getGetMyUserSchemaUrl = (params) => {
743
+ const normalizedParams = new URLSearchParams();
744
+ Object.entries(params || {}).forEach(([key, value]) => {
745
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
746
+ });
747
+ const stringifiedParams = normalizedParams.toString();
748
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/schema?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/schema`;
749
+ };
750
+ /**
751
+ * Returns the schema that validates the signed-in user's own record.
752
+ *
753
+ * With `project_id`, the schema is returned only when the session belongs to
754
+ * that project.
755
+ * @summary Get my user schema
756
+ */
757
+ const getMyUserSchema = async (params, options) => {
758
+ return customFetch(getGetMyUserSchemaUrl(params), {
759
+ ...options,
760
+ method: "GET"
761
+ });
762
+ };
763
+ const getListMyTeamsUrl = (params) => {
764
+ const normalizedParams = new URLSearchParams();
765
+ Object.entries(params || {}).forEach(([key, value]) => {
766
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
767
+ });
768
+ const stringifiedParams = normalizedParams.toString();
769
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/teams?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/teams`;
770
+ };
771
+ /**
772
+ * Lists the teams the signed-in user belongs to, ordered by team name.
773
+ *
774
+ * With `project_id`, the teams are listed only when the session belongs to
775
+ * that project.
776
+ * @summary List the teams I belong to
777
+ */
778
+ const listMyTeams = async (params, options) => {
779
+ return customFetch(getListMyTeamsUrl(params), {
780
+ ...options,
781
+ method: "GET"
782
+ });
783
+ };
784
+ const getCreateFlowUrl = () => {
785
+ return `${getApiBaseUrl()}/flows`;
786
+ };
787
+ /**
788
+ * Starts a flow: resolves a flow definition from the request's purpose and
789
+ * audience, and returns the first step.
790
+ *
791
+ * The flow endpoints are the runtime calls the login component
792
+ * (`<zitadel-login>`) makes, step by step. It starts a flow here, renders the
793
+ * step it gets back, and submits the user's input with `submitFlowStep` (`POST /flows/{flow_id}/submit`) to
794
+ * get the next step. This call creates a new session implicitly, unless
795
+ * `session_id` is provided together with that session's `session_token`
796
+ * (for step-up or reauthentication on an existing session).
797
+ *
798
+ * The browser `Origin` header selects which deployment serves this attempt.
799
+ * The server checks the origin against the project's origin patterns and live
800
+ * previews, and the deployment that origin serves is the target: the
801
+ * project's newest primary deployment when it names a primary origin, or the
802
+ * newest live deployment to a preview URL. A
803
+ * deployment is a release, the immutable bundle of the project's
804
+ * configuration, made live at an origin. The deployment's release supplies
805
+ * flow definitions, user schemas and branding. The resolved deployment is
806
+ * sealed into the `_zflow` cookie so later steps keep the same
807
+ * configuration.
808
+ *
809
+ * - An origin that matches no pattern answers `403` with
810
+ * `proj.origin_not_allowed`, including when the project lists no origins.
811
+ * Add the origin with `zitadel origin add`.
812
+ * - An origin that matches a preview pattern with no live preview answers
813
+ * `403` with `proj.preview_not_live`. Run `zitadel preview` on the branch.
814
+ * - Nothing deployed to a listed origin or a live preview answers `409`
815
+ * with `rel.not_deployed`. Run `zitadel deploy`: a primary origin added
816
+ * since the last deploy serves nothing until the next one.
817
+ * - A loopback origin the project does not list answers `409` with
818
+ * `rel.not_deployed` too, as no deployment can name it. Add it with
819
+ * `zitadel origin add <origin> --kind primary`, then run `zitadel deploy`.
820
+ * - A revoked release answers `409` with `rel.revoked`.
821
+ *
822
+ * A request with no `Origin` passes the check, and so does the server's own
823
+ * origin, from which its console previews a project's login. Both are served
824
+ * the project's newest primary deployment unless the project lists that
825
+ * origin; with no primary deployment they answer `409` with
826
+ * `rel.no_default`. A loopback origin passes the check and is its own
827
+ * target. A step submitted from the server's own origin is still refused
828
+ * unless the project lists it.
829
+ *
830
+ * The response contains an `id` field, the flow handle. Use it as the path
831
+ * parameter for all subsequent `/flows/{flow_id}/submit` calls.
832
+ *
833
+ * The response also sets an encrypted `HttpOnly` cookie (`_zflow`) containing
834
+ * the flow's orchestration state (current step, collected data, history).
835
+ * The server is stateless between requests: all flow state lives in this
836
+ * cookie. The browser sends it automatically on subsequent requests.
837
+ * @summary Start a flow
838
+ */
839
+ const createFlow = async (createFlowBody, options) => {
840
+ return customFetch(getCreateFlowUrl(), {
841
+ ...options,
842
+ method: "POST",
843
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
844
+ body: JSON.stringify(createFlowBody)
845
+ });
846
+ };
847
+ const getGetFlowStepUrl = (flowId) => {
848
+ return `${getApiBaseUrl()}/flows/${encodeURIComponent(String(flowId))}`;
849
+ };
850
+ /**
851
+ * Returns the current step of a flow without advancing it. Use it to render
852
+ * the step again after a page reload or a network error.
853
+ *
854
+ * The flow endpoints are the runtime calls the login component
855
+ * (`<zitadel-login>`) makes, step by step. `createFlow` (`POST /flows`) starts a flow, and
856
+ * `submitFlowStep` (`POST /flows/{flow_id}/submit`) advances it.
857
+ *
858
+ * For a sign-up step, prepares `step.gates.signup_pow.challenge`: one that
859
+ * creates its user on submit, or one carrying a passkey registration that
860
+ * creates its user.
861
+ * Reuses challenges with more than a minute remaining; otherwise issues a
862
+ * new one. If this render resolves parked SSO state, it first returns the
863
+ * updated cookie; fetch the step again to obtain its puzzle.
864
+ *
865
+ * Reuses the deployment sealed into `_zflow` at `createFlow`; it does not
866
+ * re-resolve from `Origin`. If that release was revoked since the attempt
867
+ * started, the response is `409` with `rel.revoked`.
868
+ * @summary Get the current step of a flow
869
+ */
870
+ const getFlowStep = async (flowId, options) => {
871
+ return customFetch(getGetFlowStepUrl(flowId), {
872
+ ...options,
873
+ method: "GET"
874
+ });
875
+ };
876
+ const getSubmitFlowStepUrl = (flowId) => {
877
+ return `${getApiBaseUrl()}/flows/${encodeURIComponent(String(flowId))}/submit`;
878
+ };
879
+ /**
880
+ * Submits the user's input for the current step of a flow. The server
881
+ * validates it, processes it (for example, verifies a credential), advances
882
+ * the flow through any invisible steps, and returns the next visible step.
883
+ * The flow endpoints are the runtime calls the login component
884
+ * (`<zitadel-login>`) makes, step by step; `createFlow` (`POST /flows`) starts a flow.
885
+ *
886
+ * The response sets an updated encrypted `HttpOnly` cookie (`_zflow`)
887
+ * with the new flow state. The server is stateless: all orchestration
888
+ * state is carried in this cookie between requests.
889
+ *
890
+ * Sign-up additionally requires a single-use `gate_proofs.signup_pow`
891
+ * solution for `step.gates.signup_pow`: a password sign-up (`create_user`)
892
+ * sends it with the submit, and a passkey registration that creates its user
893
+ * sends it with the attestation in `challenge_response`. Pending
894
+ * challenges and rate counters are stored on the server. Invalid or spent
895
+ * proofs return `403 flow.proof_invalid`; exhausted per-flow budgets return
896
+ * `429 flow.rate_limited`. GET the current step to obtain or refresh its
897
+ * challenge before solving. Start and Submit announce the gate without a puzzle.
898
+ *
899
+ * **Important:** The `id` in the response may differ from the `id` used in
900
+ * the request. This happens when a flow pivots (pushes a new flow onto the
901
+ * stack) or when a stacked flow completes (auto-pops to the parent flow).
902
+ * Always use the `id` from the latest response for the next request.
903
+ *
904
+ * ## Flow completion
905
+ *
906
+ * When `step.type` is `complete`, the flow is terminal. The `step.behavior`
907
+ * field tells the frontend what to do:
908
+ *
909
+ * | `behavior` | Action |
910
+ * |------------- |------------------------------------------------------------|
911
+ * | `redirect` | Navigate to `redirect_uri` (OIDC/SAML auth request done). |
912
+ * | `show` | Render the step as a success screen, such as registration. |
913
+ *
914
+ * A `complete` step is only returned when the **entire flow stack** is done.
915
+ * If a stacked flow (for example, recovery pivoted from login) finishes, the
916
+ * server auto-pops to the parent flow and returns the parent's next step.
917
+ * The frontend never sees a `complete` for intermediate flows.
918
+ *
919
+ * ## External sign-in
920
+ *
921
+ * `{action: "sso", sso_provider_id, return_target}` on a step that offers
922
+ * `sso_providers` returns the server-emitted `sso-redirect` step, whose
923
+ * `redirect_url` the frontend navigates to.
924
+ *
925
+ * - The flow state does not change, but `_zflow` is re-sealed like on
926
+ * every response, so its ten-minute window restarts at this submission;
927
+ * the external sign-in and the return must complete within it.
928
+ * - A second `Set-Cookie` line carries the browser-binding cookie the
929
+ * callback checks: `HttpOnly`, `Path=/`, `SameSite=Lax`.
930
+ * - On every host except http loopback it is `__Host-_zsso` with `Secure`.
931
+ * - When the request host is http loopback (local development, where
932
+ * Safari rejects `Secure`), it is `_zsso` with no `Secure`; the
933
+ * `__Host-` prefix is dropped because it requires `Secure`.
934
+ *
935
+ * An identity provider (an external sign-in such as Google) whose
936
+ * `client_id` is a `${{ NAME }}` reference has it filled from the project's
937
+ * variables. A provider the server cannot start a sign-in with, including a
938
+ * reference with no variable behind it, re-renders the step with
939
+ * `error.sso_unavailable`.
940
+ *
941
+ * Reuses the deployment sealed into `_zflow` at `createFlow`; it does not
942
+ * re-resolve from `Origin`. If that release was revoked since the attempt
943
+ * started, the response is `409` with `rel.revoked`.
944
+ * @summary Submit a flow step
945
+ */
946
+ const submitFlowStep = async (flowId, submitFlowStepBody, options) => {
947
+ return customFetch(getSubmitFlowStepUrl(flowId), {
948
+ ...options,
949
+ method: "POST",
950
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
951
+ body: JSON.stringify(submitFlowStepBody)
952
+ });
953
+ };
954
+ const getCreateAuthAttemptUrl = () => {
955
+ return `${getApiBaseUrl()}/auth_attempts`;
956
+ };
957
+ /**
958
+ * Creates an authentication attempt, one sign-in round that expires 15 minutes after creation.
959
+ *
960
+ * An authentication attempt collects the proofs for one sign-in and ends in a
961
+ * handoff token. A handoff token is the short-lived, single-use credential that
962
+ * a completed attempt hands to the session exchange. A client makes these calls
963
+ * in order:
964
+ *
965
+ * 1. `createAuthAttempt` (`POST /auth_attempts`) creates the attempt.
966
+ * 2. `createAuthAttemptChallenge` (`POST /auth_attempts/{attempt_id}/challenges`) issues a challenge, a request to prove one factor such as
967
+ * `identifier`, `password` or `passkey`.
968
+ * 3. `verifyAuthAttemptChallenge` (`POST /auth_attempts/{attempt_id}/challenges/{challenge_id}/verify`) submits the proof for that challenge: the
969
+ * credential, code or assertion. Repeat steps 2 and 3 until
970
+ * `getAuthAttempt` (`GET /auth_attempts/{attempt_id}`) reports state `completed`, which means every factor in
971
+ * `required_factors` is verified.
972
+ * 4. `createAuthAttemptHandoff` (`POST /auth_attempts/{attempt_id}/handoff`) completes the attempt and returns the `handoff_token`.
973
+ * 5. `exchangeHandoff` (`POST /sessions/exchange`) exchanges the handoff token
974
+ * for the session and its `session_token`.
975
+ *
976
+ * The body takes a `project_id` and a `challenge_nonce` (from
977
+ * `POST /bootstrap/challenge`). For step-up authentication, which adds factors
978
+ * to an existing session, also send that session's `session_id` and its
979
+ * `session_token`, as `createSession` (`POST /sessions`) or `exchangeHandoff` returned them.
980
+ * The attempt's `attempt_id` in the response is the ID every later call takes.
981
+ *
982
+ * The project comes from the project secret. A body `project_id` that names
983
+ * another project answers `403` with `proj.mismatch`: send the credential's own
984
+ * project. The attempt seals the project's newest primary deployment, whatever
985
+ * the caller's `Origin`. With none it answers `409` with `rel.no_default`, and a
986
+ * revoked release answers `409` with `rel.revoked`.
987
+ * @summary Create an authentication attempt
988
+ */
989
+ const createAuthAttempt = async (createAuthAttemptBody, options) => {
990
+ return customFetch(getCreateAuthAttemptUrl(), {
991
+ ...options,
992
+ method: "POST",
993
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
994
+ body: JSON.stringify(createAuthAttemptBody)
995
+ });
996
+ };
997
+ const getGetAuthAttemptUrl = (attemptId) => {
998
+ return `${getApiBaseUrl()}/auth_attempts/${encodeURIComponent(String(attemptId))}`;
999
+ };
1000
+ /**
1001
+ * Returns the current state of an authentication attempt, one sign-in round.
1002
+ *
1003
+ * The response holds the attempt's state, available factors for the next
1004
+ * challenge, challenges issued so far, and any errors preventing progress.
1005
+ *
1006
+ * Use it to poll during long-running factor verifications, for example waiting
1007
+ * for a federated identity provider (IdP) callback or a device flow.
1008
+ * @summary Get an authentication attempt by ID
1009
+ */
1010
+ const getAuthAttempt = async (attemptId, options) => {
1011
+ return customFetch(getGetAuthAttemptUrl(attemptId), {
1012
+ ...options,
1013
+ method: "GET"
1014
+ });
1015
+ };
1016
+ const getCreateAuthAttemptChallengeUrl = (attemptId) => {
1017
+ return `${getApiBaseUrl()}/auth_attempts/${encodeURIComponent(String(attemptId))}/challenges`;
1018
+ };
1019
+ /**
1020
+ * Issues a challenge, a request to prove one factor, within an authentication attempt.
1021
+ *
1022
+ * A challenge names one factor method, such as password, passkey, TOTP or OTP
1023
+ * via SMS. The response carries the challenge's `challenge_id`, method,
1024
+ * metadata and any UI hints. The client then submits the proof with
1025
+ * `verifyAuthAttemptChallenge` (`POST /auth_attempts/{attempt_id}/challenges/{challenge_id}/verify`), using that `challenge_id`.
1026
+ * @summary Issue a factor challenge
1027
+ */
1028
+ const createAuthAttemptChallenge = async (attemptId, createAuthAttemptChallengeBody, options) => {
1029
+ return customFetch(getCreateAuthAttemptChallengeUrl(attemptId), {
1030
+ ...options,
1031
+ method: "POST",
1032
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
1033
+ body: JSON.stringify(createAuthAttemptChallengeBody)
1034
+ });
1035
+ };
1036
+ const getVerifyAuthAttemptChallengeUrl = (attemptId, challengeId) => {
1037
+ return `${getApiBaseUrl()}/auth_attempts/${encodeURIComponent(String(attemptId))}/challenges/${encodeURIComponent(String(challengeId))}/verify`;
1038
+ };
1039
+ /**
1040
+ * Verifies a challenge by submitting its proof: the credential, code or assertion for the factor.
1041
+ *
1042
+ * The proof format depends on the challenge method. For example:
1043
+ *
1044
+ * - `password` method: { password: "…" }
1045
+ * - `totp` method: { totp: { code: "123456" } }
1046
+ * - `passkey` method: { passkey: { assertion: "…" } }
1047
+ * - `recovery_code` method: { recovery_code: "…" }
1048
+ *
1049
+ * On success, the factor is recorded on the authentication attempt. The
1050
+ * attempt moves to the next pending challenge, or completes when every required
1051
+ * factor is verified. Then call `createAuthAttemptHandoff` (`POST /auth_attempts/{attempt_id}/handoff`).
1052
+ *
1053
+ * A `409` with `att.proof_rejected` means the proof was wrong. Check it and try
1054
+ * again. There is no retry limit: you can retry until the attempt expires.
1055
+ * @summary Verify a challenge proof
1056
+ */
1057
+ const verifyAuthAttemptChallenge = async (attemptId, challengeId, verifyAuthAttemptChallengeBody, options) => {
1058
+ return customFetch(getVerifyAuthAttemptChallengeUrl(attemptId, challengeId), {
1059
+ ...options,
1060
+ method: "POST",
1061
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
1062
+ body: JSON.stringify(verifyAuthAttemptChallengeBody)
1063
+ });
1064
+ };
1065
+ const getCreateAuthAttemptHandoffUrl = (attemptId) => {
1066
+ return `${getApiBaseUrl()}/auth_attempts/${encodeURIComponent(String(attemptId))}/handoff`;
1067
+ };
1068
+ /**
1069
+ * Completes an authentication attempt and mints a `handoff_token`.
1070
+ *
1071
+ * A handoff token is the short-lived credential that a completed attempt hands
1072
+ * to the session exchange. Call this after every required factor is verified and
1073
+ * the attempt is in `completed` state. Otherwise it answers `409` with
1074
+ * `att.not_completed`: verify the remaining factors, then call again.
1075
+ *
1076
+ * Exchange the token at `POST /sessions/exchange` (`exchangeHandoff` (`POST /sessions/exchange`)) within 60
1077
+ * seconds to receive the session and its `session_token`. The handoff token is:
1078
+ *
1079
+ * - Single-use: exchange it once, with no retry.
1080
+ * - Bound to the project: the exchange needs the same project's credential.
1081
+ * - Created once: a second call answers `409 att.already_handed_off`, even
1082
+ * with the same idempotency key.
1083
+ *
1084
+ * A revoked release is refused when the handoff is exchanged, not here. A
1085
+ * release is the configuration that `zitadel deploy` publishes.
1086
+ * @summary Complete an authentication attempt and create a handoff token
1087
+ */
1088
+ const createAuthAttemptHandoff = async (attemptId, options) => {
1089
+ return customFetch(getCreateAuthAttemptHandoffUrl(attemptId), {
1090
+ ...options,
1091
+ method: "POST"
1092
+ });
1093
+ };
1094
+ const getCreateProjectUrl = () => {
1095
+ return `${getApiBaseUrl()}/projects`;
1096
+ };
1097
+ /**
1098
+ * Creates a project and returns its project secret and preview secret, which no
1099
+ * other endpoint returns.
1100
+ *
1101
+ * A project is the top-level boundary that holds users, sessions and
1102
+ * configuration. It has no owning team until someone claims it; see `createProjectClaim` (`POST /projects/{project_id}/claim/init`).
1103
+ *
1104
+ * The request needs no credential and is rate-limited. On `429`, wait and retry.
1105
+ * Unless `seed_defaults` is `false`, the project starts with a default user schema
1106
+ * and flow. The CLI sets it to `false` and uploads its own from `.zitadel/`.
1107
+ * @summary Create a project
1108
+ */
1109
+ const createProject = async (createProjectBody, options) => {
1110
+ return customFetch(getCreateProjectUrl(), {
1111
+ ...options,
1112
+ method: "POST",
1113
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
1114
+ body: JSON.stringify(createProjectBody)
1115
+ });
1116
+ };
1117
+ const getQueryProjectsUrl = () => {
1118
+ return `${getApiBaseUrl()}/projects/query`;
1119
+ };
1120
+ /**
1121
+ * Returns the project the project secret belongs to, as a page of at most one
1122
+ * project.
1123
+ *
1124
+ * A credential is scoped to one project today, so the filters and sorting
1125
+ * apply to that project alone. A signed-in person lists the projects they can
1126
+ * act on with `GET /users/me/projects`.
1127
+ * @summary Query projects
1128
+ */
1129
+ const queryProjects = async (queryProjectsBody, options) => {
1130
+ return customFetch(getQueryProjectsUrl(), {
1131
+ ...options,
1132
+ method: "POST",
1133
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
1134
+ body: JSON.stringify(queryProjectsBody)
1135
+ });
1136
+ };
1137
+ const getGetProjectUrl = (projectId) => {
1138
+ return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}`;
1139
+ };
1140
+ /**
1141
+ * Returns a project's current state: its name, origins, password hashing
1142
+ * method and owning team.
1143
+ *
1144
+ * Authenticate with the project secret, or with the session of a signed-in
1145
+ * person who holds a grant on the project.
1146
+ * @summary Get a project by ID
1147
+ */
1148
+ const getProject = async (projectId, options) => {
1149
+ return customFetch(getGetProjectUrl(projectId), {
1150
+ ...options,
1151
+ method: "GET"
1152
+ });
1153
+ };
1154
+ const getUpdateProjectUrl = (projectId) => {
1155
+ return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}`;
1156
+ };
1157
+ /**
1158
+ * Updates a project's name or password hashing method.
1159
+ *
1160
+ * Fields you leave out keep their value. Sending `password_hash: null` drops
1161
+ * the project's own method and returns to the server default. A change of
1162
+ * method rewrites no stored password: each moves to the new method when its
1163
+ * owner next signs in or sets a new password.
1164
+ *
1165
+ * Authenticate with the project secret, or with the session of a signed-in
1166
+ * person who can act on the project.
1167
+ * @summary Update a project
1168
+ */
1169
+ const updateProject = async (projectId, updateProjectBody, options) => {
1170
+ return customFetch(getUpdateProjectUrl(projectId), {
1171
+ ...options,
1172
+ method: "PATCH",
1173
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
1174
+ body: JSON.stringify(updateProjectBody)
1175
+ });
1176
+ };
1177
+ const getListProjectAdminsUrl = (projectId, params) => {
1178
+ const normalizedParams = new URLSearchParams();
1179
+ Object.entries(params || {}).forEach(([key, value]) => {
1180
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
1181
+ });
1182
+ const stringifiedParams = normalizedParams.toString();
1183
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/admins?${stringifiedParams}` : `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/admins`;
1184
+ };
1185
+ /**
1186
+ * Lists the people who can administer a project, and how each of them
1187
+ * holds that access.
1188
+ *
1189
+ * A person appears once, with one entry in `sources` per way they hold it:
1190
+ *
1191
+ * - `owning_team`: an active member of the team that owns the project, the
1192
+ * team a claim attaches the project to. Removing a grant does not remove
1193
+ * this access. It ends only when the person leaves the team or the
1194
+ * project changes owner.
1195
+ * - `grant`: an unexpired `admin` grant on the project, which is a role
1196
+ * given to the person (`grant_id` only) or to a team they are an active
1197
+ * member of (`grant_id` and `team`). Revoking that grant removes this
1198
+ * source.
1199
+ *
1200
+ * The list follows the authorization check. A person who left a team, or
1201
+ * whose team or user was deactivated, is not listed through it. Grants that
1202
+ * expired or carry a lower role are left out. A person whose only access is a
1203
+ * `viewer` or `editor` grant is not an admin and is not listed. Like the
1204
+ * check, a direct user grant requires an active user, so a suspended
1205
+ * person's direct grant is not listed.
1206
+ *
1207
+ * Every caller who passes the project read check sees every listed admin
1208
+ * and every team name on `sources`. Co-membership no longer filters the
1209
+ * roster.
1210
+ *
1211
+ * The list is ordered by `user_id` and paginated with `page_token`.
1212
+ * Authenticate with a project secret (`oauth2`), or with the session cookie
1213
+ * (`sessionCookie`) of a signed-in person who can read the project.
1214
+ * @summary List the admins of a project
1215
+ */
1216
+ const listProjectAdmins = async (projectId, params, options) => {
1217
+ return customFetch(getListProjectAdminsUrl(projectId, params), {
1218
+ ...options,
1219
+ method: "GET"
1220
+ });
1221
+ };
1222
+ const getListProjectMembersUrl = (projectId, params) => {
1223
+ const normalizedParams = new URLSearchParams();
1224
+ Object.entries(params || {}).forEach(([key, value]) => {
1225
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
1226
+ });
1227
+ const stringifiedParams = normalizedParams.toString();
1228
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/members?${stringifiedParams}` : `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/members`;
1229
+ };
1230
+ /**
1231
+ * Lists the people who have a role on a project, with each person's strongest
1232
+ * role and how they hold it.
1233
+ *
1234
+ * A person appears once, with their strongest `relation` (`viewer`, `editor`
1235
+ * or `admin`; a stronger role includes the weaker ones) and one entry in
1236
+ * `sources` per way they hold that role:
1237
+ *
1238
+ * - `owning_team`: an active member of the team that owns the project, the
1239
+ * team a claim attaches the project to. It holds `admin`. Removing a grant
1240
+ * does not remove this access. It ends only when the person leaves the
1241
+ * team or the project changes owner.
1242
+ * - `grant`: an unexpired grant on the project, which is a role given to the
1243
+ * person (`grant_id` only) or to a team they are an active member of
1244
+ * (`grant_id` and `team`). Revoking that grant removes this source.
1245
+ *
1246
+ * Grants of a weaker role than the person's strongest are not in `sources`;
1247
+ * they still show in the project's grants (`queryGrants`,
1248
+ * `POST /grants/query`).
1249
+ *
1250
+ * Pass `relation` to list only the people whose strongest role is at least
1251
+ * that strong: `relation=admin` lists the people who can administer the
1252
+ * project.
1253
+ *
1254
+ * The list follows the authorization check. A person who left a team, or
1255
+ * whose team or user was deactivated, is not listed through it. Expired
1256
+ * grants are left out. Like the check, a direct user grant requires an
1257
+ * active user, so a suspended person's direct grant is not listed.
1258
+ *
1259
+ * Every caller who passes the project read check sees every listed person
1260
+ * and every team name on `sources`. Co-membership no longer filters the
1261
+ * roster.
1262
+ *
1263
+ * The list is ordered by `user_id` and paginated with `page_token`.
1264
+ * Authenticate with a project secret (`oauth2`), or with the session cookie
1265
+ * (`sessionCookie`) of a signed-in person who can read the project.
1266
+ * @summary List the members of a project
1267
+ */
1268
+ const listProjectMembers = async (projectId, params, options) => {
1269
+ return customFetch(getListProjectMembersUrl(projectId, params), {
1270
+ ...options,
1271
+ method: "GET"
1272
+ });
1273
+ };
1274
+ const getCreateProjectClaimUrl = (projectId) => {
1275
+ return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/init`;
1276
+ };
1277
+ /**
1278
+ * Starts a claim, which attaches a project created before sign-in to a
1279
+ * team, and returns the `claim_url` to open in a browser.
1280
+ *
1281
+ * A claim [attaches a project to a team](https://preview.zitadel.com/docs/concepts/project-team-user#claim)
1282
+ * so that the team's members administer it. This operation mints a
1283
+ * single-use, short-lived challenge for an unclaimed project. The developer
1284
+ * opens `claim_url`, signs in and completes the claim in the browser; see
1285
+ * `completeProjectClaim` (`POST /projects/{project_id}/claim/complete`). Poll `getProjectClaimStatus` (`GET /projects/{project_id}/claim/status`) with the returned `challenge_id`,
1286
+ * as `zitadel claim` does. The response's `expires_at` carries the exact expiry.
1287
+ *
1288
+ * Authenticate with the project secret that `createProject` (`POST /projects`) returns as
1289
+ * `project_secret`.
1290
+ *
1291
+ * A `409` means a team already claimed the project, and its details name
1292
+ * that team. A `410` means the project's 14-day claim window has closed,
1293
+ * which is final.
1294
+ * @summary Initialize a project claim
1295
+ */
1296
+ const createProjectClaim = async (projectId, options) => {
1297
+ return customFetch(getCreateProjectClaimUrl(projectId), {
1298
+ ...options,
1299
+ method: "POST"
1300
+ });
1301
+ };
1302
+ const getGetProjectClaimStatusUrl = (projectId, params) => {
1303
+ const normalizedParams = new URLSearchParams();
1304
+ Object.entries(params || {}).forEach(([key, value]) => {
1305
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
1306
+ });
1307
+ const stringifiedParams = normalizedParams.toString();
1308
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/status?${stringifiedParams}` : `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/status`;
1309
+ };
1310
+ /**
1311
+ * Returns the status of a claim challenge, `pending` or `completed`, while a
1312
+ * browser completes the claim.
1313
+ *
1314
+ * A [claim attaches a project to a team](https://preview.zitadel.com/docs/concepts/project-team-user#claim).
1315
+ * `zitadel claim` polls this operation after `createProjectClaim` (`POST /projects/{project_id}/claim/init`) starts the claim.
1316
+ * Once the project is claimed, the response is `completed` with the owning
1317
+ * team, the claim timestamp and the dashboard URL.
1318
+ *
1319
+ * The claim itself, not the polled challenge, decides the status. A project
1320
+ * claimed through another concurrent challenge also reports `completed`. A
1321
+ * completed claim keeps reporting `completed` past this challenge's expiry
1322
+ * and past the project's claim window.
1323
+ *
1324
+ * Pass the `challenge_id` that `createProjectClaim` returns. Authenticate with the
1325
+ * project secret that started the challenge. On `410` with `proj.claim_expired`, call
1326
+ * `createProjectClaim` again for a fresh challenge.
1327
+ * @summary Get the status of a project claim
1328
+ */
1329
+ const getProjectClaimStatus = async (projectId, params, options) => {
1330
+ return customFetch(getGetProjectClaimStatusUrl(projectId, params), {
1331
+ ...options,
1332
+ method: "GET"
1333
+ });
1334
+ };
1335
+ const getCompleteProjectClaimUrl = (projectId) => {
1336
+ return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/complete`;
1337
+ };
1338
+ /**
1339
+ * Completes a claim by attaching the project to the signed-in developer's
1340
+ * personal team.
1341
+ *
1342
+ * A [claim attaches a project to a team](https://preview.zitadel.com/docs/concepts/project-team-user#claim),
1343
+ * so that the team's members administer it. The claim page in the browser
1344
+ * calls this operation after the developer signs in, with the session cookie.
1345
+ * The `challenge_id` from the claim URL that `createProjectClaim` (`POST /projects/{project_id}/claim/init`) returns is the
1346
+ * request's single-use, browser-safe authorization.
1347
+ *
1348
+ * Claims are first-claim-wins and spend the challenge. If a team already
1349
+ * claimed the project, the request answers `409`. If the challenge lapsed
1350
+ * (`410` with `proj.claim_expired`), call `createProjectClaim` again for a fresh one.
1351
+ * @summary Complete a project claim
1352
+ */
1353
+ const completeProjectClaim = async (projectId, completeProjectClaimBody, options) => {
1354
+ return customFetch(getCompleteProjectClaimUrl(projectId), {
1355
+ ...options,
1356
+ method: "POST",
1357
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
1358
+ body: JSON.stringify(completeProjectClaimBody)
1359
+ });
1360
+ };
1361
+ const getGetProjectClaimWindowUrl = (projectId, params) => {
1362
+ const normalizedParams = new URLSearchParams();
1363
+ Object.entries(params || {}).forEach(([key, value]) => {
1364
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
1365
+ });
1366
+ const stringifiedParams = normalizedParams.toString();
1367
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/window?${stringifiedParams}` : `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/window`;
1368
+ };
1369
+ /**
1370
+ * Returns when a project's claim window closes and whether it has already
1371
+ * closed.
1372
+ *
1373
+ * The claim window is the 14 days after a project is created during which a
1374
+ * team can [claim it](https://preview.zitadel.com/docs/concepts/project-team-user#claim). The claim page
1375
+ * in the browser calls this operation to show how long is left.
1376
+ *
1377
+ * The request needs no credential, because the claim page calls it before the
1378
+ * developer has signed in. Holding the `challenge_id` from the claim URL that
1379
+ * `createProjectClaim` (`POST /projects/{project_id}/claim/init`) returns is the authorization, the same one `completeProjectClaim` (`POST /projects/{project_id}/claim/complete`)
1380
+ * accepts. The response reveals only the window, never the project itself.
1381
+ * Unlike `completeProjectClaim` it spends nothing, so reloading the page is safe.
1382
+ * @summary Get the claim window for a project
1383
+ */
1384
+ const getProjectClaimWindow = async (projectId, params, options) => {
1385
+ return customFetch(getGetProjectClaimWindowUrl(projectId, params), {
1386
+ ...options,
1387
+ method: "GET"
1388
+ });
1389
+ };
1390
+ const getAddProjectOriginUrl = (projectId) => {
1391
+ return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/origins`;
1392
+ };
1393
+ /**
1394
+ * Adds an origin pattern, a `pattern` and its `kind`, to the project's origins.
1395
+ *
1396
+ * An origin pattern says which web origins the project accepts. A `primary`
1397
+ * pattern must be an exact URL with no wildcard. A `preview` pattern may
1398
+ * include a single DNS-label wildcard.
1399
+ *
1400
+ * While the project has no patterns, it admits no origin except a loopback
1401
+ * origin, so the first pattern you add opens it to the origins that
1402
+ * pattern matches. Admitting an origin is not serving it: a new `primary`
1403
+ * origin answers `rel.not_deployed` until the next deploy to primary
1404
+ * (`zitadel deploy`).
1405
+ *
1406
+ * Adding a pattern that already exists with the same kind is idempotent and
1407
+ * answers `201` with the stored origin. If the pattern exists with the other
1408
+ * kind, the request is refused with `origin.kind_conflict`: remove it with
1409
+ * `removeProjectOrigin` (`POST /projects/{project_id}/origins/remove`), then add it again.
1410
+ * @summary Add an origin pattern
1411
+ */
1412
+ const addProjectOrigin = async (projectId, addProjectOriginBody, options) => {
1413
+ return customFetch(getAddProjectOriginUrl(projectId), {
1414
+ ...options,
1415
+ method: "POST",
1416
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
1417
+ body: JSON.stringify(addProjectOriginBody)
1418
+ });
1419
+ };
1420
+ const getRemoveProjectOriginUrl = (projectId) => {
1421
+ return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/origins/remove`;
1422
+ };
1423
+ /**
1424
+ * Removes one origin pattern from the project's origins.
1425
+ *
1426
+ * Requests from URLs only that pattern admitted are refused from then on.
1427
+ * Live previews and deployment history are untouched. Removing the last
1428
+ * pattern leaves an empty list, which admits no origin except a loopback
1429
+ * origin.
1430
+ * Removing a pattern that is already absent is idempotent and answers `204`.
1431
+ *
1432
+ * The body's `pattern` is a pattern `addProjectOrigin` (`POST /projects/{project_id}/origins`) stored.
1433
+ * @summary Remove an origin pattern
1434
+ */
1435
+ const removeProjectOrigin = async (projectId, removeProjectOriginBody, options) => {
1436
+ return customFetch(getRemoveProjectOriginUrl(projectId), {
1437
+ ...options,
1438
+ method: "POST",
1439
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
1440
+ body: JSON.stringify(removeProjectOriginBody)
1441
+ });
1442
+ };
1443
+ const getListProjectPreviewsUrl = (projectId, params) => {
1444
+ const normalizedParams = new URLSearchParams();
1445
+ Object.entries(params || {}).forEach(([key, value]) => {
1446
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
1447
+ });
1448
+ const stringifiedParams = normalizedParams.toString();
1449
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/previews?${stringifiedParams}` : `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/previews`;
1450
+ };
1451
+ /**
1452
+ * Lists the project's live previews, newest first by `created_at`.
1453
+ *
1454
+ * A preview is a URL with a deployment on it, served until it expires.
1455
+ * An expired or removed preview is not listed. What was deployed to it stays
1456
+ * in `GET /deployments`.
1457
+ * @summary List a project's previews
1458
+ */
1459
+ const listProjectPreviews = async (projectId, params, options) => {
1460
+ return customFetch(getListProjectPreviewsUrl(projectId, params), {
1461
+ ...options,
1462
+ method: "GET"
1463
+ });
1464
+ };
1465
+ const getRemoveProjectPreviewUrl = (projectId) => {
1466
+ return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/previews/remove`;
1467
+ };
1468
+ /**
1469
+ * Ends a preview before it expires: the URL stops being served at once.
1470
+ *
1471
+ * The deployments to it stay in the history. The call is idempotent.
1472
+ * A URL with no live preview answers `204` too. That includes one that
1473
+ * expired or was removed before, so a cleanup that races the expiry still
1474
+ * succeeds.
1475
+ *
1476
+ * The URL travels in the body rather than the path because an origin
1477
+ * contains `/`. Take it from `listProjectPreviews` (`GET /projects/{project_id}/previews`).
1478
+ * @summary Remove a preview
1479
+ */
1480
+ const removeProjectPreview = async (projectId, removeProjectPreviewBody, options) => {
1481
+ return customFetch(getRemoveProjectPreviewUrl(projectId), {
1482
+ ...options,
1483
+ method: "POST",
1484
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
1485
+ body: JSON.stringify(removeProjectPreviewBody)
1486
+ });
1487
+ };
1488
+ const getCreateSessionUrl = () => {
1489
+ return `${getApiBaseUrl()}/sessions`;
1490
+ };
1491
+ /**
1492
+ * Creates an anonymous session with no user and no factors (`state: building`).
1493
+ *
1494
+ * A session is the durable record of a signed-in user. This call is optional: an
1495
+ * authentication attempt creates a session implicitly if none is provided.
1496
+ * Create one explicitly when you want to:
1497
+ *
1498
+ * - Pre-allocate a `session_id` before the user is known, so device and telemetry signals
1499
+ * can be correlated with the eventual authenticated session from the start.
1500
+ * - Track anonymous state (bot detection, device fingerprint) that survives until authentication.
1501
+ *
1502
+ * The session belongs to the project of the project secret. A `project_id` that
1503
+ * names another project answers `403` with `proj.mismatch` and creates nothing:
1504
+ * send the credential's own project.
1505
+ *
1506
+ * Creating a session runs on the project credential (`session.write`). The returned
1507
+ * `session_token` is a session credential for the end-user client, not a
1508
+ * management scope. It is delivered as the `__Host-zitadel_session` cookie
1509
+ * (`zitadel_session` over plain http to a loopback host) and authorises the
1510
+ * self-service operations `GET /sessions/me` and `DELETE /sessions/me`
1511
+ * (`sessionCookie` scheme). The by-id operations `GET /sessions/{session_id}`
1512
+ * and `DELETE /sessions/{session_id}` are operator endpoints and require
1513
+ * `session.read` / `session.delete` instead.
1514
+ *
1515
+ * The `session_token` is superseded when a handoff exchange completes. Clients
1516
+ * must replace it at that point.
1517
+ *
1518
+ * Anonymous sessions expire after 10 minutes. The lifetime resets to the
1519
+ * configured full session lifetime when a completing authentication attempt
1520
+ * writes the first authentication factor.
1521
+ * @summary Create an anonymous session
1522
+ */
1523
+ const createSession = async (createSessionBody, options) => {
1524
+ return customFetch(getCreateSessionUrl(), {
1525
+ ...options,
1526
+ method: "POST",
1527
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
1528
+ body: JSON.stringify(createSessionBody)
1529
+ });
1530
+ };
1531
+ const getQuerySessionsUrl = (params) => {
1532
+ const normalizedParams = new URLSearchParams();
1533
+ Object.entries(params || {}).forEach(([key, value]) => {
1534
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
1535
+ });
1536
+ const stringifiedParams = normalizedParams.toString();
1537
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/query?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/query`;
1538
+ };
1539
+ /**
1540
+ * Returns a page of a project's sessions.
1541
+ *
1542
+ * Sessions of every lifecycle state are returned; each carries its `state`.
1543
+ * Requires the `session.read` scope.
1544
+ * @summary Query sessions
1545
+ */
1546
+ const querySessions = async (querySessionsBody, params, options) => {
1547
+ return customFetch(getQuerySessionsUrl(params), {
1548
+ ...options,
1549
+ method: "POST",
1550
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
1551
+ body: JSON.stringify(querySessionsBody)
1552
+ });
1553
+ };
1554
+ const getExchangeHandoffUrl = (params) => {
1555
+ const normalizedParams = new URLSearchParams();
1556
+ Object.entries(params || {}).forEach(([key, value]) => {
1557
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
1558
+ });
1559
+ const stringifiedParams = normalizedParams.toString();
1560
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/exchange?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/exchange`;
1561
+ };
1562
+ /**
1563
+ * Exchanges a handoff token for a session and a `session_token`.
1564
+ *
1565
+ * A handoff token is the short-lived, single-use credential that
1566
+ * `createAuthAttemptHandoff` (`POST /auth_attempts/{attempt_id}/handoff`) returns as `handoff_token` once an authentication attempt is
1567
+ * complete. This call consumes it. It is the last step of the sign-in sequence:
1568
+ * create the attempt, issue a challenge, verify the proof, create the handoff,
1569
+ * exchange it.
1570
+ *
1571
+ * The server resolves the originating authentication attempt from the token and then:
1572
+ *
1573
+ * | Originating authentication attempt | Outcome |
1574
+ * |---|---|
1575
+ * | No `session_id` | A new authenticated session is **created**. |
1576
+ * | `session_id` points to an anonymous session | Existing session is **upgraded**: user and factors written in, lifetime reset to the full session lifetime. |
1577
+ * | `session_id` points to an active session (step-up) | Existing session is **upgraded**: new factors merged, `assurance_levels[]` expanded. |
1578
+ *
1579
+ * The response shape is identical in all three cases.
1580
+ *
1581
+ * The `session_token` supersedes any previously issued `session_token` for the
1582
+ * same session. Clients must replace their stored token at this point.
1583
+ *
1584
+ * Requires a project service key (OAuth2 client credentials). The project comes
1585
+ * from the project secret. A query `project_id` that disagrees answers `403`
1586
+ * with `proj.mismatch`.
1587
+ *
1588
+ * The exchange resolves a deployment the same way as other runtime operations.
1589
+ * A deployment makes a release live, and a release is the configuration that
1590
+ * `zitadel deploy` publishes. With no browser `Origin` and
1591
+ * nothing deployed to the resolved target, the response is `409` with
1592
+ * `rel.not_deployed`: run `zitadel deploy`, then retry. A revoked release
1593
+ * answers `409` with `rel.revoked`.
1594
+ * @summary Exchange a handoff token for a session
1595
+ */
1596
+ const exchangeHandoff = async (exchangeHandoffBody, params, options) => {
1597
+ return customFetch(getExchangeHandoffUrl(params), {
1598
+ ...options,
1599
+ method: "POST",
1600
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
1601
+ body: JSON.stringify(exchangeHandoffBody)
1602
+ });
1603
+ };
1604
+ const getGetSessionUrl = (sessionId) => {
1605
+ return `${getApiBaseUrl()}/sessions/${encodeURIComponent(String(sessionId))}`;
1606
+ };
1607
+ /**
1608
+ * Returns the current state of a session, including its factors and all currently satisfied assurance levels.
1609
+ *
1610
+ * An assurance level is a profile, such as `urn:nist:aal:2`, that the
1611
+ * session's verified factors satisfy. `assurance_levels[]` may shrink over time
1612
+ * as factor freshness windows expire, without the session itself expiring.
1613
+ * To restore a dropped level, use step-up authentication: create an
1614
+ * authentication attempt with the same `session_id`.
1615
+ * @summary Get a session by ID
1616
+ */
1617
+ const getSession = async (sessionId, options) => {
1618
+ return customFetch(getGetSessionUrl(sessionId), {
1619
+ ...options,
1620
+ method: "GET"
1621
+ });
1622
+ };
1623
+ const getRevokeSessionUrl = (sessionId) => {
1624
+ return `${getApiBaseUrl()}/sessions/${encodeURIComponent(String(sessionId))}`;
1625
+ };
1626
+ /**
1627
+ * Revokes a session by deleting it, immediately and for good. A later
1628
+ * `getSession` (`GET /sessions/{session_id}`) for it answers `404`.
1629
+ *
1630
+ * This is the operator revoke path. It requires the `session.delete` scope on a
1631
+ * project-bound credential. End-user sign-out with the session cookie is
1632
+ * `DELETE /sessions/me` (`sessionCookie` scheme).
1633
+ *
1634
+ * Idempotent: revoking a session that does not exist, or was already revoked,
1635
+ * still returns `204`. After revocation, any tokens derived from the session are
1636
+ * invalidated.
1637
+ * @summary Revoke a session
1638
+ */
1639
+ const revokeSession = async (sessionId, options) => {
1640
+ return customFetch(getRevokeSessionUrl(sessionId), {
1641
+ ...options,
1642
+ method: "DELETE"
1643
+ });
1644
+ };
1645
+ const getGetMySessionUrl = (params) => {
1646
+ const normalizedParams = new URLSearchParams();
1647
+ Object.entries(params || {}).forEach(([key, value]) => {
1648
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
1649
+ });
1650
+ const stringifiedParams = normalizedParams.toString();
1651
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/me?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/me`;
1652
+ };
1653
+ /**
1654
+ * Returns the current state of the caller's session, including its factors and all currently satisfied assurance levels.
1655
+ *
1656
+ * With `project_id`, the session is returned only when it belongs to that project.
1657
+ *
1658
+ * An assurance level is a profile, such as `urn:nist:aal:2`, that the
1659
+ * session's verified factors satisfy. `assurance_levels[]` may shrink over time
1660
+ * as factor freshness windows expire, without the session itself expiring.
1661
+ * To restore a dropped level, use step-up authentication: create an
1662
+ * authentication attempt with the same `session_id`.
1663
+ * @summary Get my session
1664
+ */
1665
+ const getMySession = async (params, options) => {
1666
+ return customFetch(getGetMySessionUrl(params), {
1667
+ ...options,
1668
+ method: "GET"
1669
+ });
1670
+ };
1671
+ const getRevokeMySessionUrl = (params) => {
1672
+ const normalizedParams = new URLSearchParams();
1673
+ Object.entries(params || {}).forEach(([key, value]) => {
1674
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
1675
+ });
1676
+ const stringifiedParams = normalizedParams.toString();
1677
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/me?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/me`;
1678
+ };
1679
+ /**
1680
+ * Revokes the caller's own session by deleting it, which signs the user out.
1681
+ *
1682
+ * The request needs the session cookie issued at creation (or superseded by a
1683
+ * handoff exchange). It also needs the session's CSRF token from
1684
+ * `GET /sessions/me/csrf` in the `X-Zitadel-CSRF` header. Idempotent: if the session is already gone,
1685
+ * this still returns `204`. Any tokens derived from the session are
1686
+ * invalidated, and the response clears the cookie.
1687
+ *
1688
+ * With `project_id`, only a session of that project is revoked. A session of
1689
+ * another project is left alone, and so is its cookie.
1690
+ * @summary Revoke my session
1691
+ */
1692
+ const revokeMySession = async (params, options) => {
1693
+ return customFetch(getRevokeMySessionUrl(params), {
1694
+ ...options,
1695
+ method: "DELETE"
1696
+ });
1697
+ };
1698
+ const getGetMySessionCsrfTokenUrl = (params) => {
1699
+ const normalizedParams = new URLSearchParams();
1700
+ Object.entries(params || {}).forEach(([key, value]) => {
1701
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
1702
+ });
1703
+ const stringifiedParams = normalizedParams.toString();
1704
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/me/csrf?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/me/csrf`;
1705
+ };
1706
+ /**
1707
+ * Returns the session-bound token that protects against cross-site request
1708
+ * forgery (CSRF). Browser code sends it in the `X-Zitadel-CSRF` header on the
1709
+ * state-changing requests that the session cookie authenticates and that
1710
+ * require it; see the `sessionCookie` scheme. It authorizes nothing on its
1711
+ * own: the HttpOnly cookie is still the credential, and a cross-site page
1712
+ * cannot read this response. It stays the same for the life of the session,
1713
+ * so a client fetches it once per session.
1714
+ *
1715
+ * With `project_id`, the token is returned only when the session belongs to
1716
+ * that project.
1717
+ * @summary Get my session's CSRF token
1718
+ */
1719
+ const getMySessionCsrfToken = async (params, options) => {
1720
+ return customFetch(getGetMySessionCsrfTokenUrl(params), {
1721
+ ...options,
1722
+ method: "GET"
1723
+ });
1724
+ };
1725
+ const getPublishSchemaUrl = (params) => {
1726
+ const normalizedParams = new URLSearchParams();
1727
+ Object.entries(params || {}).forEach(([key, value]) => {
1728
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
1729
+ });
1730
+ const stringifiedParams = normalizedParams.toString();
1731
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/schemas?${stringifiedParams}` : `${getApiBaseUrl()}/schemas`;
1732
+ };
1733
+ /**
1734
+ * Publishes a user schema, the JSON Schema that says which attributes a user
1735
+ * has and which attribute identifies the user.
1736
+ *
1737
+ * The request is either a user schema (`kind: user-schema`) or a schema URL
1738
+ * (`kind: schema-url`) that the server resolves. The response is the stored
1739
+ * schema, as `getSchema` (`GET /schemas/{schema_id}`) returns it; its `id` is
1740
+ * what `createUser` (`POST /users`) takes as `schema`.
1741
+ *
1742
+ * The optional `$id` is the JSON Schema document URI that identifies the
1743
+ * schema in later requests. It is a stable identity for GitOps, not a
1744
+ * free-form resource key. When `$id` is omitted, the server generates a
1745
+ * `sch_*` URL. When provided, `$id` must be unique within the project and
1746
+ * should ideally be a valid URI pointing at where the schema can be accessed.
1747
+ * A `$id` that already exists in the project is refused; pick another or
1748
+ * omit it.
1749
+ * @summary Publish a schema
1750
+ */
1751
+ const publishSchema = async (publishSchemaBody, params, options) => {
1752
+ return customFetch(getPublishSchemaUrl(params), {
1753
+ ...options,
1754
+ method: "POST",
1755
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
1756
+ body: JSON.stringify(publishSchemaBody)
1757
+ });
1758
+ };
1759
+ const getListSchemasUrl = (params) => {
1760
+ const normalizedParams = new URLSearchParams();
1761
+ Object.entries(params || {}).forEach(([key, value]) => {
1762
+ if (Array.isArray(value) && ["expand"].includes(key)) {
1763
+ value.forEach((v) => {
1764
+ normalizedParams.append(key, v === null ? "null" : String(v));
1765
+ });
1766
+ return;
1767
+ }
1768
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
1769
+ });
1770
+ const stringifiedParams = normalizedParams.toString();
1771
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/schemas?${stringifiedParams}` : `${getApiBaseUrl()}/schemas`;
1772
+ };
1773
+ /**
1774
+ * Lists the schemas of a project, newest first, paginated with a cursor.
1775
+ * Filter by `object_type` or `kind`, and choose which revisions to return
1776
+ * with `revisions`.
1777
+ *
1778
+ * A schema's `id` is what `createUser` (`POST /users`) takes as `schema`.
1779
+ * @summary List schemas
1780
+ */
1781
+ const listSchemas = async (params, options) => {
1782
+ return customFetch(getListSchemasUrl(params), {
1783
+ ...options,
1784
+ method: "GET"
1785
+ });
1786
+ };
1787
+ const getGetSchemaUrl = (schemaId, params) => {
1788
+ const normalizedParams = new URLSearchParams();
1789
+ Object.entries(params || {}).forEach(([key, value]) => {
1790
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
1791
+ });
1792
+ const stringifiedParams = normalizedParams.toString();
1793
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/schemas/${encodeURIComponent(String(schemaId))}?${stringifiedParams}` : `${getApiBaseUrl()}/schemas/${encodeURIComponent(String(schemaId))}`;
1794
+ };
1795
+ /**
1796
+ * Returns a schema by ID. A schema ID identifies one immutable revision, so
1797
+ * this returns exactly that revision. To find the current revision of an
1798
+ * object type, call `listSchemas` (`GET /schemas`) with `revisions=latest`.
1799
+ *
1800
+ * Schema IDs are unique within a project, not across projects (the seeded
1801
+ * default schema carries the same `$id` in every project). A console
1802
+ * session that manages more than one project names the project with
1803
+ * `project_id`; without it, the ID is resolved in the credential's own
1804
+ * project when it is ambiguous. A project secret always resolves in its
1805
+ * own project and ignores `project_id`.
1806
+ * @summary Get a schema by ID
1807
+ */
1808
+ const getSchema = async (schemaId, params, options) => {
1809
+ return customFetch(getGetSchemaUrl(schemaId, params), {
1810
+ ...options,
1811
+ method: "GET"
1812
+ });
1813
+ };
1814
+ const getPublishFlowDefinitionUrl = () => {
1815
+ return `${getApiBaseUrl()}/flow_definitions`;
1816
+ };
1817
+ /**
1818
+ * Publishes a new revision of a flow definition, creating the flow definition
1819
+ * on its first publish. It records a `flowdef.created` event.
1820
+ *
1821
+ * A [flow definition](https://preview.zitadel.com/docs/concepts/flows-and-schemas) is a template that
1822
+ * defines the sequence of steps (capabilities) for one user journey, such as
1823
+ * registration, login or password reset. The body follows the flow
1824
+ * definition schema, which includes the flow's purpose, audience and steps.
1825
+ *
1826
+ * Every call allocates a new opaque ID. That `id` is the `revision_id` a
1827
+ * release pins for `kind: flow_definition`.
1828
+ *
1829
+ * Revisions of one flow share its `name`. Posting a definition under an
1830
+ * existing `name` publishes a new revision of that flow, which is not a
1831
+ * conflict. List with `name` to see a flow's revisions, newest by creation
1832
+ * time first.
1833
+ * @summary Publish a flow definition
1834
+ */
1835
+ const publishFlowDefinition = async (publishFlowDefinitionBody, options) => {
1836
+ return customFetch(getPublishFlowDefinitionUrl(), {
1837
+ ...options,
1838
+ method: "POST",
1839
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
1840
+ body: JSON.stringify(publishFlowDefinitionBody)
1841
+ });
1842
+ };
1843
+ const getListFlowDefinitionsUrl = (params) => {
1844
+ const normalizedParams = new URLSearchParams();
1845
+ Object.entries(params || {}).forEach(([key, value]) => {
1846
+ if (Array.isArray(value) && ["expand"].includes(key)) {
1847
+ value.forEach((v) => {
1848
+ normalizedParams.append(key, v === null ? "null" : String(v));
1849
+ });
1850
+ return;
1851
+ }
1852
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
1853
+ });
1854
+ const stringifiedParams = normalizedParams.toString();
1855
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/flow_definitions?${stringifiedParams}` : `${getApiBaseUrl()}/flow_definitions`;
1856
+ };
1857
+ /**
1858
+ * Lists the project's flow definitions with their configurations, newest by
1859
+ * creation time first. A flow definition sets which step of a sign-in
1860
+ * renders when, and which fields each step collects.
1861
+ *
1862
+ * The `id` of an entry is the flow definition ID that `getFlowDefinition` (`GET /flow_definitions/{flow_definition_id}`)
1863
+ * takes. Filter by `name` to list the revisions of one flow.
1864
+ * @summary List flow definitions
1865
+ */
1866
+ const listFlowDefinitions = async (params, options) => {
1867
+ return customFetch(getListFlowDefinitionsUrl(params), {
1868
+ ...options,
1869
+ method: "GET"
1870
+ });
1871
+ };
1872
+ const getGetFlowDefinitionUrl = (flowDefinitionId) => {
1873
+ return `${getApiBaseUrl()}/flow_definitions/${encodeURIComponent(String(flowDefinitionId))}`;
1874
+ };
1875
+ /**
1876
+ * Returns one flow definition revision. Pass the `id` that
1877
+ * `publishFlowDefinition` (`POST /flow_definitions`) or `listFlowDefinitions` (`GET /flow_definitions`) returns.
1878
+ * @summary Get a flow definition by ID
1879
+ */
1880
+ const getFlowDefinition = async (flowDefinitionId, options) => {
1881
+ return customFetch(getGetFlowDefinitionUrl(flowDefinitionId), {
1882
+ ...options,
1883
+ method: "GET"
1884
+ });
1885
+ };
1886
+ const getCreateTeamUrl = (params) => {
1887
+ const normalizedParams = new URLSearchParams();
1888
+ Object.entries(params || {}).forEach(([key, value]) => {
1889
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
1890
+ });
1891
+ const stringifiedParams = normalizedParams.toString();
1892
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/teams?${stringifiedParams}` : `${getApiBaseUrl()}/teams`;
1893
+ };
1894
+ /**
1895
+ * Creates a team in the project, with a name no other team in the project has.
1896
+ *
1897
+ * A team groups users inside a project and can represent a customer. A taken
1898
+ * name is refused with `409 team.already_exists`: choose another name. The
1899
+ * new team has no members yet.
1900
+ * @summary Create a team
1901
+ */
1902
+ const createTeam = async (createTeamBody, params, options) => {
1903
+ return customFetch(getCreateTeamUrl(params), {
1904
+ ...options,
1905
+ method: "POST",
1906
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
1907
+ body: JSON.stringify(createTeamBody)
1908
+ });
1909
+ };
1910
+ const getQueryTeamsUrl = (params) => {
1911
+ const normalizedParams = new URLSearchParams();
1912
+ Object.entries(params || {}).forEach(([key, value]) => {
1913
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
1914
+ });
1915
+ const stringifiedParams = normalizedParams.toString();
1916
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/teams/query?${stringifiedParams}` : `${getApiBaseUrl()}/teams/query`;
1917
+ };
1918
+ /**
1919
+ * Returns a page of a project's teams.
1920
+ *
1921
+ * Pass the response's `next_page_token` as `page_token` to fetch the next
1922
+ * page. `project_id` names the project to list; without it, the credential's
1923
+ * own project is listed.
1924
+ * @summary Query teams
1925
+ */
1926
+ const queryTeams = async (queryTeamsBody, params, options) => {
1927
+ return customFetch(getQueryTeamsUrl(params), {
1928
+ ...options,
1929
+ method: "POST",
1930
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
1931
+ body: JSON.stringify(queryTeamsBody)
1932
+ });
1933
+ };
1934
+ const getGetTeamUrl = (teamId) => {
1935
+ return `${getApiBaseUrl()}/teams/${encodeURIComponent(String(teamId))}`;
1936
+ };
1937
+ /**
1938
+ * Returns a team, a group of users inside a project, by ID.
1939
+ *
1940
+ * A deactivated team is still returned, with status `deactivated`.
1941
+ * @summary Get a team by ID
1942
+ */
1943
+ const getTeam = async (teamId, options) => {
1944
+ return customFetch(getGetTeamUrl(teamId), {
1945
+ ...options,
1946
+ method: "GET"
1947
+ });
1948
+ };
1949
+ const getDeactivateTeamUrl = (teamId) => {
1950
+ return `${getApiBaseUrl()}/teams/${encodeURIComponent(String(teamId))}`;
1951
+ };
1952
+ /**
1953
+ * Deactivates a team and removes its memberships.
1954
+ *
1955
+ * The team is kept rather than erased: `getTeam` (`GET /teams/{team_id}`) still returns it with
1956
+ * status `deactivated`. The users whose lifecycle the team owns are
1957
+ * deactivated with it.
1958
+ *
1959
+ * The request is idempotent. Deleting a team that is already deactivated
1960
+ * or does not exist succeeds without changing anything.
1961
+ *
1962
+ * A team that still owns a project is refused with `409 team.owns_project`.
1963
+ * Deactivating it would leave the project owned by a deactivated team and so
1964
+ * unmanageable. No endpoint ends a team's ownership of a project yet, so for
1965
+ * now such a team cannot be deactivated through the API.
1966
+ * @summary Deactivate a team
1967
+ */
1968
+ const deactivateTeam = async (teamId, options) => {
1969
+ return customFetch(getDeactivateTeamUrl(teamId), {
1970
+ ...options,
1971
+ method: "DELETE"
1972
+ });
1973
+ };
1974
+ const getUpdateTeamUrl = (teamId) => {
1975
+ return `${getApiBaseUrl()}/teams/${encodeURIComponent(String(teamId))}`;
1976
+ };
1977
+ /**
1978
+ * Renames an active team.
1979
+ *
1980
+ * Only active teams can be updated. A deactivated team answers `404`. The new
1981
+ * name must be unique within the project, and a taken name answers `409`:
1982
+ * choose another name.
1983
+ * @summary Update a team
1984
+ */
1985
+ const updateTeam = async (teamId, updateTeamBody, options) => {
1986
+ return customFetch(getUpdateTeamUrl(teamId), {
1987
+ ...options,
1988
+ method: "PATCH",
1989
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
1990
+ body: JSON.stringify(updateTeamBody)
1991
+ });
1992
+ };
1993
+ const getSearchUrl = (params) => {
1994
+ const normalizedParams = new URLSearchParams();
1995
+ Object.entries(params || {}).forEach(([key, value]) => {
1996
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
1997
+ });
1998
+ const stringifiedParams = normalizedParams.toString();
1999
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/search?${stringifiedParams}` : `${getApiBaseUrl()}/search`;
2000
+ };
2001
+ /**
2002
+ * Finds the resources of one project, or of the projects a person can act on, that match a text, across resource types.
2003
+ *
2004
+ * `query` is what the person typed and `types` names the kinds of result to
2005
+ * look for; only those are searched. Each result is a reference: its `type`,
2006
+ * its `id`, its `project_id`, a `title` and sometimes a `subtitle`. Read the
2007
+ * resource itself with the type's own operation, for example `getUser`
2008
+ * (`GET /users/{user_id}`) or `getTeam` (`GET /teams/{team_id}`), in the
2009
+ * result's project.
2010
+ *
2011
+ * What a type matches on:
2012
+ * - `user`: the start of the value they carry as `identifier` or of a part
2013
+ * of their `display` name, from three characters on
2014
+ * - `team`: its name
2015
+ * - `schema`: the `title` and the `objectType` of a user schema
2016
+ * - `flow_definition`: its name
2017
+ * - `idp`: the `slug` and the `display_name` of an identity provider
2018
+ * connection
2019
+ *
2020
+ * A user matches from the start of a value. Every other type matches from
2021
+ * the start of a name or of a word in it, so `staff` finds "Partner Staff"
2022
+ * and `sso` finds `partner-sso`. Matching ignores case. A `query` that is the
2023
+ * `id` of a resource of a requested type finds that one. A schema and a flow
2024
+ * definition are found at their newest revision.
2025
+ *
2026
+ * `project_id` names the project to search. Without it, a project secret
2027
+ * searches its own project, and a console session searches the projects the
2028
+ * person can act on: the ones `listMyProjects` (`GET /users/me/projects`)
2029
+ * lists, at most the newest 10 by when each was created (`order=desc`).
2030
+ * `more_projects` says the person can act on more than that; search one of
2031
+ * the others by naming it. A caller with access to part of a project finds
2032
+ * only what that access covers.
2033
+ *
2034
+ * Authenticate with the project secret (`oauth2`) or a console session cookie
2035
+ * (`sessionCookie`). A preview secret is refused, as on every management
2036
+ * operation.
2037
+ *
2038
+ * Results come best match first, at most `limit_per_type` of each type
2039
+ * across every searched project, and types can be mixed in the order.
2040
+ * `incomplete_types` lists the types that have more to show: page those with
2041
+ * the type's own list, such as `queryUsers` (`POST /users/query`) or
2042
+ * `queryTeams` (`POST /teams/query`).
2043
+ *
2044
+ * How text is matched and ranked can change, and later versions can match
2045
+ * more of a resource. Treat the results as suggestions; to filter by an exact
2046
+ * rule, use the type's own list.
2047
+ * @summary Search projects
2048
+ */
2049
+ const search = async (searchBody, params, options) => {
2050
+ return customFetch(getSearchUrl(params), {
2051
+ ...options,
2052
+ method: "POST",
2053
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
2054
+ body: JSON.stringify(searchBody)
2055
+ });
2056
+ };
2057
+ const getPublishBrandingUrl = (params) => {
2058
+ const normalizedParams = new URLSearchParams();
2059
+ Object.entries(params || {}).forEach(([key, value]) => {
2060
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2061
+ });
2062
+ const stringifiedParams = normalizedParams.toString();
2063
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/branding?${stringifiedParams}` : `${getApiBaseUrl()}/branding`;
2064
+ };
2065
+ /**
2066
+ * Publishes a new immutable branding revision for the project, and records a
2067
+ * `branding.created` event. Branding revisions cannot be updated or deleted.
2068
+ * Every edit publishes a new revision. Flow responses carry the branding
2069
+ * revision the request's release pins.
2070
+ *
2071
+ * The `id` of the new revision is the revision ID a release pins for
2072
+ * `kind: branding`.
2073
+ *
2074
+ * The `liquid_template` is validated lexically on save (size, encoding,
2075
+ * banned patterns such as `<script>` tags, inline event handlers, and the
2076
+ * `| raw` filter). Authoritative LiquidJS validation runs at authoring
2077
+ * time, in `zitadel deploy` and `zitadel deploy --dry-run`.
2078
+ * @summary Publish a branding revision
2079
+ */
2080
+ const publishBranding = async (publishBrandingBody, params, options) => {
2081
+ return customFetch(getPublishBrandingUrl(params), {
2082
+ ...options,
2083
+ method: "POST",
2084
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
2085
+ body: JSON.stringify(publishBrandingBody)
2086
+ });
2087
+ };
2088
+ const getListBrandingUrl = (params) => {
2089
+ const normalizedParams = new URLSearchParams();
2090
+ Object.entries(params || {}).forEach(([key, value]) => {
2091
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2092
+ });
2093
+ const stringifiedParams = normalizedParams.toString();
2094
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/branding?${stringifiedParams}` : `${getApiBaseUrl()}/branding`;
2095
+ };
2096
+ /**
2097
+ * Lists a project's branding revisions, newest first, paginated with a cursor.
2098
+ * The first entry of the first page is the newest revision.
2099
+ *
2100
+ * Every publish adds a revision, so the list grows without bound. Pass
2101
+ * `next_page_token` back as `page_token` to read the next page.
2102
+ *
2103
+ * The `id` of an entry is the revision ID that `getBranding` (`GET /branding/{branding_id}`) takes and
2104
+ * that a release pins for `kind: branding`.
2105
+ * @summary List branding revisions
2106
+ */
2107
+ const listBranding = async (params, options) => {
2108
+ return customFetch(getListBrandingUrl(params), {
2109
+ ...options,
2110
+ method: "GET"
2111
+ });
2112
+ };
2113
+ const getGetBrandingUrl = (brandingId) => {
2114
+ return `${getApiBaseUrl()}/branding/${encodeURIComponent(String(brandingId))}`;
2115
+ };
2116
+ /**
2117
+ * Returns one branding revision, including its stored configuration. Pass the
2118
+ * `id` that `publishBranding` (`POST /branding`) or `listBranding` (`GET /branding`) returns.
2119
+ * @summary Get a branding revision by ID
2120
+ */
2121
+ const getBranding = async (brandingId, options) => {
2122
+ return customFetch(getGetBrandingUrl(brandingId), {
2123
+ ...options,
2124
+ method: "GET"
2125
+ });
2126
+ };
2127
+ const getGetOAuthSettingsUrl = (oauthSettingsId) => {
2128
+ return `${getApiBaseUrl()}/oauth_settings/${encodeURIComponent(String(oauthSettingsId))}`;
2129
+ };
2130
+ /**
2131
+ * Returns one OAuth settings revision, including its stored settings. Pass
2132
+ * the `revision_id` of the `kind: oauth` pointer on a release, which
2133
+ * `buildRelease` (`POST /releases/build`) and `getRelease`
2134
+ * (`GET /releases/{release_id}`) return.
2135
+ *
2136
+ * A release is the only writer of OAuth settings, so there is no operation
2137
+ * that publishes a revision on its own: put `oauth` in the bundle that
2138
+ * `buildRelease` takes.
2139
+ * @summary Get an OAuth settings revision by ID
2140
+ */
2141
+ const getOAuthSettings = async (oauthSettingsId, options) => {
2142
+ return customFetch(getGetOAuthSettingsUrl(oauthSettingsId), {
2143
+ ...options,
2144
+ method: "GET"
2145
+ });
2146
+ };
2147
+ const getPublishIdpUrl = (params) => {
2148
+ const normalizedParams = new URLSearchParams();
2149
+ Object.entries(params || {}).forEach(([key, value]) => {
2150
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2151
+ });
2152
+ const stringifiedParams = normalizedParams.toString();
2153
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps?${stringifiedParams}` : `${getApiBaseUrl()}/idps`;
2154
+ };
2155
+ /**
2156
+ * Creates or revises an identity provider, an external sign-in such as
2157
+ * Google, from its connection document. If the slug does not already exist,
2158
+ * a new identity provider is created. If one with that slug already exists,
2159
+ * a revision is created.
2160
+ *
2161
+ * A revision gets a new `revision_id` and does not modify the identity
2162
+ * provider's `id`. Identity links, which tie a user to an account at the
2163
+ * provider, keep resolving. Releases and authentication attempts stay pinned
2164
+ * to the revision they captured.
2165
+ *
2166
+ * Identity fields are fixed for the life of the identity provider and a
2167
+ * revision that changes one is rejected: `protocol`, `subject_claim`, and
2168
+ * `issuer`, the field that names the authority. Their values decide which provider
2169
+ * account a stored subject belongs to, so changing one would silently
2170
+ * repoint existing identities at a different provider.
2171
+ *
2172
+ * `subject_claim` is optional, and `sub` is used as the default value. If a
2173
+ * revision updates `subject_claim` to a different value than the one set
2174
+ * during creation, the request is rejected.
2175
+ *
2176
+ * OIDC is the only protocol.
2177
+ *
2178
+ * The document is validated against the `idp-connection.json` schema before
2179
+ * anything is stored. The rules the server applies when it starts a sign-in
2180
+ * then run on the document, so a document that could never start one is
2181
+ * refused here with `idp.endpoints_partial`: the OIDC block sets an endpoint
2182
+ * without the others. Set no endpoint, and discovery fills them, or set
2183
+ * `authorization_endpoint`, `token_endpoint`, `jwks_uri`, and
2184
+ * `userinfo_endpoint`. `userinfo_endpoint` may be left out when
2185
+ * `id_token_mapping` is on, but setting it alone still counts as setting an
2186
+ * endpoint. The details list the missing endpoints.
2187
+ *
2188
+ * A refused document stores nothing, and on a revise the current revision
2189
+ * stays unchanged.
2190
+ * @summary Create or revise an identity provider
2191
+ */
2192
+ const publishIdp = async (publishIdpBody, params, options) => {
2193
+ return customFetch(getPublishIdpUrl(params), {
2194
+ ...options,
2195
+ method: "POST",
2196
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
2197
+ body: JSON.stringify(publishIdpBody)
2198
+ });
2199
+ };
2200
+ const getQueryIdpsUrl = (params) => {
2201
+ const normalizedParams = new URLSearchParams();
2202
+ Object.entries(params || {}).forEach(([key, value]) => {
2203
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2204
+ });
2205
+ const stringifiedParams = normalizedParams.toString();
2206
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps/query?${stringifiedParams}` : `${getApiBaseUrl()}/idps/query`;
2207
+ };
2208
+ /**
2209
+ * Returns the identity providers of a project, external sign-ins such as
2210
+ * Google, paginated with a cursor. Each identity provider appears once, with
2211
+ * its newest revision.
2212
+ * @summary Query identity providers
2213
+ */
2214
+ const queryIdps = async (queryIdpsBody, params, options) => {
2215
+ return customFetch(getQueryIdpsUrl(params), {
2216
+ ...options,
2217
+ method: "POST",
2218
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
2219
+ body: JSON.stringify(queryIdpsBody)
2220
+ });
2221
+ };
2222
+ const getGetIdpUrl = (idpId, params) => {
2223
+ const normalizedParams = new URLSearchParams();
2224
+ Object.entries(params || {}).forEach(([key, value]) => {
2225
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2226
+ });
2227
+ const stringifiedParams = normalizedParams.toString();
2228
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps/${encodeURIComponent(String(idpId))}?${stringifiedParams}` : `${getApiBaseUrl()}/idps/${encodeURIComponent(String(idpId))}`;
2229
+ };
2230
+ /**
2231
+ * Returns an identity provider, an external sign-in such as Google, by ID at
2232
+ * its newest revision. `listIdpRevisions` (`GET /idps/{idp_id}/revisions`) lists
2233
+ * every revision of it.
2234
+ *
2235
+ * The lookup is scoped to the project in `project_id`.
2236
+ * @summary Get an identity provider by ID
2237
+ */
2238
+ const getIdp = async (idpId, params, options) => {
2239
+ return customFetch(getGetIdpUrl(idpId, params), {
2240
+ ...options,
2241
+ method: "GET"
2242
+ });
2243
+ };
2244
+ const getListIdpRevisionsUrl = (idpId, params) => {
2245
+ const normalizedParams = new URLSearchParams();
2246
+ Object.entries(params || {}).forEach(([key, value]) => {
2247
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2248
+ });
2249
+ const stringifiedParams = normalizedParams.toString();
2250
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps/${encodeURIComponent(String(idpId))}/revisions?${stringifiedParams}` : `${getApiBaseUrl()}/idps/${encodeURIComponent(String(idpId))}/revisions`;
2251
+ };
2252
+ /**
2253
+ * Lists every revision of one identity provider, an external sign-in such as
2254
+ * Google, newest first, paginated with a cursor. The order is fixed, so there
2255
+ * is no `sorting`.
2256
+ *
2257
+ * The lookup is scoped to the project in `project_id`.
2258
+ * @summary List the revisions of an identity provider
2259
+ */
2260
+ const listIdpRevisions = async (idpId, params, options) => {
2261
+ return customFetch(getListIdpRevisionsUrl(idpId, params), {
2262
+ ...options,
2263
+ method: "GET"
2264
+ });
2265
+ };
2266
+ const getGetIdpRevisionUrl = (revisionId, params) => {
2267
+ const normalizedParams = new URLSearchParams();
2268
+ Object.entries(params || {}).forEach(([key, value]) => {
2269
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2270
+ });
2271
+ const stringifiedParams = normalizedParams.toString();
2272
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps/revisions/${encodeURIComponent(String(revisionId))}?${stringifiedParams}` : `${getApiBaseUrl()}/idps/revisions/${encodeURIComponent(String(revisionId))}`;
2273
+ };
2274
+ /**
2275
+ * Returns one revision of an identity provider, an external sign-in such as
2276
+ * Google, by its `revision_id`, the value an authentication attempt or a
2277
+ * release pins.
2278
+ *
2279
+ * The lookup is scoped to the project in `project_id`.
2280
+ * @summary Get a revision of an identity provider
2281
+ */
2282
+ const getIdpRevision = async (revisionId, params, options) => {
2283
+ return customFetch(getGetIdpRevisionUrl(revisionId, params), {
2284
+ ...options,
2285
+ method: "GET"
2286
+ });
2287
+ };
2288
+ const getPublishApplicationUrl = (params) => {
2289
+ const normalizedParams = new URLSearchParams();
2290
+ Object.entries(params || {}).forEach(([key, value]) => {
2291
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2292
+ });
2293
+ const stringifiedParams = normalizedParams.toString();
2294
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/applications?${stringifiedParams}` : `${getApiBaseUrl()}/applications`;
2295
+ };
2296
+ /**
2297
+ * Creates or revises a registered application that authenticates its users
2298
+ * via Zitadel. If the slug does not already exist in the project, a new
2299
+ * application is created. If one with that slug already exists, a revision
2300
+ * is created.
2301
+ *
2302
+ * A revision gets a new `revision_id` and does not modify the application's
2303
+ * `id`. Sending an unchanged document also creates a revision. Each client
2304
+ * is matched to the stored one by its slug and keeps its `client_id`: a
2305
+ * revision that changes a client's `client_id` is rejected with
2306
+ * `app.field_immutable`. A revision keeps every client of the
2307
+ * stored document: one that omits a client is also rejected with
2308
+ * `app.field_immutable`, since removing a client is not available
2309
+ * yet. A client with a new slug is a new client. It takes the `client_id`
2310
+ * the document supplies, or the server generates one, and every response
2311
+ * carries it in `definition`. A `client_id` another client of the project
2312
+ * holds, or ever held, is rejected with `app.client_id_taken`.
2313
+ *
2314
+ * Every new client gets a secret, generated by the server and returned once
2315
+ * in `client_secrets`. The server stores only its hash, so no later read
2316
+ * returns it.
2317
+ *
2318
+ * The document is validated against the `application.json` schema before
2319
+ * anything is stored, and then against the rules the authorization server
2320
+ * applies: `refresh_token` comes with `authorization_code`, a client with
2321
+ * `authorization_code` has at least one redirect URI, and each redirect
2322
+ * URI meets the rules `redirect_uris` states. A document that breaks one
2323
+ * is refused with `app.invalid`, whose details identify the
2324
+ * setting.
2325
+ *
2326
+ * If the document is refused, no change is stored and an existing
2327
+ * application keeps its current revision.
2328
+ * @summary Create or revise a registered application
2329
+ */
2330
+ const publishApplication = async (publishApplicationBody, params, options) => {
2331
+ return customFetch(getPublishApplicationUrl(params), {
2332
+ ...options,
2333
+ method: "POST",
2334
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
2335
+ body: JSON.stringify(publishApplicationBody)
2336
+ });
2337
+ };
2338
+ const getGetApplicationUrl = (applicationId, params) => {
2339
+ const normalizedParams = new URLSearchParams();
2340
+ Object.entries(params || {}).forEach(([key, value]) => {
2341
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2342
+ });
2343
+ const stringifiedParams = normalizedParams.toString();
2344
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/applications/${encodeURIComponent(String(applicationId))}?${stringifiedParams}` : `${getApiBaseUrl()}/applications/${encodeURIComponent(String(applicationId))}`;
2345
+ };
2346
+ /**
2347
+ * Returns an application that authenticates its users via Zitadel, by ID
2348
+ * at its newest revision, with each client's `client_id` in `definition`. It
2349
+ * never returns a client secret: `publishApplication` (`POST /applications`)
2350
+ * shows one once, when it creates the client.
2351
+ *
2352
+ * The lookup is scoped to the project in `project_id`.
2353
+ * @summary Get an application by ID
2354
+ */
2355
+ const getApplication = async (applicationId, params, options) => {
2356
+ return customFetch(getGetApplicationUrl(applicationId, params), {
2357
+ ...options,
2358
+ method: "GET"
2359
+ });
2360
+ };
2361
+ const getListPoliciesUrl = (params) => {
2362
+ const normalizedParams = new URLSearchParams();
2363
+ Object.entries(params || {}).forEach(([key, value]) => {
2364
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2365
+ });
2366
+ const stringifiedParams = normalizedParams.toString();
2367
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies?${stringifiedParams}` : `${getApiBaseUrl()}/policies`;
2368
+ };
2369
+ /**
2370
+ * Lists the project's policies, one per operation, each as its newest
2371
+ * revision.
2372
+ *
2373
+ * A policy holds a project's rules for one operation, such as setting a
2374
+ * password. The list is ordered by `created_at` (first publish) and then
2375
+ * `id`. Filter by `operation` to read the policy of one operation; a project
2376
+ * that never published one gets an empty list.
2377
+ *
2378
+ * The lookup is scoped to the project in `project_id`.
2379
+ * @summary List policies
2380
+ */
2381
+ const listPolicies = async (params, options) => {
2382
+ return customFetch(getListPoliciesUrl(params), {
2383
+ ...options,
2384
+ method: "GET"
2385
+ });
2386
+ };
2387
+ const getPublishPolicyUrl = (params) => {
2388
+ const normalizedParams = new URLSearchParams();
2389
+ Object.entries(params || {}).forEach(([key, value]) => {
2390
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2391
+ });
2392
+ const stringifiedParams = normalizedParams.toString();
2393
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies?${stringifiedParams}` : `${getApiBaseUrl()}/policies`;
2394
+ };
2395
+ /**
2396
+ * Publishes the project's policy for an operation as a new immutable
2397
+ * revision, creating the policy on its first publish. A revision applies
2398
+ * once a deployed release pins it. Nothing already stored is
2399
+ * re-evaluated, so a stricter password policy applies the next time a
2400
+ * password is set.
2401
+ *
2402
+ * A policy holds a project's rules for one operation, such as setting a
2403
+ * password. The first publish records a `policy.created` event and every
2404
+ * later one a `policy.updated` event.
2405
+ *
2406
+ * The request is typed by `operation`. An unknown operation or setting, or
2407
+ * a value of the wrong type or outside its bounds, answers `req.invalid`
2408
+ * like any malformed request.
2409
+ *
2410
+ * The operation's template then checks the config again, together with the
2411
+ * rules that relate settings to each other (a `min_length` above
2412
+ * `max_length`), and answers `pol.invalid`. Its `details.details.violations`
2413
+ * lists everything that failed, settings first, then rules.
2414
+ * `{"setting": "min_length"}` names one setting. `{"config_rule":
2415
+ * "min_length_not_above_max_length", "settings": ["min_length",
2416
+ * "max_length"]}` names a rule across settings, with the settings it reads.
2417
+ * Fix what the violations list and publish again. To check a config without
2418
+ * publishing it, call `evaluatePolicy` (`POST /policies/evaluate`).
2419
+ *
2420
+ * A setting left out is off, and `{}` switches every rule off; there are no
2421
+ * defaults.
2422
+ * @summary Publish a policy
2423
+ */
2424
+ const publishPolicy = async (publishPolicyBody, params, options) => {
2425
+ return customFetch(getPublishPolicyUrl(params), {
2426
+ ...options,
2427
+ method: "POST",
2428
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
2429
+ body: JSON.stringify(publishPolicyBody)
2430
+ });
2431
+ };
2432
+ const getEvaluatePolicyUrl = (params) => {
2433
+ const normalizedParams = new URLSearchParams();
2434
+ Object.entries(params || {}).forEach(([key, value]) => {
2435
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2436
+ });
2437
+ const stringifiedParams = normalizedParams.toString();
2438
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies/evaluate?${stringifiedParams}` : `${getApiBaseUrl()}/policies/evaluate`;
2439
+ };
2440
+ /**
2441
+ * Evaluates a policy config against one request, without side effects, and
2442
+ * answers the decision the operation would reach. A policy holds a
2443
+ * project's rules for one operation, such as setting a password.
2444
+ *
2445
+ * Nothing is read from or written to the project. The config is the one in
2446
+ * the body, checked exactly as a publish checks it, so an invalid config
2447
+ * answers `pol.invalid` with the same violations. Fix the settings the
2448
+ * violations list and send the request again.
2449
+ *
2450
+ * `input` is what the operation's request carries, in the operation's own
2451
+ * terms (a password, not its length). The server derives what the policy
2452
+ * checks with the code the live operation runs, guards included. `facts`
2453
+ * states what the operation would look up at runtime, such as whether the
2454
+ * candidate matches one of the user's kept passwords.
2455
+ *
2456
+ * The decision and the names of the failed rules hold wherever the
2457
+ * operation runs. `code` and `violations` are what an API call answers. A
2458
+ * login flow shows the same rules as field errors on the password field
2459
+ * (`error.x-auth-methods#password_<rule>` in `step.error`).
2460
+ *
2461
+ * This operation does not choose which policy a project or release applies.
2462
+ * Read that policy, for example with `getPolicy` (`GET /policies/{policy_id}`), and pass its `config`.
2463
+ *
2464
+ * The caller needs read access to the project in `project_id`.
2465
+ * @summary Evaluate a policy
2466
+ */
2467
+ const evaluatePolicy = async (evaluatePolicyBody, params, options) => {
2468
+ return customFetch(getEvaluatePolicyUrl(params), {
2469
+ ...options,
2470
+ method: "POST",
2471
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
2472
+ body: JSON.stringify(evaluatePolicyBody)
2473
+ });
2474
+ };
2475
+ const getGetPolicyUrl = (policyId, params) => {
2476
+ const normalizedParams = new URLSearchParams();
2477
+ Object.entries(params || {}).forEach(([key, value]) => {
2478
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2479
+ });
2480
+ const stringifiedParams = normalizedParams.toString();
2481
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies/${encodeURIComponent(String(policyId))}?${stringifiedParams}` : `${getApiBaseUrl()}/policies/${encodeURIComponent(String(policyId))}`;
2482
+ };
2483
+ /**
2484
+ * Returns a policy as its newest revision. A revision applies once a deployed
2485
+ * release pins it.
2486
+ *
2487
+ * A policy holds a project's rules for one operation, such as setting a
2488
+ * password. Pass the `id` that `listPolicies` (`GET /policies`) or `publishPolicy` (`POST /policies`) returns.
2489
+ *
2490
+ * The lookup is scoped to the project in `project_id`: a policy of another
2491
+ * project answers not found exactly as an unknown ID does.
2492
+ * @summary Get a policy by ID
2493
+ */
2494
+ const getPolicy = async (policyId, params, options) => {
2495
+ return customFetch(getGetPolicyUrl(policyId, params), {
2496
+ ...options,
2497
+ method: "GET"
2498
+ });
2499
+ };
2500
+ const getListPolicyRevisionsUrl = (policyId, params) => {
2501
+ const normalizedParams = new URLSearchParams();
2502
+ Object.entries(params || {}).forEach(([key, value]) => {
2503
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2504
+ });
2505
+ const stringifiedParams = normalizedParams.toString();
2506
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies/${encodeURIComponent(String(policyId))}/revisions?${stringifiedParams}` : `${getApiBaseUrl()}/policies/${encodeURIComponent(String(policyId))}/revisions`;
2507
+ };
2508
+ /**
2509
+ * Lists every revision of one policy, newest first, one page at a time. The
2510
+ * order is fixed, so there is no `sorting`.
2511
+ *
2512
+ * Each publish of a policy adds a revision. Pass the policy `id` that
2513
+ * `listPolicies` (`GET /policies`) or `publishPolicy` (`POST /policies`) returns.
2514
+ *
2515
+ * The lookup is scoped to the project in `project_id`: a policy of another
2516
+ * project answers not found exactly as an unknown ID does.
2517
+ * @summary List the revisions of a policy
2518
+ */
2519
+ const listPolicyRevisions = async (policyId, params, options) => {
2520
+ return customFetch(getListPolicyRevisionsUrl(policyId, params), {
2521
+ ...options,
2522
+ method: "GET"
2523
+ });
2524
+ };
2525
+ const getGetPolicyRevisionUrl = (revisionId, params) => {
2526
+ const normalizedParams = new URLSearchParams();
2527
+ Object.entries(params || {}).forEach(([key, value]) => {
2528
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2529
+ });
2530
+ const stringifiedParams = normalizedParams.toString();
2531
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies/revisions/${encodeURIComponent(String(revisionId))}?${stringifiedParams}` : `${getApiBaseUrl()}/policies/revisions/${encodeURIComponent(String(revisionId))}`;
2532
+ };
2533
+ /**
2534
+ * Returns one revision of a policy, the newest or an older one.
2535
+ *
2536
+ * Pass the `revision_id` that `publishPolicy` (`POST /policies`) or `listPolicyRevisions` (`GET /policies/{policy_id}/revisions`)
2537
+ * returns.
2538
+ *
2539
+ * The lookup is scoped to the project in `project_id`: a revision of another
2540
+ * project answers not found exactly as an unknown ID does.
2541
+ * @summary Get a policy revision by ID
2542
+ */
2543
+ const getPolicyRevision = async (revisionId, params, options) => {
2544
+ return customFetch(getGetPolicyRevisionUrl(revisionId, params), {
2545
+ ...options,
2546
+ method: "GET"
2547
+ });
2548
+ };
2549
+ const getCreateReleaseUrl = (params) => {
2550
+ const normalizedParams = new URLSearchParams();
2551
+ Object.entries(params || {}).forEach(([key, value]) => {
2552
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2553
+ });
2554
+ const stringifiedParams = normalizedParams.toString();
2555
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases?${stringifiedParams}` : `${getApiBaseUrl()}/releases`;
2556
+ };
2557
+ /**
2558
+ * Creates a release from existing revisions, given as `(kind, revision_id)`
2559
+ * pairs. To build one from files on disk, use `buildRelease` (`POST /releases/build`)
2560
+ * (`POST /releases/build`).
2561
+ *
2562
+ * A release is a snapshot of the project's configuration: it pins one
2563
+ * revision of each resource it includes, and it is not tied to an origin.
2564
+ * Take each `revision_id` from the operation that created the revision, for
2565
+ * example the `id` that `publishBranding` (`POST /branding`) or `publishFlowDefinition` (`POST /flow_definitions`) returns.
2566
+ *
2567
+ * Each revision must exist in the project and is recorded under the handle
2568
+ * it declares. The release must be complete and consistent:
2569
+ *
2570
+ * - Every handle its revisions name must be in the release: a flow's
2571
+ * `user_schema`, and the identity provider (IdP) connections named by a
2572
+ * flow step's `sso_providers` or a schema's `x-auth-methods.sso.providers`.
2573
+ * A missing one answers `rel.unresolved_reference`, naming the resource and
2574
+ * the handle, for example `flow_definition default-login: user_schema
2575
+ * human-user not found`. Add the missing revision to the request.
2576
+ * - Every flow is validated as on save, against the user schema revision in
2577
+ * the release. A flow that fails answers `rel.invalid`, with the reason in
2578
+ * `details`. Fix the flow and send the request again.
2579
+ *
2580
+ * The call is idempotent on the set of revisions: the same revisions with a
2581
+ * different `message` answer `200` with the existing release. A new release
2582
+ * answers `201`.
2583
+ *
2584
+ * Creating a release does not deploy it. Pass the returned `id` to
2585
+ * `createDeployment` (`POST /deployments`) to make the release live.
2586
+ * @summary Create a release
2587
+ */
2588
+ const createRelease = async (createReleaseBody, params, options) => {
2589
+ return customFetch(getCreateReleaseUrl(params), {
2590
+ ...options,
2591
+ method: "POST",
2592
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
2593
+ body: JSON.stringify(createReleaseBody)
2594
+ });
2595
+ };
2596
+ const getListReleasesUrl = (params) => {
2597
+ const normalizedParams = new URLSearchParams();
2598
+ Object.entries(params || {}).forEach(([key, value]) => {
2599
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2600
+ });
2601
+ const stringifiedParams = normalizedParams.toString();
2602
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases?${stringifiedParams}` : `${getApiBaseUrl()}/releases`;
2603
+ };
2604
+ /**
2605
+ * Lists the project's releases, newest first. A release is a snapshot of the
2606
+ * project's configuration.
2607
+ *
2608
+ * Entries carry the digest, the metadata and `revoked_at`. The pinned set is
2609
+ * omitted: read one release with `getRelease` (`GET /releases/{release_id}`) to get its pointers.
2610
+ *
2611
+ * The `id` of an entry is the release ID that `getRelease`,
2612
+ * `revokeRelease` (`POST /releases/{release_id}/revoke`) and `createDeployment` (`POST /deployments`) take.
2613
+ *
2614
+ * `content_hash` looks a release up by its content, as the CLI does when a
2615
+ * person types the digest a transcript printed. The project holds at most
2616
+ * one release per digest, so the filtered list has one entry or none. An
2617
+ * unknown digest is an empty list rather than an error. Paths take the
2618
+ * `rel_` ID only, so use the matched entry's `id` there.
2619
+ * @summary List releases
2620
+ */
2621
+ const listReleases = async (params, options) => {
2622
+ return customFetch(getListReleasesUrl(params), {
2623
+ ...options,
2624
+ method: "GET"
2625
+ });
2626
+ };
2627
+ const getBuildReleaseUrl = (params) => {
2628
+ const normalizedParams = new URLSearchParams();
2629
+ Object.entries(params || {}).forEach(([key, value]) => {
2630
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2631
+ });
2632
+ const stringifiedParams = normalizedParams.toString();
2633
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases/build?${stringifiedParams}` : `${getApiBaseUrl()}/releases/build`;
2634
+ };
2635
+ /**
2636
+ * Builds a release from the resources in `.zitadel/` as authored on disk,
2637
+ * grouped by kind, in one transaction.
2638
+ *
2639
+ * A release is a snapshot of the project's configuration. A failure anywhere
2640
+ * leaves no revision and no release. The caller records nothing. The CLI's
2641
+ * `deploy` command builds its release with this operation.
2642
+ *
2643
+ * If the project already holds a release with the same content, the same
2644
+ * `content_hash`, the request answers `200` with that release and allocates
2645
+ * nothing, however long ago it was built. Metadata is excluded from the
2646
+ * comparison, so the same content under a different `message` is the same
2647
+ * release.
2648
+ *
2649
+ * Otherwise every resource is compared with the project's newest revision of
2650
+ * the same handle. Unchanged content reuses that revision, and changed
2651
+ * content allocates a new one. The request answers `201` with the new
2652
+ * release. A policy whose config matches only an older revision allocates a
2653
+ * new one too, so the policy reads back as the config the build carried.
2654
+ *
2655
+ * A structurally malformed request is refused while decoding with
2656
+ * `req.invalid`, naming the offending fields. A well-formed bundle is then
2657
+ * checked resource by resource, as each kind's create endpoint checks it,
2658
+ * and every failure is reported at once. The request answers `400` with
2659
+ * `rel.invalid`, and `details.resources` lists each resource that failed.
2660
+ * Fix each listed resource and build again. A handle that resolves neither
2661
+ * in the bundle nor in the project answers `rel.unresolved_reference`,
2662
+ * naming the pointer and the handle. Add the missing resource to the bundle.
2663
+ *
2664
+ * Building writes revisions, so besides `release.write` it needs the write
2665
+ * scope of every kind the bundle carries a resource of: `schema.write`,
2666
+ * `flow_definition.write`, `branding.write`, `idp.write`, `policy.write`
2667
+ * and `oauth_settings.write`, as the per-kind create endpoints do. A missing scope answers `403` with
2668
+ * `rel.permission_denied`, naming the kind. Request a token with that scope.
2669
+ * An empty kind needs no scope.
2670
+ *
2671
+ * Building a release does not deploy it. A release is not tied to an origin,
2672
+ * and the same release can later be deployed to any number of origins
2673
+ * unchanged. Pass the returned `id` to `createDeployment` (`POST /deployments`).
2674
+ * @summary Build a release from files
2675
+ */
2676
+ const buildRelease = async (buildReleaseBody, params, options) => {
2677
+ return customFetch(getBuildReleaseUrl(params), {
2678
+ ...options,
2679
+ method: "POST",
2680
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
2681
+ body: JSON.stringify(buildReleaseBody)
2682
+ });
2683
+ };
2684
+ const getGetReleaseUrl = (releaseId, params) => {
2685
+ const normalizedParams = new URLSearchParams();
2686
+ Object.entries(params || {}).forEach(([key, value]) => {
2687
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2688
+ });
2689
+ const stringifiedParams = normalizedParams.toString();
2690
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases/${encodeURIComponent(String(releaseId))}?${stringifiedParams}` : `${getApiBaseUrl()}/releases/${encodeURIComponent(String(releaseId))}`;
2691
+ };
2692
+ /**
2693
+ * Returns one release: its digest, its metadata, whether it was revoked, and
2694
+ * the `(kind, handle, revision_id)` tuples it pins. A release is a snapshot
2695
+ * of the project's configuration.
2696
+ *
2697
+ * The path takes the `rel_` ID only: the `id` that `createRelease` (`POST /releases`),
2698
+ * `buildRelease` (`POST /releases/build`) or `listReleases` (`GET /releases`) returns. To find a release from its
2699
+ * digest, list with the `content_hash` filter and read the matched entry's
2700
+ * `id`.
2701
+ *
2702
+ * The response does not embed resource content. Resolve each `revision_id`
2703
+ * through the per-kind read endpoints when the bytes are needed.
2704
+ *
2705
+ * The lookup is scoped to the project in `project_id`. A release ID
2706
+ * belonging to another project answers not found exactly as an unknown ID
2707
+ * does, so the endpoint cannot be used to probe for releases in projects the
2708
+ * caller cannot read.
2709
+ * @summary Get a release by ID
2710
+ */
2711
+ const getRelease = async (releaseId, params, options) => {
2712
+ return customFetch(getGetReleaseUrl(releaseId, params), {
2713
+ ...options,
2714
+ method: "GET"
2715
+ });
2716
+ };
2717
+ const getRevokeReleaseUrl = (releaseId, params) => {
2718
+ const normalizedParams = new URLSearchParams();
2719
+ Object.entries(params || {}).forEach(([key, value]) => {
2720
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2721
+ });
2722
+ const stringifiedParams = normalizedParams.toString();
2723
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases/${encodeURIComponent(String(releaseId))}/revoke?${stringifiedParams}` : `${getApiBaseUrl()}/releases/${encodeURIComponent(String(releaseId))}/revoke`;
2724
+ };
2725
+ /**
2726
+ * Revokes a release, so that its content is never served again. Pass the
2727
+ * `id` that `createRelease` (`POST /releases`), `buildRelease` (`POST /releases/build`) or `listReleases` (`GET /releases`) returns. It
2728
+ * records a `release.revoked` event.
2729
+ *
2730
+ * From then on the release cannot be deployed. Every path that would serve
2731
+ * it refuses it with `rel.revoked`, including a build that pins its digest.
2732
+ *
2733
+ * A release that any origin still serves cannot be revoked. An origin serves
2734
+ * the release of the newest deployment to it, so the call answers `409` with
2735
+ * `rel.in_use`, naming each such origin, that deployment and whether the
2736
+ * origin is primary or a preview. Deploy another release to a primary origin
2737
+ * or roll it back, and remove a preview, then revoke. Revoking therefore
2738
+ * never takes an origin down. Deployments that named the release earlier stay in
2739
+ * the history.
2740
+ *
2741
+ * The call is idempotent: revoking a release that is already revoked answers
2742
+ * `200` with the release unchanged, and `revoked_at` still names the first
2743
+ * revocation. There is no un-revoke. To serve that configuration again,
2744
+ * change it and build a new release: rebuilding unchanged content returns
2745
+ * the same revoked release.
2746
+ *
2747
+ * The call takes no body. The lookup is scoped to the project in
2748
+ * `project_id`, so a release ID of another project answers not found exactly
2749
+ * as an unknown ID does.
2750
+ * @summary Revoke a release
2751
+ */
2752
+ const revokeRelease = async (releaseId, params, options) => {
2753
+ return customFetch(getRevokeReleaseUrl(releaseId, params), {
2754
+ ...options,
2755
+ method: "POST"
2756
+ });
2757
+ };
2758
+ const getCreateGrantUrl = (params) => {
2759
+ const normalizedParams = new URLSearchParams();
2760
+ Object.entries(params || {}).forEach(([key, value]) => {
2761
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2762
+ });
2763
+ const stringifiedParams = normalizedParams.toString();
2764
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/grants?${stringifiedParams}` : `${getApiBaseUrl()}/grants`;
2765
+ };
2766
+ /**
2767
+ * Creates a grant that gives a user or a team the `project.viewer`, `project.editor` or `project.admin` role on a project.
2768
+ *
2769
+ * The project is the one named by the `project_id` query parameter. Name the
2770
+ * principal with `user` (`user_id` or `identifier`) or `team` (`team_id` or
2771
+ * `name`). The `id` in the response (`asgn_<opaque>`) is the grant ID that
2772
+ * `getGrant` (`GET /grants/{grant_id}`) and `deleteGrant` (`DELETE /grants/{grant_id}`) take. Owning-team (`project.team`) grants are not
2773
+ * created here: a claim, which attaches a project to a team, creates them.
2774
+ *
2775
+ * An unrevoked grant with the same principal and relation holds that binding
2776
+ * even after `expires_at`. Revoke it with `deleteGrant` before you create it
2777
+ * again.
2778
+ *
2779
+ * Create does not accept `expand`. The `user_id` and team locators return `201`,
2780
+ * whose `user` and `team` carry only `user_id` and `team_id`. They still answer
2781
+ * `404` or `409` when the principal is missing or the grant already exists.
2782
+ * Creating by `user.identifier` answers `202` with no body on every outcome.
2783
+ * Granting the session caller's own user is `grant.invalid` on either user
2784
+ * locator. A `201` grant names its user or team by ID only: read it back
2785
+ * with `getGrant` for the identifier and display name. A `202` returns no
2786
+ * grant ID: find the grant with `queryGrants` (`POST /grants/query`), filtered by `user_id`.
2787
+ *
2788
+ * Authenticate with a project secret (`oauth2`) or a console session cookie
2789
+ * (`sessionCookie`). A session caller is authorized as the signed-in person
2790
+ * against the target project, even when the session belongs to another project.
2791
+ * Cookie requests follow that scheme's CSRF rules.
2792
+ * @summary Create a grant
2793
+ */
2794
+ const createGrant = async (createGrantBody, params, options) => {
2795
+ return customFetch(getCreateGrantUrl(params), {
2796
+ ...options,
2797
+ method: "POST",
2798
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
2799
+ body: JSON.stringify(createGrantBody)
2800
+ });
2801
+ };
2802
+ const getQueryGrantsUrl = (params) => {
2803
+ const normalizedParams = new URLSearchParams();
2804
+ Object.entries(params || {}).forEach(([key, value]) => {
2805
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2806
+ });
2807
+ const stringifiedParams = normalizedParams.toString();
2808
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/grants/query?${stringifiedParams}` : `${getApiBaseUrl()}/grants/query`;
2809
+ };
2810
+ /**
2811
+ * Returns a page of a project's grants.
2812
+ *
2813
+ * Only unrevoked grants this API manages are listed, which bind a user or team
2814
+ * to the viewer, editor or admin role. Expired grants are included, so a client
2815
+ * can revoke them with `deleteGrant` (`DELETE /grants/{grant_id}`) before it grants the same binding again.
2816
+ * Project-secret setup (`sk_proj`) and owning-team (`relation=team`) rows are
2817
+ * not returned. Requires `project.read`.
2818
+ *
2819
+ * `expand: ["principal"]` adds envelope fields on `user` and `team`. For project
2820
+ * secrets it additionally requires `user.read` and `team.read`. A user-bound
2821
+ * console session that already passed the project check may expand without those scopes.
2822
+ *
2823
+ * Authenticate with a project secret (`oauth2`) or a console session cookie
2824
+ * (`sessionCookie`). Cookie requests follow that scheme's CSRF rules.
2825
+ * @summary Query grants
2826
+ */
2827
+ const queryGrants = async (queryGrantsBody, params, options) => {
2828
+ return customFetch(getQueryGrantsUrl(params), {
2829
+ ...options,
2830
+ method: "POST",
2831
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
2832
+ body: JSON.stringify(queryGrantsBody)
2833
+ });
2834
+ };
2835
+ const getGetGrantUrl = (grantId, params) => {
2836
+ const normalizedParams = new URLSearchParams();
2837
+ Object.entries(params || {}).forEach(([key, value]) => {
2838
+ if (Array.isArray(value) && ["expand"].includes(key)) {
2839
+ value.forEach((v) => {
2840
+ normalizedParams.append(key, v === null ? "null" : String(v));
2841
+ });
2842
+ return;
2843
+ }
2844
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2845
+ });
2846
+ const stringifiedParams = normalizedParams.toString();
2847
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/grants/${encodeURIComponent(String(grantId))}?${stringifiedParams}` : `${getApiBaseUrl()}/grants/${encodeURIComponent(String(grantId))}`;
2848
+ };
2849
+ /**
2850
+ * Returns a grant by ID, when this API manages it and it has not been revoked.
2851
+ *
2852
+ * This API manages grants that bind a user or team to the viewer, editor or
2853
+ * admin role. An expired grant is still returned, so you can revoke it with
2854
+ * `deleteGrant` (`DELETE /grants/{grant_id}`) before you grant the same binding again. Authorization still
2855
+ * ignores expired grants. Send `project_id` as well as the grant ID.
2856
+ * Misses, revoked grants, project-secret setup rows (`sk_proj`), owning-team
2857
+ * (`relation=team`) rows and grants of another project all return `404`.
2858
+ *
2859
+ * `expand=principal` adds envelope fields on `user` or `team`. For project
2860
+ * secrets it requires `user.read` and `team.read` in addition to `project.read`.
2861
+ * A user-bound console session that already passed the project check may expand
2862
+ * without those scopes.
2863
+ *
2864
+ * Authenticate with a project secret (`oauth2`) or a console session cookie
2865
+ * (`sessionCookie`). Cookie requests follow that scheme's CSRF rules.
2866
+ * @summary Get a grant by ID
2867
+ */
2868
+ const getGrant = async (grantId, params, options) => {
2869
+ return customFetch(getGetGrantUrl(grantId, params), {
2870
+ ...options,
2871
+ method: "GET"
2872
+ });
2873
+ };
2874
+ const getDeleteGrantUrl = (grantId, params) => {
2875
+ const normalizedParams = new URLSearchParams();
2876
+ Object.entries(params || {}).forEach(([key, value]) => {
2877
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2878
+ });
2879
+ const stringifiedParams = normalizedParams.toString();
2880
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/grants/${encodeURIComponent(String(grantId))}?${stringifiedParams}` : `${getApiBaseUrl()}/grants/${encodeURIComponent(String(grantId))}`;
2881
+ };
2882
+ /**
2883
+ * Revokes a grant this API manages and emits `authz.revoked`.
2884
+ *
2885
+ * A revoked grant cannot be restored: create a new one. Already-revoked, missing,
2886
+ * project-secret setup and owning-team grants return `404`. Expired grants can
2887
+ * still be revoked, so the binding can be reused.
2888
+ *
2889
+ * Authenticate with a project secret (`oauth2`) or a console session cookie
2890
+ * (`sessionCookie`). Cookie requests follow that scheme's CSRF rules.
2891
+ * @summary Revoke a grant
2892
+ */
2893
+ const deleteGrant = async (grantId, params, options) => {
2894
+ return customFetch(getDeleteGrantUrl(grantId, params), {
2895
+ ...options,
2896
+ method: "DELETE"
2897
+ });
2898
+ };
2899
+ const getCreateInvitationUrl = (params) => {
2900
+ const normalizedParams = new URLSearchParams();
2901
+ Object.entries(params || {}).forEach(([key, value]) => {
2902
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2903
+ });
2904
+ const stringifiedParams = normalizedParams.toString();
2905
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/invitations?${stringifiedParams}` : `${getApiBaseUrl()}/invitations`;
2906
+ };
2907
+ /**
2908
+ * Creates an invitation for a project, or replaces an existing one, and
2909
+ * returns the invitation and its one-shot link.
2910
+ *
2911
+ * Send `type` and the object named after it. `project_member` takes
2912
+ * `relation` (`viewer`, `editor` or `admin`). `team_member` takes `team_id`
2913
+ * and `role`, and answers `501` `not_implemented` until team invitations
2914
+ * ship. Optional `metadata.name` labels who the link is for. Optional
2915
+ * `replaces_invitation_id` replaces that invitation: the new row keeps the
2916
+ * original's `journey_id`, and the original is deleted in the same
2917
+ * transaction unless it was accepted.
2918
+ *
2919
+ * The `link` appears only in this response. Share it out of band; whoever
2920
+ * opens it and is signed in can redeem the role. It expires in 72 hours.
2921
+ * Refused for an unclaimed project, on a server without a platform project,
2922
+ * and when the project's pending-invitation cap is reached.
2923
+ *
2924
+ * Authenticate with a project secret (`oauth2`) or a console session cookie
2925
+ * (`sessionCookie`). Creation needs the same project `admin` check as
2926
+ * `createGrant` (`POST /grants`). Cookie requests follow that scheme's CSRF
2927
+ * rules.
2928
+ * @summary Create an invitation
2929
+ */
2930
+ const createInvitation = async (createInvitationBody, params, options) => {
2931
+ return customFetch(getCreateInvitationUrl(params), {
2932
+ ...options,
2933
+ method: "POST",
2934
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
2935
+ body: JSON.stringify(createInvitationBody)
2936
+ });
2937
+ };
2938
+ const getListInvitationsUrl = (params) => {
2939
+ const normalizedParams = new URLSearchParams();
2940
+ Object.entries(params || {}).forEach(([key, value]) => {
2941
+ if (Array.isArray(value) && ["status", "expand"].includes(key)) {
2942
+ value.forEach((v) => {
2943
+ normalizedParams.append(key, v === null ? "null" : String(v));
2944
+ });
2945
+ return;
2946
+ }
2947
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
2948
+ });
2949
+ const stringifiedParams = normalizedParams.toString();
2950
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/invitations?${stringifiedParams}` : `${getApiBaseUrl()}/invitations`;
2951
+ };
2952
+ /**
2953
+ * Lists a project's invitations, newest first, in any status, paginated with
2954
+ * `limit` and `page_token`.
2955
+ *
2956
+ * Optional `status` and `type` filters narrow the page. Repeat `status` to
2957
+ * match any of several statuses, for example
2958
+ * `status=pending&status=expired&status=rejected`. `expired` is derived on
2959
+ * read from `expires_at`. `expand=inviter` adds `inviter` to each
2960
+ * invitation. Authenticate with a project secret (`oauth2`) or
2961
+ * a console session cookie (`sessionCookie`). Listing needs the same project
2962
+ * `admin` check as `createGrant` (`POST /grants`).
2963
+ * @summary List invitations
2964
+ */
2965
+ const listInvitations = async (params, options) => {
2966
+ return customFetch(getListInvitationsUrl(params), {
2967
+ ...options,
2968
+ method: "GET"
2969
+ });
2970
+ };
2971
+ const getLookupInvitationUrl = () => {
2972
+ return `${getApiBaseUrl()}/invitations/lookup`;
2973
+ };
2974
+ /**
2975
+ * Returns a lean view of the invitation for the signed-in accept page:
2976
+ * project, role, inviter and expiry.
2977
+ *
2978
+ * Send the plaintext token from the invitation link fragment. Every unknown
2979
+ * or finished token answers the same opaque `404`. Authenticate with a
2980
+ * platform-project user session cookie (`sessionCookie`). Lookup is a read:
2981
+ * same-origin cookie requests need no `X-Zitadel-CSRF` token (accept and
2982
+ * reject still do).
2983
+ * @summary Look up an invitation by token
2984
+ */
2985
+ const lookupInvitation = async (lookupInvitationBody, options) => {
2986
+ return customFetch(getLookupInvitationUrl(), {
2987
+ ...options,
2988
+ method: "POST",
2989
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
2990
+ body: JSON.stringify(lookupInvitationBody)
2991
+ });
2992
+ };
2993
+ const getAcceptInvitationUrl = () => {
2994
+ return `${getApiBaseUrl()}/invitations/accept`;
2995
+ };
2996
+ /**
2997
+ * Accepts a pending invitation for the signed-in user and returns the updated
2998
+ * invitation.
2999
+ *
3000
+ * Send the plaintext token from the invitation link fragment. Acceptance
3001
+ * grants the invitation's role (a project grant for `project_member`) when
3002
+ * the invitation is pending and unexpired, the project is active and claimed,
3003
+ * and the creator still holds `admin` unless `created_by` is null. The
3004
+ * inviter cannot accept their own invitation. Every unknown or finished token
3005
+ * answers the same opaque `404`.
3006
+ *
3007
+ * Authenticate with a platform-project user session cookie (`sessionCookie`).
3008
+ * Cookie requests follow that scheme's CSRF rules.
3009
+ * @summary Accept an invitation
3010
+ */
3011
+ const acceptInvitation = async (acceptInvitationBody, options) => {
3012
+ return customFetch(getAcceptInvitationUrl(), {
3013
+ ...options,
3014
+ method: "POST",
3015
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
3016
+ body: JSON.stringify(acceptInvitationBody)
3017
+ });
3018
+ };
3019
+ const getRejectInvitationUrl = () => {
3020
+ return `${getApiBaseUrl()}/invitations/reject`;
3021
+ };
3022
+ /**
3023
+ * Declines a pending invitation for the signed-in user and returns the
3024
+ * updated invitation with status `rejected`.
3025
+ *
3026
+ * Send the plaintext token from the invitation link fragment. The
3027
+ * invitation keeps its metadata for administrators, but this response
3028
+ * returns `metadata` as null. The inviter cannot decline their own invitation; an administrator
3029
+ * cancels it instead. Every unknown or finished token answers the same
3030
+ * opaque `404`.
3031
+ * Authenticate with a platform-project user session cookie (`sessionCookie`).
3032
+ * Cookie requests follow that scheme's CSRF rules.
3033
+ * @summary Decline an invitation
3034
+ */
3035
+ const rejectInvitation = async (rejectInvitationBody, options) => {
3036
+ return customFetch(getRejectInvitationUrl(), {
3037
+ ...options,
3038
+ method: "POST",
3039
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
3040
+ body: JSON.stringify(rejectInvitationBody)
3041
+ });
3042
+ };
3043
+ const getGetInvitationUrl = (invitationId, params) => {
3044
+ const normalizedParams = new URLSearchParams();
3045
+ Object.entries(params || {}).forEach(([key, value]) => {
3046
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
3047
+ });
3048
+ const stringifiedParams = normalizedParams.toString();
3049
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/invitations/${encodeURIComponent(String(invitationId))}?${stringifiedParams}` : `${getApiBaseUrl()}/invitations/${encodeURIComponent(String(invitationId))}`;
3050
+ };
3051
+ /**
3052
+ * Returns one invitation by ID for the project named by `project_id`.
3053
+ *
3054
+ * The response never includes the redeem token or the create-time `link`.
3055
+ * Authenticate with a project secret (`oauth2`) or a console session cookie
3056
+ * (`sessionCookie`). Reading needs the same project `admin` check as
3057
+ * `createGrant` (`POST /grants`).
3058
+ * @summary Get an invitation
3059
+ */
3060
+ const getInvitation = async (invitationId, params, options) => {
3061
+ return customFetch(getGetInvitationUrl(invitationId, params), {
3062
+ ...options,
3063
+ method: "GET"
3064
+ });
3065
+ };
3066
+ const getCancelInvitationUrl = (invitationId, params) => {
3067
+ const normalizedParams = new URLSearchParams();
3068
+ Object.entries(params || {}).forEach(([key, value]) => {
3069
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
3070
+ });
3071
+ const stringifiedParams = normalizedParams.toString();
3072
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/invitations/${encodeURIComponent(String(invitationId))}?${stringifiedParams}` : `${getApiBaseUrl()}/invitations/${encodeURIComponent(String(invitationId))}`;
3073
+ };
3074
+ /**
3075
+ * Deletes a pending, expired or rejected invitation, with its metadata. A
3076
+ * pending invitation's link can no longer be redeemed. An accepted
3077
+ * invitation answers the same opaque `404` as a miss.
3078
+ *
3079
+ * Authenticate with a project secret (`oauth2`) or a console session cookie
3080
+ * (`sessionCookie`). Cancelling needs the same project `admin` check as
3081
+ * `createGrant` (`POST /grants`). Cookie requests follow that scheme's CSRF
3082
+ * rules.
3083
+ * @summary Cancel an invitation
3084
+ */
3085
+ const cancelInvitation = async (invitationId, params, options) => {
3086
+ return customFetch(getCancelInvitationUrl(invitationId, params), {
3087
+ ...options,
3088
+ method: "DELETE"
3089
+ });
3090
+ };
3091
+ const getListEventsUrl = (params) => {
3092
+ const normalizedParams = new URLSearchParams();
3093
+ Object.entries(params || {}).forEach(([key, value]) => {
3094
+ if (Array.isArray(value) && [
3095
+ "category",
3096
+ "event_type",
3097
+ "operation_id",
3098
+ "status_class"
3099
+ ].includes(key)) {
3100
+ value.forEach((v) => {
3101
+ normalizedParams.append(key, v === null ? "null" : String(v));
3102
+ });
3103
+ return;
3104
+ }
3105
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
3106
+ });
3107
+ const stringifiedParams = normalizedParams.toString();
3108
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/events?${stringifiedParams}` : `${getApiBaseUrl()}/events`;
3109
+ };
3110
+ /**
3111
+ * Lists a project's audit events, newest first. Pass `order=asc` for oldest
3112
+ * first. Requires `events.read`.
3113
+ *
3114
+ * A project that is not claimed yet returns an empty list: its events are
3115
+ * stored but stay invisible until the
3116
+ * [claim](https://preview.zitadel.com/docs/concepts/project-team-user#claim) succeeds. The deployment's
3117
+ * platform operators read them from the start.
3118
+ *
3119
+ * Team-scoped credentials see only the events whose `team_id` matches the
3120
+ * credential's team. Team-scoped credentials are not issued today.
3121
+ *
3122
+ * Each item carries an `event_type` that says which type of event it is, and
3123
+ * the matching `payload`. To read one event, pass its `id` to `getEvent` (`GET /events/{event_id}`).
3124
+ *
3125
+ * Filters combine. These are answered from an index and fill their pages: no
3126
+ * filter, `category`, `event_type`, `status_class`, `operation_id` with or
3127
+ * without `status_class`, `request_id`, `flow_id`, and `session_id`,
3128
+ * `entity_id`, `user_id`, `actor_id` or `entity_type` with or without
3129
+ * `category`, each with or without the time bounds. Any other filter or combination is
3130
+ * matched event by event, over at most a few thousand events per request.
3131
+ * Such a page can hold fewer events than `limit`, or none, and still carry
3132
+ * `next_page_token`: keep passing the token until a response has none.
3133
+ * @summary List events
3134
+ */
3135
+ const listEvents = async (params, options) => {
3136
+ return customFetch(getListEventsUrl(params), {
3137
+ ...options,
3138
+ method: "GET"
3139
+ });
3140
+ };
3141
+ const getGetEventUrl = (eventId, params) => {
3142
+ const normalizedParams = new URLSearchParams();
3143
+ Object.entries(params || {}).forEach(([key, value]) => {
3144
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
3145
+ });
3146
+ const stringifiedParams = normalizedParams.toString();
3147
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/events/${encodeURIComponent(String(eventId))}?${stringifiedParams}` : `${getApiBaseUrl()}/events/${encodeURIComponent(String(eventId))}`;
3148
+ };
3149
+ /**
3150
+ * Returns one event of a project by its ID. Requires `events.read`.
3151
+ *
3152
+ * Pass the `id` of an event that `listEvents` (`GET /events`) returns, with its
3153
+ * `project_id`. An unknown ID and the ID of another project's event both
3154
+ * answer `404`.
3155
+ *
3156
+ * A project that is not claimed yet also answers `404`: its events are
3157
+ * stored but stay invisible until the
3158
+ * [claim](https://preview.zitadel.com/docs/concepts/project-team-user#claim) succeeds. The deployment's
3159
+ * platform operators read them from the start.
3160
+ * @summary Get an event by ID
3161
+ */
3162
+ const getEvent = async (eventId, params, options) => {
3163
+ return customFetch(getGetEventUrl(eventId, params), {
3164
+ ...options,
3165
+ method: "GET"
3166
+ });
3167
+ };
3168
+ const getListVariablesUrl = (params) => {
3169
+ const normalizedParams = new URLSearchParams();
3170
+ Object.entries(params || {}).forEach(([key, value]) => {
3171
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
3172
+ });
3173
+ const stringifiedParams = normalizedParams.toString();
3174
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/variables?${stringifiedParams}` : `${getApiBaseUrl()}/variables`;
3175
+ };
3176
+ /**
3177
+ * Returns the project's variables, keyed by name, each with its value for
3178
+ * each kind: `primary` for primary origins and `preview` for preview URLs.
3179
+ * With `kind`, only that kind's values are returned.
3180
+ *
3181
+ * Secret values are not returned. A secret appears as `{"secret": true}`,
3182
+ * which says a value is held without disclosing it.
3183
+ * @summary Get a project's variables
3184
+ */
3185
+ const listVariables = async (params, options) => {
3186
+ return customFetch(getListVariablesUrl(params), {
3187
+ ...options,
3188
+ method: "GET"
3189
+ });
3190
+ };
3191
+ const getSetVariablesUrl = (params) => {
3192
+ const normalizedParams = new URLSearchParams();
3193
+ Object.entries(params || {}).forEach(([key, value]) => {
3194
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
3195
+ });
3196
+ const stringifiedParams = normalizedParams.toString();
3197
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/variables?${stringifiedParams}` : `${getApiBaseUrl()}/variables`;
3198
+ };
3199
+ /**
3200
+ * Sets, replaces and removes the project's variables for the requested
3201
+ * kind, in one request. Names not in the body are untouched. Existing
3202
+ * deployments keep the values they froze.
3203
+ *
3204
+ * A bare scalar enters a non-secret value. `{"value": …, "secret": true}`
3205
+ * stores the value encrypted under the project's active `secret` key, after
3206
+ * which it can be referenced but not read back. `null` removes the name
3207
+ * (RFC 7386), which is how several variables are removed in one request.
3208
+ * Removing a name the project does not hold is a no-op rather than an error.
3209
+ *
3210
+ * Without `kind`, a plain value is written for both kinds. A secret is
3211
+ * written for `primary` only and removes the name's `preview` value, so a
3212
+ * preview never keeps a plaintext copy. Set a preview secret with
3213
+ * `kind=preview`. `null` removes the name from both kinds.
3214
+ *
3215
+ * The body is applied whole or not at all, so a rejected request leaves the
3216
+ * project's variables exactly as they were. Fix what the error reports and
3217
+ * send the request again. Writing the same name twice replaces the value
3218
+ * rather than duplicating it, which makes a retry safe.
3219
+ *
3220
+ * Each kind written records a `variable.set` event, and each kind removed a
3221
+ * `variable.removed` event. The value never appears in either.
3222
+ * @summary Update a project's variables
3223
+ */
3224
+ const setVariables = async (setVariablesBody, params, options) => {
3225
+ return customFetch(getSetVariablesUrl(params), {
3226
+ ...options,
3227
+ method: "PATCH",
3228
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
3229
+ body: JSON.stringify(setVariablesBody)
3230
+ });
3231
+ };
3232
+ const getGetVariableUrl = (variableName, params) => {
3233
+ const normalizedParams = new URLSearchParams();
3234
+ Object.entries(params || {}).forEach(([key, value]) => {
3235
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
3236
+ });
3237
+ const stringifiedParams = normalizedParams.toString();
3238
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/variables/${encodeURIComponent(String(variableName))}?${stringifiedParams}` : `${getApiBaseUrl()}/variables/${encodeURIComponent(String(variableName))}`;
3239
+ };
3240
+ /**
3241
+ * Returns one variable by name, with its value for each kind. A variable
3242
+ * holds a value per kind: `primary` for primary origins and `preview` for
3243
+ * preview URLs.
3244
+ *
3245
+ * Pass the name of a variable the project holds, as `listVariables` (`GET /variables`) lists
3246
+ * it. A name with no value for the requested kind answers `var.not_found`;
3247
+ * set it with `setVariables` (`PATCH /variables`). A secret reads back as `{"secret": true}`.
3248
+ * @summary Get a variable by name
3249
+ */
3250
+ const getVariable = async (variableName, params, options) => {
3251
+ return customFetch(getGetVariableUrl(variableName, params), {
3252
+ ...options,
3253
+ method: "GET"
3254
+ });
3255
+ };
3256
+ const getDeleteVariableUrl = (variableName, params) => {
3257
+ const normalizedParams = new URLSearchParams();
3258
+ Object.entries(params || {}).forEach(([key, value]) => {
3259
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
3260
+ });
3261
+ const stringifiedParams = normalizedParams.toString();
3262
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/variables/${encodeURIComponent(String(variableName))}?${stringifiedParams}` : `${getApiBaseUrl()}/variables/${encodeURIComponent(String(variableName))}`;
3263
+ };
3264
+ /**
3265
+ * Deletes a variable for the requested kind, or for both kinds without
3266
+ * `kind`. Existing deployments keep the values they froze. Each kind removed
3267
+ * records a `variable.removed` event.
3268
+ *
3269
+ * A name with no value for that kind answers `var.not_found`: there is
3270
+ * nothing to delete. `listVariables` (`GET /variables`) lists the names the project holds. To
3271
+ * remove several names in one request, or to remove a name that may already
3272
+ * be absent, send `null` for each name to `setVariables` (`PATCH /variables`).
3273
+ * @summary Delete a variable by name
3274
+ */
3275
+ const deleteVariable = async (variableName, params, options) => {
3276
+ return customFetch(getDeleteVariableUrl(variableName, params), {
3277
+ ...options,
3278
+ method: "DELETE"
3279
+ });
3280
+ };
3281
+ const getCreateDeploymentUrl = (params) => {
3282
+ const normalizedParams = new URLSearchParams();
3283
+ Object.entries(params || {}).forEach(([key, value]) => {
3284
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
3285
+ });
3286
+ const stringifiedParams = normalizedParams.toString();
3287
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments?${stringifiedParams}` : `${getApiBaseUrl()}/deployments`;
3288
+ };
3289
+ /**
3290
+ * Creates a deployment: it makes a release live on the project's primary
3291
+ * origins or on preview URLs.
3292
+ *
3293
+ * A release is a snapshot of the project's configuration. A deployment makes
3294
+ * a release live on origins and freezes the project's variable values for
3295
+ * its kind, with no fallback between primary and preview values. The call is
3296
+ * atomic: on success every target serves the release and the deployment is
3297
+ * recorded, and it records a `deployment.created` event. On failure nothing
3298
+ * changes and nothing is recorded.
3299
+ *
3300
+ * Name the release by exactly one of `release_id` or `content_hash`. Take the
3301
+ * release ID from the `id` that `createRelease` (`POST /releases`), `buildRelease` (`POST /releases/build`) or
3302
+ * `listReleases` (`GET /releases`) returns. The release must already exist in the project.
3303
+ * `targets` is `primary`, which means every primary origin, or a list of
3304
+ * preview URLs. `["primary"]`, which clients released before this shape
3305
+ * send, still deploys to every primary origin until 1.0.0; its answer
3306
+ * carries a `Deprecation` header (RFC 9745) and a `Link` to these docs.
3307
+ *
3308
+ * The project's newest primary deployment also serves every request with no
3309
+ * `Origin`, such as a backend, a native app or the CLI, and the console's
3310
+ * login preview of a project that does not list the console's origin. A
3311
+ * preview URL serves only itself.
3312
+ *
3313
+ * `primary` records the project's current primary origins. One added later
3314
+ * serves nothing until the next deployment to `primary`; one removed stops
3315
+ * being served at once.
3316
+ *
3317
+ * A deployment to `primary` changes nothing when the project's newest
3318
+ * primary deployment has the same release and frozen values and covers
3319
+ * exactly the current primary origins. The call then answers `200` with that
3320
+ * deployment. Any other request writes a new deployment and answers `201`.
3321
+ * For preview URLs, that deployment renews their previews.
3322
+ *
3323
+ * If the request is refused, fix the cause and send it again:
3324
+ * - `400 dep.invalid`: the request names both or neither of `release_id` and
3325
+ * `content_hash`, names a primary origin among the preview URLs, sends
3326
+ * `primary` for a project with no primary origin, sends
3327
+ * `ttl` with `primary`, or sends a `ttl` above 365 days (`P365D`). Correct
3328
+ * the request.
3329
+ * - `400 dep.variables_missing`: a variable the release references has no
3330
+ * value for the kind. `details` names the kind and every missing variable.
3331
+ * Set each one for that kind with `setVariables` (`PATCH /variables`), then deploy again.
3332
+ * - `403 proj.origin_not_allowed`: a preview URL matches no preview pattern
3333
+ * of the project, or is a loopback URL. Use a URL that matches a pattern.
3334
+ * - `404 rel.not_found`: the release ID or digest names no release in this
3335
+ * project. List the project's releases with `listReleases`.
3336
+ * - `409 dep.conflict`: `expected_deployment_id` is not the deployment this
3337
+ * write replaces, and `details.deployment` is that deployment. Inspect it,
3338
+ * then retry with its ID as `expected_deployment_id`, or stop.
3339
+ * - `409 rel.revoked`: the release is revoked and cannot be deployed. Change
3340
+ * the configuration and build a new release, or deploy a release that is
3341
+ * not revoked. Rebuilding unchanged content returns the same revoked release.
3342
+ * @summary Create a deployment
3343
+ */
3344
+ const createDeployment = async (createDeploymentBody, params, options) => {
3345
+ return customFetch(getCreateDeploymentUrl(params), {
3346
+ ...options,
3347
+ method: "POST",
3348
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
3349
+ body: JSON.stringify(createDeploymentBody)
3350
+ });
3351
+ };
3352
+ const getListDeploymentsUrl = (params) => {
3353
+ const normalizedParams = new URLSearchParams();
3354
+ Object.entries(params || {}).forEach(([key, value]) => {
3355
+ if (Array.isArray(value) && ["expand"].includes(key)) {
3356
+ value.forEach((v) => {
3357
+ normalizedParams.append(key, v === null ? "null" : String(v));
3358
+ });
3359
+ return;
3360
+ }
3361
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
3362
+ });
3363
+ const stringifiedParams = normalizedParams.toString();
3364
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments?${stringifiedParams}` : `${getApiBaseUrl()}/deployments`;
3365
+ };
3366
+ /**
3367
+ * Lists the project's deployments: the history of what ran where and when,
3368
+ * or with `live=true` what is served now.
3369
+ *
3370
+ * A deployment makes a release live on origins. By default the list is the
3371
+ * history, newest first: every deployment of the project, with every target
3372
+ * it made the release live on. With `origin`, it is the history of that
3373
+ * origin alone. With `release_id`, it is every deployment of that release,
3374
+ * superseded ones included.
3375
+ *
3376
+ * With `live=true`, the list is what is served now, newest first. It holds
3377
+ * the project's newest primary deployment with every origin it names, an
3378
+ * origin the project no longer lists included: that deployment also serves
3379
+ * requests with no `Origin`, so it stays live. It also holds the newest
3380
+ * deployment to each live preview URL, narrowed to the URLs it still
3381
+ * serves. Combined with `origin`, it is the one deployment that origin
3382
+ * serves, or empty, as it is for an origin the project no longer lists.
3383
+ * Combined with `release_id`, it is the deployments of the live view that
3384
+ * serve that release: the primary deployment only when it is of that
3385
+ * release, and the previews serving it.
3386
+ *
3387
+ * The `id` of an entry is the deployment ID that `getDeployment` (`GET /deployments/{deployment_id}`),
3388
+ * `listDeploymentVariables` (`GET /deployments/{deployment_id}/variables`) and `rollbackDeployment` (`POST /deployments/{deployment_id}/rollback`) take.
3389
+ *
3390
+ * `expand: ["release"]` embeds the release each deployment made live. It
3391
+ * requires `release.read` and does not change the ordering or the page
3392
+ * tokens.
3393
+ * @summary List deployments
3394
+ */
3395
+ const listDeployments = async (params, options) => {
3396
+ return customFetch(getListDeploymentsUrl(params), {
3397
+ ...options,
3398
+ method: "GET"
3399
+ });
3400
+ };
3401
+ const getGetDeploymentUrl = (deploymentId, params) => {
3402
+ const normalizedParams = new URLSearchParams();
3403
+ Object.entries(params || {}).forEach(([key, value]) => {
3404
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
3405
+ });
3406
+ const stringifiedParams = normalizedParams.toString();
3407
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}?${stringifiedParams}` : `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}`;
3408
+ };
3409
+ /**
3410
+ * Returns one deployment: the release it made live, the origins it made it
3411
+ * live on, and whether they still serve it.
3412
+ *
3413
+ * Pass the `id` that `createDeployment` (`POST /deployments`), `rollbackDeployment` (`POST /deployments/{deployment_id}/rollback`) or
3414
+ * `listDeployments` (`GET /deployments`) returns.
3415
+ *
3416
+ * The lookup is scoped to the project in `project_id`. A deployment ID
3417
+ * belonging to another project answers not found exactly as an unknown ID
3418
+ * does, so the endpoint cannot be used to probe for deployments in projects
3419
+ * the caller cannot read.
3420
+ * @summary Get a deployment by ID
3421
+ */
3422
+ const getDeployment = async (deploymentId, params, options) => {
3423
+ return customFetch(getGetDeploymentUrl(deploymentId, params), {
3424
+ ...options,
3425
+ method: "GET"
3426
+ });
3427
+ };
3428
+ const getRollbackDeploymentUrl = (deploymentId, params) => {
3429
+ const normalizedParams = new URLSearchParams();
3430
+ Object.entries(params || {}).forEach(([key, value]) => {
3431
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
3432
+ });
3433
+ const stringifiedParams = normalizedParams.toString();
3434
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}/rollback?${stringifiedParams}` : `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}/rollback`;
3435
+ };
3436
+ /**
3437
+ * Rolls back to an earlier deployment by deploying its release again to the
3438
+ * same origins, with the same variable values. A listed primary origin that
3439
+ * deployment left out serves nothing until the next deployment to `primary`,
3440
+ * and one it named serves its release again, even when the live deployment
3441
+ * left it out.
3442
+ *
3443
+ * A release is a snapshot of the project's configuration. A deployment makes
3444
+ * a release live on origins and freezes the project's variable values with
3445
+ * it.
3446
+ *
3447
+ * The deployment ID in the path is the deployment to return to, not the one
3448
+ * to undo. Take it from the `id` that `listDeployments` (`GET /deployments`) returns, which lists
3449
+ * the newest deployment first.
3450
+ *
3451
+ * A rollback is a new deployment, not an undo. It has `reason: rollback`,
3452
+ * and its `rollback_to` names the deployment you returned to. It uses the
3453
+ * variable values that deployment froze, not the project's current ones, and
3454
+ * creates no release.
3455
+ *
3456
+ * To guard against a deployment that landed since you looked, set
3457
+ * `expected_deployment_id` in the request body to the newest primary
3458
+ * deployment, the one live now. The call then fails with `409 dep.conflict`
3459
+ * if another deployment has replaced it.
3460
+ *
3461
+ * A rollback is idempotent like a deployment to `primary`. When nothing
3462
+ * would change, it answers `200` with the newest primary deployment.
3463
+ *
3464
+ * If the request is refused:
3465
+ * - `400 dep.invalid`: the deployment went to preview URLs, which cannot be
3466
+ * rolled back. Deploy to the preview again with `createDeployment` (`POST /deployments`).
3467
+ * - `404 dep.not_found`: no deployment of the project has that ID, or that
3468
+ * deployment recorded no variables to restore, so it cannot be a rollback
3469
+ * target. List them with `listDeployments` and pick another.
3470
+ * - `409 dep.conflict`: `expected_deployment_id` is not the project's
3471
+ * newest primary deployment, and `details.deployment` is that deployment.
3472
+ * Inspect it, then retry with its ID, or stop.
3473
+ * - `409 rel.revoked`: the release of that deployment is revoked and cannot
3474
+ * be deployed. Roll back to a deployment of a release that is not revoked.
3475
+ * @summary Roll back to a deployment
3476
+ */
3477
+ const rollbackDeployment = async (deploymentId, params, rollbackDeploymentBody, options) => {
3478
+ return customFetch(getRollbackDeploymentUrl(deploymentId, params), {
3479
+ ...options,
3480
+ method: "POST",
3481
+ headers: getHeaders({ "Content-Type": "application/json" }, options?.headers),
3482
+ body: JSON.stringify(rollbackDeploymentBody)
3483
+ });
3484
+ };
3485
+ const getListDeploymentVariablesUrl = (deploymentId, params) => {
3486
+ const normalizedParams = new URLSearchParams();
3487
+ Object.entries(params || {}).forEach(([key, value]) => {
3488
+ if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
3489
+ });
3490
+ const stringifiedParams = normalizedParams.toString();
3491
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}/variables?${stringifiedParams}` : `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}/variables`;
3492
+ };
3493
+ /**
3494
+ * Returns the variable values the deployment froze when it was made. Later
3495
+ * changes to the project's variables do not affect them. A secret reads
3496
+ * back as `{"secret": true}`.
3497
+ *
3498
+ * Pass the `id` that `createDeployment` (`POST /deployments`) or `listDeployments` (`GET /deployments`) returns.
3499
+ * @summary Get a deployment's variables
3500
+ */
3501
+ const listDeploymentVariables = async (deploymentId, params, options) => {
3502
+ return customFetch(getListDeploymentVariablesUrl(deploymentId, params), {
3503
+ ...options,
3504
+ method: "GET"
3505
+ });
3506
+ };
3507
+ export { getDeleteVariableUrl as $, getUpdateUserUrl as $n, updateUser as $r, getListPolicyRevisionsUrl as $t, getAuthAttempt as A, getQueryProjectsUrl as An, publishIdp as Ar, getGetReleaseUrl as At, getCreateFlowUrl as B, getRevokeReleaseUrl as Bn, removeProjectOrigin as Br, getInvitation as Bt, deleteUser as C, getPublishBrandingUrl as Cn, listUserPasskeys as Cr, getGetOAuthSettingsUrl as Ct, getAcceptInvitationUrl as D, getPublishSchemaUrl as Dn, publishApplication as Dr, getGetProjectClaimWindowUrl as Dt, exchangeHandoff as E, getPublishPolicyUrl as En, lookupInvitation as Er, getGetProjectClaimStatusUrl as Et, getCompleteUserPasskeyRegistrationUrl as F, getRejectInvitationUrl as Fn, queryProjects as Fr, getGetUserUrl as Ft, getCreateReleaseUrl as G, getSession as Gn, rollbackDeployment as Gr, getListFlowDefinitionsUrl as Gt, getCreateInvitationUrl as H, getRollbackDeploymentUrl as Hn, revokeMySession as Hr, getListDeploymentVariablesUrl as Ht, getCreateAuthAttemptChallengeUrl as I, getRelease as In, querySessions as Ir, getGetVariableUrl as It, getCreateUserPasskeyRegistrationUrl as J, getSubmitFlowStepUrl as Jn, setVariables as Jr, getListMyIdentityLinksUrl as Jt, getCreateSessionUrl as K, getSetUserPasswordUrl as Kn, search as Kr, getListIdpRevisionsUrl as Kt, getCreateAuthAttemptHandoffUrl as L, getRemoveProjectOriginUrl as Ln, queryTeams as Lr, getGrant as Lt, getBuildReleaseUrl as M, getQueryTeamsUrl as Mn, publishSchema as Mr, getGetSessionUrl as Mt, getCancelInvitationUrl as N, getQueryUsersUrl as Nn, queryGrants as Nr, getGetTeamUrl as Nt, getAddProjectOriginUrl as O, getQueryGrantsUrl as On, publishBranding as Or, getGetProjectUrl as Ot, getCompleteProjectClaimUrl as P, getReady as Pn, queryIdps as Pr, getGetUserPasswordStateUrl as Pt, getDeleteUserUrl as Q, getUpdateTeamUrl as Qn, updateTeam as Qr, getListPoliciesUrl as Qt, getCreateAuthAttemptUrl as R, getRemoveProjectPreviewUrl as Rn, queryUsers as Rr, getIdp as Rt, deleteGrant as S, getPublishApplicationUrl as Sn, listUserIdentityLinks as Sr, getGetMyUserUrl as St, evaluatePolicy as T, getPublishIdpUrl as Tn, listVariables as Tr, getGetPolicyUrl as Tt, getCreateProjectClaimUrl as U, getSchema as Un, revokeRelease as Ur, getListDeploymentsUrl as Ut, getCreateGrantUrl as V, getRevokeSessionUrl as Vn, removeProjectPreview as Vr, getListBrandingUrl as Vt, getCreateProjectUrl as W, getSearchUrl as Wn, revokeSession as Wr, getListEventsUrl as Wt, getDeactivateTeamUrl as X, getUpdateMyUserUrl as Xn, updateMyUser as Xr, getListMyProjectsUrl as Xt, getCreateUserUrl as Y, getTeam as Yn, submitFlowStep as Yr, getListMyPasskeysUrl as Yt, getDeleteGrantUrl as Z, getUpdateProjectUrl as Zn, updateProject as Zr, getListMyTeamsUrl as Zt, createSession as _, getPolicy as _n, listProjectAdmins as _r, getGetLiveUrl as _t, completeProjectClaim as a, getListUserIdentityLinksUrl as an, listDeploymentVariables as ar, getFlowStep as at, createUserPasskeyRegistration as b, getProjectClaimStatus as bn, listReleases as br, getGetMySessionUrl as bt, createAuthAttemptChallenge as c, getListVariablesUrl as cn, listFlowDefinitions as cr, getGetBrandingUrl as ct, createFlow as d, getMyPasswordState as dn, listMyIdentityLinks as dr, getGetFlowDefinitionUrl as dt, verifyAuthAttemptChallenge as ei, getListProjectAdminsUrl as en, getUser as er, getDeployment as et, createGrant as f, getMySession as fn, listMyPasskeys as fr, getGetFlowStepUrl as ft, createRelease as g, getOAuthSettings as gn, listPolicyRevisions as gr, getGetInvitationUrl as gt, createProjectClaim as h, getMyUserSchema as hn, listPolicies as hr, getGetIdpUrl as ht, cancelInvitation as i, getListSchemasUrl as in, listBranding as ir, getFlowDefinition as it, getBranding as j, getQuerySessionsUrl as jn, publishPolicy as jr, getGetSchemaUrl as jt, getApplication as k, getQueryIdpsUrl as kn, publishFlowDefinition as kr, getGetReadyUrl as kt, createAuthAttemptHandoff as l, getLive as ln, listIdpRevisions as lr, getGetDeploymentUrl as lt, createProject as m, getMyUser as mn, listMyTeams as mr, getGetIdpRevisionUrl as mt, addProjectOrigin as n, getListProjectPreviewsUrl as nn, getVariable as nr, getEvent as nt, completeUserPasskeyRegistration as o, getListUserPasskeysUrl as on, listDeployments as or, getGetApplicationUrl as ot, createInvitation as p, getMySessionCsrfToken as pn, listMyProjects as pr, getGetGrantUrl as pt, getCreateTeamUrl as q, getSetVariablesUrl as qn, setUserPassword as qr, getListInvitationsUrl as qt, buildRelease as r, getListReleasesUrl as rn, getVerifyAuthAttemptChallengeUrl as rr, getExchangeHandoffUrl as rt, createAuthAttempt as s, getListUserTeamsUrl as sn, listEvents as sr, getGetAuthAttemptUrl as st, acceptInvitation as t, zitadelNextGen_exports as ti, getListProjectMembersUrl as tn, getUserPasswordState as tr, getEvaluatePolicyUrl as tt, createDeployment as u, getLookupInvitationUrl as un, listInvitations as ur, getGetEventUrl as ut, createTeam as v, getPolicyRevision as vn, listProjectMembers as vr, getGetMyPasswordStateUrl as vt, deleteVariable as w, getPublishFlowDefinitionUrl as wn, listUserTeams as wr, getGetPolicyRevisionUrl as wt, deactivateTeam as x, getProjectClaimWindow as xn, listSchemas as xr, getGetMyUserSchemaUrl as xt, createUser as y, getProject as yn, listProjectPreviews as yr, getGetMySessionCsrfTokenUrl as yt, getCreateDeploymentUrl as z, getRevokeMySessionUrl as zn, rejectInvitation as zr, getIdpRevision as zt };
3508
+
3509
+ //# sourceMappingURL=zitadelNextGen-CDqt2m_4.mjs.map