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