@datalayer/core 1.1.41 → 1.1.45

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 (56) hide show
  1. package/README.md +10 -121
  2. package/lib/client/auth/AuthenticationManager.d.ts +3 -3
  3. package/lib/client/auth/AuthenticationManager.js +13 -13
  4. package/lib/client/auth/strategies.d.ts +2 -2
  5. package/lib/client/auth/strategies.js +6 -6
  6. package/lib/client/base.d.ts +9 -9
  7. package/lib/client/base.js +17 -17
  8. package/lib/client/mixins/IAMMixin.js +26 -26
  9. package/lib/components/auth/Login.js +2 -2
  10. package/lib/components/billing/BillingEntitySelect.d.ts +35 -0
  11. package/lib/components/billing/{BillableAccountSelect.js → BillingEntitySelect.js} +39 -41
  12. package/lib/components/billing/index.d.ts +1 -1
  13. package/lib/components/billing/index.js +1 -1
  14. package/lib/components/checkout/StripeCheckout.js +5 -5
  15. package/lib/components/display/VisuallyHidden.d.ts +1 -1
  16. package/lib/components/display/index.d.ts +0 -1
  17. package/lib/components/display/index.js +0 -1
  18. package/lib/components/principal/Principal.js +4 -2
  19. package/lib/components/principal/PrincipalBadge.js +21 -0
  20. package/lib/components/principal/PrincipalDetailsOverlay.js +72 -37
  21. package/lib/components/principal/PrincipalSwitcherMenu.d.ts +3 -3
  22. package/lib/components/principal/PrincipalSwitcherMenu.js +133 -114
  23. package/lib/components/sharing/ShareAccessComponent.js +14 -14
  24. package/lib/config/Configuration.d.ts +13 -13
  25. package/lib/config/Configuration.js +5 -5
  26. package/lib/hooks/index.d.ts +2 -2
  27. package/lib/hooks/index.js +2 -2
  28. package/lib/hooks/useBillingEntityStore.d.ts +31 -0
  29. package/lib/hooks/useBillingEntityStore.js +53 -0
  30. package/lib/hooks/useCache.d.ts +34 -33
  31. package/lib/hooks/useCache.js +298 -282
  32. package/lib/hooks/useIAM.js +1 -1
  33. package/lib/hooks/useSelectedBillingEntity.d.ts +14 -0
  34. package/lib/hooks/{useSelectedBillableAccount.js → useSelectedBillingEntity.js} +14 -14
  35. package/lib/hooks/useSelectedPrincipal.d.ts +1 -1
  36. package/lib/hooks/useSelectedPrincipal.js +1 -1
  37. package/lib/models/UserSettings.d.ts +1 -1
  38. package/lib/models/UserSettings.js +1 -1
  39. package/lib/otel/client/OtelClient.d.ts +2 -2
  40. package/lib/otel/client/OtelClient.js +2 -2
  41. package/lib/otel/hooks/index.js +5 -5
  42. package/lib/otel/types.d.ts +1 -1
  43. package/lib/otel/views/OtelLive.js +1 -1
  44. package/lib/state/substates/CoreState.js +13 -13
  45. package/lib/state/substates/IAMState.d.ts +1 -1
  46. package/lib/state/substates/IAMState.js +14 -14
  47. package/lib/state/substates/SurveysState.d.ts +1 -1
  48. package/lib/state/substates/SurveysState.js +10 -10
  49. package/lib/views/iam/SignInSimple.js +6 -6
  50. package/package.json +4 -4
  51. package/lib/components/billing/BillableAccountSelect.d.ts +0 -35
  52. package/lib/components/display/LiveRelativeTime.d.ts +0 -1
  53. package/lib/components/display/LiveRelativeTime.js +0 -10
  54. package/lib/hooks/useBillableAccountStore.d.ts +0 -31
  55. package/lib/hooks/useBillableAccountStore.js +0 -53
  56. package/lib/hooks/useSelectedBillableAccount.d.ts +0 -14
@@ -349,9 +349,9 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
349
349
  const { requestDatalayer } = useDatalayer({ loginRoute });
350
350
  const { checkIsOrganizationMember } = useAuthorization();
351
351
  // Hook for notebook upload/creation
352
- const { isLoading: notebookUploadLoading, uploadAndSubmit: uploadNotebook, progress: notebookUploadProgress, reset: resetNotebookUpload, } = useUploadForm(`${coreStore.configuration.spacerRunUrl}/api/spacer/v1/notebooks`);
352
+ const { isLoading: notebookUploadLoading, uploadAndSubmit: uploadNotebook, progress: notebookUploadProgress, reset: resetNotebookUpload, } = useUploadForm(`${coreStore.configuration.spacerUrl}/api/spacer/v1/notebooks`);
353
353
  // Hook for document upload/creation
354
- const { isLoading: documentUploadLoading, uploadAndSubmit: uploadDocument, progress: documentUploadProgress, reset: resetDocumentUpload, } = useUploadForm(`${coreStore.configuration.spacerRunUrl}/api/spacer/v1/lexicals`);
354
+ const { isLoading: documentUploadLoading, uploadAndSubmit: uploadDocument, progress: documentUploadProgress, reset: resetDocumentUpload, } = useUploadForm(`${coreStore.configuration.spacerUrl}/api/spacer/v1/lexicals`);
355
355
  // ============================================================================
356
356
  // Transformation Functions (kept from original useCache)
357
357
  // Note: These functions use 'any' because they handle dynamic API responses
@@ -420,19 +420,23 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
420
420
  codeStudent: studentItem.code_student_t ?? studentItem.codeStudent,
421
421
  completed,
422
422
  pass,
423
- nbgrades: studentItem.nbgrades ??
424
- studentItem.grades ??
425
- [],
423
+ nbgrades: studentItem.nbgrades ?? studentItem.grades ?? [],
426
424
  nbgradesTotalPoints: studentItem.nbgrades_total_points_f ??
427
425
  studentItem.nbgradesTotalPoints ??
428
426
  studentItem.total_points_f ??
429
- ((studentItem.item_type_s ?? studentItem.itemType ?? studentItem.type_s ?? studentItem.type) === 'assignment'
427
+ ((studentItem.item_type_s ??
428
+ studentItem.itemType ??
429
+ studentItem.type_s ??
430
+ studentItem.type) === 'assignment'
430
431
  ? 0
431
432
  : undefined),
432
433
  nbgradesTotalScore: studentItem.nbgrades_total_score_f ??
433
434
  studentItem.nbgradesTotalScore ??
434
435
  studentItem.total_score_f ??
435
- ((studentItem.item_type_s ?? studentItem.itemType ?? studentItem.type_s ?? studentItem.type) === 'assignment'
436
+ ((studentItem.item_type_s ??
437
+ studentItem.itemType ??
438
+ studentItem.type_s ??
439
+ studentItem.type) === 'assignment'
436
440
  ? 0
437
441
  : undefined),
438
442
  };
@@ -869,9 +873,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
869
873
  let itemIds = new Array();
870
874
  const rawItemUids = raw_course.item_uids_s;
871
875
  if (Array.isArray(rawItemUids)) {
872
- itemIds = Array.from(new Set(rawItemUids
873
- .map(uid => String(uid || '').trim())
874
- .filter(Boolean)));
876
+ itemIds = Array.from(new Set(rawItemUids.map(uid => String(uid || '').trim()).filter(Boolean)));
875
877
  }
876
878
  else if (typeof rawItemUids === 'string' && rawItemUids !== '()') {
877
879
  itemIds = Array.from(new Set(rawItemUids
@@ -921,7 +923,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
921
923
  return useMutation({
922
924
  mutationFn: async ({ handle, password, }) => {
923
925
  return requestDatalayer({
924
- url: `${configuration.iamRunUrl}/api/iam/v1/login`,
926
+ url: `${configuration.iamUrl}/api/iam/v1/login`,
925
927
  method: 'POST',
926
928
  body: { handle, password },
927
929
  });
@@ -948,7 +950,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
948
950
  return useMutation({
949
951
  mutationFn: async () => {
950
952
  return requestDatalayer({
951
- url: `${configuration.iamRunUrl}/api/iam/v1/logout`,
953
+ url: `${configuration.iamUrl}/api/iam/v1/logout`,
952
954
  method: 'GET',
953
955
  });
954
956
  },
@@ -970,7 +972,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
970
972
  queryKey: queryKeys.auth.me(),
971
973
  queryFn: async () => {
972
974
  const resp = await requestDatalayer({
973
- url: `${configuration.iamRunUrl}/api/iam/v1/me`,
975
+ url: `${configuration.iamUrl}/api/iam/v1/me`,
974
976
  method: 'GET',
975
977
  token,
976
978
  });
@@ -989,7 +991,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
989
991
  return useMutation({
990
992
  mutationFn: async ({ email, firstName, lastName, }) => {
991
993
  return requestDatalayer({
992
- url: `${configuration.iamRunUrl}/api/iam/v1/me`,
994
+ url: `${configuration.iamUrl}/api/iam/v1/me`,
993
995
  method: 'PUT',
994
996
  body: { email, firstName, lastName },
995
997
  });
@@ -1007,7 +1009,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1007
1009
  queryKey: queryKeys.auth.whoami(),
1008
1010
  queryFn: async () => {
1009
1011
  return requestDatalayer({
1010
- url: `${configuration.iamRunUrl}/api/iam/v1/whoami`,
1012
+ url: `${configuration.iamUrl}/api/iam/v1/whoami`,
1011
1013
  method: 'GET',
1012
1014
  });
1013
1015
  },
@@ -1030,7 +1032,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1030
1032
  queryKey: queryKeys.users.detail(userId),
1031
1033
  queryFn: async () => {
1032
1034
  const resp = await requestDatalayer({
1033
- url: `${configuration.iamRunUrl}/api/iam/v1/users/${userId}`,
1035
+ url: `${configuration.iamUrl}/api/iam/v1/users/${userId}`,
1034
1036
  method: 'GET',
1035
1037
  });
1036
1038
  if (resp.success && resp.user) {
@@ -1058,7 +1060,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1058
1060
  // Implementation depends on your API
1059
1061
  // For now, using search as workaround
1060
1062
  const resp = await requestDatalayer({
1061
- url: `${configuration.iamRunUrl}/api/iam/v1/users/search`,
1063
+ url: `${configuration.iamUrl}/api/iam/v1/users/search`,
1062
1064
  method: 'POST',
1063
1065
  body: { namingPattern: handle },
1064
1066
  });
@@ -1090,7 +1092,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1090
1092
  return null;
1091
1093
  }
1092
1094
  const resp = await requestDatalayer({
1093
- url: `${configuration.iamRunUrl}/api/iam/v1/users/public/${encodeURIComponent(normalizedHandle)}`,
1095
+ url: `${configuration.iamUrl}/api/iam/v1/users/public/${encodeURIComponent(normalizedHandle)}`,
1094
1096
  method: 'GET',
1095
1097
  });
1096
1098
  if (resp.success) {
@@ -1126,7 +1128,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1126
1128
  queryKey: queryKeys.users.search(namingPattern),
1127
1129
  queryFn: async () => {
1128
1130
  const resp = await requestDatalayer({
1129
- url: `${configuration.iamRunUrl}/api/iam/v1/users/search`,
1131
+ url: `${configuration.iamUrl}/api/iam/v1/users/search`,
1130
1132
  method: 'POST',
1131
1133
  body: { namingPattern },
1132
1134
  });
@@ -1163,7 +1165,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1163
1165
  return [];
1164
1166
  }
1165
1167
  const resp = await requestDatalayer({
1166
- url: `${configuration.iamRunUrl}/api/iam/v1/users/bulk`,
1168
+ url: `${configuration.iamUrl}/api/iam/v1/users/bulk`,
1167
1169
  method: 'POST',
1168
1170
  body: { userIds: normalizedUserIds },
1169
1171
  });
@@ -1193,7 +1195,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1193
1195
  return useMutation({
1194
1196
  mutationFn: async (onboarding) => {
1195
1197
  return requestDatalayer({
1196
- url: `${configuration.iamRunUrl}/api/iam/v1/onboardings`,
1198
+ url: `${configuration.iamUrl}/api/iam/v1/onboardings`,
1197
1199
  method: 'PUT',
1198
1200
  body: { onboarding },
1199
1201
  });
@@ -1210,10 +1212,10 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1210
1212
  return useMutation({
1211
1213
  mutationFn: async ({ userId, settings, }) => {
1212
1214
  return requestDatalayer({
1213
- url: `${configuration.iamRunUrl}/api/iam/v1/users/${userId}/settings`,
1215
+ url: `${configuration.iamUrl}/api/iam/v1/users/${userId}/settings`,
1214
1216
  method: 'PUT',
1215
1217
  body: {
1216
- aiagents_url_s: settings.aiAgentsUrl,
1218
+ aiAgents_url_s: settings.aiAgentsUrl,
1217
1219
  can_invite_b: settings.canInvite || false,
1218
1220
  },
1219
1221
  });
@@ -1236,7 +1238,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1236
1238
  queryKey: queryKeys.organizations.detail(organizationId),
1237
1239
  queryFn: async () => {
1238
1240
  const resp = await requestDatalayer({
1239
- url: `${configuration.iamRunUrl}/api/iam/v1/organizations/${organizationId}`,
1241
+ url: `${configuration.iamUrl}/api/iam/v1/organizations/${organizationId}`,
1240
1242
  method: 'GET',
1241
1243
  });
1242
1244
  if (resp.success && resp.organization) {
@@ -1260,7 +1262,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1260
1262
  queryFn: async () => {
1261
1263
  // Fetch via account endpoint
1262
1264
  const resp = await requestDatalayer({
1263
- url: `${configuration.iamRunUrl}/api/iam/v1/accounts/${handle}`,
1265
+ url: `${configuration.iamUrl}/api/iam/v1/accounts/${handle}`,
1264
1266
  method: 'GET',
1265
1267
  });
1266
1268
  if (resp.success && resp.organization) {
@@ -1287,7 +1289,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1287
1289
  return null;
1288
1290
  }
1289
1291
  const resp = await requestDatalayer({
1290
- url: `${configuration.iamRunUrl}/api/iam/v1/organizations/public/${encodeURIComponent(normalizedHandle)}`,
1292
+ url: `${configuration.iamUrl}/api/iam/v1/organizations/public/${encodeURIComponent(normalizedHandle)}`,
1291
1293
  method: 'GET',
1292
1294
  });
1293
1295
  if (resp.success) {
@@ -1307,7 +1309,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1307
1309
  queryKey: queryKeys.organizations.userOrgs(),
1308
1310
  queryFn: async () => {
1309
1311
  const resp = await requestDatalayer({
1310
- url: `${configuration.iamRunUrl}/api/iam/v1/organizations`,
1312
+ url: `${configuration.iamUrl}/api/iam/v1/organizations`,
1311
1313
  method: 'GET',
1312
1314
  });
1313
1315
  if (resp.success && resp.organizations) {
@@ -1333,7 +1335,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1333
1335
  return useMutation({
1334
1336
  mutationFn: async (organization) => {
1335
1337
  return requestDatalayer({
1336
- url: `${configuration.iamRunUrl}/api/iam/v1/organizations`,
1338
+ url: `${configuration.iamUrl}/api/iam/v1/organizations`,
1337
1339
  method: 'POST',
1338
1340
  body: {
1339
1341
  handle: organization.handle,
@@ -1362,7 +1364,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1362
1364
  return useMutation({
1363
1365
  mutationFn: async (organization) => {
1364
1366
  return requestDatalayer({
1365
- url: `${configuration.iamRunUrl}/api/iam/v1/organizations/${organization.id}`,
1367
+ url: `${configuration.iamUrl}/api/iam/v1/organizations/${organization.id}`,
1366
1368
  method: 'PUT',
1367
1369
  body: {
1368
1370
  name: organization.name,
@@ -1394,7 +1396,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1394
1396
  queryKey: queryKeys.teams.detail(teamId),
1395
1397
  queryFn: async () => {
1396
1398
  const resp = await requestDatalayer({
1397
- url: `${configuration.iamRunUrl}/api/iam/v1/teams/${teamId}`,
1399
+ url: `${configuration.iamUrl}/api/iam/v1/teams/${teamId}`,
1398
1400
  method: 'GET',
1399
1401
  });
1400
1402
  if (resp.success && resp.team) {
@@ -1416,7 +1418,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1416
1418
  queryKey: queryKeys.teams.byOrganization(organizationId),
1417
1419
  queryFn: async () => {
1418
1420
  const resp = await requestDatalayer({
1419
- url: `${configuration.iamRunUrl}/api/iam/v1/organizations/${organizationId}/teams`,
1421
+ url: `${configuration.iamUrl}/api/iam/v1/organizations/${organizationId}/teams`,
1420
1422
  method: 'GET',
1421
1423
  });
1422
1424
  if (resp.success && resp.teams) {
@@ -1442,7 +1444,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1442
1444
  return useMutation({
1443
1445
  mutationFn: async ({ team, organization, }) => {
1444
1446
  return requestDatalayer({
1445
- url: `${configuration.iamRunUrl}/api/iam/v1/teams`,
1447
+ url: `${configuration.iamUrl}/api/iam/v1/teams`,
1446
1448
  method: 'POST',
1447
1449
  body: {
1448
1450
  handle: team.handle,
@@ -1472,7 +1474,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1472
1474
  return useMutation({
1473
1475
  mutationFn: async (team) => {
1474
1476
  return requestDatalayer({
1475
- url: `${configuration.iamRunUrl}/api/iam/v1/teams/${team.id}`,
1477
+ url: `${configuration.iamUrl}/api/iam/v1/teams/${team.id}`,
1476
1478
  method: 'PUT',
1477
1479
  body: {
1478
1480
  name: team.name,
@@ -1504,7 +1506,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1504
1506
  queryFn: async () => {
1505
1507
  // Note: This might need organization context
1506
1508
  const resp = await requestDatalayer({
1507
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${spaceId}`,
1509
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${spaceId}`,
1508
1510
  method: 'GET',
1509
1511
  });
1510
1512
  if (resp.success && resp.space) {
@@ -1529,7 +1531,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1529
1531
  queryKey: queryKeys.spaces.detail(spaceId),
1530
1532
  queryFn: async () => {
1531
1533
  const resp = await requestDatalayer({
1532
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${spaceId}/organizations/${organizationId}`,
1534
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${spaceId}/organizations/${organizationId}`,
1533
1535
  method: 'GET',
1534
1536
  });
1535
1537
  if (resp.success && resp.space) {
@@ -1552,7 +1554,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1552
1554
  queryKey: queryKeys.spaces.byOrganization(organizationId),
1553
1555
  queryFn: async () => {
1554
1556
  const resp = await requestDatalayer({
1555
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/organizations/${organizationId}`,
1557
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/organizations/${organizationId}`,
1556
1558
  method: 'GET',
1557
1559
  });
1558
1560
  if (resp.success && resp.spaces) {
@@ -1589,7 +1591,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1589
1591
  }
1590
1592
  const query = params.toString();
1591
1593
  const resp = await requestDatalayer({
1592
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/users/me${query ? `?${query}` : ''}`,
1594
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/users/me${query ? `?${query}` : ''}`,
1593
1595
  method: 'GET',
1594
1596
  });
1595
1597
  if (resp.success && resp.spaces) {
@@ -1617,7 +1619,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1617
1619
  ? space.seedSpace?.id
1618
1620
  : undefined;
1619
1621
  const resp = await requestDatalayer({
1620
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces`,
1622
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces`,
1621
1623
  method: 'POST',
1622
1624
  body: {
1623
1625
  name: space.name,
@@ -1665,7 +1667,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1665
1667
  return requestDatalayer({
1666
1668
  // Use the canonical space update route. This keeps project runtime
1667
1669
  // assignment cleanup resilient when stale runtime links must be cleared.
1668
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${id}`,
1670
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${id}`,
1669
1671
  method: 'PUT',
1670
1672
  body: {
1671
1673
  name,
@@ -1694,7 +1696,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1694
1696
  return useMutation({
1695
1697
  mutationFn: async (spaceUid) => {
1696
1698
  return requestDatalayer({
1697
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${spaceUid}`,
1699
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${spaceUid}`,
1698
1700
  method: 'DELETE',
1699
1701
  });
1700
1702
  },
@@ -1722,7 +1724,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1722
1724
  queryKey: queryKeys.notebooks.detail(notebookId),
1723
1725
  queryFn: async () => {
1724
1726
  const resp = await requestDatalayer({
1725
- url: `${configuration.spacerRunUrl}/api/spacer/v1/notebooks/${notebookId}`,
1727
+ url: `${configuration.spacerUrl}/api/spacer/v1/notebooks/${notebookId}`,
1726
1728
  method: 'GET',
1727
1729
  });
1728
1730
  if (resp.success && resp.notebook) {
@@ -1745,7 +1747,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1745
1747
  queryKey: queryKeys.notebooks.bySpace(spaceId),
1746
1748
  queryFn: async () => {
1747
1749
  const resp = await requestDatalayer({
1748
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${spaceId}/items/types/notebook`,
1750
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${spaceId}/items/types/notebook`,
1749
1751
  method: 'GET',
1750
1752
  });
1751
1753
  if (resp.success && resp.items) {
@@ -1803,7 +1805,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1803
1805
  return useMutation({
1804
1806
  mutationFn: async ({ id, name, description, }) => {
1805
1807
  return requestDatalayer({
1806
- url: `${configuration.spacerRunUrl}/api/spacer/v1/notebooks/${id}`,
1808
+ url: `${configuration.spacerUrl}/api/spacer/v1/notebooks/${id}`,
1807
1809
  method: 'PUT',
1808
1810
  body: { name, description },
1809
1811
  });
@@ -1829,7 +1831,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1829
1831
  return useMutation({
1830
1832
  mutationFn: async ({ notebookId, nbformat, }) => {
1831
1833
  return requestDatalayer({
1832
- url: `${configuration.spacerRunUrl}/api/spacer/v1/notebooks/${notebookId}/model`,
1834
+ url: `${configuration.spacerUrl}/api/spacer/v1/notebooks/${notebookId}/model`,
1833
1835
  method: 'PUT',
1834
1836
  body: { nbformat },
1835
1837
  });
@@ -1854,7 +1856,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1854
1856
  return useMutation({
1855
1857
  mutationFn: async (notebookId) => {
1856
1858
  return requestDatalayer({
1857
- url: `${configuration.spacerRunUrl}/api/spacer/v1/notebooks/${notebookId}/clone`,
1859
+ url: `${configuration.spacerUrl}/api/spacer/v1/notebooks/${notebookId}/clone`,
1858
1860
  method: 'POST',
1859
1861
  });
1860
1862
  },
@@ -1884,7 +1886,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1884
1886
  queryKey: queryKeys.documents.detail(documentId),
1885
1887
  queryFn: async () => {
1886
1888
  const resp = await requestDatalayer({
1887
- url: `${configuration.spacerRunUrl}/api/spacer/v1/lexicals/${documentId}`,
1889
+ url: `${configuration.spacerUrl}/api/spacer/v1/lexicals/${documentId}`,
1888
1890
  method: 'GET',
1889
1891
  });
1890
1892
  if (resp.success && resp.document) {
@@ -1910,7 +1912,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1910
1912
  return [];
1911
1913
  }
1912
1914
  const resp = await requestDatalayer({
1913
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${spaceId}/items/types/document`,
1915
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${spaceId}/items/types/document`,
1914
1916
  method: 'GET',
1915
1917
  });
1916
1918
  if (resp.success && resp.items) {
@@ -1934,7 +1936,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1934
1936
  return useMutation({
1935
1937
  mutationFn: async ({ id, name, description, }) => {
1936
1938
  return requestDatalayer({
1937
- url: `${configuration.spacerRunUrl}/api/spacer/v1/lexicals/${id}`,
1939
+ url: `${configuration.spacerUrl}/api/spacer/v1/lexicals/${id}`,
1938
1940
  method: 'PUT',
1939
1941
  body: { name, description },
1940
1942
  });
@@ -1960,7 +1962,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
1960
1962
  return useMutation({
1961
1963
  mutationFn: async ({ id, model }) => {
1962
1964
  return requestDatalayer({
1963
- url: `${configuration.spacerRunUrl}/api/spacer/v1/lexicals/${id}/model`,
1965
+ url: `${configuration.spacerUrl}/api/spacer/v1/lexicals/${id}/model`,
1964
1966
  method: 'PUT',
1965
1967
  body: { model },
1966
1968
  });
@@ -2014,7 +2016,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2014
2016
  return useMutation({
2015
2017
  mutationFn: async (documentId) => {
2016
2018
  return requestDatalayer({
2017
- url: `${configuration.spacerRunUrl}/api/spacer/v1/lexicals/${documentId}/clone`,
2019
+ url: `${configuration.spacerUrl}/api/spacer/v1/lexicals/${documentId}/clone`,
2018
2020
  method: 'POST',
2019
2021
  });
2020
2022
  },
@@ -2044,7 +2046,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2044
2046
  queryKey: queryKeys.pages.detail(pageId),
2045
2047
  queryFn: async () => {
2046
2048
  const resp = await requestDatalayer({
2047
- url: `${configuration.libraryRunUrl}/api/library/v1/pages/${pageId}`,
2049
+ url: `${configuration.libraryUrl}/api/library/v1/pages/${pageId}`,
2048
2050
  method: 'GET',
2049
2051
  });
2050
2052
  if (resp.success && resp.page) {
@@ -2076,7 +2078,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2076
2078
  }
2077
2079
  const query = params.toString();
2078
2080
  const resp = await requestDatalayer({
2079
- url: `${configuration.libraryRunUrl}/api/library/v1/pages${query ? `?${query}` : ''}`,
2081
+ url: `${configuration.libraryUrl}/api/library/v1/pages${query ? `?${query}` : ''}`,
2080
2082
  method: 'GET',
2081
2083
  });
2082
2084
  if (resp.success && resp.pages) {
@@ -2103,7 +2105,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2103
2105
  return useMutation({
2104
2106
  mutationFn: async (page) => {
2105
2107
  return requestDatalayer({
2106
- url: `${configuration.libraryRunUrl}/api/library/v1/pages`,
2108
+ url: `${configuration.libraryUrl}/api/library/v1/pages`,
2107
2109
  method: 'POST',
2108
2110
  body: { ...page },
2109
2111
  });
@@ -2130,7 +2132,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2130
2132
  return useMutation({
2131
2133
  mutationFn: async (page) => {
2132
2134
  return requestDatalayer({
2133
- url: `${configuration.libraryRunUrl}/api/library/v1/pages/${page.id}`,
2135
+ url: `${configuration.libraryUrl}/api/library/v1/pages/${page.id}`,
2134
2136
  method: 'PUT',
2135
2137
  body: {
2136
2138
  name: page.name,
@@ -2159,7 +2161,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2159
2161
  return useMutation({
2160
2162
  mutationFn: async (pageId) => {
2161
2163
  return requestDatalayer({
2162
- url: `${configuration.libraryRunUrl}/api/library/v1/pages/${pageId}`,
2164
+ url: `${configuration.libraryUrl}/api/library/v1/pages/${pageId}`,
2163
2165
  method: 'DELETE',
2164
2166
  });
2165
2167
  },
@@ -2187,7 +2189,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2187
2189
  ],
2188
2190
  queryFn: async () => {
2189
2191
  const resp = await requestDatalayer({
2190
- url: withAccountUidQuery(`${configuration.iamRunUrl}/api/iam/v1/datasources`, principalUid, principalKind),
2192
+ url: withAccountUidQuery(`${configuration.iamUrl}/api/iam/v1/datasources`, principalUid, principalKind),
2191
2193
  method: 'GET',
2192
2194
  });
2193
2195
  if (resp.success && resp.datasources) {
@@ -2216,7 +2218,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2216
2218
  return useMutation({
2217
2219
  mutationFn: async (datasource) => {
2218
2220
  return requestDatalayer({
2219
- url: withAccountUidQuery(`${configuration.iamRunUrl}/api/iam/v1/datasources`, principalUid, principalKind),
2221
+ url: withAccountUidQuery(`${configuration.iamUrl}/api/iam/v1/datasources`, principalUid, principalKind),
2220
2222
  method: 'POST',
2221
2223
  body: { ...datasource },
2222
2224
  });
@@ -2252,7 +2254,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2252
2254
  ],
2253
2255
  queryFn: async () => {
2254
2256
  const resp = await requestDatalayer({
2255
- url: withAccountUidQuery(`${configuration.iamRunUrl}/api/iam/v1/secrets`, principalUid, principalKind),
2257
+ url: withAccountUidQuery(`${configuration.iamUrl}/api/iam/v1/secrets`, principalUid, principalKind),
2256
2258
  method: 'GET',
2257
2259
  });
2258
2260
  if (resp.success && resp.secrets) {
@@ -2276,7 +2278,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2276
2278
  return useMutation({
2277
2279
  mutationFn: async (secret) => {
2278
2280
  return requestDatalayer({
2279
- url: withAccountUidQuery(`${configuration.iamRunUrl}/api/iam/v1/secrets`, principalUid, principalKind),
2281
+ url: withAccountUidQuery(`${configuration.iamUrl}/api/iam/v1/secrets`, principalUid, principalKind),
2280
2282
  method: 'POST',
2281
2283
  body: { ...secret },
2282
2284
  });
@@ -2301,7 +2303,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2301
2303
  return useMutation({
2302
2304
  mutationFn: async (secretId) => {
2303
2305
  return requestDatalayer({
2304
- url: withAccountUidQuery(`${configuration.iamRunUrl}/api/iam/v1/secrets/${secretId}`, principalUid, principalKind),
2306
+ url: withAccountUidQuery(`${configuration.iamUrl}/api/iam/v1/secrets/${secretId}`, principalUid, principalKind),
2305
2307
  method: 'DELETE',
2306
2308
  });
2307
2309
  },
@@ -2321,7 +2323,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2321
2323
  queryKey: queryKeys.tokens.all(),
2322
2324
  queryFn: async () => {
2323
2325
  const resp = await requestDatalayer({
2324
- url: `${configuration.iamRunUrl}/api/iam/v1/api-keys`,
2326
+ url: `${configuration.iamUrl}/api/iam/v1/api-keys`,
2325
2327
  method: 'GET',
2326
2328
  });
2327
2329
  const tokenItems = asArray(resp?.apiKeys ?? resp?.api_keys ?? resp?.tokens);
@@ -2350,7 +2352,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2350
2352
  return useMutation({
2351
2353
  mutationFn: async (token) => {
2352
2354
  const resp = await requestDatalayer({
2353
- url: `${configuration.iamRunUrl}/api/iam/v1/api-keys`,
2355
+ url: `${configuration.iamUrl}/api/iam/v1/api-keys`,
2354
2356
  method: 'POST',
2355
2357
  body: {
2356
2358
  ...token,
@@ -2383,7 +2385,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2383
2385
  queryKey: queryKeys.contacts.detail(contactId),
2384
2386
  queryFn: async () => {
2385
2387
  const resp = await requestDatalayer({
2386
- url: `${configuration.growthRunUrl}/api/growth/v1/contacts/${contactId}`,
2388
+ url: `${configuration.growthUrl}/api/growth/v1/contacts/${contactId}`,
2387
2389
  method: 'GET',
2388
2390
  });
2389
2391
  if (resp.success && resp.contact) {
@@ -2407,7 +2409,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2407
2409
  queryKey: queryKeys.contacts.search(query),
2408
2410
  queryFn: async () => {
2409
2411
  const resp = await requestDatalayer({
2410
- url: `${configuration.growthRunUrl}/api/growth/v1/contacts/search`,
2412
+ url: `${configuration.growthUrl}/api/growth/v1/contacts/search`,
2411
2413
  method: 'POST',
2412
2414
  body: { query },
2413
2415
  });
@@ -2437,7 +2439,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2437
2439
  return useMutation({
2438
2440
  mutationFn: async (contact) => {
2439
2441
  return requestDatalayer({
2440
- url: `${configuration.growthRunUrl}/api/growth/v1/contacts`,
2442
+ url: `${configuration.growthUrl}/api/growth/v1/contacts`,
2441
2443
  method: 'POST',
2442
2444
  body: { contact },
2443
2445
  });
@@ -2464,7 +2466,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2464
2466
  return useMutation({
2465
2467
  mutationFn: async ({ contactId, contact, }) => {
2466
2468
  return requestDatalayer({
2467
- url: `${configuration.growthRunUrl}/api/growth/v1/contacts/${contactId}`,
2469
+ url: `${configuration.growthUrl}/api/growth/v1/contacts/${contactId}`,
2468
2470
  method: 'PUT',
2469
2471
  body: { contact },
2470
2472
  });
@@ -2488,7 +2490,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2488
2490
  return useMutation({
2489
2491
  mutationFn: async (contactId) => {
2490
2492
  return requestDatalayer({
2491
- url: `${configuration.growthRunUrl}/api/growth/v1/contacts/${contactId}`,
2493
+ url: `${configuration.growthUrl}/api/growth/v1/contacts/${contactId}`,
2492
2494
  method: 'DELETE',
2493
2495
  });
2494
2496
  },
@@ -2514,7 +2516,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2514
2516
  return useMutation({
2515
2517
  mutationFn: async (itemId) => {
2516
2518
  return requestDatalayer({
2517
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/items/${itemId}`,
2519
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/items/${itemId}`,
2518
2520
  method: 'DELETE',
2519
2521
  });
2520
2522
  },
@@ -2571,7 +2573,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2571
2573
  ],
2572
2574
  queryFn: async () => {
2573
2575
  const resp = await requestDatalayer({
2574
- url: withAccountUidQuery(`${configuration.iamRunUrl}/api/iam/v1/datasources/${datasourceId}`, principalUid, principalKind),
2576
+ url: withAccountUidQuery(`${configuration.iamUrl}/api/iam/v1/datasources/${datasourceId}`, principalUid, principalKind),
2575
2577
  method: 'GET',
2576
2578
  });
2577
2579
  if (resp.success && resp.datasource) {
@@ -2592,7 +2594,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2592
2594
  return useMutation({
2593
2595
  mutationFn: async (datasource) => {
2594
2596
  return requestDatalayer({
2595
- url: withAccountUidQuery(`${configuration.iamRunUrl}/api/iam/v1/datasources/${datasource.id}`, principalUid, principalKind),
2597
+ url: withAccountUidQuery(`${configuration.iamUrl}/api/iam/v1/datasources/${datasource.id}`, principalUid, principalKind),
2596
2598
  method: 'PUT',
2597
2599
  body: { ...datasource },
2598
2600
  });
@@ -2624,7 +2626,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2624
2626
  ],
2625
2627
  queryFn: async () => {
2626
2628
  const resp = await requestDatalayer({
2627
- url: withAccountUidQuery(`${configuration.iamRunUrl}/api/iam/v1/secrets/${secretId}`, principalUid, principalKind),
2629
+ url: withAccountUidQuery(`${configuration.iamUrl}/api/iam/v1/secrets/${secretId}`, principalUid, principalKind),
2628
2630
  method: 'GET',
2629
2631
  });
2630
2632
  if (resp.success && resp.secret) {
@@ -2648,7 +2650,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2648
2650
  return useMutation({
2649
2651
  mutationFn: async (secret) => {
2650
2652
  return requestDatalayer({
2651
- url: withAccountUidQuery(`${configuration.iamRunUrl}/api/iam/v1/secrets/${secret.id}`, principalUid, principalKind),
2653
+ url: withAccountUidQuery(`${configuration.iamUrl}/api/iam/v1/secrets/${secret.id}`, principalUid, principalKind),
2652
2654
  method: 'PUT',
2653
2655
  body: { ...secret },
2654
2656
  });
@@ -2672,7 +2674,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2672
2674
  queryKey: queryKeys.tokens.detail(tokenId),
2673
2675
  queryFn: async () => {
2674
2676
  const resp = await requestDatalayer({
2675
- url: `${configuration.iamRunUrl}/api/iam/v1/api-keys/${tokenId}`,
2677
+ url: `${configuration.iamUrl}/api/iam/v1/api-keys/${tokenId}`,
2676
2678
  method: 'GET',
2677
2679
  });
2678
2680
  const tokenPayload = resp?.apiKey ?? resp?.api_key ?? resp?.token;
@@ -2692,7 +2694,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2692
2694
  return useMutation({
2693
2695
  mutationFn: async (token) => {
2694
2696
  return requestDatalayer({
2695
- url: `${configuration.iamRunUrl}/api/iam/v1/api-keys/${token.id}`,
2697
+ url: `${configuration.iamUrl}/api/iam/v1/api-keys/${token.id}`,
2696
2698
  method: 'PUT',
2697
2699
  body: { ...token },
2698
2700
  });
@@ -2716,7 +2718,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2716
2718
  return useMutation({
2717
2719
  mutationFn: async (tokenId) => {
2718
2720
  return requestDatalayer({
2719
- url: `${configuration.iamRunUrl}/api/iam/v1/api-keys/${tokenId}`,
2721
+ url: `${configuration.iamUrl}/api/iam/v1/api-keys/${tokenId}`,
2720
2722
  method: 'DELETE',
2721
2723
  });
2722
2724
  },
@@ -2736,7 +2738,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2736
2738
  queryKey: queryKeys.contacts.byHandle(handle),
2737
2739
  queryFn: async () => {
2738
2740
  const resp = await requestDatalayer({
2739
- url: `${configuration.growthRunUrl}/api/growth/v1/contacts/handle/${handle}`,
2741
+ url: `${configuration.growthUrl}/api/growth/v1/contacts/handle/${handle}`,
2740
2742
  method: 'GET',
2741
2743
  });
2742
2744
  if (resp.success && resp.contact) {
@@ -2760,7 +2762,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2760
2762
  queryKey: queryKeys.teams.byHandle(handle),
2761
2763
  queryFn: async () => {
2762
2764
  const resp = await requestDatalayer({
2763
- url: `${configuration.iamRunUrl}/api/iam/v1/teams/handle/${handle}`,
2765
+ url: `${configuration.iamUrl}/api/iam/v1/teams/handle/${handle}`,
2764
2766
  method: 'GET',
2765
2767
  });
2766
2768
  if (resp.success && resp.team) {
@@ -2784,7 +2786,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2784
2786
  queryKey: queryKeys.spaces.orgSpaceByHandle(organizationId, handle),
2785
2787
  queryFn: async () => {
2786
2788
  const resp = await requestDatalayer({
2787
- url: `${configuration.spacerRunUrl}/api/spacer/v1/organizations/${organizationId}/spaces/handle/${handle}`,
2789
+ url: `${configuration.spacerUrl}/api/spacer/v1/organizations/${organizationId}/spaces/handle/${handle}`,
2788
2790
  method: 'GET',
2789
2791
  });
2790
2792
  if (resp.success && resp.space) {
@@ -2811,7 +2813,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2811
2813
  queryKey: queryKeys.spaces.detail(spaceId),
2812
2814
  queryFn: async () => {
2813
2815
  const resp = await requestDatalayer({
2814
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${spaceId}`,
2816
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${spaceId}`,
2815
2817
  method: 'GET',
2816
2818
  });
2817
2819
  if (resp.success && resp.space) {
@@ -2838,7 +2840,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2838
2840
  }
2839
2841
  // If not in cache, fetch all user spaces which will populate it
2840
2842
  const resp = await requestDatalayer({
2841
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/users/me`,
2843
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/users/me`,
2842
2844
  method: 'GET',
2843
2845
  });
2844
2846
  if (resp.success && resp.spaces) {
@@ -2871,7 +2873,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2871
2873
  return useMutation({
2872
2874
  mutationFn: async ({ organizationId, spaceId, updates, }) => {
2873
2875
  return requestDatalayer({
2874
- url: `${configuration.spacerRunUrl}/api/spacer/v1/organizations/${organizationId}/spaces/${spaceId}`,
2876
+ url: `${configuration.spacerUrl}/api/spacer/v1/organizations/${organizationId}/spaces/${spaceId}`,
2875
2877
  method: 'PUT',
2876
2878
  body: updates,
2877
2879
  });
@@ -2896,7 +2898,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2896
2898
  return useMutation({
2897
2899
  mutationFn: async (userId) => {
2898
2900
  return requestDatalayer({
2899
- url: `${configuration.iamRunUrl}/api/iam/v1/users/${userId}`,
2901
+ url: `${configuration.iamUrl}/api/iam/v1/users/${userId}`,
2900
2902
  method: 'GET',
2901
2903
  });
2902
2904
  },
@@ -2922,7 +2924,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2922
2924
  queryKey: [...queryKeys.users.detail(userId), 'credits'],
2923
2925
  queryFn: async () => {
2924
2926
  const resp = await requestDatalayer({
2925
- url: `${configuration.iamRunUrl}/api/iam/v1/usage/credits/users/${userId}`,
2927
+ url: `${configuration.iamUrl}/api/iam/v1/usage/credits/users/${userId}`,
2926
2928
  method: 'GET',
2927
2929
  });
2928
2930
  if (resp.success) {
@@ -2941,7 +2943,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2941
2943
  return useMutation({
2942
2944
  mutationFn: async ({ userId, credits, brand, }) => {
2943
2945
  return requestDatalayer({
2944
- url: `${configuration.iamRunUrl}/api/iam/v1/usage/credits/users/${userId}`,
2946
+ url: `${configuration.iamUrl}/api/iam/v1/usage/credits/users/${userId}`,
2945
2947
  method: 'PUT',
2946
2948
  body: { credits, brand },
2947
2949
  });
@@ -2960,7 +2962,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2960
2962
  return useMutation({
2961
2963
  mutationFn: async ({ organizationId, userId, }) => {
2962
2964
  return requestDatalayer({
2963
- url: `${configuration.iamRunUrl}/api/iam/v1/organizations/${organizationId}/members/${userId}`,
2965
+ url: `${configuration.iamUrl}/api/iam/v1/organizations/${organizationId}/members/${userId}`,
2964
2966
  method: 'POST',
2965
2967
  });
2966
2968
  },
@@ -2981,7 +2983,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
2981
2983
  return useMutation({
2982
2984
  mutationFn: async ({ organizationId, userId, }) => {
2983
2985
  return requestDatalayer({
2984
- url: `${configuration.iamRunUrl}/api/iam/v1/organizations/${organizationId}/members/${userId}`,
2986
+ url: `${configuration.iamUrl}/api/iam/v1/organizations/${organizationId}/members/${userId}`,
2985
2987
  method: 'DELETE',
2986
2988
  });
2987
2989
  },
@@ -3002,7 +3004,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3002
3004
  return useMutation({
3003
3005
  mutationFn: async ({ organizationId, userId, roleName, }) => {
3004
3006
  return requestDatalayer({
3005
- url: `${configuration.iamRunUrl}/api/iam/v1/organizations/${organizationId}/members/${userId}/roles/${roleName}`,
3007
+ url: `${configuration.iamUrl}/api/iam/v1/organizations/${organizationId}/members/${userId}/roles/${roleName}`,
3006
3008
  method: 'POST',
3007
3009
  });
3008
3010
  },
@@ -3020,7 +3022,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3020
3022
  return useMutation({
3021
3023
  mutationFn: async ({ organizationId, userId, roleName, }) => {
3022
3024
  return requestDatalayer({
3023
- url: `${configuration.iamRunUrl}/api/iam/v1/organizations/${organizationId}/members/${userId}/roles/${roleName}`,
3025
+ url: `${configuration.iamUrl}/api/iam/v1/organizations/${organizationId}/members/${userId}/roles/${roleName}`,
3024
3026
  method: 'DELETE',
3025
3027
  });
3026
3028
  },
@@ -3038,7 +3040,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3038
3040
  return useMutation({
3039
3041
  mutationFn: async ({ teamId, userId, }) => {
3040
3042
  return requestDatalayer({
3041
- url: `${configuration.iamRunUrl}/api/iam/v1/teams/${teamId}/members/${userId}`,
3043
+ url: `${configuration.iamUrl}/api/iam/v1/teams/${teamId}/members/${userId}`,
3042
3044
  method: 'POST',
3043
3045
  });
3044
3046
  },
@@ -3059,7 +3061,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3059
3061
  return useMutation({
3060
3062
  mutationFn: async ({ teamId, userId, }) => {
3061
3063
  return requestDatalayer({
3062
- url: `${configuration.iamRunUrl}/api/iam/v1/teams/${teamId}/members/${userId}`,
3064
+ url: `${configuration.iamUrl}/api/iam/v1/teams/${teamId}/members/${userId}`,
3063
3065
  method: 'DELETE',
3064
3066
  });
3065
3067
  },
@@ -3080,7 +3082,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3080
3082
  return useMutation({
3081
3083
  mutationFn: async ({ teamId, userId, roleName, }) => {
3082
3084
  return requestDatalayer({
3083
- url: `${configuration.iamRunUrl}/api/iam/v1/teams/${teamId}/members/${userId}/roles/${roleName}`,
3085
+ url: `${configuration.iamUrl}/api/iam/v1/teams/${teamId}/members/${userId}/roles/${roleName}`,
3084
3086
  method: 'POST',
3085
3087
  });
3086
3088
  },
@@ -3098,7 +3100,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3098
3100
  return useMutation({
3099
3101
  mutationFn: async ({ teamId, userId, roleName, }) => {
3100
3102
  return requestDatalayer({
3101
- url: `${configuration.iamRunUrl}/api/iam/v1/teams/${teamId}/members/${userId}/roles/${roleName}`,
3103
+ url: `${configuration.iamUrl}/api/iam/v1/teams/${teamId}/members/${userId}/roles/${roleName}`,
3102
3104
  method: 'DELETE',
3103
3105
  });
3104
3106
  },
@@ -3116,7 +3118,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3116
3118
  return useMutation({
3117
3119
  mutationFn: async ({ organizationId, spaceId, accountId, }) => {
3118
3120
  return requestDatalayer({
3119
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${spaceId}/organizations/${organizationId}/members/${accountId}`,
3121
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${spaceId}/organizations/${organizationId}/members/${accountId}`,
3120
3122
  method: 'POST',
3121
3123
  });
3122
3124
  },
@@ -3137,7 +3139,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3137
3139
  return useMutation({
3138
3140
  mutationFn: async ({ organizationId, spaceId, accountId, }) => {
3139
3141
  return requestDatalayer({
3140
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${spaceId}/organizations/${organizationId}/members/${accountId}`,
3142
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${spaceId}/organizations/${organizationId}/members/${accountId}`,
3141
3143
  method: 'DELETE',
3142
3144
  });
3143
3145
  },
@@ -3158,7 +3160,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3158
3160
  return useMutation({
3159
3161
  mutationFn: async (spaceId) => {
3160
3162
  return requestDatalayer({
3161
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${spaceId}/public`,
3163
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${spaceId}/public`,
3162
3164
  method: 'PUT',
3163
3165
  });
3164
3166
  },
@@ -3176,7 +3178,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3176
3178
  return useMutation({
3177
3179
  mutationFn: async (spaceId) => {
3178
3180
  return requestDatalayer({
3179
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${spaceId}/private`,
3181
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${spaceId}/private`,
3180
3182
  method: 'PUT',
3181
3183
  });
3182
3184
  },
@@ -3197,7 +3199,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3197
3199
  return useMutation({
3198
3200
  mutationFn: async ({ handle, password, passwordConfirm, }) => {
3199
3201
  return requestDatalayer({
3200
- url: `${configuration.iamRunUrl}/api/iam/v1/password`,
3202
+ url: `${configuration.iamUrl}/api/iam/v1/password`,
3201
3203
  method: 'PUT',
3202
3204
  body: { handle, password, passwordConfirm },
3203
3205
  });
@@ -3211,7 +3213,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3211
3213
  return useMutation({
3212
3214
  mutationFn: async (email) => {
3213
3215
  return requestDatalayer({
3214
- url: `${configuration.iamRunUrl}/api/iam/v1/me/email`,
3216
+ url: `${configuration.iamUrl}/api/iam/v1/me/email`,
3215
3217
  method: 'PUT',
3216
3218
  body: { email },
3217
3219
  });
@@ -3225,7 +3227,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3225
3227
  return useMutation({
3226
3228
  mutationFn: async (token) => {
3227
3229
  return requestDatalayer({
3228
- url: `${configuration.iamRunUrl}/api/iam/v1/me/email`,
3230
+ url: `${configuration.iamUrl}/api/iam/v1/me/email`,
3229
3231
  method: 'POST',
3230
3232
  body: { token },
3231
3233
  });
@@ -3243,7 +3245,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3243
3245
  return useMutation({
3244
3246
  mutationFn: async ({ userId, roleName, }) => {
3245
3247
  return requestDatalayer({
3246
- url: `${configuration.iamRunUrl}/api/iam/v1/users/${userId}/roles/${roleName}`,
3248
+ url: `${configuration.iamUrl}/api/iam/v1/users/${userId}/roles/${roleName}`,
3247
3249
  method: 'POST',
3248
3250
  });
3249
3251
  },
@@ -3261,7 +3263,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3261
3263
  return useMutation({
3262
3264
  mutationFn: async ({ userId, roleName, }) => {
3263
3265
  return requestDatalayer({
3264
- url: `${configuration.iamRunUrl}/api/iam/v1/users/${userId}/roles/${roleName}`,
3266
+ url: `${configuration.iamUrl}/api/iam/v1/users/${userId}/roles/${roleName}`,
3265
3267
  method: 'DELETE',
3266
3268
  });
3267
3269
  },
@@ -3280,7 +3282,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3280
3282
  queryKey: ['schools'],
3281
3283
  queryFn: async () => {
3282
3284
  const resp = await requestDatalayer({
3283
- url: `${configuration.iamRunUrl}/api/iam/v1/organizations/schools`,
3285
+ url: `${configuration.iamUrl}/api/iam/v1/organizations/schools`,
3284
3286
  method: 'GET',
3285
3287
  });
3286
3288
  if (resp.success && resp.orgs) {
@@ -3315,7 +3317,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3315
3317
  return useMutation({
3316
3318
  mutationFn: async (organizationId) => {
3317
3319
  return requestDatalayer({
3318
- url: `${configuration.iamRunUrl}/api/iam/v1/organizations/${organizationId}`,
3320
+ url: `${configuration.iamUrl}/api/iam/v1/organizations/${organizationId}`,
3319
3321
  method: 'GET',
3320
3322
  });
3321
3323
  },
@@ -3342,7 +3344,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3342
3344
  return useMutation({
3343
3345
  mutationFn: async () => {
3344
3346
  return requestDatalayer({
3345
- url: `${configuration.iamRunUrl}/api/iam/v1/organizations`,
3347
+ url: `${configuration.iamUrl}/api/iam/v1/organizations`,
3346
3348
  method: 'GET',
3347
3349
  });
3348
3350
  },
@@ -3371,7 +3373,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3371
3373
  return useMutation({
3372
3374
  mutationFn: async ({ teamId, organizationId: _organizationId, }) => {
3373
3375
  return requestDatalayer({
3374
- url: `${configuration.iamRunUrl}/api/iam/v1/teams/${teamId}`,
3376
+ url: `${configuration.iamUrl}/api/iam/v1/teams/${teamId}`,
3375
3377
  method: 'GET',
3376
3378
  });
3377
3379
  },
@@ -3398,7 +3400,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3398
3400
  return useMutation({
3399
3401
  mutationFn: async (organizationId) => {
3400
3402
  return requestDatalayer({
3401
- url: `${configuration.iamRunUrl}/api/iam/v1/organizations/${organizationId}/teams`,
3403
+ url: `${configuration.iamUrl}/api/iam/v1/organizations/${organizationId}/teams`,
3402
3404
  method: 'GET',
3403
3405
  });
3404
3406
  },
@@ -3427,7 +3429,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3427
3429
  return useMutation({
3428
3430
  mutationFn: async ({ organizationId, spaceId, }) => {
3429
3431
  return requestDatalayer({
3430
- url: `${configuration.spacerRunUrl}/api/spacer/v1/organizations/${organizationId}/spaces/${spaceId}`,
3432
+ url: `${configuration.spacerUrl}/api/spacer/v1/organizations/${organizationId}/spaces/${spaceId}`,
3431
3433
  method: 'GET',
3432
3434
  });
3433
3435
  },
@@ -3451,7 +3453,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3451
3453
  return useMutation({
3452
3454
  mutationFn: async (organizationId) => {
3453
3455
  return requestDatalayer({
3454
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/organizations/${organizationId}`,
3456
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/organizations/${organizationId}`,
3455
3457
  method: 'GET',
3456
3458
  });
3457
3459
  },
@@ -3477,7 +3479,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3477
3479
  return useMutation({
3478
3480
  mutationFn: async () => {
3479
3481
  return requestDatalayer({
3480
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/users/me`,
3482
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/users/me`,
3481
3483
  method: 'GET',
3482
3484
  });
3483
3485
  },
@@ -3507,7 +3509,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3507
3509
  queryKey: ['courses', 'detail', courseId],
3508
3510
  queryFn: async () => {
3509
3511
  const resp = await requestDatalayer({
3510
- url: `${configuration.spacerRunUrl}/api/spacer/v1/courses/${courseId}`,
3512
+ url: `${configuration.spacerUrl}/api/spacer/v1/courses/${courseId}`,
3511
3513
  method: 'GET',
3512
3514
  });
3513
3515
  if (resp.success && resp.course) {
@@ -3526,7 +3528,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3526
3528
  return useMutation({
3527
3529
  mutationFn: async ({ courseId, name, description, }) => {
3528
3530
  return requestDatalayer({
3529
- url: `${configuration.spacerRunUrl}/api/spacer/v1/courses/${courseId}`,
3531
+ url: `${configuration.spacerUrl}/api/spacer/v1/courses/${courseId}`,
3530
3532
  method: 'PUT',
3531
3533
  body: { name, description },
3532
3534
  });
@@ -3551,7 +3553,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3551
3553
  queryKey: ['courses', 'public'],
3552
3554
  queryFn: async () => {
3553
3555
  const resp = await requestDatalayer({
3554
- url: `${configuration.libraryRunUrl}/api/library/v1/courses/public`,
3556
+ url: `${configuration.libraryUrl}/api/library/v1/courses/public`,
3555
3557
  method: 'GET',
3556
3558
  });
3557
3559
  if (resp.success && resp.courses) {
@@ -3570,7 +3572,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3570
3572
  queryKey: ['courses', 'instructor', userId],
3571
3573
  queryFn: async () => {
3572
3574
  const resp = await requestDatalayer({
3573
- url: `${configuration.spacerRunUrl}/api/spacer/v1/instructors/${userId}/courses`,
3575
+ url: `${configuration.spacerUrl}/api/spacer/v1/instructors/${userId}/courses`,
3574
3576
  method: 'GET',
3575
3577
  });
3576
3578
  if (resp.success && resp.courses) {
@@ -3590,7 +3592,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3590
3592
  queryKey: ['courses', 'enrollments', 'me'],
3591
3593
  queryFn: async () => {
3592
3594
  const resp = await requestDatalayer({
3593
- url: `${configuration.spacerRunUrl}/api/spacer/v1/courses/enrollments/me`,
3595
+ url: `${configuration.spacerUrl}/api/spacer/v1/courses/enrollments/me`,
3594
3596
  method: 'GET',
3595
3597
  });
3596
3598
  if (resp.success && resp.enrollments) {
@@ -3608,7 +3610,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3608
3610
  return useMutation({
3609
3611
  mutationFn: async ({ courseId, studentId, }) => {
3610
3612
  return requestDatalayer({
3611
- url: `${configuration.spacerRunUrl}/api/spacer/v1/courses/${courseId}/enrollments/students/${studentId}`,
3613
+ url: `${configuration.spacerUrl}/api/spacer/v1/courses/${courseId}/enrollments/students/${studentId}`,
3612
3614
  method: 'POST',
3613
3615
  });
3614
3616
  },
@@ -3649,7 +3651,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3649
3651
  return useMutation({
3650
3652
  mutationFn: async ({ courseId, studentId, }) => {
3651
3653
  return requestDatalayer({
3652
- url: `${configuration.spacerRunUrl}/api/spacer/v1/courses/${courseId}/enrollments/students/${studentId}`,
3654
+ url: `${configuration.spacerUrl}/api/spacer/v1/courses/${courseId}/enrollments/students/${studentId}`,
3653
3655
  method: 'DELETE',
3654
3656
  });
3655
3657
  },
@@ -3687,7 +3689,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3687
3689
  queryKey: ['spaces', spaceId, 'items'],
3688
3690
  queryFn: async () => {
3689
3691
  const resp = await requestDatalayer({
3690
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${spaceId}/items`,
3692
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${spaceId}/items`,
3691
3693
  method: 'GET',
3692
3694
  });
3693
3695
  if (resp.success && resp.items) {
@@ -3709,7 +3711,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3709
3711
  queryKey: ['spaces', spaceId, 'default-items'],
3710
3712
  queryFn: async () => {
3711
3713
  const resp = await requestDatalayer({
3712
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${spaceId}/default-items`,
3714
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${spaceId}/default-items`,
3713
3715
  method: 'GET',
3714
3716
  });
3715
3717
  if (resp.success) {
@@ -3731,7 +3733,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3731
3733
  return useMutation({
3732
3734
  mutationFn: async (itemId) => {
3733
3735
  return requestDatalayer({
3734
- url: `${configuration.libraryRunUrl}/api/library/v1/items/${itemId}/public`,
3736
+ url: `${configuration.libraryUrl}/api/library/v1/items/${itemId}/public`,
3735
3737
  method: 'PATCH',
3736
3738
  body: { is_public: true },
3737
3739
  });
@@ -3748,7 +3750,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3748
3750
  return useMutation({
3749
3751
  mutationFn: async (itemId) => {
3750
3752
  return requestDatalayer({
3751
- url: `${configuration.libraryRunUrl}/api/library/v1/items/${itemId}/public`,
3753
+ url: `${configuration.libraryUrl}/api/library/v1/items/${itemId}/public`,
3752
3754
  method: 'PATCH',
3753
3755
  body: { is_public: false },
3754
3756
  });
@@ -3779,7 +3781,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3779
3781
  path += `/spaces/${spaceHandle}`;
3780
3782
  }
3781
3783
  return requestDatalayer({
3782
- url: `${configuration.spacerRunUrl}${path}`,
3784
+ url: `${configuration.spacerUrl}${path}`,
3783
3785
  method: 'GET',
3784
3786
  });
3785
3787
  },
@@ -3835,7 +3837,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3835
3837
  return useMutation({
3836
3838
  mutationFn: async (spaceId) => {
3837
3839
  return requestDatalayer({
3838
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${spaceId}/export`,
3840
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${spaceId}/export`,
3839
3841
  method: 'GET',
3840
3842
  });
3841
3843
  },
@@ -3852,7 +3854,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3852
3854
  queryKey: queryKeys.cells.detail(cellId),
3853
3855
  queryFn: async () => {
3854
3856
  const resp = await requestDatalayer({
3855
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/items/${cellId}`,
3857
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/items/${cellId}`,
3856
3858
  method: 'GET',
3857
3859
  });
3858
3860
  if (resp.success && resp.item) {
@@ -3875,7 +3877,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3875
3877
  queryKey: queryKeys.cells.bySpace(spaceId),
3876
3878
  queryFn: async () => {
3877
3879
  const resp = await requestDatalayer({
3878
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${spaceId}/items/types/cell`,
3880
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${spaceId}/items/types/cell`,
3879
3881
  method: 'GET',
3880
3882
  });
3881
3883
  if (resp.success && resp.items) {
@@ -3894,7 +3896,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3894
3896
  return useMutation({
3895
3897
  mutationFn: async (cell) => {
3896
3898
  return requestDatalayer({
3897
- url: `${configuration.spacerRunUrl}/api/spacer/v1/cells/${cell.id}`,
3899
+ url: `${configuration.spacerUrl}/api/spacer/v1/cells/${cell.id}`,
3898
3900
  method: 'PUT',
3899
3901
  body: cell,
3900
3902
  });
@@ -3919,7 +3921,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3919
3921
  return useMutation({
3920
3922
  mutationFn: async (cellId) => {
3921
3923
  return requestDatalayer({
3922
- url: `${configuration.spacerRunUrl}/api/spacer/v1/cells/${cellId}/clone`,
3924
+ url: `${configuration.spacerUrl}/api/spacer/v1/cells/${cellId}/clone`,
3923
3925
  method: 'POST',
3924
3926
  });
3925
3927
  },
@@ -3958,7 +3960,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3958
3960
  }
3959
3961
  const query = params.toString();
3960
3962
  const resp = await requestDatalayer({
3961
- url: `${configuration.runtimesRunUrl}/api/runtimes/v1/spaces/items/${datasetId}${query ? `?${query}` : ''}`,
3963
+ url: `${configuration.runtimesUrl}/api/runtimes/v1/spaces/items/${datasetId}${query ? `?${query}` : ''}`,
3962
3964
  method: 'GET',
3963
3965
  });
3964
3966
  if (resp.success && resp.item) {
@@ -3990,7 +3992,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
3990
3992
  }
3991
3993
  const query = params.toString();
3992
3994
  const resp = await requestDatalayer({
3993
- url: `${configuration.runtimesRunUrl}/api/runtimes/v1/spaces/${spaceId}/items/types/dataset${query ? `?${query}` : ''}`,
3995
+ url: `${configuration.runtimesUrl}/api/runtimes/v1/spaces/${spaceId}/items/types/dataset${query ? `?${query}` : ''}`,
3994
3996
  method: 'GET',
3995
3997
  });
3996
3998
  if (resp.success && resp.items) {
@@ -4017,7 +4019,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4017
4019
  }
4018
4020
  const query = params.toString();
4019
4021
  return requestDatalayer({
4020
- url: `${configuration.runtimesRunUrl}/api/runtimes/v1/datasets/${id}${query ? `?${query}` : ''}`,
4022
+ url: `${configuration.runtimesUrl}/api/runtimes/v1/datasets/${id}${query ? `?${query}` : ''}`,
4021
4023
  method: 'PUT',
4022
4024
  body: { name, description },
4023
4025
  });
@@ -4045,7 +4047,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4045
4047
  queryKey: queryKeys.environments.detail(environmentId),
4046
4048
  queryFn: async () => {
4047
4049
  const resp = await requestDatalayer({
4048
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/items/${environmentId}`,
4050
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/items/${environmentId}`,
4049
4051
  method: 'GET',
4050
4052
  });
4051
4053
  if (resp.success && resp.item) {
@@ -4065,7 +4067,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4065
4067
  queryKey: queryKeys.environments.bySpace(spaceId),
4066
4068
  queryFn: async () => {
4067
4069
  const resp = await requestDatalayer({
4068
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${spaceId}/items/types/environment`,
4070
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${spaceId}/items/types/environment`,
4069
4071
  method: 'GET',
4070
4072
  });
4071
4073
  if (resp.success && resp.items) {
@@ -4085,7 +4087,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4085
4087
  queryKey: queryKeys.lessons.detail(lessonId),
4086
4088
  queryFn: async () => {
4087
4089
  const resp = await requestDatalayer({
4088
- url: `${configuration.spacerRunUrl}/api/spacer/v1/lessons/${lessonId}`,
4090
+ url: `${configuration.spacerUrl}/api/spacer/v1/lessons/${lessonId}`,
4089
4091
  method: 'GET',
4090
4092
  });
4091
4093
  if (resp.success && resp.lesson) {
@@ -4105,7 +4107,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4105
4107
  queryKey: queryKeys.lessons.bySpace(spaceId),
4106
4108
  queryFn: async () => {
4107
4109
  const resp = await requestDatalayer({
4108
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${spaceId}/items/types/lesson`,
4110
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${spaceId}/items/types/lesson`,
4109
4111
  method: 'GET',
4110
4112
  });
4111
4113
  if (resp.success && resp.items) {
@@ -4124,7 +4126,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4124
4126
  return useMutation({
4125
4127
  mutationFn: async (lessonId) => {
4126
4128
  return requestDatalayer({
4127
- url: `${configuration.spacerRunUrl}/api/spacer/v1/notebooks/${lessonId}/clone`,
4129
+ url: `${configuration.spacerUrl}/api/spacer/v1/notebooks/${lessonId}/clone`,
4128
4130
  method: 'POST',
4129
4131
  });
4130
4132
  },
@@ -4154,7 +4156,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4154
4156
  queryKey: queryKeys.exercises.detail(exerciseId),
4155
4157
  queryFn: async () => {
4156
4158
  const resp = await requestDatalayer({
4157
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/items/${exerciseId}`,
4159
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/items/${exerciseId}`,
4158
4160
  method: 'GET',
4159
4161
  });
4160
4162
  if (resp.success && resp.item) {
@@ -4174,7 +4176,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4174
4176
  queryKey: queryKeys.exercises.bySpace(spaceId),
4175
4177
  queryFn: async () => {
4176
4178
  const resp = await requestDatalayer({
4177
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${spaceId}/items/types/exercise`,
4179
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${spaceId}/items/types/exercise`,
4178
4180
  method: 'GET',
4179
4181
  });
4180
4182
  if (resp.success && resp.items) {
@@ -4193,7 +4195,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4193
4195
  return useMutation({
4194
4196
  mutationFn: async ({ id, name, description, help, codePre, codeSolution, codeQuestion, codeTest, }) => {
4195
4197
  return requestDatalayer({
4196
- url: `${configuration.spacerRunUrl}/api/spacer/v1/exercises/${id}`,
4198
+ url: `${configuration.spacerUrl}/api/spacer/v1/exercises/${id}`,
4197
4199
  method: 'PUT',
4198
4200
  body: {
4199
4201
  name,
@@ -4221,7 +4223,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4221
4223
  return useMutation({
4222
4224
  mutationFn: async (exerciseId) => {
4223
4225
  return requestDatalayer({
4224
- url: `${configuration.spacerRunUrl}/api/spacer/v1/exercises/${exerciseId}/clone`,
4226
+ url: `${configuration.spacerUrl}/api/spacer/v1/exercises/${exerciseId}/clone`,
4225
4227
  method: 'POST',
4226
4228
  });
4227
4229
  },
@@ -4248,7 +4250,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4248
4250
  queryKey: queryKeys.assignments.detail(assignmentId),
4249
4251
  queryFn: async () => {
4250
4252
  const resp = await requestDatalayer({
4251
- url: `${configuration.spacerRunUrl}/api/spacer/v1/assignments/${assignmentId}`,
4253
+ url: `${configuration.spacerUrl}/api/spacer/v1/assignments/${assignmentId}`,
4252
4254
  method: 'GET',
4253
4255
  });
4254
4256
  if (resp.success && resp.assignment) {
@@ -4268,7 +4270,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4268
4270
  queryKey: queryKeys.assignments.bySpace(spaceId),
4269
4271
  queryFn: async () => {
4270
4272
  const resp = await requestDatalayer({
4271
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${spaceId}/items/types/assignment`,
4273
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${spaceId}/items/types/assignment`,
4272
4274
  method: 'GET',
4273
4275
  });
4274
4276
  if (resp.success && resp.items) {
@@ -4287,7 +4289,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4287
4289
  return useMutation({
4288
4290
  mutationFn: async (assignmentId) => {
4289
4291
  return requestDatalayer({
4290
- url: `${configuration.spacerRunUrl}/api/spacer/v1/notebooks/${assignmentId}/clone`,
4292
+ url: `${configuration.spacerUrl}/api/spacer/v1/notebooks/${assignmentId}/clone`,
4291
4293
  method: 'POST',
4292
4294
  });
4293
4295
  },
@@ -4314,7 +4316,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4314
4316
  queryKey: ['invites', 'token', token],
4315
4317
  queryFn: async () => {
4316
4318
  const resp = await requestDatalayer({
4317
- url: `${configuration.growthRunUrl}/api/growth/v1/invites/tokens/${token}`,
4319
+ url: `${configuration.growthUrl}/api/growth/v1/invites/tokens/${token}`,
4318
4320
  method: 'GET',
4319
4321
  });
4320
4322
  if (resp.success && resp.invite) {
@@ -4334,7 +4336,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4334
4336
  queryKey: ['invites', 'user', accountId],
4335
4337
  queryFn: async () => {
4336
4338
  const resp = await requestDatalayer({
4337
- url: `${configuration.growthRunUrl}/api/growth/v1/invites/users/${accountId}`,
4339
+ url: `${configuration.growthUrl}/api/growth/v1/invites/users/${accountId}`,
4338
4340
  method: 'GET',
4339
4341
  });
4340
4342
  if (resp.success && resp.invites) {
@@ -4353,7 +4355,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4353
4355
  return useMutation({
4354
4356
  mutationFn: async (token) => {
4355
4357
  return requestDatalayer({
4356
- url: `${configuration.growthRunUrl}/api/growth/v1/invites/tokens/${token}`,
4358
+ url: `${configuration.growthUrl}/api/growth/v1/invites/tokens/${token}`,
4357
4359
  method: 'PUT',
4358
4360
  });
4359
4361
  },
@@ -4376,7 +4378,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4376
4378
  queryKey: ['assignments', 'student', assignmentId, courseId, userId],
4377
4379
  queryFn: async () => {
4378
4380
  const resp = await requestDatalayer({
4379
- url: `${configuration.spacerRunUrl}/api/spacer/v1/assignments/${assignmentId}/courses/${courseId}/students/${userId}`,
4381
+ url: `${configuration.spacerUrl}/api/spacer/v1/assignments/${assignmentId}/courses/${courseId}/students/${userId}`,
4380
4382
  method: 'GET',
4381
4383
  });
4382
4384
  if (!resp.success) {
@@ -4395,7 +4397,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4395
4397
  return useMutation({
4396
4398
  mutationFn: async ({ assignmentId, courseId: _courseId, userId: _userId, }) => {
4397
4399
  return requestDatalayer({
4398
- url: `${configuration.spacerRunUrl}/api/spacer/v1/assignments/${assignmentId}/reset`,
4400
+ url: `${configuration.spacerUrl}/api/spacer/v1/assignments/${assignmentId}/reset`,
4399
4401
  method: 'POST',
4400
4402
  });
4401
4403
  },
@@ -4423,7 +4425,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4423
4425
  return useMutation({
4424
4426
  mutationFn: async ({ assignmentId, courseId: _courseId, userId, model, }) => {
4425
4427
  return requestDatalayer({
4426
- url: `${configuration.spacerRunUrl}/api/spacer/v1/assignments/${assignmentId}/students/${userId}/grade`,
4428
+ url: `${configuration.spacerUrl}/api/spacer/v1/assignments/${assignmentId}/students/${userId}/grade`,
4427
4429
  method: 'PUT',
4428
4430
  body: { model },
4429
4431
  });
@@ -4452,7 +4454,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4452
4454
  queryKey: ['assignments', 'studentVersion', assignmentId],
4453
4455
  queryFn: async () => {
4454
4456
  const resp = await requestDatalayer({
4455
- url: `${configuration.spacerRunUrl}/api/spacer/v1/assignments/${assignmentId}/student_version`,
4457
+ url: `${configuration.spacerUrl}/api/spacer/v1/assignments/${assignmentId}/student_version`,
4456
4458
  method: 'GET',
4457
4459
  });
4458
4460
  return resp;
@@ -4471,7 +4473,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4471
4473
  return useMutation({
4472
4474
  mutationFn: async ({ exerciseId, codeStudent, score, courseId, }) => {
4473
4475
  return requestDatalayer({
4474
- url: `${configuration.spacerRunUrl}/api/spacer/v1/exercises/${exerciseId}/score`,
4476
+ url: `${configuration.spacerUrl}/api/spacer/v1/exercises/${exerciseId}/score`,
4475
4477
  method: 'PUT',
4476
4478
  body: { codeStudent, score, courseId },
4477
4479
  });
@@ -4497,7 +4499,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4497
4499
  queryKey: ['courses', courseId, 'students', studentId],
4498
4500
  queryFn: async () => {
4499
4501
  const resp = await requestDatalayer({
4500
- url: `${configuration.spacerRunUrl}/api/spacer/v1/courses/${courseId}/enrollments/students/${studentId}`,
4502
+ url: `${configuration.spacerUrl}/api/spacer/v1/courses/${courseId}/enrollments/students/${studentId}`,
4501
4503
  method: 'GET',
4502
4504
  });
4503
4505
  if (!resp.success) {
@@ -4525,7 +4527,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4525
4527
  queryKey: ['courses', courseId, 'students', studentId],
4526
4528
  queryFn: async () => {
4527
4529
  const resp = await requestDatalayer({
4528
- url: `${configuration.spacerRunUrl}/api/spacer/v1/courses/${courseId}/enrollments/students/${studentId}`,
4530
+ url: `${configuration.spacerUrl}/api/spacer/v1/courses/${courseId}/enrollments/students/${studentId}`,
4529
4531
  method: 'GET',
4530
4532
  });
4531
4533
  if (!resp.success) {
@@ -4545,7 +4547,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4545
4547
  return useMutation({
4546
4548
  mutationFn: async ({ courseId, itemType, itemId, completed, }) => {
4547
4549
  return requestDatalayer({
4548
- url: `${configuration.spacerRunUrl}/api/spacer/v1/assignments/${courseId}/types/${itemType}/items/${itemId}/complete`,
4550
+ url: `${configuration.spacerUrl}/api/spacer/v1/assignments/${courseId}/types/${itemType}/items/${itemId}/complete`,
4549
4551
  method: 'PUT',
4550
4552
  body: { completed },
4551
4553
  });
@@ -4571,7 +4573,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4571
4573
  return useMutation({
4572
4574
  mutationFn: async ({ courseId, itemIds, }) => {
4573
4575
  return requestDatalayer({
4574
- url: `${configuration.spacerRunUrl}/api/spacer/v1/courses/${courseId}/items`,
4576
+ url: `${configuration.spacerUrl}/api/spacer/v1/courses/${courseId}/items`,
4575
4577
  method: 'PUT',
4576
4578
  body: { itemIds },
4577
4579
  });
@@ -4597,7 +4599,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4597
4599
  queryKey: ['inbounds'],
4598
4600
  queryFn: async () => {
4599
4601
  const resp = await requestDatalayer({
4600
- url: `${configuration.inboundsRunUrl}/api/inbounds/v1/inbounds`,
4602
+ url: `${configuration.inboundsUrl}/api/inbounds/v1/inbounds`,
4601
4603
  method: 'GET',
4602
4604
  });
4603
4605
  if (!resp.success) {
@@ -4616,7 +4618,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4616
4618
  queryKey: ['outbounds', outboundId],
4617
4619
  queryFn: async () => {
4618
4620
  const resp = await requestDatalayer({
4619
- url: `${configuration.growthRunUrl}/api/growth/v1/outbounds/${outboundId}`,
4621
+ url: `${configuration.growthUrl}/api/growth/v1/outbounds/${outboundId}`,
4620
4622
  method: 'GET',
4621
4623
  });
4622
4624
  if (!resp.success) {
@@ -4636,7 +4638,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4636
4638
  queryKey: ['outbounds'],
4637
4639
  queryFn: async () => {
4638
4640
  const resp = await requestDatalayer({
4639
- url: `${configuration.growthRunUrl}/api/growth/v1/outbounds`,
4641
+ url: `${configuration.growthUrl}/api/growth/v1/outbounds`,
4640
4642
  method: 'GET',
4641
4643
  });
4642
4644
  if (!resp.success) {
@@ -4655,7 +4657,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4655
4657
  return useMutation({
4656
4658
  mutationFn: async (params) => {
4657
4659
  return requestDatalayer({
4658
- url: `${configuration.growthRunUrl}/api/growth/v1/outbounds/emails/bulk/draft`,
4660
+ url: `${configuration.growthUrl}/api/growth/v1/outbounds/emails/bulk/draft`,
4659
4661
  method: 'POST',
4660
4662
  body: params,
4661
4663
  });
@@ -4679,7 +4681,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4679
4681
  return useMutation({
4680
4682
  mutationFn: async (outboundId) => {
4681
4683
  return requestDatalayer({
4682
- url: `${configuration.growthRunUrl}/api/growth/v1/outbounds/${outboundId}/try`,
4684
+ url: `${configuration.growthUrl}/api/growth/v1/outbounds/${outboundId}/try`,
4683
4685
  method: 'POST',
4684
4686
  body: {},
4685
4687
  });
@@ -4700,7 +4702,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4700
4702
  return useMutation({
4701
4703
  mutationFn: async (outboundId) => {
4702
4704
  return requestDatalayer({
4703
- url: `${configuration.growthRunUrl}/api/growth/v1/outbounds/${outboundId}/launch`,
4705
+ url: `${configuration.growthUrl}/api/growth/v1/outbounds/${outboundId}/launch`,
4704
4706
  method: 'POST',
4705
4707
  body: {},
4706
4708
  });
@@ -4721,11 +4723,17 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4721
4723
  */
4722
4724
  const useSendOutboundEmailToUser = () => {
4723
4725
  return useMutation({
4724
- mutationFn: async ({ userId, recipient, subject, content, }) => {
4726
+ mutationFn: async ({ userId, recipient, subject, htmlContent, content, }) => {
4725
4727
  return requestDatalayer({
4726
- url: `${configuration.growthRunUrl}/api/growth/v1/outbounds/email`,
4728
+ url: `${configuration.growthUrl}/api/growth/v1/outbounds/email`,
4727
4729
  method: 'POST',
4728
- body: { userId, recipient, subject, content },
4730
+ body: {
4731
+ userId,
4732
+ recipient,
4733
+ subject,
4734
+ content,
4735
+ htmlContent: htmlContent || content,
4736
+ },
4729
4737
  });
4730
4738
  },
4731
4739
  });
@@ -4738,7 +4746,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4738
4746
  return useMutation({
4739
4747
  mutationFn: async (outboundId) => {
4740
4748
  return requestDatalayer({
4741
- url: `${configuration.growthRunUrl}/api/growth/v1/outbounds/${outboundId}`,
4749
+ url: `${configuration.growthUrl}/api/growth/v1/outbounds/${outboundId}`,
4742
4750
  method: 'DELETE',
4743
4751
  });
4744
4752
  },
@@ -4763,7 +4771,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4763
4771
  return useMutation({
4764
4772
  mutationFn: async (userId) => {
4765
4773
  return requestDatalayer({
4766
- url: `${configuration.iamRunUrl}/api/iam/v1/outbounds/users/${userId}`,
4774
+ url: `${configuration.iamUrl}/api/iam/v1/outbounds/users/${userId}`,
4767
4775
  method: 'PUT',
4768
4776
  });
4769
4777
  },
@@ -4776,7 +4784,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4776
4784
  return useMutation({
4777
4785
  mutationFn: async (userId) => {
4778
4786
  return requestDatalayer({
4779
- url: `${configuration.iamRunUrl}/api/iam/v1/outbounds/users/${userId}`,
4787
+ url: `${configuration.iamUrl}/api/iam/v1/outbounds/users/${userId}`,
4780
4788
  method: 'DELETE',
4781
4789
  });
4782
4790
  },
@@ -4789,7 +4797,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4789
4797
  return useMutation({
4790
4798
  mutationFn: async (contactId) => {
4791
4799
  return requestDatalayer({
4792
- url: `${configuration.growthRunUrl}/api/growth/v1/contacts/unsubscribe/${contactId}`,
4800
+ url: `${configuration.growthUrl}/api/growth/v1/contacts/unsubscribe/${contactId}`,
4793
4801
  method: 'GET',
4794
4802
  });
4795
4803
  },
@@ -4802,7 +4810,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4802
4810
  return useMutation({
4803
4811
  mutationFn: async (token) => {
4804
4812
  return requestDatalayer({
4805
- url: `${configuration.growthRunUrl}/api/growth/v1/outbounds/unsubscribe/${token}`,
4813
+ url: `${configuration.growthUrl}/api/growth/v1/outbounds/unsubscribe/${token}`,
4806
4814
  method: 'GET',
4807
4815
  });
4808
4816
  },
@@ -4819,7 +4827,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4819
4827
  return useMutation({
4820
4828
  mutationFn: async () => {
4821
4829
  return requestDatalayer({
4822
- url: `${configuration.iamRunUrl}/api/iam/v1/mfa`,
4830
+ url: `${configuration.iamUrl}/api/iam/v1/mfa`,
4823
4831
  method: 'PUT',
4824
4832
  });
4825
4833
  },
@@ -4836,7 +4844,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4836
4844
  return useMutation({
4837
4845
  mutationFn: async () => {
4838
4846
  return requestDatalayer({
4839
- url: `${configuration.iamRunUrl}/api/iam/v1/mfa`,
4847
+ url: `${configuration.iamUrl}/api/iam/v1/mfa`,
4840
4848
  method: 'DELETE',
4841
4849
  });
4842
4850
  },
@@ -4852,7 +4860,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4852
4860
  return useMutation({
4853
4861
  mutationFn: async ({ userUid, code, }) => {
4854
4862
  return requestDatalayer({
4855
- url: `${configuration.iamRunUrl}/api/iam/v1/mfa`,
4863
+ url: `${configuration.iamUrl}/api/iam/v1/mfa`,
4856
4864
  method: 'POST',
4857
4865
  body: { userUid, code },
4858
4866
  });
@@ -4864,9 +4872,9 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4864
4872
  return url;
4865
4873
  }
4866
4874
  const separator = url.includes('?') ? '&' : '?';
4867
- const parts = [`billable_account_uid=${encodeURIComponent(accountUid)}`];
4875
+ const parts = [`billing_entity_uid=${encodeURIComponent(accountUid)}`];
4868
4876
  if (accountKind) {
4869
- parts.push(`billable_account_kind=${encodeURIComponent(accountKind)}`);
4877
+ parts.push(`billing_entity_kind=${encodeURIComponent(accountKind)}`);
4870
4878
  }
4871
4879
  return `${url}${separator}${parts.join('&')}`;
4872
4880
  };
@@ -4904,7 +4912,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4904
4912
  }));
4905
4913
  };
4906
4914
  const resp = await requestDatalayer({
4907
- url: `${configuration.iamRunUrl}/api/iam/stripe/v1/plans/prices`,
4915
+ url: `${configuration.iamUrl}/api/iam/stripe/v1/plans/prices`,
4908
4916
  method: 'GET',
4909
4917
  });
4910
4918
  if (resp?.success === false) {
@@ -4931,7 +4939,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4931
4939
  return useMutation({
4932
4940
  mutationFn: async ({ product, }) => {
4933
4941
  const resp = await requestDatalayer({
4934
- url: `${configuration.iamRunUrl}/api/iam/stripe/v1/topup/payment-intent`,
4942
+ url: `${configuration.iamUrl}/api/iam/stripe/v1/topup/payment-intent`,
4935
4943
  method: 'POST',
4936
4944
  body: {
4937
4945
  price_id: product?.id,
@@ -4950,7 +4958,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4950
4958
  queryKey: ['subscription', 'plans', scope?.accountUid ?? 'self'],
4951
4959
  queryFn: async () => {
4952
4960
  const resp = await requestDatalayer({
4953
- url: withAccountUidQuery(`${configuration.iamRunUrl}/api/iam/v1/plans/catalog`, scope?.accountUid),
4961
+ url: withAccountUidQuery(`${configuration.iamUrl}/api/iam/v1/plans/catalog`, scope?.accountUid),
4954
4962
  method: 'GET',
4955
4963
  });
4956
4964
  return resp.plans || [];
@@ -4965,7 +4973,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4965
4973
  return useMutation({
4966
4974
  mutationFn: async ({ plan, }) => {
4967
4975
  const resp = await requestDatalayer({
4968
- url: `${configuration.iamRunUrl}/api/iam/stripe/v1/subscription/payment-intent`,
4976
+ url: `${configuration.iamUrl}/api/iam/stripe/v1/subscription/payment-intent`,
4969
4977
  method: 'POST',
4970
4978
  body: {
4971
4979
  price_id: plan?.id,
@@ -4983,7 +4991,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4983
4991
  return useMutation({
4984
4992
  mutationFn: async () => {
4985
4993
  const resp = await requestDatalayer({
4986
- url: `${configuration.iamRunUrl}/api/iam/stripe/v1/subscription/resume/setup-intent`,
4994
+ url: `${configuration.iamUrl}/api/iam/stripe/v1/subscription/resume/setup-intent`,
4987
4995
  method: 'POST',
4988
4996
  body: scope?.accountUid ? { account_uid: scope.accountUid } : {},
4989
4997
  });
@@ -4999,7 +5007,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
4999
5007
  queryKey: ['subscription', 'status', scope?.accountUid ?? 'self'],
5000
5008
  queryFn: async () => {
5001
5009
  return requestDatalayer({
5002
- url: withAccountUidQuery(`${configuration.iamRunUrl}/api/iam/v1/plans`, scope?.accountUid),
5010
+ url: withAccountUidQuery(`${configuration.iamUrl}/api/iam/v1/plans`, scope?.accountUid),
5003
5011
  method: 'GET',
5004
5012
  });
5005
5013
  },
@@ -5014,7 +5022,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5014
5022
  queryKey: ['subscription', 'eligible-accounts'],
5015
5023
  queryFn: async () => {
5016
5024
  const resp = await requestDatalayer({
5017
- url: `${configuration.iamRunUrl}/api/iam/v1/plans/eligible-accounts`,
5025
+ url: `${configuration.iamUrl}/api/iam/v1/plans/eligible-accounts`,
5018
5026
  method: 'GET',
5019
5027
  });
5020
5028
  return resp.accounts || [];
@@ -5033,7 +5041,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5033
5041
  queryKey: ['subscription', 'accounts-details', normalizedAccountUids],
5034
5042
  queryFn: async () => {
5035
5043
  const resp = await requestDatalayer({
5036
- url: `${configuration.iamRunUrl}/api/iam/v1/plans/accounts/details`,
5044
+ url: `${configuration.iamUrl}/api/iam/v1/plans/accounts/details`,
5037
5045
  method: 'POST',
5038
5046
  body: {
5039
5047
  account_uids: normalizedAccountUids,
@@ -5053,7 +5061,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5053
5061
  return useMutation({
5054
5062
  mutationFn: async () => {
5055
5063
  return requestDatalayer({
5056
- url: withAccountUidQuery(`${configuration.iamRunUrl}/api/iam/v1/plans/cancel`, scope?.accountUid),
5064
+ url: withAccountUidQuery(`${configuration.iamUrl}/api/iam/v1/plans/cancel`, scope?.accountUid),
5057
5065
  method: 'POST',
5058
5066
  });
5059
5067
  },
@@ -5072,7 +5080,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5072
5080
  return useMutation({
5073
5081
  mutationFn: async () => {
5074
5082
  return requestDatalayer({
5075
- url: withAccountUidQuery(`${configuration.iamRunUrl}/api/iam/v1/plans/resume`, scope?.accountUid),
5083
+ url: withAccountUidQuery(`${configuration.iamUrl}/api/iam/v1/plans/resume`, scope?.accountUid),
5076
5084
  method: 'POST',
5077
5085
  });
5078
5086
  },
@@ -5091,7 +5099,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5091
5099
  queryKey: ['subscription', 'admin', userId],
5092
5100
  queryFn: async () => {
5093
5101
  return requestDatalayer({
5094
- url: `${configuration.iamRunUrl}/api/iam/v1/plans/admin/${userId}`,
5102
+ url: `${configuration.iamUrl}/api/iam/v1/plans/admin/${userId}`,
5095
5103
  method: 'GET',
5096
5104
  });
5097
5105
  },
@@ -5107,7 +5115,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5107
5115
  return useMutation({
5108
5116
  mutationFn: async (userId) => {
5109
5117
  return requestDatalayer({
5110
- url: `${configuration.iamRunUrl}/api/iam/v1/plans/admin/${userId}/reset`,
5118
+ url: `${configuration.iamUrl}/api/iam/v1/plans/admin/${userId}/reset`,
5111
5119
  method: 'POST',
5112
5120
  });
5113
5121
  },
@@ -5126,7 +5134,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5126
5134
  return useMutation({
5127
5135
  mutationFn: async (credits) => {
5128
5136
  return requestDatalayer({
5129
- url: `${configuration.iamRunUrl}/api/iam/v1/usage/credits`,
5137
+ url: `${configuration.iamUrl}/api/iam/v1/usage/credits`,
5130
5138
  method: 'DELETE',
5131
5139
  body: { credits },
5132
5140
  });
@@ -5146,7 +5154,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5146
5154
  return useMutation({
5147
5155
  mutationFn: async ({ subject, message, email, brand, }) => {
5148
5156
  return requestDatalayer({
5149
- url: `${configuration.supportRunUrl}/api/support/v1/support/request`,
5157
+ url: `${configuration.supportUrl}/api/support/v1/support/request`,
5150
5158
  method: 'POST',
5151
5159
  body: { subject, message, email, brand },
5152
5160
  });
@@ -5160,7 +5168,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5160
5168
  return useMutation({
5161
5169
  mutationFn: async ({ accountHandle, firstName, lastName, email, message, }) => {
5162
5170
  return requestDatalayer({
5163
- url: `${configuration.supportRunUrl}/api/support/v1/support/request2`,
5171
+ url: `${configuration.supportUrl}/api/support/v1/support/request2`,
5164
5172
  method: 'POST',
5165
5173
  body: { accountHandle, firstName, lastName, email, message },
5166
5174
  });
@@ -5175,7 +5183,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5175
5183
  queryKey: ['users', userId, 'surveys'],
5176
5184
  queryFn: async () => {
5177
5185
  const resp = await requestDatalayer({
5178
- url: `${configuration.growthRunUrl}/api/growth/v1/surveys/users/${userId}`,
5186
+ url: `${configuration.growthUrl}/api/growth/v1/surveys/users/${userId}`,
5179
5187
  method: 'GET',
5180
5188
  });
5181
5189
  if (!resp.success) {
@@ -5200,7 +5208,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5200
5208
  return useMutation({
5201
5209
  mutationFn: async ({ handle, email, firstName, lastName, password, passwordConfirm, }) => {
5202
5210
  return requestDatalayer({
5203
- url: `${configuration.iamRunUrl}/api/iam/v1/join/request`,
5211
+ url: `${configuration.iamUrl}/api/iam/v1/join/request`,
5204
5212
  method: 'POST',
5205
5213
  body: {
5206
5214
  handle,
@@ -5221,7 +5229,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5221
5229
  return useMutation({
5222
5230
  mutationFn: async ({ handle, email, firstName, lastName, password, passwordConfirm, }) => {
5223
5231
  return requestDatalayer({
5224
- url: `${configuration.iamRunUrl}/api/iam/v1/join/request/token`,
5232
+ url: `${configuration.iamUrl}/api/iam/v1/join/request/token`,
5225
5233
  method: 'POST',
5226
5234
  body: {
5227
5235
  handle,
@@ -5242,7 +5250,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5242
5250
  return useMutation({
5243
5251
  mutationFn: async ({ formValues, token, }) => {
5244
5252
  return requestDatalayer({
5245
- url: `${configuration.iamRunUrl}/api/iam/v1/join/invites/token`,
5253
+ url: `${configuration.iamUrl}/api/iam/v1/join/invites/token`,
5246
5254
  method: 'POST',
5247
5255
  body: { ...formValues, token },
5248
5256
  });
@@ -5256,7 +5264,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5256
5264
  return useMutation({
5257
5265
  mutationFn: async ({ userHandle, token, }) => {
5258
5266
  return requestDatalayer({
5259
- url: `${configuration.iamRunUrl}/api/iam/v1/join/users/${userHandle}/tokens/${token}`,
5267
+ url: `${configuration.iamUrl}/api/iam/v1/join/users/${userHandle}/tokens/${token}`,
5260
5268
  method: 'GET',
5261
5269
  });
5262
5270
  },
@@ -5272,7 +5280,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5272
5280
  return useMutation({
5273
5281
  mutationFn: async ({ handle, password, passwordConfirm, }) => {
5274
5282
  return requestDatalayer({
5275
- url: `${configuration.iamRunUrl}/api/iam/v1/password/token`,
5283
+ url: `${configuration.iamUrl}/api/iam/v1/password/token`,
5276
5284
  method: 'POST',
5277
5285
  body: { handle, password, passwordConfirm },
5278
5286
  });
@@ -5286,7 +5294,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5286
5294
  return useMutation({
5287
5295
  mutationFn: async ({ handle, password, passwordConfirm, }) => {
5288
5296
  return requestDatalayer({
5289
- url: `${configuration.iamRunUrl}/api/iam/v1/password`,
5297
+ url: `${configuration.iamUrl}/api/iam/v1/password`,
5290
5298
  method: 'PUT',
5291
5299
  body: { handle, password, passwordConfirm },
5292
5300
  });
@@ -5300,7 +5308,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5300
5308
  return useMutation({
5301
5309
  mutationFn: async ({ userHandle, token, }) => {
5302
5310
  return requestDatalayer({
5303
- url: `${configuration.iamRunUrl}/api/iam/v1/password/confirm/users/${userHandle}/tokens/${token}`,
5311
+ url: `${configuration.iamUrl}/api/iam/v1/password/confirm/users/${userHandle}/tokens/${token}`,
5304
5312
  method: 'PUT',
5305
5313
  });
5306
5314
  },
@@ -5319,7 +5327,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5319
5327
  .map(([key, value]) => `${key}=${encodeURIComponent(value)}`)
5320
5328
  .join('&');
5321
5329
  const resp = await requestDatalayer({
5322
- url: `${configuration.iamRunUrl}/api/iam/v1/oauth2/authz/url?${queryString}`,
5330
+ url: `${configuration.iamUrl}/api/iam/v1/oauth2/authz/url?${queryString}`,
5323
5331
  notifyOnError: false,
5324
5332
  });
5325
5333
  return resp.autorization_url;
@@ -5336,7 +5344,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5336
5344
  .map(([key, value]) => `${key}=${encodeURIComponent(value)}`)
5337
5345
  .join('&');
5338
5346
  const resp = await requestDatalayer({
5339
- url: `${configuration.iamRunUrl}/api/iam/v1/oauth2/authz/url/link?${queryString}`,
5347
+ url: `${configuration.iamUrl}/api/iam/v1/oauth2/authz/url/link?${queryString}`,
5340
5348
  });
5341
5349
  return resp;
5342
5350
  },
@@ -5353,7 +5361,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5353
5361
  return useMutation({
5354
5362
  mutationFn: async ({ contactId, tagName, }) => {
5355
5363
  return requestDatalayer({
5356
- url: `${configuration.growthRunUrl}/api/growth/v1/contacts/${contactId}/tags/${tagName}`,
5364
+ url: `${configuration.growthUrl}/api/growth/v1/contacts/${contactId}/tags/${tagName}`,
5357
5365
  method: 'POST',
5358
5366
  });
5359
5367
  },
@@ -5373,7 +5381,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5373
5381
  return useMutation({
5374
5382
  mutationFn: async ({ contactId, tagName, }) => {
5375
5383
  return requestDatalayer({
5376
- url: `${configuration.growthRunUrl}/api/growth/v1/contacts/${contactId}/tags/${tagName}`,
5384
+ url: `${configuration.growthUrl}/api/growth/v1/contacts/${contactId}/tags/${tagName}`,
5377
5385
  method: 'DELETE',
5378
5386
  });
5379
5387
  },
@@ -5392,7 +5400,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5392
5400
  return useMutation({
5393
5401
  mutationFn: async ({ contactId, message, }) => {
5394
5402
  return requestDatalayer({
5395
- url: `${configuration.growthRunUrl}/api/growth/v1/contacts/invites`,
5403
+ url: `${configuration.growthUrl}/api/growth/v1/contacts/invites`,
5396
5404
  method: 'POST',
5397
5405
  body: { contactId, message },
5398
5406
  });
@@ -5407,7 +5415,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5407
5415
  return useMutation({
5408
5416
  mutationFn: async ({ contactId, useDomain, }) => {
5409
5417
  return requestDatalayer({
5410
- url: `${configuration.growthRunUrl}/api/growth/v1/contacts/${contactId}/enrich/email?useDomain=${useDomain}`,
5418
+ url: `${configuration.growthUrl}/api/growth/v1/contacts/${contactId}/enrich/email?useDomain=${useDomain}`,
5411
5419
  method: 'GET',
5412
5420
  });
5413
5421
  },
@@ -5426,7 +5434,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5426
5434
  return useMutation({
5427
5435
  mutationFn: async (contactId) => {
5428
5436
  return requestDatalayer({
5429
- url: `${configuration.growthRunUrl}/api/growth/v1/contacts/${contactId}/enrich/linkedin`,
5437
+ url: `${configuration.growthUrl}/api/growth/v1/contacts/${contactId}/enrich/linkedin`,
5430
5438
  method: 'GET',
5431
5439
  });
5432
5440
  },
@@ -5445,7 +5453,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5445
5453
  return useMutation({
5446
5454
  mutationFn: async ({ contactId, message, }) => {
5447
5455
  return requestDatalayer({
5448
- url: `${configuration.growthRunUrl}/api/growth/v1/contacts/${contactId}/connect/linkedin`,
5456
+ url: `${configuration.growthUrl}/api/growth/v1/contacts/${contactId}/connect/linkedin`,
5449
5457
  method: 'POST',
5450
5458
  body: { message },
5451
5459
  });
@@ -5468,7 +5476,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5468
5476
  return useMutation({
5469
5477
  mutationFn: async ({ userId, contactId, }) => {
5470
5478
  return requestDatalayer({
5471
- url: `${configuration.growthRunUrl}/api/growth/v1/users/${userId}/contacts/${contactId}/link`,
5479
+ url: `${configuration.growthUrl}/api/growth/v1/users/${userId}/contacts/${contactId}/link`,
5472
5480
  method: 'POST',
5473
5481
  });
5474
5482
  },
@@ -5490,7 +5498,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5490
5498
  return useMutation({
5491
5499
  mutationFn: async ({ userId, contactId, }) => {
5492
5500
  return requestDatalayer({
5493
- url: `${configuration.growthRunUrl}/api/growth/v1/users/${userId}/contacts/${contactId}/link`,
5501
+ url: `${configuration.growthUrl}/api/growth/v1/users/${userId}/contacts/${contactId}/link`,
5494
5502
  method: 'DELETE',
5495
5503
  });
5496
5504
  },
@@ -5515,7 +5523,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5515
5523
  queryKey: queryKeys.credits.organizationOverview(organizationUid),
5516
5524
  queryFn: async () => {
5517
5525
  const resp = await requestDatalayer({
5518
- url: `${configuration.iamRunUrl}/api/iam/v1/usage/credits/allocations/organizations/${organizationUid}/overview`,
5526
+ url: `${configuration.iamUrl}/api/iam/v1/usage/credits/allocations/organizations/${organizationUid}/overview`,
5519
5527
  method: 'GET',
5520
5528
  });
5521
5529
  return resp.overview ?? { organization: null, teams: [] };
@@ -5532,7 +5540,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5532
5540
  queryKey: queryKeys.credits.teamOverview(teamUid),
5533
5541
  queryFn: async () => {
5534
5542
  const resp = await requestDatalayer({
5535
- url: `${configuration.iamRunUrl}/api/iam/v1/usage/credits/allocations/teams/${teamUid}/overview`,
5543
+ url: `${configuration.iamUrl}/api/iam/v1/usage/credits/allocations/teams/${teamUid}/overview`,
5536
5544
  method: 'GET',
5537
5545
  });
5538
5546
  return resp.overview ?? { team: null, members: [] };
@@ -5549,7 +5557,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5549
5557
  queryKey: queryKeys.credits.organizationHistory(organizationUid),
5550
5558
  queryFn: async () => {
5551
5559
  const resp = await requestDatalayer({
5552
- url: `${configuration.iamRunUrl}/api/iam/v1/usage/credits/allocations/organizations/${organizationUid}/history`,
5560
+ url: `${configuration.iamUrl}/api/iam/v1/usage/credits/allocations/organizations/${organizationUid}/history`,
5553
5561
  method: 'GET',
5554
5562
  });
5555
5563
  return (resp.history ?? { organization_uid: organizationUid, events: [] });
@@ -5566,7 +5574,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5566
5574
  queryKey: queryKeys.credits.teamHistory(teamUid),
5567
5575
  queryFn: async () => {
5568
5576
  const resp = await requestDatalayer({
5569
- url: `${configuration.iamRunUrl}/api/iam/v1/usage/credits/allocations/teams/${teamUid}/history`,
5577
+ url: `${configuration.iamUrl}/api/iam/v1/usage/credits/allocations/teams/${teamUid}/history`,
5570
5578
  method: 'GET',
5571
5579
  });
5572
5580
  return resp.history ?? { team_uid: teamUid, events: [] };
@@ -5582,7 +5590,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5582
5590
  return useMutation({
5583
5591
  mutationFn: async ({ organizationUid, teamUid, amount, }) => {
5584
5592
  return requestDatalayer({
5585
- url: `${configuration.iamRunUrl}/api/iam/v1/usage/credits/allocations/organizations/${organizationUid}/teams/${teamUid}`,
5593
+ url: `${configuration.iamUrl}/api/iam/v1/usage/credits/allocations/organizations/${organizationUid}/teams/${teamUid}`,
5586
5594
  method: 'POST',
5587
5595
  body: { amount },
5588
5596
  });
@@ -5610,7 +5618,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5610
5618
  return useMutation({
5611
5619
  mutationFn: async ({ teamUid, memberUid, amount, }) => {
5612
5620
  return requestDatalayer({
5613
- url: `${configuration.iamRunUrl}/api/iam/v1/usage/credits/allocations/teams/${teamUid}/members/${memberUid}`,
5621
+ url: `${configuration.iamUrl}/api/iam/v1/usage/credits/allocations/teams/${teamUid}/members/${memberUid}`,
5614
5622
  method: 'POST',
5615
5623
  body: { amount },
5616
5624
  });
@@ -5632,7 +5640,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5632
5640
  return useMutation({
5633
5641
  mutationFn: async ({ organizationUid, teamUid, amount, }) => {
5634
5642
  return requestDatalayer({
5635
- url: `${configuration.iamRunUrl}/api/iam/v1/usage/credits/allocations/organizations/${organizationUid}/teams/${teamUid}/revoke`,
5643
+ url: `${configuration.iamUrl}/api/iam/v1/usage/credits/allocations/organizations/${organizationUid}/teams/${teamUid}/revoke`,
5636
5644
  method: 'POST',
5637
5645
  body: { amount },
5638
5646
  });
@@ -5660,7 +5668,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5660
5668
  return useMutation({
5661
5669
  mutationFn: async ({ teamUid, memberUid, amount, }) => {
5662
5670
  return requestDatalayer({
5663
- url: `${configuration.iamRunUrl}/api/iam/v1/usage/credits/allocations/teams/${teamUid}/members/${memberUid}/revoke`,
5671
+ url: `${configuration.iamUrl}/api/iam/v1/usage/credits/allocations/teams/${teamUid}/members/${memberUid}/revoke`,
5664
5672
  method: 'POST',
5665
5673
  body: { amount },
5666
5674
  });
@@ -5683,7 +5691,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5683
5691
  return useMutation({
5684
5692
  mutationFn: async ({ userId, quota, }) => {
5685
5693
  return requestDatalayer({
5686
- url: `${configuration.iamRunUrl}/api/iam/v1/usage/quota`,
5694
+ url: `${configuration.iamUrl}/api/iam/v1/usage/quota`,
5687
5695
  method: 'PUT',
5688
5696
  body: {
5689
5697
  user_uid: userId,
@@ -5765,7 +5773,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5765
5773
  };
5766
5774
  };
5767
5775
  const resp = await requestDatalayer({
5768
- url: withAccountUidQuery(`${configuration.iamRunUrl}/api/iam/v1/usage/user`, scope?.accountUid),
5776
+ url: withAccountUidQuery(`${configuration.iamUrl}/api/iam/v1/usage/user`, scope?.accountUid),
5769
5777
  method: 'GET',
5770
5778
  });
5771
5779
  // Transform snake_case API response to camelCase IUsage interface
@@ -5832,7 +5840,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5832
5840
  };
5833
5841
  };
5834
5842
  const resp = await requestDatalayer({
5835
- url: `${configuration.iamRunUrl}/api/iam/v1/usage/users/${userId}`,
5843
+ url: `${configuration.iamUrl}/api/iam/v1/usage/users/${userId}`,
5836
5844
  method: 'GET',
5837
5845
  });
5838
5846
  // Transform snake_case API response to camelCase IUsage interface
@@ -5900,7 +5908,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5900
5908
  };
5901
5909
  };
5902
5910
  const resp = await requestDatalayer({
5903
- url: `${configuration.iamRunUrl}/api/iam/v1/usage/platform`,
5911
+ url: `${configuration.iamUrl}/api/iam/v1/usage/platform`,
5904
5912
  method: 'GET',
5905
5913
  });
5906
5914
  // Transform snake_case API response to camelCase IUsage interface
@@ -5935,7 +5943,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5935
5943
  .map(([key, value]) => `${key}=${encodeURIComponent(value)}`)
5936
5944
  .join('&');
5937
5945
  const resp = await requestDatalayer({
5938
- url: `${configuration.libraryRunUrl}/api/library/v1/search?${queryString}`,
5946
+ url: `${configuration.libraryUrl}/api/library/v1/search?${queryString}`,
5939
5947
  method: 'GET',
5940
5948
  });
5941
5949
  if (!resp.success) {
@@ -5992,7 +6000,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
5992
6000
  return useMutation({
5993
6001
  mutationFn: async (accessToken) => {
5994
6002
  return requestDatalayer({
5995
- url: `${configuration.iamRunUrl}/api/iam/v1/proxy/request`,
6003
+ url: `${configuration.iamUrl}/api/iam/v1/proxy/request`,
5996
6004
  method: 'POST',
5997
6005
  body: {
5998
6006
  request_method: 'GET',
@@ -6023,7 +6031,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6023
6031
  },
6024
6032
  };
6025
6033
  return requestDatalayer({
6026
- url: `${configuration.iamRunUrl}/api/iam/v1/proxy/request`,
6034
+ url: `${configuration.iamUrl}/api/iam/v1/proxy/request`,
6027
6035
  method: 'POST',
6028
6036
  body: {
6029
6037
  request_method: 'POST',
@@ -6057,7 +6065,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6057
6065
  },
6058
6066
  };
6059
6067
  const registerResp = await requestDatalayer({
6060
- url: `${configuration.iamRunUrl}/api/iam/v1/proxy/request`,
6068
+ url: `${configuration.iamUrl}/api/iam/v1/proxy/request`,
6061
6069
  method: 'POST',
6062
6070
  body: {
6063
6071
  request_method: 'POST',
@@ -6070,7 +6078,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6070
6078
  const uploadUrl = registerResp.response.value.uploadMechanism['com.linkedin.digitalmedia.uploading.MediaUploadHttpRequest'].uploadUrl;
6071
6079
  // Step 2: Upload image
6072
6080
  await requestDatalayer({
6073
- url: `${configuration.iamRunUrl}/api/iam/v1/proxy/request`,
6081
+ url: `${configuration.iamUrl}/api/iam/v1/proxy/request`,
6074
6082
  method: 'POST',
6075
6083
  body: {
6076
6084
  request_method: 'PUT',
@@ -6123,7 +6131,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6123
6131
  };
6124
6132
  }
6125
6133
  return requestDatalayer({
6126
- url: `${configuration.iamRunUrl}/api/iam/v1/proxy/request`,
6134
+ url: `${configuration.iamUrl}/api/iam/v1/proxy/request`,
6127
6135
  method: 'POST',
6128
6136
  body: {
6129
6137
  request_method: 'POST',
@@ -6145,7 +6153,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6145
6153
  return useMutation({
6146
6154
  mutationFn: async ({ url, token }) => {
6147
6155
  return requestDatalayer({
6148
- url: `${configuration.iamRunUrl}/api/iam/v1/proxy/request`,
6156
+ url: `${configuration.iamUrl}/api/iam/v1/proxy/request`,
6149
6157
  method: 'POST',
6150
6158
  body: {
6151
6159
  request_method: 'GET',
@@ -6163,7 +6171,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6163
6171
  return useMutation({
6164
6172
  mutationFn: async ({ url, body, token, }) => {
6165
6173
  return requestDatalayer({
6166
- url: `${configuration.iamRunUrl}/api/iam/v1/proxy/request`,
6174
+ url: `${configuration.iamUrl}/api/iam/v1/proxy/request`,
6167
6175
  method: 'POST',
6168
6176
  body: {
6169
6177
  request_method: 'POST',
@@ -6182,7 +6190,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6182
6190
  return useMutation({
6183
6191
  mutationFn: async ({ url, body, token, }) => {
6184
6192
  return requestDatalayer({
6185
- url: `${configuration.iamRunUrl}/api/iam/v1/proxy/request`,
6193
+ url: `${configuration.iamUrl}/api/iam/v1/proxy/request`,
6186
6194
  method: 'POST',
6187
6195
  body: {
6188
6196
  request_method: 'PUT',
@@ -6204,7 +6212,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6204
6212
  return useMutation({
6205
6213
  mutationFn: async ({ firstName, lastName, email, affiliation, }) => {
6206
6214
  return requestDatalayer({
6207
- url: `${configuration.growthRunUrl}/api/growth/v1/waitinglist/register`,
6215
+ url: `${configuration.growthUrl}/api/growth/v1/waitinglist/register`,
6208
6216
  method: 'POST',
6209
6217
  body: {
6210
6218
  firstName,
@@ -6224,7 +6232,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6224
6232
  queryKey: ['growth', 'kpi'],
6225
6233
  queryFn: async () => {
6226
6234
  const resp = await requestDatalayer({
6227
- url: `${configuration.growthRunUrl}/api/growth/v1/kpis`,
6235
+ url: `${configuration.growthUrl}/api/growth/v1/kpis`,
6228
6236
  method: 'GET',
6229
6237
  });
6230
6238
  return resp;
@@ -6240,7 +6248,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6240
6248
  queryKey: ['growth', 'contacts-kpi'],
6241
6249
  queryFn: async () => {
6242
6250
  const resp = await requestDatalayer({
6243
- url: `${configuration.growthRunUrl}/api/growth/v1/kpis/contacts`,
6251
+ url: `${configuration.growthUrl}/api/growth/v1/kpis/contacts`,
6244
6252
  method: 'GET',
6245
6253
  });
6246
6254
  return resp;
@@ -6262,7 +6270,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6262
6270
  return useMutation({
6263
6271
  mutationFn: async ({ userId, spaceId, }) => {
6264
6272
  const resp = await requestDatalayer({
6265
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${spaceId}/users/${userId}`,
6273
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${spaceId}/users/${userId}`,
6266
6274
  method: 'GET',
6267
6275
  });
6268
6276
  return resp;
@@ -6288,7 +6296,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6288
6296
  return useMutation({
6289
6297
  mutationFn: async (courseId) => {
6290
6298
  const resp = await requestDatalayer({
6291
- url: `${configuration.spacerRunUrl}/api/spacer/v1/courses/${courseId}`,
6299
+ url: `${configuration.spacerUrl}/api/spacer/v1/courses/${courseId}`,
6292
6300
  method: 'GET',
6293
6301
  });
6294
6302
  return resp;
@@ -6310,7 +6318,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6310
6318
  return useMutation({
6311
6319
  mutationFn: async () => {
6312
6320
  const resp = await requestDatalayer({
6313
- url: `${configuration.libraryRunUrl}/api/library/v1/courses/public`,
6321
+ url: `${configuration.libraryUrl}/api/library/v1/courses/public`,
6314
6322
  method: 'GET',
6315
6323
  });
6316
6324
  return resp;
@@ -6332,7 +6340,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6332
6340
  return useMutation({
6333
6341
  mutationFn: async () => {
6334
6342
  const resp = await requestDatalayer({
6335
- url: `${configuration.spacerRunUrl}/api/spacer/v1/instructors/${user?.id}/courses`,
6343
+ url: `${configuration.spacerUrl}/api/spacer/v1/instructors/${user?.id}/courses`,
6336
6344
  method: 'GET',
6337
6345
  });
6338
6346
  return resp;
@@ -6354,7 +6362,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6354
6362
  return useMutation({
6355
6363
  mutationFn: async () => {
6356
6364
  const resp = await requestDatalayer({
6357
- url: `${configuration.spacerRunUrl}/api/spacer/v1/courses/enrollments/me`,
6365
+ url: `${configuration.spacerUrl}/api/spacer/v1/courses/enrollments/me`,
6358
6366
  method: 'GET',
6359
6367
  });
6360
6368
  return resp;
@@ -6376,7 +6384,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6376
6384
  return useMutation({
6377
6385
  mutationFn: async ({ courseId, studentHandle, }) => {
6378
6386
  const resp = await requestDatalayer({
6379
- url: `${configuration.spacerRunUrl}/api/spacer/v1/courses/${courseId}/enrollments/students/${studentHandle}`,
6387
+ url: `${configuration.spacerUrl}/api/spacer/v1/courses/${courseId}/enrollments/students/${studentHandle}`,
6380
6388
  method: 'GET',
6381
6389
  });
6382
6390
  return resp;
@@ -6398,7 +6406,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6398
6406
  return useMutation({
6399
6407
  mutationFn: async (notebookId) => {
6400
6408
  const resp = await requestDatalayer({
6401
- url: `${configuration.spacerRunUrl}/api/spacer/v1/notebooks/${notebookId}`,
6409
+ url: `${configuration.spacerUrl}/api/spacer/v1/notebooks/${notebookId}`,
6402
6410
  method: 'GET',
6403
6411
  });
6404
6412
  return resp;
@@ -6420,7 +6428,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6420
6428
  return useMutation({
6421
6429
  mutationFn: async (spaceId) => {
6422
6430
  const resp = await requestDatalayer({
6423
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${spaceId}/items/types/notebook`,
6431
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${spaceId}/items/types/notebook`,
6424
6432
  method: 'GET',
6425
6433
  });
6426
6434
  return resp;
@@ -6452,7 +6460,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6452
6460
  return useMutation({
6453
6461
  mutationFn: async (documentId) => {
6454
6462
  const resp = await requestDatalayer({
6455
- url: `${configuration.spacerRunUrl}/api/spacer/v1/lexicals/${documentId}`,
6463
+ url: `${configuration.spacerUrl}/api/spacer/v1/lexicals/${documentId}`,
6456
6464
  method: 'GET',
6457
6465
  });
6458
6466
  return resp;
@@ -6474,7 +6482,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6474
6482
  return useMutation({
6475
6483
  mutationFn: async (spaceId) => {
6476
6484
  const resp = await requestDatalayer({
6477
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${spaceId}/items/types/document`,
6485
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${spaceId}/items/types/document`,
6478
6486
  method: 'GET',
6479
6487
  });
6480
6488
  return resp;
@@ -6496,7 +6504,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6496
6504
  return useMutation({
6497
6505
  mutationFn: async (cellId) => {
6498
6506
  const resp = await requestDatalayer({
6499
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/items/${cellId}`,
6507
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/items/${cellId}`,
6500
6508
  method: 'GET',
6501
6509
  });
6502
6510
  return resp;
@@ -6518,7 +6526,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6518
6526
  return useMutation({
6519
6527
  mutationFn: async (spaceId) => {
6520
6528
  const resp = await requestDatalayer({
6521
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${spaceId}/items/types/cell`,
6529
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${spaceId}/items/types/cell`,
6522
6530
  method: 'GET',
6523
6531
  });
6524
6532
  return resp;
@@ -6540,8 +6548,12 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6540
6548
  return useMutation({
6541
6549
  mutationFn: async (variables) => {
6542
6550
  const datasetId = typeof variables === 'string' ? variables : variables.datasetId;
6543
- const selectedPrincipalUid = typeof variables === 'string' ? undefined : variables.selectedPrincipalUid;
6544
- const selectedPrincipalKind = typeof variables === 'string' ? undefined : variables.selectedPrincipalKind;
6551
+ const selectedPrincipalUid = typeof variables === 'string'
6552
+ ? undefined
6553
+ : variables.selectedPrincipalUid;
6554
+ const selectedPrincipalKind = typeof variables === 'string'
6555
+ ? undefined
6556
+ : variables.selectedPrincipalKind;
6545
6557
  const params = new URLSearchParams();
6546
6558
  if (selectedPrincipalUid) {
6547
6559
  params.set('selected_principal_uid', selectedPrincipalUid);
@@ -6551,7 +6563,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6551
6563
  }
6552
6564
  const query = params.toString();
6553
6565
  const resp = await requestDatalayer({
6554
- url: `${configuration.runtimesRunUrl}/api/runtimes/v1/spaces/items/${datasetId}${query ? `?${query}` : ''}`,
6566
+ url: `${configuration.runtimesUrl}/api/runtimes/v1/spaces/items/${datasetId}${query ? `?${query}` : ''}`,
6555
6567
  method: 'GET',
6556
6568
  });
6557
6569
  return resp;
@@ -6574,8 +6586,12 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6574
6586
  return useMutation({
6575
6587
  mutationFn: async (variables) => {
6576
6588
  const spaceId = typeof variables === 'string' ? variables : variables.spaceId;
6577
- const selectedPrincipalUid = typeof variables === 'string' ? undefined : variables.selectedPrincipalUid;
6578
- const selectedPrincipalKind = typeof variables === 'string' ? undefined : variables.selectedPrincipalKind;
6589
+ const selectedPrincipalUid = typeof variables === 'string'
6590
+ ? undefined
6591
+ : variables.selectedPrincipalUid;
6592
+ const selectedPrincipalKind = typeof variables === 'string'
6593
+ ? undefined
6594
+ : variables.selectedPrincipalKind;
6579
6595
  const params = new URLSearchParams();
6580
6596
  if (selectedPrincipalUid) {
6581
6597
  params.set('selected_principal_uid', selectedPrincipalUid);
@@ -6585,7 +6601,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6585
6601
  }
6586
6602
  const query = params.toString();
6587
6603
  const resp = await requestDatalayer({
6588
- url: `${configuration.runtimesRunUrl}/api/runtimes/v1/spaces/${spaceId}/items/types/dataset${query ? `?${query}` : ''}`,
6604
+ url: `${configuration.runtimesUrl}/api/runtimes/v1/spaces/${spaceId}/items/types/dataset${query ? `?${query}` : ''}`,
6589
6605
  method: 'GET',
6590
6606
  });
6591
6607
  return resp;
@@ -6608,7 +6624,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6608
6624
  return useMutation({
6609
6625
  mutationFn: async () => {
6610
6626
  const resp = await requestDatalayer({
6611
- url: `${configuration.iamRunUrl}/api/iam/v1/organizations/schools`,
6627
+ url: `${configuration.iamUrl}/api/iam/v1/organizations/schools`,
6612
6628
  method: 'GET',
6613
6629
  });
6614
6630
  return resp;
@@ -6628,7 +6644,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6628
6644
  queryKey: queryKeys.items.public(),
6629
6645
  queryFn: async () => {
6630
6646
  const resp = await requestDatalayer({
6631
- url: `${configuration.libraryRunUrl}/api/library/v1/search?q=*&max=-1`,
6647
+ url: `${configuration.libraryUrl}/api/library/v1/search?q=*&max=-1`,
6632
6648
  method: 'GET',
6633
6649
  });
6634
6650
  return {
@@ -6650,7 +6666,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6650
6666
  queryKey: [...queryKeys.items.all(), 'publications'],
6651
6667
  queryFn: async () => {
6652
6668
  const resp = await requestDatalayer({
6653
- url: `${configuration.libraryRunUrl}/api/library/v1/publications`,
6669
+ url: `${configuration.libraryUrl}/api/library/v1/publications`,
6654
6670
  method: 'GET',
6655
6671
  });
6656
6672
  return {
@@ -6672,7 +6688,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6672
6688
  return useMutation({
6673
6689
  mutationFn: async () => {
6674
6690
  const resp = await requestDatalayer({
6675
- url: `${configuration.libraryRunUrl}/api/library/v1/search?q=*&max=-1`,
6691
+ url: `${configuration.libraryUrl}/api/library/v1/search?q=*&max=-1`,
6676
6692
  method: 'GET',
6677
6693
  });
6678
6694
  return {
@@ -6697,7 +6713,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6697
6713
  return useMutation({
6698
6714
  mutationFn: async (spaceId) => {
6699
6715
  const resp = await requestDatalayer({
6700
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${spaceId}/items`,
6716
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${spaceId}/items`,
6701
6717
  method: 'GET',
6702
6718
  });
6703
6719
  return resp;
@@ -6756,7 +6772,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6756
6772
  return useMutation({
6757
6773
  mutationFn: async (environmentId) => {
6758
6774
  const resp = await requestDatalayer({
6759
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/items/${environmentId}`,
6775
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/items/${environmentId}`,
6760
6776
  method: 'GET',
6761
6777
  });
6762
6778
  return resp;
@@ -6778,7 +6794,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6778
6794
  return useMutation({
6779
6795
  mutationFn: async (spaceId) => {
6780
6796
  const resp = await requestDatalayer({
6781
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${spaceId}/items/types/environment`,
6797
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${spaceId}/items/types/environment`,
6782
6798
  method: 'GET',
6783
6799
  });
6784
6800
  return resp;
@@ -6800,7 +6816,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6800
6816
  return useMutation({
6801
6817
  mutationFn: async (lessonId) => {
6802
6818
  const resp = await requestDatalayer({
6803
- url: `${configuration.spacerRunUrl}/api/spacer/v1/lessons/${lessonId}`,
6819
+ url: `${configuration.spacerUrl}/api/spacer/v1/lessons/${lessonId}`,
6804
6820
  method: 'GET',
6805
6821
  });
6806
6822
  return resp;
@@ -6822,7 +6838,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6822
6838
  return useMutation({
6823
6839
  mutationFn: async (spaceId) => {
6824
6840
  const resp = await requestDatalayer({
6825
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${spaceId}/items/types/lesson`,
6841
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${spaceId}/items/types/lesson`,
6826
6842
  method: 'GET',
6827
6843
  });
6828
6844
  return resp;
@@ -6844,7 +6860,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6844
6860
  return useMutation({
6845
6861
  mutationFn: async (exerciseId) => {
6846
6862
  const resp = await requestDatalayer({
6847
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/items/${exerciseId}`,
6863
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/items/${exerciseId}`,
6848
6864
  method: 'GET',
6849
6865
  });
6850
6866
  return resp;
@@ -6866,7 +6882,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6866
6882
  return useMutation({
6867
6883
  mutationFn: async (spaceId) => {
6868
6884
  const resp = await requestDatalayer({
6869
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${spaceId}/items/types/exercise`,
6885
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${spaceId}/items/types/exercise`,
6870
6886
  method: 'GET',
6871
6887
  });
6872
6888
  return resp;
@@ -6888,7 +6904,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6888
6904
  return useMutation({
6889
6905
  mutationFn: async (assignmentId) => {
6890
6906
  const resp = await requestDatalayer({
6891
- url: `${configuration.spacerRunUrl}/api/spacer/v1/assignments/${assignmentId}`,
6907
+ url: `${configuration.spacerUrl}/api/spacer/v1/assignments/${assignmentId}`,
6892
6908
  method: 'GET',
6893
6909
  });
6894
6910
  return resp;
@@ -6910,7 +6926,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6910
6926
  return useMutation({
6911
6927
  mutationFn: async ({ courseId, userId, assignmentId, }) => {
6912
6928
  const resp = await requestDatalayer({
6913
- url: `${configuration.spacerRunUrl}/api/spacer/v1/assignments/${assignmentId}/courses/${courseId}/students/${userId}`,
6929
+ url: `${configuration.spacerUrl}/api/spacer/v1/assignments/${assignmentId}/courses/${courseId}/students/${userId}`,
6914
6930
  method: 'GET',
6915
6931
  });
6916
6932
  return resp;
@@ -6932,7 +6948,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6932
6948
  return useMutation({
6933
6949
  mutationFn: async (spaceId) => {
6934
6950
  const resp = await requestDatalayer({
6935
- url: `${configuration.spacerRunUrl}/api/spacer/v1/spaces/${spaceId}/items/types/assignment`,
6951
+ url: `${configuration.spacerUrl}/api/spacer/v1/spaces/${spaceId}/items/types/assignment`,
6936
6952
  method: 'GET',
6937
6953
  });
6938
6954
  return resp;
@@ -6993,7 +7009,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
6993
7009
  return useMutation({
6994
7010
  mutationFn: async ({ firstName, lastName, email, socialUrl, }) => {
6995
7011
  const resp = await requestDatalayer({
6996
- url: `${configuration.growthRunUrl}/api/growth/v1/invites/request`,
7012
+ url: `${configuration.growthUrl}/api/growth/v1/invites/request`,
6997
7013
  method: 'POST',
6998
7014
  body: {
6999
7015
  first_name: firstName,
@@ -7016,7 +7032,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
7016
7032
  return useMutation({
7017
7033
  mutationFn: async ({ email, firstName, lastName, message, brand, }) => {
7018
7034
  const resp = await requestDatalayer({
7019
- url: `${configuration.growthRunUrl}/api/growth/v1/invites`,
7035
+ url: `${configuration.growthUrl}/api/growth/v1/invites`,
7020
7036
  method: 'POST',
7021
7037
  body: {
7022
7038
  email,
@@ -7043,7 +7059,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
7043
7059
  return useMutation({
7044
7060
  mutationFn: async (token) => {
7045
7061
  const resp = await requestDatalayer({
7046
- url: `${configuration.growthRunUrl}/api/growth/v1/invites/tokens/${token}`,
7062
+ url: `${configuration.growthUrl}/api/growth/v1/invites/tokens/${token}`,
7047
7063
  method: 'GET',
7048
7064
  });
7049
7065
  return resp;
@@ -7063,7 +7079,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
7063
7079
  return useMutation({
7064
7080
  mutationFn: async (accountId) => {
7065
7081
  const resp = await requestDatalayer({
7066
- url: `${configuration.growthRunUrl}/api/growth/v1/invites/users/${accountId}`,
7082
+ url: `${configuration.growthUrl}/api/growth/v1/invites/users/${accountId}`,
7067
7083
  method: 'GET',
7068
7084
  });
7069
7085
  return resp;
@@ -7100,7 +7116,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
7100
7116
  return useMutation({
7101
7117
  mutationFn: async (contactId) => {
7102
7118
  const resp = await requestDatalayer({
7103
- url: `${configuration.growthRunUrl}/api/growth/v1/contacts/${contactId}`,
7119
+ url: `${configuration.growthUrl}/api/growth/v1/contacts/${contactId}`,
7104
7120
  method: 'GET',
7105
7121
  });
7106
7122
  return resp;
@@ -7123,7 +7139,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
7123
7139
  queryKey: ['inbounds', id],
7124
7140
  queryFn: async () => {
7125
7141
  const resp = await requestDatalayer({
7126
- url: `${configuration.inboundsRunUrl}/api/inbounds/v1/inbounds/${id}`,
7142
+ url: `${configuration.inboundsUrl}/api/inbounds/v1/inbounds/${id}`,
7127
7143
  method: 'GET',
7128
7144
  });
7129
7145
  return resp;
@@ -7141,7 +7157,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
7141
7157
  queryKey: ['inbounds', 'handle', handle],
7142
7158
  queryFn: async () => {
7143
7159
  const resp = await requestDatalayer({
7144
- url: `${configuration.inboundsRunUrl}/api/inbounds/v1/inbounds/handles/${handle}`,
7160
+ url: `${configuration.inboundsUrl}/api/inbounds/v1/inbounds/handles/${handle}`,
7145
7161
  method: 'GET',
7146
7162
  });
7147
7163
  return resp;
@@ -7158,7 +7174,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
7158
7174
  return useMutation({
7159
7175
  mutationFn: async (userId) => {
7160
7176
  const resp = await requestDatalayer({
7161
- url: `${configuration.inboundsRunUrl}/api/inbounds/v1/inbounds/${userId}`,
7177
+ url: `${configuration.inboundsUrl}/api/inbounds/v1/inbounds/${userId}`,
7162
7178
  method: 'GET',
7163
7179
  });
7164
7180
  return resp;
@@ -7179,7 +7195,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
7179
7195
  return useMutation({
7180
7196
  mutationFn: async (outboundId) => {
7181
7197
  const resp = await requestDatalayer({
7182
- url: `${configuration.growthRunUrl}/api/growth/v1/outbounds/${outboundId}`,
7198
+ url: `${configuration.growthUrl}/api/growth/v1/outbounds/${outboundId}`,
7183
7199
  method: 'GET',
7184
7200
  });
7185
7201
  return resp;
@@ -7199,7 +7215,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
7199
7215
  queryKey: queryKeys.ray.clusters(),
7200
7216
  queryFn: async () => {
7201
7217
  const resp = await requestDatalayer({
7202
- url: `${configuration.runtimesRunUrl}/api/runtimes/v1/ray/clusters`,
7218
+ url: `${configuration.runtimesUrl}/api/runtimes/v1/ray/clusters`,
7203
7219
  method: 'GET',
7204
7220
  });
7205
7221
  if (!resp.success) {
@@ -7214,7 +7230,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
7214
7230
  },
7215
7231
  ...DEFAULT_QUERY_OPTIONS,
7216
7232
  refetchOnMount: true,
7217
- enabled: Boolean(configuration.runtimesRunUrl),
7233
+ enabled: Boolean(configuration.runtimesUrl),
7218
7234
  });
7219
7235
  };
7220
7236
  const useRayCluster = (namespace = 'default', clusterName = '') => {
@@ -7222,7 +7238,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
7222
7238
  queryKey: queryKeys.ray.cluster(namespace, clusterName),
7223
7239
  queryFn: async () => {
7224
7240
  const resp = await requestDatalayer({
7225
- url: `${configuration.runtimesRunUrl}/api/runtimes/v1/ray/clusters/${encodeURIComponent(clusterName)}?namespace=${encodeURIComponent(namespace)}`,
7241
+ url: `${configuration.runtimesUrl}/api/runtimes/v1/ray/clusters/${encodeURIComponent(clusterName)}?namespace=${encodeURIComponent(namespace)}`,
7226
7242
  method: 'GET',
7227
7243
  });
7228
7244
  if (!resp.success) {
@@ -7231,7 +7247,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
7231
7247
  return resp.cluster || null;
7232
7248
  },
7233
7249
  ...DEFAULT_QUERY_OPTIONS,
7234
- enabled: Boolean(configuration.runtimesRunUrl) &&
7250
+ enabled: Boolean(configuration.runtimesUrl) &&
7235
7251
  Boolean(namespace) &&
7236
7252
  Boolean(clusterName),
7237
7253
  });
@@ -7240,7 +7256,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
7240
7256
  return useMutation({
7241
7257
  mutationFn: async (payload) => {
7242
7258
  const resp = await requestDatalayer({
7243
- url: `${configuration.runtimesRunUrl}/api/runtimes/v1/ray/clusters`,
7259
+ url: `${configuration.runtimesUrl}/api/runtimes/v1/ray/clusters`,
7244
7260
  method: 'POST',
7245
7261
  body: payload,
7246
7262
  });
@@ -7258,7 +7274,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
7258
7274
  return useMutation({
7259
7275
  mutationFn: async (clusterName) => {
7260
7276
  return requestDatalayer({
7261
- url: `${configuration.runtimesRunUrl}/api/runtimes/v1/ray/clusters/${encodeURIComponent(clusterName)}?namespace=${encodeURIComponent(namespace)}`,
7277
+ url: `${configuration.runtimesUrl}/api/runtimes/v1/ray/clusters/${encodeURIComponent(clusterName)}?namespace=${encodeURIComponent(namespace)}`,
7262
7278
  method: 'DELETE',
7263
7279
  });
7264
7280
  },
@@ -7277,7 +7293,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
7277
7293
  params.set('cluster_name', clusterName);
7278
7294
  }
7279
7295
  const resp = await requestDatalayer({
7280
- url: `${configuration.runtimesRunUrl}/api/runtimes/v1/ray/jobs?${params.toString()}`,
7296
+ url: `${configuration.runtimesUrl}/api/runtimes/v1/ray/jobs?${params.toString()}`,
7281
7297
  method: 'GET',
7282
7298
  });
7283
7299
  if (!resp.success) {
@@ -7286,14 +7302,14 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
7286
7302
  return asArray(resp.jobs);
7287
7303
  },
7288
7304
  ...DEFAULT_QUERY_OPTIONS,
7289
- enabled: Boolean(configuration.runtimesRunUrl),
7305
+ enabled: Boolean(configuration.runtimesUrl),
7290
7306
  });
7291
7307
  };
7292
7308
  const useSubmitRayJob = (clusterName) => {
7293
7309
  return useMutation({
7294
7310
  mutationFn: async (payload) => {
7295
7311
  return requestDatalayer({
7296
- url: `${configuration.runtimesRunUrl}/api/runtimes/v1/ray/clusters/${encodeURIComponent(clusterName)}/jobs`,
7312
+ url: `${configuration.runtimesUrl}/api/runtimes/v1/ray/clusters/${encodeURIComponent(clusterName)}/jobs`,
7297
7313
  method: 'POST',
7298
7314
  body: payload,
7299
7315
  });
@@ -7307,7 +7323,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
7307
7323
  return useMutation({
7308
7324
  mutationFn: async (jobName) => {
7309
7325
  return requestDatalayer({
7310
- url: `${configuration.runtimesRunUrl}/api/runtimes/v1/ray/jobs/${encodeURIComponent(jobName)}?namespace=${encodeURIComponent(namespace)}`,
7326
+ url: `${configuration.runtimesUrl}/api/runtimes/v1/ray/jobs/${encodeURIComponent(jobName)}?namespace=${encodeURIComponent(namespace)}`,
7311
7327
  method: 'DELETE',
7312
7328
  });
7313
7329
  },
@@ -7324,7 +7340,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
7324
7340
  params.set('namespace', namespace);
7325
7341
  params.set('tail_lines', String(tailLines));
7326
7342
  const resp = await requestDatalayer({
7327
- url: `${configuration.runtimesRunUrl}/api/runtimes/v1/ray/jobs/${encodeURIComponent(jobName)}/logs?${params.toString()}`,
7343
+ url: `${configuration.runtimesUrl}/api/runtimes/v1/ray/jobs/${encodeURIComponent(jobName)}/logs?${params.toString()}`,
7328
7344
  method: 'GET',
7329
7345
  // Logs naturally 404 once a job is deleted; never surface a toast.
7330
7346
  notifyOnError: false,
@@ -7338,7 +7354,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
7338
7354
  };
7339
7355
  },
7340
7356
  ...DEFAULT_QUERY_OPTIONS,
7341
- enabled: Boolean(configuration.runtimesRunUrl) && Boolean(jobName) && enabled,
7357
+ enabled: Boolean(configuration.runtimesUrl) && Boolean(jobName) && enabled,
7342
7358
  refetchOnMount: 'always',
7343
7359
  refetchInterval: query => {
7344
7360
  const status = String(query.state.data?.status || '').toLowerCase();