@zitadel/api 0.2.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 (89) 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 +2 -2
  9. package/dist/generated/endpoints/zitadelNextGen.mjs +192 -124
  10. package/dist/generated/endpoints/zitadelNextGen.mjs.map +1 -1
  11. package/dist/generated/endpoints/zitadelNextGen.msw.d.mts +3 -1
  12. package/dist/generated/endpoints/zitadelNextGen.msw.d.mts.map +1 -1
  13. package/dist/generated/endpoints/zitadelNextGen.msw.mjs +40 -7
  14. package/dist/generated/endpoints/zitadelNextGen.msw.mjs.map +1 -1
  15. package/dist/generated/endpoints/zitadelNextGen.zod.d.mts +104 -28
  16. package/dist/generated/endpoints/zitadelNextGen.zod.d.mts.map +1 -1
  17. package/dist/generated/endpoints/zitadelNextGen.zod.mjs +117 -37
  18. package/dist/generated/endpoints/zitadelNextGen.zod.mjs.map +1 -1
  19. package/dist/generated/model/index.d.mts +2 -2
  20. package/dist/generated/model/index.mjs +5 -1
  21. package/dist/generated/model/index.mjs.map +1 -1
  22. package/dist/generated/operations.mjs +22 -1
  23. package/dist/generated/operations.mjs.map +1 -1
  24. package/dist/{index-D7-l5LV6.d.mts → index-DGQY1rfH.d.mts} +398 -10
  25. package/dist/index-DGQY1rfH.d.mts.map +1 -0
  26. package/dist/runtime/api-factory.d.mts +2 -51
  27. package/dist/runtime/api-factory.mjs +3 -62
  28. package/dist/runtime/auth.mjs +1 -1
  29. package/dist/runtime/auth.mjs.map +1 -1
  30. package/dist/runtime/base-url.d.mts +14 -0
  31. package/dist/runtime/base-url.d.mts.map +1 -1
  32. package/dist/runtime/base-url.mjs +22 -1
  33. package/dist/runtime/base-url.mjs.map +1 -1
  34. package/dist/runtime/config.d.mts +1 -1
  35. package/dist/runtime/config.mjs +1 -1
  36. package/dist/runtime/fetch.d.mts +2 -2
  37. package/dist/runtime/fetch.mjs +41 -17
  38. package/dist/runtime/fetch.mjs.map +1 -1
  39. package/dist/runtime/paging.d.mts +35 -0
  40. package/dist/runtime/paging.d.mts.map +1 -0
  41. package/dist/runtime/paging.mjs +38 -0
  42. package/dist/runtime/paging.mjs.map +1 -0
  43. package/dist/{zitadelNextGen-Cw3DrCn1.d.mts → zitadelNextGen-BVO4sdKD.d.mts} +69 -34
  44. package/dist/zitadelNextGen-BVO4sdKD.d.mts.map +1 -0
  45. package/package.json +7 -1
  46. package/src/generated/endpoints/zitadelNextGen.faker.ts +9 -6
  47. package/src/generated/endpoints/zitadelNextGen.msw.ts +16 -1
  48. package/src/generated/endpoints/zitadelNextGen.ts +212 -125
  49. package/src/generated/endpoints/zitadelNextGen.zod.ts +120 -36
  50. package/src/generated/model/createFlowDefinition201UserSchemaMetadata.ts +5 -0
  51. package/src/generated/model/deleteUserByID409.ts +20 -0
  52. package/src/generated/model/deleteUserByID409Details.ts +12 -0
  53. package/src/generated/model/deleteUserByIDDefault.ts +9 -0
  54. package/src/generated/model/evaluatePolicy200.ts +30 -0
  55. package/src/generated/model/evaluatePolicy200Violations.ts +14 -0
  56. package/src/generated/model/evaluatePolicyBody.ts +82 -0
  57. package/src/generated/model/evaluatePolicyDefault.ts +90 -0
  58. package/src/generated/model/evaluatePolicyParams.ts +15 -0
  59. package/src/generated/model/getFlowDefinition200UserSchemaMetadata.ts +5 -0
  60. package/src/generated/model/getFlowStepDefault.ts +9 -0
  61. package/src/generated/model/getMyUserSchema200Metadata.ts +5 -0
  62. package/src/generated/model/getSchemaById200Metadata.ts +5 -0
  63. package/src/generated/model/index.ts +8 -0
  64. package/src/generated/model/listFlowDefinitions200FlowDefinitionsItemUserSchemaMetadata.ts +5 -0
  65. package/src/generated/model/listSchemas200SchemasItemMetadata.ts +5 -0
  66. package/src/generated/model/listSchemasExpandItem.ts +28 -0
  67. package/src/generated/model/listSchemasParams.ts +5 -0
  68. package/src/generated/model/queryTeamsParams.ts +3 -2
  69. package/src/generated/model/queryUsersBodyFilterItem.ts +11 -3
  70. package/src/generated/model/queryUsersBodyFilterItemField.ts +12 -3
  71. package/src/generated/model/submitFlowStepDefault.ts +9 -0
  72. package/src/generated/operations.ts +24 -1
  73. package/src/generated/paging.ts +128 -0
  74. package/src/runtime/api-factory.spec.ts +278 -0
  75. package/src/runtime/api-factory.ts +93 -12
  76. package/src/runtime/auth.ts +1 -1
  77. package/src/runtime/base-url.spec.ts +40 -4
  78. package/src/runtime/base-url.ts +28 -0
  79. package/src/runtime/fetch.spec.ts +51 -0
  80. package/src/runtime/fetch.ts +69 -30
  81. package/src/runtime/paged.spec.ts +104 -0
  82. package/src/runtime/paged.ts +61 -0
  83. package/src/runtime/paging.spec.ts +94 -0
  84. package/src/runtime/paging.ts +58 -0
  85. package/dist/fetch-CtYe0OvX.d.mts.map +0 -1
  86. package/dist/index-D7-l5LV6.d.mts.map +0 -1
  87. package/dist/runtime/api-factory.d.mts.map +0 -1
  88. package/dist/runtime/api-factory.mjs.map +0 -1
  89. package/dist/zitadelNextGen-Cw3DrCn1.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 {
@@ -60,6 +60,9 @@ import type {
60
60
  CreateUserParams,
61
61
  DeleteGrantParams,
62
62
  DeleteVariableParams,
63
+ EvaluatePolicy200,
64
+ EvaluatePolicyBody,
65
+ EvaluatePolicyParams,
63
66
  ExchangeHandoff200,
64
67
  ExchangeHandoffBody,
65
68
  ExchangeHandoffParams,
@@ -209,15 +212,16 @@ export const getGetLiveUrl = () => {
209
212
 
210
213
 
211
214
 
212
- return `${getProxyPath()}/livez`
215
+ return `${getApiBaseUrl()}/livez`
213
216
  }
214
217
 
215
218
  /**
216
219
  * Answers `ok` while the server process serves HTTP, and checks nothing behind it.
217
220
  *
218
- * Point a liveness probe here. It never checks the database, so an outage
219
- * of the database does not restart every instance; `GET /readyz` takes an
220
- * 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.
221
225
  * @summary Check server liveness
222
226
  */
223
227
  export const getLive = async ( options?: Parameters<typeof customFetch>[1]): Promise<GetLiveDefault> => {
@@ -238,15 +242,15 @@ export const getGetReadyUrl = () => {
238
242
 
239
243
 
240
244
 
241
- return `${getProxyPath()}/readyz`
245
+ return `${getApiBaseUrl()}/readyz`
242
246
  }
243
247
 
244
248
  /**
245
249
  * Answers whether the server can serve requests, which takes its database answering within a second.
246
250
  *
247
- * Point a readiness probe here, so that a server whose database does not
248
- * answer gets no requests until it does. The check is one round trip to the
249
- * 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.
250
254
  * @summary Check server readiness
251
255
  */
252
256
  export const getReady = async ( options?: Parameters<typeof customFetch>[1]): Promise<GetReadyDefault> => {
@@ -274,7 +278,7 @@ export const getCreateUserUrl = (params: CreateUserParams,) => {
274
278
 
275
279
  const stringifiedParams = normalizedParams.toString();
276
280
 
277
- return stringifiedParams.length > 0 ? `${getProxyPath()}/users?${stringifiedParams}` : `${getProxyPath()}/users`
281
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users?${stringifiedParams}` : `${getApiBaseUrl()}/users`
278
282
  }
279
283
 
280
284
  /**
@@ -325,7 +329,7 @@ export const getQueryUsersUrl = (params?: QueryUsersParams,) => {
325
329
 
326
330
  const stringifiedParams = normalizedParams.toString();
327
331
 
328
- return stringifiedParams.length > 0 ? `${getProxyPath()}/users/query?${stringifiedParams}` : `${getProxyPath()}/users/query`
332
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/query?${stringifiedParams}` : `${getApiBaseUrl()}/users/query`
329
333
  }
330
334
 
331
335
  /**
@@ -335,8 +339,8 @@ export const getQueryUsersUrl = (params?: QueryUsersParams,) => {
335
339
  * project is listed.
336
340
  *
337
341
  * Accepts either a project secret (`oauth2`) or a user-bound Console
338
- * session cookie (`nextgenSession`). Cookie-authenticated requests
339
- * follow the scheme's CSRF rules (`nextgenSession`).
342
+ * session cookie (`sessionCookie`). Cookie-authenticated requests
343
+ * follow the scheme's CSRF rules (`sessionCookie`).
340
344
  * @summary Query users
341
345
  */
342
346
  export const queryUsers = async (queryUsersBody: QueryUsersBody,
@@ -380,7 +384,7 @@ export const getGetUserByIDUrl = (userId: string,
380
384
 
381
385
  const stringifiedParams = normalizedParams.toString();
382
386
 
383
- 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))}`
384
388
  }
385
389
 
386
390
  /**
@@ -409,7 +413,7 @@ export const getPatchUserByIDUrl = (userId: string,) => {
409
413
 
410
414
 
411
415
 
412
- return `${getProxyPath()}/users/${encodeURIComponent(String(userId))}`
416
+ return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}`
413
417
  }
414
418
 
415
419
  /**
@@ -452,15 +456,19 @@ export const getDeleteUserByIDUrl = (userId: string,) => {
452
456
 
453
457
 
454
458
 
455
- return `${getProxyPath()}/users/${encodeURIComponent(String(userId))}`
459
+ return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}`
456
460
  }
457
461
 
458
462
  /**
459
- * Deletes a user and removes them from every team they belong to.
463
+ * Deletes a user, removes them from every team they belong to, and revokes
464
+ * every grant they hold, on any project.
460
465
  *
461
- * The user is removed, not deactivated, and the deletion emits `user.deleted`.
466
+ * The user is removed, not deactivated, and the deletion emits `user.deleted`,
467
+ * plus `authz.revoked` for each grant on that grant's project.
462
468
  * With a project secret the request is idempotent: deleting a user that exists
463
- * 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.
464
472
  * @summary Delete user by ID
465
473
  */
466
474
  export const deleteUserByID = async (userId: string, options?: Parameters<typeof customFetch>[1]): Promise<void> => {
@@ -489,7 +497,7 @@ export const getListUserIdentityLinksUrl = (userId: string,
489
497
 
490
498
  const stringifiedParams = normalizedParams.toString();
491
499
 
492
- 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`
493
501
  }
494
502
 
495
503
  /**
@@ -524,7 +532,7 @@ export const getListUserPasskeysUrl = (userId: string,
524
532
 
525
533
  const stringifiedParams = normalizedParams.toString();
526
534
 
527
- 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`
528
536
  }
529
537
 
530
538
  /**
@@ -554,7 +562,7 @@ export const getBeginUserPasskeyRegistrationUrl = (userId: string,) => {
554
562
 
555
563
 
556
564
 
557
- return `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/passkeys/registrations`
565
+ return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/passkeys/registrations`
558
566
  }
559
567
 
560
568
  /**
@@ -599,7 +607,7 @@ export const getFinishUserPasskeyRegistrationUrl = (userId: string,
599
607
 
600
608
 
601
609
 
602
- return `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/passkeys/registrations/${encodeURIComponent(String(registrationId))}`
610
+ return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/passkeys/registrations/${encodeURIComponent(String(registrationId))}`
603
611
  }
604
612
 
605
613
  /**
@@ -645,7 +653,7 @@ export const getGetUserPasswordStateUrl = (userId: string,) => {
645
653
 
646
654
 
647
655
 
648
- return `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/password`
656
+ return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/password`
649
657
  }
650
658
 
651
659
  /**
@@ -672,7 +680,7 @@ export const getSetUserPasswordUrl = (userId: string,) => {
672
680
 
673
681
 
674
682
 
675
- return `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/password`
683
+ return `${getApiBaseUrl()}/users/${encodeURIComponent(String(userId))}/password`
676
684
  }
677
685
 
678
686
  /**
@@ -724,7 +732,7 @@ export const getListUserTeamsUrl = (userId: string,
724
732
 
725
733
  const stringifiedParams = normalizedParams.toString();
726
734
 
727
- 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`
728
736
  }
729
737
 
730
738
  /**
@@ -763,7 +771,7 @@ export const getGetMyUserUrl = (params?: GetMyUserParams,) => {
763
771
 
764
772
  const stringifiedParams = normalizedParams.toString();
765
773
 
766
- return stringifiedParams.length > 0 ? `${getProxyPath()}/users/me?${stringifiedParams}` : `${getProxyPath()}/users/me`
774
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me?${stringifiedParams}` : `${getApiBaseUrl()}/users/me`
767
775
  }
768
776
 
769
777
  /**
@@ -801,7 +809,7 @@ export const getPatchMyUserUrl = (params?: PatchMyUserParams,) => {
801
809
 
802
810
  const stringifiedParams = normalizedParams.toString();
803
811
 
804
- return stringifiedParams.length > 0 ? `${getProxyPath()}/users/me?${stringifiedParams}` : `${getProxyPath()}/users/me`
812
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/users/me?${stringifiedParams}` : `${getApiBaseUrl()}/users/me`
805
813
  }
806
814
 
807
815
  /**
@@ -853,7 +861,7 @@ export const getListMyIdentityLinksUrl = (params?: ListMyIdentityLinksParams,) =
853
861
 
854
862
  const stringifiedParams = normalizedParams.toString();
855
863
 
856
- 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`
857
865
  }
858
866
 
859
867
  /**
@@ -889,7 +897,7 @@ export const getListMyPasskeysUrl = (params?: ListMyPasskeysParams,) => {
889
897
 
890
898
  const stringifiedParams = normalizedParams.toString();
891
899
 
892
- 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`
893
901
  }
894
902
 
895
903
  /**
@@ -926,7 +934,7 @@ export const getGetMyPasswordStateUrl = (params?: GetMyPasswordStateParams,) =>
926
934
 
927
935
  const stringifiedParams = normalizedParams.toString();
928
936
 
929
- 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`
930
938
  }
931
939
 
932
940
  /**
@@ -963,7 +971,7 @@ export const getListMyProjectsUrl = (params?: ListMyProjectsParams,) => {
963
971
 
964
972
  const stringifiedParams = normalizedParams.toString();
965
973
 
966
- 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`
967
975
  }
968
976
 
969
977
  /**
@@ -1011,7 +1019,7 @@ export const getGetMyUserSchemaUrl = (params?: GetMyUserSchemaParams,) => {
1011
1019
 
1012
1020
  const stringifiedParams = normalizedParams.toString();
1013
1021
 
1014
- 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`
1015
1023
  }
1016
1024
 
1017
1025
  /**
@@ -1046,7 +1054,7 @@ export const getListMyTeamsUrl = (params?: ListMyTeamsParams,) => {
1046
1054
 
1047
1055
  const stringifiedParams = normalizedParams.toString();
1048
1056
 
1049
- 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`
1050
1058
  }
1051
1059
 
1052
1060
  /**
@@ -1074,7 +1082,7 @@ export const getCreateFlowUrl = () => {
1074
1082
 
1075
1083
 
1076
1084
 
1077
- return `${getProxyPath()}/flow`
1085
+ return `${getApiBaseUrl()}/flow`
1078
1086
  }
1079
1087
 
1080
1088
  /**
@@ -1139,7 +1147,7 @@ export const getGetFlowStepUrl = (id: string,) => {
1139
1147
 
1140
1148
 
1141
1149
 
1142
- return `${getProxyPath()}/flow/${encodeURIComponent(String(id))}`
1150
+ return `${getApiBaseUrl()}/flow/${encodeURIComponent(String(id))}`
1143
1151
  }
1144
1152
 
1145
1153
  /**
@@ -1169,7 +1177,7 @@ export const getSubmitFlowStepUrl = (id: string,) => {
1169
1177
 
1170
1178
 
1171
1179
 
1172
- return `${getProxyPath()}/flow/${encodeURIComponent(String(id))}/submit`
1180
+ return `${getApiBaseUrl()}/flow/${encodeURIComponent(String(id))}/submit`
1173
1181
  }
1174
1182
 
1175
1183
  /**
@@ -1260,7 +1268,7 @@ export const getCreateAuthAttemptUrl = () => {
1260
1268
 
1261
1269
 
1262
1270
 
1263
- return `${getProxyPath()}/auth_attempts`
1271
+ return `${getApiBaseUrl()}/auth_attempts`
1264
1272
  }
1265
1273
 
1266
1274
  /**
@@ -1311,7 +1319,7 @@ export const getGetAuthAttemptUrl = (attemptId: string,) => {
1311
1319
 
1312
1320
 
1313
1321
 
1314
- return `${getProxyPath()}/auth_attempts/${encodeURIComponent(String(attemptId))}`
1322
+ return `${getApiBaseUrl()}/auth_attempts/${encodeURIComponent(String(attemptId))}`
1315
1323
  }
1316
1324
 
1317
1325
  /**
@@ -1342,7 +1350,7 @@ export const getIssueChallengeUrl = (attemptId: string,) => {
1342
1350
 
1343
1351
 
1344
1352
 
1345
- return `${getProxyPath()}/auth_attempts/${encodeURIComponent(String(attemptId))}/challenges`
1353
+ return `${getApiBaseUrl()}/auth_attempts/${encodeURIComponent(String(attemptId))}/challenges`
1346
1354
  }
1347
1355
 
1348
1356
  /**
@@ -1388,7 +1396,7 @@ export const getVerifyChallengeProofUrl = (attemptId: string,
1388
1396
 
1389
1397
 
1390
1398
 
1391
- 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`
1392
1400
  }
1393
1401
 
1394
1402
  /**
@@ -1438,7 +1446,7 @@ export const getCreateHandoffUrl = (attemptId: string,) => {
1438
1446
 
1439
1447
 
1440
1448
 
1441
- return `${getProxyPath()}/auth_attempts/${encodeURIComponent(String(attemptId))}/handoff`
1449
+ return `${getApiBaseUrl()}/auth_attempts/${encodeURIComponent(String(attemptId))}/handoff`
1442
1450
  }
1443
1451
 
1444
1452
  /**
@@ -1474,7 +1482,7 @@ export const getCreateProjectUrl = () => {
1474
1482
 
1475
1483
 
1476
1484
 
1477
- return `${getProxyPath()}/projects`
1485
+ return `${getApiBaseUrl()}/projects`
1478
1486
  }
1479
1487
 
1480
1488
  /**
@@ -1518,7 +1526,7 @@ export const getQueryProjectsUrl = () => {
1518
1526
 
1519
1527
 
1520
1528
 
1521
- return `${getProxyPath()}/projects/query`
1529
+ return `${getApiBaseUrl()}/projects/query`
1522
1530
  }
1523
1531
 
1524
1532
  /**
@@ -1562,7 +1570,7 @@ export const getGetProjectUrl = (projectId: string,) => {
1562
1570
 
1563
1571
 
1564
1572
 
1565
- return `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}`
1573
+ return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}`
1566
1574
  }
1567
1575
 
1568
1576
  /**
@@ -1587,7 +1595,7 @@ export const getPatchProjectUrl = (projectId: string,) => {
1587
1595
 
1588
1596
 
1589
1597
 
1590
- return `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}`
1598
+ return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}`
1591
1599
  }
1592
1600
 
1593
1601
  /**
@@ -1635,7 +1643,7 @@ export const getListProjectAdminsUrl = (projectId: string,
1635
1643
 
1636
1644
  const stringifiedParams = normalizedParams.toString();
1637
1645
 
1638
- 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`
1639
1647
  }
1640
1648
 
1641
1649
  /**
@@ -1666,7 +1674,7 @@ export const getListProjectAdminsUrl = (projectId: string,
1666
1674
  * Ordered by `user_id` and paginated with `page_token`.
1667
1675
  *
1668
1676
  * Accepts either a project secret (`oauth2`) or a user-bound Console
1669
- * session cookie (`nextgenSession`) that can read the project.
1677
+ * session cookie (`sessionCookie`) that can read the project.
1670
1678
  * @summary List project admins
1671
1679
  */
1672
1680
  export const listProjectAdmins = async (projectId: string,
@@ -1688,7 +1696,7 @@ export const getInitClaimUrl = (projectId: string,) => {
1688
1696
 
1689
1697
 
1690
1698
 
1691
- return `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/claim/init`
1699
+ return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/init`
1692
1700
  }
1693
1701
 
1694
1702
  /**
@@ -1725,7 +1733,7 @@ export const getGetClaimStatusUrl = (projectId: string,
1725
1733
 
1726
1734
  const stringifiedParams = normalizedParams.toString();
1727
1735
 
1728
- 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`
1729
1737
  }
1730
1738
 
1731
1739
  /**
@@ -1758,12 +1766,12 @@ export const getCompleteClaimUrl = (projectId: string,) => {
1758
1766
 
1759
1767
 
1760
1768
 
1761
- return `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/claim/complete`
1769
+ return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/claim/complete`
1762
1770
  }
1763
1771
 
1764
1772
  /**
1765
1773
  * Called by the browser after the developer authenticates on the claim page.
1766
- * Authenticated by the `__nextgen_session` cookie, it attaches the project to
1774
+ * Authenticated by the session cookie, it attaches the project to
1767
1775
  * the developer's personal team using the `challenge_id` from the claim URL as
1768
1776
  * its single-use, browser-safe authorization.
1769
1777
  * @summary Complete a project claim
@@ -1809,7 +1817,7 @@ export const getGetClaimWindowUrl = (projectId: string,
1809
1817
 
1810
1818
  const stringifiedParams = normalizedParams.toString();
1811
1819
 
1812
- 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`
1813
1821
  }
1814
1822
 
1815
1823
  /**
@@ -1840,7 +1848,7 @@ export const getAddOriginUrl = (projectId: string,) => {
1840
1848
 
1841
1849
 
1842
1850
 
1843
- return `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/origins`
1851
+ return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/origins`
1844
1852
  }
1845
1853
 
1846
1854
  /**
@@ -1883,7 +1891,7 @@ export const getRemoveOriginUrl = (projectId: string,) => {
1883
1891
 
1884
1892
 
1885
1893
 
1886
- return `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/origins/remove`
1894
+ return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/origins/remove`
1887
1895
  }
1888
1896
 
1889
1897
  /**
@@ -1934,7 +1942,7 @@ export const getListPreviewsUrl = (projectId: string,
1934
1942
 
1935
1943
  const stringifiedParams = normalizedParams.toString();
1936
1944
 
1937
- 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`
1938
1946
  }
1939
1947
 
1940
1948
  /**
@@ -1962,7 +1970,7 @@ export const getRemovePreviewUrl = (projectId: string,) => {
1962
1970
 
1963
1971
 
1964
1972
 
1965
- return `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/previews/remove`
1973
+ return `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/previews/remove`
1966
1974
  }
1967
1975
 
1968
1976
  /**
@@ -2010,7 +2018,7 @@ export const getCreateSessionUrl = () => {
2010
2018
 
2011
2019
 
2012
2020
 
2013
- return `${getProxyPath()}/sessions`
2021
+ return `${getApiBaseUrl()}/sessions`
2014
2022
  }
2015
2023
 
2016
2024
  /**
@@ -2025,8 +2033,9 @@ export const getCreateSessionUrl = () => {
2025
2033
  * Creating a session is an app-plane operation on the project credential
2026
2034
  * (`session.write`). The returned `session_token` is a session credential for the
2027
2035
  * end-user client, not a management scope: it is delivered as the
2028
- * `__nextgen_session` cookie and authorises the self-service operations
2029
- * `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
2030
2039
  * by-id operations `GET /sessions/{session_id}` and `DELETE /sessions/{session_id}`
2031
2040
  * are operator endpoints and require `session.read` / `session.delete` instead.
2032
2041
  *
@@ -2076,7 +2085,7 @@ export const getQuerySessionsUrl = (params: QuerySessionsParams,) => {
2076
2085
 
2077
2086
  const stringifiedParams = normalizedParams.toString();
2078
2087
 
2079
- return stringifiedParams.length > 0 ? `${getProxyPath()}/sessions/query?${stringifiedParams}` : `${getProxyPath()}/sessions/query`
2088
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/query?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/query`
2080
2089
  }
2081
2090
 
2082
2091
  /**
@@ -2125,7 +2134,7 @@ export const getExchangeHandoffUrl = (params: ExchangeHandoffParams,) => {
2125
2134
 
2126
2135
  const stringifiedParams = normalizedParams.toString();
2127
2136
 
2128
- return stringifiedParams.length > 0 ? `${getProxyPath()}/sessions/exchange?${stringifiedParams}` : `${getProxyPath()}/sessions/exchange`
2137
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/exchange?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/exchange`
2129
2138
  }
2130
2139
 
2131
2140
  /**
@@ -2188,7 +2197,7 @@ export const getGetSessionUrl = (sessionId: string,) => {
2188
2197
 
2189
2198
 
2190
2199
 
2191
- return `${getProxyPath()}/sessions/${encodeURIComponent(String(sessionId))}`
2200
+ return `${getApiBaseUrl()}/sessions/${encodeURIComponent(String(sessionId))}`
2192
2201
  }
2193
2202
 
2194
2203
  /**
@@ -2218,15 +2227,15 @@ export const getRevokeSessionUrl = (sessionId: string,) => {
2218
2227
 
2219
2228
 
2220
2229
 
2221
- return `${getProxyPath()}/sessions/${encodeURIComponent(String(sessionId))}`
2230
+ return `${getApiBaseUrl()}/sessions/${encodeURIComponent(String(sessionId))}`
2222
2231
  }
2223
2232
 
2224
2233
  /**
2225
2234
  * Permanently deletes the session, terminating it immediately.
2226
2235
  *
2227
2236
  * This is the operator revoke path and requires the `session.delete` scope on a
2228
- * project-bound credential. End-user logout with the `__nextgen_session` cookie is
2229
- * `DELETE /sessions/me` (`nextgenSession` scheme).
2237
+ * project-bound credential. End-user logout with the session cookie is
2238
+ * `DELETE /sessions/me` (`sessionCookie` scheme).
2230
2239
  *
2231
2240
  * Idempotent: deleting a session that does not exist (or was already deleted)
2232
2241
  * still returns 204. After deletion, any tokens derived from the session are
@@ -2258,7 +2267,7 @@ export const getGetMySessionUrl = (params?: GetMySessionParams,) => {
2258
2267
 
2259
2268
  const stringifiedParams = normalizedParams.toString();
2260
2269
 
2261
- return stringifiedParams.length > 0 ? `${getProxyPath()}/sessions/me?${stringifiedParams}` : `${getProxyPath()}/sessions/me`
2270
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/me?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/me`
2262
2271
  }
2263
2272
 
2264
2273
  /**
@@ -2297,13 +2306,13 @@ export const getRevokeMySessionUrl = (params?: RevokeMySessionParams,) => {
2297
2306
 
2298
2307
  const stringifiedParams = normalizedParams.toString();
2299
2308
 
2300
- return stringifiedParams.length > 0 ? `${getProxyPath()}/sessions/me?${stringifiedParams}` : `${getProxyPath()}/sessions/me`
2309
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/sessions/me?${stringifiedParams}` : `${getApiBaseUrl()}/sessions/me`
2301
2310
  }
2302
2311
 
2303
2312
  /**
2304
2313
  * Logs out by permanently deleting the session.
2305
2314
  *
2306
- * The `__nextgen_session` cookie issued at creation (or superseded by a handoff
2315
+ * The session cookie issued at creation (or superseded by a handoff
2307
2316
  * exchange) is required, with the session's token from `GET /sessions/me/csrf`
2308
2317
  * in the `X-Zitadel-CSRF` header. Idempotent: if the session is already gone
2309
2318
  * this still returns 204. Any tokens derived from the session are invalidated,
@@ -2338,14 +2347,14 @@ export const getGetMySessionCsrfTokenUrl = (params?: GetMySessionCsrfTokenParams
2338
2347
 
2339
2348
  const stringifiedParams = normalizedParams.toString();
2340
2349
 
2341
- 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`
2342
2351
  }
2343
2352
 
2344
2353
  /**
2345
2354
  * Returns the session-bound token for cross-site request forgery protection
2346
2355
  * (ADR 053 §5). Browser code sends it in the `X-Zitadel-CSRF` header on the
2347
2356
  * state-changing requests the session cookie authenticates that require it
2348
- * — see the `nextgenSession` scheme. It authorizes nothing on its own: the
2357
+ * — see the `sessionCookie` scheme. It authorizes nothing on its own: the
2349
2358
  * HttpOnly cookie is still the credential, and a cross-site page cannot
2350
2359
  * read this response. It stays the same for the life of the session, so a
2351
2360
  * client fetches it once per session.
@@ -2379,7 +2388,7 @@ export const getCreateSchemaUrl = (params: CreateSchemaParams,) => {
2379
2388
 
2380
2389
  const stringifiedParams = normalizedParams.toString();
2381
2390
 
2382
- return stringifiedParams.length > 0 ? `${getProxyPath()}/schemas?${stringifiedParams}` : `${getProxyPath()}/schemas`
2391
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/schemas?${stringifiedParams}` : `${getApiBaseUrl()}/schemas`
2383
2392
  }
2384
2393
 
2385
2394
  /**
@@ -2426,6 +2435,14 @@ export const getListSchemasUrl = (params: ListSchemasParams,) => {
2426
2435
  const normalizedParams = new URLSearchParams();
2427
2436
 
2428
2437
  Object.entries(params || {}).forEach(([key, value]) => {
2438
+ const explodeParameters = ["expand"];
2439
+
2440
+ if (Array.isArray(value) && explodeParameters.includes(key)) {
2441
+ value.forEach((v) => {
2442
+ normalizedParams.append(key, v === null ? 'null' : String(v));
2443
+ });
2444
+ return;
2445
+ }
2429
2446
 
2430
2447
  if (value !== undefined) {
2431
2448
  normalizedParams.append(key, value === null ? 'null' : String(value))
@@ -2434,7 +2451,7 @@ export const getListSchemasUrl = (params: ListSchemasParams,) => {
2434
2451
 
2435
2452
  const stringifiedParams = normalizedParams.toString();
2436
2453
 
2437
- return stringifiedParams.length > 0 ? `${getProxyPath()}/schemas?${stringifiedParams}` : `${getProxyPath()}/schemas`
2454
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/schemas?${stringifiedParams}` : `${getApiBaseUrl()}/schemas`
2438
2455
  }
2439
2456
 
2440
2457
  /**
@@ -2468,7 +2485,7 @@ export const getGetSchemaByIdUrl = (id: string,
2468
2485
 
2469
2486
  const stringifiedParams = normalizedParams.toString();
2470
2487
 
2471
- 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))}`
2472
2489
  }
2473
2490
 
2474
2491
  /**
@@ -2503,7 +2520,7 @@ export const getCreateFlowDefinitionUrl = () => {
2503
2520
 
2504
2521
 
2505
2522
 
2506
- return `${getProxyPath()}/flow_definitions`
2523
+ return `${getApiBaseUrl()}/flow_definitions`
2507
2524
  }
2508
2525
 
2509
2526
  /**
@@ -2566,7 +2583,7 @@ export const getListFlowDefinitionsUrl = (params: ListFlowDefinitionsParams,) =>
2566
2583
 
2567
2584
  const stringifiedParams = normalizedParams.toString();
2568
2585
 
2569
- return stringifiedParams.length > 0 ? `${getProxyPath()}/flow_definitions?${stringifiedParams}` : `${getProxyPath()}/flow_definitions`
2586
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/flow_definitions?${stringifiedParams}` : `${getApiBaseUrl()}/flow_definitions`
2570
2587
  }
2571
2588
 
2572
2589
  /**
@@ -2593,7 +2610,7 @@ export const getGetFlowDefinitionUrl = (id: string,) => {
2593
2610
 
2594
2611
 
2595
2612
 
2596
- return `${getProxyPath()}/flow_definitions/${encodeURIComponent(String(id))}`
2613
+ return `${getApiBaseUrl()}/flow_definitions/${encodeURIComponent(String(id))}`
2597
2614
  }
2598
2615
 
2599
2616
  /**
@@ -2625,7 +2642,7 @@ export const getCreateTeamUrl = (params: CreateTeamParams,) => {
2625
2642
 
2626
2643
  const stringifiedParams = normalizedParams.toString();
2627
2644
 
2628
- return stringifiedParams.length > 0 ? `${getProxyPath()}/teams?${stringifiedParams}` : `${getProxyPath()}/teams`
2645
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/teams?${stringifiedParams}` : `${getApiBaseUrl()}/teams`
2629
2646
  }
2630
2647
 
2631
2648
  /**
@@ -2663,7 +2680,7 @@ return customFetch<CreateTeam201>(getCreateTeamUrl(params),
2663
2680
 
2664
2681
 
2665
2682
 
2666
- export const getQueryTeamsUrl = (params: QueryTeamsParams,) => {
2683
+ export const getQueryTeamsUrl = (params?: QueryTeamsParams,) => {
2667
2684
  const normalizedParams = new URLSearchParams();
2668
2685
 
2669
2686
  Object.entries(params || {}).forEach(([key, value]) => {
@@ -2675,15 +2692,18 @@ export const getQueryTeamsUrl = (params: QueryTeamsParams,) => {
2675
2692
 
2676
2693
  const stringifiedParams = normalizedParams.toString();
2677
2694
 
2678
- return stringifiedParams.length > 0 ? `${getProxyPath()}/teams/query?${stringifiedParams}` : `${getProxyPath()}/teams/query`
2695
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/teams/query?${stringifiedParams}` : `${getApiBaseUrl()}/teams/query`
2679
2696
  }
2680
2697
 
2681
2698
  /**
2682
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.
2683
2703
  * @summary Query teams
2684
2704
  */
2685
2705
  export const queryTeams = async (queryTeamsBody: QueryTeamsBody,
2686
- params: QueryTeamsParams, options?: Parameters<typeof customFetch>[1]): Promise<QueryTeams200> => {
2706
+ params?: QueryTeamsParams, options?: Parameters<typeof customFetch>[1]): Promise<QueryTeams200> => {
2687
2707
 
2688
2708
  const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
2689
2709
  if (!h) return {};
@@ -2715,7 +2735,7 @@ export const getGetTeamUrl = (teamId: string,) => {
2715
2735
 
2716
2736
 
2717
2737
 
2718
- return `${getProxyPath()}/teams/${encodeURIComponent(String(teamId))}`
2738
+ return `${getApiBaseUrl()}/teams/${encodeURIComponent(String(teamId))}`
2719
2739
  }
2720
2740
 
2721
2741
  /**
@@ -2740,7 +2760,7 @@ export const getDeleteTeamUrl = (teamId: string,) => {
2740
2760
 
2741
2761
 
2742
2762
 
2743
- return `${getProxyPath()}/teams/${encodeURIComponent(String(teamId))}`
2763
+ return `${getApiBaseUrl()}/teams/${encodeURIComponent(String(teamId))}`
2744
2764
  }
2745
2765
 
2746
2766
  /**
@@ -2777,7 +2797,7 @@ export const getUpdateTeamUrl = (teamId: string,) => {
2777
2797
 
2778
2798
 
2779
2799
 
2780
- return `${getProxyPath()}/teams/${encodeURIComponent(String(teamId))}`
2800
+ return `${getApiBaseUrl()}/teams/${encodeURIComponent(String(teamId))}`
2781
2801
  }
2782
2802
 
2783
2803
  /**
@@ -2824,7 +2844,7 @@ export const getCreateBrandingUrl = (params: CreateBrandingParams,) => {
2824
2844
 
2825
2845
  const stringifiedParams = normalizedParams.toString();
2826
2846
 
2827
- return stringifiedParams.length > 0 ? `${getProxyPath()}/branding?${stringifiedParams}` : `${getProxyPath()}/branding`
2847
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/branding?${stringifiedParams}` : `${getApiBaseUrl()}/branding`
2828
2848
  }
2829
2849
 
2830
2850
  /**
@@ -2878,7 +2898,7 @@ export const getListBrandingUrl = (params: ListBrandingParams,) => {
2878
2898
 
2879
2899
  const stringifiedParams = normalizedParams.toString();
2880
2900
 
2881
- return stringifiedParams.length > 0 ? `${getProxyPath()}/branding?${stringifiedParams}` : `${getProxyPath()}/branding`
2901
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/branding?${stringifiedParams}` : `${getApiBaseUrl()}/branding`
2882
2902
  }
2883
2903
 
2884
2904
  /**
@@ -2907,7 +2927,7 @@ export const getGetBrandingByIdUrl = (id: string,) => {
2907
2927
 
2908
2928
 
2909
2929
 
2910
- return `${getProxyPath()}/branding/${encodeURIComponent(String(id))}`
2930
+ return `${getApiBaseUrl()}/branding/${encodeURIComponent(String(id))}`
2911
2931
  }
2912
2932
 
2913
2933
  /**
@@ -2939,7 +2959,7 @@ export const getCreateIdpUrl = (params: CreateIdpParams,) => {
2939
2959
 
2940
2960
  const stringifiedParams = normalizedParams.toString();
2941
2961
 
2942
- return stringifiedParams.length > 0 ? `${getProxyPath()}/idps?${stringifiedParams}` : `${getProxyPath()}/idps`
2962
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps?${stringifiedParams}` : `${getApiBaseUrl()}/idps`
2943
2963
  }
2944
2964
 
2945
2965
  /**
@@ -3017,7 +3037,7 @@ export const getQueryIdpsUrl = (params: QueryIdpsParams,) => {
3017
3037
 
3018
3038
  const stringifiedParams = normalizedParams.toString();
3019
3039
 
3020
- return stringifiedParams.length > 0 ? `${getProxyPath()}/idps/query?${stringifiedParams}` : `${getProxyPath()}/idps/query`
3040
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/idps/query?${stringifiedParams}` : `${getApiBaseUrl()}/idps/query`
3021
3041
  }
3022
3042
 
3023
3043
  /**
@@ -3066,7 +3086,7 @@ export const getGetIdpByIdUrl = (id: string,
3066
3086
 
3067
3087
  const stringifiedParams = normalizedParams.toString();
3068
3088
 
3069
- 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))}`
3070
3090
  }
3071
3091
 
3072
3092
  /**
@@ -3103,7 +3123,7 @@ export const getListIdpRevisionsUrl = (id: string,
3103
3123
 
3104
3124
  const stringifiedParams = normalizedParams.toString();
3105
3125
 
3106
- 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`
3107
3127
  }
3108
3128
 
3109
3129
  /**
@@ -3140,7 +3160,7 @@ export const getGetIdpRevisionByIdUrl = (revisionId: string,
3140
3160
 
3141
3161
  const stringifiedParams = normalizedParams.toString();
3142
3162
 
3143
- 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))}`
3144
3164
  }
3145
3165
 
3146
3166
  /**
@@ -3176,7 +3196,7 @@ export const getListPoliciesUrl = (params: ListPoliciesParams,) => {
3176
3196
 
3177
3197
  const stringifiedParams = normalizedParams.toString();
3178
3198
 
3179
- return stringifiedParams.length > 0 ? `${getProxyPath()}/policies?${stringifiedParams}` : `${getProxyPath()}/policies`
3199
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies?${stringifiedParams}` : `${getApiBaseUrl()}/policies`
3180
3200
  }
3181
3201
 
3182
3202
  /**
@@ -3213,7 +3233,7 @@ export const getPublishPolicyUrl = (params: PublishPolicyParams,) => {
3213
3233
 
3214
3234
  const stringifiedParams = normalizedParams.toString();
3215
3235
 
3216
- return stringifiedParams.length > 0 ? `${getProxyPath()}/policies?${stringifiedParams}` : `${getProxyPath()}/policies`
3236
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies?${stringifiedParams}` : `${getApiBaseUrl()}/policies`
3217
3237
  }
3218
3238
 
3219
3239
  /**
@@ -3264,6 +3284,73 @@ return customFetch<PublishPolicy201>(getPublishPolicyUrl(params),
3264
3284
 
3265
3285
 
3266
3286
 
3287
+ export const getEvaluatePolicyUrl = (params: EvaluatePolicyParams,) => {
3288
+ const normalizedParams = new URLSearchParams();
3289
+
3290
+ Object.entries(params || {}).forEach(([key, value]) => {
3291
+
3292
+ if (value !== undefined) {
3293
+ normalizedParams.append(key, value === null ? 'null' : String(value))
3294
+ }
3295
+ });
3296
+
3297
+ const stringifiedParams = normalizedParams.toString();
3298
+
3299
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/policies/evaluate?${stringifiedParams}` : `${getApiBaseUrl()}/policies/evaluate`
3300
+ }
3301
+
3302
+ /**
3303
+ * Evaluates a policy config against one request, without side effects, and
3304
+ * answers the decision the operation would reach. Nothing is read from or
3305
+ * written to the project: the config is the one in the body, checked
3306
+ * exactly as a publish checks it, so an invalid config answers `pol.invalid`
3307
+ * with the same violations.
3308
+ *
3309
+ * `input` is what the operation's request carries, in the operation's own
3310
+ * terms (a password, not its length): the server derives what the policy
3311
+ * checks with the code the live operation runs, guards included. `facts`
3312
+ * states what the operation would look up at runtime, such as whether the
3313
+ * candidate matches one of the user's kept passwords.
3314
+ *
3315
+ * The decision and the names of the failed rules hold wherever the
3316
+ * operation runs. `code` and `violations` are what an API call answers; a
3317
+ * login flow shows the same rules as field errors on the password field
3318
+ * (`error.x-auth-methods#password_<rule>` in `step.error`).
3319
+ *
3320
+ * Which policy a project or release applies is not decided here: read it
3321
+ * and pass its config.
3322
+ *
3323
+ * The caller needs read access to the project in `project_id`.
3324
+ * @summary Evaluate a policy
3325
+ */
3326
+ export const evaluatePolicy = async (evaluatePolicyBody: EvaluatePolicyBody,
3327
+ params: EvaluatePolicyParams, options?: Parameters<typeof customFetch>[1]): Promise<EvaluatePolicy200> => {
3328
+
3329
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
3330
+ if (!h) return {};
3331
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
3332
+ if (Symbol.iterator in h) {
3333
+ return Object.fromEntries(
3334
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
3335
+ );
3336
+ }
3337
+ const headers: Record<string, string | readonly string[]> = {};
3338
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
3339
+ if (value !== undefined) headers[name] = value;
3340
+ }
3341
+ return headers;
3342
+ };
3343
+ return customFetch<EvaluatePolicy200>(getEvaluatePolicyUrl(params),
3344
+ {
3345
+ ...options,
3346
+ method: 'POST',
3347
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
3348
+ body: JSON.stringify(evaluatePolicyBody)
3349
+ }
3350
+ );}
3351
+
3352
+
3353
+
3267
3354
  export const getGetPolicyUrl = (policyId: string,
3268
3355
  params: GetPolicyParams,) => {
3269
3356
  const normalizedParams = new URLSearchParams();
@@ -3277,7 +3364,7 @@ export const getGetPolicyUrl = (policyId: string,
3277
3364
 
3278
3365
  const stringifiedParams = normalizedParams.toString();
3279
3366
 
3280
- 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))}`
3281
3368
  }
3282
3369
 
3283
3370
  /**
@@ -3315,7 +3402,7 @@ export const getListPolicyRevisionsUrl = (policyId: string,
3315
3402
 
3316
3403
  const stringifiedParams = normalizedParams.toString();
3317
3404
 
3318
- 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`
3319
3406
  }
3320
3407
 
3321
3408
  /**
@@ -3353,7 +3440,7 @@ export const getGetPolicyRevisionUrl = (revisionId: string,
3353
3440
 
3354
3441
  const stringifiedParams = normalizedParams.toString();
3355
3442
 
3356
- 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))}`
3357
3444
  }
3358
3445
 
3359
3446
  /**
@@ -3389,7 +3476,7 @@ export const getCreateReleaseUrl = (params: CreateReleaseParams,) => {
3389
3476
 
3390
3477
  const stringifiedParams = normalizedParams.toString();
3391
3478
 
3392
- return stringifiedParams.length > 0 ? `${getProxyPath()}/releases?${stringifiedParams}` : `${getProxyPath()}/releases`
3479
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases?${stringifiedParams}` : `${getApiBaseUrl()}/releases`
3393
3480
  }
3394
3481
 
3395
3482
  /**
@@ -3454,7 +3541,7 @@ export const getListReleasesUrl = (params: ListReleasesParams,) => {
3454
3541
 
3455
3542
  const stringifiedParams = normalizedParams.toString();
3456
3543
 
3457
- return stringifiedParams.length > 0 ? `${getProxyPath()}/releases?${stringifiedParams}` : `${getProxyPath()}/releases`
3544
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases?${stringifiedParams}` : `${getApiBaseUrl()}/releases`
3458
3545
  }
3459
3546
 
3460
3547
  /**
@@ -3496,7 +3583,7 @@ export const getBuildReleaseUrl = (params: BuildReleaseParams,) => {
3496
3583
 
3497
3584
  const stringifiedParams = normalizedParams.toString();
3498
3585
 
3499
- return stringifiedParams.length > 0 ? `${getProxyPath()}/releases/build?${stringifiedParams}` : `${getProxyPath()}/releases/build`
3586
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/releases/build?${stringifiedParams}` : `${getApiBaseUrl()}/releases/build`
3500
3587
  }
3501
3588
 
3502
3589
  /**
@@ -3575,7 +3662,7 @@ export const getGetReleaseByIdUrl = (releaseId: string,
3575
3662
 
3576
3663
  const stringifiedParams = normalizedParams.toString();
3577
3664
 
3578
- 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))}`
3579
3666
  }
3580
3667
 
3581
3668
  /**
@@ -3621,7 +3708,7 @@ export const getRevokeReleaseUrl = (releaseId: string,
3621
3708
 
3622
3709
  const stringifiedParams = normalizedParams.toString();
3623
3710
 
3624
- 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`
3625
3712
  }
3626
3713
 
3627
3714
  /**
@@ -3672,7 +3759,7 @@ export const getCreateGrantUrl = (params: CreateGrantParams,) => {
3672
3759
 
3673
3760
  const stringifiedParams = normalizedParams.toString();
3674
3761
 
3675
- return stringifiedParams.length > 0 ? `${getProxyPath()}/grants?${stringifiedParams}` : `${getProxyPath()}/grants`
3762
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/grants?${stringifiedParams}` : `${getApiBaseUrl()}/grants`
3676
3763
  }
3677
3764
 
3678
3765
  /**
@@ -3692,9 +3779,9 @@ export const getCreateGrantUrl = (params: CreateGrantParams,) => {
3692
3779
  * identifier and display.
3693
3780
  *
3694
3781
  * Accepts either a project secret (`oauth2`) or a user-bound Console
3695
- * session cookie (`nextgenSession`). Session callers are authorized as
3782
+ * session cookie (`sessionCookie`). Session callers are authorized as
3696
3783
  * the human against the target project (home may differ). Cookie-authenticated
3697
- * requests follow the scheme's CSRF rules (`nextgenSession`).
3784
+ * requests follow the scheme's CSRF rules (`sessionCookie`).
3698
3785
  * @summary Create grant
3699
3786
  */
3700
3787
  export const createGrant = async (createGrantBody: CreateGrantBody,
@@ -3737,7 +3824,7 @@ export const getQueryGrantsUrl = (params: QueryGrantsParams,) => {
3737
3824
 
3738
3825
  const stringifiedParams = normalizedParams.toString();
3739
3826
 
3740
- return stringifiedParams.length > 0 ? `${getProxyPath()}/grants/query?${stringifiedParams}` : `${getProxyPath()}/grants/query`
3827
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/grants/query?${stringifiedParams}` : `${getApiBaseUrl()}/grants/query`
3741
3828
  }
3742
3829
 
3743
3830
  /**
@@ -3755,8 +3842,8 @@ export const getQueryGrantsUrl = (params: QueryGrantsParams,) => {
3755
3842
  * the project Check may expand without those scopes.
3756
3843
  *
3757
3844
  * Accepts either a project secret (`oauth2`) or a user-bound Console
3758
- * session cookie (`nextgenSession`). Cookie-authenticated requests
3759
- * follow the scheme's CSRF rules (`nextgenSession`).
3845
+ * session cookie (`sessionCookie`). Cookie-authenticated requests
3846
+ * follow the scheme's CSRF rules (`sessionCookie`).
3760
3847
  * @summary Query grants
3761
3848
  */
3762
3849
  export const queryGrants = async (queryGrantsBody: QueryGrantsBody,
@@ -3808,7 +3895,7 @@ export const getGetGrantUrl = (id: string,
3808
3895
 
3809
3896
  const stringifiedParams = normalizedParams.toString();
3810
3897
 
3811
- 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))}`
3812
3899
  }
3813
3900
 
3814
3901
  /**
@@ -3826,8 +3913,8 @@ export const getGetGrantUrl = (id: string,
3826
3913
  * Check may expand without those scopes.
3827
3914
  *
3828
3915
  * Accepts either a project secret (`oauth2`) or a user-bound Console
3829
- * session cookie (`nextgenSession`). Cookie-authenticated requests
3830
- * follow the scheme's CSRF rules (`nextgenSession`).
3916
+ * session cookie (`sessionCookie`). Cookie-authenticated requests
3917
+ * follow the scheme's CSRF rules (`sessionCookie`).
3831
3918
  * @summary Get grant
3832
3919
  */
3833
3920
  export const getGrant = async (id: string,
@@ -3857,7 +3944,7 @@ export const getDeleteGrantUrl = (id: string,
3857
3944
 
3858
3945
  const stringifiedParams = normalizedParams.toString();
3859
3946
 
3860
- 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))}`
3861
3948
  }
3862
3949
 
3863
3950
  /**
@@ -3867,8 +3954,8 @@ export const getDeleteGrantUrl = (id: string,
3867
3954
  * revoked so the unique binding can be reused.
3868
3955
  *
3869
3956
  * Accepts either a project secret (`oauth2`) or a user-bound Console
3870
- * session cookie (`nextgenSession`). Cookie-authenticated requests
3871
- * follow the scheme's CSRF rules (`nextgenSession`).
3957
+ * session cookie (`sessionCookie`). Cookie-authenticated requests
3958
+ * follow the scheme's CSRF rules (`sessionCookie`).
3872
3959
  * @summary Revoke grant
3873
3960
  */
3874
3961
  export const deleteGrant = async (id: string,
@@ -3905,7 +3992,7 @@ export const getListEventsUrl = (params: ListEventsParams,) => {
3905
3992
 
3906
3993
  const stringifiedParams = normalizedParams.toString();
3907
3994
 
3908
- return stringifiedParams.length > 0 ? `${getProxyPath()}/events?${stringifiedParams}` : `${getProxyPath()}/events`
3995
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/events?${stringifiedParams}` : `${getApiBaseUrl()}/events`
3909
3996
  }
3910
3997
 
3911
3998
  /**
@@ -3948,7 +4035,7 @@ export const getGetEventUrl = (id: string,
3948
4035
 
3949
4036
  const stringifiedParams = normalizedParams.toString();
3950
4037
 
3951
- 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))}`
3952
4039
  }
3953
4040
 
3954
4041
  /**
@@ -3985,7 +4072,7 @@ export const getGetVariablesUrl = (params: GetVariablesParams,) => {
3985
4072
 
3986
4073
  const stringifiedParams = normalizedParams.toString();
3987
4074
 
3988
- return stringifiedParams.length > 0 ? `${getProxyPath()}/variables?${stringifiedParams}` : `${getProxyPath()}/variables`
4075
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/variables?${stringifiedParams}` : `${getApiBaseUrl()}/variables`
3989
4076
  }
3990
4077
 
3991
4078
  /**
@@ -4021,7 +4108,7 @@ export const getUpdateVariablesUrl = (params: UpdateVariablesParams,) => {
4021
4108
 
4022
4109
  const stringifiedParams = normalizedParams.toString();
4023
4110
 
4024
- return stringifiedParams.length > 0 ? `${getProxyPath()}/variables?${stringifiedParams}` : `${getProxyPath()}/variables`
4111
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/variables?${stringifiedParams}` : `${getApiBaseUrl()}/variables`
4025
4112
  }
4026
4113
 
4027
4114
  /**
@@ -4086,7 +4173,7 @@ export const getGetVariableUrl = (variableName: string,
4086
4173
 
4087
4174
  const stringifiedParams = normalizedParams.toString();
4088
4175
 
4089
- 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))}`
4090
4177
  }
4091
4178
 
4092
4179
  /**
@@ -4122,7 +4209,7 @@ export const getDeleteVariableUrl = (variableName: string,
4122
4209
 
4123
4210
  const stringifiedParams = normalizedParams.toString();
4124
4211
 
4125
- 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))}`
4126
4213
  }
4127
4214
 
4128
4215
  /**
@@ -4157,7 +4244,7 @@ export const getCreateDeploymentUrl = (params: CreateDeploymentParams,) => {
4157
4244
 
4158
4245
  const stringifiedParams = normalizedParams.toString();
4159
4246
 
4160
- return stringifiedParams.length > 0 ? `${getProxyPath()}/deployments?${stringifiedParams}` : `${getProxyPath()}/deployments`
4247
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments?${stringifiedParams}` : `${getApiBaseUrl()}/deployments`
4161
4248
  }
4162
4249
 
4163
4250
  /**
@@ -4239,7 +4326,7 @@ export const getListDeploymentsUrl = (params: ListDeploymentsParams,) => {
4239
4326
 
4240
4327
  const stringifiedParams = normalizedParams.toString();
4241
4328
 
4242
- return stringifiedParams.length > 0 ? `${getProxyPath()}/deployments?${stringifiedParams}` : `${getProxyPath()}/deployments`
4329
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/deployments?${stringifiedParams}` : `${getApiBaseUrl()}/deployments`
4243
4330
  }
4244
4331
 
4245
4332
  /**
@@ -4286,7 +4373,7 @@ export const getGetDeploymentByIdUrl = (deploymentId: string,
4286
4373
 
4287
4374
  const stringifiedParams = normalizedParams.toString();
4288
4375
 
4289
- 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))}`
4290
4377
  }
4291
4378
 
4292
4379
  /**
@@ -4325,7 +4412,7 @@ export const getRollbackDeploymentUrl = (deploymentId: string,
4325
4412
 
4326
4413
  const stringifiedParams = normalizedParams.toString();
4327
4414
 
4328
- 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`
4329
4416
  }
4330
4417
 
4331
4418
  /**
@@ -4387,7 +4474,7 @@ export const getGetDeploymentVariablesUrl = (deploymentId: string,
4387
4474
 
4388
4475
  const stringifiedParams = normalizedParams.toString();
4389
4476
 
4390
- 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`
4391
4478
  }
4392
4479
 
4393
4480
  /**