@zitadel/api 0.3.0 → 0.4.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/README.md +17 -3
- package/dist/api-factory-C5b1Gqwv.mjs +357 -0
- package/dist/api-factory-C5b1Gqwv.mjs.map +1 -0
- package/dist/api-factory-Dt5lUjyu.d.mts +212 -0
- package/dist/api-factory-Dt5lUjyu.d.mts.map +1 -0
- package/dist/{fetch-CtYe0OvX.d.mts → fetch-B-lgjlrf.d.mts} +22 -12
- package/dist/fetch-B-lgjlrf.d.mts.map +1 -0
- package/dist/generated/endpoints/zitadelNextGen.d.mts +1 -1
- package/dist/generated/endpoints/zitadelNextGen.mjs +129 -122
- package/dist/generated/endpoints/zitadelNextGen.mjs.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.msw.d.mts +1 -1
- package/dist/generated/endpoints/zitadelNextGen.zod.d.mts +33 -26
- package/dist/generated/endpoints/zitadelNextGen.zod.d.mts.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.zod.mjs +33 -26
- package/dist/generated/endpoints/zitadelNextGen.zod.mjs.map +1 -1
- package/dist/generated/model/index.d.mts +2 -2
- package/dist/generated/operations.mjs +1 -1
- package/dist/generated/operations.mjs.map +1 -1
- package/dist/{index-DAm3tCA7.d.mts → index-DGQY1rfH.d.mts} +66 -4
- package/dist/index-DGQY1rfH.d.mts.map +1 -0
- package/dist/runtime/api-factory.d.mts +2 -51
- package/dist/runtime/api-factory.mjs +3 -62
- package/dist/runtime/auth.mjs +1 -1
- package/dist/runtime/auth.mjs.map +1 -1
- package/dist/runtime/base-url.d.mts +14 -0
- package/dist/runtime/base-url.d.mts.map +1 -1
- package/dist/runtime/base-url.mjs +22 -1
- package/dist/runtime/base-url.mjs.map +1 -1
- package/dist/runtime/config.d.mts +1 -1
- package/dist/runtime/config.mjs +1 -1
- package/dist/runtime/fetch.d.mts +2 -2
- package/dist/runtime/fetch.mjs +41 -17
- package/dist/runtime/fetch.mjs.map +1 -1
- package/dist/runtime/paging.d.mts +35 -0
- package/dist/runtime/paging.d.mts.map +1 -0
- package/dist/runtime/paging.mjs +38 -0
- package/dist/runtime/paging.mjs.map +1 -0
- package/dist/{zitadelNextGen-B_VRpP2W.d.mts → zitadelNextGen-BVO4sdKD.d.mts} +37 -30
- package/dist/zitadelNextGen-BVO4sdKD.d.mts.map +1 -0
- package/package.json +6 -1
- package/src/generated/endpoints/zitadelNextGen.ts +131 -124
- package/src/generated/endpoints/zitadelNextGen.zod.ts +33 -26
- package/src/generated/model/deleteUserByID409.ts +20 -0
- package/src/generated/model/deleteUserByID409Details.ts +12 -0
- package/src/generated/model/deleteUserByIDDefault.ts +9 -0
- package/src/generated/model/getFlowStepDefault.ts +9 -0
- package/src/generated/model/index.ts +2 -0
- package/src/generated/model/queryTeamsParams.ts +3 -2
- package/src/generated/model/submitFlowStepDefault.ts +9 -0
- package/src/generated/operations.ts +1 -1
- package/src/generated/paging.ts +128 -0
- package/src/runtime/api-factory.spec.ts +278 -0
- package/src/runtime/api-factory.ts +93 -12
- package/src/runtime/auth.ts +1 -1
- package/src/runtime/base-url.spec.ts +40 -4
- package/src/runtime/base-url.ts +28 -0
- package/src/runtime/fetch.spec.ts +51 -0
- package/src/runtime/fetch.ts +69 -30
- package/src/runtime/paged.spec.ts +104 -0
- package/src/runtime/paged.ts +61 -0
- package/src/runtime/paging.spec.ts +94 -0
- package/src/runtime/paging.ts +58 -0
- package/dist/fetch-CtYe0OvX.d.mts.map +0 -1
- package/dist/index-DAm3tCA7.d.mts.map +0 -1
- package/dist/runtime/api-factory.d.mts.map +0 -1
- package/dist/runtime/api-factory.mjs.map +0 -1
- package/dist/zitadelNextGen-B_VRpP2W.d.mts.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "../../rolldown-runtime-D7D4PA-g.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { getApiBaseUrl } from "../../runtime/base-url.mjs";
|
|
3
3
|
import { customFetch } from "../../runtime/fetch.mjs";
|
|
4
4
|
//#region src/generated/endpoints/zitadelNextGen.ts
|
|
5
5
|
/**
|
|
@@ -204,14 +204,15 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
|
|
|
204
204
|
verifyChallengeProof: () => verifyChallengeProof
|
|
205
205
|
});
|
|
206
206
|
const getGetLiveUrl = () => {
|
|
207
|
-
return `${
|
|
207
|
+
return `${getApiBaseUrl()}/livez`;
|
|
208
208
|
};
|
|
209
209
|
/**
|
|
210
210
|
* Answers `ok` while the server process serves HTTP, and checks nothing behind it.
|
|
211
211
|
*
|
|
212
|
-
* Point a liveness probe
|
|
213
|
-
*
|
|
214
|
-
* instance
|
|
212
|
+
* Point a liveness probe at `/livez` at the root, where the probes stay,
|
|
213
|
+
* not under `/api/v1`. It never checks the database, so an outage of the
|
|
214
|
+
* database does not restart every instance; `GET /readyz` takes an instance
|
|
215
|
+
* out of rotation instead.
|
|
215
216
|
* @summary Check server liveness
|
|
216
217
|
*/
|
|
217
218
|
const getLive = async (options) => {
|
|
@@ -221,14 +222,14 @@ const getLive = async (options) => {
|
|
|
221
222
|
});
|
|
222
223
|
};
|
|
223
224
|
const getGetReadyUrl = () => {
|
|
224
|
-
return `${
|
|
225
|
+
return `${getApiBaseUrl()}/readyz`;
|
|
225
226
|
};
|
|
226
227
|
/**
|
|
227
228
|
* Answers whether the server can serve requests, which takes its database answering within a second.
|
|
228
229
|
*
|
|
229
|
-
* Point a readiness probe
|
|
230
|
-
*
|
|
231
|
-
* database.
|
|
230
|
+
* Point a readiness probe at `/readyz` at the root, where the probes stay,
|
|
231
|
+
* not under `/api/v1`, so that a server whose database does not answer gets
|
|
232
|
+
* no requests until it does. The check is one round trip to the database.
|
|
232
233
|
* @summary Check server readiness
|
|
233
234
|
*/
|
|
234
235
|
const getReady = async (options) => {
|
|
@@ -243,7 +244,7 @@ const getCreateUserUrl = (params) => {
|
|
|
243
244
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
244
245
|
});
|
|
245
246
|
const stringifiedParams = normalizedParams.toString();
|
|
246
|
-
return stringifiedParams.length > 0 ? `${
|
|
247
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users?${stringifiedParams}` : `${getApiBaseUrl()}/users`;
|
|
247
248
|
};
|
|
248
249
|
/**
|
|
249
250
|
* Creates a user whose attributes satisfy the user schema the request names.
|
|
@@ -278,7 +279,7 @@ const getQueryUsersUrl = (params) => {
|
|
|
278
279
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
279
280
|
});
|
|
280
281
|
const stringifiedParams = normalizedParams.toString();
|
|
281
|
-
return stringifiedParams.length > 0 ? `${
|
|
282
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/query?${stringifiedParams}` : `${getApiBaseUrl()}/users/query`;
|
|
282
283
|
};
|
|
283
284
|
/**
|
|
284
285
|
* Returns the users of a project, paginated with a cursor.
|
|
@@ -287,8 +288,8 @@ const getQueryUsersUrl = (params) => {
|
|
|
287
288
|
* project is listed.
|
|
288
289
|
*
|
|
289
290
|
* Accepts either a project secret (`oauth2`) or a user-bound Console
|
|
290
|
-
* session cookie (`
|
|
291
|
-
* follow the scheme's CSRF rules (`
|
|
291
|
+
* session cookie (`sessionCookie`). Cookie-authenticated requests
|
|
292
|
+
* follow the scheme's CSRF rules (`sessionCookie`).
|
|
292
293
|
* @summary Query users
|
|
293
294
|
*/
|
|
294
295
|
const queryUsers = async (queryUsersBody, params, options) => {
|
|
@@ -316,7 +317,7 @@ const getGetUserByIDUrl = (userId, params) => {
|
|
|
316
317
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
317
318
|
});
|
|
318
319
|
const stringifiedParams = normalizedParams.toString();
|
|
319
|
-
return stringifiedParams.length > 0 ? `${
|
|
320
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}?${stringifiedParams}` : `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}`;
|
|
320
321
|
};
|
|
321
322
|
/**
|
|
322
323
|
* Returns a user by its id, with the attributes its schema defines.
|
|
@@ -332,7 +333,7 @@ const getUserByID = async (userId, params, options) => {
|
|
|
332
333
|
});
|
|
333
334
|
};
|
|
334
335
|
const getPatchUserByIDUrl = (userId) => {
|
|
335
|
-
return `${
|
|
336
|
+
return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}`;
|
|
336
337
|
};
|
|
337
338
|
/**
|
|
338
339
|
* Partially updates a user's schema-defined attributes, and optionally
|
|
@@ -361,7 +362,7 @@ const patchUserByID = async (userId, patchUserByIDBody, options) => {
|
|
|
361
362
|
});
|
|
362
363
|
};
|
|
363
364
|
const getDeleteUserByIDUrl = (userId) => {
|
|
364
|
-
return `${
|
|
365
|
+
return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}`;
|
|
365
366
|
};
|
|
366
367
|
/**
|
|
367
368
|
* Deletes a user, removes them from every team they belong to, and revokes
|
|
@@ -370,7 +371,9 @@ const getDeleteUserByIDUrl = (userId) => {
|
|
|
370
371
|
* The user is removed, not deactivated, and the deletion emits `user.deleted`,
|
|
371
372
|
* plus `authz.revoked` for each grant on that grant's project.
|
|
372
373
|
* With a project secret the request is idempotent: deleting a user that exists
|
|
373
|
-
* in no project succeeds without changing anything.
|
|
374
|
+
* in no project succeeds without changing anything. Deleting the last active
|
|
375
|
+
* member of a project's owning team returns 409 `proj.last_owner` and changes
|
|
376
|
+
* nothing.
|
|
374
377
|
* @summary Delete user by ID
|
|
375
378
|
*/
|
|
376
379
|
const deleteUserByID = async (userId, options) => {
|
|
@@ -385,7 +388,7 @@ const getListUserIdentityLinksUrl = (userId, params) => {
|
|
|
385
388
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
386
389
|
});
|
|
387
390
|
const stringifiedParams = normalizedParams.toString();
|
|
388
|
-
return stringifiedParams.length > 0 ? `${
|
|
391
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/identity_links?${stringifiedParams}` : `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/identity_links`;
|
|
389
392
|
};
|
|
390
393
|
/**
|
|
391
394
|
* The identity provider accounts a sign-in linked to the user, oldest first.
|
|
@@ -404,7 +407,7 @@ const getListUserPasskeysUrl = (userId, params) => {
|
|
|
404
407
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
405
408
|
});
|
|
406
409
|
const stringifiedParams = normalizedParams.toString();
|
|
407
|
-
return stringifiedParams.length > 0 ? `${
|
|
410
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/passkeys?${stringifiedParams}` : `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/passkeys`;
|
|
408
411
|
};
|
|
409
412
|
/**
|
|
410
413
|
* Returns the passkeys registered for a user, newest first, paginated with a
|
|
@@ -421,7 +424,7 @@ const listUserPasskeys = async (userId, params, options) => {
|
|
|
421
424
|
});
|
|
422
425
|
};
|
|
423
426
|
const getBeginUserPasskeyRegistrationUrl = (userId) => {
|
|
424
|
-
return `${
|
|
427
|
+
return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/passkeys/registrations`;
|
|
425
428
|
};
|
|
426
429
|
/**
|
|
427
430
|
* Starts a WebAuthn registration ceremony for the user and returns the
|
|
@@ -451,7 +454,7 @@ const beginUserPasskeyRegistration = async (userId, beginUserPasskeyRegistration
|
|
|
451
454
|
});
|
|
452
455
|
};
|
|
453
456
|
const getFinishUserPasskeyRegistrationUrl = (userId, registrationId) => {
|
|
454
|
-
return `${
|
|
457
|
+
return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/passkeys/registrations/${encodeURIComponent(String(registrationId))}`;
|
|
455
458
|
};
|
|
456
459
|
/**
|
|
457
460
|
* Verifies the attestation against the ceremony started by
|
|
@@ -482,7 +485,7 @@ const finishUserPasskeyRegistration = async (userId, registrationId, finishUserP
|
|
|
482
485
|
});
|
|
483
486
|
};
|
|
484
487
|
const getGetUserPasswordStateUrl = (userId) => {
|
|
485
|
-
return `${
|
|
488
|
+
return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/password`;
|
|
486
489
|
};
|
|
487
490
|
/**
|
|
488
491
|
* Reports when the user's current password was set, and leaves `set_at` out
|
|
@@ -497,7 +500,7 @@ const getUserPasswordState = async (userId, options) => {
|
|
|
497
500
|
});
|
|
498
501
|
};
|
|
499
502
|
const getSetUserPasswordUrl = (userId) => {
|
|
500
|
-
return `${
|
|
503
|
+
return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/password`;
|
|
501
504
|
};
|
|
502
505
|
/**
|
|
503
506
|
* Sets a user's password, hashed with the project's current password hashing
|
|
@@ -532,7 +535,7 @@ const getListUserTeamsUrl = (userId, params) => {
|
|
|
532
535
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
533
536
|
});
|
|
534
537
|
const stringifiedParams = normalizedParams.toString();
|
|
535
|
-
return stringifiedParams.length > 0 ? `${
|
|
538
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/teams?${stringifiedParams}` : `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/teams`;
|
|
536
539
|
};
|
|
537
540
|
/**
|
|
538
541
|
* The user's team roster, ordered by team name. Each entry carries the
|
|
@@ -556,7 +559,7 @@ const getGetMyUserUrl = (params) => {
|
|
|
556
559
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
557
560
|
});
|
|
558
561
|
const stringifiedParams = normalizedParams.toString();
|
|
559
|
-
return stringifiedParams.length > 0 ? `${
|
|
562
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me?${stringifiedParams}` : `${getApiBaseUrl()}/users/me`;
|
|
560
563
|
};
|
|
561
564
|
/**
|
|
562
565
|
* Returns the user signed in to the session that authenticates the request.
|
|
@@ -580,7 +583,7 @@ const getPatchMyUserUrl = (params) => {
|
|
|
580
583
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
581
584
|
});
|
|
582
585
|
const stringifiedParams = normalizedParams.toString();
|
|
583
|
-
return stringifiedParams.length > 0 ? `${
|
|
586
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me?${stringifiedParams}` : `${getApiBaseUrl()}/users/me`;
|
|
584
587
|
};
|
|
585
588
|
/**
|
|
586
589
|
* Partially updates the caller's own schema-defined attributes. The merged
|
|
@@ -616,7 +619,7 @@ const getListMyIdentityLinksUrl = (params) => {
|
|
|
616
619
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
617
620
|
});
|
|
618
621
|
const stringifiedParams = normalizedParams.toString();
|
|
619
|
-
return stringifiedParams.length > 0 ? `${
|
|
622
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/identity_links?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/identity_links`;
|
|
620
623
|
};
|
|
621
624
|
/**
|
|
622
625
|
* The identity provider accounts a sign-in linked to the signed-in user,
|
|
@@ -638,7 +641,7 @@ const getListMyPasskeysUrl = (params) => {
|
|
|
638
641
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
639
642
|
});
|
|
640
643
|
const stringifiedParams = normalizedParams.toString();
|
|
641
|
-
return stringifiedParams.length > 0 ? `${
|
|
644
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/passkeys?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/passkeys`;
|
|
642
645
|
};
|
|
643
646
|
/**
|
|
644
647
|
* The signed-in user's own passkeys, newest first, paginated with a cursor.
|
|
@@ -661,7 +664,7 @@ const getGetMyPasswordStateUrl = (params) => {
|
|
|
661
664
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
662
665
|
});
|
|
663
666
|
const stringifiedParams = normalizedParams.toString();
|
|
664
|
-
return stringifiedParams.length > 0 ? `${
|
|
667
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/password?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/password`;
|
|
665
668
|
};
|
|
666
669
|
/**
|
|
667
670
|
* Reports when the signed-in user's current password was set, and leaves
|
|
@@ -684,7 +687,7 @@ const getListMyProjectsUrl = (params) => {
|
|
|
684
687
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
685
688
|
});
|
|
686
689
|
const stringifiedParams = normalizedParams.toString();
|
|
687
|
-
return stringifiedParams.length > 0 ? `${
|
|
690
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/projects?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/projects`;
|
|
688
691
|
};
|
|
689
692
|
/**
|
|
690
693
|
* The projects the signed-in user can act on: those they hold an active grant
|
|
@@ -718,7 +721,7 @@ const getGetMyUserSchemaUrl = (params) => {
|
|
|
718
721
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
719
722
|
});
|
|
720
723
|
const stringifiedParams = normalizedParams.toString();
|
|
721
|
-
return stringifiedParams.length > 0 ? `${
|
|
724
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/schema?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/schema`;
|
|
722
725
|
};
|
|
723
726
|
/**
|
|
724
727
|
* The schema the signed-in user's own record is validated against.
|
|
@@ -739,7 +742,7 @@ const getListMyTeamsUrl = (params) => {
|
|
|
739
742
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
740
743
|
});
|
|
741
744
|
const stringifiedParams = normalizedParams.toString();
|
|
742
|
-
return stringifiedParams.length > 0 ? `${
|
|
745
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/teams?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/teams`;
|
|
743
746
|
};
|
|
744
747
|
/**
|
|
745
748
|
* The signed-in user's own team roster, ordered by team name.
|
|
@@ -755,7 +758,7 @@ const listMyTeams = async (params, options) => {
|
|
|
755
758
|
});
|
|
756
759
|
};
|
|
757
760
|
const getCreateFlowUrl = () => {
|
|
758
|
-
return `${
|
|
761
|
+
return `${getApiBaseUrl()}/flow`;
|
|
759
762
|
};
|
|
760
763
|
/**
|
|
761
764
|
* Resolves a flow definition based on purpose + audience context and returns
|
|
@@ -807,7 +810,7 @@ const createFlow = async (createFlowBody, options) => {
|
|
|
807
810
|
});
|
|
808
811
|
};
|
|
809
812
|
const getGetFlowStepUrl = (id) => {
|
|
810
|
-
return `${
|
|
813
|
+
return `${getApiBaseUrl()}/flow/${encodeURIComponent(String(id))}`;
|
|
811
814
|
};
|
|
812
815
|
/**
|
|
813
816
|
* Returns the current capability step without advancing the state machine.
|
|
@@ -825,7 +828,7 @@ const getFlowStep = async (id, options) => {
|
|
|
825
828
|
});
|
|
826
829
|
};
|
|
827
830
|
const getSubmitFlowStepUrl = (id) => {
|
|
828
|
-
return `${
|
|
831
|
+
return `${getApiBaseUrl()}/flow/${encodeURIComponent(String(id))}/submit`;
|
|
829
832
|
};
|
|
830
833
|
/**
|
|
831
834
|
* Submits user input for the current step. The server validates,
|
|
@@ -902,7 +905,7 @@ const submitFlowStep = async (id, submitFlowStepBody, options) => {
|
|
|
902
905
|
});
|
|
903
906
|
};
|
|
904
907
|
const getCreateAuthAttemptUrl = () => {
|
|
905
|
-
return `${
|
|
908
|
+
return `${getApiBaseUrl()}/auth_attempts`;
|
|
906
909
|
};
|
|
907
910
|
/**
|
|
908
911
|
* Starts a new authentication attempt. This is the entry point for the auth_attempts state machine.
|
|
@@ -940,7 +943,7 @@ const createAuthAttempt = async (createAuthAttemptBody, options) => {
|
|
|
940
943
|
});
|
|
941
944
|
};
|
|
942
945
|
const getGetAuthAttemptUrl = (attemptId) => {
|
|
943
|
-
return `${
|
|
946
|
+
return `${getApiBaseUrl()}/auth_attempts/${encodeURIComponent(String(attemptId))}`;
|
|
944
947
|
};
|
|
945
948
|
/**
|
|
946
949
|
* Polls the current state of an authentication attempt.
|
|
@@ -959,7 +962,7 @@ const getAuthAttempt = async (attemptId, options) => {
|
|
|
959
962
|
});
|
|
960
963
|
};
|
|
961
964
|
const getIssueChallengeUrl = (attemptId) => {
|
|
962
|
-
return `${
|
|
965
|
+
return `${getApiBaseUrl()}/auth_attempts/${encodeURIComponent(String(attemptId))}/challenges`;
|
|
963
966
|
};
|
|
964
967
|
/**
|
|
965
968
|
* Issues a single-factor verification challenge within an auth attempt.
|
|
@@ -990,7 +993,7 @@ const issueChallenge = async (attemptId, issueChallengeBody, options) => {
|
|
|
990
993
|
});
|
|
991
994
|
};
|
|
992
995
|
const getVerifyChallengeProofUrl = (attemptId, challengeId) => {
|
|
993
|
-
return `${
|
|
996
|
+
return `${getApiBaseUrl()}/auth_attempts/${encodeURIComponent(String(attemptId))}/challenges/${encodeURIComponent(String(challengeId))}/verify`;
|
|
994
997
|
};
|
|
995
998
|
/**
|
|
996
999
|
* Submits a proof (credential, code, assertion) to verify a factor challenge.
|
|
@@ -1025,7 +1028,7 @@ const verifyChallengeProof = async (attemptId, challengeId, verifyChallengeProof
|
|
|
1025
1028
|
});
|
|
1026
1029
|
};
|
|
1027
1030
|
const getCreateHandoffUrl = (attemptId) => {
|
|
1028
|
-
return `${
|
|
1031
|
+
return `${getApiBaseUrl()}/auth_attempts/${encodeURIComponent(String(attemptId))}/handoff`;
|
|
1029
1032
|
};
|
|
1030
1033
|
/**
|
|
1031
1034
|
* Completes the authentication attempt and mints a `handoff_token`.
|
|
@@ -1049,7 +1052,7 @@ const createHandoff = async (attemptId, options) => {
|
|
|
1049
1052
|
});
|
|
1050
1053
|
};
|
|
1051
1054
|
const getCreateProjectUrl = () => {
|
|
1052
|
-
return `${
|
|
1055
|
+
return `${getApiBaseUrl()}/projects`;
|
|
1053
1056
|
};
|
|
1054
1057
|
/**
|
|
1055
1058
|
* Creates a project and returns its project secret and preview secret, which no
|
|
@@ -1080,7 +1083,7 @@ const createProject = async (createProjectBody, options) => {
|
|
|
1080
1083
|
});
|
|
1081
1084
|
};
|
|
1082
1085
|
const getQueryProjectsUrl = () => {
|
|
1083
|
-
return `${
|
|
1086
|
+
return `${getApiBaseUrl()}/projects/query`;
|
|
1084
1087
|
};
|
|
1085
1088
|
/**
|
|
1086
1089
|
* Returns the project the project secret belongs to, as a page of at most one
|
|
@@ -1111,7 +1114,7 @@ const queryProjects = async (queryProjectsBody, options) => {
|
|
|
1111
1114
|
});
|
|
1112
1115
|
};
|
|
1113
1116
|
const getGetProjectUrl = (projectId) => {
|
|
1114
|
-
return `${
|
|
1117
|
+
return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}`;
|
|
1115
1118
|
};
|
|
1116
1119
|
/**
|
|
1117
1120
|
* Returns the current state of a project.
|
|
@@ -1124,7 +1127,7 @@ const getProject = async (projectId, options) => {
|
|
|
1124
1127
|
});
|
|
1125
1128
|
};
|
|
1126
1129
|
const getPatchProjectUrl = (projectId) => {
|
|
1127
|
-
return `${
|
|
1130
|
+
return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}`;
|
|
1128
1131
|
};
|
|
1129
1132
|
/**
|
|
1130
1133
|
* Updates the state of a project.
|
|
@@ -1155,7 +1158,7 @@ const getListProjectAdminsUrl = (projectId, params) => {
|
|
|
1155
1158
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1156
1159
|
});
|
|
1157
1160
|
const stringifiedParams = normalizedParams.toString();
|
|
1158
|
-
return stringifiedParams.length > 0 ? `${
|
|
1161
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/admins?${stringifiedParams}` : `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/admins`;
|
|
1159
1162
|
};
|
|
1160
1163
|
/**
|
|
1161
1164
|
* Lists the people who can administer the project, and how each of them
|
|
@@ -1185,7 +1188,7 @@ const getListProjectAdminsUrl = (projectId, params) => {
|
|
|
1185
1188
|
* Ordered by `user_id` and paginated with `page_token`.
|
|
1186
1189
|
*
|
|
1187
1190
|
* Accepts either a project secret (`oauth2`) or a user-bound Console
|
|
1188
|
-
* session cookie (`
|
|
1191
|
+
* session cookie (`sessionCookie`) that can read the project.
|
|
1189
1192
|
* @summary List project admins
|
|
1190
1193
|
*/
|
|
1191
1194
|
const listProjectAdmins = async (projectId, params, options) => {
|
|
@@ -1195,7 +1198,7 @@ const listProjectAdmins = async (projectId, params, options) => {
|
|
|
1195
1198
|
});
|
|
1196
1199
|
};
|
|
1197
1200
|
const getInitClaimUrl = (projectId) => {
|
|
1198
|
-
return `${
|
|
1201
|
+
return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/init`;
|
|
1199
1202
|
};
|
|
1200
1203
|
/**
|
|
1201
1204
|
* Starts a claim challenge for an unclaimed project. Authenticated by the
|
|
@@ -1217,7 +1220,7 @@ const getGetClaimStatusUrl = (projectId, params) => {
|
|
|
1217
1220
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1218
1221
|
});
|
|
1219
1222
|
const stringifiedParams = normalizedParams.toString();
|
|
1220
|
-
return stringifiedParams.length > 0 ? `${
|
|
1223
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/status?${stringifiedParams}` : `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/status`;
|
|
1221
1224
|
};
|
|
1222
1225
|
/**
|
|
1223
1226
|
* Polled by the CLI while a browser completes the claim. Authorized by the
|
|
@@ -1237,11 +1240,11 @@ const getClaimStatus = async (projectId, params, options) => {
|
|
|
1237
1240
|
});
|
|
1238
1241
|
};
|
|
1239
1242
|
const getCompleteClaimUrl = (projectId) => {
|
|
1240
|
-
return `${
|
|
1243
|
+
return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/complete`;
|
|
1241
1244
|
};
|
|
1242
1245
|
/**
|
|
1243
1246
|
* Called by the browser after the developer authenticates on the claim page.
|
|
1244
|
-
* Authenticated by the
|
|
1247
|
+
* Authenticated by the session cookie, it attaches the project to
|
|
1245
1248
|
* the developer's personal team using the `challenge_id` from the claim URL as
|
|
1246
1249
|
* its single-use, browser-safe authorization.
|
|
1247
1250
|
* @summary Complete a project claim
|
|
@@ -1271,7 +1274,7 @@ const getGetClaimWindowUrl = (projectId, params) => {
|
|
|
1271
1274
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1272
1275
|
});
|
|
1273
1276
|
const stringifiedParams = normalizedParams.toString();
|
|
1274
|
-
return stringifiedParams.length > 0 ? `${
|
|
1277
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/window?${stringifiedParams}` : `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/window`;
|
|
1275
1278
|
};
|
|
1276
1279
|
/**
|
|
1277
1280
|
* Read by the claim page in the browser to show how long is left to claim the
|
|
@@ -1289,7 +1292,7 @@ const getClaimWindow = async (projectId, params, options) => {
|
|
|
1289
1292
|
});
|
|
1290
1293
|
};
|
|
1291
1294
|
const getAddOriginUrl = (projectId) => {
|
|
1292
|
-
return `${
|
|
1295
|
+
return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/origins`;
|
|
1293
1296
|
};
|
|
1294
1297
|
/**
|
|
1295
1298
|
* Adds one `{pattern, kind}` to the project's origins. A primary pattern
|
|
@@ -1318,7 +1321,7 @@ const addOrigin = async (projectId, addOriginBody, options) => {
|
|
|
1318
1321
|
});
|
|
1319
1322
|
};
|
|
1320
1323
|
const getRemoveOriginUrl = (projectId) => {
|
|
1321
|
-
return `${
|
|
1324
|
+
return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/origins/remove`;
|
|
1322
1325
|
};
|
|
1323
1326
|
/**
|
|
1324
1327
|
* Removes one pattern from the project's origins. Requests from URLs only
|
|
@@ -1352,7 +1355,7 @@ const getListPreviewsUrl = (projectId, params) => {
|
|
|
1352
1355
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1353
1356
|
});
|
|
1354
1357
|
const stringifiedParams = normalizedParams.toString();
|
|
1355
|
-
return stringifiedParams.length > 0 ? `${
|
|
1358
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/previews?${stringifiedParams}` : `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/previews`;
|
|
1356
1359
|
};
|
|
1357
1360
|
/**
|
|
1358
1361
|
* Lists the project's live previews, newest first by `created_at`. An
|
|
@@ -1367,7 +1370,7 @@ const listPreviews = async (projectId, params, options) => {
|
|
|
1367
1370
|
});
|
|
1368
1371
|
};
|
|
1369
1372
|
const getRemovePreviewUrl = (projectId) => {
|
|
1370
|
-
return `${
|
|
1373
|
+
return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/previews/remove`;
|
|
1371
1374
|
};
|
|
1372
1375
|
/**
|
|
1373
1376
|
* Ends a preview before it expires: the URL stops being served at once.
|
|
@@ -1401,7 +1404,7 @@ const removePreview = async (projectId, removePreviewBody, options) => {
|
|
|
1401
1404
|
});
|
|
1402
1405
|
};
|
|
1403
1406
|
const getCreateSessionUrl = () => {
|
|
1404
|
-
return `${
|
|
1407
|
+
return `${getApiBaseUrl()}/sessions`;
|
|
1405
1408
|
};
|
|
1406
1409
|
/**
|
|
1407
1410
|
* Creates an anonymous session shell with no user and no factors (`state: building`).
|
|
@@ -1415,8 +1418,9 @@ const getCreateSessionUrl = () => {
|
|
|
1415
1418
|
* Creating a session is an app-plane operation on the project credential
|
|
1416
1419
|
* (`session.write`). The returned `session_token` is a session credential for the
|
|
1417
1420
|
* end-user client, not a management scope: it is delivered as the
|
|
1418
|
-
* `
|
|
1419
|
-
*
|
|
1421
|
+
* `__Host-zitadel_session` cookie (`zitadel_session` over plain http to a
|
|
1422
|
+
* loopback host) and authorises the self-service operations
|
|
1423
|
+
* `GET /sessions/me` and `DELETE /sessions/me` (`sessionCookie` scheme). The
|
|
1420
1424
|
* by-id operations `GET /sessions/{session_id}` and `DELETE /sessions/{session_id}`
|
|
1421
1425
|
* are operator endpoints and require `session.read` / `session.delete` instead.
|
|
1422
1426
|
*
|
|
@@ -1452,7 +1456,7 @@ const getQuerySessionsUrl = (params) => {
|
|
|
1452
1456
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1453
1457
|
});
|
|
1454
1458
|
const stringifiedParams = normalizedParams.toString();
|
|
1455
|
-
return stringifiedParams.length > 0 ? `${
|
|
1459
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/query?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/query`;
|
|
1456
1460
|
};
|
|
1457
1461
|
/**
|
|
1458
1462
|
* Returns the sessions of a project, paginated with a cursor.
|
|
@@ -1485,7 +1489,7 @@ const getExchangeHandoffUrl = (params) => {
|
|
|
1485
1489
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1486
1490
|
});
|
|
1487
1491
|
const stringifiedParams = normalizedParams.toString();
|
|
1488
|
-
return stringifiedParams.length > 0 ? `${
|
|
1492
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/exchange?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/exchange`;
|
|
1489
1493
|
};
|
|
1490
1494
|
/**
|
|
1491
1495
|
* Consumes a one-time `handoff_token` minted by `POST /auth_attempts/{id}/handoff`
|
|
@@ -1534,7 +1538,7 @@ const exchangeHandoff = async (exchangeHandoffBody, params, options) => {
|
|
|
1534
1538
|
});
|
|
1535
1539
|
};
|
|
1536
1540
|
const getGetSessionUrl = (sessionId) => {
|
|
1537
|
-
return `${
|
|
1541
|
+
return `${getApiBaseUrl()}/sessions/${encodeURIComponent(String(sessionId))}`;
|
|
1538
1542
|
};
|
|
1539
1543
|
/**
|
|
1540
1544
|
* Returns the current state of a session including its factors and all currently
|
|
@@ -1552,14 +1556,14 @@ const getSession = async (sessionId, options) => {
|
|
|
1552
1556
|
});
|
|
1553
1557
|
};
|
|
1554
1558
|
const getRevokeSessionUrl = (sessionId) => {
|
|
1555
|
-
return `${
|
|
1559
|
+
return `${getApiBaseUrl()}/sessions/${encodeURIComponent(String(sessionId))}`;
|
|
1556
1560
|
};
|
|
1557
1561
|
/**
|
|
1558
1562
|
* Permanently deletes the session, terminating it immediately.
|
|
1559
1563
|
*
|
|
1560
1564
|
* This is the operator revoke path and requires the `session.delete` scope on a
|
|
1561
|
-
* project-bound credential. End-user logout with the
|
|
1562
|
-
* `DELETE /sessions/me` (`
|
|
1565
|
+
* project-bound credential. End-user logout with the session cookie is
|
|
1566
|
+
* `DELETE /sessions/me` (`sessionCookie` scheme).
|
|
1563
1567
|
*
|
|
1564
1568
|
* Idempotent: deleting a session that does not exist (or was already deleted)
|
|
1565
1569
|
* still returns 204. After deletion, any tokens derived from the session are
|
|
@@ -1578,7 +1582,7 @@ const getGetMySessionUrl = (params) => {
|
|
|
1578
1582
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1579
1583
|
});
|
|
1580
1584
|
const stringifiedParams = normalizedParams.toString();
|
|
1581
|
-
return stringifiedParams.length > 0 ? `${
|
|
1585
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/me?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/me`;
|
|
1582
1586
|
};
|
|
1583
1587
|
/**
|
|
1584
1588
|
* Returns the current state of the current session including its factors and all currently
|
|
@@ -1603,12 +1607,12 @@ const getRevokeMySessionUrl = (params) => {
|
|
|
1603
1607
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1604
1608
|
});
|
|
1605
1609
|
const stringifiedParams = normalizedParams.toString();
|
|
1606
|
-
return stringifiedParams.length > 0 ? `${
|
|
1610
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/me?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/me`;
|
|
1607
1611
|
};
|
|
1608
1612
|
/**
|
|
1609
1613
|
* Logs out by permanently deleting the session.
|
|
1610
1614
|
*
|
|
1611
|
-
* The
|
|
1615
|
+
* The session cookie issued at creation (or superseded by a handoff
|
|
1612
1616
|
* exchange) is required, with the session's token from `GET /sessions/me/csrf`
|
|
1613
1617
|
* in the `X-Zitadel-CSRF` header. Idempotent: if the session is already gone
|
|
1614
1618
|
* this still returns 204. Any tokens derived from the session are invalidated,
|
|
@@ -1630,13 +1634,13 @@ const getGetMySessionCsrfTokenUrl = (params) => {
|
|
|
1630
1634
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1631
1635
|
});
|
|
1632
1636
|
const stringifiedParams = normalizedParams.toString();
|
|
1633
|
-
return stringifiedParams.length > 0 ? `${
|
|
1637
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/me/csrf?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/me/csrf`;
|
|
1634
1638
|
};
|
|
1635
1639
|
/**
|
|
1636
1640
|
* Returns the session-bound token for cross-site request forgery protection
|
|
1637
1641
|
* (ADR 053 §5). Browser code sends it in the `X-Zitadel-CSRF` header on the
|
|
1638
1642
|
* state-changing requests the session cookie authenticates that require it
|
|
1639
|
-
* — see the `
|
|
1643
|
+
* — see the `sessionCookie` scheme. It authorizes nothing on its own: the
|
|
1640
1644
|
* HttpOnly cookie is still the credential, and a cross-site page cannot
|
|
1641
1645
|
* read this response. It stays the same for the life of the session, so a
|
|
1642
1646
|
* client fetches it once per session.
|
|
@@ -1657,7 +1661,7 @@ const getCreateSchemaUrl = (params) => {
|
|
|
1657
1661
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1658
1662
|
});
|
|
1659
1663
|
const stringifiedParams = normalizedParams.toString();
|
|
1660
|
-
return stringifiedParams.length > 0 ? `${
|
|
1664
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/schemas?${stringifiedParams}` : `${getApiBaseUrl()}/schemas`;
|
|
1661
1665
|
};
|
|
1662
1666
|
/**
|
|
1663
1667
|
* Create a new schema. The optional `$id` field is the JSON Schema document
|
|
@@ -1702,7 +1706,7 @@ const getListSchemasUrl = (params) => {
|
|
|
1702
1706
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1703
1707
|
});
|
|
1704
1708
|
const stringifiedParams = normalizedParams.toString();
|
|
1705
|
-
return stringifiedParams.length > 0 ? `${
|
|
1709
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/schemas?${stringifiedParams}` : `${getApiBaseUrl()}/schemas`;
|
|
1706
1710
|
};
|
|
1707
1711
|
/**
|
|
1708
1712
|
* Retrieve a list of all schemas available in the system. This endpoint
|
|
@@ -1721,7 +1725,7 @@ const getGetSchemaByIdUrl = (id, params) => {
|
|
|
1721
1725
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1722
1726
|
});
|
|
1723
1727
|
const stringifiedParams = normalizedParams.toString();
|
|
1724
|
-
return stringifiedParams.length > 0 ? `${
|
|
1728
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/schemas/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/schemas/${encodeURIComponent(String(id))}`;
|
|
1725
1729
|
};
|
|
1726
1730
|
/**
|
|
1727
1731
|
* Get a schema by its ID. A schema ID identifies one immutable revision, so
|
|
@@ -1743,7 +1747,7 @@ const getSchemaById = async (id, params, options) => {
|
|
|
1743
1747
|
});
|
|
1744
1748
|
};
|
|
1745
1749
|
const getCreateFlowDefinitionUrl = () => {
|
|
1746
|
-
return `${
|
|
1750
|
+
return `${getApiBaseUrl()}/flow_definitions`;
|
|
1747
1751
|
};
|
|
1748
1752
|
/**
|
|
1749
1753
|
* Publishes a new flow definition revision.
|
|
@@ -1789,7 +1793,7 @@ const getListFlowDefinitionsUrl = (params) => {
|
|
|
1789
1793
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1790
1794
|
});
|
|
1791
1795
|
const stringifiedParams = normalizedParams.toString();
|
|
1792
|
-
return stringifiedParams.length > 0 ? `${
|
|
1796
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/flow_definitions?${stringifiedParams}` : `${getApiBaseUrl()}/flow_definitions`;
|
|
1793
1797
|
};
|
|
1794
1798
|
/**
|
|
1795
1799
|
* Retrieves a list of all flow definitions, newest by creation time first.
|
|
@@ -1804,7 +1808,7 @@ const listFlowDefinitions = async (params, options) => {
|
|
|
1804
1808
|
});
|
|
1805
1809
|
};
|
|
1806
1810
|
const getGetFlowDefinitionUrl = (id) => {
|
|
1807
|
-
return `${
|
|
1811
|
+
return `${getApiBaseUrl()}/flow_definitions/${encodeURIComponent(String(id))}`;
|
|
1808
1812
|
};
|
|
1809
1813
|
/**
|
|
1810
1814
|
* Get a flow definition by id
|
|
@@ -1822,7 +1826,7 @@ const getCreateTeamUrl = (params) => {
|
|
|
1822
1826
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1823
1827
|
});
|
|
1824
1828
|
const stringifiedParams = normalizedParams.toString();
|
|
1825
|
-
return stringifiedParams.length > 0 ? `${
|
|
1829
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/teams?${stringifiedParams}` : `${getApiBaseUrl()}/teams`;
|
|
1826
1830
|
};
|
|
1827
1831
|
/**
|
|
1828
1832
|
* Creates a team in the project, with a name no other team in the project has.
|
|
@@ -1856,10 +1860,13 @@ const getQueryTeamsUrl = (params) => {
|
|
|
1856
1860
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1857
1861
|
});
|
|
1858
1862
|
const stringifiedParams = normalizedParams.toString();
|
|
1859
|
-
return stringifiedParams.length > 0 ? `${
|
|
1863
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/teams/query?${stringifiedParams}` : `${getApiBaseUrl()}/teams/query`;
|
|
1860
1864
|
};
|
|
1861
1865
|
/**
|
|
1862
1866
|
* Returns the teams of a project, paginated with a cursor.
|
|
1867
|
+
*
|
|
1868
|
+
* `project_id` names the project to list; without it, the credential's own
|
|
1869
|
+
* project is listed.
|
|
1863
1870
|
* @summary Query teams
|
|
1864
1871
|
*/
|
|
1865
1872
|
const queryTeams = async (queryTeamsBody, params, options) => {
|
|
@@ -1882,7 +1889,7 @@ const queryTeams = async (queryTeamsBody, params, options) => {
|
|
|
1882
1889
|
});
|
|
1883
1890
|
};
|
|
1884
1891
|
const getGetTeamUrl = (teamId) => {
|
|
1885
|
-
return `${
|
|
1892
|
+
return `${getApiBaseUrl()}/teams/${encodeURIComponent(String(teamId))}`;
|
|
1886
1893
|
};
|
|
1887
1894
|
/**
|
|
1888
1895
|
* Returns a Team by its id.
|
|
@@ -1895,7 +1902,7 @@ const getTeam = async (teamId, options) => {
|
|
|
1895
1902
|
});
|
|
1896
1903
|
};
|
|
1897
1904
|
const getDeleteTeamUrl = (teamId) => {
|
|
1898
|
-
return `${
|
|
1905
|
+
return `${getApiBaseUrl()}/teams/${encodeURIComponent(String(teamId))}`;
|
|
1899
1906
|
};
|
|
1900
1907
|
/**
|
|
1901
1908
|
* Deactivates the team.
|
|
@@ -1920,7 +1927,7 @@ const deleteTeam = async (teamId, options) => {
|
|
|
1920
1927
|
});
|
|
1921
1928
|
};
|
|
1922
1929
|
const getUpdateTeamUrl = (teamId) => {
|
|
1923
|
-
return `${
|
|
1930
|
+
return `${getApiBaseUrl()}/teams/${encodeURIComponent(String(teamId))}`;
|
|
1924
1931
|
};
|
|
1925
1932
|
/**
|
|
1926
1933
|
* Update team. Only active teams can be updated.
|
|
@@ -1951,7 +1958,7 @@ const getCreateBrandingUrl = (params) => {
|
|
|
1951
1958
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1952
1959
|
});
|
|
1953
1960
|
const stringifiedParams = normalizedParams.toString();
|
|
1954
|
-
return stringifiedParams.length > 0 ? `${
|
|
1961
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/branding?${stringifiedParams}` : `${getApiBaseUrl()}/branding`;
|
|
1955
1962
|
};
|
|
1956
1963
|
/**
|
|
1957
1964
|
* Publishes a new immutable branding revision for the project. Branding
|
|
@@ -1989,7 +1996,7 @@ const getListBrandingUrl = (params) => {
|
|
|
1989
1996
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
1990
1997
|
});
|
|
1991
1998
|
const stringifiedParams = normalizedParams.toString();
|
|
1992
|
-
return stringifiedParams.length > 0 ? `${
|
|
1999
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/branding?${stringifiedParams}` : `${getApiBaseUrl()}/branding`;
|
|
1993
2000
|
};
|
|
1994
2001
|
/**
|
|
1995
2002
|
* Lists branding revisions for the project, newest first, capped at the
|
|
@@ -2006,7 +2013,7 @@ const listBranding = async (params, options) => {
|
|
|
2006
2013
|
});
|
|
2007
2014
|
};
|
|
2008
2015
|
const getGetBrandingByIdUrl = (id) => {
|
|
2009
|
-
return `${
|
|
2016
|
+
return `${getApiBaseUrl()}/branding/${encodeURIComponent(String(id))}`;
|
|
2010
2017
|
};
|
|
2011
2018
|
/**
|
|
2012
2019
|
* Retrieves a single branding revision, including its stored configuration.
|
|
@@ -2024,7 +2031,7 @@ const getCreateIdpUrl = (params) => {
|
|
|
2024
2031
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2025
2032
|
});
|
|
2026
2033
|
const stringifiedParams = normalizedParams.toString();
|
|
2027
|
-
return stringifiedParams.length > 0 ? `${
|
|
2034
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps?${stringifiedParams}` : `${getApiBaseUrl()}/idps`;
|
|
2028
2035
|
};
|
|
2029
2036
|
/**
|
|
2030
2037
|
* Creates or revises a connection document. If the slug does not already
|
|
@@ -2086,7 +2093,7 @@ const getQueryIdpsUrl = (params) => {
|
|
|
2086
2093
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2087
2094
|
});
|
|
2088
2095
|
const stringifiedParams = normalizedParams.toString();
|
|
2089
|
-
return stringifiedParams.length > 0 ? `${
|
|
2096
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps/query?${stringifiedParams}` : `${getApiBaseUrl()}/idps/query`;
|
|
2090
2097
|
};
|
|
2091
2098
|
/**
|
|
2092
2099
|
* Returns the identity provider connections of a project, paginated with a
|
|
@@ -2118,7 +2125,7 @@ const getGetIdpByIdUrl = (id, params) => {
|
|
|
2118
2125
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2119
2126
|
});
|
|
2120
2127
|
const stringifiedParams = normalizedParams.toString();
|
|
2121
|
-
return stringifiedParams.length > 0 ? `${
|
|
2128
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/idps/${encodeURIComponent(String(id))}`;
|
|
2122
2129
|
};
|
|
2123
2130
|
/**
|
|
2124
2131
|
* Reads a connection by its id, at its newest revision.
|
|
@@ -2139,7 +2146,7 @@ const getListIdpRevisionsUrl = (id, params) => {
|
|
|
2139
2146
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2140
2147
|
});
|
|
2141
2148
|
const stringifiedParams = normalizedParams.toString();
|
|
2142
|
-
return stringifiedParams.length > 0 ? `${
|
|
2149
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps/${encodeURIComponent(String(id))}/revisions?${stringifiedParams}` : `${getApiBaseUrl()}/idps/${encodeURIComponent(String(id))}/revisions`;
|
|
2143
2150
|
};
|
|
2144
2151
|
/**
|
|
2145
2152
|
* Returns every revision of one connection, newest first, paginated with a
|
|
@@ -2160,7 +2167,7 @@ const getGetIdpRevisionByIdUrl = (revisionId, params) => {
|
|
|
2160
2167
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2161
2168
|
});
|
|
2162
2169
|
const stringifiedParams = normalizedParams.toString();
|
|
2163
|
-
return stringifiedParams.length > 0 ? `${
|
|
2170
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps/revisions/${encodeURIComponent(String(revisionId))}?${stringifiedParams}` : `${getApiBaseUrl()}/idps/revisions/${encodeURIComponent(String(revisionId))}`;
|
|
2164
2171
|
};
|
|
2165
2172
|
/**
|
|
2166
2173
|
* Reads one revision of a connection by its `revision_id`, the value an auth
|
|
@@ -2181,7 +2188,7 @@ const getListPoliciesUrl = (params) => {
|
|
|
2181
2188
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2182
2189
|
});
|
|
2183
2190
|
const stringifiedParams = normalizedParams.toString();
|
|
2184
|
-
return stringifiedParams.length > 0 ? `${
|
|
2191
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies?${stringifiedParams}` : `${getApiBaseUrl()}/policies`;
|
|
2185
2192
|
};
|
|
2186
2193
|
/**
|
|
2187
2194
|
* Lists the project's policies, one per operation, each as its newest
|
|
@@ -2204,7 +2211,7 @@ const getPublishPolicyUrl = (params) => {
|
|
|
2204
2211
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2205
2212
|
});
|
|
2206
2213
|
const stringifiedParams = normalizedParams.toString();
|
|
2207
|
-
return stringifiedParams.length > 0 ? `${
|
|
2214
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies?${stringifiedParams}` : `${getApiBaseUrl()}/policies`;
|
|
2208
2215
|
};
|
|
2209
2216
|
/**
|
|
2210
2217
|
* Publishes the project's policy for an operation as a new immutable
|
|
@@ -2251,7 +2258,7 @@ const getEvaluatePolicyUrl = (params) => {
|
|
|
2251
2258
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2252
2259
|
});
|
|
2253
2260
|
const stringifiedParams = normalizedParams.toString();
|
|
2254
|
-
return stringifiedParams.length > 0 ? `${
|
|
2261
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies/evaluate?${stringifiedParams}` : `${getApiBaseUrl()}/policies/evaluate`;
|
|
2255
2262
|
};
|
|
2256
2263
|
/**
|
|
2257
2264
|
* Evaluates a policy config against one request, without side effects, and
|
|
@@ -2302,7 +2309,7 @@ const getGetPolicyUrl = (policyId, params) => {
|
|
|
2302
2309
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2303
2310
|
});
|
|
2304
2311
|
const stringifiedParams = normalizedParams.toString();
|
|
2305
|
-
return stringifiedParams.length > 0 ? `${
|
|
2312
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies/${encodeURIComponent(String(policyId))}?${stringifiedParams}` : `${getApiBaseUrl()}/policies/${encodeURIComponent(String(policyId))}`;
|
|
2306
2313
|
};
|
|
2307
2314
|
/**
|
|
2308
2315
|
* Reads a policy as its newest revision, the one that applies the next time
|
|
@@ -2324,7 +2331,7 @@ const getListPolicyRevisionsUrl = (policyId, params) => {
|
|
|
2324
2331
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2325
2332
|
});
|
|
2326
2333
|
const stringifiedParams = normalizedParams.toString();
|
|
2327
|
-
return stringifiedParams.length > 0 ? `${
|
|
2334
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies/${encodeURIComponent(String(policyId))}/revisions?${stringifiedParams}` : `${getApiBaseUrl()}/policies/${encodeURIComponent(String(policyId))}/revisions`;
|
|
2328
2335
|
};
|
|
2329
2336
|
/**
|
|
2330
2337
|
* Returns every revision of one policy, newest first, paginated with a
|
|
@@ -2346,7 +2353,7 @@ const getGetPolicyRevisionUrl = (revisionId, params) => {
|
|
|
2346
2353
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2347
2354
|
});
|
|
2348
2355
|
const stringifiedParams = normalizedParams.toString();
|
|
2349
|
-
return stringifiedParams.length > 0 ? `${
|
|
2356
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies/revisions/${encodeURIComponent(String(revisionId))}?${stringifiedParams}` : `${getApiBaseUrl()}/policies/revisions/${encodeURIComponent(String(revisionId))}`;
|
|
2350
2357
|
};
|
|
2351
2358
|
/**
|
|
2352
2359
|
* Reads one revision of a policy, newest or not.
|
|
@@ -2367,7 +2374,7 @@ const getCreateReleaseUrl = (params) => {
|
|
|
2367
2374
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2368
2375
|
});
|
|
2369
2376
|
const stringifiedParams = normalizedParams.toString();
|
|
2370
|
-
return stringifiedParams.length > 0 ? `${
|
|
2377
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases?${stringifiedParams}` : `${getApiBaseUrl()}/releases`;
|
|
2371
2378
|
};
|
|
2372
2379
|
/**
|
|
2373
2380
|
* Assembles a release from existing revisions, given as
|
|
@@ -2416,7 +2423,7 @@ const getListReleasesUrl = (params) => {
|
|
|
2416
2423
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2417
2424
|
});
|
|
2418
2425
|
const stringifiedParams = normalizedParams.toString();
|
|
2419
|
-
return stringifiedParams.length > 0 ? `${
|
|
2426
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases?${stringifiedParams}` : `${getApiBaseUrl()}/releases`;
|
|
2420
2427
|
};
|
|
2421
2428
|
/**
|
|
2422
2429
|
* Lists the project's releases, newest first.
|
|
@@ -2444,7 +2451,7 @@ const getBuildReleaseUrl = (params) => {
|
|
|
2444
2451
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2445
2452
|
});
|
|
2446
2453
|
const stringifiedParams = normalizedParams.toString();
|
|
2447
|
-
return stringifiedParams.length > 0 ? `${
|
|
2454
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases/build?${stringifiedParams}` : `${getApiBaseUrl()}/releases/build`;
|
|
2448
2455
|
};
|
|
2449
2456
|
/**
|
|
2450
2457
|
* Builds a release from the resources of `.zitadel/` as authored on disk,
|
|
@@ -2506,7 +2513,7 @@ const getGetReleaseByIdUrl = (releaseId, params) => {
|
|
|
2506
2513
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2507
2514
|
});
|
|
2508
2515
|
const stringifiedParams = normalizedParams.toString();
|
|
2509
|
-
return stringifiedParams.length > 0 ? `${
|
|
2516
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases/${encodeURIComponent(String(releaseId))}?${stringifiedParams}` : `${getApiBaseUrl()}/releases/${encodeURIComponent(String(releaseId))}`;
|
|
2510
2517
|
};
|
|
2511
2518
|
/**
|
|
2512
2519
|
* Reads one release: its digest, its metadata, whether it was revoked, and
|
|
@@ -2536,7 +2543,7 @@ const getRevokeReleaseUrl = (releaseId, params) => {
|
|
|
2536
2543
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2537
2544
|
});
|
|
2538
2545
|
const stringifiedParams = normalizedParams.toString();
|
|
2539
|
-
return stringifiedParams.length > 0 ? `${
|
|
2546
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases/${encodeURIComponent(String(releaseId))}/revoke?${stringifiedParams}` : `${getApiBaseUrl()}/releases/${encodeURIComponent(String(releaseId))}/revoke`;
|
|
2540
2547
|
};
|
|
2541
2548
|
/**
|
|
2542
2549
|
* Marks the release revoked, so that its content is never served again.
|
|
@@ -2572,7 +2579,7 @@ const getCreateGrantUrl = (params) => {
|
|
|
2572
2579
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2573
2580
|
});
|
|
2574
2581
|
const stringifiedParams = normalizedParams.toString();
|
|
2575
|
-
return stringifiedParams.length > 0 ? `${
|
|
2582
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/grants?${stringifiedParams}` : `${getApiBaseUrl()}/grants`;
|
|
2576
2583
|
};
|
|
2577
2584
|
/**
|
|
2578
2585
|
* Bind a user or team to `project.viewer`, `project.editor`, or
|
|
@@ -2591,9 +2598,9 @@ const getCreateGrantUrl = (params) => {
|
|
|
2591
2598
|
* identifier and display.
|
|
2592
2599
|
*
|
|
2593
2600
|
* Accepts either a project secret (`oauth2`) or a user-bound Console
|
|
2594
|
-
* session cookie (`
|
|
2601
|
+
* session cookie (`sessionCookie`). Session callers are authorized as
|
|
2595
2602
|
* the human against the target project (home may differ). Cookie-authenticated
|
|
2596
|
-
* requests follow the scheme's CSRF rules (`
|
|
2603
|
+
* requests follow the scheme's CSRF rules (`sessionCookie`).
|
|
2597
2604
|
* @summary Create grant
|
|
2598
2605
|
*/
|
|
2599
2606
|
const createGrant = async (createGrantBody, params, options) => {
|
|
@@ -2621,7 +2628,7 @@ const getQueryGrantsUrl = (params) => {
|
|
|
2621
2628
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2622
2629
|
});
|
|
2623
2630
|
const stringifiedParams = normalizedParams.toString();
|
|
2624
|
-
return stringifiedParams.length > 0 ? `${
|
|
2631
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/grants/query?${stringifiedParams}` : `${getApiBaseUrl()}/grants/query`;
|
|
2625
2632
|
};
|
|
2626
2633
|
/**
|
|
2627
2634
|
* Returns the collaboration grants of a project, paginated with a cursor.
|
|
@@ -2638,8 +2645,8 @@ const getQueryGrantsUrl = (params) => {
|
|
|
2638
2645
|
* the project Check may expand without those scopes.
|
|
2639
2646
|
*
|
|
2640
2647
|
* Accepts either a project secret (`oauth2`) or a user-bound Console
|
|
2641
|
-
* session cookie (`
|
|
2642
|
-
* follow the scheme's CSRF rules (`
|
|
2648
|
+
* session cookie (`sessionCookie`). Cookie-authenticated requests
|
|
2649
|
+
* follow the scheme's CSRF rules (`sessionCookie`).
|
|
2643
2650
|
* @summary Query grants
|
|
2644
2651
|
*/
|
|
2645
2652
|
const queryGrants = async (queryGrantsBody, params, options) => {
|
|
@@ -2673,7 +2680,7 @@ const getGetGrantUrl = (id, params) => {
|
|
|
2673
2680
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2674
2681
|
});
|
|
2675
2682
|
const stringifiedParams = normalizedParams.toString();
|
|
2676
|
-
return stringifiedParams.length > 0 ? `${
|
|
2683
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/grants/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/grants/${encodeURIComponent(String(id))}`;
|
|
2677
2684
|
};
|
|
2678
2685
|
/**
|
|
2679
2686
|
* Loads a grant by `(project_id, id)` that this API manages (user or team
|
|
@@ -2690,8 +2697,8 @@ const getGetGrantUrl = (id, params) => {
|
|
|
2690
2697
|
* Check may expand without those scopes.
|
|
2691
2698
|
*
|
|
2692
2699
|
* Accepts either a project secret (`oauth2`) or a user-bound Console
|
|
2693
|
-
* session cookie (`
|
|
2694
|
-
* follow the scheme's CSRF rules (`
|
|
2700
|
+
* session cookie (`sessionCookie`). Cookie-authenticated requests
|
|
2701
|
+
* follow the scheme's CSRF rules (`sessionCookie`).
|
|
2695
2702
|
* @summary Get grant
|
|
2696
2703
|
*/
|
|
2697
2704
|
const getGrant = async (id, params, options) => {
|
|
@@ -2706,7 +2713,7 @@ const getDeleteGrantUrl = (id, params) => {
|
|
|
2706
2713
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2707
2714
|
});
|
|
2708
2715
|
const stringifiedParams = normalizedParams.toString();
|
|
2709
|
-
return stringifiedParams.length > 0 ? `${
|
|
2716
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/grants/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/grants/${encodeURIComponent(String(id))}`;
|
|
2710
2717
|
};
|
|
2711
2718
|
/**
|
|
2712
2719
|
* Soft-revokes a grant this API manages and emits `authz.revoked`.
|
|
@@ -2715,8 +2722,8 @@ const getDeleteGrantUrl = (id, params) => {
|
|
|
2715
2722
|
* revoked so the unique binding can be reused.
|
|
2716
2723
|
*
|
|
2717
2724
|
* Accepts either a project secret (`oauth2`) or a user-bound Console
|
|
2718
|
-
* session cookie (`
|
|
2719
|
-
* follow the scheme's CSRF rules (`
|
|
2725
|
+
* session cookie (`sessionCookie`). Cookie-authenticated requests
|
|
2726
|
+
* follow the scheme's CSRF rules (`sessionCookie`).
|
|
2720
2727
|
* @summary Revoke grant
|
|
2721
2728
|
*/
|
|
2722
2729
|
const deleteGrant = async (id, params, options) => {
|
|
@@ -2737,7 +2744,7 @@ const getListEventsUrl = (params) => {
|
|
|
2737
2744
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2738
2745
|
});
|
|
2739
2746
|
const stringifiedParams = normalizedParams.toString();
|
|
2740
|
-
return stringifiedParams.length > 0 ? `${
|
|
2747
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/events?${stringifiedParams}` : `${getApiBaseUrl()}/events`;
|
|
2741
2748
|
};
|
|
2742
2749
|
/**
|
|
2743
2750
|
* Returns project-scoped audit events, newest-first by keyset on
|
|
@@ -2765,7 +2772,7 @@ const getGetEventUrl = (id, params) => {
|
|
|
2765
2772
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2766
2773
|
});
|
|
2767
2774
|
const stringifiedParams = normalizedParams.toString();
|
|
2768
|
-
return stringifiedParams.length > 0 ? `${
|
|
2775
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/events/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/events/${encodeURIComponent(String(id))}`;
|
|
2769
2776
|
};
|
|
2770
2777
|
/**
|
|
2771
2778
|
* Loads a single event by `(project_id, id)`. Requires `events.read`.
|
|
@@ -2787,7 +2794,7 @@ const getGetVariablesUrl = (params) => {
|
|
|
2787
2794
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2788
2795
|
});
|
|
2789
2796
|
const stringifiedParams = normalizedParams.toString();
|
|
2790
|
-
return stringifiedParams.length > 0 ? `${
|
|
2797
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/variables?${stringifiedParams}` : `${getApiBaseUrl()}/variables`;
|
|
2791
2798
|
};
|
|
2792
2799
|
/**
|
|
2793
2800
|
* Returns the project's variables, keyed by name, each with its value per
|
|
@@ -2809,7 +2816,7 @@ const getUpdateVariablesUrl = (params) => {
|
|
|
2809
2816
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2810
2817
|
});
|
|
2811
2818
|
const stringifiedParams = normalizedParams.toString();
|
|
2812
|
-
return stringifiedParams.length > 0 ? `${
|
|
2819
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/variables?${stringifiedParams}` : `${getApiBaseUrl()}/variables`;
|
|
2813
2820
|
};
|
|
2814
2821
|
/**
|
|
2815
2822
|
* Enters, replaces and removes the project's variables for the requested
|
|
@@ -2857,7 +2864,7 @@ const getGetVariableUrl = (variableName, params) => {
|
|
|
2857
2864
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2858
2865
|
});
|
|
2859
2866
|
const stringifiedParams = normalizedParams.toString();
|
|
2860
|
-
return stringifiedParams.length > 0 ? `${
|
|
2867
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/variables/${encodeURIComponent(String(variableName))}?${stringifiedParams}` : `${getApiBaseUrl()}/variables/${encodeURIComponent(String(variableName))}`;
|
|
2861
2868
|
};
|
|
2862
2869
|
/**
|
|
2863
2870
|
* Reads one variable by name, with its value per kind. A name with no
|
|
@@ -2877,7 +2884,7 @@ const getDeleteVariableUrl = (variableName, params) => {
|
|
|
2877
2884
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2878
2885
|
});
|
|
2879
2886
|
const stringifiedParams = normalizedParams.toString();
|
|
2880
|
-
return stringifiedParams.length > 0 ? `${
|
|
2887
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/variables/${encodeURIComponent(String(variableName))}?${stringifiedParams}` : `${getApiBaseUrl()}/variables/${encodeURIComponent(String(variableName))}`;
|
|
2881
2888
|
};
|
|
2882
2889
|
/**
|
|
2883
2890
|
* Removes a variable for the requested kind, or for both kinds without
|
|
@@ -2897,7 +2904,7 @@ const getCreateDeploymentUrl = (params) => {
|
|
|
2897
2904
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2898
2905
|
});
|
|
2899
2906
|
const stringifiedParams = normalizedParams.toString();
|
|
2900
|
-
return stringifiedParams.length > 0 ? `${
|
|
2907
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments?${stringifiedParams}` : `${getApiBaseUrl()}/deployments`;
|
|
2901
2908
|
};
|
|
2902
2909
|
/**
|
|
2903
2910
|
* Makes a release live on its targets by recording a deployment,
|
|
@@ -2961,7 +2968,7 @@ const getListDeploymentsUrl = (params) => {
|
|
|
2961
2968
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2962
2969
|
});
|
|
2963
2970
|
const stringifiedParams = normalizedParams.toString();
|
|
2964
|
-
return stringifiedParams.length > 0 ? `${
|
|
2971
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments?${stringifiedParams}` : `${getApiBaseUrl()}/deployments`;
|
|
2965
2972
|
};
|
|
2966
2973
|
/**
|
|
2967
2974
|
* Lists what ran where, and when.
|
|
@@ -2993,7 +3000,7 @@ const getGetDeploymentByIdUrl = (deploymentId, params) => {
|
|
|
2993
3000
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
2994
3001
|
});
|
|
2995
3002
|
const stringifiedParams = normalizedParams.toString();
|
|
2996
|
-
return stringifiedParams.length > 0 ? `${
|
|
3003
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}?${stringifiedParams}` : `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}`;
|
|
2997
3004
|
};
|
|
2998
3005
|
/**
|
|
2999
3006
|
* Reads one deployment record.
|
|
@@ -3016,7 +3023,7 @@ const getRollbackDeploymentUrl = (deploymentId, params) => {
|
|
|
3016
3023
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3017
3024
|
});
|
|
3018
3025
|
const stringifiedParams = normalizedParams.toString();
|
|
3019
|
-
return stringifiedParams.length > 0 ? `${
|
|
3026
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}/rollback?${stringifiedParams}` : `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}/rollback`;
|
|
3020
3027
|
};
|
|
3021
3028
|
/**
|
|
3022
3029
|
* Re-deploys the release of the deployment named in the path to `primary`,
|
|
@@ -3060,7 +3067,7 @@ const getGetDeploymentVariablesUrl = (deploymentId, params) => {
|
|
|
3060
3067
|
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
3061
3068
|
});
|
|
3062
3069
|
const stringifiedParams = normalizedParams.toString();
|
|
3063
|
-
return stringifiedParams.length > 0 ? `${
|
|
3070
|
+
return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}/variables?${stringifiedParams}` : `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}/variables`;
|
|
3064
3071
|
};
|
|
3065
3072
|
/**
|
|
3066
3073
|
* Returns the variable values the deployment froze when it was made. Later
|