@zitadel/api 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{fetch-DD3lSbnp.d.mts → fetch-CtYe0OvX.d.mts} +8 -2
- package/dist/fetch-CtYe0OvX.d.mts.map +1 -0
- package/dist/generated/endpoints/zitadelNextGen.d.mts +2 -2
- package/dist/generated/endpoints/zitadelNextGen.mjs +228 -42
- package/dist/generated/endpoints/zitadelNextGen.mjs.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.msw.d.mts +15 -4
- package/dist/generated/endpoints/zitadelNextGen.msw.d.mts.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.msw.mjs +3156 -1476
- package/dist/generated/endpoints/zitadelNextGen.msw.mjs.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.zod.d.mts +1282 -94
- package/dist/generated/endpoints/zitadelNextGen.zod.d.mts.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.zod.mjs +1785 -641
- package/dist/generated/endpoints/zitadelNextGen.zod.mjs.map +1 -1
- package/dist/generated/model/index.d.mts +2 -2
- package/dist/generated/model/index.mjs +72 -65
- package/dist/generated/model/index.mjs.map +1 -1
- package/dist/generated/operations.mjs +181 -29
- package/dist/generated/operations.mjs.map +1 -1
- package/dist/{index-DuuFQkA8.d.mts → index-D7-l5LV6.d.mts} +6051 -1072
- package/dist/index-D7-l5LV6.d.mts.map +1 -0
- package/dist/runtime/api-factory.d.mts +1 -1
- package/dist/runtime/fetch.d.mts +1 -1
- package/dist/runtime/fetch.mjs +9 -2
- package/dist/runtime/fetch.mjs.map +1 -1
- package/dist/{zitadelNextGen-BdUDEEuX.d.mts → zitadelNextGen-Cw3DrCn1.d.mts} +135 -37
- package/dist/zitadelNextGen-Cw3DrCn1.d.mts.map +1 -0
- package/package.json +2 -2
- package/src/generated/endpoints/zitadelNextGen.faker.ts +37 -19
- package/src/generated/endpoints/zitadelNextGen.msw.ts +91 -13
- package/src/generated/endpoints/zitadelNextGen.ts +322 -52
- package/src/generated/endpoints/zitadelNextGen.zod.ts +1072 -123
- package/src/generated/model/addOriginDefault.ts +27 -0
- package/src/generated/model/beginUserPasskeyRegistrationDefault.ts +18 -0
- package/src/generated/model/buildRelease200PointersItem.ts +2 -0
- package/src/generated/model/buildRelease200PointersItemKind.ts +1 -0
- package/src/generated/model/buildRelease201PointersItem.ts +2 -0
- package/src/generated/model/buildRelease201PointersItemKind.ts +1 -0
- package/src/generated/model/buildRelease400DetailsResourcesItemKind.ts +1 -0
- package/src/generated/model/buildReleaseBody.ts +3 -3
- package/src/generated/model/buildReleaseBodyBundle.ts +20 -3
- package/src/generated/model/buildReleaseBodyBundlePoliciesItem.ts +47 -0
- package/src/generated/model/buildReleaseDefault.ts +36 -0
- package/src/generated/model/createAuthAttemptDefault.ts +27 -0
- package/src/generated/model/createBrandingDefault.ts +18 -0
- package/src/generated/model/createDeployment200ReleasePointersItem.ts +2 -0
- package/src/generated/model/createDeployment200ReleasePointersItemKind.ts +1 -0
- package/src/generated/model/createDeployment201ReleasePointersItem.ts +2 -0
- package/src/generated/model/createDeployment201ReleasePointersItemKind.ts +1 -0
- package/src/generated/model/createDeployment409.ts +3 -1
- package/src/generated/model/createDeploymentBody.ts +2 -4
- package/src/generated/model/createDeploymentDefault.ts +54 -0
- package/src/generated/model/createFlow201Step.ts +19 -0
- package/src/generated/model/createFlow201StepPurpose.ts +26 -0
- package/src/generated/model/createFlowDefault.ts +18 -0
- package/src/generated/model/createFlowDefinitionDefault.ts +18 -0
- package/src/generated/model/createGrant201Team.ts +4 -1
- package/src/generated/model/createGrantDefault.ts +18 -0
- package/src/generated/model/createHandoffDefault.ts +18 -0
- package/src/generated/model/createIdpDefault.ts +18 -0
- package/src/generated/model/createRelease200PointersItem.ts +2 -0
- package/src/generated/model/createRelease200PointersItemKind.ts +1 -0
- package/src/generated/model/createRelease201PointersItem.ts +2 -0
- package/src/generated/model/createRelease201PointersItemKind.ts +1 -0
- package/src/generated/model/createReleaseBodyPointersItemKind.ts +1 -0
- package/src/generated/model/createReleaseDefault.ts +18 -0
- package/src/generated/model/createSchemaDefault.ts +18 -0
- package/src/generated/model/createSessionDefault.ts +18 -0
- package/src/generated/model/createTeamDefault.ts +18 -0
- package/src/generated/model/createUserDefault.ts +18 -0
- package/src/generated/model/deleteGrantDefault.ts +18 -0
- package/src/generated/model/deleteTeamDefault.ts +18 -0
- package/src/generated/model/deleteUserByIDDefault.ts +18 -0
- package/src/generated/model/deleteVariableDefault.ts +18 -0
- package/src/generated/model/exchangeHandoffDefault.ts +36 -0
- package/src/generated/model/finishUserPasskeyRegistrationDefault.ts +18 -0
- package/src/generated/model/getAuthAttemptDefault.ts +18 -0
- package/src/generated/model/getBrandingByIdDefault.ts +18 -0
- package/src/generated/model/getClaimStatusDefault.ts +18 -0
- package/src/generated/model/getDeploymentById200ReleasePointersItem.ts +2 -0
- package/src/generated/model/getDeploymentById200ReleasePointersItemKind.ts +1 -0
- package/src/generated/model/getDeploymentByIdDefault.ts +18 -0
- package/src/generated/model/getDeploymentVariablesDefault.ts +9 -0
- package/src/generated/model/getEvent200.ts +788 -0
- package/src/generated/model/getEventDefault.ts +18 -0
- package/src/generated/model/getFlowDefinitionDefault.ts +18 -0
- package/src/generated/model/getFlowStep200Step.ts +19 -0
- package/src/generated/model/getFlowStep200StepPurpose.ts +26 -0
- package/src/generated/model/getFlowStepDefault.ts +36 -0
- package/src/generated/model/getGrant200Team.ts +4 -1
- package/src/generated/model/getGrantDefault.ts +18 -0
- package/src/generated/model/getIdpByIdDefault.ts +18 -0
- package/src/generated/model/getIdpRevisionByIdDefault.ts +18 -0
- package/src/generated/model/getMyPasswordStateDefault.ts +18 -0
- package/src/generated/model/getMySessionCsrfTokenDefault.ts +18 -0
- package/src/generated/model/getMySessionDefault.ts +18 -0
- package/src/generated/model/getMyUserDefault.ts +18 -0
- package/src/generated/model/getMyUserSchemaDefault.ts +18 -0
- package/src/generated/model/getPolicy200.ts +62 -0
- package/src/generated/model/getPolicyDefault.ts +72 -0
- package/src/generated/model/getPolicyParams.ts +15 -0
- package/src/generated/model/getPolicyRevision200.ts +62 -0
- package/src/generated/model/getPolicyRevisionDefault.ts +72 -0
- package/src/generated/model/getPolicyRevisionParams.ts +15 -0
- package/src/generated/model/getProject200.ts +64 -6
- package/src/generated/model/getReleaseById200PointersItem.ts +2 -0
- package/src/generated/model/getReleaseById200PointersItemKind.ts +1 -0
- package/src/generated/model/getReleaseByIdDefault.ts +18 -0
- package/src/generated/model/getSchemaByIdDefault.ts +18 -0
- package/src/generated/model/getSessionDefault.ts +18 -0
- package/src/generated/model/getTeamDefault.ts +18 -0
- package/src/generated/model/getUserByIDDefault.ts +18 -0
- package/src/generated/model/getUserPasswordStateDefault.ts +18 -0
- package/src/generated/model/getVariableDefault.ts +18 -0
- package/src/generated/model/getVariablesDefault.ts +18 -0
- package/src/generated/model/index.ts +38 -21
- package/src/generated/model/initClaimDefault.ts +18 -0
- package/src/generated/model/issueChallengeDefault.ts +18 -0
- package/src/generated/model/listBrandingDefault.ts +18 -0
- package/src/generated/model/listDeployments200DeploymentsItemReleasePointersItem.ts +2 -0
- package/src/generated/model/listDeployments200DeploymentsItemReleasePointersItemKind.ts +1 -0
- package/src/generated/model/listDeploymentsDefault.ts +18 -0
- package/src/generated/model/listEvents200DataItem.ts +788 -0
- package/src/generated/model/listEventsDefault.ts +18 -0
- package/src/generated/model/listFlowDefinitionsDefault.ts +18 -0
- package/src/generated/model/listIdpRevisionsDefault.ts +18 -0
- package/src/generated/model/listMyIdentityLinksDefault.ts +18 -0
- package/src/generated/model/listMyPasskeysDefault.ts +18 -0
- package/src/generated/model/listMyProjectsDefault.ts +18 -0
- package/src/generated/model/listMyProjectsParams.ts +8 -0
- package/src/generated/model/listMyTeamsDefault.ts +18 -0
- package/src/generated/model/listPolicies200.ts +21 -0
- package/src/generated/model/listPolicies200PoliciesItem.ts +62 -0
- package/src/generated/model/listPoliciesDefault.ts +72 -0
- package/src/generated/model/listPoliciesOperation.ts +14 -0
- package/src/generated/model/listPoliciesParams.ts +33 -0
- package/src/generated/model/listPolicyRevisions200.ts +20 -0
- package/src/generated/model/listPolicyRevisions200RevisionsItem.ts +62 -0
- package/src/generated/model/listPolicyRevisionsDefault.ts +72 -0
- package/src/generated/model/listPolicyRevisionsParams.ts +28 -0
- package/src/generated/model/listPreviewsDefault.ts +9 -0
- package/src/generated/model/listProjectAdmins200.ts +20 -0
- package/src/generated/model/listProjectAdmins200AdminsItem.ts +31 -0
- package/src/generated/model/listProjectAdmins200AdminsItemSourcesItem.ts +57 -0
- package/src/generated/model/listProjectAdmins200AdminsItemUser.ts +40 -0
- package/src/generated/model/{createAuthAttempt409.ts → listProjectAdmins400.ts} +3 -3
- package/src/generated/model/{createAuthAttempt409Details.ts → listProjectAdmins400Details.ts} +1 -1
- package/src/generated/model/{issueChallenge409.ts → listProjectAdmins401.ts} +3 -3
- package/src/generated/model/{issueChallenge409Details.ts → listProjectAdmins401Details.ts} +1 -1
- package/src/generated/model/{getAuthAttempt409.ts → listProjectAdmins403.ts} +3 -3
- package/src/generated/model/{getHealth4xxDetails.ts → listProjectAdmins403Details.ts} +1 -1
- package/src/generated/model/{getHealth4xx.ts → listProjectAdmins404.ts} +3 -3
- package/src/generated/model/{getAuthAttempt409Details.ts → listProjectAdmins404Details.ts} +1 -1
- package/src/generated/model/listProjectAdminsDefault.ts +81 -0
- package/src/generated/model/listProjectAdminsParams.ts +23 -0
- package/src/generated/model/listReleasesDefault.ts +18 -0
- package/src/generated/model/listSchemasDefault.ts +18 -0
- package/src/generated/model/listUserIdentityLinksDefault.ts +18 -0
- package/src/generated/model/listUserPasskeysDefault.ts +18 -0
- package/src/generated/model/listUserTeamsDefault.ts +18 -0
- package/src/generated/model/patchMyUserDefault.ts +18 -0
- package/src/generated/model/patchProject200.ts +64 -6
- package/src/generated/model/patchProjectDefault.ts +18 -0
- package/src/generated/model/patchUserByIDDefault.ts +18 -0
- package/src/generated/model/publishPolicy201.ts +62 -0
- package/src/generated/model/publishPolicyBody.ts +47 -0
- package/src/generated/model/publishPolicyDefault.ts +99 -0
- package/src/generated/model/publishPolicyParams.ts +15 -0
- package/src/generated/model/queryGrants200GrantsItemTeam.ts +4 -1
- package/src/generated/model/queryGrantsDefault.ts +9 -0
- package/src/generated/model/queryIdpsDefault.ts +9 -0
- package/src/generated/model/queryProjectsDefault.ts +9 -0
- package/src/generated/model/querySessionsDefault.ts +9 -0
- package/src/generated/model/queryTeamsDefault.ts +9 -0
- package/src/generated/model/queryUsersDefault.ts +9 -0
- package/src/generated/model/removeOriginDefault.ts +27 -0
- package/src/generated/model/removePreviewDefault.ts +18 -0
- package/src/generated/model/revokeMySessionDefault.ts +18 -0
- package/src/generated/model/revokeRelease200PointersItem.ts +2 -0
- package/src/generated/model/revokeRelease200PointersItemKind.ts +1 -0
- package/src/generated/model/revokeRelease409DetailsOriginsItem.ts +9 -1
- package/src/generated/model/revokeReleaseDefault.ts +63 -0
- package/src/generated/model/revokeSessionDefault.ts +18 -0
- package/src/generated/model/rollbackDeployment200ReleasePointersItem.ts +2 -0
- package/src/generated/model/rollbackDeployment200ReleasePointersItemKind.ts +1 -0
- package/src/generated/model/rollbackDeployment201ReleasePointersItem.ts +2 -0
- package/src/generated/model/rollbackDeployment201ReleasePointersItemKind.ts +1 -0
- package/src/generated/model/rollbackDeployment409.ts +3 -1
- package/src/generated/model/rollbackDeploymentDefault.ts +99 -0
- package/src/generated/model/setUserPasswordDefault.ts +18 -0
- package/src/generated/model/submitFlowStep200Step.ts +19 -0
- package/src/generated/model/submitFlowStep200StepPurpose.ts +26 -0
- package/src/generated/model/submitFlowStep400Step.ts +19 -0
- package/src/generated/model/submitFlowStep400StepPurpose.ts +26 -0
- package/src/generated/model/submitFlowStepDefault.ts +36 -0
- package/src/generated/model/updateTeamDefault.ts +18 -0
- package/src/generated/model/updateVariablesDefault.ts +18 -0
- package/src/generated/model/verifyChallengeProofDefault.ts +18 -0
- package/src/generated/operations.ts +189 -29
- package/src/runtime/config.spec.ts +2 -2
- package/src/runtime/fetch.spec.ts +13 -1
- package/src/runtime/fetch.ts +15 -2
- package/dist/fetch-DD3lSbnp.d.mts.map +0 -1
- package/dist/index-DuuFQkA8.d.mts.map +0 -1
- package/dist/zitadelNextGen-BdUDEEuX.d.mts.map +0 -1
- package/src/generated/model/getHealthDefault.ts +0 -27
- package/src/generated/model/getProject200OriginsItem.ts +0 -23
- package/src/generated/model/getProject200OriginsItemKind.ts +0 -15
- package/src/generated/model/getProject200PasswordHash.ts +0 -42
- package/src/generated/model/getProject200PasswordHashAlgorithm.ts +0 -24
- package/src/generated/model/getProject200PasswordHashParams.ts +0 -47
- package/src/generated/model/getProject200PasswordHashParamsHash.ts +0 -24
- package/src/generated/model/patchProject200OriginsItem.ts +0 -23
- package/src/generated/model/patchProject200OriginsItemKind.ts +0 -15
- package/src/generated/model/patchProject200PasswordHash.ts +0 -42
- package/src/generated/model/patchProject200PasswordHashAlgorithm.ts +0 -24
- package/src/generated/model/patchProject200PasswordHashParams.ts +0 -47
- package/src/generated/model/patchProject200PasswordHashParamsHash.ts +0 -24
|
@@ -16,7 +16,13 @@ declare class ApiError extends Error {
|
|
|
16
16
|
readonly status: number;
|
|
17
17
|
readonly url: string;
|
|
18
18
|
readonly body: unknown;
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* The server's ID for the request, from its `X-Request-Id` header: the
|
|
21
|
+
* reference that finds the request in the server's logs, to show beside the
|
|
22
|
+
* error. `undefined` when the response carried none, as from a proxy.
|
|
23
|
+
*/
|
|
24
|
+
readonly requestId: string | undefined;
|
|
25
|
+
constructor(status: number, url: string, body: unknown, message: string, requestId?: string);
|
|
20
26
|
}
|
|
21
27
|
/**
|
|
22
28
|
* Thrown when a request got no response at all: the connection was refused or
|
|
@@ -104,4 +110,4 @@ declare function apiErrorCode(errorOrBody: unknown): string | undefined;
|
|
|
104
110
|
declare function apiErrorMessage(error: ApiError): string;
|
|
105
111
|
//#endregion
|
|
106
112
|
export { apiErrorCode as a, request as c, RequestPolicy as i, setRequestPolicy as l, CSRF_HEADER as n, apiErrorMessage as o, NetworkError as r, customFetch as s, ApiError as t };
|
|
107
|
-
//# sourceMappingURL=fetch-
|
|
113
|
+
//# sourceMappingURL=fetch-CtYe0OvX.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-CtYe0OvX.d.mts","names":[],"sources":["../src/runtime/fetch.ts"],"mappings":";;cAGa;;;;;;;;;;;;cAmBA,iBAAiB;WACnB;WACA;WACA;;;;;;WAMA;EAEG,YAAA,gBAAgB,aAAa,eAAe,iBAAiB;;;;;;;;;;;;cAoB9D,qBAAqB;WACvB;;WAEA;EAGP,YAAA,aACA,mCACA,iBACA,UAAU;;;;;;;KAcF;;EAEV,SAAS;;EAET;;iBAKc,iBAAiB,QAAQ;;;;;;;;;;;;;;;;;;;;;;;iBA0BnB,YAAY,GAAG,aAAa,SAAS,cAAc,QAAQ;;;;;;;;;;;;;;;;iBAyF3D,QAAQ,eAC5B,aACA,MAAM,aACN,SAAQ,eACR,QAAQ,KAAK,aAAa,QAAQ,KACjC;EAAU,KAAK;EAAU,SAAS;;;;;;;iBAiErB,aAAa;;;;;;;;iBAYb,gBAAgB,OAAO"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as getEvent, $n as
|
|
2
|
-
export { addOrigin, beginUserPasskeyRegistration, buildRelease, completeClaim, createAuthAttempt, createBranding, createDeployment, createFlow, createFlowDefinition, createGrant, createHandoff, createIdp, createProject, createRelease, createSchema, createSession, createTeam, createUser, deleteGrant, deleteTeam, deleteUserByID, deleteVariable, exchangeHandoff, finishUserPasskeyRegistration, getAddOriginUrl, getAuthAttempt, getBeginUserPasskeyRegistrationUrl, getBrandingById, getBuildReleaseUrl, getClaimStatus, getClaimWindow, getCompleteClaimUrl, getCreateAuthAttemptUrl, getCreateBrandingUrl, getCreateDeploymentUrl, getCreateFlowDefinitionUrl, getCreateFlowUrl, getCreateGrantUrl, getCreateHandoffUrl, getCreateIdpUrl, getCreateProjectUrl, getCreateReleaseUrl, getCreateSchemaUrl, getCreateSessionUrl, getCreateTeamUrl, getCreateUserUrl, getDeleteGrantUrl, getDeleteTeamUrl, getDeleteUserByIDUrl, getDeleteVariableUrl, getDeploymentById, getDeploymentVariables, getEvent, getExchangeHandoffUrl, getFinishUserPasskeyRegistrationUrl, getFlowDefinition, getFlowStep, getGetAuthAttemptUrl, getGetBrandingByIdUrl, getGetClaimStatusUrl, getGetClaimWindowUrl, getGetDeploymentByIdUrl, getGetDeploymentVariablesUrl, getGetEventUrl, getGetFlowDefinitionUrl, getGetFlowStepUrl, getGetGrantUrl,
|
|
1
|
+
import { $ as getEvent, $n as listPolicies, $t as getListSchemasUrl, A as getClaimStatus, An as getSchemaById, At as getGetUserByIDUrl, B as getCreateIdpUrl, Bn as getVariables, Bt as getListDeploymentsUrl, C as exchangeHandoff, Cn as getReleaseById, Cr as rollbackDeployment, Ct as getGetPolicyUrl, D as getBeginUserPasskeyRegistrationUrl, Dn as getRevokeReleaseUrl, Dr as updateVariables, Dt as getGetSchemaByIdUrl, E as getAuthAttempt, En as getRevokeMySessionUrl, Er as updateTeam, Et as getGetReleaseByIdUrl, F as getCreateDeploymentUrl, Fn as getUpdateTeamUrl, Ft as getIdpById, G as getCreateTeamUrl, Gn as listDeployments, Gt as getListMyPasskeysUrl, H as getCreateReleaseUrl, Hn as initClaim, Ht as getListFlowDefinitionsUrl, I as getCreateFlowDefinitionUrl, In as getUpdateVariablesUrl, It as getIdpRevisionById, J as getDeleteTeamUrl, Jn as listIdpRevisions, Jt as getListPoliciesUrl, K as getCreateUserUrl, Kn as listEvents, Kt as getListMyProjectsUrl, L as getCreateFlowUrl, Ln as getUserByID, Lt as getInitClaimUrl, M as getCompleteClaimUrl, Mn as getSetUserPasswordUrl, Mt as getGetVariableUrl, N as getCreateAuthAttemptUrl, Nn as getSubmitFlowStepUrl, Nt as getGetVariablesUrl, O as getBrandingById, On as getRevokeSessionUrl, Or as verifyChallengeProof, Ot as getGetSessionUrl, P as getCreateBrandingUrl, Pn as getTeam, Pt as getGrant, Q as getDeploymentVariables, Qn as listMyTeams, Qt as getListReleasesUrl, R as getCreateGrantUrl, Rn as getUserPasswordState, Rt as getIssueChallengeUrl, S as deleteVariable, Sn as getReady, Sr as revokeSession, St as getGetPolicyRevisionUrl, T as getAddOriginUrl, Tn as getRemovePreviewUrl, Tr as submitFlowStep, Tt as getGetReadyUrl, U as getCreateSchemaUrl, Un as issueChallenge, Ut as getListIdpRevisionsUrl, V as getCreateProjectUrl, Vn as getVerifyChallengeProofUrl, Vt as getListEventsUrl, W as getCreateSessionUrl, Wn as listBranding, Wt as getListMyIdentityLinksUrl, X as getDeleteVariableUrl, Xn as listMyPasskeys, Xt as getListPreviewsUrl, Y as getDeleteUserByIDUrl, Yn as listMyIdentityLinks, Yt as getListPolicyRevisionsUrl, Z as getDeploymentById, Zn as listMyProjects, Zt as getListProjectAdminsUrl, _ as createTeam, _n as getQueryIdpsUrl, _r as queryUsers, _t as getGetMyPasswordStateUrl, a as createAuthAttempt, an as getMySession, ar as listUserIdentityLinks, at as getGetBrandingByIdUrl, b as deleteTeam, bn as getQueryTeamsUrl, br as revokeMySession, bt as getGetMyUserSchemaUrl, c as createFlow, cn as getMyUserSchema, cr as patchMyUser, ct as getGetDeploymentByIdUrl, d as createHandoff, dn as getPatchUserByIDUrl, dr as publishPolicy, dt as getGetFlowDefinitionUrl, en as getListUserIdentityLinksUrl, er as listPolicyRevisions, et as getExchangeHandoffUrl, f as createIdp, fn as getPolicy, fr as queryGrants, ft as getGetFlowStepUrl, g as createSession, gn as getQueryGrantsUrl, gr as queryTeams, gt as getGetLiveUrl, h as createSchema, hn as getPublishPolicyUrl, hr as querySessions, ht as getGetIdpRevisionByIdUrl, i as completeClaim, in as getMyPasswordState, ir as listSchemas, it as getGetAuthAttemptUrl, j as getClaimWindow, jn as getSession, jt as getGetUserPasswordStateUrl, k as getBuildReleaseUrl, kn as getRollbackDeploymentUrl, kt as getGetTeamUrl, l as createFlowDefinition, ln as getPatchMyUserUrl, lr as patchProject, lt as getGetDeploymentVariablesUrl, m as createRelease, mn as getProject, mr as queryProjects, mt as getGetIdpByIdUrl, n as beginUserPasskeyRegistration, nn as getListUserTeamsUrl, nr as listProjectAdmins, nt as getFlowDefinition, o as createBranding, on as getMySessionCsrfToken, or as listUserPasskeys, ot as getGetClaimStatusUrl, p as createProject, pn as getPolicyRevision, pr as queryIdps, pt as getGetGrantUrl, q as getDeleteGrantUrl, qn as listFlowDefinitions, qt as getListMyTeamsUrl, r as buildRelease, rn as getLive, rr as listReleases, rt as getFlowStep, s as createDeployment, sn as getMyUser, sr as listUserTeams, st as getGetClaimWindowUrl, t as addOrigin, tn as getListUserPasskeysUrl, tr as listPreviews, tt as getFinishUserPasskeyRegistrationUrl, u as createGrant, un as getPatchProjectUrl, ur as patchUserByID, ut as getGetEventUrl, v as createUser, vn as getQueryProjectsUrl, vr as removeOrigin, vt as getGetMySessionCsrfTokenUrl, w as finishUserPasskeyRegistration, wn as getRemoveOriginUrl, wr as setUserPassword, wt as getGetProjectUrl, x as deleteUserByID, xn as getQueryUsersUrl, xr as revokeRelease, xt as getGetMyUserUrl, y as deleteGrant, yn as getQuerySessionsUrl, yr as removePreview, yt as getGetMySessionUrl, z as getCreateHandoffUrl, zn as getVariable, zt as getListBrandingUrl } from "../../zitadelNextGen-Cw3DrCn1.mjs";
|
|
2
|
+
export { addOrigin, beginUserPasskeyRegistration, buildRelease, completeClaim, createAuthAttempt, createBranding, createDeployment, createFlow, createFlowDefinition, createGrant, createHandoff, createIdp, createProject, createRelease, createSchema, createSession, createTeam, createUser, deleteGrant, deleteTeam, deleteUserByID, deleteVariable, exchangeHandoff, finishUserPasskeyRegistration, getAddOriginUrl, getAuthAttempt, getBeginUserPasskeyRegistrationUrl, getBrandingById, getBuildReleaseUrl, getClaimStatus, getClaimWindow, getCompleteClaimUrl, getCreateAuthAttemptUrl, getCreateBrandingUrl, getCreateDeploymentUrl, getCreateFlowDefinitionUrl, getCreateFlowUrl, getCreateGrantUrl, getCreateHandoffUrl, getCreateIdpUrl, getCreateProjectUrl, getCreateReleaseUrl, getCreateSchemaUrl, getCreateSessionUrl, getCreateTeamUrl, getCreateUserUrl, getDeleteGrantUrl, getDeleteTeamUrl, getDeleteUserByIDUrl, getDeleteVariableUrl, getDeploymentById, getDeploymentVariables, getEvent, getExchangeHandoffUrl, getFinishUserPasskeyRegistrationUrl, getFlowDefinition, getFlowStep, getGetAuthAttemptUrl, getGetBrandingByIdUrl, getGetClaimStatusUrl, getGetClaimWindowUrl, getGetDeploymentByIdUrl, getGetDeploymentVariablesUrl, getGetEventUrl, getGetFlowDefinitionUrl, getGetFlowStepUrl, getGetGrantUrl, getGetIdpByIdUrl, getGetIdpRevisionByIdUrl, getGetLiveUrl, getGetMyPasswordStateUrl, getGetMySessionCsrfTokenUrl, getGetMySessionUrl, getGetMyUserSchemaUrl, getGetMyUserUrl, getGetPolicyRevisionUrl, getGetPolicyUrl, getGetProjectUrl, getGetReadyUrl, getGetReleaseByIdUrl, getGetSchemaByIdUrl, getGetSessionUrl, getGetTeamUrl, getGetUserByIDUrl, getGetUserPasswordStateUrl, getGetVariableUrl, getGetVariablesUrl, getGrant, getIdpById, getIdpRevisionById, getInitClaimUrl, getIssueChallengeUrl, getListBrandingUrl, getListDeploymentsUrl, getListEventsUrl, getListFlowDefinitionsUrl, getListIdpRevisionsUrl, getListMyIdentityLinksUrl, getListMyPasskeysUrl, getListMyProjectsUrl, getListMyTeamsUrl, getListPoliciesUrl, getListPolicyRevisionsUrl, getListPreviewsUrl, getListProjectAdminsUrl, getListReleasesUrl, getListSchemasUrl, getListUserIdentityLinksUrl, getListUserPasskeysUrl, getListUserTeamsUrl, getLive, getMyPasswordState, getMySession, getMySessionCsrfToken, getMyUser, getMyUserSchema, getPatchMyUserUrl, getPatchProjectUrl, getPatchUserByIDUrl, getPolicy, getPolicyRevision, getProject, getPublishPolicyUrl, getQueryGrantsUrl, getQueryIdpsUrl, getQueryProjectsUrl, getQuerySessionsUrl, getQueryTeamsUrl, getQueryUsersUrl, getReady, getReleaseById, getRemoveOriginUrl, getRemovePreviewUrl, getRevokeMySessionUrl, getRevokeReleaseUrl, getRevokeSessionUrl, getRollbackDeploymentUrl, getSchemaById, getSession, getSetUserPasswordUrl, getSubmitFlowStepUrl, getTeam, getUpdateTeamUrl, getUpdateVariablesUrl, getUserByID, getUserPasswordState, getVariable, getVariables, getVerifyChallengeProofUrl, initClaim, issueChallenge, listBranding, listDeployments, listEvents, listFlowDefinitions, listIdpRevisions, listMyIdentityLinks, listMyPasskeys, listMyProjects, listMyTeams, listPolicies, listPolicyRevisions, listPreviews, listProjectAdmins, listReleases, listSchemas, listUserIdentityLinks, listUserPasskeys, listUserTeams, patchMyUser, patchProject, patchUserByID, publishPolicy, queryGrants, queryIdps, queryProjects, querySessions, queryTeams, queryUsers, removeOrigin, removePreview, revokeMySession, revokeRelease, revokeSession, rollbackDeployment, setUserPassword, submitFlowStep, updateTeam, updateVariables, verifyChallengeProof };
|
|
@@ -77,7 +77,6 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
|
|
|
77
77
|
getGetFlowDefinitionUrl: () => getGetFlowDefinitionUrl,
|
|
78
78
|
getGetFlowStepUrl: () => getGetFlowStepUrl,
|
|
79
79
|
getGetGrantUrl: () => getGetGrantUrl,
|
|
80
|
-
getGetHealthUrl: () => getGetHealthUrl,
|
|
81
80
|
getGetIdpByIdUrl: () => getGetIdpByIdUrl,
|
|
82
81
|
getGetIdpRevisionByIdUrl: () => getGetIdpRevisionByIdUrl,
|
|
83
82
|
getGetLiveUrl: () => getGetLiveUrl,
|
|
@@ -86,6 +85,8 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
|
|
|
86
85
|
getGetMySessionUrl: () => getGetMySessionUrl,
|
|
87
86
|
getGetMyUserSchemaUrl: () => getGetMyUserSchemaUrl,
|
|
88
87
|
getGetMyUserUrl: () => getGetMyUserUrl,
|
|
88
|
+
getGetPolicyRevisionUrl: () => getGetPolicyRevisionUrl,
|
|
89
|
+
getGetPolicyUrl: () => getGetPolicyUrl,
|
|
89
90
|
getGetProjectUrl: () => getGetProjectUrl,
|
|
90
91
|
getGetReadyUrl: () => getGetReadyUrl,
|
|
91
92
|
getGetReleaseByIdUrl: () => getGetReleaseByIdUrl,
|
|
@@ -97,7 +98,6 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
|
|
|
97
98
|
getGetVariableUrl: () => getGetVariableUrl,
|
|
98
99
|
getGetVariablesUrl: () => getGetVariablesUrl,
|
|
99
100
|
getGrant: () => getGrant,
|
|
100
|
-
getHealth: () => getHealth,
|
|
101
101
|
getIdpById: () => getIdpById,
|
|
102
102
|
getIdpRevisionById: () => getIdpRevisionById,
|
|
103
103
|
getInitClaimUrl: () => getInitClaimUrl,
|
|
@@ -111,7 +111,10 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
|
|
|
111
111
|
getListMyPasskeysUrl: () => getListMyPasskeysUrl,
|
|
112
112
|
getListMyProjectsUrl: () => getListMyProjectsUrl,
|
|
113
113
|
getListMyTeamsUrl: () => getListMyTeamsUrl,
|
|
114
|
+
getListPoliciesUrl: () => getListPoliciesUrl,
|
|
115
|
+
getListPolicyRevisionsUrl: () => getListPolicyRevisionsUrl,
|
|
114
116
|
getListPreviewsUrl: () => getListPreviewsUrl,
|
|
117
|
+
getListProjectAdminsUrl: () => getListProjectAdminsUrl,
|
|
115
118
|
getListReleasesUrl: () => getListReleasesUrl,
|
|
116
119
|
getListSchemasUrl: () => getListSchemasUrl,
|
|
117
120
|
getListUserIdentityLinksUrl: () => getListUserIdentityLinksUrl,
|
|
@@ -126,7 +129,10 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
|
|
|
126
129
|
getPatchMyUserUrl: () => getPatchMyUserUrl,
|
|
127
130
|
getPatchProjectUrl: () => getPatchProjectUrl,
|
|
128
131
|
getPatchUserByIDUrl: () => getPatchUserByIDUrl,
|
|
132
|
+
getPolicy: () => getPolicy,
|
|
133
|
+
getPolicyRevision: () => getPolicyRevision,
|
|
129
134
|
getProject: () => getProject,
|
|
135
|
+
getPublishPolicyUrl: () => getPublishPolicyUrl,
|
|
130
136
|
getQueryGrantsUrl: () => getQueryGrantsUrl,
|
|
131
137
|
getQueryIdpsUrl: () => getQueryIdpsUrl,
|
|
132
138
|
getQueryProjectsUrl: () => getQueryProjectsUrl,
|
|
@@ -164,7 +170,10 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
|
|
|
164
170
|
listMyPasskeys: () => listMyPasskeys,
|
|
165
171
|
listMyProjects: () => listMyProjects,
|
|
166
172
|
listMyTeams: () => listMyTeams,
|
|
173
|
+
listPolicies: () => listPolicies,
|
|
174
|
+
listPolicyRevisions: () => listPolicyRevisions,
|
|
167
175
|
listPreviews: () => listPreviews,
|
|
176
|
+
listProjectAdmins: () => listProjectAdmins,
|
|
168
177
|
listReleases: () => listReleases,
|
|
169
178
|
listSchemas: () => listSchemas,
|
|
170
179
|
listUserIdentityLinks: () => listUserIdentityLinks,
|
|
@@ -173,6 +182,7 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
|
|
|
173
182
|
patchMyUser: () => patchMyUser,
|
|
174
183
|
patchProject: () => patchProject,
|
|
175
184
|
patchUserByID: () => patchUserByID,
|
|
185
|
+
publishPolicy: () => publishPolicy,
|
|
176
186
|
queryGrants: () => queryGrants,
|
|
177
187
|
queryIdps: () => queryIdps,
|
|
178
188
|
queryProjects: () => queryProjects,
|
|
@@ -191,24 +201,15 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
|
|
|
191
201
|
updateVariables: () => updateVariables,
|
|
192
202
|
verifyChallengeProof: () => verifyChallengeProof
|
|
193
203
|
});
|
|
194
|
-
const getGetHealthUrl = () => {
|
|
195
|
-
return `${getProxyPath()}/healthz`;
|
|
196
|
-
};
|
|
197
|
-
/**
|
|
198
|
-
* Check whether the server is healthy
|
|
199
|
-
* @summary Check server health
|
|
200
|
-
*/
|
|
201
|
-
const getHealth = async (options) => {
|
|
202
|
-
return customFetch(getGetHealthUrl(), {
|
|
203
|
-
...options,
|
|
204
|
-
method: "GET"
|
|
205
|
-
});
|
|
206
|
-
};
|
|
207
204
|
const getGetLiveUrl = () => {
|
|
208
205
|
return `${getProxyPath()}/livez`;
|
|
209
206
|
};
|
|
210
207
|
/**
|
|
211
|
-
*
|
|
208
|
+
* Answers `ok` while the server process serves HTTP, and checks nothing behind it.
|
|
209
|
+
*
|
|
210
|
+
* Point a liveness probe here. It never checks the database, so an outage
|
|
211
|
+
* of the database does not restart every instance; `GET /readyz` takes an
|
|
212
|
+
* instance out of rotation instead.
|
|
212
213
|
* @summary Check server liveness
|
|
213
214
|
*/
|
|
214
215
|
const getLive = async (options) => {
|
|
@@ -221,7 +222,11 @@ const getGetReadyUrl = () => {
|
|
|
221
222
|
return `${getProxyPath()}/readyz`;
|
|
222
223
|
};
|
|
223
224
|
/**
|
|
224
|
-
*
|
|
225
|
+
* Answers whether the server can serve requests, which takes its database answering within a second.
|
|
226
|
+
*
|
|
227
|
+
* Point a readiness probe here, so that a server whose database does not
|
|
228
|
+
* answer gets no requests until it does. The check is one round trip to the
|
|
229
|
+
* database.
|
|
225
230
|
* @summary Check server readiness
|
|
226
231
|
*/
|
|
227
232
|
const getReady = async (options) => {
|
|
@@ -678,14 +683,20 @@ const getListMyProjectsUrl = (params) => {
|
|
|
678
683
|
return stringifiedParams.length > 0 ? `${getProxyPath()}/users/me/projects?${stringifiedParams}` : `${getProxyPath()}/users/me/projects`;
|
|
679
684
|
};
|
|
680
685
|
/**
|
|
681
|
-
* The projects the signed-in user
|
|
682
|
-
* through a team they are a member of.
|
|
683
|
-
*
|
|
686
|
+
* The projects the signed-in user can act on: those they hold an active grant
|
|
687
|
+
* on, either directly or through a team they are a member of. For a platform
|
|
688
|
+
* operator (ADR 075) that is every project of the deployment. Ordered by
|
|
689
|
+
* project id and paged with an opaque cursor.
|
|
684
690
|
*
|
|
685
691
|
* This is not the same question as `queryProjects`, which answers with the one
|
|
686
692
|
* project the calling credential is bound to. Here the session is the caller
|
|
687
693
|
* and the grants are the answer, so the list spans projects.
|
|
688
694
|
*
|
|
695
|
+
* With `name_contains`, only the projects whose name contains that text are
|
|
696
|
+
* listed. The search runs on the server together with the grants, so it
|
|
697
|
+
* reaches every project the user can act on, however many there are, and
|
|
698
|
+
* pages like the full list.
|
|
699
|
+
*
|
|
689
700
|
* With `project_id`, the projects are listed only when the session belongs to
|
|
690
701
|
* that project. It names the project the session was signed in to, not one to
|
|
691
702
|
* list.
|
|
@@ -758,7 +769,10 @@ const getCreateFlowUrl = () => {
|
|
|
758
769
|
* pattern with no live preview answers `403` with `proj.preview_not_live`;
|
|
759
770
|
* nothing deployed to the target answers `409` with `rel.not_deployed`; a
|
|
760
771
|
* revoked release answers `409` with `rel.revoked`. A request with no
|
|
761
|
-
* `Origin` passes the gate and still needs a deployment target.
|
|
772
|
+
* `Origin` passes the gate and still needs a deployment target. A loopback
|
|
773
|
+
* origin passes it too, and so does the server's own origin, from which its
|
|
774
|
+
* console previews a project's login; a step submitted from the server's
|
|
775
|
+
* own origin is still refused unless the project lists it.
|
|
762
776
|
*
|
|
763
777
|
* The response contains an `id` field — the flow handle. Use it as the path
|
|
764
778
|
* parameter for all subsequent `/flow/{id}/submit` calls.
|
|
@@ -896,10 +910,10 @@ const getCreateAuthAttemptUrl = () => {
|
|
|
896
910
|
* also include session_id and that session's session_token to add factors to an existing session.
|
|
897
911
|
*
|
|
898
912
|
* The project comes from the project secret. A body `project_id` that disagrees
|
|
899
|
-
* answers `403` with `proj.mismatch`.
|
|
900
|
-
*
|
|
901
|
-
*
|
|
902
|
-
*
|
|
913
|
+
* answers `403` with `proj.mismatch`. Sealed `deployment_id` / `release_id` are
|
|
914
|
+
* filled only when create runs with a runtime resolution already on the
|
|
915
|
+
* context (the flow create path); this HTTP entry point does not resolve
|
|
916
|
+
* Origin or refuse a revoked release itself.
|
|
903
917
|
* @summary Create a new authentication attempt
|
|
904
918
|
*/
|
|
905
919
|
const createAuthAttempt = async (createAuthAttemptBody, options) => {
|
|
@@ -932,9 +946,6 @@ const getGetAuthAttemptUrl = (attemptId) => {
|
|
|
932
946
|
*
|
|
933
947
|
* Use this for polling during long-running factor verifications (e.g., waiting for
|
|
934
948
|
* a federated IdP callback or a device flow).
|
|
935
|
-
*
|
|
936
|
-
* Reuses the deployment sealed when the attempt was created. If that release
|
|
937
|
-
* was revoked since, the response is `409` with `rel.revoked`.
|
|
938
949
|
* @summary Get authentication attempt state
|
|
939
950
|
*/
|
|
940
951
|
const getAuthAttempt = async (attemptId, options) => {
|
|
@@ -953,9 +964,6 @@ const getIssueChallengeUrl = (attemptId) => {
|
|
|
953
964
|
* (password, passkey, TOTP, OTP via SMS, etc.). The server responds with challenge details
|
|
954
965
|
* including method, metadata, and any UI hints. The client then verifies the proof
|
|
955
966
|
* by calling POST /auth_attempts/{attempt_id}/challenges/{challenge_id}/verify.
|
|
956
|
-
*
|
|
957
|
-
* Reuses the deployment sealed when the attempt was created. If that release
|
|
958
|
-
* was revoked since, the response is `409` with `rel.revoked`.
|
|
959
967
|
* @summary Issue a factor challenge
|
|
960
968
|
*/
|
|
961
969
|
const issueChallenge = async (attemptId, issueChallengeBody, options) => {
|
|
@@ -991,9 +999,6 @@ const getVerifyChallengeProofUrl = (attemptId, challengeId) => {
|
|
|
991
999
|
*
|
|
992
1000
|
* On successful verification, the factor is written to the auth attempt.
|
|
993
1001
|
* The attempt moves to the next pending challenge or completes if all required factors are verified.
|
|
994
|
-
*
|
|
995
|
-
* Reuses the deployment sealed when the attempt was created. If that release
|
|
996
|
-
* was revoked since, the response is `409` with `rel.revoked`.
|
|
997
1002
|
* @summary Verify a factor proof
|
|
998
1003
|
*/
|
|
999
1004
|
const verifyChallengeProof = async (attemptId, challengeId, verifyChallengeProofBody, options) => {
|
|
@@ -1030,8 +1035,7 @@ const getCreateHandoffUrl = (attemptId) => {
|
|
|
1030
1035
|
* - Audience-bound (requires matching project key for exchange)
|
|
1031
1036
|
* - Idempotency-safe within a 5-minute window (see conventions)
|
|
1032
1037
|
*
|
|
1033
|
-
*
|
|
1034
|
-
* was revoked since, the response is `409` with `rel.revoked`.
|
|
1038
|
+
* Revoke refusal for a sealed release happens at handoff exchange, not here.
|
|
1035
1039
|
* @summary Complete authentication and create handoff token
|
|
1036
1040
|
*/
|
|
1037
1041
|
const createHandoff = async (attemptId, options) => {
|
|
@@ -1141,6 +1145,51 @@ const patchProject = async (projectId, patchProjectBody, options) => {
|
|
|
1141
1145
|
body: JSON.stringify(patchProjectBody)
|
|
1142
1146
|
});
|
|
1143
1147
|
};
|
|
1148
|
+
const getListProjectAdminsUrl = (projectId, params) => {
|
|
1149
|
+
const normalizedParams = new URLSearchParams();
|
|
1150
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1151
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1152
|
+
});
|
|
1153
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1154
|
+
return stringifiedParams.length > 0 ? `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/admins?${stringifiedParams}` : `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/admins`;
|
|
1155
|
+
};
|
|
1156
|
+
/**
|
|
1157
|
+
* Lists the people who can administer the project, and how each of them
|
|
1158
|
+
* gets that access. A person appears once, with one entry in `sources` per
|
|
1159
|
+
* way they hold it:
|
|
1160
|
+
*
|
|
1161
|
+
* - `owning_team`: an active member of the team that owns the project
|
|
1162
|
+
* (ADR 054 §2). Removing a grant does not remove this access; it ends
|
|
1163
|
+
* only when the person leaves the team or the project changes owner.
|
|
1164
|
+
* - `grant`: an unexpired `admin` grant on the project, either to the
|
|
1165
|
+
* person (`grant_id` only) or to a team they are an active member of
|
|
1166
|
+
* (`grant_id` and `team`). Revoking that grant removes this source.
|
|
1167
|
+
*
|
|
1168
|
+
* The list follows the authorization check: team membership is read from
|
|
1169
|
+
* the same membership projection the check expands, so a person who left a
|
|
1170
|
+
* team, or whose team or user was deactivated, is not listed through it.
|
|
1171
|
+
* Grants that expired or carry a lower role are left out. A person whose
|
|
1172
|
+
* only access is a `viewer` or `editor` grant is not an admin and is not
|
|
1173
|
+
* listed. Like the check, the list does not look at a person's user status
|
|
1174
|
+
* beyond that, so a direct grant to a suspended person is listed.
|
|
1175
|
+
*
|
|
1176
|
+
* A person whose access comes only through teams the caller is not a
|
|
1177
|
+
* member of is left out, and a team the caller is not in is named by
|
|
1178
|
+
* `team_id` only. The grant to such a team still shows in the project's
|
|
1179
|
+
* grants.
|
|
1180
|
+
*
|
|
1181
|
+
* Ordered by `user_id` and paginated with `page_token`.
|
|
1182
|
+
*
|
|
1183
|
+
* Accepts either a project secret (`oauth2`) or a user-bound Console
|
|
1184
|
+
* session cookie (`nextgenSession`) that can read the project.
|
|
1185
|
+
* @summary List project admins
|
|
1186
|
+
*/
|
|
1187
|
+
const listProjectAdmins = async (projectId, params, options) => {
|
|
1188
|
+
return customFetch(getListProjectAdminsUrl(projectId, params), {
|
|
1189
|
+
...options,
|
|
1190
|
+
method: "GET"
|
|
1191
|
+
});
|
|
1192
|
+
};
|
|
1144
1193
|
const getInitClaimUrl = (projectId) => {
|
|
1145
1194
|
return `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/claim/init`;
|
|
1146
1195
|
};
|
|
@@ -2116,6 +2165,141 @@ const getIdpRevisionById = async (revisionId, params, options) => {
|
|
|
2116
2165
|
method: "GET"
|
|
2117
2166
|
});
|
|
2118
2167
|
};
|
|
2168
|
+
const getListPoliciesUrl = (params) => {
|
|
2169
|
+
const normalizedParams = new URLSearchParams();
|
|
2170
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2171
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2172
|
+
});
|
|
2173
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2174
|
+
return stringifiedParams.length > 0 ? `${getProxyPath()}/policies?${stringifiedParams}` : `${getProxyPath()}/policies`;
|
|
2175
|
+
};
|
|
2176
|
+
/**
|
|
2177
|
+
* Lists the project's policies, one per operation, each as its newest
|
|
2178
|
+
* revision, ordered by `created_at` (first publish) and then `id`. Filter
|
|
2179
|
+
* by `operation` to read the policy of one operation; a project that never
|
|
2180
|
+
* published one gets an empty list.
|
|
2181
|
+
*
|
|
2182
|
+
* The lookup is scoped to the project in `project_id`.
|
|
2183
|
+
* @summary List policies
|
|
2184
|
+
*/
|
|
2185
|
+
const listPolicies = async (params, options) => {
|
|
2186
|
+
return customFetch(getListPoliciesUrl(params), {
|
|
2187
|
+
...options,
|
|
2188
|
+
method: "GET"
|
|
2189
|
+
});
|
|
2190
|
+
};
|
|
2191
|
+
const getPublishPolicyUrl = (params) => {
|
|
2192
|
+
const normalizedParams = new URLSearchParams();
|
|
2193
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2194
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2195
|
+
});
|
|
2196
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2197
|
+
return stringifiedParams.length > 0 ? `${getProxyPath()}/policies?${stringifiedParams}` : `${getProxyPath()}/policies`;
|
|
2198
|
+
};
|
|
2199
|
+
/**
|
|
2200
|
+
* Publishes the project's policy for an operation as a new immutable
|
|
2201
|
+
* revision, creating the policy on its first publish. The newest revision
|
|
2202
|
+
* applies to the next time the operation runs; nothing already stored is
|
|
2203
|
+
* re-evaluated, so a stricter password policy applies the next time a
|
|
2204
|
+
* password is set.
|
|
2205
|
+
*
|
|
2206
|
+
* The request is typed by `operation`: an unknown operation or setting, or
|
|
2207
|
+
* a value of the wrong type or outside its bounds, answers `req.invalid`
|
|
2208
|
+
* like any malformed request. The operation's template then checks the
|
|
2209
|
+
* config again, together with the rules that relate settings to each other
|
|
2210
|
+
* (a `min_length` above `max_length`), and answers `pol.invalid`. Its
|
|
2211
|
+
* `details.details.violations` lists everything that failed, settings
|
|
2212
|
+
* first, then rules: `{"setting": "min_length"}` for one setting, or
|
|
2213
|
+
* `{"config_rule": "min_length_not_above_max_length", "settings":
|
|
2214
|
+
* ["min_length", "max_length"]}` for a rule across settings, with the
|
|
2215
|
+
* settings it reads. A setting left out is off, and `{}` switches every
|
|
2216
|
+
* rule off; there are no defaults.
|
|
2217
|
+
* @summary Publish a policy
|
|
2218
|
+
*/
|
|
2219
|
+
const publishPolicy = async (publishPolicyBody, params, options) => {
|
|
2220
|
+
const getHeaders = (h) => {
|
|
2221
|
+
if (!h) return {};
|
|
2222
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2223
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
2224
|
+
const headers = {};
|
|
2225
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
2226
|
+
return headers;
|
|
2227
|
+
};
|
|
2228
|
+
return customFetch(getPublishPolicyUrl(params), {
|
|
2229
|
+
...options,
|
|
2230
|
+
method: "POST",
|
|
2231
|
+
headers: {
|
|
2232
|
+
"Content-Type": "application/json",
|
|
2233
|
+
...getHeaders(options?.headers)
|
|
2234
|
+
},
|
|
2235
|
+
body: JSON.stringify(publishPolicyBody)
|
|
2236
|
+
});
|
|
2237
|
+
};
|
|
2238
|
+
const getGetPolicyUrl = (policyId, params) => {
|
|
2239
|
+
const normalizedParams = new URLSearchParams();
|
|
2240
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2241
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2242
|
+
});
|
|
2243
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2244
|
+
return stringifiedParams.length > 0 ? `${getProxyPath()}/policies/${encodeURIComponent(String(policyId))}?${stringifiedParams}` : `${getProxyPath()}/policies/${encodeURIComponent(String(policyId))}`;
|
|
2245
|
+
};
|
|
2246
|
+
/**
|
|
2247
|
+
* Reads a policy as its newest revision, the one that applies the next time
|
|
2248
|
+
* its operation runs.
|
|
2249
|
+
*
|
|
2250
|
+
* The lookup is scoped to the project in `project_id`: a policy of another
|
|
2251
|
+
* project answers not found exactly as an unknown id does.
|
|
2252
|
+
* @summary Get a policy
|
|
2253
|
+
*/
|
|
2254
|
+
const getPolicy = async (policyId, params, options) => {
|
|
2255
|
+
return customFetch(getGetPolicyUrl(policyId, params), {
|
|
2256
|
+
...options,
|
|
2257
|
+
method: "GET"
|
|
2258
|
+
});
|
|
2259
|
+
};
|
|
2260
|
+
const getListPolicyRevisionsUrl = (policyId, params) => {
|
|
2261
|
+
const normalizedParams = new URLSearchParams();
|
|
2262
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2263
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2264
|
+
});
|
|
2265
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2266
|
+
return stringifiedParams.length > 0 ? `${getProxyPath()}/policies/${encodeURIComponent(String(policyId))}/revisions?${stringifiedParams}` : `${getProxyPath()}/policies/${encodeURIComponent(String(policyId))}/revisions`;
|
|
2267
|
+
};
|
|
2268
|
+
/**
|
|
2269
|
+
* Returns every revision of one policy, newest first, paginated with a
|
|
2270
|
+
* cursor. The order is fixed, so there is no `sorting`.
|
|
2271
|
+
*
|
|
2272
|
+
* The lookup is scoped to the project in `project_id`: a policy of another
|
|
2273
|
+
* project answers not found exactly as an unknown id does.
|
|
2274
|
+
* @summary List the revisions of a policy
|
|
2275
|
+
*/
|
|
2276
|
+
const listPolicyRevisions = async (policyId, params, options) => {
|
|
2277
|
+
return customFetch(getListPolicyRevisionsUrl(policyId, params), {
|
|
2278
|
+
...options,
|
|
2279
|
+
method: "GET"
|
|
2280
|
+
});
|
|
2281
|
+
};
|
|
2282
|
+
const getGetPolicyRevisionUrl = (revisionId, params) => {
|
|
2283
|
+
const normalizedParams = new URLSearchParams();
|
|
2284
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2285
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2286
|
+
});
|
|
2287
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2288
|
+
return stringifiedParams.length > 0 ? `${getProxyPath()}/policies/revisions/${encodeURIComponent(String(revisionId))}?${stringifiedParams}` : `${getProxyPath()}/policies/revisions/${encodeURIComponent(String(revisionId))}`;
|
|
2289
|
+
};
|
|
2290
|
+
/**
|
|
2291
|
+
* Reads one revision of a policy, newest or not.
|
|
2292
|
+
*
|
|
2293
|
+
* The lookup is scoped to the project in `project_id`: a revision of another
|
|
2294
|
+
* project answers not found exactly as an unknown id does.
|
|
2295
|
+
* @summary Get a policy revision
|
|
2296
|
+
*/
|
|
2297
|
+
const getPolicyRevision = async (revisionId, params, options) => {
|
|
2298
|
+
return customFetch(getGetPolicyRevisionUrl(revisionId, params), {
|
|
2299
|
+
...options,
|
|
2300
|
+
method: "GET"
|
|
2301
|
+
});
|
|
2302
|
+
};
|
|
2119
2303
|
const getCreateReleaseUrl = (params) => {
|
|
2120
2304
|
const normalizedParams = new URLSearchParams();
|
|
2121
2305
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -2211,7 +2395,9 @@ const getBuildReleaseUrl = (params) => {
|
|
|
2211
2395
|
* allocates nothing, however long ago it was built. Otherwise every resource is compared against the
|
|
2212
2396
|
* project's newest revision of the same handle: unchanged content reuses
|
|
2213
2397
|
* that revision, changed content allocates a new one, and the request
|
|
2214
|
-
* answers `201` with the new release.
|
|
2398
|
+
* answers `201` with the new release. A policy whose config matches only an
|
|
2399
|
+
* older revision allocates a new one too, so a request that resolves no
|
|
2400
|
+
* release, which reads the newest revision, applies it as well. Metadata is excluded from the
|
|
2215
2401
|
* comparison, so the same content under a different `message` is the same
|
|
2216
2402
|
* release.
|
|
2217
2403
|
*
|
|
@@ -2225,8 +2411,8 @@ const getBuildReleaseUrl = (params) => {
|
|
|
2225
2411
|
*
|
|
2226
2412
|
* Building writes revisions, so besides `release.write` it needs the write
|
|
2227
2413
|
* scope of every kind the bundle carries a resource of: `schema.write`,
|
|
2228
|
-
* `flow_definition.write`, `branding.write
|
|
2229
|
-
* per-kind create endpoints do. A missing scope answers `403` with `rel.permission_denied`,
|
|
2414
|
+
* `flow_definition.write`, `branding.write`, `idp.write` and
|
|
2415
|
+
* `policy.write`, as the per-kind create endpoints do. A missing scope answers `403` with `rel.permission_denied`,
|
|
2230
2416
|
* naming the kind. An empty kind needs no scope.
|
|
2231
2417
|
*
|
|
2232
2418
|
* Building a release does not deploy it. A release is not tied to an
|
|
@@ -2672,11 +2858,11 @@ const getCreateDeploymentUrl = (params) => {
|
|
|
2672
2858
|
* - `400 dep.invalid`: both or neither of `release_id` and `content_hash`;
|
|
2673
2859
|
* a primary origin named exactly; `primary` mixed with preview URLs;
|
|
2674
2860
|
* `primary` on a project with no primary origin; `ttl` with `primary`;
|
|
2675
|
-
* `ttl` above
|
|
2861
|
+
* `ttl` above 365 days (`P365D`).
|
|
2676
2862
|
* - `400 dep.variables_missing`: a referenced variable has no value for
|
|
2677
2863
|
* the kind; `details` names the kind and every missing variable.
|
|
2678
2864
|
* - `403 proj.origin_not_allowed`: a preview URL matches no preview
|
|
2679
|
-
* pattern.
|
|
2865
|
+
* pattern, or is a loopback URL.
|
|
2680
2866
|
* - `404 rel.not_found`: the release id or digest names no release here.
|
|
2681
2867
|
* - `409 dep.conflict`: `expected_deployment_id` is not the deployment
|
|
2682
2868
|
* this write replaces; `details.deployment` is that deployment.
|
|
@@ -2828,6 +3014,6 @@ const getDeploymentVariables = async (deploymentId, params, options) => {
|
|
|
2828
3014
|
});
|
|
2829
3015
|
};
|
|
2830
3016
|
//#endregion
|
|
2831
|
-
export { addOrigin, beginUserPasskeyRegistration, buildRelease, completeClaim, createAuthAttempt, createBranding, createDeployment, createFlow, createFlowDefinition, createGrant, createHandoff, createIdp, createProject, createRelease, createSchema, createSession, createTeam, createUser, deleteGrant, deleteTeam, deleteUserByID, deleteVariable, exchangeHandoff, finishUserPasskeyRegistration, getAddOriginUrl, getAuthAttempt, getBeginUserPasskeyRegistrationUrl, getBrandingById, getBuildReleaseUrl, getClaimStatus, getClaimWindow, getCompleteClaimUrl, getCreateAuthAttemptUrl, getCreateBrandingUrl, getCreateDeploymentUrl, getCreateFlowDefinitionUrl, getCreateFlowUrl, getCreateGrantUrl, getCreateHandoffUrl, getCreateIdpUrl, getCreateProjectUrl, getCreateReleaseUrl, getCreateSchemaUrl, getCreateSessionUrl, getCreateTeamUrl, getCreateUserUrl, getDeleteGrantUrl, getDeleteTeamUrl, getDeleteUserByIDUrl, getDeleteVariableUrl, getDeploymentById, getDeploymentVariables, getEvent, getExchangeHandoffUrl, getFinishUserPasskeyRegistrationUrl, getFlowDefinition, getFlowStep, getGetAuthAttemptUrl, getGetBrandingByIdUrl, getGetClaimStatusUrl, getGetClaimWindowUrl, getGetDeploymentByIdUrl, getGetDeploymentVariablesUrl, getGetEventUrl, getGetFlowDefinitionUrl, getGetFlowStepUrl, getGetGrantUrl,
|
|
3017
|
+
export { addOrigin, beginUserPasskeyRegistration, buildRelease, completeClaim, createAuthAttempt, createBranding, createDeployment, createFlow, createFlowDefinition, createGrant, createHandoff, createIdp, createProject, createRelease, createSchema, createSession, createTeam, createUser, deleteGrant, deleteTeam, deleteUserByID, deleteVariable, exchangeHandoff, finishUserPasskeyRegistration, getAddOriginUrl, getAuthAttempt, getBeginUserPasskeyRegistrationUrl, getBrandingById, getBuildReleaseUrl, getClaimStatus, getClaimWindow, getCompleteClaimUrl, getCreateAuthAttemptUrl, getCreateBrandingUrl, getCreateDeploymentUrl, getCreateFlowDefinitionUrl, getCreateFlowUrl, getCreateGrantUrl, getCreateHandoffUrl, getCreateIdpUrl, getCreateProjectUrl, getCreateReleaseUrl, getCreateSchemaUrl, getCreateSessionUrl, getCreateTeamUrl, getCreateUserUrl, getDeleteGrantUrl, getDeleteTeamUrl, getDeleteUserByIDUrl, getDeleteVariableUrl, getDeploymentById, getDeploymentVariables, getEvent, getExchangeHandoffUrl, getFinishUserPasskeyRegistrationUrl, getFlowDefinition, getFlowStep, getGetAuthAttemptUrl, getGetBrandingByIdUrl, getGetClaimStatusUrl, getGetClaimWindowUrl, getGetDeploymentByIdUrl, getGetDeploymentVariablesUrl, getGetEventUrl, getGetFlowDefinitionUrl, getGetFlowStepUrl, getGetGrantUrl, getGetIdpByIdUrl, getGetIdpRevisionByIdUrl, getGetLiveUrl, getGetMyPasswordStateUrl, getGetMySessionCsrfTokenUrl, getGetMySessionUrl, getGetMyUserSchemaUrl, getGetMyUserUrl, getGetPolicyRevisionUrl, getGetPolicyUrl, getGetProjectUrl, getGetReadyUrl, getGetReleaseByIdUrl, getGetSchemaByIdUrl, getGetSessionUrl, getGetTeamUrl, getGetUserByIDUrl, getGetUserPasswordStateUrl, getGetVariableUrl, getGetVariablesUrl, getGrant, getIdpById, getIdpRevisionById, getInitClaimUrl, getIssueChallengeUrl, getListBrandingUrl, getListDeploymentsUrl, getListEventsUrl, getListFlowDefinitionsUrl, getListIdpRevisionsUrl, getListMyIdentityLinksUrl, getListMyPasskeysUrl, getListMyProjectsUrl, getListMyTeamsUrl, getListPoliciesUrl, getListPolicyRevisionsUrl, getListPreviewsUrl, getListProjectAdminsUrl, getListReleasesUrl, getListSchemasUrl, getListUserIdentityLinksUrl, getListUserPasskeysUrl, getListUserTeamsUrl, getLive, getMyPasswordState, getMySession, getMySessionCsrfToken, getMyUser, getMyUserSchema, getPatchMyUserUrl, getPatchProjectUrl, getPatchUserByIDUrl, getPolicy, getPolicyRevision, getProject, getPublishPolicyUrl, getQueryGrantsUrl, getQueryIdpsUrl, getQueryProjectsUrl, getQuerySessionsUrl, getQueryTeamsUrl, getQueryUsersUrl, getReady, getReleaseById, getRemoveOriginUrl, getRemovePreviewUrl, getRevokeMySessionUrl, getRevokeReleaseUrl, getRevokeSessionUrl, getRollbackDeploymentUrl, getSchemaById, getSession, getSetUserPasswordUrl, getSubmitFlowStepUrl, getTeam, getUpdateTeamUrl, getUpdateVariablesUrl, getUserByID, getUserPasswordState, getVariable, getVariables, getVerifyChallengeProofUrl, initClaim, issueChallenge, listBranding, listDeployments, listEvents, listFlowDefinitions, listIdpRevisions, listMyIdentityLinks, listMyPasskeys, listMyProjects, listMyTeams, listPolicies, listPolicyRevisions, listPreviews, listProjectAdmins, listReleases, listSchemas, listUserIdentityLinks, listUserPasskeys, listUserTeams, patchMyUser, patchProject, patchUserByID, publishPolicy, queryGrants, queryIdps, queryProjects, querySessions, queryTeams, queryUsers, removeOrigin, removePreview, revokeMySession, revokeRelease, revokeSession, rollbackDeployment, setUserPassword, submitFlowStep, zitadelNextGen_exports as t, updateTeam, updateVariables, verifyChallengeProof };
|
|
2832
3018
|
|
|
2833
3019
|
//# sourceMappingURL=zitadelNextGen.mjs.map
|