@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.
Files changed (67) hide show
  1. package/README.md +17 -3
  2. package/dist/api-factory-C5b1Gqwv.mjs +357 -0
  3. package/dist/api-factory-C5b1Gqwv.mjs.map +1 -0
  4. package/dist/api-factory-Dt5lUjyu.d.mts +212 -0
  5. package/dist/api-factory-Dt5lUjyu.d.mts.map +1 -0
  6. package/dist/{fetch-CtYe0OvX.d.mts → fetch-B-lgjlrf.d.mts} +22 -12
  7. package/dist/fetch-B-lgjlrf.d.mts.map +1 -0
  8. package/dist/generated/endpoints/zitadelNextGen.d.mts +1 -1
  9. package/dist/generated/endpoints/zitadelNextGen.mjs +129 -122
  10. package/dist/generated/endpoints/zitadelNextGen.mjs.map +1 -1
  11. package/dist/generated/endpoints/zitadelNextGen.msw.d.mts +1 -1
  12. package/dist/generated/endpoints/zitadelNextGen.zod.d.mts +33 -26
  13. package/dist/generated/endpoints/zitadelNextGen.zod.d.mts.map +1 -1
  14. package/dist/generated/endpoints/zitadelNextGen.zod.mjs +33 -26
  15. package/dist/generated/endpoints/zitadelNextGen.zod.mjs.map +1 -1
  16. package/dist/generated/model/index.d.mts +2 -2
  17. package/dist/generated/operations.mjs +1 -1
  18. package/dist/generated/operations.mjs.map +1 -1
  19. package/dist/{index-DAm3tCA7.d.mts → index-DGQY1rfH.d.mts} +66 -4
  20. package/dist/index-DGQY1rfH.d.mts.map +1 -0
  21. package/dist/runtime/api-factory.d.mts +2 -51
  22. package/dist/runtime/api-factory.mjs +3 -62
  23. package/dist/runtime/auth.mjs +1 -1
  24. package/dist/runtime/auth.mjs.map +1 -1
  25. package/dist/runtime/base-url.d.mts +14 -0
  26. package/dist/runtime/base-url.d.mts.map +1 -1
  27. package/dist/runtime/base-url.mjs +22 -1
  28. package/dist/runtime/base-url.mjs.map +1 -1
  29. package/dist/runtime/config.d.mts +1 -1
  30. package/dist/runtime/config.mjs +1 -1
  31. package/dist/runtime/fetch.d.mts +2 -2
  32. package/dist/runtime/fetch.mjs +41 -17
  33. package/dist/runtime/fetch.mjs.map +1 -1
  34. package/dist/runtime/paging.d.mts +35 -0
  35. package/dist/runtime/paging.d.mts.map +1 -0
  36. package/dist/runtime/paging.mjs +38 -0
  37. package/dist/runtime/paging.mjs.map +1 -0
  38. package/dist/{zitadelNextGen-B_VRpP2W.d.mts → zitadelNextGen-BVO4sdKD.d.mts} +37 -30
  39. package/dist/zitadelNextGen-BVO4sdKD.d.mts.map +1 -0
  40. package/package.json +6 -1
  41. package/src/generated/endpoints/zitadelNextGen.ts +131 -124
  42. package/src/generated/endpoints/zitadelNextGen.zod.ts +33 -26
  43. package/src/generated/model/deleteUserByID409.ts +20 -0
  44. package/src/generated/model/deleteUserByID409Details.ts +12 -0
  45. package/src/generated/model/deleteUserByIDDefault.ts +9 -0
  46. package/src/generated/model/getFlowStepDefault.ts +9 -0
  47. package/src/generated/model/index.ts +2 -0
  48. package/src/generated/model/queryTeamsParams.ts +3 -2
  49. package/src/generated/model/submitFlowStepDefault.ts +9 -0
  50. package/src/generated/operations.ts +1 -1
  51. package/src/generated/paging.ts +128 -0
  52. package/src/runtime/api-factory.spec.ts +278 -0
  53. package/src/runtime/api-factory.ts +93 -12
  54. package/src/runtime/auth.ts +1 -1
  55. package/src/runtime/base-url.spec.ts +40 -4
  56. package/src/runtime/base-url.ts +28 -0
  57. package/src/runtime/fetch.spec.ts +51 -0
  58. package/src/runtime/fetch.ts +69 -30
  59. package/src/runtime/paged.spec.ts +104 -0
  60. package/src/runtime/paged.ts +61 -0
  61. package/src/runtime/paging.spec.ts +94 -0
  62. package/src/runtime/paging.ts +58 -0
  63. package/dist/fetch-CtYe0OvX.d.mts.map +0 -1
  64. package/dist/index-DAm3tCA7.d.mts.map +0 -1
  65. package/dist/runtime/api-factory.d.mts.map +0 -1
  66. package/dist/runtime/api-factory.mjs.map +0 -1
  67. package/dist/zitadelNextGen-B_VRpP2W.d.mts.map +0 -1
@@ -6,7 +6,7 @@
6
6
  * OpenAPI spec version: 0.0.1
7
7
  */
8
8
  import {
9
- getProxyPath
9
+ getApiBaseUrl
10
10
  } from '../../runtime/base-url';
11
11
 
12
12
  import type {
@@ -212,15 +212,16 @@ export const getGetLiveUrl = () => {
212
212
 
213
213
 
214
214
 
215
- return `${getProxyPath()}/livez`
215
+ return `${getApiBaseUrl()}/livez`
216
216
  }
217
217
 
218
218
  /**
219
219
  * Answers `ok` while the server process serves HTTP, and checks nothing behind it.
220
220
  *
221
- * Point a liveness probe here. It never checks the database, so an outage
222
- * of the database does not restart every instance; `GET /readyz` takes an
223
- * instance out of rotation instead.
221
+ * Point a liveness probe at `/livez` at the root, where the probes stay,
222
+ * not under `/api/v1`. It never checks the database, so an outage of the
223
+ * database does not restart every instance; `GET /readyz` takes an instance
224
+ * out of rotation instead.
224
225
  * @summary Check server liveness
225
226
  */
226
227
  export const getLive = async ( options?: Parameters<typeof customFetch>[1]): Promise<GetLiveDefault> => {
@@ -241,15 +242,15 @@ export const getGetReadyUrl = () => {
241
242
 
242
243
 
243
244
 
244
- return `${getProxyPath()}/readyz`
245
+ return `${getApiBaseUrl()}/readyz`
245
246
  }
246
247
 
247
248
  /**
248
249
  * Answers whether the server can serve requests, which takes its database answering within a second.
249
250
  *
250
- * Point a readiness probe here, so that a server whose database does not
251
- * answer gets no requests until it does. The check is one round trip to the
252
- * database.
251
+ * Point a readiness probe at `/readyz` at the root, where the probes stay,
252
+ * not under `/api/v1`, so that a server whose database does not answer gets
253
+ * no requests until it does. The check is one round trip to the database.
253
254
  * @summary Check server readiness
254
255
  */
255
256
  export const getReady = async ( options?: Parameters<typeof customFetch>[1]): Promise<GetReadyDefault> => {
@@ -277,7 +278,7 @@ export const getCreateUserUrl = (params: CreateUserParams,) => {
277
278
 
278
279
  const stringifiedParams = normalizedParams.toString();
279
280
 
280
- return stringifiedParams.length > 0 ? `${getProxyPath()}/users?${stringifiedParams}` : `${getProxyPath()}/users`
281
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users?${stringifiedParams}` : `${getApiBaseUrl()}/users`
281
282
  }
282
283
 
283
284
  /**
@@ -328,7 +329,7 @@ export const getQueryUsersUrl = (params?: QueryUsersParams,) => {
328
329
 
329
330
  const stringifiedParams = normalizedParams.toString();
330
331
 
331
- return stringifiedParams.length > 0 ? `${getProxyPath()}/users/query?${stringifiedParams}` : `${getProxyPath()}/users/query`
332
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/query?${stringifiedParams}` : `${getApiBaseUrl()}/users/query`
332
333
  }
333
334
 
334
335
  /**
@@ -338,8 +339,8 @@ export const getQueryUsersUrl = (params?: QueryUsersParams,) => {
338
339
  * project is listed.
339
340
  *
340
341
  * Accepts either a project secret (`oauth2`) or a user-bound Console
341
- * session cookie (`nextgenSession`). Cookie-authenticated requests
342
- * follow the scheme's CSRF rules (`nextgenSession`).
342
+ * session cookie (`sessionCookie`). Cookie-authenticated requests
343
+ * follow the scheme's CSRF rules (`sessionCookie`).
343
344
  * @summary Query users
344
345
  */
345
346
  export const queryUsers = async (queryUsersBody: QueryUsersBody,
@@ -383,7 +384,7 @@ export const getGetUserByIDUrl = (userId: string,
383
384
 
384
385
  const stringifiedParams = normalizedParams.toString();
385
386
 
386
- return stringifiedParams.length > 0 ? `${getProxyPath()}/users/${encodeURIComponent(String(userId))}?${stringifiedParams}` : `${getProxyPath()}/users/${encodeURIComponent(String(userId))}`
387
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}?${stringifiedParams}` : `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}`
387
388
  }
388
389
 
389
390
  /**
@@ -412,7 +413,7 @@ export const getPatchUserByIDUrl = (userId: string,) => {
412
413
 
413
414
 
414
415
 
415
- return `${getProxyPath()}/users/${encodeURIComponent(String(userId))}`
416
+ return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}`
416
417
  }
417
418
 
418
419
  /**
@@ -455,7 +456,7 @@ export const getDeleteUserByIDUrl = (userId: string,) => {
455
456
 
456
457
 
457
458
 
458
- return `${getProxyPath()}/users/${encodeURIComponent(String(userId))}`
459
+ return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}`
459
460
  }
460
461
 
461
462
  /**
@@ -465,7 +466,9 @@ export const getDeleteUserByIDUrl = (userId: string,) => {
465
466
  * The user is removed, not deactivated, and the deletion emits `user.deleted`,
466
467
  * plus `authz.revoked` for each grant on that grant's project.
467
468
  * With a project secret the request is idempotent: deleting a user that exists
468
- * in no project succeeds without changing anything.
469
+ * in no project succeeds without changing anything. Deleting the last active
470
+ * member of a project's owning team returns 409 `proj.last_owner` and changes
471
+ * nothing.
469
472
  * @summary Delete user by ID
470
473
  */
471
474
  export const deleteUserByID = async (userId: string, options?: Parameters<typeof customFetch>[1]): Promise<void> => {
@@ -494,7 +497,7 @@ export const getListUserIdentityLinksUrl = (userId: string,
494
497
 
495
498
  const stringifiedParams = normalizedParams.toString();
496
499
 
497
- return stringifiedParams.length > 0 ? `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/identity_links?${stringifiedParams}` : `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/identity_links`
500
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/identity_links?${stringifiedParams}` : `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/identity_links`
498
501
  }
499
502
 
500
503
  /**
@@ -529,7 +532,7 @@ export const getListUserPasskeysUrl = (userId: string,
529
532
 
530
533
  const stringifiedParams = normalizedParams.toString();
531
534
 
532
- return stringifiedParams.length > 0 ? `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/passkeys?${stringifiedParams}` : `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/passkeys`
535
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/passkeys?${stringifiedParams}` : `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/passkeys`
533
536
  }
534
537
 
535
538
  /**
@@ -559,7 +562,7 @@ export const getBeginUserPasskeyRegistrationUrl = (userId: string,) => {
559
562
 
560
563
 
561
564
 
562
- return `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/passkeys/registrations`
565
+ return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/passkeys/registrations`
563
566
  }
564
567
 
565
568
  /**
@@ -604,7 +607,7 @@ export const getFinishUserPasskeyRegistrationUrl = (userId: string,
604
607
 
605
608
 
606
609
 
607
- return `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/passkeys/registrations/${encodeURIComponent(String(registrationId))}`
610
+ return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/passkeys/registrations/${encodeURIComponent(String(registrationId))}`
608
611
  }
609
612
 
610
613
  /**
@@ -650,7 +653,7 @@ export const getGetUserPasswordStateUrl = (userId: string,) => {
650
653
 
651
654
 
652
655
 
653
- return `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/password`
656
+ return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/password`
654
657
  }
655
658
 
656
659
  /**
@@ -677,7 +680,7 @@ export const getSetUserPasswordUrl = (userId: string,) => {
677
680
 
678
681
 
679
682
 
680
- return `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/password`
683
+ return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/password`
681
684
  }
682
685
 
683
686
  /**
@@ -729,7 +732,7 @@ export const getListUserTeamsUrl = (userId: string,
729
732
 
730
733
  const stringifiedParams = normalizedParams.toString();
731
734
 
732
- return stringifiedParams.length > 0 ? `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/teams?${stringifiedParams}` : `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/teams`
735
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/teams?${stringifiedParams}` : `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/teams`
733
736
  }
734
737
 
735
738
  /**
@@ -768,7 +771,7 @@ export const getGetMyUserUrl = (params?: GetMyUserParams,) => {
768
771
 
769
772
  const stringifiedParams = normalizedParams.toString();
770
773
 
771
- return stringifiedParams.length > 0 ? `${getProxyPath()}/users/me?${stringifiedParams}` : `${getProxyPath()}/users/me`
774
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me?${stringifiedParams}` : `${getApiBaseUrl()}/users/me`
772
775
  }
773
776
 
774
777
  /**
@@ -806,7 +809,7 @@ export const getPatchMyUserUrl = (params?: PatchMyUserParams,) => {
806
809
 
807
810
  const stringifiedParams = normalizedParams.toString();
808
811
 
809
- return stringifiedParams.length > 0 ? `${getProxyPath()}/users/me?${stringifiedParams}` : `${getProxyPath()}/users/me`
812
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me?${stringifiedParams}` : `${getApiBaseUrl()}/users/me`
810
813
  }
811
814
 
812
815
  /**
@@ -858,7 +861,7 @@ export const getListMyIdentityLinksUrl = (params?: ListMyIdentityLinksParams,) =
858
861
 
859
862
  const stringifiedParams = normalizedParams.toString();
860
863
 
861
- return stringifiedParams.length > 0 ? `${getProxyPath()}/users/me/identity_links?${stringifiedParams}` : `${getProxyPath()}/users/me/identity_links`
864
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/identity_links?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/identity_links`
862
865
  }
863
866
 
864
867
  /**
@@ -894,7 +897,7 @@ export const getListMyPasskeysUrl = (params?: ListMyPasskeysParams,) => {
894
897
 
895
898
  const stringifiedParams = normalizedParams.toString();
896
899
 
897
- return stringifiedParams.length > 0 ? `${getProxyPath()}/users/me/passkeys?${stringifiedParams}` : `${getProxyPath()}/users/me/passkeys`
900
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/passkeys?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/passkeys`
898
901
  }
899
902
 
900
903
  /**
@@ -931,7 +934,7 @@ export const getGetMyPasswordStateUrl = (params?: GetMyPasswordStateParams,) =>
931
934
 
932
935
  const stringifiedParams = normalizedParams.toString();
933
936
 
934
- return stringifiedParams.length > 0 ? `${getProxyPath()}/users/me/password?${stringifiedParams}` : `${getProxyPath()}/users/me/password`
937
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/password?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/password`
935
938
  }
936
939
 
937
940
  /**
@@ -968,7 +971,7 @@ export const getListMyProjectsUrl = (params?: ListMyProjectsParams,) => {
968
971
 
969
972
  const stringifiedParams = normalizedParams.toString();
970
973
 
971
- return stringifiedParams.length > 0 ? `${getProxyPath()}/users/me/projects?${stringifiedParams}` : `${getProxyPath()}/users/me/projects`
974
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/projects?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/projects`
972
975
  }
973
976
 
974
977
  /**
@@ -1016,7 +1019,7 @@ export const getGetMyUserSchemaUrl = (params?: GetMyUserSchemaParams,) => {
1016
1019
 
1017
1020
  const stringifiedParams = normalizedParams.toString();
1018
1021
 
1019
- return stringifiedParams.length > 0 ? `${getProxyPath()}/users/me/schema?${stringifiedParams}` : `${getProxyPath()}/users/me/schema`
1022
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/schema?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/schema`
1020
1023
  }
1021
1024
 
1022
1025
  /**
@@ -1051,7 +1054,7 @@ export const getListMyTeamsUrl = (params?: ListMyTeamsParams,) => {
1051
1054
 
1052
1055
  const stringifiedParams = normalizedParams.toString();
1053
1056
 
1054
- return stringifiedParams.length > 0 ? `${getProxyPath()}/users/me/teams?${stringifiedParams}` : `${getProxyPath()}/users/me/teams`
1057
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me/teams?${stringifiedParams}` : `${getApiBaseUrl()}/users/me/teams`
1055
1058
  }
1056
1059
 
1057
1060
  /**
@@ -1079,7 +1082,7 @@ export const getCreateFlowUrl = () => {
1079
1082
 
1080
1083
 
1081
1084
 
1082
- return `${getProxyPath()}/flow`
1085
+ return `${getApiBaseUrl()}/flow`
1083
1086
  }
1084
1087
 
1085
1088
  /**
@@ -1144,7 +1147,7 @@ export const getGetFlowStepUrl = (id: string,) => {
1144
1147
 
1145
1148
 
1146
1149
 
1147
- return `${getProxyPath()}/flow/${encodeURIComponent(String(id))}`
1150
+ return `${getApiBaseUrl()}/flow/${encodeURIComponent(String(id))}`
1148
1151
  }
1149
1152
 
1150
1153
  /**
@@ -1174,7 +1177,7 @@ export const getSubmitFlowStepUrl = (id: string,) => {
1174
1177
 
1175
1178
 
1176
1179
 
1177
- return `${getProxyPath()}/flow/${encodeURIComponent(String(id))}/submit`
1180
+ return `${getApiBaseUrl()}/flow/${encodeURIComponent(String(id))}/submit`
1178
1181
  }
1179
1182
 
1180
1183
  /**
@@ -1265,7 +1268,7 @@ export const getCreateAuthAttemptUrl = () => {
1265
1268
 
1266
1269
 
1267
1270
 
1268
- return `${getProxyPath()}/auth_attempts`
1271
+ return `${getApiBaseUrl()}/auth_attempts`
1269
1272
  }
1270
1273
 
1271
1274
  /**
@@ -1316,7 +1319,7 @@ export const getGetAuthAttemptUrl = (attemptId: string,) => {
1316
1319
 
1317
1320
 
1318
1321
 
1319
- return `${getProxyPath()}/auth_attempts/${encodeURIComponent(String(attemptId))}`
1322
+ return `${getApiBaseUrl()}/auth_attempts/${encodeURIComponent(String(attemptId))}`
1320
1323
  }
1321
1324
 
1322
1325
  /**
@@ -1347,7 +1350,7 @@ export const getIssueChallengeUrl = (attemptId: string,) => {
1347
1350
 
1348
1351
 
1349
1352
 
1350
- return `${getProxyPath()}/auth_attempts/${encodeURIComponent(String(attemptId))}/challenges`
1353
+ return `${getApiBaseUrl()}/auth_attempts/${encodeURIComponent(String(attemptId))}/challenges`
1351
1354
  }
1352
1355
 
1353
1356
  /**
@@ -1393,7 +1396,7 @@ export const getVerifyChallengeProofUrl = (attemptId: string,
1393
1396
 
1394
1397
 
1395
1398
 
1396
- return `${getProxyPath()}/auth_attempts/${encodeURIComponent(String(attemptId))}/challenges/${encodeURIComponent(String(challengeId))}/verify`
1399
+ return `${getApiBaseUrl()}/auth_attempts/${encodeURIComponent(String(attemptId))}/challenges/${encodeURIComponent(String(challengeId))}/verify`
1397
1400
  }
1398
1401
 
1399
1402
  /**
@@ -1443,7 +1446,7 @@ export const getCreateHandoffUrl = (attemptId: string,) => {
1443
1446
 
1444
1447
 
1445
1448
 
1446
- return `${getProxyPath()}/auth_attempts/${encodeURIComponent(String(attemptId))}/handoff`
1449
+ return `${getApiBaseUrl()}/auth_attempts/${encodeURIComponent(String(attemptId))}/handoff`
1447
1450
  }
1448
1451
 
1449
1452
  /**
@@ -1479,7 +1482,7 @@ export const getCreateProjectUrl = () => {
1479
1482
 
1480
1483
 
1481
1484
 
1482
- return `${getProxyPath()}/projects`
1485
+ return `${getApiBaseUrl()}/projects`
1483
1486
  }
1484
1487
 
1485
1488
  /**
@@ -1523,7 +1526,7 @@ export const getQueryProjectsUrl = () => {
1523
1526
 
1524
1527
 
1525
1528
 
1526
- return `${getProxyPath()}/projects/query`
1529
+ return `${getApiBaseUrl()}/projects/query`
1527
1530
  }
1528
1531
 
1529
1532
  /**
@@ -1567,7 +1570,7 @@ export const getGetProjectUrl = (projectId: string,) => {
1567
1570
 
1568
1571
 
1569
1572
 
1570
- return `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}`
1573
+ return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}`
1571
1574
  }
1572
1575
 
1573
1576
  /**
@@ -1592,7 +1595,7 @@ export const getPatchProjectUrl = (projectId: string,) => {
1592
1595
 
1593
1596
 
1594
1597
 
1595
- return `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}`
1598
+ return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}`
1596
1599
  }
1597
1600
 
1598
1601
  /**
@@ -1640,7 +1643,7 @@ export const getListProjectAdminsUrl = (projectId: string,
1640
1643
 
1641
1644
  const stringifiedParams = normalizedParams.toString();
1642
1645
 
1643
- return stringifiedParams.length > 0 ? `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/admins?${stringifiedParams}` : `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/admins`
1646
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/admins?${stringifiedParams}` : `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/admins`
1644
1647
  }
1645
1648
 
1646
1649
  /**
@@ -1671,7 +1674,7 @@ export const getListProjectAdminsUrl = (projectId: string,
1671
1674
  * Ordered by `user_id` and paginated with `page_token`.
1672
1675
  *
1673
1676
  * Accepts either a project secret (`oauth2`) or a user-bound Console
1674
- * session cookie (`nextgenSession`) that can read the project.
1677
+ * session cookie (`sessionCookie`) that can read the project.
1675
1678
  * @summary List project admins
1676
1679
  */
1677
1680
  export const listProjectAdmins = async (projectId: string,
@@ -1693,7 +1696,7 @@ export const getInitClaimUrl = (projectId: string,) => {
1693
1696
 
1694
1697
 
1695
1698
 
1696
- return `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/claim/init`
1699
+ return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/init`
1697
1700
  }
1698
1701
 
1699
1702
  /**
@@ -1730,7 +1733,7 @@ export const getGetClaimStatusUrl = (projectId: string,
1730
1733
 
1731
1734
  const stringifiedParams = normalizedParams.toString();
1732
1735
 
1733
- return stringifiedParams.length > 0 ? `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/claim/status?${stringifiedParams}` : `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/claim/status`
1736
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/status?${stringifiedParams}` : `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/status`
1734
1737
  }
1735
1738
 
1736
1739
  /**
@@ -1763,12 +1766,12 @@ export const getCompleteClaimUrl = (projectId: string,) => {
1763
1766
 
1764
1767
 
1765
1768
 
1766
- return `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/claim/complete`
1769
+ return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/complete`
1767
1770
  }
1768
1771
 
1769
1772
  /**
1770
1773
  * Called by the browser after the developer authenticates on the claim page.
1771
- * Authenticated by the `__nextgen_session` cookie, it attaches the project to
1774
+ * Authenticated by the session cookie, it attaches the project to
1772
1775
  * the developer's personal team using the `challenge_id` from the claim URL as
1773
1776
  * its single-use, browser-safe authorization.
1774
1777
  * @summary Complete a project claim
@@ -1814,7 +1817,7 @@ export const getGetClaimWindowUrl = (projectId: string,
1814
1817
 
1815
1818
  const stringifiedParams = normalizedParams.toString();
1816
1819
 
1817
- return stringifiedParams.length > 0 ? `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/claim/window?${stringifiedParams}` : `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/claim/window`
1820
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/window?${stringifiedParams}` : `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/window`
1818
1821
  }
1819
1822
 
1820
1823
  /**
@@ -1845,7 +1848,7 @@ export const getAddOriginUrl = (projectId: string,) => {
1845
1848
 
1846
1849
 
1847
1850
 
1848
- return `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/origins`
1851
+ return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/origins`
1849
1852
  }
1850
1853
 
1851
1854
  /**
@@ -1888,7 +1891,7 @@ export const getRemoveOriginUrl = (projectId: string,) => {
1888
1891
 
1889
1892
 
1890
1893
 
1891
- return `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/origins/remove`
1894
+ return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/origins/remove`
1892
1895
  }
1893
1896
 
1894
1897
  /**
@@ -1939,7 +1942,7 @@ export const getListPreviewsUrl = (projectId: string,
1939
1942
 
1940
1943
  const stringifiedParams = normalizedParams.toString();
1941
1944
 
1942
- return stringifiedParams.length > 0 ? `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/previews?${stringifiedParams}` : `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/previews`
1945
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/previews?${stringifiedParams}` : `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/previews`
1943
1946
  }
1944
1947
 
1945
1948
  /**
@@ -1967,7 +1970,7 @@ export const getRemovePreviewUrl = (projectId: string,) => {
1967
1970
 
1968
1971
 
1969
1972
 
1970
- return `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/previews/remove`
1973
+ return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/previews/remove`
1971
1974
  }
1972
1975
 
1973
1976
  /**
@@ -2015,7 +2018,7 @@ export const getCreateSessionUrl = () => {
2015
2018
 
2016
2019
 
2017
2020
 
2018
- return `${getProxyPath()}/sessions`
2021
+ return `${getApiBaseUrl()}/sessions`
2019
2022
  }
2020
2023
 
2021
2024
  /**
@@ -2030,8 +2033,9 @@ export const getCreateSessionUrl = () => {
2030
2033
  * Creating a session is an app-plane operation on the project credential
2031
2034
  * (`session.write`). The returned `session_token` is a session credential for the
2032
2035
  * end-user client, not a management scope: it is delivered as the
2033
- * `__nextgen_session` cookie and authorises the self-service operations
2034
- * `GET /sessions/me` and `DELETE /sessions/me` (`nextgenSession` scheme). The
2036
+ * `__Host-zitadel_session` cookie (`zitadel_session` over plain http to a
2037
+ * loopback host) and authorises the self-service operations
2038
+ * `GET /sessions/me` and `DELETE /sessions/me` (`sessionCookie` scheme). The
2035
2039
  * by-id operations `GET /sessions/{session_id}` and `DELETE /sessions/{session_id}`
2036
2040
  * are operator endpoints and require `session.read` / `session.delete` instead.
2037
2041
  *
@@ -2081,7 +2085,7 @@ export const getQuerySessionsUrl = (params: QuerySessionsParams,) => {
2081
2085
 
2082
2086
  const stringifiedParams = normalizedParams.toString();
2083
2087
 
2084
- return stringifiedParams.length > 0 ? `${getProxyPath()}/sessions/query?${stringifiedParams}` : `${getProxyPath()}/sessions/query`
2088
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/query?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/query`
2085
2089
  }
2086
2090
 
2087
2091
  /**
@@ -2130,7 +2134,7 @@ export const getExchangeHandoffUrl = (params: ExchangeHandoffParams,) => {
2130
2134
 
2131
2135
  const stringifiedParams = normalizedParams.toString();
2132
2136
 
2133
- return stringifiedParams.length > 0 ? `${getProxyPath()}/sessions/exchange?${stringifiedParams}` : `${getProxyPath()}/sessions/exchange`
2137
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/exchange?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/exchange`
2134
2138
  }
2135
2139
 
2136
2140
  /**
@@ -2193,7 +2197,7 @@ export const getGetSessionUrl = (sessionId: string,) => {
2193
2197
 
2194
2198
 
2195
2199
 
2196
- return `${getProxyPath()}/sessions/${encodeURIComponent(String(sessionId))}`
2200
+ return `${getApiBaseUrl()}/sessions/${encodeURIComponent(String(sessionId))}`
2197
2201
  }
2198
2202
 
2199
2203
  /**
@@ -2223,15 +2227,15 @@ export const getRevokeSessionUrl = (sessionId: string,) => {
2223
2227
 
2224
2228
 
2225
2229
 
2226
- return `${getProxyPath()}/sessions/${encodeURIComponent(String(sessionId))}`
2230
+ return `${getApiBaseUrl()}/sessions/${encodeURIComponent(String(sessionId))}`
2227
2231
  }
2228
2232
 
2229
2233
  /**
2230
2234
  * Permanently deletes the session, terminating it immediately.
2231
2235
  *
2232
2236
  * This is the operator revoke path and requires the `session.delete` scope on a
2233
- * project-bound credential. End-user logout with the `__nextgen_session` cookie is
2234
- * `DELETE /sessions/me` (`nextgenSession` scheme).
2237
+ * project-bound credential. End-user logout with the session cookie is
2238
+ * `DELETE /sessions/me` (`sessionCookie` scheme).
2235
2239
  *
2236
2240
  * Idempotent: deleting a session that does not exist (or was already deleted)
2237
2241
  * still returns 204. After deletion, any tokens derived from the session are
@@ -2263,7 +2267,7 @@ export const getGetMySessionUrl = (params?: GetMySessionParams,) => {
2263
2267
 
2264
2268
  const stringifiedParams = normalizedParams.toString();
2265
2269
 
2266
- return stringifiedParams.length > 0 ? `${getProxyPath()}/sessions/me?${stringifiedParams}` : `${getProxyPath()}/sessions/me`
2270
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/me?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/me`
2267
2271
  }
2268
2272
 
2269
2273
  /**
@@ -2302,13 +2306,13 @@ export const getRevokeMySessionUrl = (params?: RevokeMySessionParams,) => {
2302
2306
 
2303
2307
  const stringifiedParams = normalizedParams.toString();
2304
2308
 
2305
- return stringifiedParams.length > 0 ? `${getProxyPath()}/sessions/me?${stringifiedParams}` : `${getProxyPath()}/sessions/me`
2309
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/me?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/me`
2306
2310
  }
2307
2311
 
2308
2312
  /**
2309
2313
  * Logs out by permanently deleting the session.
2310
2314
  *
2311
- * The `__nextgen_session` cookie issued at creation (or superseded by a handoff
2315
+ * The session cookie issued at creation (or superseded by a handoff
2312
2316
  * exchange) is required, with the session's token from `GET /sessions/me/csrf`
2313
2317
  * in the `X-Zitadel-CSRF` header. Idempotent: if the session is already gone
2314
2318
  * this still returns 204. Any tokens derived from the session are invalidated,
@@ -2343,14 +2347,14 @@ export const getGetMySessionCsrfTokenUrl = (params?: GetMySessionCsrfTokenParams
2343
2347
 
2344
2348
  const stringifiedParams = normalizedParams.toString();
2345
2349
 
2346
- return stringifiedParams.length > 0 ? `${getProxyPath()}/sessions/me/csrf?${stringifiedParams}` : `${getProxyPath()}/sessions/me/csrf`
2350
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/me/csrf?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/me/csrf`
2347
2351
  }
2348
2352
 
2349
2353
  /**
2350
2354
  * Returns the session-bound token for cross-site request forgery protection
2351
2355
  * (ADR 053 §5). Browser code sends it in the `X-Zitadel-CSRF` header on the
2352
2356
  * state-changing requests the session cookie authenticates that require it
2353
- * — see the `nextgenSession` scheme. It authorizes nothing on its own: the
2357
+ * — see the `sessionCookie` scheme. It authorizes nothing on its own: the
2354
2358
  * HttpOnly cookie is still the credential, and a cross-site page cannot
2355
2359
  * read this response. It stays the same for the life of the session, so a
2356
2360
  * client fetches it once per session.
@@ -2384,7 +2388,7 @@ export const getCreateSchemaUrl = (params: CreateSchemaParams,) => {
2384
2388
 
2385
2389
  const stringifiedParams = normalizedParams.toString();
2386
2390
 
2387
- return stringifiedParams.length > 0 ? `${getProxyPath()}/schemas?${stringifiedParams}` : `${getProxyPath()}/schemas`
2391
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/schemas?${stringifiedParams}` : `${getApiBaseUrl()}/schemas`
2388
2392
  }
2389
2393
 
2390
2394
  /**
@@ -2447,7 +2451,7 @@ export const getListSchemasUrl = (params: ListSchemasParams,) => {
2447
2451
 
2448
2452
  const stringifiedParams = normalizedParams.toString();
2449
2453
 
2450
- return stringifiedParams.length > 0 ? `${getProxyPath()}/schemas?${stringifiedParams}` : `${getProxyPath()}/schemas`
2454
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/schemas?${stringifiedParams}` : `${getApiBaseUrl()}/schemas`
2451
2455
  }
2452
2456
 
2453
2457
  /**
@@ -2481,7 +2485,7 @@ export const getGetSchemaByIdUrl = (id: string,
2481
2485
 
2482
2486
  const stringifiedParams = normalizedParams.toString();
2483
2487
 
2484
- return stringifiedParams.length > 0 ? `${getProxyPath()}/schemas/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getProxyPath()}/schemas/${encodeURIComponent(String(id))}`
2488
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/schemas/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/schemas/${encodeURIComponent(String(id))}`
2485
2489
  }
2486
2490
 
2487
2491
  /**
@@ -2516,7 +2520,7 @@ export const getCreateFlowDefinitionUrl = () => {
2516
2520
 
2517
2521
 
2518
2522
 
2519
- return `${getProxyPath()}/flow_definitions`
2523
+ return `${getApiBaseUrl()}/flow_definitions`
2520
2524
  }
2521
2525
 
2522
2526
  /**
@@ -2579,7 +2583,7 @@ export const getListFlowDefinitionsUrl = (params: ListFlowDefinitionsParams,) =>
2579
2583
 
2580
2584
  const stringifiedParams = normalizedParams.toString();
2581
2585
 
2582
- return stringifiedParams.length > 0 ? `${getProxyPath()}/flow_definitions?${stringifiedParams}` : `${getProxyPath()}/flow_definitions`
2586
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/flow_definitions?${stringifiedParams}` : `${getApiBaseUrl()}/flow_definitions`
2583
2587
  }
2584
2588
 
2585
2589
  /**
@@ -2606,7 +2610,7 @@ export const getGetFlowDefinitionUrl = (id: string,) => {
2606
2610
 
2607
2611
 
2608
2612
 
2609
- return `${getProxyPath()}/flow_definitions/${encodeURIComponent(String(id))}`
2613
+ return `${getApiBaseUrl()}/flow_definitions/${encodeURIComponent(String(id))}`
2610
2614
  }
2611
2615
 
2612
2616
  /**
@@ -2638,7 +2642,7 @@ export const getCreateTeamUrl = (params: CreateTeamParams,) => {
2638
2642
 
2639
2643
  const stringifiedParams = normalizedParams.toString();
2640
2644
 
2641
- return stringifiedParams.length > 0 ? `${getProxyPath()}/teams?${stringifiedParams}` : `${getProxyPath()}/teams`
2645
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/teams?${stringifiedParams}` : `${getApiBaseUrl()}/teams`
2642
2646
  }
2643
2647
 
2644
2648
  /**
@@ -2676,7 +2680,7 @@ return customFetch<CreateTeam201>(getCreateTeamUrl(params),
2676
2680
 
2677
2681
 
2678
2682
 
2679
- export const getQueryTeamsUrl = (params: QueryTeamsParams,) => {
2683
+ export const getQueryTeamsUrl = (params?: QueryTeamsParams,) => {
2680
2684
  const normalizedParams = new URLSearchParams();
2681
2685
 
2682
2686
  Object.entries(params || {}).forEach(([key, value]) => {
@@ -2688,15 +2692,18 @@ export const getQueryTeamsUrl = (params: QueryTeamsParams,) => {
2688
2692
 
2689
2693
  const stringifiedParams = normalizedParams.toString();
2690
2694
 
2691
- return stringifiedParams.length > 0 ? `${getProxyPath()}/teams/query?${stringifiedParams}` : `${getProxyPath()}/teams/query`
2695
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/teams/query?${stringifiedParams}` : `${getApiBaseUrl()}/teams/query`
2692
2696
  }
2693
2697
 
2694
2698
  /**
2695
2699
  * Returns the teams of a project, paginated with a cursor.
2700
+ *
2701
+ * `project_id` names the project to list; without it, the credential's own
2702
+ * project is listed.
2696
2703
  * @summary Query teams
2697
2704
  */
2698
2705
  export const queryTeams = async (queryTeamsBody: QueryTeamsBody,
2699
- params: QueryTeamsParams, options?: Parameters<typeof customFetch>[1]): Promise<QueryTeams200> => {
2706
+ params?: QueryTeamsParams, options?: Parameters<typeof customFetch>[1]): Promise<QueryTeams200> => {
2700
2707
 
2701
2708
  const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
2702
2709
  if (!h) return {};
@@ -2728,7 +2735,7 @@ export const getGetTeamUrl = (teamId: string,) => {
2728
2735
 
2729
2736
 
2730
2737
 
2731
- return `${getProxyPath()}/teams/${encodeURIComponent(String(teamId))}`
2738
+ return `${getApiBaseUrl()}/teams/${encodeURIComponent(String(teamId))}`
2732
2739
  }
2733
2740
 
2734
2741
  /**
@@ -2753,7 +2760,7 @@ export const getDeleteTeamUrl = (teamId: string,) => {
2753
2760
 
2754
2761
 
2755
2762
 
2756
- return `${getProxyPath()}/teams/${encodeURIComponent(String(teamId))}`
2763
+ return `${getApiBaseUrl()}/teams/${encodeURIComponent(String(teamId))}`
2757
2764
  }
2758
2765
 
2759
2766
  /**
@@ -2790,7 +2797,7 @@ export const getUpdateTeamUrl = (teamId: string,) => {
2790
2797
 
2791
2798
 
2792
2799
 
2793
- return `${getProxyPath()}/teams/${encodeURIComponent(String(teamId))}`
2800
+ return `${getApiBaseUrl()}/teams/${encodeURIComponent(String(teamId))}`
2794
2801
  }
2795
2802
 
2796
2803
  /**
@@ -2837,7 +2844,7 @@ export const getCreateBrandingUrl = (params: CreateBrandingParams,) => {
2837
2844
 
2838
2845
  const stringifiedParams = normalizedParams.toString();
2839
2846
 
2840
- return stringifiedParams.length > 0 ? `${getProxyPath()}/branding?${stringifiedParams}` : `${getProxyPath()}/branding`
2847
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/branding?${stringifiedParams}` : `${getApiBaseUrl()}/branding`
2841
2848
  }
2842
2849
 
2843
2850
  /**
@@ -2891,7 +2898,7 @@ export const getListBrandingUrl = (params: ListBrandingParams,) => {
2891
2898
 
2892
2899
  const stringifiedParams = normalizedParams.toString();
2893
2900
 
2894
- return stringifiedParams.length > 0 ? `${getProxyPath()}/branding?${stringifiedParams}` : `${getProxyPath()}/branding`
2901
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/branding?${stringifiedParams}` : `${getApiBaseUrl()}/branding`
2895
2902
  }
2896
2903
 
2897
2904
  /**
@@ -2920,7 +2927,7 @@ export const getGetBrandingByIdUrl = (id: string,) => {
2920
2927
 
2921
2928
 
2922
2929
 
2923
- return `${getProxyPath()}/branding/${encodeURIComponent(String(id))}`
2930
+ return `${getApiBaseUrl()}/branding/${encodeURIComponent(String(id))}`
2924
2931
  }
2925
2932
 
2926
2933
  /**
@@ -2952,7 +2959,7 @@ export const getCreateIdpUrl = (params: CreateIdpParams,) => {
2952
2959
 
2953
2960
  const stringifiedParams = normalizedParams.toString();
2954
2961
 
2955
- return stringifiedParams.length > 0 ? `${getProxyPath()}/idps?${stringifiedParams}` : `${getProxyPath()}/idps`
2962
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps?${stringifiedParams}` : `${getApiBaseUrl()}/idps`
2956
2963
  }
2957
2964
 
2958
2965
  /**
@@ -3030,7 +3037,7 @@ export const getQueryIdpsUrl = (params: QueryIdpsParams,) => {
3030
3037
 
3031
3038
  const stringifiedParams = normalizedParams.toString();
3032
3039
 
3033
- return stringifiedParams.length > 0 ? `${getProxyPath()}/idps/query?${stringifiedParams}` : `${getProxyPath()}/idps/query`
3040
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps/query?${stringifiedParams}` : `${getApiBaseUrl()}/idps/query`
3034
3041
  }
3035
3042
 
3036
3043
  /**
@@ -3079,7 +3086,7 @@ export const getGetIdpByIdUrl = (id: string,
3079
3086
 
3080
3087
  const stringifiedParams = normalizedParams.toString();
3081
3088
 
3082
- return stringifiedParams.length > 0 ? `${getProxyPath()}/idps/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getProxyPath()}/idps/${encodeURIComponent(String(id))}`
3089
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/idps/${encodeURIComponent(String(id))}`
3083
3090
  }
3084
3091
 
3085
3092
  /**
@@ -3116,7 +3123,7 @@ export const getListIdpRevisionsUrl = (id: string,
3116
3123
 
3117
3124
  const stringifiedParams = normalizedParams.toString();
3118
3125
 
3119
- return stringifiedParams.length > 0 ? `${getProxyPath()}/idps/${encodeURIComponent(String(id))}/revisions?${stringifiedParams}` : `${getProxyPath()}/idps/${encodeURIComponent(String(id))}/revisions`
3126
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps/${encodeURIComponent(String(id))}/revisions?${stringifiedParams}` : `${getApiBaseUrl()}/idps/${encodeURIComponent(String(id))}/revisions`
3120
3127
  }
3121
3128
 
3122
3129
  /**
@@ -3153,7 +3160,7 @@ export const getGetIdpRevisionByIdUrl = (revisionId: string,
3153
3160
 
3154
3161
  const stringifiedParams = normalizedParams.toString();
3155
3162
 
3156
- return stringifiedParams.length > 0 ? `${getProxyPath()}/idps/revisions/${encodeURIComponent(String(revisionId))}?${stringifiedParams}` : `${getProxyPath()}/idps/revisions/${encodeURIComponent(String(revisionId))}`
3163
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps/revisions/${encodeURIComponent(String(revisionId))}?${stringifiedParams}` : `${getApiBaseUrl()}/idps/revisions/${encodeURIComponent(String(revisionId))}`
3157
3164
  }
3158
3165
 
3159
3166
  /**
@@ -3189,7 +3196,7 @@ export const getListPoliciesUrl = (params: ListPoliciesParams,) => {
3189
3196
 
3190
3197
  const stringifiedParams = normalizedParams.toString();
3191
3198
 
3192
- return stringifiedParams.length > 0 ? `${getProxyPath()}/policies?${stringifiedParams}` : `${getProxyPath()}/policies`
3199
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies?${stringifiedParams}` : `${getApiBaseUrl()}/policies`
3193
3200
  }
3194
3201
 
3195
3202
  /**
@@ -3226,7 +3233,7 @@ export const getPublishPolicyUrl = (params: PublishPolicyParams,) => {
3226
3233
 
3227
3234
  const stringifiedParams = normalizedParams.toString();
3228
3235
 
3229
- return stringifiedParams.length > 0 ? `${getProxyPath()}/policies?${stringifiedParams}` : `${getProxyPath()}/policies`
3236
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies?${stringifiedParams}` : `${getApiBaseUrl()}/policies`
3230
3237
  }
3231
3238
 
3232
3239
  /**
@@ -3289,7 +3296,7 @@ export const getEvaluatePolicyUrl = (params: EvaluatePolicyParams,) => {
3289
3296
 
3290
3297
  const stringifiedParams = normalizedParams.toString();
3291
3298
 
3292
- return stringifiedParams.length > 0 ? `${getProxyPath()}/policies/evaluate?${stringifiedParams}` : `${getProxyPath()}/policies/evaluate`
3299
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies/evaluate?${stringifiedParams}` : `${getApiBaseUrl()}/policies/evaluate`
3293
3300
  }
3294
3301
 
3295
3302
  /**
@@ -3357,7 +3364,7 @@ export const getGetPolicyUrl = (policyId: string,
3357
3364
 
3358
3365
  const stringifiedParams = normalizedParams.toString();
3359
3366
 
3360
- return stringifiedParams.length > 0 ? `${getProxyPath()}/policies/${encodeURIComponent(String(policyId))}?${stringifiedParams}` : `${getProxyPath()}/policies/${encodeURIComponent(String(policyId))}`
3367
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies/${encodeURIComponent(String(policyId))}?${stringifiedParams}` : `${getApiBaseUrl()}/policies/${encodeURIComponent(String(policyId))}`
3361
3368
  }
3362
3369
 
3363
3370
  /**
@@ -3395,7 +3402,7 @@ export const getListPolicyRevisionsUrl = (policyId: string,
3395
3402
 
3396
3403
  const stringifiedParams = normalizedParams.toString();
3397
3404
 
3398
- return stringifiedParams.length > 0 ? `${getProxyPath()}/policies/${encodeURIComponent(String(policyId))}/revisions?${stringifiedParams}` : `${getProxyPath()}/policies/${encodeURIComponent(String(policyId))}/revisions`
3405
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies/${encodeURIComponent(String(policyId))}/revisions?${stringifiedParams}` : `${getApiBaseUrl()}/policies/${encodeURIComponent(String(policyId))}/revisions`
3399
3406
  }
3400
3407
 
3401
3408
  /**
@@ -3433,7 +3440,7 @@ export const getGetPolicyRevisionUrl = (revisionId: string,
3433
3440
 
3434
3441
  const stringifiedParams = normalizedParams.toString();
3435
3442
 
3436
- return stringifiedParams.length > 0 ? `${getProxyPath()}/policies/revisions/${encodeURIComponent(String(revisionId))}?${stringifiedParams}` : `${getProxyPath()}/policies/revisions/${encodeURIComponent(String(revisionId))}`
3443
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies/revisions/${encodeURIComponent(String(revisionId))}?${stringifiedParams}` : `${getApiBaseUrl()}/policies/revisions/${encodeURIComponent(String(revisionId))}`
3437
3444
  }
3438
3445
 
3439
3446
  /**
@@ -3469,7 +3476,7 @@ export const getCreateReleaseUrl = (params: CreateReleaseParams,) => {
3469
3476
 
3470
3477
  const stringifiedParams = normalizedParams.toString();
3471
3478
 
3472
- return stringifiedParams.length > 0 ? `${getProxyPath()}/releases?${stringifiedParams}` : `${getProxyPath()}/releases`
3479
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases?${stringifiedParams}` : `${getApiBaseUrl()}/releases`
3473
3480
  }
3474
3481
 
3475
3482
  /**
@@ -3534,7 +3541,7 @@ export const getListReleasesUrl = (params: ListReleasesParams,) => {
3534
3541
 
3535
3542
  const stringifiedParams = normalizedParams.toString();
3536
3543
 
3537
- return stringifiedParams.length > 0 ? `${getProxyPath()}/releases?${stringifiedParams}` : `${getProxyPath()}/releases`
3544
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases?${stringifiedParams}` : `${getApiBaseUrl()}/releases`
3538
3545
  }
3539
3546
 
3540
3547
  /**
@@ -3576,7 +3583,7 @@ export const getBuildReleaseUrl = (params: BuildReleaseParams,) => {
3576
3583
 
3577
3584
  const stringifiedParams = normalizedParams.toString();
3578
3585
 
3579
- return stringifiedParams.length > 0 ? `${getProxyPath()}/releases/build?${stringifiedParams}` : `${getProxyPath()}/releases/build`
3586
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases/build?${stringifiedParams}` : `${getApiBaseUrl()}/releases/build`
3580
3587
  }
3581
3588
 
3582
3589
  /**
@@ -3655,7 +3662,7 @@ export const getGetReleaseByIdUrl = (releaseId: string,
3655
3662
 
3656
3663
  const stringifiedParams = normalizedParams.toString();
3657
3664
 
3658
- return stringifiedParams.length > 0 ? `${getProxyPath()}/releases/${encodeURIComponent(String(releaseId))}?${stringifiedParams}` : `${getProxyPath()}/releases/${encodeURIComponent(String(releaseId))}`
3665
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases/${encodeURIComponent(String(releaseId))}?${stringifiedParams}` : `${getApiBaseUrl()}/releases/${encodeURIComponent(String(releaseId))}`
3659
3666
  }
3660
3667
 
3661
3668
  /**
@@ -3701,7 +3708,7 @@ export const getRevokeReleaseUrl = (releaseId: string,
3701
3708
 
3702
3709
  const stringifiedParams = normalizedParams.toString();
3703
3710
 
3704
- return stringifiedParams.length > 0 ? `${getProxyPath()}/releases/${encodeURIComponent(String(releaseId))}/revoke?${stringifiedParams}` : `${getProxyPath()}/releases/${encodeURIComponent(String(releaseId))}/revoke`
3711
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases/${encodeURIComponent(String(releaseId))}/revoke?${stringifiedParams}` : `${getApiBaseUrl()}/releases/${encodeURIComponent(String(releaseId))}/revoke`
3705
3712
  }
3706
3713
 
3707
3714
  /**
@@ -3752,7 +3759,7 @@ export const getCreateGrantUrl = (params: CreateGrantParams,) => {
3752
3759
 
3753
3760
  const stringifiedParams = normalizedParams.toString();
3754
3761
 
3755
- return stringifiedParams.length > 0 ? `${getProxyPath()}/grants?${stringifiedParams}` : `${getProxyPath()}/grants`
3762
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/grants?${stringifiedParams}` : `${getApiBaseUrl()}/grants`
3756
3763
  }
3757
3764
 
3758
3765
  /**
@@ -3772,9 +3779,9 @@ export const getCreateGrantUrl = (params: CreateGrantParams,) => {
3772
3779
  * identifier and display.
3773
3780
  *
3774
3781
  * Accepts either a project secret (`oauth2`) or a user-bound Console
3775
- * session cookie (`nextgenSession`). Session callers are authorized as
3782
+ * session cookie (`sessionCookie`). Session callers are authorized as
3776
3783
  * the human against the target project (home may differ). Cookie-authenticated
3777
- * requests follow the scheme's CSRF rules (`nextgenSession`).
3784
+ * requests follow the scheme's CSRF rules (`sessionCookie`).
3778
3785
  * @summary Create grant
3779
3786
  */
3780
3787
  export const createGrant = async (createGrantBody: CreateGrantBody,
@@ -3817,7 +3824,7 @@ export const getQueryGrantsUrl = (params: QueryGrantsParams,) => {
3817
3824
 
3818
3825
  const stringifiedParams = normalizedParams.toString();
3819
3826
 
3820
- return stringifiedParams.length > 0 ? `${getProxyPath()}/grants/query?${stringifiedParams}` : `${getProxyPath()}/grants/query`
3827
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/grants/query?${stringifiedParams}` : `${getApiBaseUrl()}/grants/query`
3821
3828
  }
3822
3829
 
3823
3830
  /**
@@ -3835,8 +3842,8 @@ export const getQueryGrantsUrl = (params: QueryGrantsParams,) => {
3835
3842
  * the project Check may expand without those scopes.
3836
3843
  *
3837
3844
  * Accepts either a project secret (`oauth2`) or a user-bound Console
3838
- * session cookie (`nextgenSession`). Cookie-authenticated requests
3839
- * follow the scheme's CSRF rules (`nextgenSession`).
3845
+ * session cookie (`sessionCookie`). Cookie-authenticated requests
3846
+ * follow the scheme's CSRF rules (`sessionCookie`).
3840
3847
  * @summary Query grants
3841
3848
  */
3842
3849
  export const queryGrants = async (queryGrantsBody: QueryGrantsBody,
@@ -3888,7 +3895,7 @@ export const getGetGrantUrl = (id: string,
3888
3895
 
3889
3896
  const stringifiedParams = normalizedParams.toString();
3890
3897
 
3891
- return stringifiedParams.length > 0 ? `${getProxyPath()}/grants/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getProxyPath()}/grants/${encodeURIComponent(String(id))}`
3898
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/grants/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/grants/${encodeURIComponent(String(id))}`
3892
3899
  }
3893
3900
 
3894
3901
  /**
@@ -3906,8 +3913,8 @@ export const getGetGrantUrl = (id: string,
3906
3913
  * Check may expand without those scopes.
3907
3914
  *
3908
3915
  * Accepts either a project secret (`oauth2`) or a user-bound Console
3909
- * session cookie (`nextgenSession`). Cookie-authenticated requests
3910
- * follow the scheme's CSRF rules (`nextgenSession`).
3916
+ * session cookie (`sessionCookie`). Cookie-authenticated requests
3917
+ * follow the scheme's CSRF rules (`sessionCookie`).
3911
3918
  * @summary Get grant
3912
3919
  */
3913
3920
  export const getGrant = async (id: string,
@@ -3937,7 +3944,7 @@ export const getDeleteGrantUrl = (id: string,
3937
3944
 
3938
3945
  const stringifiedParams = normalizedParams.toString();
3939
3946
 
3940
- return stringifiedParams.length > 0 ? `${getProxyPath()}/grants/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getProxyPath()}/grants/${encodeURIComponent(String(id))}`
3947
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/grants/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/grants/${encodeURIComponent(String(id))}`
3941
3948
  }
3942
3949
 
3943
3950
  /**
@@ -3947,8 +3954,8 @@ export const getDeleteGrantUrl = (id: string,
3947
3954
  * revoked so the unique binding can be reused.
3948
3955
  *
3949
3956
  * Accepts either a project secret (`oauth2`) or a user-bound Console
3950
- * session cookie (`nextgenSession`). Cookie-authenticated requests
3951
- * follow the scheme's CSRF rules (`nextgenSession`).
3957
+ * session cookie (`sessionCookie`). Cookie-authenticated requests
3958
+ * follow the scheme's CSRF rules (`sessionCookie`).
3952
3959
  * @summary Revoke grant
3953
3960
  */
3954
3961
  export const deleteGrant = async (id: string,
@@ -3985,7 +3992,7 @@ export const getListEventsUrl = (params: ListEventsParams,) => {
3985
3992
 
3986
3993
  const stringifiedParams = normalizedParams.toString();
3987
3994
 
3988
- return stringifiedParams.length > 0 ? `${getProxyPath()}/events?${stringifiedParams}` : `${getProxyPath()}/events`
3995
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/events?${stringifiedParams}` : `${getApiBaseUrl()}/events`
3989
3996
  }
3990
3997
 
3991
3998
  /**
@@ -4028,7 +4035,7 @@ export const getGetEventUrl = (id: string,
4028
4035
 
4029
4036
  const stringifiedParams = normalizedParams.toString();
4030
4037
 
4031
- return stringifiedParams.length > 0 ? `${getProxyPath()}/events/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getProxyPath()}/events/${encodeURIComponent(String(id))}`
4038
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/events/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getApiBaseUrl()}/events/${encodeURIComponent(String(id))}`
4032
4039
  }
4033
4040
 
4034
4041
  /**
@@ -4065,7 +4072,7 @@ export const getGetVariablesUrl = (params: GetVariablesParams,) => {
4065
4072
 
4066
4073
  const stringifiedParams = normalizedParams.toString();
4067
4074
 
4068
- return stringifiedParams.length > 0 ? `${getProxyPath()}/variables?${stringifiedParams}` : `${getProxyPath()}/variables`
4075
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/variables?${stringifiedParams}` : `${getApiBaseUrl()}/variables`
4069
4076
  }
4070
4077
 
4071
4078
  /**
@@ -4101,7 +4108,7 @@ export const getUpdateVariablesUrl = (params: UpdateVariablesParams,) => {
4101
4108
 
4102
4109
  const stringifiedParams = normalizedParams.toString();
4103
4110
 
4104
- return stringifiedParams.length > 0 ? `${getProxyPath()}/variables?${stringifiedParams}` : `${getProxyPath()}/variables`
4111
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/variables?${stringifiedParams}` : `${getApiBaseUrl()}/variables`
4105
4112
  }
4106
4113
 
4107
4114
  /**
@@ -4166,7 +4173,7 @@ export const getGetVariableUrl = (variableName: string,
4166
4173
 
4167
4174
  const stringifiedParams = normalizedParams.toString();
4168
4175
 
4169
- return stringifiedParams.length > 0 ? `${getProxyPath()}/variables/${encodeURIComponent(String(variableName))}?${stringifiedParams}` : `${getProxyPath()}/variables/${encodeURIComponent(String(variableName))}`
4176
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/variables/${encodeURIComponent(String(variableName))}?${stringifiedParams}` : `${getApiBaseUrl()}/variables/${encodeURIComponent(String(variableName))}`
4170
4177
  }
4171
4178
 
4172
4179
  /**
@@ -4202,7 +4209,7 @@ export const getDeleteVariableUrl = (variableName: string,
4202
4209
 
4203
4210
  const stringifiedParams = normalizedParams.toString();
4204
4211
 
4205
- return stringifiedParams.length > 0 ? `${getProxyPath()}/variables/${encodeURIComponent(String(variableName))}?${stringifiedParams}` : `${getProxyPath()}/variables/${encodeURIComponent(String(variableName))}`
4212
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/variables/${encodeURIComponent(String(variableName))}?${stringifiedParams}` : `${getApiBaseUrl()}/variables/${encodeURIComponent(String(variableName))}`
4206
4213
  }
4207
4214
 
4208
4215
  /**
@@ -4237,7 +4244,7 @@ export const getCreateDeploymentUrl = (params: CreateDeploymentParams,) => {
4237
4244
 
4238
4245
  const stringifiedParams = normalizedParams.toString();
4239
4246
 
4240
- return stringifiedParams.length > 0 ? `${getProxyPath()}/deployments?${stringifiedParams}` : `${getProxyPath()}/deployments`
4247
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments?${stringifiedParams}` : `${getApiBaseUrl()}/deployments`
4241
4248
  }
4242
4249
 
4243
4250
  /**
@@ -4319,7 +4326,7 @@ export const getListDeploymentsUrl = (params: ListDeploymentsParams,) => {
4319
4326
 
4320
4327
  const stringifiedParams = normalizedParams.toString();
4321
4328
 
4322
- return stringifiedParams.length > 0 ? `${getProxyPath()}/deployments?${stringifiedParams}` : `${getProxyPath()}/deployments`
4329
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments?${stringifiedParams}` : `${getApiBaseUrl()}/deployments`
4323
4330
  }
4324
4331
 
4325
4332
  /**
@@ -4366,7 +4373,7 @@ export const getGetDeploymentByIdUrl = (deploymentId: string,
4366
4373
 
4367
4374
  const stringifiedParams = normalizedParams.toString();
4368
4375
 
4369
- return stringifiedParams.length > 0 ? `${getProxyPath()}/deployments/${encodeURIComponent(String(deploymentId))}?${stringifiedParams}` : `${getProxyPath()}/deployments/${encodeURIComponent(String(deploymentId))}`
4376
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}?${stringifiedParams}` : `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}`
4370
4377
  }
4371
4378
 
4372
4379
  /**
@@ -4405,7 +4412,7 @@ export const getRollbackDeploymentUrl = (deploymentId: string,
4405
4412
 
4406
4413
  const stringifiedParams = normalizedParams.toString();
4407
4414
 
4408
- return stringifiedParams.length > 0 ? `${getProxyPath()}/deployments/${encodeURIComponent(String(deploymentId))}/rollback?${stringifiedParams}` : `${getProxyPath()}/deployments/${encodeURIComponent(String(deploymentId))}/rollback`
4415
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}/rollback?${stringifiedParams}` : `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}/rollback`
4409
4416
  }
4410
4417
 
4411
4418
  /**
@@ -4467,7 +4474,7 @@ export const getGetDeploymentVariablesUrl = (deploymentId: string,
4467
4474
 
4468
4475
  const stringifiedParams = normalizedParams.toString();
4469
4476
 
4470
- return stringifiedParams.length > 0 ? `${getProxyPath()}/deployments/${encodeURIComponent(String(deploymentId))}/variables?${stringifiedParams}` : `${getProxyPath()}/deployments/${encodeURIComponent(String(deploymentId))}/variables`
4477
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}/variables?${stringifiedParams}` : `${getApiBaseUrl()}/deployments/${encodeURIComponent(String(deploymentId))}/variables`
4471
4478
  }
4472
4479
 
4473
4480
  /**