@zitadel/testing 0.1.0-alpha.19 → 1.0.0-alpha.21
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 +39 -1
- package/dist/{app-env-Btmfcflb.d.mts → app-env-DlrV_ePR.d.mts} +56 -4
- package/dist/app-env-DlrV_ePR.d.mts.map +1 -0
- package/dist/app-runner.cjs +1 -1
- package/dist/app-runner.mjs +1 -1
- package/dist/{handshake-CRKcgkfN.cjs → handshake-BOsVBPtn.cjs} +14 -1
- package/dist/handshake-BOsVBPtn.cjs.map +1 -0
- package/dist/{handshake-ClzWvG8z.mjs → handshake-BnAPXC6s.mjs} +14 -1
- package/dist/handshake-BnAPXC6s.mjs.map +1 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/playwright.cjs +2 -2
- package/dist/playwright.d.mts +1 -1
- package/dist/playwright.mjs +2 -2
- package/dist/{src-9dFjTIAw.mjs → src-Dkt0HHu8.mjs} +2 -2
- package/dist/{src-9dFjTIAw.mjs.map → src-Dkt0HHu8.mjs.map} +1 -1
- package/dist/{src-I0KAh1zU.cjs → src-DtCJTEId.cjs} +301 -17
- package/dist/src-DtCJTEId.cjs.map +1 -0
- package/dist/supervisor.cjs +2 -2
- package/dist/supervisor.mjs +2 -2
- package/package.json +4 -4
- package/dist/app-env-Btmfcflb.d.mts.map +0 -1
- package/dist/handshake-CRKcgkfN.cjs.map +0 -1
- package/dist/handshake-ClzWvG8z.mjs.map +0 -1
- package/dist/src-I0KAh1zU.cjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_handshake = require("./handshake-
|
|
1
|
+
const require_handshake = require("./handshake-BOsVBPtn.cjs");
|
|
2
2
|
require("node:fs");
|
|
3
3
|
require("node:url");
|
|
4
4
|
let node_fs_promises = require("node:fs/promises");
|
|
@@ -129,22 +129,28 @@ function safeJsonParse(text) {
|
|
|
129
129
|
* OpenAPI spec version: 0.0.1
|
|
130
130
|
*/
|
|
131
131
|
var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
|
|
132
|
+
beginUserPasskeyRegistration: () => beginUserPasskeyRegistration,
|
|
132
133
|
completeClaim: () => completeClaim,
|
|
133
134
|
createAuthAttempt: () => createAuthAttempt,
|
|
134
135
|
createBranding: () => createBranding,
|
|
135
136
|
createFlow: () => createFlow,
|
|
136
137
|
createFlowDefinition: () => createFlowDefinition,
|
|
138
|
+
createGrant: () => createGrant,
|
|
137
139
|
createHandoff: () => createHandoff,
|
|
138
140
|
createProject: () => createProject,
|
|
141
|
+
createRelease: () => createRelease,
|
|
139
142
|
createSchema: () => createSchema,
|
|
140
143
|
createSession: () => createSession,
|
|
141
144
|
createTeam: () => createTeam,
|
|
142
145
|
createUser: () => createUser,
|
|
143
146
|
deleteFlowDefinition: () => deleteFlowDefinition,
|
|
147
|
+
deleteGrant: () => deleteGrant,
|
|
144
148
|
deleteTeam: () => deleteTeam,
|
|
145
149
|
deleteUserByID: () => deleteUserByID,
|
|
146
150
|
exchangeHandoff: () => exchangeHandoff,
|
|
151
|
+
finishUserPasskeyRegistration: () => finishUserPasskeyRegistration,
|
|
147
152
|
getAuthAttempt: () => getAuthAttempt,
|
|
153
|
+
getBeginUserPasskeyRegistrationUrl: () => getBeginUserPasskeyRegistrationUrl,
|
|
148
154
|
getBrandingById: () => getBrandingById,
|
|
149
155
|
getClaimStatus: () => getClaimStatus,
|
|
150
156
|
getCompleteClaimUrl: () => getCompleteClaimUrl,
|
|
@@ -152,45 +158,55 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
|
|
|
152
158
|
getCreateBrandingUrl: () => getCreateBrandingUrl,
|
|
153
159
|
getCreateFlowDefinitionUrl: () => getCreateFlowDefinitionUrl,
|
|
154
160
|
getCreateFlowUrl: () => getCreateFlowUrl,
|
|
161
|
+
getCreateGrantUrl: () => getCreateGrantUrl,
|
|
155
162
|
getCreateHandoffUrl: () => getCreateHandoffUrl,
|
|
156
163
|
getCreateProjectUrl: () => getCreateProjectUrl,
|
|
164
|
+
getCreateReleaseUrl: () => getCreateReleaseUrl,
|
|
157
165
|
getCreateSchemaUrl: () => getCreateSchemaUrl,
|
|
158
166
|
getCreateSessionUrl: () => getCreateSessionUrl,
|
|
159
167
|
getCreateTeamUrl: () => getCreateTeamUrl,
|
|
160
168
|
getCreateUserUrl: () => getCreateUserUrl,
|
|
161
169
|
getDeleteFlowDefinitionUrl: () => getDeleteFlowDefinitionUrl,
|
|
170
|
+
getDeleteGrantUrl: () => getDeleteGrantUrl,
|
|
162
171
|
getDeleteTeamUrl: () => getDeleteTeamUrl,
|
|
163
172
|
getDeleteUserByIDUrl: () => getDeleteUserByIDUrl,
|
|
173
|
+
getEnvironmentByName: () => getEnvironmentByName,
|
|
164
174
|
getEvent: () => getEvent,
|
|
165
175
|
getExchangeHandoffUrl: () => getExchangeHandoffUrl,
|
|
176
|
+
getFinishUserPasskeyRegistrationUrl: () => getFinishUserPasskeyRegistrationUrl,
|
|
166
177
|
getFlowDefinition: () => getFlowDefinition,
|
|
167
178
|
getFlowStep: () => getFlowStep,
|
|
168
179
|
getGetAuthAttemptUrl: () => getGetAuthAttemptUrl,
|
|
169
180
|
getGetBrandingByIdUrl: () => getGetBrandingByIdUrl,
|
|
170
181
|
getGetClaimStatusUrl: () => getGetClaimStatusUrl,
|
|
182
|
+
getGetEnvironmentByNameUrl: () => getGetEnvironmentByNameUrl,
|
|
171
183
|
getGetEventUrl: () => getGetEventUrl,
|
|
172
184
|
getGetFlowDefinitionUrl: () => getGetFlowDefinitionUrl,
|
|
173
185
|
getGetFlowStepUrl: () => getGetFlowStepUrl,
|
|
186
|
+
getGetGrantUrl: () => getGetGrantUrl,
|
|
174
187
|
getGetHealthUrl: () => getGetHealthUrl,
|
|
175
188
|
getGetLiveUrl: () => getGetLiveUrl,
|
|
176
189
|
getGetMySessionUrl: () => getGetMySessionUrl,
|
|
177
190
|
getGetMyUserUrl: () => getGetMyUserUrl,
|
|
178
191
|
getGetProjectUrl: () => getGetProjectUrl,
|
|
179
192
|
getGetReadyUrl: () => getGetReadyUrl,
|
|
193
|
+
getGetReleaseByIdUrl: () => getGetReleaseByIdUrl,
|
|
180
194
|
getGetSchemaByIdUrl: () => getGetSchemaByIdUrl,
|
|
181
195
|
getGetSessionUrl: () => getGetSessionUrl,
|
|
182
196
|
getGetTeamUrl: () => getGetTeamUrl,
|
|
183
197
|
getGetUserByIDUrl: () => getGetUserByIDUrl,
|
|
198
|
+
getGrant: () => getGrant,
|
|
184
199
|
getHealth: () => getHealth,
|
|
185
200
|
getInitClaimUrl: () => getInitClaimUrl,
|
|
186
201
|
getIssueChallengeUrl: () => getIssueChallengeUrl,
|
|
187
202
|
getListBrandingUrl: () => getListBrandingUrl,
|
|
203
|
+
getListEnvironmentsUrl: () => getListEnvironmentsUrl,
|
|
188
204
|
getListEventsUrl: () => getListEventsUrl,
|
|
189
205
|
getListFlowDefinitionsUrl: () => getListFlowDefinitionsUrl,
|
|
206
|
+
getListReleasesUrl: () => getListReleasesUrl,
|
|
190
207
|
getListSchemasUrl: () => getListSchemasUrl,
|
|
191
208
|
getListUserPasskeysUrl: () => getListUserPasskeysUrl,
|
|
192
209
|
getListUserTeamsUrl: () => getListUserTeamsUrl,
|
|
193
|
-
getListUsersUrl: () => getListUsersUrl,
|
|
194
210
|
getLive: () => getLive,
|
|
195
211
|
getMySession: () => getMySession,
|
|
196
212
|
getMyUser: () => getMyUser,
|
|
@@ -199,7 +215,9 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
|
|
|
199
215
|
getQueryProjectsUrl: () => getQueryProjectsUrl,
|
|
200
216
|
getQuerySessionsUrl: () => getQuerySessionsUrl,
|
|
201
217
|
getQueryTeamsUrl: () => getQueryTeamsUrl,
|
|
218
|
+
getQueryUsersUrl: () => getQueryUsersUrl,
|
|
202
219
|
getReady: () => getReady,
|
|
220
|
+
getReleaseById: () => getReleaseById,
|
|
203
221
|
getRevokeMySessionUrl: () => getRevokeMySessionUrl,
|
|
204
222
|
getRevokeSessionUrl: () => getRevokeSessionUrl,
|
|
205
223
|
getSchemaById: () => getSchemaById,
|
|
@@ -214,16 +232,18 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
|
|
|
214
232
|
initClaim: () => initClaim,
|
|
215
233
|
issueChallenge: () => issueChallenge,
|
|
216
234
|
listBranding: () => listBranding,
|
|
235
|
+
listEnvironments: () => listEnvironments,
|
|
217
236
|
listEvents: () => listEvents,
|
|
218
237
|
listFlowDefinitions: () => listFlowDefinitions,
|
|
238
|
+
listReleases: () => listReleases,
|
|
219
239
|
listSchemas: () => listSchemas,
|
|
220
240
|
listUserPasskeys: () => listUserPasskeys,
|
|
221
241
|
listUserTeams: () => listUserTeams,
|
|
222
|
-
listUsers: () => listUsers,
|
|
223
242
|
patchProject: () => patchProject,
|
|
224
243
|
queryProjects: () => queryProjects,
|
|
225
244
|
querySessions: () => querySessions,
|
|
226
245
|
queryTeams: () => queryTeams,
|
|
246
|
+
queryUsers: () => queryUsers,
|
|
227
247
|
revokeMySession: () => revokeMySession,
|
|
228
248
|
revokeSession: () => revokeSession,
|
|
229
249
|
setUserPassword: () => setUserPassword,
|
|
@@ -293,21 +313,27 @@ const createUser = async (createUserBody, params, options) => {
|
|
|
293
313
|
body: JSON.stringify(createUserBody)
|
|
294
314
|
});
|
|
295
315
|
};
|
|
296
|
-
const
|
|
297
|
-
|
|
298
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
299
|
-
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
300
|
-
});
|
|
301
|
-
const stringifiedParams = normalizedParams.toString();
|
|
302
|
-
return stringifiedParams.length > 0 ? `${getProxyPath()}/users?${stringifiedParams}` : `${getProxyPath()}/users`;
|
|
316
|
+
const getQueryUsersUrl = () => {
|
|
317
|
+
return `${getProxyPath()}/users/query`;
|
|
303
318
|
};
|
|
304
319
|
/**
|
|
305
|
-
*
|
|
320
|
+
* Returns the users of a project, paginated with a cursor.
|
|
321
|
+
|
|
322
|
+
The project comes from the credential, not from a parameter: the operation
|
|
323
|
+
is bound to the token's own project by construction. This is why it takes
|
|
324
|
+
no `project_id`, unlike the other query endpoints.
|
|
325
|
+
|
|
326
|
+
* @summary Query users
|
|
306
327
|
*/
|
|
307
|
-
const
|
|
308
|
-
return customFetch(
|
|
328
|
+
const queryUsers = async (queryUsersBody, options) => {
|
|
329
|
+
return customFetch(getQueryUsersUrl(), {
|
|
309
330
|
...options,
|
|
310
|
-
method: "
|
|
331
|
+
method: "POST",
|
|
332
|
+
headers: {
|
|
333
|
+
"Content-Type": "application/json",
|
|
334
|
+
...options?.headers
|
|
335
|
+
},
|
|
336
|
+
body: JSON.stringify(queryUsersBody)
|
|
311
337
|
});
|
|
312
338
|
};
|
|
313
339
|
const getGetUserByIDUrl = (userId, params) => {
|
|
@@ -356,6 +382,53 @@ const listUserPasskeys = async (userId, params, options) => {
|
|
|
356
382
|
method: "GET"
|
|
357
383
|
});
|
|
358
384
|
};
|
|
385
|
+
const getBeginUserPasskeyRegistrationUrl = (userId) => {
|
|
386
|
+
return `${getProxyPath()}/users/${userId}/passkeys/registrations`;
|
|
387
|
+
};
|
|
388
|
+
/**
|
|
389
|
+
* Starts a WebAuthn registration ceremony for the user and returns the
|
|
390
|
+
creation options for `navigator.credentials.create()`. Complete the
|
|
391
|
+
ceremony with `POST /users/{user_id}/passkeys/registrations/{registration_id}` within
|
|
392
|
+
five minutes. Credentials already registered for the user are excluded
|
|
393
|
+
automatically.
|
|
394
|
+
|
|
395
|
+
* @summary Begin passkey registration
|
|
396
|
+
*/
|
|
397
|
+
const beginUserPasskeyRegistration = async (userId, beginUserPasskeyRegistrationBody, options) => {
|
|
398
|
+
return customFetch(getBeginUserPasskeyRegistrationUrl(userId), {
|
|
399
|
+
...options,
|
|
400
|
+
method: "POST",
|
|
401
|
+
headers: {
|
|
402
|
+
"Content-Type": "application/json",
|
|
403
|
+
...options?.headers
|
|
404
|
+
},
|
|
405
|
+
body: JSON.stringify(beginUserPasskeyRegistrationBody)
|
|
406
|
+
});
|
|
407
|
+
};
|
|
408
|
+
const getFinishUserPasskeyRegistrationUrl = (userId, registrationId) => {
|
|
409
|
+
return `${getProxyPath()}/users/${userId}/passkeys/registrations/${registrationId}`;
|
|
410
|
+
};
|
|
411
|
+
/**
|
|
412
|
+
* Verifies the attestation against the ceremony started by
|
|
413
|
+
`POST /users/{user_id}/passkeys/registrations` and persists the new credential. A
|
|
414
|
+
rejected attestation counts against the ceremony's failure budget and the
|
|
415
|
+
ceremony stays open for a retry. An expired ceremony surfaces as
|
|
416
|
+
`att.stale_challenge`; an unknown or already-consumed registration id
|
|
417
|
+
surfaces as `att.not_found`.
|
|
418
|
+
|
|
419
|
+
* @summary Finish passkey registration
|
|
420
|
+
*/
|
|
421
|
+
const finishUserPasskeyRegistration = async (userId, registrationId, finishUserPasskeyRegistrationBody, options) => {
|
|
422
|
+
return customFetch(getFinishUserPasskeyRegistrationUrl(userId, registrationId), {
|
|
423
|
+
...options,
|
|
424
|
+
method: "POST",
|
|
425
|
+
headers: {
|
|
426
|
+
"Content-Type": "application/json",
|
|
427
|
+
...options?.headers
|
|
428
|
+
},
|
|
429
|
+
body: JSON.stringify(finishUserPasskeyRegistrationBody)
|
|
430
|
+
});
|
|
431
|
+
};
|
|
359
432
|
const getSetUserPasswordUrl = (userId) => {
|
|
360
433
|
return `${getProxyPath()}/users/${userId}/password`;
|
|
361
434
|
};
|
|
@@ -993,7 +1066,10 @@ const getGetSchemaByIdUrl = (id, params) => {
|
|
|
993
1066
|
return stringifiedParams.length > 0 ? `${getProxyPath()}/schemas/${id}?${stringifiedParams}` : `${getProxyPath()}/schemas/${id}`;
|
|
994
1067
|
};
|
|
995
1068
|
/**
|
|
996
|
-
* Get a schema by its ID.
|
|
1069
|
+
* Get a schema by its ID. A schema ID identifies one immutable revision, so
|
|
1070
|
+
this returns exactly that revision. To find the current revision of an
|
|
1071
|
+
object type, list with `revisions=latest`.
|
|
1072
|
+
|
|
997
1073
|
* @summary Get schema by ID
|
|
998
1074
|
*/
|
|
999
1075
|
const getSchemaById = async (id, params, options) => {
|
|
@@ -1194,6 +1270,47 @@ const updateTeam = async (teamId, updateTeamBody, options) => {
|
|
|
1194
1270
|
body: JSON.stringify(updateTeamBody)
|
|
1195
1271
|
});
|
|
1196
1272
|
};
|
|
1273
|
+
const getListEnvironmentsUrl = (params) => {
|
|
1274
|
+
const normalizedParams = new URLSearchParams();
|
|
1275
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1276
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
1277
|
+
});
|
|
1278
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1279
|
+
return stringifiedParams.length > 0 ? `${getProxyPath()}/environments?${stringifiedParams}` : `${getProxyPath()}/environments`;
|
|
1280
|
+
};
|
|
1281
|
+
/**
|
|
1282
|
+
* Lists the project's environments ordered by name.
|
|
1283
|
+
|
|
1284
|
+
* @summary List environments
|
|
1285
|
+
*/
|
|
1286
|
+
const listEnvironments = async (params, options) => {
|
|
1287
|
+
return customFetch(getListEnvironmentsUrl(params), {
|
|
1288
|
+
...options,
|
|
1289
|
+
method: "GET"
|
|
1290
|
+
});
|
|
1291
|
+
};
|
|
1292
|
+
const getGetEnvironmentByNameUrl = (name, params) => {
|
|
1293
|
+
const normalizedParams = new URLSearchParams();
|
|
1294
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1295
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
1296
|
+
});
|
|
1297
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1298
|
+
return stringifiedParams.length > 0 ? `${getProxyPath()}/environments/${name}?${stringifiedParams}` : `${getProxyPath()}/environments/${name}`;
|
|
1299
|
+
};
|
|
1300
|
+
/**
|
|
1301
|
+
* Reads one environment of the project by its name.
|
|
1302
|
+
|
|
1303
|
+
The lookup is scoped to the project in `project_id`: a name that exists in
|
|
1304
|
+
another project answers `env.not_found` exactly as an unused name does.
|
|
1305
|
+
|
|
1306
|
+
* @summary Get an environment by name
|
|
1307
|
+
*/
|
|
1308
|
+
const getEnvironmentByName = async (name, params, options) => {
|
|
1309
|
+
return customFetch(getGetEnvironmentByNameUrl(name, params), {
|
|
1310
|
+
...options,
|
|
1311
|
+
method: "GET"
|
|
1312
|
+
});
|
|
1313
|
+
};
|
|
1197
1314
|
const getCreateBrandingUrl = (params) => {
|
|
1198
1315
|
const normalizedParams = new URLSearchParams();
|
|
1199
1316
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -1262,6 +1379,171 @@ const getBrandingById = async (id, options) => {
|
|
|
1262
1379
|
method: "GET"
|
|
1263
1380
|
});
|
|
1264
1381
|
};
|
|
1382
|
+
const getCreateReleaseUrl = (params) => {
|
|
1383
|
+
const normalizedParams = new URLSearchParams();
|
|
1384
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1385
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
1386
|
+
});
|
|
1387
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1388
|
+
return stringifiedParams.length > 0 ? `${getProxyPath()}/releases?${stringifiedParams}` : `${getProxyPath()}/releases`;
|
|
1389
|
+
};
|
|
1390
|
+
/**
|
|
1391
|
+
* Bundles a release from revisions that already exist, supplied as
|
|
1392
|
+
`(kind, revision_id)` pairs. No new revisions are allocated — use the
|
|
1393
|
+
per-kind create endpoints for that, then pin the ids here.
|
|
1394
|
+
|
|
1395
|
+
Every referenced `revision_id` must exist in the project. Each one's handle
|
|
1396
|
+
is read from the revision itself and recorded on the release, so a resource
|
|
1397
|
+
is always pinned under the identity it declares.
|
|
1398
|
+
|
|
1399
|
+
Creating a release does not deploy it. A release is environment-agnostic
|
|
1400
|
+
and the same release can later be deployed to any number of environments
|
|
1401
|
+
unchanged.
|
|
1402
|
+
|
|
1403
|
+
Idempotent on the pinned set: metadata is excluded from the comparison, so
|
|
1404
|
+
re-submitting the same revisions with a different `message` returns the
|
|
1405
|
+
release that already pins them rather than creating a second one.
|
|
1406
|
+
|
|
1407
|
+
* @summary Create a release
|
|
1408
|
+
*/
|
|
1409
|
+
const createRelease = async (createReleaseBody, params, options) => {
|
|
1410
|
+
return customFetch(getCreateReleaseUrl(params), {
|
|
1411
|
+
...options,
|
|
1412
|
+
method: "POST",
|
|
1413
|
+
headers: {
|
|
1414
|
+
"Content-Type": "application/json",
|
|
1415
|
+
...options?.headers
|
|
1416
|
+
},
|
|
1417
|
+
body: JSON.stringify(createReleaseBody)
|
|
1418
|
+
});
|
|
1419
|
+
};
|
|
1420
|
+
const getListReleasesUrl = (params) => {
|
|
1421
|
+
const normalizedParams = new URLSearchParams();
|
|
1422
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1423
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
1424
|
+
});
|
|
1425
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1426
|
+
return stringifiedParams.length > 0 ? `${getProxyPath()}/releases?${stringifiedParams}` : `${getProxyPath()}/releases`;
|
|
1427
|
+
};
|
|
1428
|
+
/**
|
|
1429
|
+
* Lists the project's releases, newest first.
|
|
1430
|
+
|
|
1431
|
+
Entries carry metadata only — the pinned set is omitted. Read one release
|
|
1432
|
+
with `GET /releases/{release_id}` to get its pointers.
|
|
1433
|
+
|
|
1434
|
+
* @summary List releases
|
|
1435
|
+
*/
|
|
1436
|
+
const listReleases = async (params, options) => {
|
|
1437
|
+
return customFetch(getListReleasesUrl(params), {
|
|
1438
|
+
...options,
|
|
1439
|
+
method: "GET"
|
|
1440
|
+
});
|
|
1441
|
+
};
|
|
1442
|
+
const getGetReleaseByIdUrl = (releaseId, params) => {
|
|
1443
|
+
const normalizedParams = new URLSearchParams();
|
|
1444
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1445
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
1446
|
+
});
|
|
1447
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1448
|
+
return stringifiedParams.length > 0 ? `${getProxyPath()}/releases/${releaseId}?${stringifiedParams}` : `${getProxyPath()}/releases/${releaseId}`;
|
|
1449
|
+
};
|
|
1450
|
+
/**
|
|
1451
|
+
* Reads one release: its metadata and the `(kind, handle, revision_id)`
|
|
1452
|
+
tuples it pins.
|
|
1453
|
+
|
|
1454
|
+
Does not embed resource content. Resolve each `revision_id` through the
|
|
1455
|
+
per-kind read endpoints when the bytes are needed.
|
|
1456
|
+
|
|
1457
|
+
The lookup is scoped to the project in `project_id`: a release id belonging
|
|
1458
|
+
to another project answers not found exactly as an unknown id does, so the
|
|
1459
|
+
endpoint cannot be used to probe for releases in projects the caller cannot
|
|
1460
|
+
read.
|
|
1461
|
+
|
|
1462
|
+
* @summary Get a release by id
|
|
1463
|
+
*/
|
|
1464
|
+
const getReleaseById = async (releaseId, params, options) => {
|
|
1465
|
+
return customFetch(getGetReleaseByIdUrl(releaseId, params), {
|
|
1466
|
+
...options,
|
|
1467
|
+
method: "GET"
|
|
1468
|
+
});
|
|
1469
|
+
};
|
|
1470
|
+
const getCreateGrantUrl = (params) => {
|
|
1471
|
+
const normalizedParams = new URLSearchParams();
|
|
1472
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1473
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
1474
|
+
});
|
|
1475
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1476
|
+
return stringifiedParams.length > 0 ? `${getProxyPath()}/grants?${stringifiedParams}` : `${getProxyPath()}/grants`;
|
|
1477
|
+
};
|
|
1478
|
+
/**
|
|
1479
|
+
* Bind a user or team to `project.viewer`, `project.editor`, or
|
|
1480
|
+
`project.admin` on the project identified by the `project-id` header.
|
|
1481
|
+
IDs are `asgn_<opaque>`. Owning-team (`project.team`) grants are not
|
|
1482
|
+
created here — claim owns that path. An unrevoked grant with the same
|
|
1483
|
+
principal and relation occupies the unique key even after `expires_at`;
|
|
1484
|
+
DELETE it before re-creating.
|
|
1485
|
+
|
|
1486
|
+
* @summary Create grant
|
|
1487
|
+
*/
|
|
1488
|
+
const createGrant = async (createGrantBody, params, options) => {
|
|
1489
|
+
return customFetch(getCreateGrantUrl(params), {
|
|
1490
|
+
...options,
|
|
1491
|
+
method: "POST",
|
|
1492
|
+
headers: {
|
|
1493
|
+
"Content-Type": "application/json",
|
|
1494
|
+
...options?.headers
|
|
1495
|
+
},
|
|
1496
|
+
body: JSON.stringify(createGrantBody)
|
|
1497
|
+
});
|
|
1498
|
+
};
|
|
1499
|
+
const getGetGrantUrl = (id, params) => {
|
|
1500
|
+
const normalizedParams = new URLSearchParams();
|
|
1501
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1502
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
1503
|
+
});
|
|
1504
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1505
|
+
return stringifiedParams.length > 0 ? `${getProxyPath()}/grants/${id}?${stringifiedParams}` : `${getProxyPath()}/grants/${id}`;
|
|
1506
|
+
};
|
|
1507
|
+
/**
|
|
1508
|
+
* Loads a grant by `(project_id, id)` that this API manages (user or team
|
|
1509
|
+
bound to viewer, editor, or admin) and that has not been revoked.
|
|
1510
|
+
"Active" here means not revoked: expired grants stay visible so the
|
|
1511
|
+
client can DELETE before re-granting the same binding. Authorization
|
|
1512
|
+
still ignores expired grants. Grants are not registered in
|
|
1513
|
+
`resource_scope_index`; project scope is required on the query (same as
|
|
1514
|
+
events). Misses, revoked rows, project-secret setup (`sk_proj`),
|
|
1515
|
+
owning-team (`relation=team`) rows, and cross-project ids return 404.
|
|
1516
|
+
|
|
1517
|
+
* @summary Get grant
|
|
1518
|
+
*/
|
|
1519
|
+
const getGrant = async (id, params, options) => {
|
|
1520
|
+
return customFetch(getGetGrantUrl(id, params), {
|
|
1521
|
+
...options,
|
|
1522
|
+
method: "GET"
|
|
1523
|
+
});
|
|
1524
|
+
};
|
|
1525
|
+
const getDeleteGrantUrl = (id, params) => {
|
|
1526
|
+
const normalizedParams = new URLSearchParams();
|
|
1527
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
1528
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
1529
|
+
});
|
|
1530
|
+
const stringifiedParams = normalizedParams.toString();
|
|
1531
|
+
return stringifiedParams.length > 0 ? `${getProxyPath()}/grants/${id}?${stringifiedParams}` : `${getProxyPath()}/grants/${id}`;
|
|
1532
|
+
};
|
|
1533
|
+
/**
|
|
1534
|
+
* Soft-revokes a grant this API manages and emits `authz.revoked`.
|
|
1535
|
+
Already-revoked, missing, project-secret setup, and owning-team grants
|
|
1536
|
+
return 404. The row is not un-revoked. Expired grants can still be
|
|
1537
|
+
revoked so the unique binding can be reused.
|
|
1538
|
+
|
|
1539
|
+
* @summary Revoke grant
|
|
1540
|
+
*/
|
|
1541
|
+
const deleteGrant = async (id, params, options) => {
|
|
1542
|
+
return customFetch(getDeleteGrantUrl(id, params), {
|
|
1543
|
+
...options,
|
|
1544
|
+
method: "DELETE"
|
|
1545
|
+
});
|
|
1546
|
+
};
|
|
1265
1547
|
const getListEventsUrl = (params) => {
|
|
1266
1548
|
const normalizedParams = new URLSearchParams();
|
|
1267
1549
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -1363,7 +1645,7 @@ function createZitadelClient(opts) {
|
|
|
1363
1645
|
} });
|
|
1364
1646
|
}
|
|
1365
1647
|
//#endregion
|
|
1366
|
-
//#region ../config/dist/defaults-
|
|
1648
|
+
//#region ../config/dist/defaults-DPq0o3iU.mjs
|
|
1367
1649
|
var default_human_user_default = {
|
|
1368
1650
|
title: "DefaultHumanUserSchema",
|
|
1369
1651
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
@@ -1372,6 +1654,7 @@ var default_human_user_default = {
|
|
|
1372
1654
|
objectType: "human-user",
|
|
1373
1655
|
kind: "user-schema",
|
|
1374
1656
|
type: "object",
|
|
1657
|
+
"x-identifier": "email",
|
|
1375
1658
|
description: "The default editable schema for human users.",
|
|
1376
1659
|
"x-auth-methods": {
|
|
1377
1660
|
"password": { "enabled": true },
|
|
@@ -1509,6 +1792,7 @@ var human_user_default = {
|
|
|
1509
1792
|
objectType: "human-user",
|
|
1510
1793
|
kind: "user-schema",
|
|
1511
1794
|
type: "object",
|
|
1795
|
+
"x-identifier": "email",
|
|
1512
1796
|
description: "The default editable schema for human users (passkey-first sign-in).",
|
|
1513
1797
|
"x-auth-methods": {
|
|
1514
1798
|
"passkey": { "enabled": true },
|
|
@@ -2371,4 +2655,4 @@ Object.defineProperty(exports, "startLocalZitadel", {
|
|
|
2371
2655
|
}
|
|
2372
2656
|
});
|
|
2373
2657
|
|
|
2374
|
-
//# sourceMappingURL=src-
|
|
2658
|
+
//# sourceMappingURL=src-DtCJTEId.cjs.map
|