@zitadel/api 0.6.0 → 0.8.0

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