@zitadel/api 1.0.0-alpha.23 → 1.0.0-alpha.25

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 (1211) hide show
  1. package/README.md +26 -1
  2. package/dist/fetch-DD3lSbnp.d.mts +107 -0
  3. package/dist/fetch-DD3lSbnp.d.mts.map +1 -0
  4. package/dist/generated/endpoints/zitadelNextGen.d.mts +2 -2
  5. package/dist/generated/endpoints/zitadelNextGen.mjs +937 -569
  6. package/dist/generated/endpoints/zitadelNextGen.mjs.map +1 -1
  7. package/dist/generated/endpoints/zitadelNextGen.msw.d.mts +148 -141
  8. package/dist/generated/endpoints/zitadelNextGen.msw.d.mts.map +1 -1
  9. package/dist/generated/endpoints/zitadelNextGen.msw.mjs +3888 -1539
  10. package/dist/generated/endpoints/zitadelNextGen.msw.mjs.map +1 -1
  11. package/dist/generated/endpoints/zitadelNextGen.zod.d.mts +3787 -1639
  12. package/dist/generated/endpoints/zitadelNextGen.zod.d.mts.map +1 -1
  13. package/dist/generated/endpoints/zitadelNextGen.zod.mjs +5612 -3559
  14. package/dist/generated/endpoints/zitadelNextGen.zod.mjs.map +1 -1
  15. package/dist/generated/model/index.d.mts +2 -2
  16. package/dist/generated/model/index.mjs +428 -16
  17. package/dist/generated/model/index.mjs.map +1 -1
  18. package/dist/index-C1weUrQx.d.mts +39898 -0
  19. package/dist/index-C1weUrQx.d.mts.map +1 -0
  20. package/dist/runtime/api-factory.d.mts +19 -9
  21. package/dist/runtime/api-factory.d.mts.map +1 -1
  22. package/dist/runtime/api-factory.mjs +5 -0
  23. package/dist/runtime/api-factory.mjs.map +1 -1
  24. package/dist/runtime/auth.d.mts +27 -3
  25. package/dist/runtime/auth.d.mts.map +1 -1
  26. package/dist/runtime/auth.mjs +75 -1
  27. package/dist/runtime/auth.mjs.map +1 -1
  28. package/dist/runtime/base-url.d.mts +2 -3
  29. package/dist/runtime/base-url.d.mts.map +1 -1
  30. package/dist/runtime/base-url.mjs.map +1 -1
  31. package/dist/runtime/config.d.mts +7 -8
  32. package/dist/runtime/config.d.mts.map +1 -1
  33. package/dist/runtime/config.mjs.map +1 -1
  34. package/dist/runtime/fetch.d.mts +2 -44
  35. package/dist/runtime/fetch.mjs +147 -11
  36. package/dist/runtime/fetch.mjs.map +1 -1
  37. package/dist/zitadelNextGen-KWjI2Uyj.d.mts +925 -0
  38. package/dist/zitadelNextGen-KWjI2Uyj.d.mts.map +1 -0
  39. package/package.json +11 -5
  40. package/src/generated/endpoints/zitadelNextGen.faker.ts +323 -0
  41. package/src/generated/endpoints/zitadelNextGen.msw.ts +997 -13564
  42. package/src/generated/endpoints/zitadelNextGen.ts +2356 -1417
  43. package/src/generated/endpoints/zitadelNextGen.zod.ts +7110 -15489
  44. package/src/generated/model/beginUserPasskeyRegistration201.ts +11 -9
  45. package/src/generated/model/beginUserPasskeyRegistration201Options.ts +2 -3
  46. package/src/generated/model/beginUserPasskeyRegistration400.ts +2 -2
  47. package/src/generated/model/beginUserPasskeyRegistration400Details.ts +1 -1
  48. package/src/generated/model/beginUserPasskeyRegistration401.ts +2 -2
  49. package/src/generated/model/beginUserPasskeyRegistration401Details.ts +1 -1
  50. package/src/generated/model/beginUserPasskeyRegistration403.ts +2 -2
  51. package/src/generated/model/beginUserPasskeyRegistration403Details.ts +1 -1
  52. package/src/generated/model/beginUserPasskeyRegistration404.ts +2 -2
  53. package/src/generated/model/beginUserPasskeyRegistration404Details.ts +1 -1
  54. package/src/generated/model/beginUserPasskeyRegistration500.ts +2 -2
  55. package/src/generated/model/beginUserPasskeyRegistration500Details.ts +1 -1
  56. package/src/generated/model/beginUserPasskeyRegistrationBody.ts +14 -14
  57. package/src/generated/model/beginUserPasskeyRegistrationDefault.ts +101 -112
  58. package/src/generated/model/completeClaim200.ts +1 -1
  59. package/src/generated/model/completeClaim400.ts +2 -2
  60. package/src/generated/model/completeClaim400Details.ts +1 -1
  61. package/src/generated/model/completeClaim401.ts +4 -5
  62. package/src/generated/model/completeClaim403.ts +29 -22
  63. package/src/generated/model/completeClaim404.ts +2 -2
  64. package/src/generated/model/completeClaim404Details.ts +1 -1
  65. package/src/generated/model/completeClaim409.ts +4 -5
  66. package/src/generated/model/completeClaim409Details.ts +1 -1
  67. package/src/generated/model/completeClaim410.ts +20 -22
  68. package/src/generated/model/completeClaim429.ts +2 -2
  69. package/src/generated/model/completeClaim429Details.ts +1 -1
  70. package/src/generated/model/completeClaimBody.ts +4 -4
  71. package/src/generated/model/completeClaimDefault.ts +2 -2
  72. package/src/generated/model/completeClaimDefaultDetails.ts +1 -1
  73. package/src/generated/model/createAuthAttempt201.ts +49 -44
  74. package/src/generated/model/createAuthAttempt201ChallengesItem.ts +26 -22
  75. package/src/generated/model/createAuthAttempt201ChallengesItemMethod.ts +8 -7
  76. package/src/generated/model/createAuthAttempt201ChallengesItemPayload.ts +24 -26
  77. package/src/generated/model/createAuthAttempt201ChallengesItemState.ts +9 -10
  78. package/src/generated/model/createAuthAttempt201CompletedFactorsItem.ts +11 -10
  79. package/src/generated/model/createAuthAttempt201CompletedFactorsItemMethod.ts +7 -6
  80. package/src/generated/model/createAuthAttempt201CompletedFactorsItemPayload.ts +27 -30
  81. package/src/generated/model/createAuthAttempt201RequiredFactorsItem.ts +7 -6
  82. package/src/generated/model/createAuthAttempt201State.ts +11 -12
  83. package/src/generated/model/createAuthAttemptBody.ts +10 -8
  84. package/src/generated/model/createAuthAttemptDefault.ts +47 -52
  85. package/src/generated/model/createBranding201.ts +15 -15
  86. package/src/generated/model/createBranding201Branding.ts +49 -46
  87. package/src/generated/model/createBranding201BrandingLayout.ts +14 -14
  88. package/src/generated/model/createBranding201BrandingShape.ts +10 -11
  89. package/src/generated/model/createBranding201BrandingShapeDensity.ts +6 -6
  90. package/src/generated/model/createBranding201BrandingTheme.ts +28 -22
  91. package/src/generated/model/createBranding201BrandingThemeDark.ts +15 -14
  92. package/src/generated/model/createBranding201BrandingThemeDarkPalette.ts +113 -126
  93. package/src/generated/model/createBranding201BrandingThemeLight.ts +15 -14
  94. package/src/generated/model/createBranding201BrandingThemeLightPalette.ts +113 -126
  95. package/src/generated/model/createBranding201BrandingThemeMode.ts +6 -7
  96. package/src/generated/model/createBranding201BrandingTypography.ts +20 -22
  97. package/src/generated/model/createBranding400.ts +2 -2
  98. package/src/generated/model/createBranding400Details.ts +1 -1
  99. package/src/generated/model/createBrandingBody.ts +49 -46
  100. package/src/generated/model/createBrandingBodyLayout.ts +14 -14
  101. package/src/generated/model/createBrandingBodyShape.ts +10 -11
  102. package/src/generated/model/createBrandingBodyShapeDensity.ts +6 -6
  103. package/src/generated/model/createBrandingBodyTheme.ts +28 -22
  104. package/src/generated/model/createBrandingBodyThemeDark.ts +15 -14
  105. package/src/generated/model/createBrandingBodyThemeDarkPalette.ts +113 -126
  106. package/src/generated/model/createBrandingBodyThemeLight.ts +15 -14
  107. package/src/generated/model/createBrandingBodyThemeLightPalette.ts +113 -126
  108. package/src/generated/model/createBrandingBodyThemeMode.ts +6 -7
  109. package/src/generated/model/createBrandingBodyTypography.ts +20 -22
  110. package/src/generated/model/createBrandingDefault.ts +2 -2
  111. package/src/generated/model/createBrandingDefaultDetails.ts +1 -1
  112. package/src/generated/model/createBrandingParams.ts +6 -6
  113. package/src/generated/model/createDeployment200.ts +62 -0
  114. package/src/generated/model/createDeployment200Metadata.ts +58 -0
  115. package/src/generated/model/createDeployment200MetadataDeployedByType.ts +20 -0
  116. package/src/generated/model/createDeployment200MetadataReason.ts +26 -0
  117. package/src/generated/model/createDeployment200Release.ts +44 -0
  118. package/src/generated/model/createDeployment200ReleaseMetadata.ts +43 -0
  119. package/src/generated/model/createDeployment200ReleaseMetadataCreatedByType.ts +20 -0
  120. package/src/generated/model/createDeployment200ReleasePointersItem.ts +56 -0
  121. package/src/generated/model/createDeployment200ReleasePointersItemKind.ts +26 -0
  122. package/src/generated/model/createDeployment201.ts +62 -0
  123. package/src/generated/model/createDeployment201Metadata.ts +58 -0
  124. package/src/generated/model/createDeployment201MetadataDeployedByType.ts +20 -0
  125. package/src/generated/model/createDeployment201MetadataReason.ts +26 -0
  126. package/src/generated/model/createDeployment201Release.ts +44 -0
  127. package/src/generated/model/createDeployment201ReleaseMetadata.ts +43 -0
  128. package/src/generated/model/createDeployment201ReleaseMetadataCreatedByType.ts +20 -0
  129. package/src/generated/model/createDeployment201ReleasePointersItem.ts +56 -0
  130. package/src/generated/model/createDeployment201ReleasePointersItemKind.ts +26 -0
  131. package/src/generated/model/createDeploymentBody.ts +71 -0
  132. package/src/generated/model/createDeploymentBodyReason.ts +26 -0
  133. package/src/generated/model/createDeploymentDefault.ts +99 -0
  134. package/src/generated/model/createDeploymentParams.ts +15 -0
  135. package/src/generated/model/createFlow201.ts +34 -29
  136. package/src/generated/model/createFlow201Branding.ts +49 -46
  137. package/src/generated/model/createFlow201BrandingLayout.ts +14 -14
  138. package/src/generated/model/createFlow201BrandingShape.ts +10 -11
  139. package/src/generated/model/createFlow201BrandingShapeDensity.ts +6 -6
  140. package/src/generated/model/createFlow201BrandingTheme.ts +28 -22
  141. package/src/generated/model/createFlow201BrandingThemeDark.ts +15 -14
  142. package/src/generated/model/createFlow201BrandingThemeDarkPalette.ts +113 -126
  143. package/src/generated/model/createFlow201BrandingThemeLight.ts +15 -14
  144. package/src/generated/model/createFlow201BrandingThemeLightPalette.ts +113 -126
  145. package/src/generated/model/createFlow201BrandingThemeMode.ts +6 -7
  146. package/src/generated/model/createFlow201BrandingTypography.ts +20 -22
  147. package/src/generated/model/createFlow201Step.ts +90 -50
  148. package/src/generated/model/createFlow201StepActionsItem.ts +24 -22
  149. package/src/generated/model/createFlow201StepActionsItemKind.ts +14 -15
  150. package/src/generated/model/createFlow201StepChallenge.ts +19 -18
  151. package/src/generated/model/createFlow201StepChallengeMethod.ts +5 -5
  152. package/src/generated/model/createFlow201StepChallengeOptions.ts +4 -5
  153. package/src/generated/model/createFlow201StepComplete.ts +7 -8
  154. package/src/generated/model/createFlow201StepFieldsItem.ts +54 -26
  155. package/src/generated/model/createFlow201StepFieldsItemType.ts +17 -18
  156. package/src/generated/model/createFlow201StepFieldsItemValidation.ts +28 -27
  157. package/src/generated/model/createFlow201StepFieldsItemValidationFormat.ts +11 -12
  158. package/src/generated/model/createFlow201StepGates.ts +24 -24
  159. package/src/generated/model/createFlow201StepGatesConfig.ts +2 -3
  160. package/src/generated/model/createFlow201StepGatesKind.ts +6 -7
  161. package/src/generated/model/createFlow201StepIdentifier.ts +53 -0
  162. package/src/generated/model/createFlow201StepSsoProvidersItem.ts +1 -1
  163. package/src/generated/model/createFlow201StepTexts.ts +2 -3
  164. package/src/generated/model/createFlow400.ts +2 -2
  165. package/src/generated/model/createFlow400Details.ts +1 -1
  166. package/src/generated/model/createFlowBody.ts +20 -19
  167. package/src/generated/model/createFlowBodyHint.ts +1 -1
  168. package/src/generated/model/createFlowBodyPurpose.ts +9 -9
  169. package/src/generated/model/createFlowDefault.ts +128 -142
  170. package/src/generated/model/createFlowDefinition201.ts +19 -17
  171. package/src/generated/model/createFlowDefinition201FlowDefinition.ts +45 -46
  172. package/src/generated/model/createFlowDefinition201FlowDefinitionAudience.ts +4 -5
  173. package/src/generated/model/createFlowDefinition201FlowDefinitionStatus.ts +10 -11
  174. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItem.ts +68 -54
  175. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemActionsItem.ts +30 -28
  176. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemActionsItemKind.ts +16 -17
  177. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemComplete.ts +7 -8
  178. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemGates.ts +25 -25
  179. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemGatesConfig.ts +2 -3
  180. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemGatesKind.ts +6 -7
  181. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemOnSuccess.ts +13 -8
  182. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemTransitions.ts +38 -36
  183. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemTransitionsAction.ts +25 -0
  184. package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemTransitionsPurpose.ts +30 -0
  185. package/src/generated/model/createFlowDefinition201UserSchema.ts +12 -97
  186. package/src/generated/model/createFlowDefinition201UserSchemaMetadata.ts +12 -0
  187. package/src/generated/model/createFlowDefinition201UserSchemaSchema.ts +97 -0
  188. package/src/generated/model/createFlowDefinition400.ts +2 -2
  189. package/src/generated/model/createFlowDefinition400Details.ts +1 -1
  190. package/src/generated/model/createFlowDefinitionBody.ts +19 -18
  191. package/src/generated/model/createFlowDefinitionBodyFlowDefinition.ts +45 -46
  192. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionAudience.ts +4 -5
  193. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStatus.ts +10 -11
  194. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItem.ts +68 -54
  195. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemActionsItem.ts +30 -28
  196. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemActionsItemKind.ts +16 -17
  197. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemComplete.ts +7 -8
  198. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemGates.ts +25 -25
  199. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemGatesConfig.ts +2 -3
  200. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemGatesKind.ts +6 -7
  201. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemOnSuccess.ts +13 -8
  202. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemTransitions.ts +38 -36
  203. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemTransitionsAction.ts +25 -0
  204. package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemTransitionsPurpose.ts +30 -0
  205. package/src/generated/model/createFlowDefinitionDefault.ts +92 -102
  206. package/src/generated/model/createGrant201.ts +24 -22
  207. package/src/generated/model/createGrant201ObjectType.ts +4 -4
  208. package/src/generated/model/createGrant201Relation.ts +6 -6
  209. package/src/generated/model/createGrant201Team.ts +13 -15
  210. package/src/generated/model/createGrant201TeamStatus.ts +8 -9
  211. package/src/generated/model/createGrant201User.ts +31 -27
  212. package/src/generated/model/createGrant201UserAttributes.ts +2 -3
  213. package/src/generated/model/createGrant201UserMetadata.ts +28 -26
  214. package/src/generated/model/createGrant201UserMetadataLifecycleOwnerTeam.ts +24 -23
  215. package/src/generated/model/createGrant201UserMetadataLifecycleOwnerTeamStatus.ts +21 -0
  216. package/src/generated/model/createGrant201UserMetadataStatus.ts +7 -7
  217. package/src/generated/model/createGrant400.ts +2 -2
  218. package/src/generated/model/createGrant400Details.ts +1 -1
  219. package/src/generated/model/createGrant401.ts +2 -2
  220. package/src/generated/model/createGrant401Details.ts +1 -1
  221. package/src/generated/model/createGrant403.ts +2 -2
  222. package/src/generated/model/createGrant403Details.ts +1 -1
  223. package/src/generated/model/createGrant404.ts +2 -2
  224. package/src/generated/model/createGrant404Details.ts +1 -1
  225. package/src/generated/model/createGrant409.ts +2 -2
  226. package/src/generated/model/createGrant409Details.ts +1 -1
  227. package/src/generated/model/createGrant429.ts +2 -2
  228. package/src/generated/model/createGrant429Details.ts +1 -1
  229. package/src/generated/model/createGrantBody.ts +21 -19
  230. package/src/generated/model/createGrantBodyRelation.ts +6 -6
  231. package/src/generated/model/createGrantBodyTeam.ts +4 -6
  232. package/src/generated/model/createGrantBodyUser.ts +8 -10
  233. package/src/generated/model/createGrantDefault.ts +92 -92
  234. package/src/generated/model/createGrantParams.ts +6 -6
  235. package/src/generated/model/createHandoff200.ts +16 -16
  236. package/src/generated/model/createHandoffDefault.ts +74 -82
  237. package/src/generated/model/createIdp200.ts +19 -16
  238. package/src/generated/model/createIdp200Definition.ts +19 -19
  239. package/src/generated/model/createIdp200DefinitionClaimMapping.ts +2 -2
  240. package/src/generated/model/createIdp200DefinitionOauth2.ts +24 -21
  241. package/src/generated/model/createIdp200DefinitionOauth2StaticAuthorizeParameters.ts +2 -2
  242. package/src/generated/model/createIdp200DefinitionOauth2SupplementaryFetch.ts +4 -4
  243. package/src/generated/model/createIdp200DefinitionOauth2TokenEndpointAuthMethod.ts +5 -5
  244. package/src/generated/model/createIdp200DefinitionOidc.ts +30 -29
  245. package/src/generated/model/createIdp200DefinitionOidcStaticAuthorizeParameters.ts +2 -2
  246. package/src/generated/model/createIdp200DefinitionOidcTokenEndpointAuthMethod.ts +5 -5
  247. package/src/generated/model/createIdp200DefinitionProtocol.ts +5 -5
  248. package/src/generated/model/createIdp200DefinitionProvisioning.ts +2 -2
  249. package/src/generated/model/createIdp200DefinitionProvisioningCreation.ts +5 -5
  250. package/src/generated/model/createIdp200DefinitionVerifiedClaims.ts +2 -2
  251. package/src/generated/model/createIdp201.ts +19 -16
  252. package/src/generated/model/createIdp201Definition.ts +19 -19
  253. package/src/generated/model/createIdp201DefinitionClaimMapping.ts +2 -2
  254. package/src/generated/model/createIdp201DefinitionOauth2.ts +24 -21
  255. package/src/generated/model/createIdp201DefinitionOauth2StaticAuthorizeParameters.ts +2 -2
  256. package/src/generated/model/createIdp201DefinitionOauth2SupplementaryFetch.ts +4 -4
  257. package/src/generated/model/createIdp201DefinitionOauth2TokenEndpointAuthMethod.ts +5 -5
  258. package/src/generated/model/createIdp201DefinitionOidc.ts +30 -29
  259. package/src/generated/model/createIdp201DefinitionOidcStaticAuthorizeParameters.ts +2 -2
  260. package/src/generated/model/createIdp201DefinitionOidcTokenEndpointAuthMethod.ts +5 -5
  261. package/src/generated/model/createIdp201DefinitionProtocol.ts +5 -5
  262. package/src/generated/model/createIdp201DefinitionProvisioning.ts +2 -2
  263. package/src/generated/model/createIdp201DefinitionProvisioningCreation.ts +5 -5
  264. package/src/generated/model/createIdp201DefinitionVerifiedClaims.ts +2 -2
  265. package/src/generated/model/createIdp400.ts +2 -2
  266. package/src/generated/model/createIdp400Details.ts +1 -1
  267. package/src/generated/model/createIdp401.ts +2 -2
  268. package/src/generated/model/createIdp401Details.ts +1 -1
  269. package/src/generated/model/createIdp403.ts +2 -2
  270. package/src/generated/model/createIdp403Details.ts +1 -1
  271. package/src/generated/model/createIdp404.ts +2 -2
  272. package/src/generated/model/createIdp404Details.ts +1 -1
  273. package/src/generated/model/createIdpBody.ts +2 -2
  274. package/src/generated/model/createIdpBodyIdp.ts +19 -19
  275. package/src/generated/model/createIdpBodyIdpClaimMapping.ts +2 -2
  276. package/src/generated/model/createIdpBodyIdpOauth2.ts +24 -21
  277. package/src/generated/model/createIdpBodyIdpOauth2StaticAuthorizeParameters.ts +2 -2
  278. package/src/generated/model/createIdpBodyIdpOauth2SupplementaryFetch.ts +4 -4
  279. package/src/generated/model/createIdpBodyIdpOauth2TokenEndpointAuthMethod.ts +5 -5
  280. package/src/generated/model/createIdpBodyIdpOidc.ts +30 -29
  281. package/src/generated/model/createIdpBodyIdpOidcStaticAuthorizeParameters.ts +2 -2
  282. package/src/generated/model/createIdpBodyIdpOidcTokenEndpointAuthMethod.ts +5 -5
  283. package/src/generated/model/createIdpBodyIdpProtocol.ts +5 -5
  284. package/src/generated/model/createIdpBodyIdpProvisioning.ts +2 -2
  285. package/src/generated/model/createIdpBodyIdpProvisioningCreation.ts +5 -5
  286. package/src/generated/model/createIdpBodyIdpVerifiedClaims.ts +2 -2
  287. package/src/generated/model/createIdpDefault.ts +74 -32
  288. package/src/generated/model/createIdpParams.ts +6 -6
  289. package/src/generated/model/createProject201.ts +4 -7
  290. package/src/generated/model/createProject429.ts +2 -2
  291. package/src/generated/model/createProject429Details.ts +1 -1
  292. package/src/generated/model/createProjectBody.ts +7 -7
  293. package/src/generated/model/createProjectDefault.ts +110 -122
  294. package/src/generated/model/createRelease200.ts +21 -22
  295. package/src/generated/model/createRelease200Metadata.ts +24 -20
  296. package/src/generated/model/createRelease200MetadataCreatedByType.ts +20 -0
  297. package/src/generated/model/createRelease200PointersItem.ts +31 -33
  298. package/src/generated/model/createRelease200PointersItemKind.ts +13 -14
  299. package/src/generated/model/createRelease201.ts +21 -22
  300. package/src/generated/model/createRelease201Metadata.ts +24 -20
  301. package/src/generated/model/createRelease201MetadataCreatedByType.ts +20 -0
  302. package/src/generated/model/createRelease201PointersItem.ts +31 -33
  303. package/src/generated/model/createRelease201PointersItemKind.ts +13 -14
  304. package/src/generated/model/createReleaseBody.ts +28 -30
  305. package/src/generated/model/createReleaseBodyPointersItem.ts +19 -20
  306. package/src/generated/model/createReleaseBodyPointersItemKind.ts +13 -14
  307. package/src/generated/model/createReleaseDefault.ts +92 -102
  308. package/src/generated/model/createReleaseParams.ts +6 -6
  309. package/src/generated/model/createSchema201.ts +1 -1
  310. package/src/generated/model/createSchemaBody.ts +83 -84
  311. package/src/generated/model/createSchemaDefault.ts +128 -142
  312. package/src/generated/model/createSchemaParams.ts +11 -11
  313. package/src/generated/model/createSession201.ts +16 -15
  314. package/src/generated/model/createSession201Session.ts +48 -43
  315. package/src/generated/model/createSession201SessionFactorsItem.ts +11 -10
  316. package/src/generated/model/createSession201SessionFactorsItemMethod.ts +7 -6
  317. package/src/generated/model/createSession201SessionFactorsItemPayload.ts +27 -30
  318. package/src/generated/model/createSession201SessionMetadata.ts +1 -1
  319. package/src/generated/model/createSession201SessionState.ts +9 -10
  320. package/src/generated/model/createSession201SessionUser.ts +23 -21
  321. package/src/generated/model/createSession201SessionUserAgent.ts +2 -2
  322. package/src/generated/model/createSession400.ts +2 -2
  323. package/src/generated/model/createSession400Details.ts +1 -1
  324. package/src/generated/model/createSessionBody.ts +7 -6
  325. package/src/generated/model/createSessionBodyUserAgent.ts +4 -5
  326. package/src/generated/model/createSessionDefault.ts +92 -102
  327. package/src/generated/model/createTeam201.ts +8 -7
  328. package/src/generated/model/createTeam201Status.ts +8 -8
  329. package/src/generated/model/createTeam400.ts +2 -2
  330. package/src/generated/model/createTeam400Details.ts +1 -1
  331. package/src/generated/model/createTeam401.ts +2 -2
  332. package/src/generated/model/createTeam401Details.ts +1 -1
  333. package/src/generated/model/createTeam403.ts +2 -2
  334. package/src/generated/model/createTeam403Details.ts +1 -1
  335. package/src/generated/model/createTeam404.ts +2 -2
  336. package/src/generated/model/createTeam404Details.ts +1 -1
  337. package/src/generated/model/createTeam409.ts +2 -2
  338. package/src/generated/model/createTeam409Details.ts +1 -1
  339. package/src/generated/model/createTeam429.ts +2 -2
  340. package/src/generated/model/createTeam429Details.ts +1 -1
  341. package/src/generated/model/createTeamBody.ts +5 -5
  342. package/src/generated/model/createTeamDefault.ts +2 -2
  343. package/src/generated/model/createTeamDefaultDetails.ts +1 -1
  344. package/src/generated/model/createTeamParams.ts +6 -6
  345. package/src/generated/model/createUser201.ts +55 -49
  346. package/src/generated/model/createUser201Attributes.ts +2 -3
  347. package/src/generated/model/createUser201Metadata.ts +28 -26
  348. package/src/generated/model/createUser201MetadataLifecycleOwnerTeam.ts +24 -23
  349. package/src/generated/model/createUser201MetadataLifecycleOwnerTeamStatus.ts +21 -0
  350. package/src/generated/model/createUser201MetadataStatus.ts +7 -7
  351. package/src/generated/model/createUser201TeamsItem.ts +12 -12
  352. package/src/generated/model/createUser201TeamsItemMembershipStatus.ts +7 -8
  353. package/src/generated/model/createUser400.ts +2 -2
  354. package/src/generated/model/createUser400Details.ts +1 -1
  355. package/src/generated/model/createUser401.ts +2 -2
  356. package/src/generated/model/createUser401Details.ts +1 -1
  357. package/src/generated/model/createUser403.ts +2 -2
  358. package/src/generated/model/createUser403Details.ts +1 -1
  359. package/src/generated/model/createUser409.ts +2 -2
  360. package/src/generated/model/createUser409Details.ts +1 -1
  361. package/src/generated/model/createUser500.ts +2 -2
  362. package/src/generated/model/createUser500Details.ts +1 -1
  363. package/src/generated/model/createUserBody.ts +17 -18
  364. package/src/generated/model/createUserBodyAttributes.ts +2 -3
  365. package/src/generated/model/createUserDefault.ts +83 -82
  366. package/src/generated/model/createUserParams.ts +19 -20
  367. package/src/generated/model/deleteGrant401.ts +2 -2
  368. package/src/generated/model/deleteGrant401Details.ts +1 -1
  369. package/src/generated/model/deleteGrant403.ts +2 -2
  370. package/src/generated/model/deleteGrant403Details.ts +1 -1
  371. package/src/generated/model/deleteGrant404.ts +2 -2
  372. package/src/generated/model/deleteGrant404Details.ts +1 -1
  373. package/src/generated/model/deleteGrantDefault.ts +65 -62
  374. package/src/generated/model/deleteGrantParams.ts +6 -6
  375. package/src/generated/model/deleteTeam400.ts +2 -2
  376. package/src/generated/model/deleteTeam400Details.ts +1 -1
  377. package/src/generated/model/deleteTeam401.ts +2 -2
  378. package/src/generated/model/deleteTeam401Details.ts +1 -1
  379. package/src/generated/model/deleteTeam403.ts +2 -2
  380. package/src/generated/model/deleteTeam403Details.ts +1 -1
  381. package/src/generated/model/deleteTeam409.ts +2 -2
  382. package/src/generated/model/deleteTeam409Details.ts +1 -1
  383. package/src/generated/model/deleteTeamDefault.ts +2 -2
  384. package/src/generated/model/deleteTeamDefaultDetails.ts +1 -1
  385. package/src/generated/model/deleteUserByID401.ts +2 -2
  386. package/src/generated/model/deleteUserByID401Details.ts +1 -1
  387. package/src/generated/model/deleteUserByID404.ts +2 -2
  388. package/src/generated/model/deleteUserByID404Details.ts +1 -1
  389. package/src/generated/model/deleteUserByIDDefault.ts +65 -62
  390. package/src/generated/model/deleteVariableDefault.ts +56 -62
  391. package/src/generated/model/deleteVariableParams.ts +12 -13
  392. package/src/generated/model/exchangeHandoff200.ts +16 -15
  393. package/src/generated/model/exchangeHandoff200Session.ts +48 -43
  394. package/src/generated/model/exchangeHandoff200SessionFactorsItem.ts +11 -10
  395. package/src/generated/model/exchangeHandoff200SessionFactorsItemMethod.ts +7 -6
  396. package/src/generated/model/exchangeHandoff200SessionFactorsItemPayload.ts +27 -30
  397. package/src/generated/model/exchangeHandoff200SessionMetadata.ts +1 -1
  398. package/src/generated/model/exchangeHandoff200SessionState.ts +9 -10
  399. package/src/generated/model/exchangeHandoff200SessionUser.ts +23 -21
  400. package/src/generated/model/exchangeHandoff200SessionUserAgent.ts +2 -2
  401. package/src/generated/model/exchangeHandoff400.ts +2 -2
  402. package/src/generated/model/exchangeHandoff400Details.ts +1 -1
  403. package/src/generated/model/exchangeHandoff401.ts +2 -2
  404. package/src/generated/model/exchangeHandoff401Details.ts +1 -1
  405. package/src/generated/model/exchangeHandoff410.ts +2 -2
  406. package/src/generated/model/exchangeHandoff410Details.ts +1 -1
  407. package/src/generated/model/exchangeHandoffBody.ts +9 -7
  408. package/src/generated/model/exchangeHandoffDefault.ts +137 -152
  409. package/src/generated/model/exchangeHandoffParams.ts +6 -6
  410. package/src/generated/model/finishUserPasskeyRegistration201.ts +1 -1
  411. package/src/generated/model/finishUserPasskeyRegistration400.ts +2 -2
  412. package/src/generated/model/finishUserPasskeyRegistration400Details.ts +1 -1
  413. package/src/generated/model/finishUserPasskeyRegistration401.ts +2 -2
  414. package/src/generated/model/finishUserPasskeyRegistration401Details.ts +1 -1
  415. package/src/generated/model/finishUserPasskeyRegistration403.ts +2 -2
  416. package/src/generated/model/finishUserPasskeyRegistration403Details.ts +1 -1
  417. package/src/generated/model/finishUserPasskeyRegistration404.ts +2 -2
  418. package/src/generated/model/finishUserPasskeyRegistration404Details.ts +1 -1
  419. package/src/generated/model/finishUserPasskeyRegistration500.ts +2 -2
  420. package/src/generated/model/finishUserPasskeyRegistration500Details.ts +1 -1
  421. package/src/generated/model/finishUserPasskeyRegistrationBody.ts +6 -5
  422. package/src/generated/model/finishUserPasskeyRegistrationBodyAttestation.ts +1 -1
  423. package/src/generated/model/finishUserPasskeyRegistrationDefault.ts +146 -142
  424. package/src/generated/model/getAuthAttempt200.ts +49 -44
  425. package/src/generated/model/getAuthAttempt200ChallengesItem.ts +26 -22
  426. package/src/generated/model/getAuthAttempt200ChallengesItemMethod.ts +8 -7
  427. package/src/generated/model/getAuthAttempt200ChallengesItemPayload.ts +24 -26
  428. package/src/generated/model/getAuthAttempt200ChallengesItemState.ts +9 -10
  429. package/src/generated/model/getAuthAttempt200CompletedFactorsItem.ts +11 -10
  430. package/src/generated/model/getAuthAttempt200CompletedFactorsItemMethod.ts +7 -6
  431. package/src/generated/model/getAuthAttempt200CompletedFactorsItemPayload.ts +27 -30
  432. package/src/generated/model/getAuthAttempt200RequiredFactorsItem.ts +7 -6
  433. package/src/generated/model/getAuthAttempt200State.ts +11 -12
  434. package/src/generated/model/getAuthAttemptDefault.ts +38 -42
  435. package/src/generated/model/getBrandingById200.ts +15 -15
  436. package/src/generated/model/getBrandingById200Branding.ts +49 -46
  437. package/src/generated/model/getBrandingById200BrandingLayout.ts +14 -14
  438. package/src/generated/model/getBrandingById200BrandingShape.ts +10 -11
  439. package/src/generated/model/getBrandingById200BrandingShapeDensity.ts +6 -6
  440. package/src/generated/model/getBrandingById200BrandingTheme.ts +28 -22
  441. package/src/generated/model/getBrandingById200BrandingThemeDark.ts +15 -14
  442. package/src/generated/model/getBrandingById200BrandingThemeDarkPalette.ts +113 -126
  443. package/src/generated/model/getBrandingById200BrandingThemeLight.ts +15 -14
  444. package/src/generated/model/getBrandingById200BrandingThemeLightPalette.ts +113 -126
  445. package/src/generated/model/getBrandingById200BrandingThemeMode.ts +6 -7
  446. package/src/generated/model/getBrandingById200BrandingTypography.ts +20 -22
  447. package/src/generated/model/getBrandingById404.ts +2 -2
  448. package/src/generated/model/getBrandingById404Details.ts +1 -1
  449. package/src/generated/model/getBrandingByIdDefault.ts +2 -2
  450. package/src/generated/model/getBrandingByIdDefaultDetails.ts +1 -1
  451. package/src/generated/model/getClaimStatus200.ts +18 -21
  452. package/src/generated/model/getClaimStatus401.ts +2 -2
  453. package/src/generated/model/getClaimStatus401Details.ts +1 -1
  454. package/src/generated/model/getClaimStatus403.ts +4 -5
  455. package/src/generated/model/getClaimStatus404.ts +2 -2
  456. package/src/generated/model/getClaimStatus404Details.ts +1 -1
  457. package/src/generated/model/getClaimStatus410.ts +20 -22
  458. package/src/generated/model/getClaimStatus429.ts +2 -2
  459. package/src/generated/model/getClaimStatus429Details.ts +1 -1
  460. package/src/generated/model/getClaimStatusDefault.ts +2 -2
  461. package/src/generated/model/getClaimStatusDefaultDetails.ts +1 -1
  462. package/src/generated/model/getClaimStatusParams.ts +6 -6
  463. package/src/generated/model/getClaimWindow200.ts +8 -8
  464. package/src/generated/model/getClaimWindow404.ts +2 -2
  465. package/src/generated/model/getClaimWindow404Details.ts +1 -1
  466. package/src/generated/model/getClaimWindow429.ts +2 -2
  467. package/src/generated/model/getClaimWindow429Details.ts +1 -1
  468. package/src/generated/model/getClaimWindowDefault.ts +2 -2
  469. package/src/generated/model/getClaimWindowDefaultDetails.ts +1 -1
  470. package/src/generated/model/getClaimWindowParams.ts +6 -6
  471. package/src/generated/model/getDeploymentById200.ts +62 -0
  472. package/src/generated/model/getDeploymentById200Metadata.ts +58 -0
  473. package/src/generated/model/getDeploymentById200MetadataDeployedByType.ts +20 -0
  474. package/src/generated/model/getDeploymentById200MetadataReason.ts +26 -0
  475. package/src/generated/model/getDeploymentById200Release.ts +44 -0
  476. package/src/generated/model/getDeploymentById200ReleaseMetadata.ts +43 -0
  477. package/src/generated/model/getDeploymentById200ReleaseMetadataCreatedByType.ts +20 -0
  478. package/src/generated/model/getDeploymentById200ReleasePointersItem.ts +56 -0
  479. package/src/generated/model/getDeploymentById200ReleasePointersItemKind.ts +26 -0
  480. package/src/generated/model/getDeploymentByIdDefault.ts +54 -0
  481. package/src/generated/model/getDeploymentByIdParams.ts +15 -0
  482. package/src/generated/model/getEnvironmentByName200.ts +17 -13
  483. package/src/generated/model/getEnvironmentByName200CurrentDeployment.ts +38 -0
  484. package/src/generated/model/getEnvironmentByName200CurrentDeploymentReason.ts +26 -0
  485. package/src/generated/model/getEnvironmentByNameDefault.ts +47 -52
  486. package/src/generated/model/getEnvironmentByNameParams.ts +6 -6
  487. package/src/generated/model/getEvent200.ts +2596 -1943
  488. package/src/generated/model/getEvent401.ts +2 -2
  489. package/src/generated/model/getEvent401Details.ts +1 -1
  490. package/src/generated/model/getEvent403.ts +2 -2
  491. package/src/generated/model/getEvent403Details.ts +1 -1
  492. package/src/generated/model/getEvent404.ts +2 -2
  493. package/src/generated/model/getEvent404Details.ts +1 -1
  494. package/src/generated/model/getEventDefault.ts +2 -2
  495. package/src/generated/model/getEventDefaultDetails.ts +1 -1
  496. package/src/generated/model/getEventParams.ts +6 -6
  497. package/src/generated/model/getFlowDefinition200.ts +19 -17
  498. package/src/generated/model/getFlowDefinition200FlowDefinition.ts +45 -46
  499. package/src/generated/model/getFlowDefinition200FlowDefinitionAudience.ts +4 -5
  500. package/src/generated/model/getFlowDefinition200FlowDefinitionStatus.ts +10 -11
  501. package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItem.ts +68 -54
  502. package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemActionsItem.ts +30 -28
  503. package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemActionsItemKind.ts +16 -17
  504. package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemComplete.ts +7 -8
  505. package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemGates.ts +25 -25
  506. package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemGatesConfig.ts +2 -3
  507. package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemGatesKind.ts +6 -7
  508. package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemOnSuccess.ts +13 -8
  509. package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemTransitions.ts +38 -36
  510. package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemTransitionsAction.ts +25 -0
  511. package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemTransitionsPurpose.ts +30 -0
  512. package/src/generated/model/getFlowDefinition200UserSchema.ts +12 -97
  513. package/src/generated/model/getFlowDefinition200UserSchemaMetadata.ts +12 -0
  514. package/src/generated/model/getFlowDefinition200UserSchemaSchema.ts +97 -0
  515. package/src/generated/model/getFlowDefinitionDefault.ts +65 -72
  516. package/src/generated/model/getFlowStep200.ts +34 -29
  517. package/src/generated/model/getFlowStep200Branding.ts +49 -46
  518. package/src/generated/model/getFlowStep200BrandingLayout.ts +14 -14
  519. package/src/generated/model/getFlowStep200BrandingShape.ts +10 -11
  520. package/src/generated/model/getFlowStep200BrandingShapeDensity.ts +6 -6
  521. package/src/generated/model/getFlowStep200BrandingTheme.ts +28 -22
  522. package/src/generated/model/getFlowStep200BrandingThemeDark.ts +15 -14
  523. package/src/generated/model/getFlowStep200BrandingThemeDarkPalette.ts +113 -126
  524. package/src/generated/model/getFlowStep200BrandingThemeLight.ts +15 -14
  525. package/src/generated/model/getFlowStep200BrandingThemeLightPalette.ts +113 -126
  526. package/src/generated/model/getFlowStep200BrandingThemeMode.ts +6 -7
  527. package/src/generated/model/getFlowStep200BrandingTypography.ts +20 -22
  528. package/src/generated/model/getFlowStep200Step.ts +90 -50
  529. package/src/generated/model/getFlowStep200StepActionsItem.ts +24 -22
  530. package/src/generated/model/getFlowStep200StepActionsItemKind.ts +14 -15
  531. package/src/generated/model/getFlowStep200StepChallenge.ts +19 -18
  532. package/src/generated/model/getFlowStep200StepChallengeMethod.ts +5 -5
  533. package/src/generated/model/getFlowStep200StepChallengeOptions.ts +4 -5
  534. package/src/generated/model/getFlowStep200StepComplete.ts +7 -8
  535. package/src/generated/model/getFlowStep200StepFieldsItem.ts +54 -26
  536. package/src/generated/model/getFlowStep200StepFieldsItemType.ts +17 -18
  537. package/src/generated/model/getFlowStep200StepFieldsItemValidation.ts +28 -27
  538. package/src/generated/model/getFlowStep200StepFieldsItemValidationFormat.ts +11 -12
  539. package/src/generated/model/getFlowStep200StepGates.ts +24 -24
  540. package/src/generated/model/getFlowStep200StepGatesConfig.ts +2 -3
  541. package/src/generated/model/getFlowStep200StepGatesKind.ts +6 -7
  542. package/src/generated/model/getFlowStep200StepIdentifier.ts +53 -0
  543. package/src/generated/model/getFlowStep200StepSsoProvidersItem.ts +1 -1
  544. package/src/generated/model/getFlowStep200StepTexts.ts +2 -3
  545. package/src/generated/model/getFlowStep404.ts +2 -2
  546. package/src/generated/model/getFlowStep404Details.ts +1 -1
  547. package/src/generated/model/getFlowStep409.ts +20 -0
  548. package/src/generated/model/getFlowStep409Details.ts +12 -0
  549. package/src/generated/model/getFlowStep410.ts +2 -2
  550. package/src/generated/model/getFlowStep410Details.ts +1 -1
  551. package/src/generated/model/getFlowStepDefault.ts +272 -112
  552. package/src/generated/model/getGrant200.ts +24 -22
  553. package/src/generated/model/getGrant200ObjectType.ts +4 -4
  554. package/src/generated/model/getGrant200Relation.ts +6 -5
  555. package/src/generated/model/getGrant200Team.ts +13 -15
  556. package/src/generated/model/getGrant200TeamStatus.ts +8 -9
  557. package/src/generated/model/getGrant200User.ts +31 -27
  558. package/src/generated/model/getGrant200UserAttributes.ts +2 -3
  559. package/src/generated/model/getGrant200UserMetadata.ts +28 -26
  560. package/src/generated/model/getGrant200UserMetadataLifecycleOwnerTeam.ts +24 -23
  561. package/src/generated/model/getGrant200UserMetadataLifecycleOwnerTeamStatus.ts +21 -0
  562. package/src/generated/model/getGrant200UserMetadataStatus.ts +7 -7
  563. package/src/generated/model/getGrant401.ts +2 -2
  564. package/src/generated/model/getGrant401Details.ts +1 -1
  565. package/src/generated/model/getGrant403.ts +2 -2
  566. package/src/generated/model/getGrant403Details.ts +1 -1
  567. package/src/generated/model/getGrant404.ts +2 -2
  568. package/src/generated/model/getGrant404Details.ts +1 -1
  569. package/src/generated/model/getGrantDefault.ts +65 -72
  570. package/src/generated/model/getGrantExpandItem.ts +16 -16
  571. package/src/generated/model/getGrantParams.ts +10 -11
  572. package/src/generated/model/getHealth4xx.ts +2 -2
  573. package/src/generated/model/getHealth4xxDetails.ts +1 -1
  574. package/src/generated/model/getHealthDefault.ts +2 -2
  575. package/src/generated/model/getHealthDefaultDetails.ts +1 -1
  576. package/src/generated/model/getIdpById200.ts +19 -16
  577. package/src/generated/model/getIdpById200Definition.ts +19 -19
  578. package/src/generated/model/getIdpById200DefinitionClaimMapping.ts +2 -2
  579. package/src/generated/model/getIdpById200DefinitionOauth2.ts +24 -21
  580. package/src/generated/model/getIdpById200DefinitionOauth2StaticAuthorizeParameters.ts +2 -2
  581. package/src/generated/model/getIdpById200DefinitionOauth2SupplementaryFetch.ts +4 -4
  582. package/src/generated/model/getIdpById200DefinitionOauth2TokenEndpointAuthMethod.ts +5 -5
  583. package/src/generated/model/getIdpById200DefinitionOidc.ts +30 -29
  584. package/src/generated/model/getIdpById200DefinitionOidcStaticAuthorizeParameters.ts +2 -2
  585. package/src/generated/model/getIdpById200DefinitionOidcTokenEndpointAuthMethod.ts +5 -5
  586. package/src/generated/model/getIdpById200DefinitionProtocol.ts +5 -5
  587. package/src/generated/model/getIdpById200DefinitionProvisioning.ts +2 -2
  588. package/src/generated/model/getIdpById200DefinitionProvisioningCreation.ts +5 -5
  589. package/src/generated/model/getIdpById200DefinitionVerifiedClaims.ts +2 -2
  590. package/src/generated/model/getIdpById401.ts +2 -2
  591. package/src/generated/model/getIdpById401Details.ts +1 -1
  592. package/src/generated/model/getIdpById403.ts +2 -2
  593. package/src/generated/model/getIdpById403Details.ts +1 -1
  594. package/src/generated/model/getIdpById404.ts +2 -2
  595. package/src/generated/model/getIdpById404Details.ts +1 -1
  596. package/src/generated/model/getIdpByIdDefault.ts +47 -32
  597. package/src/generated/model/getIdpByIdParams.ts +6 -6
  598. package/src/generated/model/getIdpRevisionById200.ts +19 -16
  599. package/src/generated/model/getIdpRevisionById200Definition.ts +19 -19
  600. package/src/generated/model/getIdpRevisionById200DefinitionClaimMapping.ts +2 -2
  601. package/src/generated/model/getIdpRevisionById200DefinitionOauth2.ts +24 -21
  602. package/src/generated/model/getIdpRevisionById200DefinitionOauth2StaticAuthorizeParameters.ts +2 -4
  603. package/src/generated/model/getIdpRevisionById200DefinitionOauth2SupplementaryFetch.ts +4 -4
  604. package/src/generated/model/getIdpRevisionById200DefinitionOauth2TokenEndpointAuthMethod.ts +5 -5
  605. package/src/generated/model/getIdpRevisionById200DefinitionOidc.ts +30 -29
  606. package/src/generated/model/getIdpRevisionById200DefinitionOidcStaticAuthorizeParameters.ts +2 -4
  607. package/src/generated/model/getIdpRevisionById200DefinitionOidcTokenEndpointAuthMethod.ts +5 -5
  608. package/src/generated/model/getIdpRevisionById200DefinitionProtocol.ts +5 -5
  609. package/src/generated/model/getIdpRevisionById200DefinitionProvisioning.ts +2 -2
  610. package/src/generated/model/getIdpRevisionById200DefinitionProvisioningCreation.ts +5 -5
  611. package/src/generated/model/getIdpRevisionById200DefinitionVerifiedClaims.ts +2 -2
  612. package/src/generated/model/getIdpRevisionById401.ts +2 -2
  613. package/src/generated/model/getIdpRevisionById401Details.ts +1 -1
  614. package/src/generated/model/getIdpRevisionById403.ts +2 -2
  615. package/src/generated/model/getIdpRevisionById403Details.ts +1 -1
  616. package/src/generated/model/getIdpRevisionById404.ts +2 -2
  617. package/src/generated/model/getIdpRevisionById404Details.ts +1 -1
  618. package/src/generated/model/getIdpRevisionByIdDefault.ts +47 -32
  619. package/src/generated/model/getIdpRevisionByIdParams.ts +6 -6
  620. package/src/generated/model/getLive4xx.ts +2 -2
  621. package/src/generated/model/getLive4xxDetails.ts +1 -1
  622. package/src/generated/model/getLiveDefault.ts +2 -2
  623. package/src/generated/model/getLiveDefaultDetails.ts +1 -1
  624. package/src/generated/model/getMySession200.ts +48 -43
  625. package/src/generated/model/getMySession200FactorsItem.ts +11 -10
  626. package/src/generated/model/getMySession200FactorsItemMethod.ts +7 -6
  627. package/src/generated/model/getMySession200FactorsItemPayload.ts +27 -30
  628. package/src/generated/model/getMySession200Metadata.ts +1 -1
  629. package/src/generated/model/getMySession200State.ts +9 -9
  630. package/src/generated/model/getMySession200User.ts +23 -21
  631. package/src/generated/model/getMySession200UserAgent.ts +2 -2
  632. package/src/generated/model/getMySession401.ts +4 -5
  633. package/src/generated/model/getMySession404.ts +4 -5
  634. package/src/generated/model/getMySessionCsrfToken200.ts +18 -0
  635. package/src/generated/model/getMySessionCsrfToken401.ts +23 -0
  636. package/src/generated/model/getMySessionDefault.ts +38 -42
  637. package/src/generated/model/getMyUser200.ts +55 -49
  638. package/src/generated/model/getMyUser200Attributes.ts +2 -3
  639. package/src/generated/model/getMyUser200Metadata.ts +28 -26
  640. package/src/generated/model/getMyUser200MetadataLifecycleOwnerTeam.ts +24 -23
  641. package/src/generated/model/getMyUser200MetadataLifecycleOwnerTeamStatus.ts +21 -0
  642. package/src/generated/model/getMyUser200MetadataStatus.ts +7 -7
  643. package/src/generated/model/getMyUser200TeamsItem.ts +12 -12
  644. package/src/generated/model/getMyUser200TeamsItemMembershipStatus.ts +7 -8
  645. package/src/generated/model/getMyUser401.ts +2 -2
  646. package/src/generated/model/getMyUser401Details.ts +1 -1
  647. package/src/generated/model/getMyUser404.ts +4 -5
  648. package/src/generated/model/getMyUserDefault.ts +47 -52
  649. package/src/generated/model/getProject200.ts +8 -3
  650. package/src/generated/model/getProject200PasswordHash.ts +42 -0
  651. package/src/generated/model/getProject200PasswordHashAlgorithm.ts +24 -0
  652. package/src/generated/model/getProject200PasswordHashParams.ts +47 -0
  653. package/src/generated/model/getProject200PasswordHashParamsHash.ts +24 -0
  654. package/src/generated/model/getProject401.ts +2 -2
  655. package/src/generated/model/getProject401Details.ts +1 -1
  656. package/src/generated/model/getProject404.ts +2 -2
  657. package/src/generated/model/getProject404Details.ts +1 -1
  658. package/src/generated/model/getProjectDefault.ts +65 -72
  659. package/src/generated/model/getReady4xx.ts +2 -2
  660. package/src/generated/model/getReady4xxDetails.ts +1 -1
  661. package/src/generated/model/getReadyDefault.ts +2 -2
  662. package/src/generated/model/getReadyDefaultDetails.ts +1 -1
  663. package/src/generated/model/getReleaseById200.ts +21 -22
  664. package/src/generated/model/getReleaseById200Metadata.ts +24 -20
  665. package/src/generated/model/getReleaseById200MetadataCreatedByType.ts +20 -0
  666. package/src/generated/model/getReleaseById200PointersItem.ts +31 -33
  667. package/src/generated/model/getReleaseById200PointersItemKind.ts +13 -14
  668. package/src/generated/model/getReleaseByIdDefault.ts +47 -52
  669. package/src/generated/model/getReleaseByIdParams.ts +6 -6
  670. package/src/generated/model/getSchemaById200.ts +15 -15
  671. package/src/generated/model/getSchemaById200Metadata.ts +1 -1
  672. package/src/generated/model/getSchemaById200Schema.ts +68 -67
  673. package/src/generated/model/getSchemaByIdDefault.ts +47 -52
  674. package/src/generated/model/getSchemaByIdParams.ts +12 -6
  675. package/src/generated/model/getSession200.ts +48 -43
  676. package/src/generated/model/getSession200FactorsItem.ts +11 -10
  677. package/src/generated/model/getSession200FactorsItemMethod.ts +7 -6
  678. package/src/generated/model/getSession200FactorsItemPayload.ts +27 -30
  679. package/src/generated/model/getSession200Metadata.ts +1 -1
  680. package/src/generated/model/getSession200State.ts +9 -9
  681. package/src/generated/model/getSession200User.ts +23 -21
  682. package/src/generated/model/getSession200UserAgent.ts +2 -2
  683. package/src/generated/model/getSession401.ts +2 -2
  684. package/src/generated/model/getSession401Details.ts +1 -1
  685. package/src/generated/model/getSession403.ts +2 -2
  686. package/src/generated/model/getSession403Details.ts +1 -1
  687. package/src/generated/model/getSession404.ts +2 -2
  688. package/src/generated/model/getSession404Details.ts +1 -1
  689. package/src/generated/model/getSessionDefault.ts +47 -52
  690. package/src/generated/model/getTeam200.ts +8 -7
  691. package/src/generated/model/getTeam200Status.ts +8 -8
  692. package/src/generated/model/getTeam401.ts +2 -2
  693. package/src/generated/model/getTeam401Details.ts +1 -1
  694. package/src/generated/model/getTeam404.ts +2 -2
  695. package/src/generated/model/getTeam404Details.ts +1 -1
  696. package/src/generated/model/getTeamDefault.ts +2 -2
  697. package/src/generated/model/getTeamDefaultDetails.ts +1 -1
  698. package/src/generated/model/getUserByID200.ts +55 -49
  699. package/src/generated/model/getUserByID200Attributes.ts +2 -3
  700. package/src/generated/model/getUserByID200Metadata.ts +28 -26
  701. package/src/generated/model/getUserByID200MetadataLifecycleOwnerTeam.ts +24 -23
  702. package/src/generated/model/getUserByID200MetadataLifecycleOwnerTeamStatus.ts +21 -0
  703. package/src/generated/model/getUserByID200MetadataStatus.ts +7 -7
  704. package/src/generated/model/getUserByID200TeamsItem.ts +12 -12
  705. package/src/generated/model/getUserByID200TeamsItemMembershipStatus.ts +7 -8
  706. package/src/generated/model/getUserByID401.ts +2 -2
  707. package/src/generated/model/getUserByID401Details.ts +1 -1
  708. package/src/generated/model/getUserByID404.ts +2 -2
  709. package/src/generated/model/getUserByID404Details.ts +1 -1
  710. package/src/generated/model/getUserByIDDefault.ts +47 -52
  711. package/src/generated/model/getUserByIDParams.ts +18 -14
  712. package/src/generated/model/getVariable200.ts +10 -15
  713. package/src/generated/model/getVariableDefault.ts +56 -62
  714. package/src/generated/model/getVariableParams.ts +12 -13
  715. package/src/generated/model/getVariables200.ts +12 -19
  716. package/src/generated/model/getVariablesDefault.ts +56 -62
  717. package/src/generated/model/getVariablesParams.ts +12 -13
  718. package/src/generated/model/index.ts +1156 -1050
  719. package/src/generated/model/initClaim201.ts +8 -7
  720. package/src/generated/model/initClaim401.ts +2 -2
  721. package/src/generated/model/initClaim401Details.ts +1 -1
  722. package/src/generated/model/initClaim404.ts +4 -5
  723. package/src/generated/model/initClaim409.ts +4 -5
  724. package/src/generated/model/initClaim409Details.ts +1 -1
  725. package/src/generated/model/initClaim410.ts +4 -5
  726. package/src/generated/model/initClaimDefault.ts +2 -2
  727. package/src/generated/model/initClaimDefaultDetails.ts +1 -1
  728. package/src/generated/model/issueChallenge201.ts +26 -22
  729. package/src/generated/model/issueChallenge201Method.ts +8 -7
  730. package/src/generated/model/issueChallenge201Payload.ts +24 -26
  731. package/src/generated/model/issueChallenge201State.ts +9 -10
  732. package/src/generated/model/issueChallengeBody.ts +13 -11
  733. package/src/generated/model/issueChallengeBodyMethod.ts +8 -7
  734. package/src/generated/model/issueChallengeBodyPasskeyOptions.ts +2 -2
  735. package/src/generated/model/issueChallengeBodyPasskeyOptionsUserVerification.ts +6 -6
  736. package/src/generated/model/issueChallengeDefault.ts +65 -72
  737. package/src/generated/model/listBranding200Item.ts +1 -1
  738. package/src/generated/model/listBrandingDefault.ts +2 -2
  739. package/src/generated/model/listBrandingDefaultDetails.ts +1 -1
  740. package/src/generated/model/listBrandingParams.ts +6 -6
  741. package/src/generated/model/listDeployments200.ts +25 -0
  742. package/src/generated/model/listDeployments200DeploymentsItem.ts +62 -0
  743. package/src/generated/model/listDeployments200DeploymentsItemMetadata.ts +58 -0
  744. package/src/generated/model/listDeployments200DeploymentsItemMetadataDeployedByType.ts +20 -0
  745. package/src/generated/model/listDeployments200DeploymentsItemMetadataReason.ts +26 -0
  746. package/src/generated/model/listDeployments200DeploymentsItemRelease.ts +44 -0
  747. package/src/generated/model/listDeployments200DeploymentsItemReleaseMetadata.ts +43 -0
  748. package/src/generated/model/listDeployments200DeploymentsItemReleaseMetadataCreatedByType.ts +20 -0
  749. package/src/generated/model/listDeployments200DeploymentsItemReleasePointersItem.ts +56 -0
  750. package/src/generated/model/listDeployments200DeploymentsItemReleasePointersItemKind.ts +26 -0
  751. package/src/generated/model/listDeploymentsDefault.ts +63 -0
  752. package/src/generated/model/listDeploymentsExpandItem.ts +25 -0
  753. package/src/generated/model/listDeploymentsParams.ts +43 -0
  754. package/src/generated/model/listEnvironments200.ts +6 -5
  755. package/src/generated/model/listEnvironments200EnvironmentsItem.ts +17 -13
  756. package/src/generated/model/listEnvironments200EnvironmentsItemCurrentDeployment.ts +38 -0
  757. package/src/generated/model/listEnvironments200EnvironmentsItemCurrentDeploymentReason.ts +26 -0
  758. package/src/generated/model/listEnvironmentsDefault.ts +47 -52
  759. package/src/generated/model/listEnvironmentsParams.ts +17 -18
  760. package/src/generated/model/listEvents200.ts +6 -5
  761. package/src/generated/model/listEvents200DataItem.ts +2596 -1943
  762. package/src/generated/model/listEvents400.ts +2 -2
  763. package/src/generated/model/listEvents400Details.ts +1 -1
  764. package/src/generated/model/listEvents401.ts +2 -2
  765. package/src/generated/model/listEvents401Details.ts +1 -1
  766. package/src/generated/model/listEvents403.ts +2 -2
  767. package/src/generated/model/listEvents403Details.ts +1 -1
  768. package/src/generated/model/listEventsCategoryItem.ts +9 -9
  769. package/src/generated/model/listEventsDefault.ts +2 -2
  770. package/src/generated/model/listEventsDefaultDetails.ts +1 -1
  771. package/src/generated/model/listEventsOrder.ts +5 -4
  772. package/src/generated/model/listEventsParams.ts +46 -50
  773. package/src/generated/model/listFlowDefinitions200.ts +2 -2
  774. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItem.ts +19 -17
  775. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinition.ts +45 -46
  776. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionAudience.ts +4 -5
  777. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStatus.ts +10 -11
  778. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItem.ts +68 -54
  779. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemActionsItem.ts +30 -28
  780. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemActionsItemKind.ts +16 -17
  781. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemComplete.ts +7 -8
  782. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemGates.ts +25 -25
  783. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemGatesConfig.ts +3 -6
  784. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemGatesKind.ts +6 -7
  785. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemOnSuccess.ts +13 -8
  786. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemTransitions.ts +38 -36
  787. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemTransitionsAction.ts +25 -0
  788. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemFlowDefinitionStepsItemTransitionsPurpose.ts +30 -0
  789. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemUserSchema.ts +12 -97
  790. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemUserSchemaMetadata.ts +12 -0
  791. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemUserSchemaSchema.ts +97 -0
  792. package/src/generated/model/listFlowDefinitions400.ts +2 -2
  793. package/src/generated/model/listFlowDefinitions400Details.ts +1 -1
  794. package/src/generated/model/listFlowDefinitionsDefault.ts +83 -92
  795. package/src/generated/model/listFlowDefinitionsExpandItem.ts +11 -12
  796. package/src/generated/model/listFlowDefinitionsParams.ts +43 -46
  797. package/src/generated/model/listFlowDefinitionsPurpose.ts +9 -9
  798. package/src/generated/model/listFlowDefinitionsRevisions.ts +5 -5
  799. package/src/generated/model/listIdpRevisions200.ts +7 -7
  800. package/src/generated/model/listIdpRevisions200RevisionsItem.ts +19 -16
  801. package/src/generated/model/listIdpRevisions200RevisionsItemDefinition.ts +19 -19
  802. package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionClaimMapping.ts +2 -2
  803. package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionOauth2.ts +24 -21
  804. package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionOauth2StaticAuthorizeParameters.ts +2 -4
  805. package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionOauth2SupplementaryFetch.ts +4 -4
  806. package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionOauth2TokenEndpointAuthMethod.ts +5 -5
  807. package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionOidc.ts +30 -29
  808. package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionOidcStaticAuthorizeParameters.ts +2 -4
  809. package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionOidcTokenEndpointAuthMethod.ts +5 -5
  810. package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionProtocol.ts +5 -5
  811. package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionProvisioning.ts +2 -2
  812. package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionProvisioningCreation.ts +5 -5
  813. package/src/generated/model/listIdpRevisions200RevisionsItemDefinitionVerifiedClaims.ts +2 -4
  814. package/src/generated/model/listIdpRevisions401.ts +2 -2
  815. package/src/generated/model/listIdpRevisions401Details.ts +1 -1
  816. package/src/generated/model/listIdpRevisions403.ts +2 -2
  817. package/src/generated/model/listIdpRevisions403Details.ts +1 -1
  818. package/src/generated/model/listIdpRevisions404.ts +2 -2
  819. package/src/generated/model/listIdpRevisions404Details.ts +1 -1
  820. package/src/generated/model/listIdpRevisionsDefault.ts +47 -32
  821. package/src/generated/model/listIdpRevisionsParams.ts +17 -18
  822. package/src/generated/model/listMyProjects200.ts +7 -6
  823. package/src/generated/model/listMyProjects200ProjectsItem.ts +8 -3
  824. package/src/generated/model/listMyProjects200ProjectsItemPasswordHash.ts +42 -0
  825. package/src/generated/model/listMyProjects200ProjectsItemPasswordHashAlgorithm.ts +24 -0
  826. package/src/generated/model/listMyProjects200ProjectsItemPasswordHashParams.ts +47 -0
  827. package/src/generated/model/listMyProjects200ProjectsItemPasswordHashParamsHash.ts +24 -0
  828. package/src/generated/model/listMyProjects400.ts +2 -2
  829. package/src/generated/model/listMyProjects400Details.ts +1 -1
  830. package/src/generated/model/listMyProjects401.ts +4 -5
  831. package/src/generated/model/listMyProjects500.ts +2 -2
  832. package/src/generated/model/listMyProjects500Details.ts +1 -1
  833. package/src/generated/model/listMyProjectsDefault.ts +29 -32
  834. package/src/generated/model/listMyProjectsParams.ts +12 -13
  835. package/src/generated/model/listReleases200.ts +6 -5
  836. package/src/generated/model/listReleases200ReleasesItem.ts +13 -13
  837. package/src/generated/model/listReleases200ReleasesItemMetadata.ts +24 -20
  838. package/src/generated/model/listReleases200ReleasesItemMetadataCreatedByType.ts +20 -0
  839. package/src/generated/model/listReleasesDefault.ts +47 -52
  840. package/src/generated/model/listReleasesParams.ts +17 -18
  841. package/src/generated/model/listSchemas200.ts +6 -5
  842. package/src/generated/model/listSchemas200SchemasItem.ts +15 -15
  843. package/src/generated/model/listSchemas200SchemasItemMetadata.ts +1 -1
  844. package/src/generated/model/listSchemas200SchemasItemSchema.ts +68 -67
  845. package/src/generated/model/listSchemasDefault.ts +47 -52
  846. package/src/generated/model/listSchemasKind.ts +4 -3
  847. package/src/generated/model/listSchemasParams.ts +47 -50
  848. package/src/generated/model/listSchemasRevisions.ts +5 -4
  849. package/src/generated/model/listUserPasskeys200.ts +6 -5
  850. package/src/generated/model/listUserPasskeys200PasskeysItem.ts +1 -1
  851. package/src/generated/model/listUserPasskeys400.ts +2 -2
  852. package/src/generated/model/listUserPasskeys400Details.ts +1 -1
  853. package/src/generated/model/listUserPasskeys401.ts +2 -2
  854. package/src/generated/model/listUserPasskeys401Details.ts +1 -1
  855. package/src/generated/model/listUserPasskeys403.ts +2 -2
  856. package/src/generated/model/listUserPasskeys403Details.ts +1 -1
  857. package/src/generated/model/listUserPasskeys404.ts +2 -2
  858. package/src/generated/model/listUserPasskeys404Details.ts +1 -1
  859. package/src/generated/model/listUserPasskeys500.ts +2 -2
  860. package/src/generated/model/listUserPasskeys500Details.ts +1 -1
  861. package/src/generated/model/listUserPasskeysDefault.ts +47 -52
  862. package/src/generated/model/listUserPasskeysParams.ts +12 -13
  863. package/src/generated/model/listUserTeams200.ts +6 -5
  864. package/src/generated/model/listUserTeams200TeamsItem.ts +12 -12
  865. package/src/generated/model/listUserTeams200TeamsItemMembershipStatus.ts +7 -8
  866. package/src/generated/model/listUserTeams400.ts +2 -2
  867. package/src/generated/model/listUserTeams400Details.ts +1 -1
  868. package/src/generated/model/listUserTeams401.ts +2 -2
  869. package/src/generated/model/listUserTeams401Details.ts +1 -1
  870. package/src/generated/model/listUserTeams403.ts +2 -2
  871. package/src/generated/model/listUserTeams403Details.ts +1 -1
  872. package/src/generated/model/listUserTeams404.ts +2 -2
  873. package/src/generated/model/listUserTeams404Details.ts +1 -1
  874. package/src/generated/model/listUserTeams500.ts +2 -2
  875. package/src/generated/model/listUserTeams500Details.ts +1 -1
  876. package/src/generated/model/listUserTeamsDefault.ts +47 -52
  877. package/src/generated/model/listUserTeamsParams.ts +12 -13
  878. package/src/generated/model/patchMyUser200.ts +55 -49
  879. package/src/generated/model/patchMyUser200Attributes.ts +2 -3
  880. package/src/generated/model/patchMyUser200Metadata.ts +28 -26
  881. package/src/generated/model/patchMyUser200MetadataLifecycleOwnerTeam.ts +24 -23
  882. package/src/generated/model/patchMyUser200MetadataLifecycleOwnerTeamStatus.ts +21 -0
  883. package/src/generated/model/patchMyUser200MetadataStatus.ts +7 -7
  884. package/src/generated/model/patchMyUser200TeamsItem.ts +12 -12
  885. package/src/generated/model/patchMyUser200TeamsItemMembershipStatus.ts +7 -8
  886. package/src/generated/model/patchMyUser400.ts +2 -2
  887. package/src/generated/model/patchMyUser400Details.ts +1 -1
  888. package/src/generated/model/patchMyUser401.ts +2 -2
  889. package/src/generated/model/patchMyUser401Details.ts +1 -1
  890. package/src/generated/model/patchMyUser404.ts +4 -5
  891. package/src/generated/model/patchMyUser409.ts +2 -2
  892. package/src/generated/model/patchMyUser409Details.ts +1 -1
  893. package/src/generated/model/patchMyUserBody.ts +12 -12
  894. package/src/generated/model/patchMyUserBodyAttributes.ts +2 -3
  895. package/src/generated/model/patchMyUserDefault.ts +92 -82
  896. package/src/generated/model/patchProject200.ts +8 -3
  897. package/src/generated/model/patchProject200PasswordHash.ts +42 -0
  898. package/src/generated/model/patchProject200PasswordHashAlgorithm.ts +24 -0
  899. package/src/generated/model/patchProject200PasswordHashParams.ts +47 -0
  900. package/src/generated/model/patchProject200PasswordHashParamsHash.ts +24 -0
  901. package/src/generated/model/patchProject400.ts +2 -2
  902. package/src/generated/model/patchProject400Details.ts +1 -1
  903. package/src/generated/model/patchProject401.ts +2 -2
  904. package/src/generated/model/patchProject401Details.ts +1 -1
  905. package/src/generated/model/patchProject404.ts +2 -2
  906. package/src/generated/model/patchProject404Details.ts +1 -1
  907. package/src/generated/model/patchProjectBody.ts +8 -1
  908. package/src/generated/model/patchProjectBodyPasswordHash.ts +43 -0
  909. package/src/generated/model/patchProjectBodyPasswordHashAlgorithm.ts +24 -0
  910. package/src/generated/model/patchProjectBodyPasswordHashParams.ts +47 -0
  911. package/src/generated/model/patchProjectBodyPasswordHashParamsHash.ts +24 -0
  912. package/src/generated/model/patchProjectDefault.ts +92 -82
  913. package/src/generated/model/patchUserByID200.ts +55 -49
  914. package/src/generated/model/patchUserByID200Attributes.ts +2 -3
  915. package/src/generated/model/patchUserByID200Metadata.ts +28 -26
  916. package/src/generated/model/patchUserByID200MetadataLifecycleOwnerTeam.ts +24 -23
  917. package/src/generated/model/patchUserByID200MetadataLifecycleOwnerTeamStatus.ts +21 -0
  918. package/src/generated/model/patchUserByID200MetadataStatus.ts +7 -7
  919. package/src/generated/model/patchUserByID200TeamsItem.ts +12 -12
  920. package/src/generated/model/patchUserByID200TeamsItemMembershipStatus.ts +7 -8
  921. package/src/generated/model/patchUserByID400.ts +2 -2
  922. package/src/generated/model/patchUserByID400Details.ts +1 -1
  923. package/src/generated/model/patchUserByID401.ts +2 -2
  924. package/src/generated/model/patchUserByID401Details.ts +1 -1
  925. package/src/generated/model/patchUserByID403.ts +2 -2
  926. package/src/generated/model/patchUserByID403Details.ts +1 -1
  927. package/src/generated/model/patchUserByID404.ts +2 -2
  928. package/src/generated/model/patchUserByID404Details.ts +1 -1
  929. package/src/generated/model/patchUserByID409.ts +2 -2
  930. package/src/generated/model/patchUserByID409Details.ts +1 -1
  931. package/src/generated/model/patchUserByIDBody.ts +20 -21
  932. package/src/generated/model/patchUserByIDBodyAttributes.ts +2 -3
  933. package/src/generated/model/patchUserByIDDefault.ts +83 -82
  934. package/src/generated/model/queryGrants200.ts +7 -6
  935. package/src/generated/model/queryGrants200GrantsItem.ts +24 -22
  936. package/src/generated/model/queryGrants200GrantsItemObjectType.ts +4 -4
  937. package/src/generated/model/queryGrants200GrantsItemRelation.ts +6 -6
  938. package/src/generated/model/queryGrants200GrantsItemTeam.ts +13 -15
  939. package/src/generated/model/queryGrants200GrantsItemTeamStatus.ts +8 -9
  940. package/src/generated/model/queryGrants200GrantsItemUser.ts +31 -27
  941. package/src/generated/model/queryGrants200GrantsItemUserAttributes.ts +2 -3
  942. package/src/generated/model/queryGrants200GrantsItemUserMetadata.ts +28 -26
  943. package/src/generated/model/queryGrants200GrantsItemUserMetadataLifecycleOwnerTeam.ts +24 -23
  944. package/src/generated/model/queryGrants200GrantsItemUserMetadataLifecycleOwnerTeamStatus.ts +21 -0
  945. package/src/generated/model/queryGrants200GrantsItemUserMetadataStatus.ts +7 -7
  946. package/src/generated/model/queryGrants400.ts +2 -2
  947. package/src/generated/model/queryGrants400Details.ts +1 -1
  948. package/src/generated/model/queryGrants401.ts +2 -2
  949. package/src/generated/model/queryGrants401Details.ts +1 -1
  950. package/src/generated/model/queryGrants403.ts +2 -2
  951. package/src/generated/model/queryGrants403Details.ts +1 -1
  952. package/src/generated/model/queryGrantsBody.ts +17 -15
  953. package/src/generated/model/queryGrantsBodyExpandItem.ts +16 -17
  954. package/src/generated/model/queryGrantsBodyFilterItem.ts +24 -21
  955. package/src/generated/model/queryGrantsBodyFilterItemField.ts +13 -14
  956. package/src/generated/model/queryGrantsBodyFilterItemOperation.ts +16 -17
  957. package/src/generated/model/queryGrantsBodySorting.ts +7 -6
  958. package/src/generated/model/queryGrantsBodySortingDirection.ts +5 -5
  959. package/src/generated/model/queryGrantsBodySortingField.ts +7 -8
  960. package/src/generated/model/queryGrantsDefault.ts +92 -92
  961. package/src/generated/model/queryGrantsParams.ts +6 -6
  962. package/src/generated/model/queryIdps200.ts +7 -7
  963. package/src/generated/model/queryIdps200IdpsItem.ts +19 -16
  964. package/src/generated/model/queryIdps200IdpsItemDefinition.ts +19 -19
  965. package/src/generated/model/queryIdps200IdpsItemDefinitionClaimMapping.ts +2 -2
  966. package/src/generated/model/queryIdps200IdpsItemDefinitionOauth2.ts +24 -21
  967. package/src/generated/model/queryIdps200IdpsItemDefinitionOauth2StaticAuthorizeParameters.ts +2 -4
  968. package/src/generated/model/queryIdps200IdpsItemDefinitionOauth2SupplementaryFetch.ts +4 -4
  969. package/src/generated/model/queryIdps200IdpsItemDefinitionOauth2TokenEndpointAuthMethod.ts +5 -5
  970. package/src/generated/model/queryIdps200IdpsItemDefinitionOidc.ts +30 -29
  971. package/src/generated/model/queryIdps200IdpsItemDefinitionOidcStaticAuthorizeParameters.ts +2 -2
  972. package/src/generated/model/queryIdps200IdpsItemDefinitionOidcTokenEndpointAuthMethod.ts +5 -5
  973. package/src/generated/model/queryIdps200IdpsItemDefinitionProtocol.ts +5 -5
  974. package/src/generated/model/queryIdps200IdpsItemDefinitionProvisioning.ts +2 -2
  975. package/src/generated/model/queryIdps200IdpsItemDefinitionProvisioningCreation.ts +5 -5
  976. package/src/generated/model/queryIdps200IdpsItemDefinitionVerifiedClaims.ts +2 -2
  977. package/src/generated/model/queryIdps400.ts +2 -2
  978. package/src/generated/model/queryIdps400Details.ts +1 -1
  979. package/src/generated/model/queryIdps401.ts +2 -2
  980. package/src/generated/model/queryIdps401Details.ts +1 -1
  981. package/src/generated/model/queryIdps403.ts +2 -2
  982. package/src/generated/model/queryIdps403Details.ts +1 -1
  983. package/src/generated/model/queryIdps404.ts +2 -2
  984. package/src/generated/model/queryIdps404Details.ts +1 -1
  985. package/src/generated/model/queryIdpsBody.ts +11 -10
  986. package/src/generated/model/queryIdpsBodyFilterItem.ts +22 -19
  987. package/src/generated/model/queryIdpsBodyFilterItemField.ts +8 -9
  988. package/src/generated/model/queryIdpsBodyFilterItemOperation.ts +16 -17
  989. package/src/generated/model/queryIdpsBodySorting.ts +9 -8
  990. package/src/generated/model/queryIdpsBodySortingDirection.ts +5 -5
  991. package/src/generated/model/queryIdpsBodySortingField.ts +8 -9
  992. package/src/generated/model/queryIdpsDefault.ts +56 -32
  993. package/src/generated/model/queryIdpsParams.ts +6 -6
  994. package/src/generated/model/queryProjects200.ts +7 -6
  995. package/src/generated/model/queryProjects200ProjectsItem.ts +8 -3
  996. package/src/generated/model/queryProjects200ProjectsItemPasswordHash.ts +42 -0
  997. package/src/generated/model/queryProjects200ProjectsItemPasswordHashAlgorithm.ts +24 -0
  998. package/src/generated/model/queryProjects200ProjectsItemPasswordHashParams.ts +47 -0
  999. package/src/generated/model/queryProjects200ProjectsItemPasswordHashParamsHash.ts +24 -0
  1000. package/src/generated/model/queryProjects400.ts +2 -2
  1001. package/src/generated/model/queryProjects400Details.ts +1 -1
  1002. package/src/generated/model/queryProjects401.ts +2 -2
  1003. package/src/generated/model/queryProjects401Details.ts +1 -1
  1004. package/src/generated/model/queryProjects403.ts +2 -2
  1005. package/src/generated/model/queryProjects403Details.ts +1 -1
  1006. package/src/generated/model/queryProjects429.ts +2 -2
  1007. package/src/generated/model/queryProjects429Details.ts +1 -1
  1008. package/src/generated/model/queryProjectsBody.ts +11 -10
  1009. package/src/generated/model/queryProjectsBodyFilterItem.ts +16 -14
  1010. package/src/generated/model/queryProjectsBodyFilterItemField.ts +4 -4
  1011. package/src/generated/model/queryProjectsBodyFilterItemOperation.ts +16 -17
  1012. package/src/generated/model/queryProjectsBodySorting.ts +3 -3
  1013. package/src/generated/model/queryProjectsBodySortingDirection.ts +5 -5
  1014. package/src/generated/model/queryProjectsBodySortingField.ts +4 -4
  1015. package/src/generated/model/queryProjectsDefault.ts +65 -72
  1016. package/src/generated/model/querySessions200.ts +6 -5
  1017. package/src/generated/model/querySessions200SessionsItem.ts +48 -43
  1018. package/src/generated/model/querySessions200SessionsItemFactorsItem.ts +11 -10
  1019. package/src/generated/model/querySessions200SessionsItemFactorsItemMethod.ts +7 -6
  1020. package/src/generated/model/querySessions200SessionsItemFactorsItemPayload.ts +27 -30
  1021. package/src/generated/model/querySessions200SessionsItemMetadata.ts +1 -1
  1022. package/src/generated/model/querySessions200SessionsItemState.ts +9 -10
  1023. package/src/generated/model/querySessions200SessionsItemUser.ts +23 -21
  1024. package/src/generated/model/querySessions200SessionsItemUserAgent.ts +2 -2
  1025. package/src/generated/model/querySessions400.ts +2 -2
  1026. package/src/generated/model/querySessions400Details.ts +1 -1
  1027. package/src/generated/model/querySessions401.ts +2 -2
  1028. package/src/generated/model/querySessions401Details.ts +1 -1
  1029. package/src/generated/model/querySessions403.ts +2 -2
  1030. package/src/generated/model/querySessions403Details.ts +1 -1
  1031. package/src/generated/model/querySessionsBody.ts +6 -6
  1032. package/src/generated/model/querySessionsBodyFilterItem.ts +31 -28
  1033. package/src/generated/model/querySessionsBodyFilterItemField.ts +19 -20
  1034. package/src/generated/model/querySessionsBodyFilterItemOperation.ts +16 -17
  1035. package/src/generated/model/querySessionsBodySorting.ts +8 -7
  1036. package/src/generated/model/querySessionsBodySortingDirection.ts +5 -5
  1037. package/src/generated/model/querySessionsBodySortingField.ts +7 -8
  1038. package/src/generated/model/querySessionsDefault.ts +65 -72
  1039. package/src/generated/model/querySessionsParams.ts +6 -6
  1040. package/src/generated/model/queryTeams200.ts +7 -6
  1041. package/src/generated/model/queryTeams200TeamsItem.ts +8 -7
  1042. package/src/generated/model/queryTeams200TeamsItemStatus.ts +8 -9
  1043. package/src/generated/model/queryTeams400.ts +2 -2
  1044. package/src/generated/model/queryTeams400Details.ts +1 -1
  1045. package/src/generated/model/queryTeams401.ts +2 -2
  1046. package/src/generated/model/queryTeams401Details.ts +1 -1
  1047. package/src/generated/model/queryTeams403.ts +2 -2
  1048. package/src/generated/model/queryTeams403Details.ts +1 -1
  1049. package/src/generated/model/queryTeams404.ts +2 -2
  1050. package/src/generated/model/queryTeams404Details.ts +1 -1
  1051. package/src/generated/model/queryTeams429.ts +2 -2
  1052. package/src/generated/model/queryTeams429Details.ts +1 -1
  1053. package/src/generated/model/queryTeamsBody.ts +11 -10
  1054. package/src/generated/model/queryTeamsBodyFilterItem.ts +22 -19
  1055. package/src/generated/model/queryTeamsBodyFilterItemField.ts +9 -10
  1056. package/src/generated/model/queryTeamsBodyFilterItemOperation.ts +16 -17
  1057. package/src/generated/model/queryTeamsBodySorting.ts +9 -8
  1058. package/src/generated/model/queryTeamsBodySortingDirection.ts +5 -5
  1059. package/src/generated/model/queryTeamsBodySortingField.ts +9 -10
  1060. package/src/generated/model/queryTeamsDefault.ts +2 -2
  1061. package/src/generated/model/queryTeamsDefaultDetails.ts +1 -1
  1062. package/src/generated/model/queryTeamsParams.ts +6 -6
  1063. package/src/generated/model/queryUsers200.ts +6 -5
  1064. package/src/generated/model/queryUsers200UsersItem.ts +55 -49
  1065. package/src/generated/model/queryUsers200UsersItemAttributes.ts +2 -3
  1066. package/src/generated/model/queryUsers200UsersItemMetadata.ts +28 -26
  1067. package/src/generated/model/queryUsers200UsersItemMetadataLifecycleOwnerTeam.ts +24 -23
  1068. package/src/generated/model/queryUsers200UsersItemMetadataLifecycleOwnerTeamStatus.ts +21 -0
  1069. package/src/generated/model/queryUsers200UsersItemMetadataStatus.ts +7 -7
  1070. package/src/generated/model/queryUsers200UsersItemTeamsItem.ts +12 -12
  1071. package/src/generated/model/queryUsers200UsersItemTeamsItemMembershipStatus.ts +7 -8
  1072. package/src/generated/model/queryUsers400.ts +2 -2
  1073. package/src/generated/model/queryUsers400Details.ts +1 -1
  1074. package/src/generated/model/queryUsers401.ts +2 -2
  1075. package/src/generated/model/queryUsers401Details.ts +1 -1
  1076. package/src/generated/model/queryUsers403.ts +2 -2
  1077. package/src/generated/model/queryUsers403Details.ts +1 -1
  1078. package/src/generated/model/queryUsersBody.ts +16 -14
  1079. package/src/generated/model/queryUsersBodyExpandItem.ts +35 -30
  1080. package/src/generated/model/queryUsersBodyFilterItem.ts +47 -41
  1081. package/src/generated/model/queryUsersBodyFilterItemField.ts +37 -35
  1082. package/src/generated/model/queryUsersBodyFilterItemOperation.ts +16 -17
  1083. package/src/generated/model/queryUsersBodySorting.ts +11 -10
  1084. package/src/generated/model/queryUsersBodySortingDirection.ts +5 -5
  1085. package/src/generated/model/queryUsersBodySortingField.ts +13 -14
  1086. package/src/generated/model/queryUsersDefault.ts +65 -62
  1087. package/src/generated/model/queryUsersParams.ts +16 -0
  1088. package/src/generated/model/revokeMySession401.ts +4 -5
  1089. package/src/generated/model/revokeMySessionDefault.ts +56 -52
  1090. package/src/generated/model/revokeSession401.ts +2 -2
  1091. package/src/generated/model/revokeSession401Details.ts +1 -1
  1092. package/src/generated/model/revokeSession403.ts +2 -2
  1093. package/src/generated/model/revokeSession403Details.ts +1 -1
  1094. package/src/generated/model/revokeSessionDefault.ts +56 -62
  1095. package/src/generated/model/setUserPassword400.ts +2 -2
  1096. package/src/generated/model/setUserPassword400Details.ts +1 -1
  1097. package/src/generated/model/setUserPassword404.ts +2 -2
  1098. package/src/generated/model/setUserPassword404Details.ts +1 -1
  1099. package/src/generated/model/setUserPassword500.ts +2 -2
  1100. package/src/generated/model/setUserPassword500Details.ts +1 -1
  1101. package/src/generated/model/setUserPasswordBody.ts +1 -5
  1102. package/src/generated/model/setUserPasswordDefault.ts +83 -72
  1103. package/src/generated/model/submitFlowStep200.ts +34 -29
  1104. package/src/generated/model/submitFlowStep200Branding.ts +49 -46
  1105. package/src/generated/model/submitFlowStep200BrandingLayout.ts +14 -14
  1106. package/src/generated/model/submitFlowStep200BrandingShape.ts +10 -11
  1107. package/src/generated/model/submitFlowStep200BrandingShapeDensity.ts +6 -6
  1108. package/src/generated/model/submitFlowStep200BrandingTheme.ts +28 -22
  1109. package/src/generated/model/submitFlowStep200BrandingThemeDark.ts +15 -14
  1110. package/src/generated/model/submitFlowStep200BrandingThemeDarkPalette.ts +113 -126
  1111. package/src/generated/model/submitFlowStep200BrandingThemeLight.ts +15 -14
  1112. package/src/generated/model/submitFlowStep200BrandingThemeLightPalette.ts +113 -126
  1113. package/src/generated/model/submitFlowStep200BrandingThemeMode.ts +6 -7
  1114. package/src/generated/model/submitFlowStep200BrandingTypography.ts +20 -22
  1115. package/src/generated/model/submitFlowStep200Step.ts +90 -50
  1116. package/src/generated/model/submitFlowStep200StepActionsItem.ts +24 -22
  1117. package/src/generated/model/submitFlowStep200StepActionsItemKind.ts +14 -15
  1118. package/src/generated/model/submitFlowStep200StepChallenge.ts +19 -18
  1119. package/src/generated/model/submitFlowStep200StepChallengeMethod.ts +5 -5
  1120. package/src/generated/model/submitFlowStep200StepChallengeOptions.ts +4 -5
  1121. package/src/generated/model/submitFlowStep200StepComplete.ts +7 -8
  1122. package/src/generated/model/submitFlowStep200StepFieldsItem.ts +54 -26
  1123. package/src/generated/model/submitFlowStep200StepFieldsItemType.ts +17 -18
  1124. package/src/generated/model/submitFlowStep200StepFieldsItemValidation.ts +28 -27
  1125. package/src/generated/model/submitFlowStep200StepFieldsItemValidationFormat.ts +11 -12
  1126. package/src/generated/model/submitFlowStep200StepGates.ts +24 -24
  1127. package/src/generated/model/submitFlowStep200StepGatesConfig.ts +2 -3
  1128. package/src/generated/model/submitFlowStep200StepGatesKind.ts +6 -7
  1129. package/src/generated/model/submitFlowStep200StepIdentifier.ts +53 -0
  1130. package/src/generated/model/submitFlowStep200StepSsoProvidersItem.ts +1 -1
  1131. package/src/generated/model/submitFlowStep200StepTexts.ts +2 -3
  1132. package/src/generated/model/submitFlowStep400.ts +34 -29
  1133. package/src/generated/model/submitFlowStep400Branding.ts +49 -46
  1134. package/src/generated/model/submitFlowStep400BrandingLayout.ts +14 -14
  1135. package/src/generated/model/submitFlowStep400BrandingShape.ts +10 -11
  1136. package/src/generated/model/submitFlowStep400BrandingShapeDensity.ts +6 -6
  1137. package/src/generated/model/submitFlowStep400BrandingTheme.ts +28 -22
  1138. package/src/generated/model/submitFlowStep400BrandingThemeDark.ts +15 -14
  1139. package/src/generated/model/submitFlowStep400BrandingThemeDarkPalette.ts +113 -126
  1140. package/src/generated/model/submitFlowStep400BrandingThemeLight.ts +15 -14
  1141. package/src/generated/model/submitFlowStep400BrandingThemeLightPalette.ts +113 -126
  1142. package/src/generated/model/submitFlowStep400BrandingThemeMode.ts +6 -7
  1143. package/src/generated/model/submitFlowStep400BrandingTypography.ts +20 -22
  1144. package/src/generated/model/submitFlowStep400Step.ts +90 -50
  1145. package/src/generated/model/submitFlowStep400StepActionsItem.ts +24 -22
  1146. package/src/generated/model/submitFlowStep400StepActionsItemKind.ts +14 -15
  1147. package/src/generated/model/submitFlowStep400StepChallenge.ts +19 -18
  1148. package/src/generated/model/submitFlowStep400StepChallengeMethod.ts +5 -5
  1149. package/src/generated/model/submitFlowStep400StepChallengeOptions.ts +4 -5
  1150. package/src/generated/model/submitFlowStep400StepComplete.ts +7 -8
  1151. package/src/generated/model/submitFlowStep400StepFieldsItem.ts +54 -26
  1152. package/src/generated/model/submitFlowStep400StepFieldsItemType.ts +17 -18
  1153. package/src/generated/model/submitFlowStep400StepFieldsItemValidation.ts +28 -27
  1154. package/src/generated/model/submitFlowStep400StepFieldsItemValidationFormat.ts +11 -12
  1155. package/src/generated/model/submitFlowStep400StepGates.ts +24 -24
  1156. package/src/generated/model/submitFlowStep400StepGatesConfig.ts +2 -3
  1157. package/src/generated/model/submitFlowStep400StepGatesKind.ts +6 -7
  1158. package/src/generated/model/submitFlowStep400StepIdentifier.ts +53 -0
  1159. package/src/generated/model/submitFlowStep400StepSsoProvidersItem.ts +1 -1
  1160. package/src/generated/model/submitFlowStep400StepTexts.ts +2 -3
  1161. package/src/generated/model/submitFlowStep409.ts +2 -2
  1162. package/src/generated/model/submitFlowStep409Details.ts +1 -1
  1163. package/src/generated/model/submitFlowStepBody.ts +35 -20
  1164. package/src/generated/model/submitFlowStepBodyChallengeResponse.ts +12 -11
  1165. package/src/generated/model/submitFlowStepBodyChallengeResponseProof.ts +2 -3
  1166. package/src/generated/model/submitFlowStepBodyFields.ts +1 -2
  1167. package/src/generated/model/submitFlowStepBodyGateProofs.ts +3 -4
  1168. package/src/generated/model/submitFlowStepDefault.ts +263 -262
  1169. package/src/generated/model/updateTeam200.ts +8 -7
  1170. package/src/generated/model/updateTeam200Status.ts +8 -8
  1171. package/src/generated/model/updateTeam400.ts +2 -2
  1172. package/src/generated/model/updateTeam400Details.ts +1 -1
  1173. package/src/generated/model/updateTeam401.ts +2 -2
  1174. package/src/generated/model/updateTeam401Details.ts +1 -1
  1175. package/src/generated/model/updateTeam403.ts +2 -2
  1176. package/src/generated/model/updateTeam403Details.ts +1 -1
  1177. package/src/generated/model/updateTeam404.ts +2 -2
  1178. package/src/generated/model/updateTeam404Details.ts +1 -1
  1179. package/src/generated/model/updateTeam409.ts +2 -2
  1180. package/src/generated/model/updateTeam409Details.ts +1 -1
  1181. package/src/generated/model/updateTeamBody.ts +5 -5
  1182. package/src/generated/model/updateTeamDefault.ts +2 -2
  1183. package/src/generated/model/updateTeamDefaultDetails.ts +1 -1
  1184. package/src/generated/model/updateVariables200.ts +12 -19
  1185. package/src/generated/model/updateVariablesBody.ts +44 -50
  1186. package/src/generated/model/updateVariablesDefault.ts +119 -132
  1187. package/src/generated/model/updateVariablesParams.ts +12 -13
  1188. package/src/generated/model/verifyChallengeProof200.ts +49 -44
  1189. package/src/generated/model/verifyChallengeProof200ChallengesItem.ts +26 -22
  1190. package/src/generated/model/verifyChallengeProof200ChallengesItemMethod.ts +8 -7
  1191. package/src/generated/model/verifyChallengeProof200ChallengesItemPayload.ts +24 -26
  1192. package/src/generated/model/verifyChallengeProof200ChallengesItemState.ts +9 -10
  1193. package/src/generated/model/verifyChallengeProof200CompletedFactorsItem.ts +11 -10
  1194. package/src/generated/model/verifyChallengeProof200CompletedFactorsItemMethod.ts +7 -6
  1195. package/src/generated/model/verifyChallengeProof200CompletedFactorsItemPayload.ts +27 -30
  1196. package/src/generated/model/verifyChallengeProof200RequiredFactorsItem.ts +7 -6
  1197. package/src/generated/model/verifyChallengeProof200State.ts +11 -12
  1198. package/src/generated/model/verifyChallengeProofBody.ts +17 -21
  1199. package/src/generated/model/verifyChallengeProofDefault.ts +146 -142
  1200. package/src/runtime/api-factory.ts +13 -0
  1201. package/src/runtime/auth.ts +95 -0
  1202. package/src/runtime/base-url.spec.ts +33 -2
  1203. package/src/runtime/config.spec.ts +5 -7
  1204. package/src/runtime/fetch.spec.ts +358 -0
  1205. package/src/runtime/fetch.ts +192 -6
  1206. package/dist/index-ruwZ9xDe.d.mts +0 -30023
  1207. package/dist/index-ruwZ9xDe.d.mts.map +0 -1
  1208. package/dist/runtime/fetch.d.mts.map +0 -1
  1209. package/dist/zitadelNextGen-DPyZep6V.d.mts +0 -893
  1210. package/dist/zitadelNextGen-DPyZep6V.d.mts.map +0 -1
  1211. /package/dist/{chunk-CfYAbeIz.mjs → rolldown-runtime-D7D4PA-g.mjs} +0 -0
@@ -1,12 +1,14 @@
1
1
  /**
2
- * Generated by orval v8.10.0 🍺
2
+ * Generated by orval 🍺
3
3
  * Do not edit manually.
4
4
  * Zitadel NextGen
5
5
  * This is the next generation of the Zitadel identity platform.
6
6
  * OpenAPI spec version: 0.0.1
7
7
  */
8
- import { getProxyPath } from "../../runtime/base-url";
9
- import { customFetch } from "../../runtime/fetch";
8
+ import {
9
+ getProxyPath
10
+ } from '../../runtime/base-url';
11
+
10
12
  import type {
11
13
  BeginUserPasskeyRegistration201,
12
14
  BeginUserPasskeyRegistrationBody,
@@ -17,6 +19,10 @@ import type {
17
19
  CreateBranding201,
18
20
  CreateBrandingBody,
19
21
  CreateBrandingParams,
22
+ CreateDeployment200,
23
+ CreateDeployment201,
24
+ CreateDeploymentBody,
25
+ CreateDeploymentParams,
20
26
  CreateFlow201,
21
27
  CreateFlowBody,
22
28
  CreateFlowDefinition201,
@@ -59,6 +65,8 @@ import type {
59
65
  GetClaimStatusParams,
60
66
  GetClaimWindow200,
61
67
  GetClaimWindowParams,
68
+ GetDeploymentById200,
69
+ GetDeploymentByIdParams,
62
70
  GetEnvironmentByName200,
63
71
  GetEnvironmentByNameParams,
64
72
  GetEvent200,
@@ -74,6 +82,7 @@ import type {
74
82
  GetIdpRevisionByIdParams,
75
83
  GetLiveDefault,
76
84
  GetMySession200,
85
+ GetMySessionCsrfToken200,
77
86
  GetMyUser200,
78
87
  GetProject200,
79
88
  GetReadyDefault,
@@ -94,6 +103,8 @@ import type {
94
103
  IssueChallengeBody,
95
104
  ListBranding200Item,
96
105
  ListBrandingParams,
106
+ ListDeployments200,
107
+ ListDeploymentsParams,
97
108
  ListEnvironments200,
98
109
  ListEnvironmentsParams,
99
110
  ListEvents200,
@@ -134,6 +145,7 @@ import type {
134
145
  QueryTeamsParams,
135
146
  QueryUsers200,
136
147
  QueryUsersBody,
148
+ QueryUsersParams,
137
149
  SetUserPasswordBody,
138
150
  SubmitFlowStep200,
139
151
  SubmitFlowStepBody,
@@ -143,2291 +155,3218 @@ import type {
143
155
  UpdateVariablesBody,
144
156
  UpdateVariablesParams,
145
157
  VerifyChallengeProof200,
146
- VerifyChallengeProofBody,
147
- } from "../model";
158
+ VerifyChallengeProofBody
159
+ } from '../model';
160
+
161
+ import { customFetch } from '../../runtime/fetch';
148
162
 
149
163
  export const getGetHealthUrl = () => {
150
- return `${getProxyPath()}/healthz`;
151
- };
164
+
165
+
166
+
167
+
168
+ return `${getProxyPath()}/healthz`
169
+ }
152
170
 
153
171
  /**
154
172
  * Check whether the server is healthy
155
173
  * @summary Check server health
156
174
  */
157
- export const getHealth = async (options?: RequestInit): Promise<GetHealthDefault> => {
158
- return customFetch<GetHealthDefault>(getGetHealthUrl(), {
175
+ export const getHealth = async ( options?: Parameters<typeof customFetch>[1]): Promise<GetHealthDefault> => {
176
+
177
+ return customFetch<GetHealthDefault>(getGetHealthUrl(),
178
+ {
159
179
  ...options,
160
- method: "GET",
161
- });
162
- };
180
+ method: 'GET'
181
+
182
+
183
+ }
184
+ );}
185
+
186
+
163
187
 
164
188
  export const getGetLiveUrl = () => {
165
- return `${getProxyPath()}/livez`;
166
- };
189
+
190
+
191
+
192
+
193
+ return `${getProxyPath()}/livez`
194
+ }
167
195
 
168
196
  /**
169
197
  * Check whether the server is started
170
198
  * @summary Check server liveness
171
199
  */
172
- export const getLive = async (options?: RequestInit): Promise<GetLiveDefault> => {
173
- return customFetch<GetLiveDefault>(getGetLiveUrl(), {
200
+ export const getLive = async ( options?: Parameters<typeof customFetch>[1]): Promise<GetLiveDefault> => {
201
+
202
+ return customFetch<GetLiveDefault>(getGetLiveUrl(),
203
+ {
174
204
  ...options,
175
- method: "GET",
176
- });
177
- };
205
+ method: 'GET'
206
+
207
+
208
+ }
209
+ );}
210
+
211
+
178
212
 
179
213
  export const getGetReadyUrl = () => {
180
- return `${getProxyPath()}/readyz`;
181
- };
214
+
215
+
216
+
217
+
218
+ return `${getProxyPath()}/readyz`
219
+ }
182
220
 
183
221
  /**
184
222
  * Check whether the server is ready to accept requests
185
223
  * @summary Check server readiness
186
224
  */
187
- export const getReady = async (options?: RequestInit): Promise<GetReadyDefault> => {
188
- return customFetch<GetReadyDefault>(getGetReadyUrl(), {
225
+ export const getReady = async ( options?: Parameters<typeof customFetch>[1]): Promise<GetReadyDefault> => {
226
+
227
+ return customFetch<GetReadyDefault>(getGetReadyUrl(),
228
+ {
189
229
  ...options,
190
- method: "GET",
191
- });
192
- };
230
+ method: 'GET'
231
+
232
+
233
+ }
234
+ );}
235
+
236
+
193
237
 
194
- export const getCreateUserUrl = (params: CreateUserParams) => {
238
+ export const getCreateUserUrl = (params: CreateUserParams,) => {
195
239
  const normalizedParams = new URLSearchParams();
196
240
 
197
241
  Object.entries(params || {}).forEach(([key, value]) => {
242
+
198
243
  if (value !== undefined) {
199
- normalizedParams.append(key, value === null ? "null" : value.toString());
244
+ normalizedParams.append(key, value === null ? 'null' : String(value))
200
245
  }
201
246
  });
202
247
 
203
248
  const stringifiedParams = normalizedParams.toString();
204
249
 
205
- return stringifiedParams.length > 0
206
- ? `${getProxyPath()}/users?${stringifiedParams}`
207
- : `${getProxyPath()}/users`;
208
- };
250
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/users?${stringifiedParams}` : `${getProxyPath()}/users`
251
+ }
209
252
 
210
253
  /**
211
254
  * @summary Create user
212
255
  */
213
- export const createUser = async (
214
- createUserBody: CreateUserBody,
215
- params: CreateUserParams,
216
- options?: RequestInit,
217
- ): Promise<CreateUser201> => {
218
- return customFetch<CreateUser201>(getCreateUserUrl(params), {
256
+ export const createUser = async (createUserBody: CreateUserBody,
257
+ params: CreateUserParams, options?: Parameters<typeof customFetch>[1]): Promise<CreateUser201> => {
258
+
259
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
260
+ if (!h) return {};
261
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
262
+ if (Symbol.iterator in h) {
263
+ return Object.fromEntries(
264
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
265
+ );
266
+ }
267
+ const headers: Record<string, string | readonly string[]> = {};
268
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
269
+ if (value !== undefined) headers[name] = value;
270
+ }
271
+ return headers;
272
+ };
273
+ return customFetch<CreateUser201>(getCreateUserUrl(params),
274
+ {
219
275
  ...options,
220
- method: "POST",
221
- headers: { "Content-Type": "application/json", ...options?.headers },
222
- body: JSON.stringify(createUserBody),
223
- });
224
- };
276
+ method: 'POST',
277
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
278
+ body: JSON.stringify(createUserBody)
279
+ }
280
+ );}
225
281
 
226
- export const getQueryUsersUrl = () => {
227
- return `${getProxyPath()}/users/query`;
228
- };
229
282
 
230
- /**
231
- * Returns the users of a project, paginated with a cursor.
232
283
 
233
- The project comes from the credential, not from a parameter: the
234
- operation is bound to the credential's home project by construction
235
- (oauth2 secret or user-bound session). This is why it takes no
236
- `project_id`, unlike the other query endpoints.
284
+ export const getQueryUsersUrl = (params?: QueryUsersParams,) => {
285
+ const normalizedParams = new URLSearchParams();
286
+
287
+ Object.entries(params || {}).forEach(([key, value]) => {
288
+
289
+ if (value !== undefined) {
290
+ normalizedParams.append(key, value === null ? 'null' : String(value))
291
+ }
292
+ });
293
+
294
+ const stringifiedParams = normalizedParams.toString();
237
295
 
238
- Accepts either a project secret (`oauth2`) or a user-bound Console
239
- session cookie (`nextgenSession`). CSRF/Origin for cookie mutations
240
- is a follow-up (#1140).
296
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/users/query?${stringifiedParams}` : `${getProxyPath()}/users/query`
297
+ }
241
298
 
299
+ /**
300
+ * Returns the users of a project, paginated with a cursor.
301
+ *
302
+ * `project_id` names the project to list; without it, the credential's own
303
+ * project is listed.
304
+ *
305
+ * Accepts either a project secret (`oauth2`) or a user-bound Console
306
+ * session cookie (`nextgenSession`). Cookie-authenticated requests
307
+ * follow the scheme's CSRF rules (`nextgenSession`).
242
308
  * @summary Query users
243
309
  */
244
- export const queryUsers = async (
245
- queryUsersBody: QueryUsersBody,
246
- options?: RequestInit,
247
- ): Promise<QueryUsers200> => {
248
- return customFetch<QueryUsers200>(getQueryUsersUrl(), {
310
+ export const queryUsers = async (queryUsersBody: QueryUsersBody,
311
+ params?: QueryUsersParams, options?: Parameters<typeof customFetch>[1]): Promise<QueryUsers200> => {
312
+
313
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
314
+ if (!h) return {};
315
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
316
+ if (Symbol.iterator in h) {
317
+ return Object.fromEntries(
318
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
319
+ );
320
+ }
321
+ const headers: Record<string, string | readonly string[]> = {};
322
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
323
+ if (value !== undefined) headers[name] = value;
324
+ }
325
+ return headers;
326
+ };
327
+ return customFetch<QueryUsers200>(getQueryUsersUrl(params),
328
+ {
249
329
  ...options,
250
- method: "POST",
251
- headers: { "Content-Type": "application/json", ...options?.headers },
252
- body: JSON.stringify(queryUsersBody),
253
- });
254
- };
330
+ method: 'POST',
331
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
332
+ body: JSON.stringify(queryUsersBody)
333
+ }
334
+ );}
335
+
336
+
255
337
 
256
- export const getGetUserByIDUrl = (userId: string, params?: GetUserByIDParams) => {
338
+ export const getGetUserByIDUrl = (userId: string,
339
+ params?: GetUserByIDParams,) => {
257
340
  const normalizedParams = new URLSearchParams();
258
341
 
259
342
  Object.entries(params || {}).forEach(([key, value]) => {
343
+
260
344
  if (value !== undefined) {
261
- normalizedParams.append(key, value === null ? "null" : value.toString());
345
+ normalizedParams.append(key, value === null ? 'null' : String(value))
262
346
  }
263
347
  });
264
348
 
265
349
  const stringifiedParams = normalizedParams.toString();
266
350
 
267
- return stringifiedParams.length > 0
268
- ? `${getProxyPath()}/users/${userId}?${stringifiedParams}`
269
- : `${getProxyPath()}/users/${userId}`;
270
- };
351
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/users/${encodeURIComponent(String(userId))}?${stringifiedParams}` : `${getProxyPath()}/users/${encodeURIComponent(String(userId))}`
352
+ }
271
353
 
272
354
  /**
273
355
  * @summary Get user by ID
274
356
  */
275
- export const getUserByID = async (
276
- userId: string,
277
- params?: GetUserByIDParams,
278
- options?: RequestInit,
279
- ): Promise<GetUserByID200> => {
280
- return customFetch<GetUserByID200>(getGetUserByIDUrl(userId, params), {
357
+ export const getUserByID = async (userId: string,
358
+ params?: GetUserByIDParams, options?: Parameters<typeof customFetch>[1]): Promise<GetUserByID200> => {
359
+
360
+ return customFetch<GetUserByID200>(getGetUserByIDUrl(userId,params),
361
+ {
281
362
  ...options,
282
- method: "GET",
283
- });
284
- };
363
+ method: 'GET'
364
+
365
+
366
+ }
367
+ );}
368
+
369
+
370
+
371
+ export const getPatchUserByIDUrl = (userId: string,) => {
285
372
 
286
- export const getPatchUserByIDUrl = (userId: string) => {
287
- return `${getProxyPath()}/users/${userId}`;
288
- };
373
+
374
+
375
+
376
+ return `${getProxyPath()}/users/${encodeURIComponent(String(userId))}`
377
+ }
289
378
 
290
379
  /**
291
380
  * Partially updates a user's schema-defined attributes, and optionally
292
- moves the user to another registered schema. The merged result is
293
- validated against the schema before commit. Concurrent writes are
294
- last-write-wins.
295
-
381
+ * moves the user to another registered schema. The merged result is
382
+ * validated against the schema before commit. Concurrent writes are
383
+ * last-write-wins.
296
384
  * @summary Update user by ID
297
385
  */
298
- export const patchUserByID = async (
299
- userId: string,
300
- patchUserByIDBody: PatchUserByIDBody,
301
- options?: RequestInit,
302
- ): Promise<PatchUserByID200> => {
303
- return customFetch<PatchUserByID200>(getPatchUserByIDUrl(userId), {
386
+ export const patchUserByID = async (userId: string,
387
+ patchUserByIDBody: PatchUserByIDBody, options?: Parameters<typeof customFetch>[1]): Promise<PatchUserByID200> => {
388
+
389
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
390
+ if (!h) return {};
391
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
392
+ if (Symbol.iterator in h) {
393
+ return Object.fromEntries(
394
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
395
+ );
396
+ }
397
+ const headers: Record<string, string | readonly string[]> = {};
398
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
399
+ if (value !== undefined) headers[name] = value;
400
+ }
401
+ return headers;
402
+ };
403
+ return customFetch<PatchUserByID200>(getPatchUserByIDUrl(userId),
404
+ {
304
405
  ...options,
305
- method: "PATCH",
306
- headers: { "Content-Type": "application/json", ...options?.headers },
307
- body: JSON.stringify(patchUserByIDBody),
308
- });
309
- };
406
+ method: 'PATCH',
407
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
408
+ body: JSON.stringify(patchUserByIDBody)
409
+ }
410
+ );}
310
411
 
311
- export const getDeleteUserByIDUrl = (userId: string) => {
312
- return `${getProxyPath()}/users/${userId}`;
313
- };
412
+
413
+
414
+ export const getDeleteUserByIDUrl = (userId: string,) => {
415
+
416
+
417
+
418
+
419
+ return `${getProxyPath()}/users/${encodeURIComponent(String(userId))}`
420
+ }
314
421
 
315
422
  /**
316
423
  * @summary Delete user by ID
317
424
  */
318
- export const deleteUserByID = async (userId: string, options?: RequestInit): Promise<void> => {
319
- return customFetch<void>(getDeleteUserByIDUrl(userId), {
425
+ export const deleteUserByID = async (userId: string, options?: Parameters<typeof customFetch>[1]): Promise<void> => {
426
+
427
+ return customFetch<void>(getDeleteUserByIDUrl(userId),
428
+ {
320
429
  ...options,
321
- method: "DELETE",
322
- });
323
- };
430
+ method: 'DELETE'
324
431
 
325
- export const getListUserPasskeysUrl = (userId: string, params?: ListUserPasskeysParams) => {
432
+
433
+ }
434
+ );}
435
+
436
+
437
+
438
+ export const getListUserPasskeysUrl = (userId: string,
439
+ params?: ListUserPasskeysParams,) => {
326
440
  const normalizedParams = new URLSearchParams();
327
441
 
328
442
  Object.entries(params || {}).forEach(([key, value]) => {
443
+
329
444
  if (value !== undefined) {
330
- normalizedParams.append(key, value === null ? "null" : value.toString());
445
+ normalizedParams.append(key, value === null ? 'null' : String(value))
331
446
  }
332
447
  });
333
448
 
334
449
  const stringifiedParams = normalizedParams.toString();
335
450
 
336
- return stringifiedParams.length > 0
337
- ? `${getProxyPath()}/users/${userId}/passkeys?${stringifiedParams}`
338
- : `${getProxyPath()}/users/${userId}/passkeys`;
339
- };
451
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/passkeys?${stringifiedParams}` : `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/passkeys`
452
+ }
340
453
 
341
454
  /**
342
455
  * @summary List user passkeys
343
456
  */
344
- export const listUserPasskeys = async (
345
- userId: string,
346
- params?: ListUserPasskeysParams,
347
- options?: RequestInit,
348
- ): Promise<ListUserPasskeys200> => {
349
- return customFetch<ListUserPasskeys200>(getListUserPasskeysUrl(userId, params), {
457
+ export const listUserPasskeys = async (userId: string,
458
+ params?: ListUserPasskeysParams, options?: Parameters<typeof customFetch>[1]): Promise<ListUserPasskeys200> => {
459
+
460
+ return customFetch<ListUserPasskeys200>(getListUserPasskeysUrl(userId,params),
461
+ {
350
462
  ...options,
351
- method: "GET",
352
- });
353
- };
463
+ method: 'GET'
464
+
354
465
 
355
- export const getBeginUserPasskeyRegistrationUrl = (userId: string) => {
356
- return `${getProxyPath()}/users/${userId}/passkeys/registrations`;
357
- };
466
+ }
467
+ );}
468
+
469
+
470
+
471
+ export const getBeginUserPasskeyRegistrationUrl = (userId: string,) => {
472
+
473
+
474
+
475
+
476
+ return `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/passkeys/registrations`
477
+ }
358
478
 
359
479
  /**
360
480
  * Starts a WebAuthn registration ceremony for the user and returns the
361
- creation options for `navigator.credentials.create()`. Complete the
362
- ceremony with `POST /users/{user_id}/passkeys/registrations/{registration_id}` within
363
- five minutes. Credentials already registered for the user are excluded
364
- automatically.
365
-
481
+ * creation options for `navigator.credentials.create()`. Complete the
482
+ * ceremony with `POST /users/{user_id}/passkeys/registrations/{registration_id}` within
483
+ * five minutes. Credentials already registered for the user are excluded
484
+ * automatically.
366
485
  * @summary Begin passkey registration
367
486
  */
368
- export const beginUserPasskeyRegistration = async (
369
- userId: string,
370
- beginUserPasskeyRegistrationBody: BeginUserPasskeyRegistrationBody,
371
- options?: RequestInit,
372
- ): Promise<BeginUserPasskeyRegistration201> => {
373
- return customFetch<BeginUserPasskeyRegistration201>(getBeginUserPasskeyRegistrationUrl(userId), {
487
+ export const beginUserPasskeyRegistration = async (userId: string,
488
+ beginUserPasskeyRegistrationBody: BeginUserPasskeyRegistrationBody, options?: Parameters<typeof customFetch>[1]): Promise<BeginUserPasskeyRegistration201> => {
489
+
490
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
491
+ if (!h) return {};
492
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
493
+ if (Symbol.iterator in h) {
494
+ return Object.fromEntries(
495
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
496
+ );
497
+ }
498
+ const headers: Record<string, string | readonly string[]> = {};
499
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
500
+ if (value !== undefined) headers[name] = value;
501
+ }
502
+ return headers;
503
+ };
504
+ return customFetch<BeginUserPasskeyRegistration201>(getBeginUserPasskeyRegistrationUrl(userId),
505
+ {
374
506
  ...options,
375
- method: "POST",
376
- headers: { "Content-Type": "application/json", ...options?.headers },
377
- body: JSON.stringify(beginUserPasskeyRegistrationBody),
378
- });
379
- };
507
+ method: 'POST',
508
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
509
+ body: JSON.stringify(beginUserPasskeyRegistrationBody)
510
+ }
511
+ );}
512
+
513
+
514
+
515
+ export const getFinishUserPasskeyRegistrationUrl = (userId: string,
516
+ registrationId: string,) => {
517
+
380
518
 
381
- export const getFinishUserPasskeyRegistrationUrl = (userId: string, registrationId: string) => {
382
- return `${getProxyPath()}/users/${userId}/passkeys/registrations/${registrationId}`;
383
- };
519
+
520
+
521
+ return `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/passkeys/registrations/${encodeURIComponent(String(registrationId))}`
522
+ }
384
523
 
385
524
  /**
386
525
  * Verifies the attestation against the ceremony started by
387
- `POST /users/{user_id}/passkeys/registrations` and persists the new credential. A
388
- rejected attestation counts against the ceremony's failure budget and the
389
- ceremony stays open for a retry. An expired ceremony surfaces as
390
- `att.stale_challenge`; an unknown or already-consumed registration id
391
- surfaces as `att.not_found`.
392
-
526
+ * `POST /users/{user_id}/passkeys/registrations` and persists the new credential. A
527
+ * rejected attestation counts against the ceremony's failure budget and the
528
+ * ceremony stays open for a retry. An expired ceremony surfaces as
529
+ * `att.stale_challenge`; an unknown or already-consumed registration id
530
+ * surfaces as `att.not_found`.
393
531
  * @summary Finish passkey registration
394
532
  */
395
- export const finishUserPasskeyRegistration = async (
396
- userId: string,
397
- registrationId: string,
398
- finishUserPasskeyRegistrationBody: FinishUserPasskeyRegistrationBody,
399
- options?: RequestInit,
400
- ): Promise<FinishUserPasskeyRegistration201> => {
401
- return customFetch<FinishUserPasskeyRegistration201>(
402
- getFinishUserPasskeyRegistrationUrl(userId, registrationId),
403
- {
404
- ...options,
405
- method: "POST",
406
- headers: { "Content-Type": "application/json", ...options?.headers },
407
- body: JSON.stringify(finishUserPasskeyRegistrationBody),
408
- },
409
- );
410
- };
411
-
412
- export const getSetUserPasswordUrl = (userId: string) => {
413
- return `${getProxyPath()}/users/${userId}/password`;
414
- };
533
+ export const finishUserPasskeyRegistration = async (userId: string,
534
+ registrationId: string,
535
+ finishUserPasskeyRegistrationBody: FinishUserPasskeyRegistrationBody, options?: Parameters<typeof customFetch>[1]): Promise<FinishUserPasskeyRegistration201> => {
536
+
537
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
538
+ if (!h) return {};
539
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
540
+ if (Symbol.iterator in h) {
541
+ return Object.fromEntries(
542
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
543
+ );
544
+ }
545
+ const headers: Record<string, string | readonly string[]> = {};
546
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
547
+ if (value !== undefined) headers[name] = value;
548
+ }
549
+ return headers;
550
+ };
551
+ return customFetch<FinishUserPasskeyRegistration201>(getFinishUserPasskeyRegistrationUrl(userId,registrationId),
552
+ {
553
+ ...options,
554
+ method: 'POST',
555
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
556
+ body: JSON.stringify(finishUserPasskeyRegistrationBody)
557
+ }
558
+ );}
559
+
560
+
561
+
562
+ export const getSetUserPasswordUrl = (userId: string,) => {
563
+
564
+
565
+
566
+
567
+ return `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/password`
568
+ }
415
569
 
416
570
  /**
417
571
  * @summary Set user password
418
572
  */
419
- export const setUserPassword = async (
420
- userId: string,
421
- setUserPasswordBody: SetUserPasswordBody,
422
- options?: RequestInit,
423
- ): Promise<void> => {
424
- return customFetch<void>(getSetUserPasswordUrl(userId), {
573
+ export const setUserPassword = async (userId: string,
574
+ setUserPasswordBody: SetUserPasswordBody, options?: Parameters<typeof customFetch>[1]): Promise<void> => {
575
+
576
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
577
+ if (!h) return {};
578
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
579
+ if (Symbol.iterator in h) {
580
+ return Object.fromEntries(
581
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
582
+ );
583
+ }
584
+ const headers: Record<string, string | readonly string[]> = {};
585
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
586
+ if (value !== undefined) headers[name] = value;
587
+ }
588
+ return headers;
589
+ };
590
+ return customFetch<void>(getSetUserPasswordUrl(userId),
591
+ {
425
592
  ...options,
426
- method: "PUT",
427
- headers: { "Content-Type": "application/json", ...options?.headers },
428
- body: JSON.stringify(setUserPasswordBody),
429
- });
430
- };
593
+ method: 'PUT',
594
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
595
+ body: JSON.stringify(setUserPasswordBody)
596
+ }
597
+ );}
598
+
431
599
 
432
- export const getListUserTeamsUrl = (userId: string, params?: ListUserTeamsParams) => {
600
+
601
+ export const getListUserTeamsUrl = (userId: string,
602
+ params?: ListUserTeamsParams,) => {
433
603
  const normalizedParams = new URLSearchParams();
434
604
 
435
605
  Object.entries(params || {}).forEach(([key, value]) => {
606
+
436
607
  if (value !== undefined) {
437
- normalizedParams.append(key, value === null ? "null" : value.toString());
608
+ normalizedParams.append(key, value === null ? 'null' : String(value))
438
609
  }
439
610
  });
440
611
 
441
612
  const stringifiedParams = normalizedParams.toString();
442
613
 
443
- return stringifiedParams.length > 0
444
- ? `${getProxyPath()}/users/${userId}/teams?${stringifiedParams}`
445
- : `${getProxyPath()}/users/${userId}/teams`;
446
- };
614
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/teams?${stringifiedParams}` : `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/teams`
615
+ }
447
616
 
448
617
  /**
449
618
  * The user's team roster, ordered by team name. Each entry carries the
450
- team's name, so a client renders a page without resolving ids one by one.
451
-
452
- This is the N:N roster and it is not lifecycle ownership: the single team
453
- that owns the user's lifecycle is reported as `metadata.lifecycle_owner_team_id`
454
- on the user read endpoints. Memberships the user was removed from are not
455
- returned.
456
-
619
+ * team's name, so a client renders a page without resolving ids one by one.
620
+ *
621
+ * This is the N:N roster and it is not lifecycle ownership: the single team
622
+ * that owns the user's lifecycle is reported as `metadata.lifecycle_owner_team_id`
623
+ * on the user read endpoints. Memberships the user was removed from are not
624
+ * returned.
457
625
  * @summary List the teams a user belongs to
458
626
  */
459
- export const listUserTeams = async (
460
- userId: string,
461
- params?: ListUserTeamsParams,
462
- options?: RequestInit,
463
- ): Promise<ListUserTeams200> => {
464
- return customFetch<ListUserTeams200>(getListUserTeamsUrl(userId, params), {
627
+ export const listUserTeams = async (userId: string,
628
+ params?: ListUserTeamsParams, options?: Parameters<typeof customFetch>[1]): Promise<ListUserTeams200> => {
629
+
630
+ return customFetch<ListUserTeams200>(getListUserTeamsUrl(userId,params),
631
+ {
465
632
  ...options,
466
- method: "GET",
467
- });
468
- };
633
+ method: 'GET'
634
+
635
+
636
+ }
637
+ );}
638
+
639
+
469
640
 
470
641
  export const getGetMyUserUrl = () => {
471
- return `${getProxyPath()}/users/me`;
472
- };
642
+
643
+
644
+
645
+
646
+ return `${getProxyPath()}/users/me`
647
+ }
473
648
 
474
649
  /**
475
650
  * @summary Get my user information
476
651
  */
477
- export const getMyUser = async (options?: RequestInit): Promise<GetMyUser200> => {
478
- return customFetch<GetMyUser200>(getGetMyUserUrl(), {
652
+ export const getMyUser = async ( options?: Parameters<typeof customFetch>[1]): Promise<GetMyUser200> => {
653
+
654
+ return customFetch<GetMyUser200>(getGetMyUserUrl(),
655
+ {
479
656
  ...options,
480
- method: "GET",
481
- });
482
- };
657
+ method: 'GET'
658
+
659
+
660
+ }
661
+ );}
662
+
663
+
483
664
 
484
665
  export const getPatchMyUserUrl = () => {
485
- return `${getProxyPath()}/users/me`;
486
- };
666
+
667
+
668
+
669
+
670
+ return `${getProxyPath()}/users/me`
671
+ }
487
672
 
488
673
  /**
489
674
  * Partially updates the caller's own schema-defined attributes. The merged
490
- result is validated against the user's schema before commit. Concurrent
491
- writes are last-write-wins.
492
-
675
+ * result is validated against the user's schema before commit. Concurrent
676
+ * writes are last-write-wins.
493
677
  * @summary Update my user information
494
678
  */
495
- export const patchMyUser = async (
496
- patchMyUserBody: PatchMyUserBody,
497
- options?: RequestInit,
498
- ): Promise<PatchMyUser200> => {
499
- return customFetch<PatchMyUser200>(getPatchMyUserUrl(), {
679
+ export const patchMyUser = async (patchMyUserBody: PatchMyUserBody, options?: Parameters<typeof customFetch>[1]): Promise<PatchMyUser200> => {
680
+
681
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
682
+ if (!h) return {};
683
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
684
+ if (Symbol.iterator in h) {
685
+ return Object.fromEntries(
686
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
687
+ );
688
+ }
689
+ const headers: Record<string, string | readonly string[]> = {};
690
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
691
+ if (value !== undefined) headers[name] = value;
692
+ }
693
+ return headers;
694
+ };
695
+ return customFetch<PatchMyUser200>(getPatchMyUserUrl(),
696
+ {
500
697
  ...options,
501
- method: "PATCH",
502
- headers: { "Content-Type": "application/json", ...options?.headers },
503
- body: JSON.stringify(patchMyUserBody),
504
- });
505
- };
698
+ method: 'PATCH',
699
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
700
+ body: JSON.stringify(patchMyUserBody)
701
+ }
702
+ );}
703
+
506
704
 
507
- export const getListMyProjectsUrl = (params?: ListMyProjectsParams) => {
705
+
706
+ export const getListMyProjectsUrl = (params?: ListMyProjectsParams,) => {
508
707
  const normalizedParams = new URLSearchParams();
509
708
 
510
709
  Object.entries(params || {}).forEach(([key, value]) => {
710
+
511
711
  if (value !== undefined) {
512
- normalizedParams.append(key, value === null ? "null" : value.toString());
712
+ normalizedParams.append(key, value === null ? 'null' : String(value))
513
713
  }
514
714
  });
515
715
 
516
716
  const stringifiedParams = normalizedParams.toString();
517
717
 
518
- return stringifiedParams.length > 0
519
- ? `${getProxyPath()}/users/me/projects?${stringifiedParams}`
520
- : `${getProxyPath()}/users/me/projects`;
521
- };
718
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/users/me/projects?${stringifiedParams}` : `${getProxyPath()}/users/me/projects`
719
+ }
522
720
 
523
721
  /**
524
722
  * The projects the signed-in user holds an active grant on, either directly or
525
- through a team they are a member of. Ordered by project id and paged with an
526
- opaque cursor.
527
-
528
- This is not the same question as `queryProjects`, which answers with the one
529
- project the calling credential is bound to. Here the session is the caller
530
- and the grants are the answer, so the list spans projects.
531
-
723
+ * through a team they are a member of. Ordered by project id and paged with an
724
+ * opaque cursor.
725
+ *
726
+ * This is not the same question as `queryProjects`, which answers with the one
727
+ * project the calling credential is bound to. Here the session is the caller
728
+ * and the grants are the answer, so the list spans projects.
532
729
  * @summary List the projects I can act on
533
730
  */
534
- export const listMyProjects = async (
535
- params?: ListMyProjectsParams,
536
- options?: RequestInit,
537
- ): Promise<ListMyProjects200> => {
538
- return customFetch<ListMyProjects200>(getListMyProjectsUrl(params), {
731
+ export const listMyProjects = async (params?: ListMyProjectsParams, options?: Parameters<typeof customFetch>[1]): Promise<ListMyProjects200> => {
732
+
733
+ return customFetch<ListMyProjects200>(getListMyProjectsUrl(params),
734
+ {
539
735
  ...options,
540
- method: "GET",
541
- });
542
- };
736
+ method: 'GET'
737
+
738
+
739
+ }
740
+ );}
741
+
742
+
543
743
 
544
744
  export const getCreateFlowUrl = () => {
545
- return `${getProxyPath()}/flow`;
546
- };
547
745
 
548
- /**
549
- * Resolves a flow definition based on purpose + audience context and returns
550
- the first capability step. Creates a new session implicitly unless
551
- `session_id` is provided (for step-up / reauth on an existing session).
552
746
 
553
- The response contains an `id` field — the flow handle. Use it as the path
554
- parameter for all subsequent `/flow/{id}/submit` calls.
555
747
 
556
- The response also sets an encrypted `HttpOnly` cookie (`_zflow`) containing
557
- the flow's orchestration state (current step, collected data, history).
558
- The server is stateless between requests — all flow state lives in this
559
- cookie. The browser sends it automatically on subsequent requests.
560
748
 
749
+ return `${getProxyPath()}/flow`
750
+ }
751
+
752
+ /**
753
+ * Resolves a flow definition based on purpose + audience context and returns
754
+ * the first capability step. Creates a new session implicitly unless
755
+ * `session_id` is provided (for step-up / reauth on an existing session).
756
+ *
757
+ * The response contains an `id` field — the flow handle. Use it as the path
758
+ * parameter for all subsequent `/flow/{id}/submit` calls.
759
+ *
760
+ * The response also sets an encrypted `HttpOnly` cookie (`_zflow`) containing
761
+ * the flow's orchestration state (current step, collected data, history).
762
+ * The server is stateless between requests — all flow state lives in this
763
+ * cookie. The browser sends it automatically on subsequent requests.
561
764
  * @summary Start a new flow
562
765
  */
563
- export const createFlow = async (
564
- createFlowBody: CreateFlowBody,
565
- options?: RequestInit,
566
- ): Promise<CreateFlow201> => {
567
- return customFetch<CreateFlow201>(getCreateFlowUrl(), {
766
+ export const createFlow = async (createFlowBody: CreateFlowBody, options?: Parameters<typeof customFetch>[1]): Promise<CreateFlow201> => {
767
+
768
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
769
+ if (!h) return {};
770
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
771
+ if (Symbol.iterator in h) {
772
+ return Object.fromEntries(
773
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
774
+ );
775
+ }
776
+ const headers: Record<string, string | readonly string[]> = {};
777
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
778
+ if (value !== undefined) headers[name] = value;
779
+ }
780
+ return headers;
781
+ };
782
+ return customFetch<CreateFlow201>(getCreateFlowUrl(),
783
+ {
568
784
  ...options,
569
- method: "POST",
570
- headers: { "Content-Type": "application/json", ...options?.headers },
571
- body: JSON.stringify(createFlowBody),
572
- });
573
- };
785
+ method: 'POST',
786
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
787
+ body: JSON.stringify(createFlowBody)
788
+ }
789
+ );}
790
+
791
+
792
+
793
+ export const getGetFlowStepUrl = (id: string,) => {
794
+
795
+
574
796
 
575
- export const getGetFlowStepUrl = (id: string) => {
576
- return `${getProxyPath()}/flow/${id}`;
577
- };
797
+
798
+ return `${getProxyPath()}/flow/${encodeURIComponent(String(id))}`
799
+ }
578
800
 
579
801
  /**
580
802
  * Returns the current capability step without advancing the state machine.
581
- Useful for page reloads or re-rendering after a network error.
582
-
803
+ * Useful for page reloads or re-rendering after a network error.
583
804
  * @summary Get current step (re-render)
584
805
  */
585
- export const getFlowStep = async (id: string, options?: RequestInit): Promise<GetFlowStep200> => {
586
- return customFetch<GetFlowStep200>(getGetFlowStepUrl(id), {
806
+ export const getFlowStep = async (id: string, options?: Parameters<typeof customFetch>[1]): Promise<GetFlowStep200> => {
807
+
808
+ return customFetch<GetFlowStep200>(getGetFlowStepUrl(id),
809
+ {
587
810
  ...options,
588
- method: "GET",
589
- });
590
- };
811
+ method: 'GET'
591
812
 
592
- export const getSubmitFlowStepUrl = (id: string) => {
593
- return `${getProxyPath()}/flow/${id}/submit`;
594
- };
595
813
 
596
- /**
597
- * Submits user input for the current step. The server validates,
598
- processes (e.g., verifies a credential), advances the state machine
599
- through any invisible steps, and returns the next visible step.
814
+ }
815
+ );}
600
816
 
601
- The response sets an updated encrypted `HttpOnly` cookie (`_zflow`)
602
- with the new flow state. The server is stateless — all orchestration
603
- state is carried in this cookie between requests.
604
817
 
605
- **Important:** The `id` in the response may differ from the `id` used in
606
- the request. This happens when a flow pivots (pushes a new flow onto the
607
- stack) or when a stacked flow completes (auto-pops to the parent flow).
608
- Always use the `id` from the latest response for the next request.
609
818
 
610
- ## Flow completion
819
+ export const getSubmitFlowStepUrl = (id: string,) => {
611
820
 
612
- When `step.type` is `complete`, the flow is terminal. The `step.behavior`
613
- field tells the frontend what to do:
614
821
 
615
- | `behavior` | Action |
616
- |------------- |------------------------------------------------------------|
617
- | `redirect` | Navigate to `redirect_uri` (OIDC/SAML auth request done). |
618
- | `show` | Render the step as a success screen (e.g., registration). |
619
822
 
620
- A `complete` step is only returned when the **entire flow stack** is done.
621
- If a stacked flow (e.g., recovery pivoted from login) finishes, the server
622
- auto-pops to the parent flow and returns the parent's next step — the
623
- frontend never sees a `complete` for intermediate flows.
624
823
 
824
+ return `${getProxyPath()}/flow/${encodeURIComponent(String(id))}/submit`
825
+ }
826
+
827
+ /**
828
+ * Submits user input for the current step. The server validates,
829
+ * processes (e.g., verifies a credential), advances the state machine
830
+ * through any invisible steps, and returns the next visible step.
831
+ *
832
+ * The response sets an updated encrypted `HttpOnly` cookie (`_zflow`)
833
+ * with the new flow state. The server is stateless — all orchestration
834
+ * state is carried in this cookie between requests.
835
+ *
836
+ * **Important:** The `id` in the response may differ from the `id` used in
837
+ * the request. This happens when a flow pivots (pushes a new flow onto the
838
+ * stack) or when a stacked flow completes (auto-pops to the parent flow).
839
+ * Always use the `id` from the latest response for the next request.
840
+ *
841
+ * ## Flow completion
842
+ *
843
+ * When `step.type` is `complete`, the flow is terminal. The `step.behavior`
844
+ * field tells the frontend what to do:
845
+ *
846
+ * | `behavior` | Action |
847
+ * |------------- |------------------------------------------------------------|
848
+ * | `redirect` | Navigate to `redirect_uri` (OIDC/SAML auth request done). |
849
+ * | `show` | Render the step as a success screen (e.g., registration). |
850
+ *
851
+ * A `complete` step is only returned when the **entire flow stack** is done.
852
+ * If a stacked flow (e.g., recovery pivoted from login) finishes, the server
853
+ * auto-pops to the parent flow and returns the parent's next step — the
854
+ * frontend never sees a `complete` for intermediate flows.
855
+ *
856
+ * ## External sign-in
857
+ *
858
+ * `{action: "sso", sso_provider_id, return_target}` on a step that offers
859
+ * `sso_providers` returns the engine-emitted `sso-redirect` step, whose
860
+ * `redirect_url` the frontend navigates to.
861
+ *
862
+ * - The flow state does not change, but `_zflow` is re-sealed like on
863
+ * every response, so its ten-minute window restarts at this submission;
864
+ * the external sign-in and the return must complete within it.
865
+ * - A second `Set-Cookie` line carries the browser-binding cookie the
866
+ * callback checks: `HttpOnly`, `Path=/`, `SameSite=Lax`.
867
+ * - On every host except http loopback it is `__Host-_zsso` with `Secure`.
868
+ * - When the request host is http loopback (local development, where
869
+ * Safari rejects `Secure`), it is `_zsso` with no `Secure`; the
870
+ * `__Host-` prefix is dropped because it requires `Secure`.
871
+ *
872
+ * A connection whose `client_id` is a `${{ NAME }}` reference has it filled
873
+ * from the project's variables. A provider the engine cannot start a
874
+ * sign-in with, including a reference with no variable behind it,
875
+ * re-renders the step with `error.sso_unavailable`.
625
876
  * @summary Submit step data and advance
626
877
  */
627
- export const submitFlowStep = async (
628
- id: string,
629
- submitFlowStepBody: SubmitFlowStepBody,
630
- options?: RequestInit,
631
- ): Promise<SubmitFlowStep200> => {
632
- return customFetch<SubmitFlowStep200>(getSubmitFlowStepUrl(id), {
878
+ export const submitFlowStep = async (id: string,
879
+ submitFlowStepBody: SubmitFlowStepBody, options?: Parameters<typeof customFetch>[1]): Promise<SubmitFlowStep200> => {
880
+
881
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
882
+ if (!h) return {};
883
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
884
+ if (Symbol.iterator in h) {
885
+ return Object.fromEntries(
886
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
887
+ );
888
+ }
889
+ const headers: Record<string, string | readonly string[]> = {};
890
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
891
+ if (value !== undefined) headers[name] = value;
892
+ }
893
+ return headers;
894
+ };
895
+ return customFetch<SubmitFlowStep200>(getSubmitFlowStepUrl(id),
896
+ {
633
897
  ...options,
634
- method: "POST",
635
- headers: { "Content-Type": "application/json", ...options?.headers },
636
- body: JSON.stringify(submitFlowStepBody),
637
- });
638
- };
898
+ method: 'POST',
899
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
900
+ body: JSON.stringify(submitFlowStepBody)
901
+ }
902
+ );}
903
+
904
+
639
905
 
640
906
  export const getCreateAuthAttemptUrl = () => {
641
- return `${getProxyPath()}/auth_attempts`;
642
- };
643
907
 
644
- /**
645
- * Starts a new authentication attempt. This is the entry point for the auth_attempts state machine.
646
908
 
647
- An attempt is an ephemeral (15-minute TTL) state machine that drives a single authentication round.
648
- It accepts factor challenges, verifies proofs, and completes into a session or handoff token.
649
909
 
650
- Accepts a project_id and challenge_nonce (from POST /bootstrap/challenge). For step-up re-auth,
651
- also include session_id to add factors to an existing session.
652
910
 
911
+ return `${getProxyPath()}/auth_attempts`
912
+ }
913
+
914
+ /**
915
+ * Starts a new authentication attempt. This is the entry point for the auth_attempts state machine.
916
+ *
917
+ * An attempt is an ephemeral (15-minute TTL) state machine that drives a single authentication round.
918
+ * It accepts factor challenges, verifies proofs, and completes into a session or handoff token.
919
+ *
920
+ * Accepts a project_id and challenge_nonce (from POST /bootstrap/challenge). For step-up re-auth,
921
+ * also include session_id to add factors to an existing session.
653
922
  * @summary Create a new authentication attempt
654
923
  */
655
- export const createAuthAttempt = async (
656
- createAuthAttemptBody: CreateAuthAttemptBody,
657
- options?: RequestInit,
658
- ): Promise<CreateAuthAttempt201> => {
659
- return customFetch<CreateAuthAttempt201>(getCreateAuthAttemptUrl(), {
924
+ export const createAuthAttempt = async (createAuthAttemptBody: CreateAuthAttemptBody, options?: Parameters<typeof customFetch>[1]): Promise<CreateAuthAttempt201> => {
925
+
926
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
927
+ if (!h) return {};
928
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
929
+ if (Symbol.iterator in h) {
930
+ return Object.fromEntries(
931
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
932
+ );
933
+ }
934
+ const headers: Record<string, string | readonly string[]> = {};
935
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
936
+ if (value !== undefined) headers[name] = value;
937
+ }
938
+ return headers;
939
+ };
940
+ return customFetch<CreateAuthAttempt201>(getCreateAuthAttemptUrl(),
941
+ {
660
942
  ...options,
661
- method: "POST",
662
- headers: { "Content-Type": "application/json", ...options?.headers },
663
- body: JSON.stringify(createAuthAttemptBody),
664
- });
665
- };
943
+ method: 'POST',
944
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
945
+ body: JSON.stringify(createAuthAttemptBody)
946
+ }
947
+ );}
666
948
 
667
- export const getGetAuthAttemptUrl = (attemptId: string) => {
668
- return `${getProxyPath()}/auth_attempts/${attemptId}`;
669
- };
670
949
 
671
- /**
672
- * Polls the current state of an authentication attempt.
673
950
 
674
- Returns the attempt's state, available factors for the next challenge,
675
- challenges issued so far, and any errors preventing progress.
951
+ export const getGetAuthAttemptUrl = (attemptId: string,) => {
952
+
953
+
676
954
 
677
- Use this for polling during long-running factor verifications (e.g., waiting for
678
- a federated IdP callback or a device flow).
679
955
 
956
+ return `${getProxyPath()}/auth_attempts/${encodeURIComponent(String(attemptId))}`
957
+ }
958
+
959
+ /**
960
+ * Polls the current state of an authentication attempt.
961
+ *
962
+ * Returns the attempt's state, available factors for the next challenge,
963
+ * challenges issued so far, and any errors preventing progress.
964
+ *
965
+ * Use this for polling during long-running factor verifications (e.g., waiting for
966
+ * a federated IdP callback or a device flow).
680
967
  * @summary Get authentication attempt state
681
968
  */
682
- export const getAuthAttempt = async (
683
- attemptId: string,
684
- options?: RequestInit,
685
- ): Promise<GetAuthAttempt200> => {
686
- return customFetch<GetAuthAttempt200>(getGetAuthAttemptUrl(attemptId), {
969
+ export const getAuthAttempt = async (attemptId: string, options?: Parameters<typeof customFetch>[1]): Promise<GetAuthAttempt200> => {
970
+
971
+ return customFetch<GetAuthAttempt200>(getGetAuthAttemptUrl(attemptId),
972
+ {
687
973
  ...options,
688
- method: "GET",
689
- });
690
- };
974
+ method: 'GET'
975
+
976
+
977
+ }
978
+ );}
979
+
980
+
981
+
982
+ export const getIssueChallengeUrl = (attemptId: string,) => {
691
983
 
692
- export const getIssueChallengeUrl = (attemptId: string) => {
693
- return `${getProxyPath()}/auth_attempts/${attemptId}/challenges`;
694
- };
695
984
 
696
- /**
697
- * Issues a single-factor verification challenge within an auth attempt.
698
985
 
699
- This advances the authentication state machine by requesting a specific factor method
700
- (password, passkey, TOTP, OTP via SMS, etc.). The server responds with challenge details
701
- including method, metadata, and any UI hints. The client then verifies the proof
702
- by calling POST /auth_attempts/{attempt_id}/challenges/{challenge_id}/verify.
703
986
 
987
+ return `${getProxyPath()}/auth_attempts/${encodeURIComponent(String(attemptId))}/challenges`
988
+ }
989
+
990
+ /**
991
+ * Issues a single-factor verification challenge within an auth attempt.
992
+ *
993
+ * This advances the authentication state machine by requesting a specific factor method
994
+ * (password, passkey, TOTP, OTP via SMS, etc.). The server responds with challenge details
995
+ * including method, metadata, and any UI hints. The client then verifies the proof
996
+ * by calling POST /auth_attempts/{attempt_id}/challenges/{challenge_id}/verify.
704
997
  * @summary Issue a factor challenge
705
998
  */
706
- export const issueChallenge = async (
707
- attemptId: string,
708
- issueChallengeBody: IssueChallengeBody,
709
- options?: RequestInit,
710
- ): Promise<IssueChallenge201> => {
711
- return customFetch<IssueChallenge201>(getIssueChallengeUrl(attemptId), {
999
+ export const issueChallenge = async (attemptId: string,
1000
+ issueChallengeBody: IssueChallengeBody, options?: Parameters<typeof customFetch>[1]): Promise<IssueChallenge201> => {
1001
+
1002
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
1003
+ if (!h) return {};
1004
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
1005
+ if (Symbol.iterator in h) {
1006
+ return Object.fromEntries(
1007
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
1008
+ );
1009
+ }
1010
+ const headers: Record<string, string | readonly string[]> = {};
1011
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
1012
+ if (value !== undefined) headers[name] = value;
1013
+ }
1014
+ return headers;
1015
+ };
1016
+ return customFetch<IssueChallenge201>(getIssueChallengeUrl(attemptId),
1017
+ {
712
1018
  ...options,
713
- method: "POST",
714
- headers: { "Content-Type": "application/json", ...options?.headers },
715
- body: JSON.stringify(issueChallengeBody),
716
- });
717
- };
1019
+ method: 'POST',
1020
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
1021
+ body: JSON.stringify(issueChallengeBody)
1022
+ }
1023
+ );}
1024
+
1025
+
1026
+
1027
+ export const getVerifyChallengeProofUrl = (attemptId: string,
1028
+ challengeId: string,) => {
718
1029
 
719
- export const getVerifyChallengeProofUrl = (attemptId: string, challengeId: string) => {
720
- return `${getProxyPath()}/auth_attempts/${attemptId}/challenges/${challengeId}/verify`;
721
- };
722
1030
 
723
- /**
724
- * Submits a proof (credential, code, assertion) to verify a factor challenge.
725
1031
 
726
- The proof format depends on the challenge method. For example:
727
- - `password` method: { password: "…" }
728
- - `totp` method: { totp: { code: "123456" } }
729
- - `passkey` method: { passkey: { assertion: "…" } }
730
- - `recovery_code` method: { recovery_code: "…" }
731
1032
 
732
- On successful verification, the factor is written to the auth attempt.
733
- The attempt moves to the next pending challenge or completes if all required factors are verified.
1033
+ return `${getProxyPath()}/auth_attempts/${encodeURIComponent(String(attemptId))}/challenges/${encodeURIComponent(String(challengeId))}/verify`
1034
+ }
734
1035
 
1036
+ /**
1037
+ * Submits a proof (credential, code, assertion) to verify a factor challenge.
1038
+ *
1039
+ * The proof format depends on the challenge method. For example:
1040
+ * - `password` method: { password: "…" }
1041
+ * - `totp` method: { totp: { code: "123456" } }
1042
+ * - `passkey` method: { passkey: { assertion: "…" } }
1043
+ * - `recovery_code` method: { recovery_code: "…" }
1044
+ *
1045
+ * On successful verification, the factor is written to the auth attempt.
1046
+ * The attempt moves to the next pending challenge or completes if all required factors are verified.
735
1047
  * @summary Verify a factor proof
736
1048
  */
737
- export const verifyChallengeProof = async (
738
- attemptId: string,
739
- challengeId: string,
740
- verifyChallengeProofBody: VerifyChallengeProofBody,
741
- options?: RequestInit,
742
- ): Promise<VerifyChallengeProof200> => {
743
- return customFetch<VerifyChallengeProof200>(getVerifyChallengeProofUrl(attemptId, challengeId), {
744
- ...options,
745
- method: "POST",
746
- headers: { "Content-Type": "application/json", ...options?.headers },
747
- body: JSON.stringify(verifyChallengeProofBody),
748
- });
749
- };
1049
+ export const verifyChallengeProof = async (attemptId: string,
1050
+ challengeId: string,
1051
+ verifyChallengeProofBody: VerifyChallengeProofBody, options?: Parameters<typeof customFetch>[1]): Promise<VerifyChallengeProof200> => {
1052
+
1053
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
1054
+ if (!h) return {};
1055
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
1056
+ if (Symbol.iterator in h) {
1057
+ return Object.fromEntries(
1058
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
1059
+ );
1060
+ }
1061
+ const headers: Record<string, string | readonly string[]> = {};
1062
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
1063
+ if (value !== undefined) headers[name] = value;
1064
+ }
1065
+ return headers;
1066
+ };
1067
+ return customFetch<VerifyChallengeProof200>(getVerifyChallengeProofUrl(attemptId,challengeId),
1068
+ {
1069
+ ...options,
1070
+ method: 'POST',
1071
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
1072
+ body: JSON.stringify(verifyChallengeProofBody)
1073
+ }
1074
+ );}
750
1075
 
751
- export const getCreateHandoffUrl = (attemptId: string) => {
752
- return `${getProxyPath()}/auth_attempts/${attemptId}/handoff`;
753
- };
754
1076
 
755
- /**
756
- * Completes the authentication attempt and mints a `handoff_token`.
757
1077
 
758
- Call this after all required factors have been verified and the attempt is in `completed` state.
759
- The handoff token is short-lived (≤60 seconds) and must be exchanged at
760
- POST /sessions/exchange to receive the final session and session_token.
1078
+ export const getCreateHandoffUrl = (attemptId: string,) => {
761
1079
 
762
- The handoff token is:
763
- - Single-use (atomic exchange, no retry)
764
- - Audience-bound (requires matching project key for exchange)
765
- - Idempotency-safe within a 5-minute window (see conventions)
766
1080
 
1081
+
1082
+
1083
+ return `${getProxyPath()}/auth_attempts/${encodeURIComponent(String(attemptId))}/handoff`
1084
+ }
1085
+
1086
+ /**
1087
+ * Completes the authentication attempt and mints a `handoff_token`.
1088
+ *
1089
+ * Call this after all required factors have been verified and the attempt is in `completed` state.
1090
+ * The handoff token is short-lived (≤60 seconds) and must be exchanged at
1091
+ * POST /sessions/exchange to receive the final session and session_token.
1092
+ *
1093
+ * The handoff token is:
1094
+ * - Single-use (atomic exchange, no retry)
1095
+ * - Audience-bound (requires matching project key for exchange)
1096
+ * - Idempotency-safe within a 5-minute window (see conventions)
767
1097
  * @summary Complete authentication and create handoff token
768
1098
  */
769
- export const createHandoff = async (
770
- attemptId: string,
771
- options?: RequestInit,
772
- ): Promise<CreateHandoff200> => {
773
- return customFetch<CreateHandoff200>(getCreateHandoffUrl(attemptId), {
1099
+ export const createHandoff = async (attemptId: string, options?: Parameters<typeof customFetch>[1]): Promise<CreateHandoff200> => {
1100
+
1101
+ return customFetch<CreateHandoff200>(getCreateHandoffUrl(attemptId),
1102
+ {
774
1103
  ...options,
775
- method: "POST",
776
- });
777
- };
1104
+ method: 'POST'
1105
+
1106
+
1107
+ }
1108
+ );}
1109
+
1110
+
778
1111
 
779
1112
  export const getCreateProjectUrl = () => {
780
- return `${getProxyPath()}/projects`;
781
- };
1113
+
1114
+
1115
+
1116
+
1117
+ return `${getProxyPath()}/projects`
1118
+ }
782
1119
 
783
1120
  /**
784
1121
  * @summary Create project
785
1122
  */
786
- export const createProject = async (
787
- createProjectBody: CreateProjectBody,
788
- options?: RequestInit,
789
- ): Promise<CreateProject201> => {
790
- return customFetch<CreateProject201>(getCreateProjectUrl(), {
1123
+ export const createProject = async (createProjectBody: CreateProjectBody, options?: Parameters<typeof customFetch>[1]): Promise<CreateProject201> => {
1124
+
1125
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
1126
+ if (!h) return {};
1127
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
1128
+ if (Symbol.iterator in h) {
1129
+ return Object.fromEntries(
1130
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
1131
+ );
1132
+ }
1133
+ const headers: Record<string, string | readonly string[]> = {};
1134
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
1135
+ if (value !== undefined) headers[name] = value;
1136
+ }
1137
+ return headers;
1138
+ };
1139
+ return customFetch<CreateProject201>(getCreateProjectUrl(),
1140
+ {
791
1141
  ...options,
792
- method: "POST",
793
- headers: { "Content-Type": "application/json", ...options?.headers },
794
- body: JSON.stringify(createProjectBody),
795
- });
796
- };
1142
+ method: 'POST',
1143
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
1144
+ body: JSON.stringify(createProjectBody)
1145
+ }
1146
+ );}
797
1147
 
798
- export const getQueryProjectsUrl = () => {
799
- return `${getProxyPath()}/projects/query`;
800
- };
1148
+
1149
+
1150
+ export const getQueryProjectsUrl = () => {
1151
+
1152
+
1153
+
1154
+
1155
+ return `${getProxyPath()}/projects/query`
1156
+ }
801
1157
 
802
1158
  /**
803
1159
  * @summary Query projects
804
1160
  */
805
- export const queryProjects = async (
806
- queryProjectsBody: QueryProjectsBody,
807
- options?: RequestInit,
808
- ): Promise<QueryProjects200> => {
809
- return customFetch<QueryProjects200>(getQueryProjectsUrl(), {
1161
+ export const queryProjects = async (queryProjectsBody: QueryProjectsBody, options?: Parameters<typeof customFetch>[1]): Promise<QueryProjects200> => {
1162
+
1163
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
1164
+ if (!h) return {};
1165
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
1166
+ if (Symbol.iterator in h) {
1167
+ return Object.fromEntries(
1168
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
1169
+ );
1170
+ }
1171
+ const headers: Record<string, string | readonly string[]> = {};
1172
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
1173
+ if (value !== undefined) headers[name] = value;
1174
+ }
1175
+ return headers;
1176
+ };
1177
+ return customFetch<QueryProjects200>(getQueryProjectsUrl(),
1178
+ {
810
1179
  ...options,
811
- method: "POST",
812
- headers: { "Content-Type": "application/json", ...options?.headers },
813
- body: JSON.stringify(queryProjectsBody),
814
- });
815
- };
1180
+ method: 'POST',
1181
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
1182
+ body: JSON.stringify(queryProjectsBody)
1183
+ }
1184
+ );}
1185
+
1186
+
1187
+
1188
+ export const getGetProjectUrl = (projectId: string,) => {
816
1189
 
817
- export const getGetProjectUrl = (projectId: string) => {
818
- return `${getProxyPath()}/projects/${projectId}`;
819
- };
1190
+
1191
+
1192
+
1193
+ return `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}`
1194
+ }
820
1195
 
821
1196
  /**
822
1197
  * Returns the current state of a project.
823
-
824
1198
  * @summary Get project
825
1199
  */
826
- export const getProject = async (
827
- projectId: string,
828
- options?: RequestInit,
829
- ): Promise<GetProject200> => {
830
- return customFetch<GetProject200>(getGetProjectUrl(projectId), {
1200
+ export const getProject = async (projectId: string, options?: Parameters<typeof customFetch>[1]): Promise<GetProject200> => {
1201
+
1202
+ return customFetch<GetProject200>(getGetProjectUrl(projectId),
1203
+ {
831
1204
  ...options,
832
- method: "GET",
833
- });
834
- };
1205
+ method: 'GET'
1206
+
1207
+
1208
+ }
1209
+ );}
1210
+
1211
+
1212
+
1213
+ export const getPatchProjectUrl = (projectId: string,) => {
1214
+
1215
+
835
1216
 
836
- export const getPatchProjectUrl = (projectId: string) => {
837
- return `${getProxyPath()}/projects/${projectId}`;
838
- };
1217
+
1218
+ return `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}`
1219
+ }
839
1220
 
840
1221
  /**
841
1222
  * Updates the state of a project.
842
-
843
1223
  * @summary Update project
844
1224
  */
845
- export const patchProject = async (
846
- projectId: string,
847
- patchProjectBody: PatchProjectBody,
848
- options?: RequestInit,
849
- ): Promise<PatchProject200> => {
850
- return customFetch<PatchProject200>(getPatchProjectUrl(projectId), {
1225
+ export const patchProject = async (projectId: string,
1226
+ patchProjectBody: PatchProjectBody, options?: Parameters<typeof customFetch>[1]): Promise<PatchProject200> => {
1227
+
1228
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
1229
+ if (!h) return {};
1230
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
1231
+ if (Symbol.iterator in h) {
1232
+ return Object.fromEntries(
1233
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
1234
+ );
1235
+ }
1236
+ const headers: Record<string, string | readonly string[]> = {};
1237
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
1238
+ if (value !== undefined) headers[name] = value;
1239
+ }
1240
+ return headers;
1241
+ };
1242
+ return customFetch<PatchProject200>(getPatchProjectUrl(projectId),
1243
+ {
851
1244
  ...options,
852
- method: "PATCH",
853
- headers: { "Content-Type": "application/json", ...options?.headers },
854
- body: JSON.stringify(patchProjectBody),
855
- });
856
- };
1245
+ method: 'PATCH',
1246
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
1247
+ body: JSON.stringify(patchProjectBody)
1248
+ }
1249
+ );}
1250
+
1251
+
1252
+
1253
+ export const getInitClaimUrl = (projectId: string,) => {
857
1254
 
858
- export const getInitClaimUrl = (projectId: string) => {
859
- return `${getProxyPath()}/projects/${projectId}/claim/init`;
860
- };
1255
+
1256
+
1257
+
1258
+ return `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/claim/init`
1259
+ }
861
1260
 
862
1261
  /**
863
1262
  * Starts a claim challenge for an unclaimed project. Authenticated by the
864
- project secret, this mints a single-use, short-lived challenge and returns
865
- the `claim_url` the developer opens in a browser to complete the claim,
866
- together with the `challenge_id` the CLI polls with. The exact expiry is
867
- carried by `expires_at` on the response.
868
-
1263
+ * project secret, this mints a single-use, short-lived challenge and returns
1264
+ * the `claim_url` the developer opens in a browser to complete the claim,
1265
+ * together with the `challenge_id` the CLI polls with. The exact expiry is
1266
+ * carried by `expires_at` on the response.
869
1267
  * @summary Initialize a project claim
870
1268
  */
871
- export const initClaim = async (
872
- projectId: string,
873
- options?: RequestInit,
874
- ): Promise<InitClaim201> => {
875
- return customFetch<InitClaim201>(getInitClaimUrl(projectId), {
1269
+ export const initClaim = async (projectId: string, options?: Parameters<typeof customFetch>[1]): Promise<InitClaim201> => {
1270
+
1271
+ return customFetch<InitClaim201>(getInitClaimUrl(projectId),
1272
+ {
876
1273
  ...options,
877
- method: "POST",
878
- });
879
- };
1274
+ method: 'POST'
1275
+
1276
+
1277
+ }
1278
+ );}
1279
+
880
1280
 
881
- export const getGetClaimStatusUrl = (projectId: string, params: GetClaimStatusParams) => {
1281
+
1282
+ export const getGetClaimStatusUrl = (projectId: string,
1283
+ params: GetClaimStatusParams,) => {
882
1284
  const normalizedParams = new URLSearchParams();
883
1285
 
884
1286
  Object.entries(params || {}).forEach(([key, value]) => {
1287
+
885
1288
  if (value !== undefined) {
886
- normalizedParams.append(key, value === null ? "null" : value.toString());
1289
+ normalizedParams.append(key, value === null ? 'null' : String(value))
887
1290
  }
888
1291
  });
889
1292
 
890
1293
  const stringifiedParams = normalizedParams.toString();
891
1294
 
892
- return stringifiedParams.length > 0
893
- ? `${getProxyPath()}/projects/${projectId}/claim/status?${stringifiedParams}`
894
- : `${getProxyPath()}/projects/${projectId}/claim/status`;
895
- };
1295
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/claim/status?${stringifiedParams}` : `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/claim/status`
1296
+ }
896
1297
 
897
1298
  /**
898
1299
  * Polled by the CLI while a browser completes the claim. Authorized by the
899
- project secret that initiated the challenge. Returns `pending`, or
900
- `completed` with the owning team, the claim timestamp, and the dashboard
901
- URL once the project is claimed. The claim grant, not the polled
902
- challenge, is the source of truth: a project claimed through another
903
- concurrent challenge also reports `completed`, and a completed claim
904
- keeps reporting `completed` past this challenge's expiry and past the
905
- project's claim window.
906
-
1300
+ * project secret that initiated the challenge. Returns `pending`, or
1301
+ * `completed` with the owning team, the claim timestamp, and the dashboard
1302
+ * URL once the project is claimed. The claim grant, not the polled
1303
+ * challenge, is the source of truth: a project claimed through another
1304
+ * concurrent challenge also reports `completed`, and a completed claim
1305
+ * keeps reporting `completed` past this challenge's expiry and past the
1306
+ * project's claim window.
907
1307
  * @summary Get claim status
908
1308
  */
909
- export const getClaimStatus = async (
910
- projectId: string,
911
- params: GetClaimStatusParams,
912
- options?: RequestInit,
913
- ): Promise<GetClaimStatus200> => {
914
- return customFetch<GetClaimStatus200>(getGetClaimStatusUrl(projectId, params), {
1309
+ export const getClaimStatus = async (projectId: string,
1310
+ params: GetClaimStatusParams, options?: Parameters<typeof customFetch>[1]): Promise<GetClaimStatus200> => {
1311
+
1312
+ return customFetch<GetClaimStatus200>(getGetClaimStatusUrl(projectId,params),
1313
+ {
915
1314
  ...options,
916
- method: "GET",
917
- });
918
- };
1315
+ method: 'GET'
1316
+
1317
+
1318
+ }
1319
+ );}
1320
+
1321
+
919
1322
 
920
- export const getCompleteClaimUrl = (projectId: string) => {
921
- return `${getProxyPath()}/projects/${projectId}/claim/complete`;
922
- };
1323
+ export const getCompleteClaimUrl = (projectId: string,) => {
1324
+
1325
+
1326
+
1327
+
1328
+ return `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/claim/complete`
1329
+ }
923
1330
 
924
1331
  /**
925
1332
  * Called by the browser after the developer authenticates on the claim page.
926
- Authenticated by the `__nextgen_session` cookie, it attaches the project to
927
- the developer's personal team using the `challenge_id` from the claim URL as
928
- its single-use, browser-safe authorization.
929
-
1333
+ * Authenticated by the `__nextgen_session` cookie, it attaches the project to
1334
+ * the developer's personal team using the `challenge_id` from the claim URL as
1335
+ * its single-use, browser-safe authorization.
930
1336
  * @summary Complete a project claim
931
1337
  */
932
- export const completeClaim = async (
933
- projectId: string,
934
- completeClaimBody: CompleteClaimBody,
935
- options?: RequestInit,
936
- ): Promise<CompleteClaim200> => {
937
- return customFetch<CompleteClaim200>(getCompleteClaimUrl(projectId), {
1338
+ export const completeClaim = async (projectId: string,
1339
+ completeClaimBody: CompleteClaimBody, options?: Parameters<typeof customFetch>[1]): Promise<CompleteClaim200> => {
1340
+
1341
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
1342
+ if (!h) return {};
1343
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
1344
+ if (Symbol.iterator in h) {
1345
+ return Object.fromEntries(
1346
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
1347
+ );
1348
+ }
1349
+ const headers: Record<string, string | readonly string[]> = {};
1350
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
1351
+ if (value !== undefined) headers[name] = value;
1352
+ }
1353
+ return headers;
1354
+ };
1355
+ return customFetch<CompleteClaim200>(getCompleteClaimUrl(projectId),
1356
+ {
938
1357
  ...options,
939
- method: "POST",
940
- headers: { "Content-Type": "application/json", ...options?.headers },
941
- body: JSON.stringify(completeClaimBody),
942
- });
943
- };
1358
+ method: 'POST',
1359
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
1360
+ body: JSON.stringify(completeClaimBody)
1361
+ }
1362
+ );}
944
1363
 
945
- export const getGetClaimWindowUrl = (projectId: string, params: GetClaimWindowParams) => {
1364
+
1365
+
1366
+ export const getGetClaimWindowUrl = (projectId: string,
1367
+ params: GetClaimWindowParams,) => {
946
1368
  const normalizedParams = new URLSearchParams();
947
1369
 
948
1370
  Object.entries(params || {}).forEach(([key, value]) => {
1371
+
949
1372
  if (value !== undefined) {
950
- normalizedParams.append(key, value === null ? "null" : value.toString());
1373
+ normalizedParams.append(key, value === null ? 'null' : String(value))
951
1374
  }
952
1375
  });
953
1376
 
954
1377
  const stringifiedParams = normalizedParams.toString();
955
1378
 
956
- return stringifiedParams.length > 0
957
- ? `${getProxyPath()}/projects/${projectId}/claim/window?${stringifiedParams}`
958
- : `${getProxyPath()}/projects/${projectId}/claim/window`;
959
- };
1379
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/claim/window?${stringifiedParams}` : `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/claim/window`
1380
+ }
960
1381
 
961
1382
  /**
962
1383
  * Read by the claim page in the browser to show how long is left to claim the
963
- project. Unauthenticated by design: the claim page runs this before the
964
- developer has signed in, and holding the `challenge_id` from the claim URL
965
- is the authorization — the same capability `claim/complete` accepts. It
966
- reveals only the window, never the project itself, and unlike
967
- `claim/complete` it spends nothing, so a reload is free.
968
-
1384
+ * project. Unauthenticated by design: the claim page runs this before the
1385
+ * developer has signed in, and holding the `challenge_id` from the claim URL
1386
+ * is the authorization — the same capability `claim/complete` accepts. It
1387
+ * reveals only the window, never the project itself, and unlike
1388
+ * `claim/complete` it spends nothing, so a reload is free.
969
1389
  * @summary Get the claim window for a project
970
1390
  */
971
- export const getClaimWindow = async (
972
- projectId: string,
973
- params: GetClaimWindowParams,
974
- options?: RequestInit,
975
- ): Promise<GetClaimWindow200> => {
976
- return customFetch<GetClaimWindow200>(getGetClaimWindowUrl(projectId, params), {
1391
+ export const getClaimWindow = async (projectId: string,
1392
+ params: GetClaimWindowParams, options?: Parameters<typeof customFetch>[1]): Promise<GetClaimWindow200> => {
1393
+
1394
+ return customFetch<GetClaimWindow200>(getGetClaimWindowUrl(projectId,params),
1395
+ {
977
1396
  ...options,
978
- method: "GET",
979
- });
980
- };
1397
+ method: 'GET'
981
1398
 
982
- export const getCreateSessionUrl = () => {
983
- return `${getProxyPath()}/sessions`;
984
- };
985
1399
 
986
- /**
987
- * Creates an anonymous session shell with no user and no factors (`state: building`).
1400
+ }
1401
+ );}
988
1402
 
989
- This is optional — an `auth_attempt` will create a session implicitly if none is provided.
990
- Use this explicitly when you want to:
991
- - Pre-allocate a `session_id` before the user is known, so device/telemetry signals
992
- can be correlated with the eventual authenticated session from the start.
993
- - Track anonymous state (bot detection, device fingerprint) that survives until authentication.
994
1403
 
995
- Creating a session is an app-plane operation on the project credential
996
- (`session.write`). The returned `session_token` is a session credential for the
997
- end-user client, not a management scope: it is delivered as the
998
- `__nextgen_session` cookie and authorises the self-service operations
999
- `GET /sessions/me` and `DELETE /sessions/me` (`nextgenSession` scheme). The
1000
- by-id operations `GET /sessions/{session_id}` and `DELETE /sessions/{session_id}`
1001
- are operator endpoints and require `session.read` / `session.delete` instead.
1002
1404
 
1003
- The `session_token` is superseded when a handoff exchange completes — clients must
1004
- replace it at that point.
1405
+ export const getCreateSessionUrl = () => {
1406
+
1407
+
1005
1408
 
1006
- Anonymous sessions expire aggressively (10-minute TTL). The TTL resets to the configured
1007
- full session TTL when the first authentication factor is written via a completing `auth_attempt`.
1008
1409
 
1410
+ return `${getProxyPath()}/sessions`
1411
+ }
1412
+
1413
+ /**
1414
+ * Creates an anonymous session shell with no user and no factors (`state: building`).
1415
+ *
1416
+ * This is optional — an `auth_attempt` will create a session implicitly if none is provided.
1417
+ * Use this explicitly when you want to:
1418
+ * - Pre-allocate a `session_id` before the user is known, so device/telemetry signals
1419
+ * can be correlated with the eventual authenticated session from the start.
1420
+ * - Track anonymous state (bot detection, device fingerprint) that survives until authentication.
1421
+ *
1422
+ * Creating a session is an app-plane operation on the project credential
1423
+ * (`session.write`). The returned `session_token` is a session credential for the
1424
+ * end-user client, not a management scope: it is delivered as the
1425
+ * `__nextgen_session` cookie and authorises the self-service operations
1426
+ * `GET /sessions/me` and `DELETE /sessions/me` (`nextgenSession` scheme). The
1427
+ * by-id operations `GET /sessions/{session_id}` and `DELETE /sessions/{session_id}`
1428
+ * are operator endpoints and require `session.read` / `session.delete` instead.
1429
+ *
1430
+ * The `session_token` is superseded when a handoff exchange completes — clients must
1431
+ * replace it at that point.
1432
+ *
1433
+ * Anonymous sessions expire aggressively (10-minute TTL). The TTL resets to the configured
1434
+ * full session TTL when the first authentication factor is written via a completing `auth_attempt`.
1009
1435
  * @summary Create an anonymous session shell
1010
1436
  */
1011
- export const createSession = async (
1012
- createSessionBody: CreateSessionBody,
1013
- options?: RequestInit,
1014
- ): Promise<CreateSession201> => {
1015
- return customFetch<CreateSession201>(getCreateSessionUrl(), {
1437
+ export const createSession = async (createSessionBody: CreateSessionBody, options?: Parameters<typeof customFetch>[1]): Promise<CreateSession201> => {
1438
+
1439
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
1440
+ if (!h) return {};
1441
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
1442
+ if (Symbol.iterator in h) {
1443
+ return Object.fromEntries(
1444
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
1445
+ );
1446
+ }
1447
+ const headers: Record<string, string | readonly string[]> = {};
1448
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
1449
+ if (value !== undefined) headers[name] = value;
1450
+ }
1451
+ return headers;
1452
+ };
1453
+ return customFetch<CreateSession201>(getCreateSessionUrl(),
1454
+ {
1016
1455
  ...options,
1017
- method: "POST",
1018
- headers: { "Content-Type": "application/json", ...options?.headers },
1019
- body: JSON.stringify(createSessionBody),
1020
- });
1021
- };
1456
+ method: 'POST',
1457
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
1458
+ body: JSON.stringify(createSessionBody)
1459
+ }
1460
+ );}
1461
+
1462
+
1022
1463
 
1023
- export const getQuerySessionsUrl = (params: QuerySessionsParams) => {
1464
+ export const getQuerySessionsUrl = (params: QuerySessionsParams,) => {
1024
1465
  const normalizedParams = new URLSearchParams();
1025
1466
 
1026
1467
  Object.entries(params || {}).forEach(([key, value]) => {
1468
+
1027
1469
  if (value !== undefined) {
1028
- normalizedParams.append(key, value === null ? "null" : value.toString());
1470
+ normalizedParams.append(key, value === null ? 'null' : String(value))
1029
1471
  }
1030
1472
  });
1031
1473
 
1032
1474
  const stringifiedParams = normalizedParams.toString();
1033
1475
 
1034
- return stringifiedParams.length > 0
1035
- ? `${getProxyPath()}/sessions/query?${stringifiedParams}`
1036
- : `${getProxyPath()}/sessions/query`;
1037
- };
1476
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/sessions/query?${stringifiedParams}` : `${getProxyPath()}/sessions/query`
1477
+ }
1038
1478
 
1039
1479
  /**
1040
1480
  * Returns the sessions of a project, paginated with a cursor.
1041
- Sessions of every lifecycle state are returned; each carries its `state`.
1042
- Requires `session.read` permission.
1043
-
1481
+ * Sessions of every lifecycle state are returned; each carries its `state`.
1482
+ * Requires `session.read` permission.
1044
1483
  * @summary Query sessions
1045
1484
  */
1046
- export const querySessions = async (
1047
- querySessionsBody: QuerySessionsBody,
1048
- params: QuerySessionsParams,
1049
- options?: RequestInit,
1050
- ): Promise<QuerySessions200> => {
1051
- return customFetch<QuerySessions200>(getQuerySessionsUrl(params), {
1485
+ export const querySessions = async (querySessionsBody: QuerySessionsBody,
1486
+ params: QuerySessionsParams, options?: Parameters<typeof customFetch>[1]): Promise<QuerySessions200> => {
1487
+
1488
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
1489
+ if (!h) return {};
1490
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
1491
+ if (Symbol.iterator in h) {
1492
+ return Object.fromEntries(
1493
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
1494
+ );
1495
+ }
1496
+ const headers: Record<string, string | readonly string[]> = {};
1497
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
1498
+ if (value !== undefined) headers[name] = value;
1499
+ }
1500
+ return headers;
1501
+ };
1502
+ return customFetch<QuerySessions200>(getQuerySessionsUrl(params),
1503
+ {
1052
1504
  ...options,
1053
- method: "POST",
1054
- headers: { "Content-Type": "application/json", ...options?.headers },
1055
- body: JSON.stringify(querySessionsBody),
1056
- });
1057
- };
1505
+ method: 'POST',
1506
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
1507
+ body: JSON.stringify(querySessionsBody)
1508
+ }
1509
+ );}
1058
1510
 
1059
- export const getExchangeHandoffUrl = (params: ExchangeHandoffParams) => {
1511
+
1512
+
1513
+ export const getExchangeHandoffUrl = (params: ExchangeHandoffParams,) => {
1060
1514
  const normalizedParams = new URLSearchParams();
1061
1515
 
1062
1516
  Object.entries(params || {}).forEach(([key, value]) => {
1517
+
1063
1518
  if (value !== undefined) {
1064
- normalizedParams.append(key, value === null ? "null" : value.toString());
1519
+ normalizedParams.append(key, value === null ? 'null' : String(value))
1065
1520
  }
1066
1521
  });
1067
1522
 
1068
1523
  const stringifiedParams = normalizedParams.toString();
1069
1524
 
1070
- return stringifiedParams.length > 0
1071
- ? `${getProxyPath()}/sessions/exchange?${stringifiedParams}`
1072
- : `${getProxyPath()}/sessions/exchange`;
1073
- };
1525
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/sessions/exchange?${stringifiedParams}` : `${getProxyPath()}/sessions/exchange`
1526
+ }
1074
1527
 
1075
1528
  /**
1076
1529
  * Consumes a one-time `handoff_token` minted by `POST /auth_attempts/{id}/handoff`
1077
- and returns the resulting session and a `session_token`.
1530
+ * and returns the resulting session and a `session_token`.
1531
+ *
1532
+ * The server resolves the originating `auth_attempt` from the token and then:
1533
+ *
1534
+ * | Originating auth_attempt | Outcome |
1535
+ * |---|---|
1536
+ * | No `session_id` | A new authenticated session is **created**. |
1537
+ * | `session_id` points to an anonymous shell | Existing session is **upgraded** — user and factors written in, TTL reset to full session TTL. |
1538
+ * | `session_id` points to an active session (step-up) | Existing session is **upgraded** — new factors merged, `assurance_levels[]` expanded. |
1539
+ *
1540
+ * The response shape is identical in all three cases.
1541
+ *
1542
+ * The `session_token` supersedes any previously issued `session_token` for the same session.
1543
+ * Clients must replace their stored token at this point.
1544
+ *
1545
+ * Requires a project service key (OAuth2 client credentials).
1546
+ * @summary Exchange handoff token for a session
1547
+ */
1548
+ export const exchangeHandoff = async (exchangeHandoffBody: ExchangeHandoffBody,
1549
+ params: ExchangeHandoffParams, options?: Parameters<typeof customFetch>[1]): Promise<ExchangeHandoff200> => {
1078
1550
 
1079
- The server resolves the originating `auth_attempt` from the token and then:
1551
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
1552
+ if (!h) return {};
1553
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
1554
+ if (Symbol.iterator in h) {
1555
+ return Object.fromEntries(
1556
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
1557
+ );
1558
+ }
1559
+ const headers: Record<string, string | readonly string[]> = {};
1560
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
1561
+ if (value !== undefined) headers[name] = value;
1562
+ }
1563
+ return headers;
1564
+ };
1565
+ return customFetch<ExchangeHandoff200>(getExchangeHandoffUrl(params),
1566
+ {
1567
+ ...options,
1568
+ method: 'POST',
1569
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
1570
+ body: JSON.stringify(exchangeHandoffBody)
1571
+ }
1572
+ );}
1080
1573
 
1081
- | Originating auth_attempt | Outcome |
1082
- |---|---|
1083
- | No `session_id` | A new authenticated session is **created**. |
1084
- | `session_id` points to an anonymous shell | Existing session is **upgraded** — user and factors written in, TTL reset to full session TTL. |
1085
- | `session_id` points to an active session (step-up) | Existing session is **upgraded** — new factors merged, `assurance_levels[]` expanded. |
1086
1574
 
1087
- The response shape is identical in all three cases.
1088
1575
 
1089
- The `session_token` supersedes any previously issued `session_token` for the same session.
1090
- Clients must replace their stored token at this point.
1576
+ export const getGetSessionUrl = (sessionId: string,) => {
1091
1577
 
1092
- Requires a project service key (OAuth2 client credentials).
1093
1578
 
1094
- * @summary Exchange handoff token for a session
1095
- */
1096
- export const exchangeHandoff = async (
1097
- exchangeHandoffBody: ExchangeHandoffBody,
1098
- params: ExchangeHandoffParams,
1099
- options?: RequestInit,
1100
- ): Promise<ExchangeHandoff200> => {
1101
- return customFetch<ExchangeHandoff200>(getExchangeHandoffUrl(params), {
1102
- ...options,
1103
- method: "POST",
1104
- headers: { "Content-Type": "application/json", ...options?.headers },
1105
- body: JSON.stringify(exchangeHandoffBody),
1106
- });
1107
- };
1108
1579
 
1109
- export const getGetSessionUrl = (sessionId: string) => {
1110
- return `${getProxyPath()}/sessions/${sessionId}`;
1111
- };
1580
+
1581
+ return `${getProxyPath()}/sessions/${encodeURIComponent(String(sessionId))}`
1582
+ }
1112
1583
 
1113
1584
  /**
1114
1585
  * Returns the current state of a session including its factors and all currently
1115
- satisfied assurance levels.
1116
-
1117
- `assurance_levels[]` may shrink over time as factor freshness windows expire,
1118
- without the session itself expiring. Use step-up authentication (a new `auth_attempt`
1119
- against the same `session_id`) to restore a dropped assurance level.
1120
-
1586
+ * satisfied assurance levels.
1587
+ *
1588
+ * `assurance_levels[]` may shrink over time as factor freshness windows expire,
1589
+ * without the session itself expiring. Use step-up authentication (a new `auth_attempt`
1590
+ * against the same `session_id`) to restore a dropped assurance level.
1121
1591
  * @summary Get session state
1122
1592
  */
1123
- export const getSession = async (
1124
- sessionId: string,
1125
- options?: RequestInit,
1126
- ): Promise<GetSession200> => {
1127
- return customFetch<GetSession200>(getGetSessionUrl(sessionId), {
1593
+ export const getSession = async (sessionId: string, options?: Parameters<typeof customFetch>[1]): Promise<GetSession200> => {
1594
+
1595
+ return customFetch<GetSession200>(getGetSessionUrl(sessionId),
1596
+ {
1128
1597
  ...options,
1129
- method: "GET",
1130
- });
1131
- };
1598
+ method: 'GET'
1132
1599
 
1133
- export const getRevokeSessionUrl = (sessionId: string) => {
1134
- return `${getProxyPath()}/sessions/${sessionId}`;
1135
- };
1136
1600
 
1137
- /**
1138
- * Permanently deletes the session, terminating it immediately.
1601
+ }
1602
+ );}
1603
+
1604
+
1605
+
1606
+ export const getRevokeSessionUrl = (sessionId: string,) => {
1607
+
1139
1608
 
1140
- This is the operator revoke path and requires the `session.delete` scope on a
1141
- project-bound credential. End-user logout with the `__nextgen_session` cookie is
1142
- `DELETE /sessions/me` (`nextgenSession` scheme).
1143
1609
 
1144
- Idempotent: deleting a session that does not exist (or was already deleted)
1145
- still returns 204. After deletion, any tokens derived from the session are
1146
- invalidated.
1147
1610
 
1611
+ return `${getProxyPath()}/sessions/${encodeURIComponent(String(sessionId))}`
1612
+ }
1613
+
1614
+ /**
1615
+ * Permanently deletes the session, terminating it immediately.
1616
+ *
1617
+ * This is the operator revoke path and requires the `session.delete` scope on a
1618
+ * project-bound credential. End-user logout with the `__nextgen_session` cookie is
1619
+ * `DELETE /sessions/me` (`nextgenSession` scheme).
1620
+ *
1621
+ * Idempotent: deleting a session that does not exist (or was already deleted)
1622
+ * still returns 204. After deletion, any tokens derived from the session are
1623
+ * invalidated.
1148
1624
  * @summary Revoke session
1149
1625
  */
1150
- export const revokeSession = async (sessionId: string, options?: RequestInit): Promise<void> => {
1151
- return customFetch<void>(getRevokeSessionUrl(sessionId), {
1626
+ export const revokeSession = async (sessionId: string, options?: Parameters<typeof customFetch>[1]): Promise<void> => {
1627
+
1628
+ return customFetch<void>(getRevokeSessionUrl(sessionId),
1629
+ {
1152
1630
  ...options,
1153
- method: "DELETE",
1154
- });
1155
- };
1631
+ method: 'DELETE'
1632
+
1633
+
1634
+ }
1635
+ );}
1636
+
1637
+
1156
1638
 
1157
1639
  export const getGetMySessionUrl = () => {
1158
- return `${getProxyPath()}/sessions/me`;
1159
- };
1160
1640
 
1161
- /**
1162
- * Returns the current state of the current session including its factors and all currently
1163
- satisfied assurance levels.
1164
1641
 
1165
- `assurance_levels[]` may shrink over time as factor freshness windows expire,
1166
- without the session itself expiring. Use step-up authentication (a new `auth_attempt`
1167
- against the same `session_id`) to restore a dropped assurance level.
1168
1642
 
1643
+
1644
+ return `${getProxyPath()}/sessions/me`
1645
+ }
1646
+
1647
+ /**
1648
+ * Returns the current state of the current session including its factors and all currently
1649
+ * satisfied assurance levels.
1650
+ *
1651
+ * `assurance_levels[]` may shrink over time as factor freshness windows expire,
1652
+ * without the session itself expiring. Use step-up authentication (a new `auth_attempt`
1653
+ * against the same `session_id`) to restore a dropped assurance level.
1169
1654
  * @summary Get my session state
1170
1655
  */
1171
- export const getMySession = async (options?: RequestInit): Promise<GetMySession200> => {
1172
- return customFetch<GetMySession200>(getGetMySessionUrl(), {
1656
+ export const getMySession = async ( options?: Parameters<typeof customFetch>[1]): Promise<GetMySession200> => {
1657
+
1658
+ return customFetch<GetMySession200>(getGetMySessionUrl(),
1659
+ {
1173
1660
  ...options,
1174
- method: "GET",
1175
- });
1176
- };
1661
+ method: 'GET'
1662
+
1663
+
1664
+ }
1665
+ );}
1666
+
1667
+
1177
1668
 
1178
1669
  export const getRevokeMySessionUrl = () => {
1179
- return `${getProxyPath()}/sessions/me`;
1180
- };
1670
+
1671
+
1672
+
1673
+
1674
+ return `${getProxyPath()}/sessions/me`
1675
+ }
1181
1676
 
1182
1677
  /**
1183
1678
  * Logs out by permanently deleting the session.
1679
+ *
1680
+ * The `__nextgen_session` cookie issued at creation (or superseded by a handoff
1681
+ * exchange) is required. Idempotent: if the session is already gone this still
1682
+ * returns 204. Any tokens derived from the session are invalidated, and the
1683
+ * cookie itself is cleared in the response.
1684
+ * @summary Revoke my session
1685
+ */
1686
+ export const revokeMySession = async ( options?: Parameters<typeof customFetch>[1]): Promise<void> => {
1687
+
1688
+ return customFetch<void>(getRevokeMySessionUrl(),
1689
+ {
1690
+ ...options,
1691
+ method: 'DELETE'
1184
1692
 
1185
- The `__nextgen_session` cookie issued at creation (or superseded by a handoff
1186
- exchange) is required. Idempotent: if the session is already gone this still
1187
- returns 204. Any tokens derived from the session are invalidated, and the
1188
- cookie itself is cleared in the response.
1189
1693
 
1190
- * @summary Revoke my session
1694
+ }
1695
+ );}
1696
+
1697
+
1698
+
1699
+ export const getGetMySessionCsrfTokenUrl = () => {
1700
+
1701
+
1702
+
1703
+
1704
+ return `${getProxyPath()}/sessions/me/csrf`
1705
+ }
1706
+
1707
+ /**
1708
+ * Returns the session-bound token for cross-site request forgery protection
1709
+ * (ADR 053 §5). Browser code sends it in the `X-Zitadel-CSRF` header on the
1710
+ * state-changing requests the session cookie authenticates that require it
1711
+ * — see the `nextgenSession` scheme. It authorizes nothing on its own: the
1712
+ * HttpOnly cookie is still the credential, and a cross-site page cannot
1713
+ * read this response. It stays the same for the life of the session, so a
1714
+ * client fetches it once per session.
1715
+ * @summary Get my session's CSRF token
1191
1716
  */
1192
- export const revokeMySession = async (options?: RequestInit): Promise<void> => {
1193
- return customFetch<void>(getRevokeMySessionUrl(), {
1717
+ export const getMySessionCsrfToken = async ( options?: Parameters<typeof customFetch>[1]): Promise<GetMySessionCsrfToken200> => {
1718
+
1719
+ return customFetch<GetMySessionCsrfToken200>(getGetMySessionCsrfTokenUrl(),
1720
+ {
1194
1721
  ...options,
1195
- method: "DELETE",
1196
- });
1197
- };
1722
+ method: 'GET'
1723
+
1724
+
1725
+ }
1726
+ );}
1727
+
1198
1728
 
1199
- export const getCreateSchemaUrl = (params: CreateSchemaParams) => {
1729
+
1730
+ export const getCreateSchemaUrl = (params: CreateSchemaParams,) => {
1200
1731
  const normalizedParams = new URLSearchParams();
1201
1732
 
1202
1733
  Object.entries(params || {}).forEach(([key, value]) => {
1734
+
1203
1735
  if (value !== undefined) {
1204
- normalizedParams.append(key, value === null ? "null" : value.toString());
1736
+ normalizedParams.append(key, value === null ? 'null' : String(value))
1205
1737
  }
1206
1738
  });
1207
1739
 
1208
1740
  const stringifiedParams = normalizedParams.toString();
1209
1741
 
1210
- return stringifiedParams.length > 0
1211
- ? `${getProxyPath()}/schemas?${stringifiedParams}`
1212
- : `${getProxyPath()}/schemas`;
1213
- };
1742
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/schemas?${stringifiedParams}` : `${getProxyPath()}/schemas`
1743
+ }
1214
1744
 
1215
1745
  /**
1216
1746
  * Create a new schema. The optional `$id` field is the JSON Schema document
1217
- URI used to identify the schema in future requests (GitOps-stable identity,
1218
- not a free-form resource primary key). When `$id` is omitted, the server
1219
- generates a `sch_*` URL. When provided, `$id` must be unique within the
1220
- project and should ideally be a valid URI pointing at where the schema can
1221
- be accessed.
1222
-
1223
- The schema can either be a concrete schema, e.g. a user schema, or a
1224
- schema-url which will be resolved by the server.
1225
-
1747
+ * URI used to identify the schema in future requests (GitOps-stable identity,
1748
+ * not a free-form resource primary key). When `$id` is omitted, the server
1749
+ * generates a `sch_*` URL. When provided, `$id` must be unique within the
1750
+ * project and should ideally be a valid URI pointing at where the schema can
1751
+ * be accessed.
1752
+ *
1753
+ * The schema can either be a concrete schema, e.g. a user schema, or a
1754
+ * schema-url which will be resolved by the server.
1226
1755
  * @summary Create new schema
1227
1756
  */
1228
- export const createSchema = async (
1229
- createSchemaBody: CreateSchemaBody,
1230
- params: CreateSchemaParams,
1231
- options?: RequestInit,
1232
- ): Promise<CreateSchema201> => {
1233
- return customFetch<CreateSchema201>(getCreateSchemaUrl(params), {
1757
+ export const createSchema = async (createSchemaBody: CreateSchemaBody,
1758
+ params: CreateSchemaParams, options?: Parameters<typeof customFetch>[1]): Promise<CreateSchema201> => {
1759
+
1760
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
1761
+ if (!h) return {};
1762
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
1763
+ if (Symbol.iterator in h) {
1764
+ return Object.fromEntries(
1765
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
1766
+ );
1767
+ }
1768
+ const headers: Record<string, string | readonly string[]> = {};
1769
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
1770
+ if (value !== undefined) headers[name] = value;
1771
+ }
1772
+ return headers;
1773
+ };
1774
+ return customFetch<CreateSchema201>(getCreateSchemaUrl(params),
1775
+ {
1234
1776
  ...options,
1235
- method: "POST",
1236
- headers: { "Content-Type": "application/json", ...options?.headers },
1237
- body: JSON.stringify(createSchemaBody),
1238
- });
1239
- };
1777
+ method: 'POST',
1778
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
1779
+ body: JSON.stringify(createSchemaBody)
1780
+ }
1781
+ );}
1782
+
1240
1783
 
1241
- export const getListSchemasUrl = (params: ListSchemasParams) => {
1784
+
1785
+ export const getListSchemasUrl = (params: ListSchemasParams,) => {
1242
1786
  const normalizedParams = new URLSearchParams();
1243
1787
 
1244
1788
  Object.entries(params || {}).forEach(([key, value]) => {
1789
+
1245
1790
  if (value !== undefined) {
1246
- normalizedParams.append(key, value === null ? "null" : value.toString());
1791
+ normalizedParams.append(key, value === null ? 'null' : String(value))
1247
1792
  }
1248
1793
  });
1249
1794
 
1250
1795
  const stringifiedParams = normalizedParams.toString();
1251
1796
 
1252
- return stringifiedParams.length > 0
1253
- ? `${getProxyPath()}/schemas?${stringifiedParams}`
1254
- : `${getProxyPath()}/schemas`;
1255
- };
1797
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/schemas?${stringifiedParams}` : `${getProxyPath()}/schemas`
1798
+ }
1256
1799
 
1257
1800
  /**
1258
1801
  * Retrieve a list of all schemas available in the system. This endpoint
1259
- supports pagination and filtering based on schema attributes.
1260
-
1802
+ * supports pagination and filtering based on schema attributes.
1261
1803
  * @summary List all schemas
1262
1804
  */
1263
- export const listSchemas = async (
1264
- params: ListSchemasParams,
1265
- options?: RequestInit,
1266
- ): Promise<ListSchemas200> => {
1267
- return customFetch<ListSchemas200>(getListSchemasUrl(params), {
1805
+ export const listSchemas = async (params: ListSchemasParams, options?: Parameters<typeof customFetch>[1]): Promise<ListSchemas200> => {
1806
+
1807
+ return customFetch<ListSchemas200>(getListSchemasUrl(params),
1808
+ {
1268
1809
  ...options,
1269
- method: "GET",
1270
- });
1271
- };
1810
+ method: 'GET'
1811
+
1812
+
1813
+ }
1814
+ );}
1815
+
1816
+
1272
1817
 
1273
- export const getGetSchemaByIdUrl = (id: string, params?: GetSchemaByIdParams) => {
1818
+ export const getGetSchemaByIdUrl = (id: string,
1819
+ params?: GetSchemaByIdParams,) => {
1274
1820
  const normalizedParams = new URLSearchParams();
1275
1821
 
1276
1822
  Object.entries(params || {}).forEach(([key, value]) => {
1823
+
1277
1824
  if (value !== undefined) {
1278
- normalizedParams.append(key, value === null ? "null" : value.toString());
1825
+ normalizedParams.append(key, value === null ? 'null' : String(value))
1279
1826
  }
1280
1827
  });
1281
1828
 
1282
1829
  const stringifiedParams = normalizedParams.toString();
1283
1830
 
1284
- return stringifiedParams.length > 0
1285
- ? `${getProxyPath()}/schemas/${id}?${stringifiedParams}`
1286
- : `${getProxyPath()}/schemas/${id}`;
1287
- };
1831
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/schemas/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getProxyPath()}/schemas/${encodeURIComponent(String(id))}`
1832
+ }
1288
1833
 
1289
1834
  /**
1290
1835
  * Get a schema by its ID. A schema ID identifies one immutable revision, so
1291
- this returns exactly that revision. To find the current revision of an
1292
- object type, list with `revisions=latest`.
1293
-
1836
+ * this returns exactly that revision. To find the current revision of an
1837
+ * object type, list with `revisions=latest`.
1838
+ *
1839
+ * Schema IDs are unique within a project, not across projects (the seeded
1840
+ * default schema carries the same `$id` in every project). A Console
1841
+ * session that manages more than one project names the project with
1842
+ * `project_id`; without it, the ID is resolved in the credential's own
1843
+ * project when it is ambiguous. A project secret always resolves in its
1844
+ * own project and ignores `project_id`.
1294
1845
  * @summary Get schema by ID
1295
1846
  */
1296
- export const getSchemaById = async (
1297
- id: string,
1298
- params?: GetSchemaByIdParams,
1299
- options?: RequestInit,
1300
- ): Promise<GetSchemaById200> => {
1301
- return customFetch<GetSchemaById200>(getGetSchemaByIdUrl(id, params), {
1847
+ export const getSchemaById = async (id: string,
1848
+ params?: GetSchemaByIdParams, options?: Parameters<typeof customFetch>[1]): Promise<GetSchemaById200> => {
1849
+
1850
+ return customFetch<GetSchemaById200>(getGetSchemaByIdUrl(id,params),
1851
+ {
1302
1852
  ...options,
1303
- method: "GET",
1304
- });
1305
- };
1853
+ method: 'GET'
1854
+
1855
+
1856
+ }
1857
+ );}
1858
+
1859
+
1306
1860
 
1307
1861
  export const getCreateFlowDefinitionUrl = () => {
1308
- return `${getProxyPath()}/flow_definitions`;
1309
- };
1310
1862
 
1311
- /**
1312
- * Publishes a new flow definition revision.
1313
- Flow definitions are templates that define the sequence of steps (capabilities)
1314
- for a particular user journey (e.g., registration, login, password reset).
1315
1863
 
1316
- Flow definitions are created based on the flow definition schema, which includes the flow's purpose, audience, and the steps involved.
1317
1864
 
1318
- Every call allocates a new opaque id. Revisions of one flow share its
1319
- `name`; posting a definition under an existing `name` publishes a new
1320
- revision of that flow, it is not a conflict. List with `name` to see a
1321
- flow's revisions, newest by creation time first.
1322
1865
 
1866
+ return `${getProxyPath()}/flow_definitions`
1867
+ }
1868
+
1869
+ /**
1870
+ * Publishes a new flow definition revision.
1871
+ * Flow definitions are templates that define the sequence of steps (capabilities)
1872
+ * for a particular user journey (e.g., registration, login, password reset).
1873
+ *
1874
+ * Flow definitions are created based on the flow definition schema, which includes the flow's purpose, audience, and the steps involved.
1875
+ *
1876
+ * Every call allocates a new opaque id. Revisions of one flow share its
1877
+ * `name`; posting a definition under an existing `name` publishes a new
1878
+ * revision of that flow, it is not a conflict. List with `name` to see a
1879
+ * flow's revisions, newest by creation time first.
1323
1880
  * @summary Create a new flow definition
1324
1881
  */
1325
- export const createFlowDefinition = async (
1326
- createFlowDefinitionBody: CreateFlowDefinitionBody,
1327
- options?: RequestInit,
1328
- ): Promise<CreateFlowDefinition201> => {
1329
- return customFetch<CreateFlowDefinition201>(getCreateFlowDefinitionUrl(), {
1882
+ export const createFlowDefinition = async (createFlowDefinitionBody: CreateFlowDefinitionBody, options?: Parameters<typeof customFetch>[1]): Promise<CreateFlowDefinition201> => {
1883
+
1884
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
1885
+ if (!h) return {};
1886
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
1887
+ if (Symbol.iterator in h) {
1888
+ return Object.fromEntries(
1889
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
1890
+ );
1891
+ }
1892
+ const headers: Record<string, string | readonly string[]> = {};
1893
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
1894
+ if (value !== undefined) headers[name] = value;
1895
+ }
1896
+ return headers;
1897
+ };
1898
+ return customFetch<CreateFlowDefinition201>(getCreateFlowDefinitionUrl(),
1899
+ {
1330
1900
  ...options,
1331
- method: "POST",
1332
- headers: { "Content-Type": "application/json", ...options?.headers },
1333
- body: JSON.stringify(createFlowDefinitionBody),
1334
- });
1335
- };
1901
+ method: 'POST',
1902
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
1903
+ body: JSON.stringify(createFlowDefinitionBody)
1904
+ }
1905
+ );}
1906
+
1336
1907
 
1337
- export const getListFlowDefinitionsUrl = (params: ListFlowDefinitionsParams) => {
1908
+
1909
+ export const getListFlowDefinitionsUrl = (params: ListFlowDefinitionsParams,) => {
1338
1910
  const normalizedParams = new URLSearchParams();
1339
1911
 
1340
1912
  Object.entries(params || {}).forEach(([key, value]) => {
1913
+ const explodeParameters = ["expand"];
1914
+
1915
+ if (Array.isArray(value) && explodeParameters.includes(key)) {
1916
+ value.forEach((v) => {
1917
+ normalizedParams.append(key, v === null ? 'null' : String(v));
1918
+ });
1919
+ return;
1920
+ }
1921
+
1341
1922
  if (value !== undefined) {
1342
- normalizedParams.append(key, value === null ? "null" : value.toString());
1923
+ normalizedParams.append(key, value === null ? 'null' : String(value))
1343
1924
  }
1344
1925
  });
1345
1926
 
1346
1927
  const stringifiedParams = normalizedParams.toString();
1347
1928
 
1348
- return stringifiedParams.length > 0
1349
- ? `${getProxyPath()}/flow_definitions?${stringifiedParams}`
1350
- : `${getProxyPath()}/flow_definitions`;
1351
- };
1929
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/flow_definitions?${stringifiedParams}` : `${getProxyPath()}/flow_definitions`
1930
+ }
1352
1931
 
1353
1932
  /**
1354
1933
  * Retrieves a list of all flow definitions, newest by creation time first.
1355
- This endpoint can be used to view existing flow definitions and their configurations.
1356
- Filter by `name` to list the revisions of one flow.
1357
-
1934
+ * This endpoint can be used to view existing flow definitions and their configurations.
1935
+ * Filter by `name` to list the revisions of one flow.
1358
1936
  * @summary List flow definitions
1359
1937
  */
1360
- export const listFlowDefinitions = async (
1361
- params: ListFlowDefinitionsParams,
1362
- options?: RequestInit,
1363
- ): Promise<ListFlowDefinitions200> => {
1364
- return customFetch<ListFlowDefinitions200>(getListFlowDefinitionsUrl(params), {
1938
+ export const listFlowDefinitions = async (params: ListFlowDefinitionsParams, options?: Parameters<typeof customFetch>[1]): Promise<ListFlowDefinitions200> => {
1939
+
1940
+ return customFetch<ListFlowDefinitions200>(getListFlowDefinitionsUrl(params),
1941
+ {
1365
1942
  ...options,
1366
- method: "GET",
1367
- });
1368
- };
1943
+ method: 'GET'
1944
+
1945
+
1946
+ }
1947
+ );}
1369
1948
 
1370
- export const getGetFlowDefinitionUrl = (id: string) => {
1371
- return `${getProxyPath()}/flow_definitions/${id}`;
1372
- };
1949
+
1950
+
1951
+ export const getGetFlowDefinitionUrl = (id: string,) => {
1952
+
1953
+
1954
+
1955
+
1956
+ return `${getProxyPath()}/flow_definitions/${encodeURIComponent(String(id))}`
1957
+ }
1373
1958
 
1374
1959
  /**
1375
1960
  * Get a flow definition by id
1376
1961
  * @summary Get a flow definition by id
1377
1962
  */
1378
- export const getFlowDefinition = async (
1379
- id: string,
1380
- options?: RequestInit,
1381
- ): Promise<GetFlowDefinition200> => {
1382
- return customFetch<GetFlowDefinition200>(getGetFlowDefinitionUrl(id), {
1963
+ export const getFlowDefinition = async (id: string, options?: Parameters<typeof customFetch>[1]): Promise<GetFlowDefinition200> => {
1964
+
1965
+ return customFetch<GetFlowDefinition200>(getGetFlowDefinitionUrl(id),
1966
+ {
1383
1967
  ...options,
1384
- method: "GET",
1385
- });
1386
- };
1968
+ method: 'GET'
1387
1969
 
1388
- export const getCreateTeamUrl = (params: CreateTeamParams) => {
1970
+
1971
+ }
1972
+ );}
1973
+
1974
+
1975
+
1976
+ export const getCreateTeamUrl = (params: CreateTeamParams,) => {
1389
1977
  const normalizedParams = new URLSearchParams();
1390
1978
 
1391
1979
  Object.entries(params || {}).forEach(([key, value]) => {
1980
+
1392
1981
  if (value !== undefined) {
1393
- normalizedParams.append(key, value === null ? "null" : value.toString());
1982
+ normalizedParams.append(key, value === null ? 'null' : String(value))
1394
1983
  }
1395
1984
  });
1396
1985
 
1397
1986
  const stringifiedParams = normalizedParams.toString();
1398
1987
 
1399
- return stringifiedParams.length > 0
1400
- ? `${getProxyPath()}/teams?${stringifiedParams}`
1401
- : `${getProxyPath()}/teams`;
1402
- };
1988
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/teams?${stringifiedParams}` : `${getProxyPath()}/teams`
1989
+ }
1403
1990
 
1404
1991
  /**
1405
1992
  * @summary Create team
1406
1993
  */
1407
- export const createTeam = async (
1408
- createTeamBody: CreateTeamBody,
1409
- params: CreateTeamParams,
1410
- options?: RequestInit,
1411
- ): Promise<CreateTeam201> => {
1412
- return customFetch<CreateTeam201>(getCreateTeamUrl(params), {
1994
+ export const createTeam = async (createTeamBody: CreateTeamBody,
1995
+ params: CreateTeamParams, options?: Parameters<typeof customFetch>[1]): Promise<CreateTeam201> => {
1996
+
1997
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
1998
+ if (!h) return {};
1999
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
2000
+ if (Symbol.iterator in h) {
2001
+ return Object.fromEntries(
2002
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
2003
+ );
2004
+ }
2005
+ const headers: Record<string, string | readonly string[]> = {};
2006
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
2007
+ if (value !== undefined) headers[name] = value;
2008
+ }
2009
+ return headers;
2010
+ };
2011
+ return customFetch<CreateTeam201>(getCreateTeamUrl(params),
2012
+ {
1413
2013
  ...options,
1414
- method: "POST",
1415
- headers: { "Content-Type": "application/json", ...options?.headers },
1416
- body: JSON.stringify(createTeamBody),
1417
- });
1418
- };
2014
+ method: 'POST',
2015
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
2016
+ body: JSON.stringify(createTeamBody)
2017
+ }
2018
+ );}
1419
2019
 
1420
- export const getQueryTeamsUrl = (params: QueryTeamsParams) => {
2020
+
2021
+
2022
+ export const getQueryTeamsUrl = (params: QueryTeamsParams,) => {
1421
2023
  const normalizedParams = new URLSearchParams();
1422
2024
 
1423
2025
  Object.entries(params || {}).forEach(([key, value]) => {
2026
+
1424
2027
  if (value !== undefined) {
1425
- normalizedParams.append(key, value === null ? "null" : value.toString());
2028
+ normalizedParams.append(key, value === null ? 'null' : String(value))
1426
2029
  }
1427
2030
  });
1428
2031
 
1429
2032
  const stringifiedParams = normalizedParams.toString();
1430
2033
 
1431
- return stringifiedParams.length > 0
1432
- ? `${getProxyPath()}/teams/query?${stringifiedParams}`
1433
- : `${getProxyPath()}/teams/query`;
1434
- };
2034
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/teams/query?${stringifiedParams}` : `${getProxyPath()}/teams/query`
2035
+ }
1435
2036
 
1436
2037
  /**
1437
2038
  * Returns the teams of a project, paginated with a cursor.
1438
-
1439
2039
  * @summary Query teams
1440
2040
  */
1441
- export const queryTeams = async (
1442
- queryTeamsBody: QueryTeamsBody,
1443
- params: QueryTeamsParams,
1444
- options?: RequestInit,
1445
- ): Promise<QueryTeams200> => {
1446
- return customFetch<QueryTeams200>(getQueryTeamsUrl(params), {
2041
+ export const queryTeams = async (queryTeamsBody: QueryTeamsBody,
2042
+ params: QueryTeamsParams, options?: Parameters<typeof customFetch>[1]): Promise<QueryTeams200> => {
2043
+
2044
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
2045
+ if (!h) return {};
2046
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
2047
+ if (Symbol.iterator in h) {
2048
+ return Object.fromEntries(
2049
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
2050
+ );
2051
+ }
2052
+ const headers: Record<string, string | readonly string[]> = {};
2053
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
2054
+ if (value !== undefined) headers[name] = value;
2055
+ }
2056
+ return headers;
2057
+ };
2058
+ return customFetch<QueryTeams200>(getQueryTeamsUrl(params),
2059
+ {
1447
2060
  ...options,
1448
- method: "POST",
1449
- headers: { "Content-Type": "application/json", ...options?.headers },
1450
- body: JSON.stringify(queryTeamsBody),
1451
- });
1452
- };
2061
+ method: 'POST',
2062
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
2063
+ body: JSON.stringify(queryTeamsBody)
2064
+ }
2065
+ );}
2066
+
1453
2067
 
1454
- export const getGetTeamUrl = (teamId: string) => {
1455
- return `${getProxyPath()}/teams/${teamId}`;
1456
- };
2068
+
2069
+ export const getGetTeamUrl = (teamId: string,) => {
2070
+
2071
+
2072
+
2073
+
2074
+ return `${getProxyPath()}/teams/${encodeURIComponent(String(teamId))}`
2075
+ }
1457
2076
 
1458
2077
  /**
1459
2078
  * Returns a Team by its id.
1460
-
1461
2079
  * @summary Get team
1462
2080
  */
1463
- export const getTeam = async (teamId: string, options?: RequestInit): Promise<GetTeam200> => {
1464
- return customFetch<GetTeam200>(getGetTeamUrl(teamId), {
2081
+ export const getTeam = async (teamId: string, options?: Parameters<typeof customFetch>[1]): Promise<GetTeam200> => {
2082
+
2083
+ return customFetch<GetTeam200>(getGetTeamUrl(teamId),
2084
+ {
1465
2085
  ...options,
1466
- method: "GET",
1467
- });
1468
- };
2086
+ method: 'GET'
1469
2087
 
1470
- export const getDeleteTeamUrl = (teamId: string) => {
1471
- return `${getProxyPath()}/teams/${teamId}`;
1472
- };
1473
2088
 
1474
- /**
1475
- * Deactivates the team.
2089
+ }
2090
+ );}
2091
+
2092
+
2093
+
2094
+ export const getDeleteTeamUrl = (teamId: string,) => {
2095
+
1476
2096
 
1477
- The team is tombstoned rather than erased: it stays readable through
1478
- getTeam with status `deactivated`. Its memberships are removed and the
1479
- users whose lifecycle it owns are deactivated with it.
1480
2097
 
1481
- The request is idempotent. Deleting a team that is already deactivated
1482
- or doesn't exist succeeds without changing anything.
1483
2098
 
1484
- A team that still owns a project is refused with `409
1485
- team.owns_project`: deactivating it would leave the project owned by a
1486
- dead team and so unmanageable. No endpoint releases that ownership yet,
1487
- so such a team cannot currently be deactivated through the API.
2099
+ return `${getProxyPath()}/teams/${encodeURIComponent(String(teamId))}`
2100
+ }
1488
2101
 
2102
+ /**
2103
+ * Deactivates the team.
2104
+ *
2105
+ * The team is tombstoned rather than erased: it stays readable through
2106
+ * getTeam with status `deactivated`. Its memberships are removed and the
2107
+ * users whose lifecycle it owns are deactivated with it.
2108
+ *
2109
+ * The request is idempotent. Deleting a team that is already deactivated
2110
+ * or doesn't exist succeeds without changing anything.
2111
+ *
2112
+ * A team that still owns a project is refused with `409
2113
+ * team.owns_project`: deactivating it would leave the project owned by a
2114
+ * dead team and so unmanageable. No endpoint releases that ownership yet,
2115
+ * so such a team cannot currently be deactivated through the API.
1489
2116
  * @summary Delete team
1490
2117
  */
1491
- export const deleteTeam = async (teamId: string, options?: RequestInit): Promise<void> => {
1492
- return customFetch<void>(getDeleteTeamUrl(teamId), {
2118
+ export const deleteTeam = async (teamId: string, options?: Parameters<typeof customFetch>[1]): Promise<void> => {
2119
+
2120
+ return customFetch<void>(getDeleteTeamUrl(teamId),
2121
+ {
1493
2122
  ...options,
1494
- method: "DELETE",
1495
- });
1496
- };
2123
+ method: 'DELETE'
1497
2124
 
1498
- export const getUpdateTeamUrl = (teamId: string) => {
1499
- return `${getProxyPath()}/teams/${teamId}`;
1500
- };
2125
+
2126
+ }
2127
+ );}
2128
+
2129
+
2130
+
2131
+ export const getUpdateTeamUrl = (teamId: string,) => {
2132
+
2133
+
2134
+
2135
+
2136
+ return `${getProxyPath()}/teams/${encodeURIComponent(String(teamId))}`
2137
+ }
1501
2138
 
1502
2139
  /**
1503
2140
  * Update team. Only active teams can be updated.
1504
-
1505
2141
  * @summary Update team
1506
2142
  */
1507
- export const updateTeam = async (
1508
- teamId: string,
1509
- updateTeamBody: UpdateTeamBody,
1510
- options?: RequestInit,
1511
- ): Promise<UpdateTeam200> => {
1512
- return customFetch<UpdateTeam200>(getUpdateTeamUrl(teamId), {
2143
+ export const updateTeam = async (teamId: string,
2144
+ updateTeamBody: UpdateTeamBody, options?: Parameters<typeof customFetch>[1]): Promise<UpdateTeam200> => {
2145
+
2146
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
2147
+ if (!h) return {};
2148
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
2149
+ if (Symbol.iterator in h) {
2150
+ return Object.fromEntries(
2151
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
2152
+ );
2153
+ }
2154
+ const headers: Record<string, string | readonly string[]> = {};
2155
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
2156
+ if (value !== undefined) headers[name] = value;
2157
+ }
2158
+ return headers;
2159
+ };
2160
+ return customFetch<UpdateTeam200>(getUpdateTeamUrl(teamId),
2161
+ {
1513
2162
  ...options,
1514
- method: "PATCH",
1515
- headers: { "Content-Type": "application/json", ...options?.headers },
1516
- body: JSON.stringify(updateTeamBody),
1517
- });
1518
- };
2163
+ method: 'PATCH',
2164
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
2165
+ body: JSON.stringify(updateTeamBody)
2166
+ }
2167
+ );}
2168
+
1519
2169
 
1520
- export const getListEnvironmentsUrl = (params: ListEnvironmentsParams) => {
2170
+
2171
+ export const getListEnvironmentsUrl = (params: ListEnvironmentsParams,) => {
1521
2172
  const normalizedParams = new URLSearchParams();
1522
2173
 
1523
2174
  Object.entries(params || {}).forEach(([key, value]) => {
2175
+
1524
2176
  if (value !== undefined) {
1525
- normalizedParams.append(key, value === null ? "null" : value.toString());
2177
+ normalizedParams.append(key, value === null ? 'null' : String(value))
1526
2178
  }
1527
2179
  });
1528
2180
 
1529
2181
  const stringifiedParams = normalizedParams.toString();
1530
2182
 
1531
- return stringifiedParams.length > 0
1532
- ? `${getProxyPath()}/environments?${stringifiedParams}`
1533
- : `${getProxyPath()}/environments`;
1534
- };
2183
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/environments?${stringifiedParams}` : `${getProxyPath()}/environments`
2184
+ }
1535
2185
 
1536
2186
  /**
1537
2187
  * Lists the project's environments ordered by name.
1538
-
1539
2188
  * @summary List environments
1540
2189
  */
1541
- export const listEnvironments = async (
1542
- params: ListEnvironmentsParams,
1543
- options?: RequestInit,
1544
- ): Promise<ListEnvironments200> => {
1545
- return customFetch<ListEnvironments200>(getListEnvironmentsUrl(params), {
2190
+ export const listEnvironments = async (params: ListEnvironmentsParams, options?: Parameters<typeof customFetch>[1]): Promise<ListEnvironments200> => {
2191
+
2192
+ return customFetch<ListEnvironments200>(getListEnvironmentsUrl(params),
2193
+ {
1546
2194
  ...options,
1547
- method: "GET",
1548
- });
1549
- };
2195
+ method: 'GET'
2196
+
2197
+
2198
+ }
2199
+ );}
2200
+
2201
+
1550
2202
 
1551
- export const getGetEnvironmentByNameUrl = (name: string, params: GetEnvironmentByNameParams) => {
2203
+ export const getGetEnvironmentByNameUrl = (name: string,
2204
+ params: GetEnvironmentByNameParams,) => {
1552
2205
  const normalizedParams = new URLSearchParams();
1553
2206
 
1554
2207
  Object.entries(params || {}).forEach(([key, value]) => {
2208
+
1555
2209
  if (value !== undefined) {
1556
- normalizedParams.append(key, value === null ? "null" : value.toString());
2210
+ normalizedParams.append(key, value === null ? 'null' : String(value))
1557
2211
  }
1558
2212
  });
1559
2213
 
1560
2214
  const stringifiedParams = normalizedParams.toString();
1561
2215
 
1562
- return stringifiedParams.length > 0
1563
- ? `${getProxyPath()}/environments/${name}?${stringifiedParams}`
1564
- : `${getProxyPath()}/environments/${name}`;
1565
- };
2216
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/environments/${encodeURIComponent(String(name))}?${stringifiedParams}` : `${getProxyPath()}/environments/${encodeURIComponent(String(name))}`
2217
+ }
1566
2218
 
1567
2219
  /**
1568
2220
  * Reads one environment of the project by its name.
1569
-
1570
- The lookup is scoped to the project in `project_id`: a name that exists in
1571
- another project answers `env.not_found` exactly as an unused name does.
1572
-
2221
+ *
2222
+ * The lookup is scoped to the project in `project_id`: a name that exists in
2223
+ * another project answers `env.not_found` exactly as an unused name does.
1573
2224
  * @summary Get an environment by name
1574
2225
  */
1575
- export const getEnvironmentByName = async (
1576
- name: string,
1577
- params: GetEnvironmentByNameParams,
1578
- options?: RequestInit,
1579
- ): Promise<GetEnvironmentByName200> => {
1580
- return customFetch<GetEnvironmentByName200>(getGetEnvironmentByNameUrl(name, params), {
2226
+ export const getEnvironmentByName = async (name: string,
2227
+ params: GetEnvironmentByNameParams, options?: Parameters<typeof customFetch>[1]): Promise<GetEnvironmentByName200> => {
2228
+
2229
+ return customFetch<GetEnvironmentByName200>(getGetEnvironmentByNameUrl(name,params),
2230
+ {
1581
2231
  ...options,
1582
- method: "GET",
1583
- });
1584
- };
2232
+ method: 'GET'
2233
+
2234
+
2235
+ }
2236
+ );}
2237
+
1585
2238
 
1586
- export const getCreateBrandingUrl = (params: CreateBrandingParams) => {
2239
+
2240
+ export const getCreateBrandingUrl = (params: CreateBrandingParams,) => {
1587
2241
  const normalizedParams = new URLSearchParams();
1588
2242
 
1589
2243
  Object.entries(params || {}).forEach(([key, value]) => {
2244
+
1590
2245
  if (value !== undefined) {
1591
- normalizedParams.append(key, value === null ? "null" : value.toString());
2246
+ normalizedParams.append(key, value === null ? 'null' : String(value))
1592
2247
  }
1593
2248
  });
1594
2249
 
1595
2250
  const stringifiedParams = normalizedParams.toString();
1596
2251
 
1597
- return stringifiedParams.length > 0
1598
- ? `${getProxyPath()}/branding?${stringifiedParams}`
1599
- : `${getProxyPath()}/branding`;
1600
- };
2252
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/branding?${stringifiedParams}` : `${getProxyPath()}/branding`
2253
+ }
1601
2254
 
1602
2255
  /**
1603
2256
  * Publishes a new immutable branding revision for the project. Branding
1604
- revisions cannot be updated or deleted; every edit publishes a new
1605
- revision, and flow responses resolve the latest revision per project.
1606
-
1607
- The `liquid_template` is validated lexically on save (size, encoding,
1608
- banned patterns such as `<script>` tags, inline event handlers, and the
1609
- `| raw` filter). Authoritative LiquidJS validation runs at authoring
1610
- time via `zitadel plan` / `zitadel apply`.
1611
-
2257
+ * revisions cannot be updated or deleted; every edit publishes a new
2258
+ * revision, and flow responses resolve the latest revision per project.
2259
+ *
2260
+ * The `liquid_template` is validated lexically on save (size, encoding,
2261
+ * banned patterns such as `<script>` tags, inline event handlers, and the
2262
+ * `| raw` filter). Authoritative LiquidJS validation runs at authoring
2263
+ * time via `zitadel plan` / `zitadel apply`.
1612
2264
  * @summary Publish a new branding revision
1613
2265
  */
1614
- export const createBranding = async (
1615
- createBrandingBody: CreateBrandingBody,
1616
- params: CreateBrandingParams,
1617
- options?: RequestInit,
1618
- ): Promise<CreateBranding201> => {
1619
- return customFetch<CreateBranding201>(getCreateBrandingUrl(params), {
2266
+ export const createBranding = async (createBrandingBody: CreateBrandingBody,
2267
+ params: CreateBrandingParams, options?: Parameters<typeof customFetch>[1]): Promise<CreateBranding201> => {
2268
+
2269
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
2270
+ if (!h) return {};
2271
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
2272
+ if (Symbol.iterator in h) {
2273
+ return Object.fromEntries(
2274
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
2275
+ );
2276
+ }
2277
+ const headers: Record<string, string | readonly string[]> = {};
2278
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
2279
+ if (value !== undefined) headers[name] = value;
2280
+ }
2281
+ return headers;
2282
+ };
2283
+ return customFetch<CreateBranding201>(getCreateBrandingUrl(params),
2284
+ {
1620
2285
  ...options,
1621
- method: "POST",
1622
- headers: { "Content-Type": "application/json", ...options?.headers },
1623
- body: JSON.stringify(createBrandingBody),
1624
- });
1625
- };
2286
+ method: 'POST',
2287
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
2288
+ body: JSON.stringify(createBrandingBody)
2289
+ }
2290
+ );}
1626
2291
 
1627
- export const getListBrandingUrl = (params: ListBrandingParams) => {
2292
+
2293
+
2294
+ export const getListBrandingUrl = (params: ListBrandingParams,) => {
1628
2295
  const normalizedParams = new URLSearchParams();
1629
2296
 
1630
2297
  Object.entries(params || {}).forEach(([key, value]) => {
2298
+
1631
2299
  if (value !== undefined) {
1632
- normalizedParams.append(key, value === null ? "null" : value.toString());
2300
+ normalizedParams.append(key, value === null ? 'null' : String(value))
1633
2301
  }
1634
2302
  });
1635
2303
 
1636
2304
  const stringifiedParams = normalizedParams.toString();
1637
2305
 
1638
- return stringifiedParams.length > 0
1639
- ? `${getProxyPath()}/branding?${stringifiedParams}`
1640
- : `${getProxyPath()}/branding`;
1641
- };
2306
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/branding?${stringifiedParams}` : `${getProxyPath()}/branding`
2307
+ }
1642
2308
 
1643
2309
  /**
1644
2310
  * Lists branding revisions for the project, newest first, capped at the
1645
- 100 most recent. The first entry is the revision flow responses
1646
- currently resolve. Deliberately unpaginated in v1 — list endpoints gain a
1647
- real query mechanism together; advertising pagination parameters the
1648
- server ignores would be worse than none.
1649
-
2311
+ * 100 most recent. The first entry is the revision flow responses
2312
+ * currently resolve. Deliberately unpaginated in v1 — list endpoints gain a
2313
+ * real query mechanism together; advertising pagination parameters the
2314
+ * server ignores would be worse than none.
1650
2315
  * @summary List branding revisions
1651
2316
  */
1652
- export const listBranding = async (
1653
- params: ListBrandingParams,
1654
- options?: RequestInit,
1655
- ): Promise<ListBranding200Item[]> => {
1656
- return customFetch<ListBranding200Item[]>(getListBrandingUrl(params), {
2317
+ export const listBranding = async (params: ListBrandingParams, options?: Parameters<typeof customFetch>[1]): Promise<ListBranding200Item[]> => {
2318
+
2319
+ return customFetch<ListBranding200Item[]>(getListBrandingUrl(params),
2320
+ {
1657
2321
  ...options,
1658
- method: "GET",
1659
- });
1660
- };
2322
+ method: 'GET'
2323
+
2324
+
2325
+ }
2326
+ );}
2327
+
2328
+
2329
+
2330
+ export const getGetBrandingByIdUrl = (id: string,) => {
2331
+
1661
2332
 
1662
- export const getGetBrandingByIdUrl = (id: string) => {
1663
- return `${getProxyPath()}/branding/${id}`;
1664
- };
2333
+
2334
+
2335
+ return `${getProxyPath()}/branding/${encodeURIComponent(String(id))}`
2336
+ }
1665
2337
 
1666
2338
  /**
1667
2339
  * Retrieves a single branding revision, including its stored configuration.
1668
2340
  * @summary Get a branding revision by ID
1669
2341
  */
1670
- export const getBrandingById = async (
1671
- id: string,
1672
- options?: RequestInit,
1673
- ): Promise<GetBrandingById200> => {
1674
- return customFetch<GetBrandingById200>(getGetBrandingByIdUrl(id), {
2342
+ export const getBrandingById = async (id: string, options?: Parameters<typeof customFetch>[1]): Promise<GetBrandingById200> => {
2343
+
2344
+ return customFetch<GetBrandingById200>(getGetBrandingByIdUrl(id),
2345
+ {
1675
2346
  ...options,
1676
- method: "GET",
1677
- });
1678
- };
2347
+ method: 'GET'
2348
+
2349
+
2350
+ }
2351
+ );}
2352
+
2353
+
1679
2354
 
1680
- export const getCreateIdpUrl = (params: CreateIdpParams) => {
2355
+ export const getCreateIdpUrl = (params: CreateIdpParams,) => {
1681
2356
  const normalizedParams = new URLSearchParams();
1682
2357
 
1683
2358
  Object.entries(params || {}).forEach(([key, value]) => {
2359
+
1684
2360
  if (value !== undefined) {
1685
- normalizedParams.append(key, value === null ? "null" : value.toString());
2361
+ normalizedParams.append(key, value === null ? 'null' : String(value))
1686
2362
  }
1687
2363
  });
1688
2364
 
1689
2365
  const stringifiedParams = normalizedParams.toString();
1690
2366
 
1691
- return stringifiedParams.length > 0
1692
- ? `${getProxyPath()}/idps?${stringifiedParams}`
1693
- : `${getProxyPath()}/idps`;
1694
- };
2367
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/idps?${stringifiedParams}` : `${getProxyPath()}/idps`
2368
+ }
1695
2369
 
1696
2370
  /**
1697
2371
  * Creates or revises a connection document. If the slug does not already
1698
- exist, a new connection is created. If a connection with that slug already
1699
- exists, a revision is created.
1700
-
1701
- A revision gets a new `revision_id` and does not modify the connection
1702
- `id`, so identity links that reference the connection keep resolving while
1703
- releases and auth attempts stay pinned to the revision they captured.
1704
-
1705
- Identity fields are fixed for the life of the connection and a revision
1706
- that changes one is rejected: `protocol`, `subject_claim`, and the
1707
- endpoints that name the authority (`issuer` for OIDC, `token_endpoint`
1708
- and `userinfo_endpoint` for OAuth 2.0). Their values decide which provider
1709
- account a stored subject belongs to, so changing one would silently
1710
- repoint existing identities at a different provider.
1711
-
1712
- `subject_claim` is optional for OIDC and required for OAuth 2.0. For an
1713
- OIDC connection, `sub` is used as the default value. If a revision updates
1714
- `subject_claim` to a different value than the one set during creation, the
1715
- request is rejected.
1716
-
1717
- The document is validated against the `idp-connection.json` schema before
1718
- anything is stored.
1719
-
2372
+ * exist, a new connection is created. If a connection with that slug already
2373
+ * exists, a revision is created.
2374
+ *
2375
+ * A revision gets a new `revision_id` and does not modify the connection
2376
+ * `id`, so identity links that reference the connection keep resolving while
2377
+ * releases and auth attempts stay pinned to the revision they captured.
2378
+ *
2379
+ * Identity fields are fixed for the life of the connection and a revision
2380
+ * that changes one is rejected: `protocol`, `subject_claim`, and the
2381
+ * endpoints that name the authority (`issuer` for OIDC, `token_endpoint`
2382
+ * and `userinfo_endpoint` for OAuth 2.0). Their values decide which provider
2383
+ * account a stored subject belongs to, so changing one would silently
2384
+ * repoint existing identities at a different provider.
2385
+ *
2386
+ * `subject_claim` is optional for OIDC and required for OAuth 2.0. For an
2387
+ * OIDC connection, `sub` is used as the default value. If a revision updates
2388
+ * `subject_claim` to a different value than the one set during creation, the
2389
+ * request is rejected.
2390
+ *
2391
+ * The document is validated against the `idp-connection.json` schema before
2392
+ * anything is stored.
1720
2393
  * @summary Create or revise an identity provider connection
1721
2394
  */
1722
- export const createIdp = async (
1723
- createIdpBody: CreateIdpBody,
1724
- params: CreateIdpParams,
1725
- options?: RequestInit,
1726
- ): Promise<CreateIdp200 | CreateIdp201> => {
1727
- return customFetch<CreateIdp200 | CreateIdp201>(getCreateIdpUrl(params), {
2395
+ export const createIdp = async (createIdpBody: CreateIdpBody,
2396
+ params: CreateIdpParams, options?: Parameters<typeof customFetch>[1]): Promise<CreateIdp200 | CreateIdp201> => {
2397
+
2398
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
2399
+ if (!h) return {};
2400
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
2401
+ if (Symbol.iterator in h) {
2402
+ return Object.fromEntries(
2403
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
2404
+ );
2405
+ }
2406
+ const headers: Record<string, string | readonly string[]> = {};
2407
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
2408
+ if (value !== undefined) headers[name] = value;
2409
+ }
2410
+ return headers;
2411
+ };
2412
+ return customFetch<CreateIdp200 | CreateIdp201>(getCreateIdpUrl(params),
2413
+ {
1728
2414
  ...options,
1729
- method: "POST",
1730
- headers: { "Content-Type": "application/json", ...options?.headers },
1731
- body: JSON.stringify(createIdpBody),
1732
- });
1733
- };
2415
+ method: 'POST',
2416
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
2417
+ body: JSON.stringify(createIdpBody)
2418
+ }
2419
+ );}
2420
+
2421
+
1734
2422
 
1735
- export const getQueryIdpsUrl = (params: QueryIdpsParams) => {
2423
+ export const getQueryIdpsUrl = (params: QueryIdpsParams,) => {
1736
2424
  const normalizedParams = new URLSearchParams();
1737
2425
 
1738
2426
  Object.entries(params || {}).forEach(([key, value]) => {
2427
+
1739
2428
  if (value !== undefined) {
1740
- normalizedParams.append(key, value === null ? "null" : value.toString());
2429
+ normalizedParams.append(key, value === null ? 'null' : String(value))
1741
2430
  }
1742
2431
  });
1743
2432
 
1744
2433
  const stringifiedParams = normalizedParams.toString();
1745
2434
 
1746
- return stringifiedParams.length > 0
1747
- ? `${getProxyPath()}/idps/query?${stringifiedParams}`
1748
- : `${getProxyPath()}/idps/query`;
1749
- };
2435
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/idps/query?${stringifiedParams}` : `${getProxyPath()}/idps/query`
2436
+ }
1750
2437
 
1751
2438
  /**
1752
2439
  * Returns the identity provider connections of a project, paginated with a
1753
- cursor. One row per connection, carrying its newest revision.
1754
-
2440
+ * cursor. One row per connection, carrying its newest revision.
1755
2441
  * @summary Query identity provider connections
1756
2442
  */
1757
- export const queryIdps = async (
1758
- queryIdpsBody: QueryIdpsBody,
1759
- params: QueryIdpsParams,
1760
- options?: RequestInit,
1761
- ): Promise<QueryIdps200> => {
1762
- return customFetch<QueryIdps200>(getQueryIdpsUrl(params), {
2443
+ export const queryIdps = async (queryIdpsBody: QueryIdpsBody,
2444
+ params: QueryIdpsParams, options?: Parameters<typeof customFetch>[1]): Promise<QueryIdps200> => {
2445
+
2446
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
2447
+ if (!h) return {};
2448
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
2449
+ if (Symbol.iterator in h) {
2450
+ return Object.fromEntries(
2451
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
2452
+ );
2453
+ }
2454
+ const headers: Record<string, string | readonly string[]> = {};
2455
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
2456
+ if (value !== undefined) headers[name] = value;
2457
+ }
2458
+ return headers;
2459
+ };
2460
+ return customFetch<QueryIdps200>(getQueryIdpsUrl(params),
2461
+ {
1763
2462
  ...options,
1764
- method: "POST",
1765
- headers: { "Content-Type": "application/json", ...options?.headers },
1766
- body: JSON.stringify(queryIdpsBody),
1767
- });
1768
- };
2463
+ method: 'POST',
2464
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
2465
+ body: JSON.stringify(queryIdpsBody)
2466
+ }
2467
+ );}
2468
+
2469
+
1769
2470
 
1770
- export const getGetIdpByIdUrl = (id: string, params: GetIdpByIdParams) => {
2471
+ export const getGetIdpByIdUrl = (id: string,
2472
+ params: GetIdpByIdParams,) => {
1771
2473
  const normalizedParams = new URLSearchParams();
1772
2474
 
1773
2475
  Object.entries(params || {}).forEach(([key, value]) => {
2476
+
1774
2477
  if (value !== undefined) {
1775
- normalizedParams.append(key, value === null ? "null" : value.toString());
2478
+ normalizedParams.append(key, value === null ? 'null' : String(value))
1776
2479
  }
1777
2480
  });
1778
2481
 
1779
2482
  const stringifiedParams = normalizedParams.toString();
1780
2483
 
1781
- return stringifiedParams.length > 0
1782
- ? `${getProxyPath()}/idps/${id}?${stringifiedParams}`
1783
- : `${getProxyPath()}/idps/${id}`;
1784
- };
2484
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/idps/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getProxyPath()}/idps/${encodeURIComponent(String(id))}`
2485
+ }
1785
2486
 
1786
2487
  /**
1787
2488
  * Reads a connection by its id, at its newest revision.
1788
- `GET /idps/{id}/revisions` lists every revision of the connection.
1789
-
1790
- The lookup is scoped to the project in `project_id`.
1791
-
2489
+ * `GET /idps/{id}/revisions` lists every revision of the connection.
2490
+ *
2491
+ * The lookup is scoped to the project in `project_id`.
1792
2492
  * @summary Get an identity provider connection by id
1793
2493
  */
1794
- export const getIdpById = async (
1795
- id: string,
1796
- params: GetIdpByIdParams,
1797
- options?: RequestInit,
1798
- ): Promise<GetIdpById200> => {
1799
- return customFetch<GetIdpById200>(getGetIdpByIdUrl(id, params), {
2494
+ export const getIdpById = async (id: string,
2495
+ params: GetIdpByIdParams, options?: Parameters<typeof customFetch>[1]): Promise<GetIdpById200> => {
2496
+
2497
+ return customFetch<GetIdpById200>(getGetIdpByIdUrl(id,params),
2498
+ {
1800
2499
  ...options,
1801
- method: "GET",
1802
- });
1803
- };
2500
+ method: 'GET'
2501
+
2502
+
2503
+ }
2504
+ );}
2505
+
1804
2506
 
1805
- export const getListIdpRevisionsUrl = (id: string, params: ListIdpRevisionsParams) => {
2507
+
2508
+ export const getListIdpRevisionsUrl = (id: string,
2509
+ params: ListIdpRevisionsParams,) => {
1806
2510
  const normalizedParams = new URLSearchParams();
1807
2511
 
1808
2512
  Object.entries(params || {}).forEach(([key, value]) => {
2513
+
1809
2514
  if (value !== undefined) {
1810
- normalizedParams.append(key, value === null ? "null" : value.toString());
2515
+ normalizedParams.append(key, value === null ? 'null' : String(value))
1811
2516
  }
1812
2517
  });
1813
2518
 
1814
2519
  const stringifiedParams = normalizedParams.toString();
1815
2520
 
1816
- return stringifiedParams.length > 0
1817
- ? `${getProxyPath()}/idps/${id}/revisions?${stringifiedParams}`
1818
- : `${getProxyPath()}/idps/${id}/revisions`;
1819
- };
2521
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/idps/${encodeURIComponent(String(id))}/revisions?${stringifiedParams}` : `${getProxyPath()}/idps/${encodeURIComponent(String(id))}/revisions`
2522
+ }
1820
2523
 
1821
2524
  /**
1822
2525
  * Returns every revision of one connection, newest first, paginated with a
1823
- cursor. The order is fixed, so there is no `sorting`.
1824
-
1825
- The lookup is scoped to the project in `project_id`.
1826
-
2526
+ * cursor. The order is fixed, so there is no `sorting`.
2527
+ *
2528
+ * The lookup is scoped to the project in `project_id`.
1827
2529
  * @summary List the revisions of an identity provider connection
1828
2530
  */
1829
- export const listIdpRevisions = async (
1830
- id: string,
1831
- params: ListIdpRevisionsParams,
1832
- options?: RequestInit,
1833
- ): Promise<ListIdpRevisions200> => {
1834
- return customFetch<ListIdpRevisions200>(getListIdpRevisionsUrl(id, params), {
2531
+ export const listIdpRevisions = async (id: string,
2532
+ params: ListIdpRevisionsParams, options?: Parameters<typeof customFetch>[1]): Promise<ListIdpRevisions200> => {
2533
+
2534
+ return customFetch<ListIdpRevisions200>(getListIdpRevisionsUrl(id,params),
2535
+ {
1835
2536
  ...options,
1836
- method: "GET",
1837
- });
1838
- };
2537
+ method: 'GET'
2538
+
2539
+
2540
+ }
2541
+ );}
1839
2542
 
1840
- export const getGetIdpRevisionByIdUrl = (revisionId: string, params: GetIdpRevisionByIdParams) => {
2543
+
2544
+
2545
+ export const getGetIdpRevisionByIdUrl = (revisionId: string,
2546
+ params: GetIdpRevisionByIdParams,) => {
1841
2547
  const normalizedParams = new URLSearchParams();
1842
2548
 
1843
2549
  Object.entries(params || {}).forEach(([key, value]) => {
2550
+
1844
2551
  if (value !== undefined) {
1845
- normalizedParams.append(key, value === null ? "null" : value.toString());
2552
+ normalizedParams.append(key, value === null ? 'null' : String(value))
1846
2553
  }
1847
2554
  });
1848
2555
 
1849
2556
  const stringifiedParams = normalizedParams.toString();
1850
2557
 
1851
- return stringifiedParams.length > 0
1852
- ? `${getProxyPath()}/idps/revisions/${revisionId}?${stringifiedParams}`
1853
- : `${getProxyPath()}/idps/revisions/${revisionId}`;
1854
- };
2558
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/idps/revisions/${encodeURIComponent(String(revisionId))}?${stringifiedParams}` : `${getProxyPath()}/idps/revisions/${encodeURIComponent(String(revisionId))}`
2559
+ }
1855
2560
 
1856
2561
  /**
1857
2562
  * Reads one revision of a connection by its `revision_id`, the value an auth
1858
- attempt or a release pins.
1859
-
1860
- The lookup is scoped to the project in `project_id`.
1861
-
2563
+ * attempt or a release pins.
2564
+ *
2565
+ * The lookup is scoped to the project in `project_id`.
1862
2566
  * @summary Get one revision of an identity provider connection
1863
2567
  */
1864
- export const getIdpRevisionById = async (
1865
- revisionId: string,
1866
- params: GetIdpRevisionByIdParams,
1867
- options?: RequestInit,
1868
- ): Promise<GetIdpRevisionById200> => {
1869
- return customFetch<GetIdpRevisionById200>(getGetIdpRevisionByIdUrl(revisionId, params), {
2568
+ export const getIdpRevisionById = async (revisionId: string,
2569
+ params: GetIdpRevisionByIdParams, options?: Parameters<typeof customFetch>[1]): Promise<GetIdpRevisionById200> => {
2570
+
2571
+ return customFetch<GetIdpRevisionById200>(getGetIdpRevisionByIdUrl(revisionId,params),
2572
+ {
1870
2573
  ...options,
1871
- method: "GET",
1872
- });
1873
- };
2574
+ method: 'GET'
2575
+
1874
2576
 
1875
- export const getCreateReleaseUrl = (params: CreateReleaseParams) => {
2577
+ }
2578
+ );}
2579
+
2580
+
2581
+
2582
+ export const getCreateReleaseUrl = (params: CreateReleaseParams,) => {
1876
2583
  const normalizedParams = new URLSearchParams();
1877
2584
 
1878
2585
  Object.entries(params || {}).forEach(([key, value]) => {
2586
+
1879
2587
  if (value !== undefined) {
1880
- normalizedParams.append(key, value === null ? "null" : value.toString());
2588
+ normalizedParams.append(key, value === null ? 'null' : String(value))
1881
2589
  }
1882
2590
  });
1883
2591
 
1884
2592
  const stringifiedParams = normalizedParams.toString();
1885
2593
 
1886
- return stringifiedParams.length > 0
1887
- ? `${getProxyPath()}/releases?${stringifiedParams}`
1888
- : `${getProxyPath()}/releases`;
1889
- };
2594
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/releases?${stringifiedParams}` : `${getProxyPath()}/releases`
2595
+ }
1890
2596
 
1891
2597
  /**
1892
2598
  * Bundles a release from revisions that already exist, supplied as
1893
- `(kind, revision_id)` pairs. No new revisions are allocated — use the
1894
- per-kind create endpoints for that, then pin the ids here.
1895
-
1896
- Every referenced `revision_id` must exist in the project. Each one's handle
1897
- is read from the revision itself and recorded on the release, so a resource
1898
- is always pinned under the identity it declares.
1899
-
1900
- Creating a release does not deploy it. A release is environment-agnostic
1901
- and the same release can later be deployed to any number of environments
1902
- unchanged.
1903
-
1904
- Idempotent on the pinned set: metadata is excluded from the comparison, so
1905
- re-submitting the same revisions with a different `message` returns the
1906
- release that already pins them rather than creating a second one.
1907
-
2599
+ * `(kind, revision_id)` pairs. No new revisions are allocated — use the
2600
+ * per-kind create endpoints for that, then pin the ids here.
2601
+ *
2602
+ * Every referenced `revision_id` must exist in the project. Each one's handle
2603
+ * is read from the revision itself and recorded on the release, so a resource
2604
+ * is always pinned under the identity it declares.
2605
+ *
2606
+ * Creating a release does not deploy it. A release is environment-agnostic
2607
+ * and the same release can later be deployed to any number of environments
2608
+ * unchanged.
2609
+ *
2610
+ * Idempotent on the pinned set: metadata is excluded from the comparison, so
2611
+ * re-submitting the same revisions with a different `message` returns the
2612
+ * release that already pins them rather than creating a second one.
1908
2613
  * @summary Create a release
1909
2614
  */
1910
- export const createRelease = async (
1911
- createReleaseBody: CreateReleaseBody,
1912
- params: CreateReleaseParams,
1913
- options?: RequestInit,
1914
- ): Promise<CreateRelease200 | CreateRelease201> => {
1915
- return customFetch<CreateRelease200 | CreateRelease201>(getCreateReleaseUrl(params), {
2615
+ export const createRelease = async (createReleaseBody: CreateReleaseBody,
2616
+ params: CreateReleaseParams, options?: Parameters<typeof customFetch>[1]): Promise<CreateRelease200 | CreateRelease201> => {
2617
+
2618
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
2619
+ if (!h) return {};
2620
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
2621
+ if (Symbol.iterator in h) {
2622
+ return Object.fromEntries(
2623
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
2624
+ );
2625
+ }
2626
+ const headers: Record<string, string | readonly string[]> = {};
2627
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
2628
+ if (value !== undefined) headers[name] = value;
2629
+ }
2630
+ return headers;
2631
+ };
2632
+ return customFetch<CreateRelease200 | CreateRelease201>(getCreateReleaseUrl(params),
2633
+ {
1916
2634
  ...options,
1917
- method: "POST",
1918
- headers: { "Content-Type": "application/json", ...options?.headers },
1919
- body: JSON.stringify(createReleaseBody),
1920
- });
1921
- };
2635
+ method: 'POST',
2636
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
2637
+ body: JSON.stringify(createReleaseBody)
2638
+ }
2639
+ );}
1922
2640
 
1923
- export const getListReleasesUrl = (params: ListReleasesParams) => {
2641
+
2642
+
2643
+ export const getListReleasesUrl = (params: ListReleasesParams,) => {
1924
2644
  const normalizedParams = new URLSearchParams();
1925
2645
 
1926
2646
  Object.entries(params || {}).forEach(([key, value]) => {
2647
+
1927
2648
  if (value !== undefined) {
1928
- normalizedParams.append(key, value === null ? "null" : value.toString());
2649
+ normalizedParams.append(key, value === null ? 'null' : String(value))
1929
2650
  }
1930
2651
  });
1931
2652
 
1932
2653
  const stringifiedParams = normalizedParams.toString();
1933
2654
 
1934
- return stringifiedParams.length > 0
1935
- ? `${getProxyPath()}/releases?${stringifiedParams}`
1936
- : `${getProxyPath()}/releases`;
1937
- };
2655
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/releases?${stringifiedParams}` : `${getProxyPath()}/releases`
2656
+ }
1938
2657
 
1939
2658
  /**
1940
2659
  * Lists the project's releases, newest first.
1941
-
1942
- Entries carry metadata only — the pinned set is omitted. Read one release
1943
- with `GET /releases/{release_id}` to get its pointers.
1944
-
2660
+ *
2661
+ * Entries carry metadata only — the pinned set is omitted. Read one release
2662
+ * with `GET /releases/{release_id}` to get its pointers.
1945
2663
  * @summary List releases
1946
2664
  */
1947
- export const listReleases = async (
1948
- params: ListReleasesParams,
1949
- options?: RequestInit,
1950
- ): Promise<ListReleases200> => {
1951
- return customFetch<ListReleases200>(getListReleasesUrl(params), {
2665
+ export const listReleases = async (params: ListReleasesParams, options?: Parameters<typeof customFetch>[1]): Promise<ListReleases200> => {
2666
+
2667
+ return customFetch<ListReleases200>(getListReleasesUrl(params),
2668
+ {
1952
2669
  ...options,
1953
- method: "GET",
1954
- });
1955
- };
2670
+ method: 'GET'
2671
+
1956
2672
 
1957
- export const getGetReleaseByIdUrl = (releaseId: string, params: GetReleaseByIdParams) => {
2673
+ }
2674
+ );}
2675
+
2676
+
2677
+
2678
+ export const getGetReleaseByIdUrl = (releaseId: string,
2679
+ params: GetReleaseByIdParams,) => {
1958
2680
  const normalizedParams = new URLSearchParams();
1959
2681
 
1960
2682
  Object.entries(params || {}).forEach(([key, value]) => {
2683
+
1961
2684
  if (value !== undefined) {
1962
- normalizedParams.append(key, value === null ? "null" : value.toString());
2685
+ normalizedParams.append(key, value === null ? 'null' : String(value))
1963
2686
  }
1964
2687
  });
1965
2688
 
1966
2689
  const stringifiedParams = normalizedParams.toString();
1967
2690
 
1968
- return stringifiedParams.length > 0
1969
- ? `${getProxyPath()}/releases/${releaseId}?${stringifiedParams}`
1970
- : `${getProxyPath()}/releases/${releaseId}`;
1971
- };
2691
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/releases/${encodeURIComponent(String(releaseId))}?${stringifiedParams}` : `${getProxyPath()}/releases/${encodeURIComponent(String(releaseId))}`
2692
+ }
1972
2693
 
1973
2694
  /**
1974
2695
  * Reads one release: its metadata and the `(kind, handle, revision_id)`
1975
- tuples it pins.
1976
-
1977
- Does not embed resource content. Resolve each `revision_id` through the
1978
- per-kind read endpoints when the bytes are needed.
1979
-
1980
- The lookup is scoped to the project in `project_id`: a release id belonging
1981
- to another project answers not found exactly as an unknown id does, so the
1982
- endpoint cannot be used to probe for releases in projects the caller cannot
1983
- read.
1984
-
2696
+ * tuples it pins.
2697
+ *
2698
+ * Does not embed resource content. Resolve each `revision_id` through the
2699
+ * per-kind read endpoints when the bytes are needed.
2700
+ *
2701
+ * The lookup is scoped to the project in `project_id`: a release id belonging
2702
+ * to another project answers not found exactly as an unknown id does, so the
2703
+ * endpoint cannot be used to probe for releases in projects the caller cannot
2704
+ * read.
1985
2705
  * @summary Get a release by id
1986
2706
  */
1987
- export const getReleaseById = async (
1988
- releaseId: string,
1989
- params: GetReleaseByIdParams,
1990
- options?: RequestInit,
1991
- ): Promise<GetReleaseById200> => {
1992
- return customFetch<GetReleaseById200>(getGetReleaseByIdUrl(releaseId, params), {
2707
+ export const getReleaseById = async (releaseId: string,
2708
+ params: GetReleaseByIdParams, options?: Parameters<typeof customFetch>[1]): Promise<GetReleaseById200> => {
2709
+
2710
+ return customFetch<GetReleaseById200>(getGetReleaseByIdUrl(releaseId,params),
2711
+ {
1993
2712
  ...options,
1994
- method: "GET",
1995
- });
1996
- };
2713
+ method: 'GET'
2714
+
2715
+
2716
+ }
2717
+ );}
2718
+
1997
2719
 
1998
- export const getCreateGrantUrl = (params: CreateGrantParams) => {
2720
+
2721
+ export const getCreateGrantUrl = (params: CreateGrantParams,) => {
1999
2722
  const normalizedParams = new URLSearchParams();
2000
2723
 
2001
2724
  Object.entries(params || {}).forEach(([key, value]) => {
2725
+
2002
2726
  if (value !== undefined) {
2003
- normalizedParams.append(key, value === null ? "null" : value.toString());
2727
+ normalizedParams.append(key, value === null ? 'null' : String(value))
2004
2728
  }
2005
2729
  });
2006
2730
 
2007
2731
  const stringifiedParams = normalizedParams.toString();
2008
2732
 
2009
- return stringifiedParams.length > 0
2010
- ? `${getProxyPath()}/grants?${stringifiedParams}`
2011
- : `${getProxyPath()}/grants`;
2012
- };
2733
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/grants?${stringifiedParams}` : `${getProxyPath()}/grants`
2734
+ }
2013
2735
 
2014
2736
  /**
2015
2737
  * Bind a user or team to `project.viewer`, `project.editor`, or
2016
- `project.admin` on the project identified by the `project-id` header.
2017
- Name the principal with `user` (`user_id` or `identifier`) or `team`
2018
- (`team_id` or `name`). IDs are `asgn_<opaque>`. Owning-team
2019
- (`project.team`) grants are not created here — claim owns that path. An
2020
- unrevoked grant with the same principal and relation occupies the unique
2021
- key even after `expires_at`; DELETE it before re-creating.
2022
- Create does not accept `expand`. The `user_id` and team locators
2023
- return 201, whose `user` / `team` carry only `user_id` / `team_id`,
2024
- and still 404 / 409 when the principal is missing or the tuple
2025
- already exists. Creating by `user.identifier` answers 202 with no
2026
- body on every outcome. Granting the session caller's own user is
2027
- `grant.invalid` on either user locator. Read the grant back for
2028
- identifier and display.
2029
-
2030
- Accepts either a project secret (`oauth2`) or a user-bound Console
2031
- session cookie (`nextgenSession`). Session callers are authorized as
2032
- the human against the target project (home may differ). CSRF/Origin
2033
- for cookie mutations is a follow-up (#1140).
2034
-
2738
+ * `project.admin` on the project identified by the `project-id` header.
2739
+ * Name the principal with `user` (`user_id` or `identifier`) or `team`
2740
+ * (`team_id` or `name`). IDs are `asgn_<opaque>`. Owning-team
2741
+ * (`project.team`) grants are not created here — claim owns that path. An
2742
+ * unrevoked grant with the same principal and relation occupies the unique
2743
+ * key even after `expires_at`; DELETE it before re-creating.
2744
+ * Create does not accept `expand`. The `user_id` and team locators
2745
+ * return 201, whose `user` / `team` carry only `user_id` / `team_id`,
2746
+ * and still 404 / 409 when the principal is missing or the tuple
2747
+ * already exists. Creating by `user.identifier` answers 202 with no
2748
+ * body on every outcome. Granting the session caller's own user is
2749
+ * `grant.invalid` on either user locator. Read the grant back for
2750
+ * identifier and display.
2751
+ *
2752
+ * Accepts either a project secret (`oauth2`) or a user-bound Console
2753
+ * session cookie (`nextgenSession`). Session callers are authorized as
2754
+ * the human against the target project (home may differ). Cookie-authenticated
2755
+ * requests follow the scheme's CSRF rules (`nextgenSession`).
2035
2756
  * @summary Create grant
2036
2757
  */
2037
- export const createGrant = async (
2038
- createGrantBody: CreateGrantBody,
2039
- params: CreateGrantParams,
2040
- options?: RequestInit,
2041
- ): Promise<CreateGrant201 | void> => {
2042
- return customFetch<CreateGrant201 | void>(getCreateGrantUrl(params), {
2758
+ export const createGrant = async (createGrantBody: CreateGrantBody,
2759
+ params: CreateGrantParams, options?: Parameters<typeof customFetch>[1]): Promise<CreateGrant201 | void> => {
2760
+
2761
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
2762
+ if (!h) return {};
2763
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
2764
+ if (Symbol.iterator in h) {
2765
+ return Object.fromEntries(
2766
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
2767
+ );
2768
+ }
2769
+ const headers: Record<string, string | readonly string[]> = {};
2770
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
2771
+ if (value !== undefined) headers[name] = value;
2772
+ }
2773
+ return headers;
2774
+ };
2775
+ return customFetch<CreateGrant201 | void>(getCreateGrantUrl(params),
2776
+ {
2043
2777
  ...options,
2044
- method: "POST",
2045
- headers: { "Content-Type": "application/json", ...options?.headers },
2046
- body: JSON.stringify(createGrantBody),
2047
- });
2048
- };
2778
+ method: 'POST',
2779
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
2780
+ body: JSON.stringify(createGrantBody)
2781
+ }
2782
+ );}
2783
+
2049
2784
 
2050
- export const getQueryGrantsUrl = (params: QueryGrantsParams) => {
2785
+
2786
+ export const getQueryGrantsUrl = (params: QueryGrantsParams,) => {
2051
2787
  const normalizedParams = new URLSearchParams();
2052
2788
 
2053
2789
  Object.entries(params || {}).forEach(([key, value]) => {
2790
+
2054
2791
  if (value !== undefined) {
2055
- normalizedParams.append(key, value === null ? "null" : value.toString());
2792
+ normalizedParams.append(key, value === null ? 'null' : String(value))
2056
2793
  }
2057
2794
  });
2058
2795
 
2059
2796
  const stringifiedParams = normalizedParams.toString();
2060
2797
 
2061
- return stringifiedParams.length > 0
2062
- ? `${getProxyPath()}/grants/query?${stringifiedParams}`
2063
- : `${getProxyPath()}/grants/query`;
2064
- };
2798
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/grants/query?${stringifiedParams}` : `${getProxyPath()}/grants/query`
2799
+ }
2065
2800
 
2066
2801
  /**
2067
2802
  * Returns the collaboration grants of a project, paginated with a cursor.
2068
- Only unrevoked grants this API manages are listed (user or team bound to
2069
- viewer, editor, or admin), including expired grants so a client can
2070
- DELETE before re-granting. Project-secret setup (`sk_proj`) and
2071
- owning-team (`relation=team`) rows are not returned. Grants are not in
2072
- `resource_scope_index`; project scope is required on the query (same as
2073
- get). Requires `project.read`. `expand: ["principal"]` adds envelope
2074
- fields on `user` / `team` and additionally requires `user.read` and
2075
- `team.read` for project secrets (documented on the expand enum; those
2076
- scopes cannot be ANDed onto this security block because they are
2077
- body-conditional). A user-bound Console session that already passed
2078
- the project Check may expand without those scopes.
2079
-
2080
- Accepts either a project secret (`oauth2`) or a user-bound Console
2081
- session cookie (`nextgenSession`). CSRF/Origin for cookie mutations
2082
- is a follow-up (#1140).
2083
-
2803
+ * Only unrevoked grants this API manages are listed (user or team bound to
2804
+ * viewer, editor, or admin), including expired grants so a client can
2805
+ * DELETE before re-granting. Project-secret setup (`sk_proj`) and
2806
+ * owning-team (`relation=team`) rows are not returned. Grants are not in
2807
+ * `resource_scope_index`; project scope is required on the query (same as
2808
+ * get). Requires `project.read`. `expand: ["principal"]` adds envelope
2809
+ * fields on `user` / `team` and additionally requires `user.read` and
2810
+ * `team.read` for project secrets (documented on the expand enum; those
2811
+ * scopes cannot be ANDed onto this security block because they are
2812
+ * body-conditional). A user-bound Console session that already passed
2813
+ * the project Check may expand without those scopes.
2814
+ *
2815
+ * Accepts either a project secret (`oauth2`) or a user-bound Console
2816
+ * session cookie (`nextgenSession`). Cookie-authenticated requests
2817
+ * follow the scheme's CSRF rules (`nextgenSession`).
2084
2818
  * @summary Query grants
2085
2819
  */
2086
- export const queryGrants = async (
2087
- queryGrantsBody: QueryGrantsBody,
2088
- params: QueryGrantsParams,
2089
- options?: RequestInit,
2090
- ): Promise<QueryGrants200> => {
2091
- return customFetch<QueryGrants200>(getQueryGrantsUrl(params), {
2820
+ export const queryGrants = async (queryGrantsBody: QueryGrantsBody,
2821
+ params: QueryGrantsParams, options?: Parameters<typeof customFetch>[1]): Promise<QueryGrants200> => {
2822
+
2823
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
2824
+ if (!h) return {};
2825
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
2826
+ if (Symbol.iterator in h) {
2827
+ return Object.fromEntries(
2828
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
2829
+ );
2830
+ }
2831
+ const headers: Record<string, string | readonly string[]> = {};
2832
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
2833
+ if (value !== undefined) headers[name] = value;
2834
+ }
2835
+ return headers;
2836
+ };
2837
+ return customFetch<QueryGrants200>(getQueryGrantsUrl(params),
2838
+ {
2092
2839
  ...options,
2093
- method: "POST",
2094
- headers: { "Content-Type": "application/json", ...options?.headers },
2095
- body: JSON.stringify(queryGrantsBody),
2096
- });
2097
- };
2840
+ method: 'POST',
2841
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
2842
+ body: JSON.stringify(queryGrantsBody)
2843
+ }
2844
+ );}
2845
+
2098
2846
 
2099
- export const getGetGrantUrl = (id: string, params: GetGrantParams) => {
2847
+
2848
+ export const getGetGrantUrl = (id: string,
2849
+ params: GetGrantParams,) => {
2100
2850
  const normalizedParams = new URLSearchParams();
2101
2851
 
2102
2852
  Object.entries(params || {}).forEach(([key, value]) => {
2853
+ const explodeParameters = ["expand"];
2854
+
2855
+ if (Array.isArray(value) && explodeParameters.includes(key)) {
2856
+ value.forEach((v) => {
2857
+ normalizedParams.append(key, v === null ? 'null' : String(v));
2858
+ });
2859
+ return;
2860
+ }
2861
+
2103
2862
  if (value !== undefined) {
2104
- normalizedParams.append(key, value === null ? "null" : value.toString());
2863
+ normalizedParams.append(key, value === null ? 'null' : String(value))
2105
2864
  }
2106
2865
  });
2107
2866
 
2108
2867
  const stringifiedParams = normalizedParams.toString();
2109
2868
 
2110
- return stringifiedParams.length > 0
2111
- ? `${getProxyPath()}/grants/${id}?${stringifiedParams}`
2112
- : `${getProxyPath()}/grants/${id}`;
2113
- };
2869
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/grants/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getProxyPath()}/grants/${encodeURIComponent(String(id))}`
2870
+ }
2114
2871
 
2115
2872
  /**
2116
2873
  * Loads a grant by `(project_id, id)` that this API manages (user or team
2117
- bound to viewer, editor, or admin) and that has not been revoked.
2118
- "Active" here means not revoked: expired grants stay visible so the
2119
- client can DELETE before re-granting the same binding. Authorization
2120
- still ignores expired grants. Grants are not registered in
2121
- `resource_scope_index`; project scope is required on the query (same as
2122
- events). Misses, revoked rows, project-secret setup (`sk_proj`),
2123
- owning-team (`relation=team`) rows, and cross-project ids return 404.
2124
- `expand=principal` adds envelope fields on `user` or `team` and requires
2125
- `user.read` and `team.read` in addition to `project.read` for project
2126
- secrets. A user-bound Console session that already passed the project
2127
- Check may expand without those scopes.
2128
-
2129
- Accepts either a project secret (`oauth2`) or a user-bound Console
2130
- session cookie (`nextgenSession`). CSRF/Origin for cookie mutations
2131
- is a follow-up (#1140).
2132
-
2874
+ * bound to viewer, editor, or admin) and that has not been revoked.
2875
+ * "Active" here means not revoked: expired grants stay visible so the
2876
+ * client can DELETE before re-granting the same binding. Authorization
2877
+ * still ignores expired grants. Grants are not registered in
2878
+ * `resource_scope_index`; project scope is required on the query (same as
2879
+ * events). Misses, revoked rows, project-secret setup (`sk_proj`),
2880
+ * owning-team (`relation=team`) rows, and cross-project ids return 404.
2881
+ * `expand=principal` adds envelope fields on `user` or `team` and requires
2882
+ * `user.read` and `team.read` in addition to `project.read` for project
2883
+ * secrets. A user-bound Console session that already passed the project
2884
+ * Check may expand without those scopes.
2885
+ *
2886
+ * Accepts either a project secret (`oauth2`) or a user-bound Console
2887
+ * session cookie (`nextgenSession`). Cookie-authenticated requests
2888
+ * follow the scheme's CSRF rules (`nextgenSession`).
2133
2889
  * @summary Get grant
2134
2890
  */
2135
- export const getGrant = async (
2136
- id: string,
2137
- params: GetGrantParams,
2138
- options?: RequestInit,
2139
- ): Promise<GetGrant200> => {
2140
- return customFetch<GetGrant200>(getGetGrantUrl(id, params), {
2891
+ export const getGrant = async (id: string,
2892
+ params: GetGrantParams, options?: Parameters<typeof customFetch>[1]): Promise<GetGrant200> => {
2893
+
2894
+ return customFetch<GetGrant200>(getGetGrantUrl(id,params),
2895
+ {
2141
2896
  ...options,
2142
- method: "GET",
2143
- });
2144
- };
2897
+ method: 'GET'
2898
+
2145
2899
 
2146
- export const getDeleteGrantUrl = (id: string, params: DeleteGrantParams) => {
2900
+ }
2901
+ );}
2902
+
2903
+
2904
+
2905
+ export const getDeleteGrantUrl = (id: string,
2906
+ params: DeleteGrantParams,) => {
2147
2907
  const normalizedParams = new URLSearchParams();
2148
2908
 
2149
2909
  Object.entries(params || {}).forEach(([key, value]) => {
2910
+
2150
2911
  if (value !== undefined) {
2151
- normalizedParams.append(key, value === null ? "null" : value.toString());
2912
+ normalizedParams.append(key, value === null ? 'null' : String(value))
2152
2913
  }
2153
2914
  });
2154
2915
 
2155
2916
  const stringifiedParams = normalizedParams.toString();
2156
2917
 
2157
- return stringifiedParams.length > 0
2158
- ? `${getProxyPath()}/grants/${id}?${stringifiedParams}`
2159
- : `${getProxyPath()}/grants/${id}`;
2160
- };
2918
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/grants/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getProxyPath()}/grants/${encodeURIComponent(String(id))}`
2919
+ }
2161
2920
 
2162
2921
  /**
2163
2922
  * Soft-revokes a grant this API manages and emits `authz.revoked`.
2164
- Already-revoked, missing, project-secret setup, and owning-team grants
2165
- return 404. The row is not un-revoked. Expired grants can still be
2166
- revoked so the unique binding can be reused.
2167
-
2168
- Accepts either a project secret (`oauth2`) or a user-bound Console
2169
- session cookie (`nextgenSession`). CSRF/Origin for cookie mutations
2170
- is a follow-up (#1140).
2171
-
2923
+ * Already-revoked, missing, project-secret setup, and owning-team grants
2924
+ * return 404. The row is not un-revoked. Expired grants can still be
2925
+ * revoked so the unique binding can be reused.
2926
+ *
2927
+ * Accepts either a project secret (`oauth2`) or a user-bound Console
2928
+ * session cookie (`nextgenSession`). Cookie-authenticated requests
2929
+ * follow the scheme's CSRF rules (`nextgenSession`).
2172
2930
  * @summary Revoke grant
2173
2931
  */
2174
- export const deleteGrant = async (
2175
- id: string,
2176
- params: DeleteGrantParams,
2177
- options?: RequestInit,
2178
- ): Promise<void> => {
2179
- return customFetch<void>(getDeleteGrantUrl(id, params), {
2932
+ export const deleteGrant = async (id: string,
2933
+ params: DeleteGrantParams, options?: Parameters<typeof customFetch>[1]): Promise<void> => {
2934
+
2935
+ return customFetch<void>(getDeleteGrantUrl(id,params),
2936
+ {
2180
2937
  ...options,
2181
- method: "DELETE",
2182
- });
2183
- };
2938
+ method: 'DELETE'
2184
2939
 
2185
- export const getListEventsUrl = (params: ListEventsParams) => {
2940
+
2941
+ }
2942
+ );}
2943
+
2944
+
2945
+
2946
+ export const getListEventsUrl = (params: ListEventsParams,) => {
2186
2947
  const normalizedParams = new URLSearchParams();
2187
2948
 
2188
2949
  Object.entries(params || {}).forEach(([key, value]) => {
2189
- const explodeParameters = ["category", "event_type"];
2950
+ const explodeParameters = ["category","event_type"];
2190
2951
 
2191
2952
  if (Array.isArray(value) && explodeParameters.includes(key)) {
2192
2953
  value.forEach((v) => {
2193
- normalizedParams.append(key, v === null ? "null" : v.toString());
2954
+ normalizedParams.append(key, v === null ? 'null' : String(v));
2194
2955
  });
2195
2956
  return;
2196
2957
  }
2197
2958
 
2198
2959
  if (value !== undefined) {
2199
- normalizedParams.append(key, value === null ? "null" : value.toString());
2960
+ normalizedParams.append(key, value === null ? 'null' : String(value))
2200
2961
  }
2201
2962
  });
2202
2963
 
2203
2964
  const stringifiedParams = normalizedParams.toString();
2204
2965
 
2205
- return stringifiedParams.length > 0
2206
- ? `${getProxyPath()}/events?${stringifiedParams}`
2207
- : `${getProxyPath()}/events`;
2208
- };
2966
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/events?${stringifiedParams}` : `${getProxyPath()}/events`
2967
+ }
2209
2968
 
2210
2969
  /**
2211
2970
  * Returns project-scoped audit events, newest-first by keyset on
2212
- `(created_at, id)` (ADR 027 / ADR 049). Pass `order=asc` for oldest-first.
2213
- Requires `events.read`.
2214
-
2215
- Pre-claim projects return an empty list (events are stored but not
2216
- visible until claim succeeds). Team-scoped credentials see only events
2217
- whose emit-time `team_id` matches the credential team (enforced when
2218
- team-scoped tokens exist).
2219
-
2220
- Clients discriminate each item via `event_type` (OpenAPI Event oneOf) —
2221
- see docs/design/api/events-catalog.md.
2222
-
2971
+ * `(created_at, id)` (ADR 027 / ADR 049). Pass `order=asc` for oldest-first.
2972
+ * Requires `events.read`.
2973
+ *
2974
+ * Pre-claim projects return an empty list (events are stored but not
2975
+ * visible until claim succeeds). Team-scoped credentials see only events
2976
+ * whose emit-time `team_id` matches the credential team (enforced when
2977
+ * team-scoped tokens exist).
2978
+ *
2979
+ * Clients discriminate each item via `event_type` (OpenAPI Event oneOf) —
2980
+ * see docs/design/api/events-catalog.md.
2223
2981
  * @summary List events
2224
2982
  */
2225
- export const listEvents = async (
2226
- params: ListEventsParams,
2227
- options?: RequestInit,
2228
- ): Promise<ListEvents200> => {
2229
- return customFetch<ListEvents200>(getListEventsUrl(params), {
2983
+ export const listEvents = async (params: ListEventsParams, options?: Parameters<typeof customFetch>[1]): Promise<ListEvents200> => {
2984
+
2985
+ return customFetch<ListEvents200>(getListEventsUrl(params),
2986
+ {
2230
2987
  ...options,
2231
- method: "GET",
2232
- });
2233
- };
2988
+ method: 'GET'
2989
+
2990
+
2991
+ }
2992
+ );}
2993
+
2234
2994
 
2235
- export const getGetEventUrl = (id: string, params: GetEventParams) => {
2995
+
2996
+ export const getGetEventUrl = (id: string,
2997
+ params: GetEventParams,) => {
2236
2998
  const normalizedParams = new URLSearchParams();
2237
2999
 
2238
3000
  Object.entries(params || {}).forEach(([key, value]) => {
3001
+
2239
3002
  if (value !== undefined) {
2240
- normalizedParams.append(key, value === null ? "null" : value.toString());
3003
+ normalizedParams.append(key, value === null ? 'null' : String(value))
2241
3004
  }
2242
3005
  });
2243
3006
 
2244
3007
  const stringifiedParams = normalizedParams.toString();
2245
3008
 
2246
- return stringifiedParams.length > 0
2247
- ? `${getProxyPath()}/events/${id}?${stringifiedParams}`
2248
- : `${getProxyPath()}/events/${id}`;
2249
- };
3009
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/events/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getProxyPath()}/events/${encodeURIComponent(String(id))}`
3010
+ }
2250
3011
 
2251
3012
  /**
2252
3013
  * Loads a single event by `(project_id, id)`. Requires `events.read`.
2253
- Events are not registered in `resource_scope_index`; project scope is
2254
- required on the query (ADR 049). Misses and cross-project ids return 404.
2255
-
2256
- Pre-claim projects return 404 (stored events stay invisible until claim).
2257
-
3014
+ * Events are not registered in `resource_scope_index`; project scope is
3015
+ * required on the query (ADR 049). Misses and cross-project ids return 404.
3016
+ *
3017
+ * Pre-claim projects return 404 (stored events stay invisible until claim).
2258
3018
  * @summary Get event by ID
2259
3019
  */
2260
- export const getEvent = async (
2261
- id: string,
2262
- params: GetEventParams,
2263
- options?: RequestInit,
2264
- ): Promise<GetEvent200> => {
2265
- return customFetch<GetEvent200>(getGetEventUrl(id, params), {
3020
+ export const getEvent = async (id: string,
3021
+ params: GetEventParams, options?: Parameters<typeof customFetch>[1]): Promise<GetEvent200> => {
3022
+
3023
+ return customFetch<GetEvent200>(getGetEventUrl(id,params),
3024
+ {
2266
3025
  ...options,
2267
- method: "GET",
2268
- });
2269
- };
3026
+ method: 'GET'
3027
+
3028
+
3029
+ }
3030
+ );}
2270
3031
 
2271
- export const getGetVariablesUrl = (params: GetVariablesParams) => {
3032
+
3033
+
3034
+ export const getGetVariablesUrl = (params: GetVariablesParams,) => {
2272
3035
  const normalizedParams = new URLSearchParams();
2273
3036
 
2274
3037
  Object.entries(params || {}).forEach(([key, value]) => {
3038
+
2275
3039
  if (value !== undefined) {
2276
- normalizedParams.append(key, value === null ? "null" : value.toString());
3040
+ normalizedParams.append(key, value === null ? 'null' : String(value))
2277
3041
  }
2278
3042
  });
2279
3043
 
2280
3044
  const stringifiedParams = normalizedParams.toString();
2281
3045
 
2282
- return stringifiedParams.length > 0
2283
- ? `${getProxyPath()}/variables?${stringifiedParams}`
2284
- : `${getProxyPath()}/variables`;
2285
- };
3046
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/variables?${stringifiedParams}` : `${getProxyPath()}/variables`
3047
+ }
2286
3048
 
2287
3049
  /**
2288
3050
  * Returns the variables entered at the owner this request addresses, keyed by
2289
- name — one environment of the project with `environment_name`, the project
2290
- level itself without it.
2291
-
2292
- Owners are separate, not a ladder: an environment does not inherit the
2293
- project's variables and the project does not see its environments'. Reading
2294
- everything a project holds therefore means reading each owner in turn.
2295
-
2296
- Secret values are not returned. A secret appears as `{"secret": true}`,
2297
- which says a value is held without disclosing it.
2298
-
3051
+ * name — one environment of the project with `environment_name`, the project
3052
+ * level itself without it.
3053
+ *
3054
+ * Owners are separate, not a ladder: an environment does not inherit the
3055
+ * project's variables and the project does not see its environments'. Reading
3056
+ * everything a project holds therefore means reading each owner in turn.
3057
+ *
3058
+ * Secret values are not returned. A secret appears as `{"secret": true}`,
3059
+ * which says a value is held without disclosing it.
2299
3060
  * @summary Get variables
2300
3061
  */
2301
- export const getVariables = async (
2302
- params: GetVariablesParams,
2303
- options?: RequestInit,
2304
- ): Promise<GetVariables200> => {
2305
- return customFetch<GetVariables200>(getGetVariablesUrl(params), {
3062
+ export const getVariables = async (params: GetVariablesParams, options?: Parameters<typeof customFetch>[1]): Promise<GetVariables200> => {
3063
+
3064
+ return customFetch<GetVariables200>(getGetVariablesUrl(params),
3065
+ {
2306
3066
  ...options,
2307
- method: "GET",
2308
- });
2309
- };
3067
+ method: 'GET'
3068
+
3069
+
3070
+ }
3071
+ );}
3072
+
3073
+
2310
3074
 
2311
- export const getUpdateVariablesUrl = (params: UpdateVariablesParams) => {
3075
+ export const getUpdateVariablesUrl = (params: UpdateVariablesParams,) => {
2312
3076
  const normalizedParams = new URLSearchParams();
2313
3077
 
2314
3078
  Object.entries(params || {}).forEach(([key, value]) => {
3079
+
2315
3080
  if (value !== undefined) {
2316
- normalizedParams.append(key, value === null ? "null" : value.toString());
3081
+ normalizedParams.append(key, value === null ? 'null' : String(value))
2317
3082
  }
2318
3083
  });
2319
3084
 
2320
3085
  const stringifiedParams = normalizedParams.toString();
2321
3086
 
2322
- return stringifiedParams.length > 0
2323
- ? `${getProxyPath()}/variables?${stringifiedParams}`
2324
- : `${getProxyPath()}/variables`;
2325
- };
3087
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/variables?${stringifiedParams}` : `${getProxyPath()}/variables`
3088
+ }
2326
3089
 
2327
3090
  /**
2328
3091
  * Enters, replaces and removes variables at the owner this request
2329
- addresses.
2330
-
2331
- Every name in the body is applied at exactly that owner — the project, or
2332
- the environment named by `environment_name` — and reaches no other. Names
2333
- not in the body are untouched.
2334
-
2335
- A bare scalar enters a non-secret value. `{"value": …, "secret": true}`
2336
- stores the value encrypted under the project's active `secret` key, after
2337
- which it can be referenced but not read back. `null` removes the name from
2338
- this owner (RFC 7386), which is how several variables are removed in one
2339
- request; removing a name this owner does not hold is a no-op rather than an
2340
- error.
2341
-
2342
- The body is applied whole or not at all, so a rejected request leaves the
2343
- owner exactly as it was. Writing the same name and owner twice replaces the
2344
- value rather than duplicating it, which makes a retry safe.
2345
-
3092
+ * addresses.
3093
+ *
3094
+ * Every name in the body is applied at exactly that owner — the project, or
3095
+ * the environment named by `environment_name` — and reaches no other. Names
3096
+ * not in the body are untouched.
3097
+ *
3098
+ * A bare scalar enters a non-secret value. `{"value": …, "secret": true}`
3099
+ * stores the value encrypted under the project's active `secret` key, after
3100
+ * which it can be referenced but not read back. `null` removes the name from
3101
+ * this owner (RFC 7386), which is how several variables are removed in one
3102
+ * request; removing a name this owner does not hold is a no-op rather than an
3103
+ * error.
3104
+ *
3105
+ * The body is applied whole or not at all, so a rejected request leaves the
3106
+ * owner exactly as it was. Writing the same name and owner twice replaces the
3107
+ * value rather than duplicating it, which makes a retry safe.
2346
3108
  * @summary Update variables
2347
3109
  */
2348
- export const updateVariables = async (
2349
- updateVariablesBody: UpdateVariablesBody,
2350
- params: UpdateVariablesParams,
2351
- options?: RequestInit,
2352
- ): Promise<UpdateVariables200> => {
2353
- return customFetch<UpdateVariables200>(getUpdateVariablesUrl(params), {
3110
+ export const updateVariables = async (updateVariablesBody: UpdateVariablesBody,
3111
+ params: UpdateVariablesParams, options?: Parameters<typeof customFetch>[1]): Promise<UpdateVariables200> => {
3112
+
3113
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
3114
+ if (!h) return {};
3115
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
3116
+ if (Symbol.iterator in h) {
3117
+ return Object.fromEntries(
3118
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
3119
+ );
3120
+ }
3121
+ const headers: Record<string, string | readonly string[]> = {};
3122
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
3123
+ if (value !== undefined) headers[name] = value;
3124
+ }
3125
+ return headers;
3126
+ };
3127
+ return customFetch<UpdateVariables200>(getUpdateVariablesUrl(params),
3128
+ {
2354
3129
  ...options,
2355
- method: "PATCH",
2356
- headers: { "Content-Type": "application/json", ...options?.headers },
2357
- body: JSON.stringify(updateVariablesBody),
2358
- });
2359
- };
3130
+ method: 'PATCH',
3131
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
3132
+ body: JSON.stringify(updateVariablesBody)
3133
+ }
3134
+ );}
3135
+
2360
3136
 
2361
- export const getGetVariableUrl = (variableName: string, params: GetVariableParams) => {
3137
+
3138
+ export const getGetVariableUrl = (variableName: string,
3139
+ params: GetVariableParams,) => {
2362
3140
  const normalizedParams = new URLSearchParams();
2363
3141
 
2364
3142
  Object.entries(params || {}).forEach(([key, value]) => {
3143
+
2365
3144
  if (value !== undefined) {
2366
- normalizedParams.append(key, value === null ? "null" : value.toString());
3145
+ normalizedParams.append(key, value === null ? 'null' : String(value))
2367
3146
  }
2368
3147
  });
2369
3148
 
2370
3149
  const stringifiedParams = normalizedParams.toString();
2371
3150
 
2372
- return stringifiedParams.length > 0
2373
- ? `${getProxyPath()}/variables/${variableName}?${stringifiedParams}`
2374
- : `${getProxyPath()}/variables/${variableName}`;
2375
- };
3151
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/variables/${encodeURIComponent(String(variableName))}?${stringifiedParams}` : `${getProxyPath()}/variables/${encodeURIComponent(String(variableName))}`
3152
+ }
2376
3153
 
2377
3154
  /**
2378
3155
  * Reads one variable by name from the owner this request addresses — one
2379
- environment of the project with `environment_name`, the project level
2380
- itself without it.
2381
-
2382
- A name that owner has not entered answers `var.not_found`, even when
2383
- another owner of the same project holds it: nothing is inherited. A secret
2384
- is found but not disclosed: the response is `{"secret": true}`.
2385
-
3156
+ * environment of the project with `environment_name`, the project level
3157
+ * itself without it.
3158
+ *
3159
+ * A name that owner has not entered answers `var.not_found`, even when
3160
+ * another owner of the same project holds it: nothing is inherited. A secret
3161
+ * is found but not disclosed: the response is `{"secret": true}`.
2386
3162
  * @summary Get a variable
2387
3163
  */
2388
- export const getVariable = async (
2389
- variableName: string,
2390
- params: GetVariableParams,
2391
- options?: RequestInit,
2392
- ): Promise<GetVariable200> => {
2393
- return customFetch<GetVariable200>(getGetVariableUrl(variableName, params), {
3164
+ export const getVariable = async (variableName: string,
3165
+ params: GetVariableParams, options?: Parameters<typeof customFetch>[1]): Promise<GetVariable200> => {
3166
+
3167
+ return customFetch<GetVariable200>(getGetVariableUrl(variableName,params),
3168
+ {
2394
3169
  ...options,
2395
- method: "GET",
2396
- });
2397
- };
3170
+ method: 'GET'
2398
3171
 
2399
- export const getDeleteVariableUrl = (variableName: string, params: DeleteVariableParams) => {
3172
+
3173
+ }
3174
+ );}
3175
+
3176
+
3177
+
3178
+ export const getDeleteVariableUrl = (variableName: string,
3179
+ params: DeleteVariableParams,) => {
2400
3180
  const normalizedParams = new URLSearchParams();
2401
3181
 
2402
3182
  Object.entries(params || {}).forEach(([key, value]) => {
3183
+
2403
3184
  if (value !== undefined) {
2404
- normalizedParams.append(key, value === null ? "null" : value.toString());
3185
+ normalizedParams.append(key, value === null ? 'null' : String(value))
2405
3186
  }
2406
3187
  });
2407
3188
 
2408
3189
  const stringifiedParams = normalizedParams.toString();
2409
3190
 
2410
- return stringifiedParams.length > 0
2411
- ? `${getProxyPath()}/variables/${variableName}?${stringifiedParams}`
2412
- : `${getProxyPath()}/variables/${variableName}`;
2413
- };
3191
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/variables/${encodeURIComponent(String(variableName))}?${stringifiedParams}` : `${getProxyPath()}/variables/${encodeURIComponent(String(variableName))}`
3192
+ }
2414
3193
 
2415
3194
  /**
2416
3195
  * Removes the variable this owner entered under this name.
3196
+ *
3197
+ * A variable is deletable only by the owner that entered it. Deleting a name
3198
+ * another owner of the same project holds answers `var.not_found` and leaves
3199
+ * that owner's value standing.
3200
+ * @summary Delete a variable
3201
+ */
3202
+ export const deleteVariable = async (variableName: string,
3203
+ params: DeleteVariableParams, options?: Parameters<typeof customFetch>[1]): Promise<void> => {
3204
+
3205
+ return customFetch<void>(getDeleteVariableUrl(variableName,params),
3206
+ {
3207
+ ...options,
3208
+ method: 'DELETE'
2417
3209
 
2418
- A variable is deletable only by the owner that entered it. Deleting a name
2419
- another owner of the same project holds answers `var.not_found` and leaves
2420
- that owner's value standing.
2421
3210
 
2422
- * @summary Delete a variable
3211
+ }
3212
+ );}
3213
+
3214
+
3215
+
3216
+ export const getCreateDeploymentUrl = (params: CreateDeploymentParams,) => {
3217
+ const normalizedParams = new URLSearchParams();
3218
+
3219
+ Object.entries(params || {}).forEach(([key, value]) => {
3220
+
3221
+ if (value !== undefined) {
3222
+ normalizedParams.append(key, value === null ? 'null' : String(value))
3223
+ }
3224
+ });
3225
+
3226
+ const stringifiedParams = normalizedParams.toString();
3227
+
3228
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/deployments?${stringifiedParams}` : `${getProxyPath()}/deployments`
3229
+ }
3230
+
3231
+ /**
3232
+ * Makes a release live on an environment by recording a deployment. The two
3233
+ * happen atomically: when the call returns, the environment runs the named
3234
+ * release and the record exists; on any failure the environment keeps
3235
+ * running what it ran and no record is written.
3236
+ *
3237
+ * Deploying, promoting and rolling back are all this call — `reason` says
3238
+ * which. None of them assembles a release: the release must already exist,
3239
+ * and rolling back means deploying a release the environment ran earlier,
3240
+ * chosen from its deployment history.
3241
+ *
3242
+ * Idempotent on the running release: deploying the release the environment
3243
+ * already runs changes nothing and answers `200` with the deployment that
3244
+ * made it live, so a re-run of `zitadel deploy` on unchanged content is a
3245
+ * no-op end to end — matching `POST /releases`, which resolves the same
3246
+ * content to the same release first. Anything else writes a new record,
3247
+ * including the same release returning after something else ran in between:
3248
+ * the log is append-only, and each row is one act of making a release live.
3249
+ *
3250
+ * `expected_current_deployment_id` guards against racing another deploy:
3251
+ * when present, the swap only happens if the environment's current
3252
+ * deployment still is the one named, and a mismatch answers `409` with the
3253
+ * actual `current_deployment_id` and `current_release_id` in the details.
3254
+ * @summary Create a deployment
3255
+ */
3256
+ export const createDeployment = async (createDeploymentBody: CreateDeploymentBody,
3257
+ params: CreateDeploymentParams, options?: Parameters<typeof customFetch>[1]): Promise<CreateDeployment200 | CreateDeployment201> => {
3258
+
3259
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
3260
+ if (!h) return {};
3261
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
3262
+ if (Symbol.iterator in h) {
3263
+ return Object.fromEntries(
3264
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
3265
+ );
3266
+ }
3267
+ const headers: Record<string, string | readonly string[]> = {};
3268
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
3269
+ if (value !== undefined) headers[name] = value;
3270
+ }
3271
+ return headers;
3272
+ };
3273
+ return customFetch<CreateDeployment200 | CreateDeployment201>(getCreateDeploymentUrl(params),
3274
+ {
3275
+ ...options,
3276
+ method: 'POST',
3277
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
3278
+ body: JSON.stringify(createDeploymentBody)
3279
+ }
3280
+ );}
3281
+
3282
+
3283
+
3284
+ export const getListDeploymentsUrl = (params: ListDeploymentsParams,) => {
3285
+ const normalizedParams = new URLSearchParams();
3286
+
3287
+ Object.entries(params || {}).forEach(([key, value]) => {
3288
+ const explodeParameters = ["expand"];
3289
+
3290
+ if (Array.isArray(value) && explodeParameters.includes(key)) {
3291
+ value.forEach((v) => {
3292
+ normalizedParams.append(key, v === null ? 'null' : String(v));
3293
+ });
3294
+ return;
3295
+ }
3296
+
3297
+ if (value !== undefined) {
3298
+ normalizedParams.append(key, value === null ? 'null' : String(value))
3299
+ }
3300
+ });
3301
+
3302
+ const stringifiedParams = normalizedParams.toString();
3303
+
3304
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/deployments?${stringifiedParams}` : `${getProxyPath()}/deployments`
3305
+ }
3306
+
3307
+ /**
3308
+ * Lists deployments newest first: what ran where, and when.
3309
+ *
3310
+ * With `environment_name`, the list is that environment's history and its
3311
+ * first row is the environment's current deployment. Without it, the list
3312
+ * interleaves every environment of the project — a project-wide audit view
3313
+ * in which the first row is only the most recent deployment anywhere.
3314
+ *
3315
+ * `expand: ["release"]` embeds the release each deployment made live, so a
3316
+ * history renders with each entry's content without resolving `release_id`
3317
+ * one by one. Expanding requires `release.read` and does not affect the
3318
+ * ordering or the page tokens.
3319
+ * @summary List deployments
2423
3320
  */
2424
- export const deleteVariable = async (
2425
- variableName: string,
2426
- params: DeleteVariableParams,
2427
- options?: RequestInit,
2428
- ): Promise<void> => {
2429
- return customFetch<void>(getDeleteVariableUrl(variableName, params), {
3321
+ export const listDeployments = async (params: ListDeploymentsParams, options?: Parameters<typeof customFetch>[1]): Promise<ListDeployments200> => {
3322
+
3323
+ return customFetch<ListDeployments200>(getListDeploymentsUrl(params),
3324
+ {
2430
3325
  ...options,
2431
- method: "DELETE",
3326
+ method: 'GET'
3327
+
3328
+
3329
+ }
3330
+ );}
3331
+
3332
+
3333
+
3334
+ export const getGetDeploymentByIdUrl = (deploymentId: string,
3335
+ params: GetDeploymentByIdParams,) => {
3336
+ const normalizedParams = new URLSearchParams();
3337
+
3338
+ Object.entries(params || {}).forEach(([key, value]) => {
3339
+
3340
+ if (value !== undefined) {
3341
+ normalizedParams.append(key, value === null ? 'null' : String(value))
3342
+ }
2432
3343
  });
2433
- };
3344
+
3345
+ const stringifiedParams = normalizedParams.toString();
3346
+
3347
+ return stringifiedParams.length > 0 ? `${getProxyPath()}/deployments/${encodeURIComponent(String(deploymentId))}?${stringifiedParams}` : `${getProxyPath()}/deployments/${encodeURIComponent(String(deploymentId))}`
3348
+ }
3349
+
3350
+ /**
3351
+ * Reads one deployment record.
3352
+ *
3353
+ * The lookup is scoped to the project in `project_id`: a deployment id
3354
+ * belonging to another project answers not found exactly as an unknown id
3355
+ * does, so the endpoint cannot be used to probe for deployments in projects
3356
+ * the caller cannot read.
3357
+ * @summary Get a deployment by id
3358
+ */
3359
+ export const getDeploymentById = async (deploymentId: string,
3360
+ params: GetDeploymentByIdParams, options?: Parameters<typeof customFetch>[1]): Promise<GetDeploymentById200> => {
3361
+
3362
+ return customFetch<GetDeploymentById200>(getGetDeploymentByIdUrl(deploymentId,params),
3363
+ {
3364
+ ...options,
3365
+ method: 'GET'
3366
+
3367
+
3368
+ }
3369
+ );}
3370
+
3371
+
3372
+