@zitadel/api 0.1.0-alpha.18 → 0.1.0-alpha.19
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/README.md +38 -3
- package/dist/generated/endpoints/zitadelNextGen.d.mts +2 -2
- package/dist/generated/endpoints/zitadelNextGen.mjs +104 -98
- package/dist/generated/endpoints/zitadelNextGen.mjs.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.msw.d.mts +6 -2
- package/dist/generated/endpoints/zitadelNextGen.msw.d.mts.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.msw.mjs +5132 -262
- package/dist/generated/endpoints/zitadelNextGen.msw.mjs.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.zod.d.mts +2523 -110
- package/dist/generated/endpoints/zitadelNextGen.zod.d.mts.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.zod.mjs +2581 -143
- 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 +29 -5
- package/dist/generated/model/index.mjs.map +1 -1
- package/dist/{index-D6qIOslB.d.mts → index-Dt_0fSH9.d.mts} +2759 -390
- package/dist/index-Dt_0fSH9.d.mts.map +1 -0
- package/dist/runtime/api-factory.d.mts +1 -1
- package/dist/{zitadelNextGen-BCljAZpG.d.mts → zitadelNextGen-BkDpEAS9.d.mts} +62 -35
- package/dist/zitadelNextGen-BkDpEAS9.d.mts.map +1 -0
- package/package.json +1 -1
- package/src/generated/endpoints/zitadelNextGen.msw.ts +5330 -241
- package/src/generated/endpoints/zitadelNextGen.ts +129 -209
- package/src/generated/endpoints/zitadelNextGen.zod.ts +4635 -336
- package/src/generated/model/createAuthAttemptDefault.ts +10 -0
- package/src/generated/model/createFlowDefault.ts +10 -0
- package/src/generated/model/createFlowDefinition201FlowDefinitionStepsItemTransitions.ts +11 -0
- package/src/generated/model/createFlowDefinitionBodyFlowDefinitionStepsItemTransitions.ts +11 -0
- package/src/generated/model/createFlowDefinitionDefault.ts +10 -0
- package/src/generated/model/createHandoffDefault.ts +10 -0
- package/src/generated/model/createProjectDefault.ts +20 -0
- package/src/generated/model/createSchemaBody.ts +5 -34
- package/src/generated/model/createSession201Session.ts +1 -1
- package/src/generated/model/createSession201SessionState.ts +1 -1
- package/src/generated/model/createSessionDefault.ts +20 -0
- package/src/generated/model/createUser201.ts +24 -4
- package/src/generated/model/createUser201Attributes.ts +14 -0
- package/src/generated/model/{createUserBodyMetadata.ts → createUser201Metadata.ts} +3 -3
- package/src/generated/model/{createUserBodyMetadataStatus.ts → createUser201MetadataStatus.ts} +3 -3
- package/src/generated/model/createUser500.ts +20 -0
- package/src/generated/model/{deleteTeamParams.ts → createUser500Details.ts} +4 -7
- package/src/generated/model/createUserBody.ts +22 -11
- package/src/generated/model/createUserBodyAttributes.ts +14 -0
- package/src/generated/model/createUserDefault.ts +10 -0
- package/src/generated/model/deleteFlowDefinitionDefault.ts +10 -0
- package/src/generated/model/deleteUserByIDDefault.ts +10 -0
- package/src/generated/model/exchangeHandoff200Session.ts +1 -1
- package/src/generated/model/exchangeHandoff200SessionState.ts +1 -1
- package/src/generated/model/exchangeHandoffDefault.ts +10 -0
- package/src/generated/model/getEvent200.ts +1372 -0
- package/src/generated/model/getEvent401.ts +20 -0
- package/src/generated/model/{getSessionParams.ts → getEvent401Details.ts} +4 -7
- package/src/generated/model/getEvent403.ts +20 -0
- package/src/generated/model/getEvent403Details.ts +12 -0
- package/src/generated/model/getEvent404.ts +20 -0
- package/src/generated/model/getEvent404Details.ts +12 -0
- package/src/generated/model/getEventDefault.ts +20 -0
- package/src/generated/model/getEventDefaultDetails.ts +12 -0
- package/src/generated/model/{getTeamParams.ts → getEventParams.ts} +1 -1
- package/src/generated/model/getFlowDefinition200FlowDefinitionStepsItemTransitions.ts +11 -0
- package/src/generated/model/getMySession200.ts +1 -1
- package/src/generated/model/getMySession200State.ts +1 -1
- package/src/generated/model/getMyUser200.ts +20 -7
- package/src/generated/model/getMyUser200Attributes.ts +14 -0
- package/src/generated/model/getSchemaById200.ts +5 -34
- package/src/generated/model/getSchemaByIdParams.ts +0 -5
- package/src/generated/model/getSession200.ts +1 -1
- package/src/generated/model/getSession200State.ts +1 -1
- package/src/generated/model/getUserByID200.ts +20 -7
- package/src/generated/model/getUserByID200Attributes.ts +14 -0
- package/src/generated/model/getUserByIDParams.ts +0 -5
- package/src/generated/model/index.ts +32 -13
- package/src/generated/model/listEvents200.ts +19 -0
- package/src/generated/model/listEvents200DataItem.ts +1372 -0
- package/src/generated/model/listEvents400.ts +20 -0
- package/src/generated/model/listEvents400Details.ts +12 -0
- package/src/generated/model/listEvents401.ts +20 -0
- package/src/generated/model/listEvents401Details.ts +12 -0
- package/src/generated/model/listEvents403.ts +20 -0
- package/src/generated/model/listEvents403Details.ts +12 -0
- package/src/generated/model/listEventsCategoryItem.ts +19 -0
- package/src/generated/model/listEventsDefault.ts +20 -0
- package/src/generated/model/{getFlowDefinitionParams.ts → listEventsDefaultDetails.ts} +4 -7
- package/src/generated/model/{getBrandingByIdParams.ts → listEventsOrder.ts} +6 -7
- package/src/generated/model/listEventsParams.ts +67 -0
- package/src/generated/model/listUserPasskeysParams.ts +0 -5
- package/src/generated/model/listUserTeamsDefault.ts +0 -20
- package/src/generated/model/listUserTeamsParams.ts +0 -5
- package/src/generated/model/listUsers200UsersItem.ts +20 -7
- package/src/generated/model/listUsers200UsersItemAttributes.ts +14 -0
- package/src/generated/model/patchProjectDefault.ts +10 -0
- package/src/generated/model/queryProjectsBodyFilterItem.ts +4 -0
- package/src/generated/model/queryProjectsBodyFilterItemOperation.ts +4 -0
- package/src/generated/model/querySessions200SessionsItem.ts +1 -1
- package/src/generated/model/querySessions200SessionsItemState.ts +1 -1
- package/src/generated/model/querySessionsBodyFilterItem.ts +6 -1
- package/src/generated/model/querySessionsBodyFilterItemField.ts +2 -1
- package/src/generated/model/querySessionsBodyFilterItemOperation.ts +4 -0
- package/src/generated/model/querySessionsDefault.ts +10 -0
- package/src/generated/model/queryTeamsBodyFilterItem.ts +9 -0
- package/src/generated/model/queryTeamsBodyFilterItemField.ts +9 -0
- package/src/generated/model/queryTeamsBodyFilterItemOperation.ts +4 -0
- package/src/generated/model/queryTeamsBodySorting.ts +5 -0
- package/src/generated/model/queryTeamsBodySortingField.ts +9 -0
- package/src/generated/model/revokeMySessionDefault.ts +10 -0
- package/src/generated/model/revokeSessionDefault.ts +10 -0
- package/src/generated/model/setUserPasswordDefault.ts +10 -0
- package/src/generated/model/submitFlowStepDefault.ts +10 -0
- package/src/generated/model/updateFlowDefinition200FlowDefinitionStepsItemTransitions.ts +11 -0
- package/src/generated/model/updateFlowDefinitionBodyFlowDefinitionStepsItemTransitions.ts +11 -0
- package/src/generated/model/updateFlowDefinitionDefault.ts +10 -0
- package/src/generated/model/verifyChallengeProofDefault.ts +10 -0
- package/dist/index-D6qIOslB.d.mts.map +0 -1
- package/dist/zitadelNextGen-BCljAZpG.d.mts.map +0 -1
- package/src/generated/model/deleteFlowDefinitionParams.ts +0 -15
- package/src/generated/model/deleteUserByIDParams.ts +0 -15
- package/src/generated/model/revokeSessionParams.ts +0 -15
- package/src/generated/model/setUserPasswordParams.ts +0 -15
- package/src/generated/model/updateFlowDefinitionParams.ts +0 -15
- package/src/generated/model/updateTeamParams.ts +0 -15
package/README.md
CHANGED
|
@@ -1,9 +1,44 @@
|
|
|
1
1
|
# @zitadel/api
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The generated TypeScript client for the Zitadel API, plus the runtime
|
|
4
|
+
configuration every SDK and the shared components build on.
|
|
5
|
+
|
|
6
|
+
## Configure once, get a typed client
|
|
7
|
+
|
|
8
|
+
`configureZitadel()` (from `@zitadel/api/config`) is the primary entry point —
|
|
9
|
+
it initializes app-wide SDK configuration and returns a frozen, write-once
|
|
10
|
+
`ZitadelProject` handle. `getApi()` returns the typed client bound to it:
|
|
4
11
|
|
|
5
12
|
```ts
|
|
6
|
-
import {
|
|
13
|
+
import { configureZitadel, getApi } from "@zitadel/api/config";
|
|
7
14
|
|
|
8
|
-
|
|
15
|
+
const project = configureZitadel({
|
|
16
|
+
projectId: "proj_01HEXAMPLE",
|
|
17
|
+
proxyPath: "/__nextgen", // default
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export const api = getApi(project);
|
|
9
21
|
```
|
|
22
|
+
|
|
23
|
+
Subsequent `configureZitadel()` calls with the same values return the original
|
|
24
|
+
handle; different values log a warning and keep the original — safe for HMR
|
|
25
|
+
and framework double-mounts. The same handle is what you pass to the shared
|
|
26
|
+
web components' `project` property.
|
|
27
|
+
|
|
28
|
+
## Entry points
|
|
29
|
+
|
|
30
|
+
| Import | What it carries |
|
|
31
|
+
| --- | --- |
|
|
32
|
+
| `@zitadel/api/config` | `configureZitadel()`, `getApi()` — the primary surface |
|
|
33
|
+
| `@zitadel/api/client` | The client wrapper the SDKs consume |
|
|
34
|
+
| `@zitadel/api/generated/endpoints/zitadelNextGen` | Generated endpoint functions (orval, from the OpenAPI source) |
|
|
35
|
+
| `@zitadel/api/generated/model` | Generated request/response types |
|
|
36
|
+
| `@zitadel/api/generated/endpoints/zitadelNextGen.zod` | Zod schemas per endpoint |
|
|
37
|
+
| `@zitadel/api/generated/endpoints/zitadelNextGen.msw` | MSW handlers for tests |
|
|
38
|
+
| `@zitadel/api/runtime/base-url` | `setProxyPath()` / `getProxyPath()` — the low-level slot `configureZitadel()` writes; call it directly only when you manage configuration yourself |
|
|
39
|
+
| `@zitadel/api/runtime/auth` | `getApiAuthToken()` and bearer plumbing |
|
|
40
|
+
| `@zitadel/api/runtime/fetch` | The shared `customFetch` interceptor |
|
|
41
|
+
|
|
42
|
+
The generated files come from the OpenAPI 3.1 source in the
|
|
43
|
+
[`zitadel/nextgen`](https://github.com/zitadel/nextgen) repository — do not
|
|
44
|
+
hand-edit them; the spec is the source of truth.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { completeClaim, createAuthAttempt, createBranding, createFlow, createFlowDefinition, createHandoff, createProject, createSchema, createSession, createTeam, createUser, deleteFlowDefinition, deleteTeam, deleteUserByID, exchangeHandoff, getAuthAttempt, getBrandingById, getClaimStatus, getCompleteClaimUrl, getCreateAuthAttemptUrl, getCreateBrandingUrl, getCreateFlowDefinitionUrl, getCreateFlowUrl, getCreateHandoffUrl, getCreateProjectUrl, getCreateSchemaUrl, getCreateSessionUrl, getCreateTeamUrl, getCreateUserUrl, getDeleteFlowDefinitionUrl, getDeleteTeamUrl, getDeleteUserByIDUrl, getExchangeHandoffUrl, getFlowDefinition, getFlowStep, getGetAuthAttemptUrl, getGetBrandingByIdUrl, getGetClaimStatusUrl, getGetFlowDefinitionUrl, getGetFlowStepUrl, getGetHealthUrl, getGetLiveUrl, getGetMySessionUrl, getGetMyUserUrl, getGetProjectUrl, getGetReadyUrl, getGetSchemaByIdUrl, getGetSessionUrl, getGetTeamUrl, getGetUserByIDUrl, getHealth, getInitClaimUrl, getIssueChallengeUrl, getListBrandingUrl, getListFlowDefinitionsUrl, getListSchemasUrl, getListUserPasskeysUrl, getListUserTeamsUrl, getListUsersUrl, getLive, getMySession, getMyUser, getPatchProjectUrl, getProject, getQueryProjectsUrl, getQuerySessionsUrl, getQueryTeamsUrl, getReady, getRevokeMySessionUrl, getRevokeSessionUrl, getSchemaById, getSession, getSetUserPasswordUrl, getSubmitFlowStepUrl, getTeam, getUpdateFlowDefinitionUrl, getUpdateTeamUrl, getUserByID, getVerifyChallengeProofUrl, initClaim, issueChallenge, listBranding, listFlowDefinitions, listSchemas, listUserPasskeys, listUserTeams, listUsers, patchProject, queryProjects, querySessions, queryTeams, revokeMySession, revokeSession, setUserPassword, submitFlowStep, updateFlowDefinition, updateTeam, verifyChallengeProof };
|
|
1
|
+
import { $ as getHealth, A as getDeleteFlowDefinitionUrl, At as issueChallenge, B as getGetEventUrl, Bt as querySessions, C as getCreateFlowUrl, Ct as getSubmitFlowStepUrl, D as getCreateSessionUrl, Dt as getUserByID, E as getCreateSchemaUrl, Et as getUpdateTeamUrl, F as getFlowDefinition, Ft as listUserPasskeys, G as getGetMySessionUrl, Gt as submitFlowStep, H as getGetFlowStepUrl, Ht as revokeMySession, I as getFlowStep, It as listUserTeams, J as getGetReadyUrl, Jt as verifyChallengeProof, K as getGetMyUserUrl, Kt as updateFlowDefinition, L as getGetAuthAttemptUrl, Lt as listUsers, M as getDeleteUserByIDUrl, Mt as listEvents, N as getEvent, Nt as listFlowDefinitions, O as getCreateTeamUrl, Ot as getVerifyChallengeProofUrl, P as getExchangeHandoffUrl, Pt as listSchemas, Q as getGetUserByIDUrl, R as getGetBrandingByIdUrl, Rt as patchProject, S as getCreateFlowDefinitionUrl, St as getSetUserPasswordUrl, T as getCreateProjectUrl, Tt as getUpdateFlowDefinitionUrl, U as getGetHealthUrl, Ut as revokeSession, V as getGetFlowDefinitionUrl, Vt as queryTeams, W as getGetLiveUrl, Wt as setUserPassword, X as getGetSessionUrl, Y as getGetSchemaByIdUrl, Z as getGetTeamUrl, _ as getBrandingById, _t as getReady, a as createFlowDefinition, at as getListSchemasUrl, b as getCreateAuthAttemptUrl, bt as getSchemaById, c as createSchema, ct as getListUsersUrl, d as createUser, dt as getMyUser, et as getInitClaimUrl, f as deleteFlowDefinition, ft as getPatchProjectUrl, g as getAuthAttempt, gt as getQueryTeamsUrl, h as exchangeHandoff, ht as getQuerySessionsUrl, i as createFlow, it as getListFlowDefinitionsUrl, j as getDeleteTeamUrl, jt as listBranding, k as getCreateUserUrl, kt as initClaim, l as createSession, lt as getLive, m as deleteUserByID, mt as getQueryProjectsUrl, n as createAuthAttempt, nt as getListBrandingUrl, o as createHandoff, ot as getListUserPasskeysUrl, p as deleteTeam, pt as getProject, q as getGetProjectUrl, qt as updateTeam, r as createBranding, rt as getListEventsUrl, s as createProject, st as getListUserTeamsUrl, t as completeClaim, tt as getIssueChallengeUrl, u as createTeam, ut as getMySession, v as getClaimStatus, vt as getRevokeMySessionUrl, w as getCreateHandoffUrl, wt as getTeam, x as getCreateBrandingUrl, xt as getSession, y as getCompleteClaimUrl, yt as getRevokeSessionUrl, z as getGetClaimStatusUrl, zt as queryProjects } from "../../zitadelNextGen-BkDpEAS9.mjs";
|
|
2
|
+
export { completeClaim, createAuthAttempt, createBranding, createFlow, createFlowDefinition, createHandoff, createProject, createSchema, createSession, createTeam, createUser, deleteFlowDefinition, deleteTeam, deleteUserByID, exchangeHandoff, getAuthAttempt, getBrandingById, getClaimStatus, getCompleteClaimUrl, getCreateAuthAttemptUrl, getCreateBrandingUrl, getCreateFlowDefinitionUrl, getCreateFlowUrl, getCreateHandoffUrl, getCreateProjectUrl, getCreateSchemaUrl, getCreateSessionUrl, getCreateTeamUrl, getCreateUserUrl, getDeleteFlowDefinitionUrl, getDeleteTeamUrl, getDeleteUserByIDUrl, getEvent, getExchangeHandoffUrl, getFlowDefinition, getFlowStep, getGetAuthAttemptUrl, getGetBrandingByIdUrl, getGetClaimStatusUrl, getGetEventUrl, getGetFlowDefinitionUrl, getGetFlowStepUrl, getGetHealthUrl, getGetLiveUrl, getGetMySessionUrl, getGetMyUserUrl, getGetProjectUrl, getGetReadyUrl, getGetSchemaByIdUrl, getGetSessionUrl, getGetTeamUrl, getGetUserByIDUrl, getHealth, getInitClaimUrl, getIssueChallengeUrl, getListBrandingUrl, getListEventsUrl, getListFlowDefinitionsUrl, getListSchemasUrl, getListUserPasskeysUrl, getListUserTeamsUrl, getListUsersUrl, getLive, getMySession, getMyUser, getPatchProjectUrl, getProject, getQueryProjectsUrl, getQuerySessionsUrl, getQueryTeamsUrl, getReady, getRevokeMySessionUrl, getRevokeSessionUrl, getSchemaById, getSession, getSetUserPasswordUrl, getSubmitFlowStepUrl, getTeam, getUpdateFlowDefinitionUrl, getUpdateTeamUrl, getUserByID, getVerifyChallengeProofUrl, initClaim, issueChallenge, listBranding, listEvents, listFlowDefinitions, listSchemas, listUserPasskeys, listUserTeams, listUsers, patchProject, queryProjects, querySessions, queryTeams, revokeMySession, revokeSession, setUserPassword, submitFlowStep, updateFlowDefinition, updateTeam, verifyChallengeProof };
|
|
@@ -42,12 +42,14 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
|
|
|
42
42
|
getDeleteFlowDefinitionUrl: () => getDeleteFlowDefinitionUrl,
|
|
43
43
|
getDeleteTeamUrl: () => getDeleteTeamUrl,
|
|
44
44
|
getDeleteUserByIDUrl: () => getDeleteUserByIDUrl,
|
|
45
|
+
getEvent: () => getEvent,
|
|
45
46
|
getExchangeHandoffUrl: () => getExchangeHandoffUrl,
|
|
46
47
|
getFlowDefinition: () => getFlowDefinition,
|
|
47
48
|
getFlowStep: () => getFlowStep,
|
|
48
49
|
getGetAuthAttemptUrl: () => getGetAuthAttemptUrl,
|
|
49
50
|
getGetBrandingByIdUrl: () => getGetBrandingByIdUrl,
|
|
50
51
|
getGetClaimStatusUrl: () => getGetClaimStatusUrl,
|
|
52
|
+
getGetEventUrl: () => getGetEventUrl,
|
|
51
53
|
getGetFlowDefinitionUrl: () => getGetFlowDefinitionUrl,
|
|
52
54
|
getGetFlowStepUrl: () => getGetFlowStepUrl,
|
|
53
55
|
getGetHealthUrl: () => getGetHealthUrl,
|
|
@@ -64,6 +66,7 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
|
|
|
64
66
|
getInitClaimUrl: () => getInitClaimUrl,
|
|
65
67
|
getIssueChallengeUrl: () => getIssueChallengeUrl,
|
|
66
68
|
getListBrandingUrl: () => getListBrandingUrl,
|
|
69
|
+
getListEventsUrl: () => getListEventsUrl,
|
|
67
70
|
getListFlowDefinitionsUrl: () => getListFlowDefinitionsUrl,
|
|
68
71
|
getListSchemasUrl: () => getListSchemasUrl,
|
|
69
72
|
getListUserPasskeysUrl: () => getListUserPasskeysUrl,
|
|
@@ -92,6 +95,7 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
|
|
|
92
95
|
initClaim: () => initClaim,
|
|
93
96
|
issueChallenge: () => issueChallenge,
|
|
94
97
|
listBranding: () => listBranding,
|
|
98
|
+
listEvents: () => listEvents,
|
|
95
99
|
listFlowDefinitions: () => listFlowDefinitions,
|
|
96
100
|
listSchemas: () => listSchemas,
|
|
97
101
|
listUserPasskeys: () => listUserPasskeys,
|
|
@@ -204,19 +208,14 @@ const getUserByID = async (userId, params, options) => {
|
|
|
204
208
|
method: "GET"
|
|
205
209
|
});
|
|
206
210
|
};
|
|
207
|
-
const getDeleteUserByIDUrl = (userId
|
|
208
|
-
|
|
209
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
210
|
-
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
211
|
-
});
|
|
212
|
-
const stringifiedParams = normalizedParams.toString();
|
|
213
|
-
return stringifiedParams.length > 0 ? `${getProxyPath()}/users/${userId}?${stringifiedParams}` : `${getProxyPath()}/users/${userId}`;
|
|
211
|
+
const getDeleteUserByIDUrl = (userId) => {
|
|
212
|
+
return `${getProxyPath()}/users/${userId}`;
|
|
214
213
|
};
|
|
215
214
|
/**
|
|
216
215
|
* @summary Delete user by ID
|
|
217
216
|
*/
|
|
218
|
-
const deleteUserByID = async (userId,
|
|
219
|
-
return customFetch(getDeleteUserByIDUrl(userId
|
|
217
|
+
const deleteUserByID = async (userId, options) => {
|
|
218
|
+
return customFetch(getDeleteUserByIDUrl(userId), {
|
|
220
219
|
...options,
|
|
221
220
|
method: "DELETE"
|
|
222
221
|
});
|
|
@@ -238,19 +237,14 @@ const listUserPasskeys = async (userId, params, options) => {
|
|
|
238
237
|
method: "GET"
|
|
239
238
|
});
|
|
240
239
|
};
|
|
241
|
-
const getSetUserPasswordUrl = (userId
|
|
242
|
-
|
|
243
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
244
|
-
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
245
|
-
});
|
|
246
|
-
const stringifiedParams = normalizedParams.toString();
|
|
247
|
-
return stringifiedParams.length > 0 ? `${getProxyPath()}/users/${userId}/password?${stringifiedParams}` : `${getProxyPath()}/users/${userId}/password`;
|
|
240
|
+
const getSetUserPasswordUrl = (userId) => {
|
|
241
|
+
return `${getProxyPath()}/users/${userId}/password`;
|
|
248
242
|
};
|
|
249
243
|
/**
|
|
250
244
|
* @summary Set user password
|
|
251
245
|
*/
|
|
252
|
-
const setUserPassword = async (userId, setUserPasswordBody,
|
|
253
|
-
return customFetch(getSetUserPasswordUrl(userId
|
|
246
|
+
const setUserPassword = async (userId, setUserPasswordBody, options) => {
|
|
247
|
+
return customFetch(getSetUserPasswordUrl(userId), {
|
|
254
248
|
...options,
|
|
255
249
|
method: "PUT",
|
|
256
250
|
headers: {
|
|
@@ -740,13 +734,8 @@ const exchangeHandoff = async (exchangeHandoffBody, params, options) => {
|
|
|
740
734
|
body: JSON.stringify(exchangeHandoffBody)
|
|
741
735
|
});
|
|
742
736
|
};
|
|
743
|
-
const getGetSessionUrl = (sessionId
|
|
744
|
-
|
|
745
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
746
|
-
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
747
|
-
});
|
|
748
|
-
const stringifiedParams = normalizedParams.toString();
|
|
749
|
-
return stringifiedParams.length > 0 ? `${getProxyPath()}/sessions/${sessionId}?${stringifiedParams}` : `${getProxyPath()}/sessions/${sessionId}`;
|
|
737
|
+
const getGetSessionUrl = (sessionId) => {
|
|
738
|
+
return `${getProxyPath()}/sessions/${sessionId}`;
|
|
750
739
|
};
|
|
751
740
|
/**
|
|
752
741
|
* Returns the current state of a session including its factors and all currently
|
|
@@ -758,19 +747,14 @@ against the same `session_id`) to restore a dropped assurance level.
|
|
|
758
747
|
|
|
759
748
|
* @summary Get session state
|
|
760
749
|
*/
|
|
761
|
-
const getSession = async (sessionId,
|
|
762
|
-
return customFetch(getGetSessionUrl(sessionId
|
|
750
|
+
const getSession = async (sessionId, options) => {
|
|
751
|
+
return customFetch(getGetSessionUrl(sessionId), {
|
|
763
752
|
...options,
|
|
764
753
|
method: "GET"
|
|
765
754
|
});
|
|
766
755
|
};
|
|
767
|
-
const getRevokeSessionUrl = (sessionId
|
|
768
|
-
|
|
769
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
770
|
-
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
771
|
-
});
|
|
772
|
-
const stringifiedParams = normalizedParams.toString();
|
|
773
|
-
return stringifiedParams.length > 0 ? `${getProxyPath()}/sessions/${sessionId}?${stringifiedParams}` : `${getProxyPath()}/sessions/${sessionId}`;
|
|
756
|
+
const getRevokeSessionUrl = (sessionId) => {
|
|
757
|
+
return `${getProxyPath()}/sessions/${sessionId}`;
|
|
774
758
|
};
|
|
775
759
|
/**
|
|
776
760
|
* Permanently deletes the session, terminating it immediately.
|
|
@@ -785,8 +769,8 @@ invalidated.
|
|
|
785
769
|
|
|
786
770
|
* @summary Revoke session
|
|
787
771
|
*/
|
|
788
|
-
const revokeSession = async (sessionId,
|
|
789
|
-
return customFetch(getRevokeSessionUrl(sessionId
|
|
772
|
+
const revokeSession = async (sessionId, options) => {
|
|
773
|
+
return customFetch(getRevokeSessionUrl(sessionId), {
|
|
790
774
|
...options,
|
|
791
775
|
method: "DELETE"
|
|
792
776
|
});
|
|
@@ -942,31 +926,21 @@ const listFlowDefinitions = async (params, options) => {
|
|
|
942
926
|
method: "GET"
|
|
943
927
|
});
|
|
944
928
|
};
|
|
945
|
-
const getGetFlowDefinitionUrl = (id
|
|
946
|
-
|
|
947
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
948
|
-
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
949
|
-
});
|
|
950
|
-
const stringifiedParams = normalizedParams.toString();
|
|
951
|
-
return stringifiedParams.length > 0 ? `${getProxyPath()}/flow_definitions/${id}?${stringifiedParams}` : `${getProxyPath()}/flow_definitions/${id}`;
|
|
929
|
+
const getGetFlowDefinitionUrl = (id) => {
|
|
930
|
+
return `${getProxyPath()}/flow_definitions/${id}`;
|
|
952
931
|
};
|
|
953
932
|
/**
|
|
954
933
|
* Get a flow definition by id
|
|
955
934
|
* @summary Get a flow definition by id
|
|
956
935
|
*/
|
|
957
|
-
const getFlowDefinition = async (id,
|
|
958
|
-
return customFetch(getGetFlowDefinitionUrl(id
|
|
936
|
+
const getFlowDefinition = async (id, options) => {
|
|
937
|
+
return customFetch(getGetFlowDefinitionUrl(id), {
|
|
959
938
|
...options,
|
|
960
939
|
method: "GET"
|
|
961
940
|
});
|
|
962
941
|
};
|
|
963
|
-
const getUpdateFlowDefinitionUrl = (id
|
|
964
|
-
|
|
965
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
966
|
-
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
967
|
-
});
|
|
968
|
-
const stringifiedParams = normalizedParams.toString();
|
|
969
|
-
return stringifiedParams.length > 0 ? `${getProxyPath()}/flow_definitions/${id}?${stringifiedParams}` : `${getProxyPath()}/flow_definitions/${id}`;
|
|
942
|
+
const getUpdateFlowDefinitionUrl = (id) => {
|
|
943
|
+
return `${getProxyPath()}/flow_definitions/${id}`;
|
|
970
944
|
};
|
|
971
945
|
/**
|
|
972
946
|
* Update a flow definition by id. This endpoint replaces the existing flow definition.
|
|
@@ -974,8 +948,8 @@ If `flow_definition.status` is omitted, the current status is preserved
|
|
|
974
948
|
|
|
975
949
|
* @summary Update a flow definition by id
|
|
976
950
|
*/
|
|
977
|
-
const updateFlowDefinition = async (id, updateFlowDefinitionBody,
|
|
978
|
-
return customFetch(getUpdateFlowDefinitionUrl(id
|
|
951
|
+
const updateFlowDefinition = async (id, updateFlowDefinitionBody, options) => {
|
|
952
|
+
return customFetch(getUpdateFlowDefinitionUrl(id), {
|
|
979
953
|
...options,
|
|
980
954
|
method: "PUT",
|
|
981
955
|
headers: {
|
|
@@ -985,13 +959,8 @@ const updateFlowDefinition = async (id, updateFlowDefinitionBody, params, option
|
|
|
985
959
|
body: JSON.stringify(updateFlowDefinitionBody)
|
|
986
960
|
});
|
|
987
961
|
};
|
|
988
|
-
const getDeleteFlowDefinitionUrl = (id
|
|
989
|
-
|
|
990
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
991
|
-
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
992
|
-
});
|
|
993
|
-
const stringifiedParams = normalizedParams.toString();
|
|
994
|
-
return stringifiedParams.length > 0 ? `${getProxyPath()}/flow_definitions/${id}?${stringifiedParams}` : `${getProxyPath()}/flow_definitions/${id}`;
|
|
962
|
+
const getDeleteFlowDefinitionUrl = (id) => {
|
|
963
|
+
return `${getProxyPath()}/flow_definitions/${id}`;
|
|
995
964
|
};
|
|
996
965
|
/**
|
|
997
966
|
* Delete a flow definition by id.
|
|
@@ -1000,8 +969,8 @@ If the flow definition is the last active flow definition for a given purpose, t
|
|
|
1000
969
|
|
|
1001
970
|
* @summary Delete a flow definition by id
|
|
1002
971
|
*/
|
|
1003
|
-
const deleteFlowDefinition = async (id,
|
|
1004
|
-
return customFetch(getDeleteFlowDefinitionUrl(id
|
|
972
|
+
const deleteFlowDefinition = async (id, options) => {
|
|
973
|
+
return customFetch(getDeleteFlowDefinitionUrl(id), {
|
|
1005
974
|
...options,
|
|
1006
975
|
method: "DELETE"
|
|
1007
976
|
});
|
|
@@ -1038,7 +1007,6 @@ const getQueryTeamsUrl = (params) => {
|
|
|
1038
1007
|
};
|
|
1039
1008
|
/**
|
|
1040
1009
|
* Returns the teams of a project, paginated with a cursor.
|
|
1041
|
-
Teams of every lifecycle status are returned; each carries its `status`.
|
|
1042
1010
|
|
|
1043
1011
|
* @summary Query teams
|
|
1044
1012
|
*/
|
|
@@ -1053,32 +1021,22 @@ const queryTeams = async (queryTeamsBody, params, options) => {
|
|
|
1053
1021
|
body: JSON.stringify(queryTeamsBody)
|
|
1054
1022
|
});
|
|
1055
1023
|
};
|
|
1056
|
-
const getGetTeamUrl = (teamId
|
|
1057
|
-
|
|
1058
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1059
|
-
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
1060
|
-
});
|
|
1061
|
-
const stringifiedParams = normalizedParams.toString();
|
|
1062
|
-
return stringifiedParams.length > 0 ? `${getProxyPath()}/teams/${teamId}?${stringifiedParams}` : `${getProxyPath()}/teams/${teamId}`;
|
|
1024
|
+
const getGetTeamUrl = (teamId) => {
|
|
1025
|
+
return `${getProxyPath()}/teams/${teamId}`;
|
|
1063
1026
|
};
|
|
1064
1027
|
/**
|
|
1065
1028
|
* Returns a Team by its id.
|
|
1066
1029
|
|
|
1067
1030
|
* @summary Get team
|
|
1068
1031
|
*/
|
|
1069
|
-
const getTeam = async (teamId,
|
|
1070
|
-
return customFetch(getGetTeamUrl(teamId
|
|
1032
|
+
const getTeam = async (teamId, options) => {
|
|
1033
|
+
return customFetch(getGetTeamUrl(teamId), {
|
|
1071
1034
|
...options,
|
|
1072
1035
|
method: "GET"
|
|
1073
1036
|
});
|
|
1074
1037
|
};
|
|
1075
|
-
const getDeleteTeamUrl = (teamId
|
|
1076
|
-
|
|
1077
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1078
|
-
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
1079
|
-
});
|
|
1080
|
-
const stringifiedParams = normalizedParams.toString();
|
|
1081
|
-
return stringifiedParams.length > 0 ? `${getProxyPath()}/teams/${teamId}?${stringifiedParams}` : `${getProxyPath()}/teams/${teamId}`;
|
|
1038
|
+
const getDeleteTeamUrl = (teamId) => {
|
|
1039
|
+
return `${getProxyPath()}/teams/${teamId}`;
|
|
1082
1040
|
};
|
|
1083
1041
|
/**
|
|
1084
1042
|
* Deactivates the team.
|
|
@@ -1092,27 +1050,22 @@ or doesn't exist succeeds without changing anything.
|
|
|
1092
1050
|
|
|
1093
1051
|
* @summary Delete team
|
|
1094
1052
|
*/
|
|
1095
|
-
const deleteTeam = async (teamId,
|
|
1096
|
-
return customFetch(getDeleteTeamUrl(teamId
|
|
1053
|
+
const deleteTeam = async (teamId, options) => {
|
|
1054
|
+
return customFetch(getDeleteTeamUrl(teamId), {
|
|
1097
1055
|
...options,
|
|
1098
1056
|
method: "DELETE"
|
|
1099
1057
|
});
|
|
1100
1058
|
};
|
|
1101
|
-
const getUpdateTeamUrl = (teamId
|
|
1102
|
-
|
|
1103
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1104
|
-
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
1105
|
-
});
|
|
1106
|
-
const stringifiedParams = normalizedParams.toString();
|
|
1107
|
-
return stringifiedParams.length > 0 ? `${getProxyPath()}/teams/${teamId}?${stringifiedParams}` : `${getProxyPath()}/teams/${teamId}`;
|
|
1059
|
+
const getUpdateTeamUrl = (teamId) => {
|
|
1060
|
+
return `${getProxyPath()}/teams/${teamId}`;
|
|
1108
1061
|
};
|
|
1109
1062
|
/**
|
|
1110
1063
|
* Update team. Only active teams can be updated.
|
|
1111
1064
|
|
|
1112
1065
|
* @summary Update team
|
|
1113
1066
|
*/
|
|
1114
|
-
const updateTeam = async (teamId, updateTeamBody,
|
|
1115
|
-
return customFetch(getUpdateTeamUrl(teamId
|
|
1067
|
+
const updateTeam = async (teamId, updateTeamBody, options) => {
|
|
1068
|
+
return customFetch(getUpdateTeamUrl(teamId), {
|
|
1116
1069
|
...options,
|
|
1117
1070
|
method: "PATCH",
|
|
1118
1071
|
headers: {
|
|
@@ -1177,25 +1130,78 @@ const listBranding = async (params, options) => {
|
|
|
1177
1130
|
method: "GET"
|
|
1178
1131
|
});
|
|
1179
1132
|
};
|
|
1180
|
-
const getGetBrandingByIdUrl = (id
|
|
1133
|
+
const getGetBrandingByIdUrl = (id) => {
|
|
1134
|
+
return `${getProxyPath()}/branding/${id}`;
|
|
1135
|
+
};
|
|
1136
|
+
/**
|
|
1137
|
+
* Retrieves a single branding revision, including its stored configuration.
|
|
1138
|
+
* @summary Get a branding revision by ID
|
|
1139
|
+
*/
|
|
1140
|
+
const getBrandingById = async (id, options) => {
|
|
1141
|
+
return customFetch(getGetBrandingByIdUrl(id), {
|
|
1142
|
+
...options,
|
|
1143
|
+
method: "GET"
|
|
1144
|
+
});
|
|
1145
|
+
};
|
|
1146
|
+
const getListEventsUrl = (params) => {
|
|
1181
1147
|
const normalizedParams = new URLSearchParams();
|
|
1182
1148
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1149
|
+
if (Array.isArray(value) && ["category", "event_type"].includes(key)) {
|
|
1150
|
+
value.forEach((v) => {
|
|
1151
|
+
normalizedParams.append(key, v === null ? "null" : v.toString());
|
|
1152
|
+
});
|
|
1153
|
+
return;
|
|
1154
|
+
}
|
|
1183
1155
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
1184
1156
|
});
|
|
1185
1157
|
const stringifiedParams = normalizedParams.toString();
|
|
1186
|
-
return stringifiedParams.length > 0 ? `${getProxyPath()}/
|
|
1158
|
+
return stringifiedParams.length > 0 ? `${getProxyPath()}/events?${stringifiedParams}` : `${getProxyPath()}/events`;
|
|
1187
1159
|
};
|
|
1188
1160
|
/**
|
|
1189
|
-
*
|
|
1190
|
-
|
|
1161
|
+
* Returns project-scoped audit events, newest-first by keyset on
|
|
1162
|
+
`(created_at, id)` (ADR 027 / ADR 049). Pass `order=asc` for oldest-first.
|
|
1163
|
+
Requires `events.read`.
|
|
1164
|
+
|
|
1165
|
+
Pre-claim projects return an empty list (events are stored but not
|
|
1166
|
+
visible until claim succeeds). Team-scoped credentials see only events
|
|
1167
|
+
whose emit-time `team_id` matches the credential team (enforced when
|
|
1168
|
+
team-scoped tokens exist).
|
|
1169
|
+
|
|
1170
|
+
Clients discriminate each item via `event_type` (OpenAPI Event oneOf) —
|
|
1171
|
+
see docs/design/api/events-catalog.md.
|
|
1172
|
+
|
|
1173
|
+
* @summary List events
|
|
1174
|
+
*/
|
|
1175
|
+
const listEvents = async (params, options) => {
|
|
1176
|
+
return customFetch(getListEventsUrl(params), {
|
|
1177
|
+
...options,
|
|
1178
|
+
method: "GET"
|
|
1179
|
+
});
|
|
1180
|
+
};
|
|
1181
|
+
const getGetEventUrl = (id, params) => {
|
|
1182
|
+
const normalizedParams = new URLSearchParams();
|
|
1183
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1184
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
1185
|
+
});
|
|
1186
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1187
|
+
return stringifiedParams.length > 0 ? `${getProxyPath()}/events/${id}?${stringifiedParams}` : `${getProxyPath()}/events/${id}`;
|
|
1188
|
+
};
|
|
1189
|
+
/**
|
|
1190
|
+
* Loads a single event by `(project_id, id)`. Requires `events.read`.
|
|
1191
|
+
Events are not registered in `resource_scope_index`; project scope is
|
|
1192
|
+
required on the query (ADR 049). Misses and cross-project ids return 404.
|
|
1193
|
+
|
|
1194
|
+
Pre-claim projects return 404 (stored events stay invisible until claim).
|
|
1195
|
+
|
|
1196
|
+
* @summary Get event by ID
|
|
1191
1197
|
*/
|
|
1192
|
-
const
|
|
1193
|
-
return customFetch(
|
|
1198
|
+
const getEvent = async (id, params, options) => {
|
|
1199
|
+
return customFetch(getGetEventUrl(id, params), {
|
|
1194
1200
|
...options,
|
|
1195
1201
|
method: "GET"
|
|
1196
1202
|
});
|
|
1197
1203
|
};
|
|
1198
1204
|
//#endregion
|
|
1199
|
-
export { completeClaim, createAuthAttempt, createBranding, createFlow, createFlowDefinition, createHandoff, createProject, createSchema, createSession, createTeam, createUser, deleteFlowDefinition, deleteTeam, deleteUserByID, exchangeHandoff, getAuthAttempt, getBrandingById, getClaimStatus, getCompleteClaimUrl, getCreateAuthAttemptUrl, getCreateBrandingUrl, getCreateFlowDefinitionUrl, getCreateFlowUrl, getCreateHandoffUrl, getCreateProjectUrl, getCreateSchemaUrl, getCreateSessionUrl, getCreateTeamUrl, getCreateUserUrl, getDeleteFlowDefinitionUrl, getDeleteTeamUrl, getDeleteUserByIDUrl, getExchangeHandoffUrl, getFlowDefinition, getFlowStep, getGetAuthAttemptUrl, getGetBrandingByIdUrl, getGetClaimStatusUrl, getGetFlowDefinitionUrl, getGetFlowStepUrl, getGetHealthUrl, getGetLiveUrl, getGetMySessionUrl, getGetMyUserUrl, getGetProjectUrl, getGetReadyUrl, getGetSchemaByIdUrl, getGetSessionUrl, getGetTeamUrl, getGetUserByIDUrl, getHealth, getInitClaimUrl, getIssueChallengeUrl, getListBrandingUrl, getListFlowDefinitionsUrl, getListSchemasUrl, getListUserPasskeysUrl, getListUserTeamsUrl, getListUsersUrl, getLive, getMySession, getMyUser, getPatchProjectUrl, getProject, getQueryProjectsUrl, getQuerySessionsUrl, getQueryTeamsUrl, getReady, getRevokeMySessionUrl, getRevokeSessionUrl, getSchemaById, getSession, getSetUserPasswordUrl, getSubmitFlowStepUrl, getTeam, getUpdateFlowDefinitionUrl, getUpdateTeamUrl, getUserByID, getVerifyChallengeProofUrl, initClaim, issueChallenge, listBranding, listFlowDefinitions, listSchemas, listUserPasskeys, listUserTeams, listUsers, patchProject, queryProjects, querySessions, queryTeams, revokeMySession, revokeSession, setUserPassword, submitFlowStep, zitadelNextGen_exports as t, updateFlowDefinition, updateTeam, verifyChallengeProof };
|
|
1205
|
+
export { completeClaim, createAuthAttempt, createBranding, createFlow, createFlowDefinition, createHandoff, createProject, createSchema, createSession, createTeam, createUser, deleteFlowDefinition, deleteTeam, deleteUserByID, exchangeHandoff, getAuthAttempt, getBrandingById, getClaimStatus, getCompleteClaimUrl, getCreateAuthAttemptUrl, getCreateBrandingUrl, getCreateFlowDefinitionUrl, getCreateFlowUrl, getCreateHandoffUrl, getCreateProjectUrl, getCreateSchemaUrl, getCreateSessionUrl, getCreateTeamUrl, getCreateUserUrl, getDeleteFlowDefinitionUrl, getDeleteTeamUrl, getDeleteUserByIDUrl, getEvent, getExchangeHandoffUrl, getFlowDefinition, getFlowStep, getGetAuthAttemptUrl, getGetBrandingByIdUrl, getGetClaimStatusUrl, getGetEventUrl, getGetFlowDefinitionUrl, getGetFlowStepUrl, getGetHealthUrl, getGetLiveUrl, getGetMySessionUrl, getGetMyUserUrl, getGetProjectUrl, getGetReadyUrl, getGetSchemaByIdUrl, getGetSessionUrl, getGetTeamUrl, getGetUserByIDUrl, getHealth, getInitClaimUrl, getIssueChallengeUrl, getListBrandingUrl, getListEventsUrl, getListFlowDefinitionsUrl, getListSchemasUrl, getListUserPasskeysUrl, getListUserTeamsUrl, getListUsersUrl, getLive, getMySession, getMyUser, getPatchProjectUrl, getProject, getQueryProjectsUrl, getQuerySessionsUrl, getQueryTeamsUrl, getReady, getRevokeMySessionUrl, getRevokeSessionUrl, getSchemaById, getSession, getSetUserPasswordUrl, getSubmitFlowStepUrl, getTeam, getUpdateFlowDefinitionUrl, getUpdateTeamUrl, getUserByID, getVerifyChallengeProofUrl, initClaim, issueChallenge, listBranding, listEvents, listFlowDefinitions, listSchemas, listUserPasskeys, listUserTeams, listUsers, patchProject, queryProjects, querySessions, queryTeams, revokeMySession, revokeSession, setUserPassword, submitFlowStep, zitadelNextGen_exports as t, updateFlowDefinition, updateTeam, verifyChallengeProof };
|
|
1200
1206
|
|
|
1201
1207
|
//# sourceMappingURL=zitadelNextGen.mjs.map
|