@raystack/frontier 0.96.2 → 0.97.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -196,8 +196,8 @@ function converBillingAddressToString(address) {
196
196
  // admin/views/roles/columns.tsx
197
197
  import { Flex } from "@raystack/apsara";
198
198
 
199
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-vgGU4i26fpUt/sdk/admin/views/roles/roles.module.css.js
200
- var digest = "f19338cc90d88716e4a13febbdfb84b95aa3cf2736f36bb31f5e7aca152eeb10";
199
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-uUmwIekkggnS/sdk/admin/views/roles/roles.module.css.js
200
+ var digest = "ecd0108f02d258e5425dbfd150880918effa470963c8a0a94a343f688c43bf2a";
201
201
  var css = `._tableRoot_4yb15_1 {
202
202
  width: 100%;
203
203
  }
@@ -282,8 +282,8 @@ import { DataTable } from "@raystack/apsara";
282
282
  // admin/components/PageHeader.tsx
283
283
  import { Flex as Flex2, Text } from "@raystack/apsara";
284
284
 
285
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-n0BwlF7WikHK/sdk/admin/components/page-header.module.css.js
286
- var digest2 = "d72fcf51a2e836032d616751b5c79c7bb230d86abf5b3b905b34652f45ae3560";
285
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-IX66ujiDL5C0/sdk/admin/components/page-header.module.css.js
286
+ var digest2 = "02f11de24bb979b896bcb85298f7f4e694047cbb0247072d56d688b89b763bf3";
287
287
  var css2 = `._breadcrumb_1kaun_1 {
288
288
  list-style: none;
289
289
  padding: 0;
@@ -389,8 +389,8 @@ function PageHeader({
389
389
  );
390
390
  }
391
391
 
392
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-S6gIptbJb0iL/sdk/admin/views/roles/roles.module.css.js
393
- var digest3 = "3446f4d1a067dbae8afc1cb1c361a22ad5d3e62ca1c0840e3233298aa7615e1f";
392
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-tiSvwjIyLkW5/sdk/admin/views/roles/roles.module.css.js
393
+ var digest3 = "ef3c7149da645c9573262b77a01bedb74eb9fa08eb4af403ecd3324813601070";
394
394
  var css3 = `._tableRoot_4yb15_1 {
395
395
  width: 100%;
396
396
  }
@@ -876,8 +876,8 @@ function PageTitle({ title, appName }) {
876
876
  return null;
877
877
  }
878
878
 
879
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-vqpkaVFq0869/sdk/admin/views/roles/roles.module.css.js
880
- var digest4 = "82c0272d2b8bef8284b9a622eb90b11a32db310a5ff08480e0aba98d29c10bf9";
879
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-TMHRTtxy0heB/sdk/admin/views/roles/roles.module.css.js
880
+ var digest4 = "57132213ac675140c8e304026dfe2eba97cff486a73c552798897f65f34b9054";
881
881
  var css4 = `._tableRoot_4yb15_1 {
882
882
  width: 100%;
883
883
  }
@@ -1059,8 +1059,8 @@ import { useState as useState3 } from "react";
1059
1059
  // admin/views/invoices/navbar.tsx
1060
1060
  import { DataTable as DataTable3, Flex as Flex6, IconButton, Text as Text4 } from "@raystack/apsara";
1061
1061
 
1062
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-OZeF5QblBGy4/sdk/admin/views/invoices/invoices.module.css.js
1063
- var digest5 = "b8ef550b69f744bdd74ce37ffbbb905577a551bdfa39e0fce6b9dc9e66113bd9";
1062
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-duXHx15W8Whg/sdk/admin/views/invoices/invoices.module.css.js
1063
+ var digest5 = "ef8b2662aff615fdaa78e96fcc094ca3380836acc4bd5fd80da6447f27ddc68b";
1064
1064
  var css5 = `._navbar_9c4wr_1 {
1065
1065
  padding: var(--rs-space-4) var(--rs-space-7);
1066
1066
  border-bottom: 0.5px solid var(--rs-color-border-base-primary);
@@ -1178,8 +1178,8 @@ var InvoicesNavabar = ({ searchQuery }) => {
1178
1178
  ] });
1179
1179
  };
1180
1180
 
1181
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-YHogOw0smzQR/sdk/admin/views/invoices/invoices.module.css.js
1182
- var digest6 = "0c9ac5cef305bdaf181b39c2ab9b62317af7f527248883f54dcd6b0cf9880f8b";
1181
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-WcXaxyZY5pmQ/sdk/admin/views/invoices/invoices.module.css.js
1182
+ var digest6 = "7beb91fca58acb371c4ed40dea019af80ab43d9caac157e1561647b7e7e6c2af";
1183
1183
  var css6 = `._navbar_9c4wr_1 {
1184
1184
  padding: var(--rs-space-4) var(--rs-space-7);
1185
1185
  border-bottom: 0.5px solid var(--rs-color-border-base-primary);
@@ -1725,8 +1725,8 @@ var getColumns3 = (onNavigateToPrices) => {
1725
1725
  // admin/views/products/header.tsx
1726
1726
  import { DataTable as DataTable5 } from "@raystack/apsara";
1727
1727
 
1728
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-j4pwGZnW1Z5I/sdk/admin/views/products/products.module.css.js
1729
- var digest7 = "9f6d77e1f602d71f465fc5676ee727f20691ff281d4c5065b9f6ca7d25b4b3fb";
1728
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-aispJtTtdPMY/sdk/admin/views/products/products.module.css.js
1729
+ var digest7 = "ef2b0993bea7fc58db195354e9c72ea31d9265b18a26bc2cea2b3c22cc5eb5f9";
1730
1730
  var css7 = `._tableRoot_1lzjd_1 {
1731
1731
  width: 100%;
1732
1732
  }
@@ -1797,8 +1797,8 @@ var ProductsHeader = ({
1797
1797
  );
1798
1798
  };
1799
1799
 
1800
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-fJAqdh2Z3m1b/sdk/admin/views/products/products.module.css.js
1801
- var digest8 = "725ddc4771be775cb81b035dbe0c2bdd3e1768c40d662b76bffcb6b66d4b2c01";
1800
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-uxzxFsAGHPm9/sdk/admin/views/products/products.module.css.js
1801
+ var digest8 = "8970af0b77bac69dd7a93b4cbb9df54a5fc991d9cc2429544ea06ffbabfba00d";
1802
1802
  var css8 = `._tableRoot_1lzjd_1 {
1803
1803
  width: 100%;
1804
1804
  }
@@ -1850,8 +1850,8 @@ var products_module_css_default2 = { "tableRoot": "_tableRoot_1lzjd_1", "tableWr
1850
1850
  // admin/views/products/details.tsx
1851
1851
  import { Flex as Flex9, Text as Text6, Grid as Grid2, Sheet as Sheet2 } from "@raystack/apsara";
1852
1852
 
1853
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-B0DBWoOUZnMR/sdk/admin/views/products/products.module.css.js
1854
- var digest9 = "fdfe27bb3cf483968b8ad045afea88e25cf797223c392697944b894d7356e058";
1853
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-UDC3r40v03sv/sdk/admin/views/products/products.module.css.js
1854
+ var digest9 = "a74919f9f6ff3d40d775e25087741d26cfa1628fed8213768baa59466090e34f";
1855
1855
  var css9 = `._tableRoot_1lzjd_1 {
1856
1856
  width: 100%;
1857
1857
  }
@@ -2201,8 +2201,8 @@ function CpuChipIcon(props) {
2201
2201
  );
2202
2202
  }
2203
2203
 
2204
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-qpgF05hD8kZr/sdk/admin/views/audit-logs/audit-logs.module.css.js
2205
- var digest10 = "847e305d832796cae7827e1a9e7beeed55719618a2d902d9856f8b9f09325e5d";
2204
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-5qybHnpXIYSz/sdk/admin/views/audit-logs/audit-logs.module.css.js
2205
+ var digest10 = "a749ba489cd185323f8181f7773e84b9bec4a208370fb607d9d657f11e90f0bc";
2206
2206
  var css10 = `._navbar_sfza7_1 {
2207
2207
  padding: var(--rs-space-4) var(--rs-space-7);
2208
2208
  border-bottom: 0.5px solid var(--rs-color-border-base-primary);
@@ -2420,8 +2420,8 @@ var Navbar = ({ searchQuery, onExportCsv }) => {
2420
2420
  };
2421
2421
  var navbar_default = Navbar;
2422
2422
 
2423
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-UZg0BxmBm784/sdk/admin/views/audit-logs/audit-logs.module.css.js
2424
- var digest11 = "26e1b7387e6c6254602efdc427e18415fd086c8070832230b5eb530672a31212";
2423
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-wU0BzEhG4LiT/sdk/admin/views/audit-logs/audit-logs.module.css.js
2424
+ var digest11 = "decf85ba3f638d0952769db2ac8466ba3f80a9830e8aac2657c5a153afc8fe51";
2425
2425
  var css11 = `._navbar_sfza7_1 {
2426
2426
  padding: var(--rs-space-4) var(--rs-space-7);
2427
2427
  border-bottom: 0.5px solid var(--rs-color-border-base-primary);
@@ -2531,8 +2531,8 @@ var audit_logs_module_css_default2 = { "navbar": "_navbar_sfza7_1", "table": "_t
2531
2531
  import { Badge, Flex as Flex14, Text as Text9 } from "@raystack/apsara";
2532
2532
  import dayjs3 from "dayjs";
2533
2533
 
2534
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-yvhGWdG3d39A/sdk/admin/views/audit-logs/audit-logs.module.css.js
2535
- var digest12 = "15c61f323a1df4227f09d8fea1ed83ae8a7ce2552e2b3d0e6f8bb6a1744183df";
2534
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-52pczg2thw2q/sdk/admin/views/audit-logs/audit-logs.module.css.js
2535
+ var digest12 = "732b25bec37de7ee75909de6d09fe7f1a14c26c1f51684229adb4d759548e130";
2536
2536
  var css12 = `._navbar_sfza7_1 {
2537
2537
  padding: var(--rs-space-4) var(--rs-space-7);
2538
2538
  border-bottom: 0.5px solid var(--rs-color-border-base-primary);
@@ -2797,8 +2797,8 @@ import {
2797
2797
  import { Flex as Flex16, IconButton as IconButton4, SidePanel } from "@raystack/apsara";
2798
2798
  import { List as List3 } from "@raystack/apsara";
2799
2799
 
2800
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-5oUutAqaU8O3/sdk/admin/views/audit-logs/audit-logs.module.css.js
2801
- var digest13 = "30f580490846021b80d16ab4ba31f274a3f572a26ebd44c256e9e65053fdf224";
2800
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-JJscjF5hE6Ue/sdk/admin/views/audit-logs/audit-logs.module.css.js
2801
+ var digest13 = "1e630530084aa97405783905f239c3744b9af7765ff1dd42287317c524737ae9";
2802
2802
  var css13 = `._navbar_sfza7_1 {
2803
2803
  padding: var(--rs-space-4) var(--rs-space-7);
2804
2804
  border-bottom: 0.5px solid var(--rs-color-border-base-primary);
@@ -2935,8 +2935,8 @@ function MapIcon(props) {
2935
2935
  // admin/views/audit-logs/sidepanel-log-dialog.tsx
2936
2936
  import { Dialog, IconButton as IconButton3, CodeBlock } from "@raystack/apsara";
2937
2937
 
2938
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-gYR0rWaWyNYw/sdk/admin/views/audit-logs/audit-logs.module.css.js
2939
- var digest14 = "d212627c4754c4e1cd20919c7de8b61e641c7f360ce145d85e0baf188e33b9de";
2938
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-jxJArmYnjhYA/sdk/admin/views/audit-logs/audit-logs.module.css.js
2939
+ var digest14 = "6faaf3562b7224c1852dc6db8e3cfd2a672eafdf8211867f6fe7be9a85aa4a84";
2940
2940
  var css14 = `._navbar_sfza7_1 {
2941
2941
  padding: var(--rs-space-4) var(--rs-space-7);
2942
2942
  border-bottom: 0.5px solid var(--rs-color-border-base-primary);
@@ -3139,8 +3139,8 @@ function SidePanelLogDialog(props) {
3139
3139
  // admin/views/audit-logs/sidepanel-list-link.tsx
3140
3140
  import { Button, List } from "@raystack/apsara";
3141
3141
 
3142
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-6aNUnLRwEBrq/sdk/admin/views/audit-logs/audit-logs.module.css.js
3143
- var digest15 = "6f6607829b25caf188478615a47fb8e7ef70a11f81424908df5346d468db4dec";
3142
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-RmL6MXvAkdsM/sdk/admin/views/audit-logs/audit-logs.module.css.js
3143
+ var digest15 = "adbb1032f340c47ea7352fed8e11b6dff5a2b4060b7f1e8faa0be6b24c1f3e9a";
3144
3144
  var css15 = `._navbar_sfza7_1 {
3145
3145
  padding: var(--rs-space-4) var(--rs-space-7);
3146
3146
  border-bottom: 0.5px solid var(--rs-color-border-base-primary);
@@ -3281,8 +3281,8 @@ function SidepanelListItemLink({
3281
3281
  // admin/views/audit-logs/sidepanel-list-id.tsx
3282
3282
  import { CopyButton, Flex as Flex15, List as List2, Text as Text10, Tooltip } from "@raystack/apsara";
3283
3283
 
3284
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-iZxtj5M0aMGu/sdk/admin/views/audit-logs/audit-logs.module.css.js
3285
- var digest16 = "7980c75109c026531ee71641981305d4385f857f6f8b73bf8ec7863fa52e261d";
3284
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-DZb4Lgx2212d/sdk/admin/views/audit-logs/audit-logs.module.css.js
3285
+ var digest16 = "ca42d73f8c473eeab2aa1374dc22e95eba54ac7bd6c0c344b092affb31c5c804";
3286
3286
  var css16 = `._navbar_sfza7_1 {
3287
3287
  padding: var(--rs-space-4) var(--rs-space-7);
3288
3288
  border-bottom: 0.5px solid var(--rs-color-border-base-primary);
@@ -3848,8 +3848,8 @@ var getColumns6 = ({ onNavigateToOrg, t } = {}) => {
3848
3848
  ];
3849
3849
  };
3850
3850
 
3851
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-196iH6FWi2GB/sdk/admin/views/admins/admins.module.css.js
3852
- var digest17 = "6367a410c0799a7043a6121e503b7acd482cb38198573f9a267e08131d18e45e";
3851
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-RjDcc6MQRjJ1/sdk/admin/views/admins/admins.module.css.js
3852
+ var digest17 = "5cd72e71043cbf53835fc5b3e7ee4bdaad1e4bae5b647fd8be2ea3b6fcb9c299";
3853
3853
  var css17 = `._tableRoot_yd6a0_1 {
3854
3854
  width: 100%;
3855
3855
  }
@@ -4006,8 +4006,8 @@ var getColumns7 = ({ onSelectPlan } = {}) => {
4006
4006
  // admin/views/plans/header.tsx
4007
4007
  import { DataTable as DataTable11 } from "@raystack/apsara";
4008
4008
 
4009
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-9MWZz30cMp1V/sdk/admin/views/plans/plans.module.css.js
4010
- var digest18 = "9741cdd82f7966dfe77bb21a38bbd20a199cdbea7a1ea57cd50681accf6ed03e";
4009
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-rAfS3ndVFXG4/sdk/admin/views/plans/plans.module.css.js
4010
+ var digest18 = "1bdd0d5a99cd16ab65c6abb7d8dc4715b78486c09f076620b61e7a828bfbe05a";
4011
4011
  var css18 = `._tableRoot_1d6xr_1 {
4012
4012
  width: 100%;
4013
4013
  }
@@ -4060,8 +4060,8 @@ var PlanHeader = ({ header }) => {
4060
4060
  );
4061
4061
  };
4062
4062
 
4063
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-La81EEO6Zh7e/sdk/admin/views/plans/plans.module.css.js
4064
- var digest19 = "f00596c8c79360e62e8226dca4a6a562f8998b0f2f1dc0bd8e707b2b86b68d58";
4063
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-YrOlzWEX8H1W/sdk/admin/views/plans/plans.module.css.js
4064
+ var digest19 = "4476b57e31c4acd05bbdfbc7274f7fdffe2886629c1b37e4907af596ef916c13";
4065
4065
  var css19 = `._tableRoot_1d6xr_1 {
4066
4066
  width: 100%;
4067
4067
  }
@@ -4215,8 +4215,8 @@ import {
4215
4215
  Text as Text15
4216
4216
  } from "@raystack/apsara";
4217
4217
 
4218
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-6fCxbr9sVnC3/sdk/admin/views/webhooks/webhooks/webhooks.module.css.js
4219
- var digest20 = "5c089fef062aa5078ce6e880a511274706efff6f3e2707180a3c8d32fd359414";
4218
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-GTvRWztXwM9y/sdk/admin/views/webhooks/webhooks/webhooks.module.css.js
4219
+ var digest20 = "162787fed76325bccf81086e91906d3a852ffae69fe65af7d6ba6c6438b8ad57";
4220
4220
  var css20 = `._tableRoot_h8n52_1 {
4221
4221
  width: 100%;
4222
4222
  }
@@ -4743,8 +4743,8 @@ var getColumns8 = ({ openEditPage, deleteWebhookMutation, enableDelete }) => {
4743
4743
  // admin/views/webhooks/webhooks/header.tsx
4744
4744
  import { Button as Button3, DataTable as DataTable13 } from "@raystack/apsara";
4745
4745
 
4746
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-WydF0YyyalfW/sdk/admin/views/webhooks/webhooks/webhooks.module.css.js
4747
- var digest21 = "f97148663d716045dedfff958ffe3ad9320c9d081aeb6462dd45829308734bd3";
4746
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-4FIVCe2qWTDW/sdk/admin/views/webhooks/webhooks/webhooks.module.css.js
4747
+ var digest21 = "eab4cbcf663da02d2f37dfc9e0f1213e6dd22278584d6425d1b64a4484527fe0";
4748
4748
  var css21 = `._tableRoot_h8n52_1 {
4749
4749
  width: 100%;
4750
4750
  }
@@ -4826,8 +4826,8 @@ var WebhooksHeader = ({ header = pageHeader4, onOpenCreate }) => {
4826
4826
  );
4827
4827
  };
4828
4828
 
4829
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-c5Nx6tEBiA4w/sdk/admin/views/webhooks/webhooks/webhooks.module.css.js
4830
- var digest22 = "cb5405b882b6dce58f66057a462df988814607b631d63be3dfa81cfc7aa7843b";
4829
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-rAO5ufGtbL22/sdk/admin/views/webhooks/webhooks/webhooks.module.css.js
4830
+ var digest22 = "6ca32a1f0b5e42545da823d9514f8df606bc3f88ea0e3b85e0d91f09b71c9446";
4831
4831
  var css22 = `._tableRoot_h8n52_1 {
4832
4832
  width: 100%;
4833
4833
  }
@@ -10424,8 +10424,8 @@ import { EmptyState as EmptyState9, DataTable as DataTable15, Flex as Flex30 } f
10424
10424
  // admin/views/preferences/columns.tsx
10425
10425
  import { Text as Text17 } from "@raystack/apsara";
10426
10426
 
10427
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-wVzebv1aMkYx/sdk/admin/views/preferences/preferences.module.css.js
10428
- var digest23 = "b3df6b1670bbc1ffd2ffa1e26f5ad86cd53248e10e9794c87de215368b895b60";
10427
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-Lxf7v7WBWTrP/sdk/admin/views/preferences/preferences.module.css.js
10428
+ var digest23 = "1c037f3b2530be0e682b365bf9c08bb652c7562fa5a7612858b580d530e150fb";
10429
10429
  var css23 = `._tableRoot_j5y5o_1 {
10430
10430
  width: 100%;
10431
10431
  }
@@ -10507,8 +10507,8 @@ var getColumns9 = ({
10507
10507
  ];
10508
10508
  };
10509
10509
 
10510
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-v9AwUEXFfSDp/sdk/admin/views/preferences/preferences.module.css.js
10511
- var digest24 = "38681b5b85ada5444ab5b6b3905fa948a806a795a8d3a2e3a0086ee6de7ddd20";
10510
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-4D7sDuKmOVDt/sdk/admin/views/preferences/preferences.module.css.js
10511
+ var digest24 = "bcab1f39ee9b6c64eeda3f3cd0fc45ab965f2206deae268dd37d0056292b8e53";
10512
10512
  var css24 = `._tableRoot_j5y5o_1 {
10513
10513
  width: 100%;
10514
10514
  }
@@ -10870,8 +10870,8 @@ import {
10870
10870
  Spinner as Spinner2
10871
10871
  } from "@raystack/apsara";
10872
10872
 
10873
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-ZZoMNlImifhw/sdk/admin/views/users/list/list.module.css.js
10874
- var digest25 = "ce224e7ba8affee378ca56abb45719aa7855d6aa2c628d2dfc8e1df3725047b1";
10873
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-o3hjANRLULym/sdk/admin/views/users/list/list.module.css.js
10874
+ var digest25 = "b8235bcc83a677cccb062026ba2507ddfa8b9b4ad0e38aa6540dab75328e0fc9";
10875
10875
  var css25 = `._navbar_1s15g_1 {
10876
10876
  padding: var(--rs-space-4) var(--rs-space-7);
10877
10877
  border-bottom: 0.5px solid var(--rs-color-border-base-primary);
@@ -10974,8 +10974,8 @@ import {
10974
10974
  import { Controller as Controller2, useForm as useForm3 } from "react-hook-form";
10975
10975
  import { zodResolver as zodResolver3 } from "@hookform/resolvers/zod";
10976
10976
 
10977
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-KXQJOICE7s2v/sdk/admin/views/users/list/invite-users.module.css.js
10978
- var digest26 = "d1b80d74775cd0394393389b8269f2b4c8828db21f300c698778497580049505";
10977
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-lv1FNA7Wr1WL/sdk/admin/views/users/list/invite-users.module.css.js
10978
+ var digest26 = "c72fccd179d1aac044fb28e870e9deb9b293a613bb0b1425d8d79484d93af3b4";
10979
10979
  var css26 = `._invite-users-dialog-body_11ujx_1 {
10980
10980
  display: flex;
10981
10981
  flex-direction: column;
@@ -11018,6 +11018,34 @@ import {
11018
11018
  ListRolesRequestSchema
11019
11019
  } from "@raystack/proton/frontier";
11020
11020
  import { create as create5 } from "@bufbuild/protobuf";
11021
+
11022
+ // utils/error.ts
11023
+ import { Code, ConnectError } from "@connectrpc/connect";
11024
+ var DEFAULT_ERROR_MESSAGE = "Something went wrong";
11025
+ function handleConnectError(error, handlers) {
11026
+ const connectError = error instanceof ConnectError ? error : new ConnectError(
11027
+ typeof error === "string" ? error : error instanceof Error ? error.message : DEFAULT_ERROR_MESSAGE
11028
+ );
11029
+ const defaultHandler = handlers?.Default ?? ((err) => console.error(err.message));
11030
+ switch (connectError.code) {
11031
+ case Code.AlreadyExists:
11032
+ handlers?.AlreadyExists ? handlers.AlreadyExists(connectError) : defaultHandler(connectError);
11033
+ break;
11034
+ case Code.InvalidArgument:
11035
+ handlers?.InvalidArgument ? handlers.InvalidArgument(connectError) : defaultHandler(connectError);
11036
+ break;
11037
+ case Code.PermissionDenied:
11038
+ handlers?.PermissionDenied ? handlers.PermissionDenied(connectError) : defaultHandler(connectError);
11039
+ break;
11040
+ case Code.NotFound:
11041
+ handlers?.NotFound ? handlers.NotFound(connectError) : defaultHandler(connectError);
11042
+ break;
11043
+ default:
11044
+ defaultHandler(connectError);
11045
+ }
11046
+ }
11047
+
11048
+ // admin/views/users/list/invite-users.tsx
11021
11049
  import { Fragment as Fragment11, jsx as jsx56, jsxs as jsxs33 } from "react/jsx-runtime";
11022
11050
  var inviteSchema = objectType({
11023
11051
  role: stringType(),
@@ -11077,9 +11105,6 @@ var InviteUser = () => {
11077
11105
  const { mutateAsync: inviteUser } = useMutation5(
11078
11106
  FrontierServiceQueries6.createOrganizationInvitation,
11079
11107
  {
11080
- onError: (error) => {
11081
- console.error("Failed to invite user", error);
11082
- },
11083
11108
  onSuccess: (data) => {
11084
11109
  const invitedCount = data?.invitations?.length ?? 0;
11085
11110
  toast.success(
@@ -11093,11 +11118,20 @@ var InviteUser = () => {
11093
11118
  const onSubmit = async (data) => {
11094
11119
  if (!data.organizationId)
11095
11120
  return;
11096
- return inviteUser({
11097
- orgId: data.organizationId,
11098
- userIds: data?.emails,
11099
- roleIds: data?.role ? [data?.role] : []
11100
- });
11121
+ try {
11122
+ await inviteUser({
11123
+ orgId: data.organizationId,
11124
+ userIds: data?.emails,
11125
+ roleIds: data?.role ? [data?.role] : []
11126
+ });
11127
+ } catch (error) {
11128
+ handleConnectError(error, {
11129
+ AlreadyExists: () => toast.error("Invitation already exists"),
11130
+ InvalidArgument: (err) => toast.error("Invalid input", { description: err.message }),
11131
+ PermissionDenied: () => toast.error("You don't have permission to perform this action"),
11132
+ Default: (err) => toast.error("Something went wrong", { description: err.message })
11133
+ });
11134
+ }
11101
11135
  };
11102
11136
  return /* @__PURE__ */ jsxs33(Dialog3, { open, onOpenChange, children: [
11103
11137
  /* @__PURE__ */ jsx56(Dialog3.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs33(
@@ -11313,8 +11347,8 @@ var Navbar2 = ({ searchQuery, onExportUsers }) => {
11313
11347
  };
11314
11348
  var navbar_default2 = Navbar2;
11315
11349
 
11316
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-7wQlfoF4SFvG/sdk/admin/views/users/list/list.module.css.js
11317
- var digest27 = "7d4393e788b89f60df5e256670dd2091590673a89e09a565da70e0731485572e";
11350
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-RTgq6afi63S7/sdk/admin/views/users/list/list.module.css.js
11351
+ var digest27 = "50f0078ffc08a7062510eabdc00d9d74153d51e173359f0d4934fa20f3173b29";
11318
11352
  var css27 = `._navbar_1s15g_1 {
11319
11353
  padding: var(--rs-space-4) var(--rs-space-7);
11320
11354
  border-bottom: 0.5px solid var(--rs-color-border-base-primary);
@@ -11384,8 +11418,8 @@ import {
11384
11418
  } from "@raystack/apsara";
11385
11419
  import dayjs7 from "dayjs";
11386
11420
 
11387
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-uHnS4JXryRpQ/sdk/admin/views/users/list/list.module.css.js
11388
- var digest28 = "234d4d38205ce09909b0fb0c4d140d0d0d879ad0c942d1ac35a97803835e87c6";
11421
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-2e0EKvWsnHhc/sdk/admin/views/users/list/list.module.css.js
11422
+ var digest28 = "c4cdc31bada3214a82a401b6a25b37f08f3523a9ec86bb69f9a041e63c1b4b07";
11389
11423
  var css28 = `._navbar_1s15g_1 {
11390
11424
  padding: var(--rs-space-4) var(--rs-space-7);
11391
11425
  border-bottom: 0.5px solid var(--rs-color-border-base-primary);
@@ -11677,8 +11711,8 @@ import { Avatar as Avatar4, getAvatarColor as getAvatarColor3, SidePanel as Side
11677
11711
  // admin/views/users/details/layout/side-panel-details.tsx
11678
11712
  import { Flex as Flex37, List as List4, Text as Text22, CopyButton as CopyButton2, Tooltip as Tooltip2 } from "@raystack/apsara";
11679
11713
 
11680
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-83TUQrlrMjkH/sdk/admin/views/users/details/layout/side-panel.module.css.js
11681
- var digest29 = "d51a4674bc73c38b5cebd4a88cab16e65b22e467d39e1c13eadeae9286c22639";
11714
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-i8YvCDIVjdE7/sdk/admin/views/users/details/layout/side-panel.module.css.js
11715
+ var digest29 = "a3ee3fafd3d4e61c2fad8b633d664ea45773d2dbdcf2deb2367e8a195409a2d7";
11682
11716
  var css29 = `._side-panel_1oc3f_1 {
11683
11717
  transform: all 0.3s ease-in-out;
11684
11718
  padding-bottom: 80px;
@@ -11785,8 +11819,8 @@ var SidePanelDetails2 = () => {
11785
11819
  import { Flex as Flex40, List as List5, Text as Text26, Avatar as Avatar3 } from "@raystack/apsara";
11786
11820
  import dayjs8 from "dayjs";
11787
11821
 
11788
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-GM8fTn3laCoL/sdk/admin/views/users/details/layout/side-panel.module.css.js
11789
- var digest30 = "01d1547f4da568a1e8b298b0dbbc9334df3c03dbe0a917e26acad60f9608d104";
11822
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-mtsqGYiMuIeT/sdk/admin/views/users/details/layout/side-panel.module.css.js
11823
+ var digest30 = "0237ec9e37eb8d0ffe9998a44ef5fb9b43611db3f3b193195911be742471b4db";
11790
11824
  var css30 = `._side-panel_1oc3f_1 {
11791
11825
  transform: all 0.3s ease-in-out;
11792
11826
  padding-bottom: 80px;
@@ -11849,8 +11883,8 @@ var side_panel_module_css_default2 = { "side-panel": "_side-panel_1oc3f_1", "sid
11849
11883
  // admin/views/users/details/layout/membership-dropdown.tsx
11850
11884
  import { Text as Text25, DropdownMenu as DropdownMenu2, Skeleton as Skeleton2 } from "@raystack/apsara";
11851
11885
 
11852
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-mCf76bhA7u73/sdk/admin/views/users/details/layout/side-panel.module.css.js
11853
- var digest31 = "ab1351b0a316d6209687e6a24102b471c754ad7b3cddd4394873e1394f67de62";
11886
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-V92Kq7HtZ071/sdk/admin/views/users/details/layout/side-panel.module.css.js
11887
+ var digest31 = "f6996e40ea06173a8d32e01ad7f63707e65dc77857738deb0320456f91ed5ebb";
11854
11888
  var css31 = `._side-panel_1oc3f_1 {
11855
11889
  transform: all 0.3s ease-in-out;
11856
11890
  padding-bottom: 80px;
@@ -11931,24 +11965,17 @@ import {
11931
11965
  Text as Text23,
11932
11966
  toast as toast2
11933
11967
  } from "@raystack/apsara";
11934
- import { useCallback as useCallback10 } from "react";
11935
11968
  import {
11936
- FrontierService,
11937
11969
  FrontierServiceQueries as FrontierServiceQueries7,
11938
- ListPoliciesRequestSchema,
11939
- DeletePolicyRequestSchema,
11940
- CreatePolicyRequestSchema
11970
+ SetOrganizationMemberRoleRequestSchema
11941
11971
  } from "@raystack/proton/frontier";
11942
11972
  import { create as create6 } from "@bufbuild/protobuf";
11943
- import { useMutation as useMutation6, useTransport as useTransport4 } from "@connectrpc/connect-query";
11944
- import { createClient } from "@connectrpc/connect";
11973
+ import { useMutation as useMutation6 } from "@connectrpc/connect-query";
11945
11974
  import { useForm as useForm4 } from "react-hook-form";
11946
11975
  import { zodResolver as zodResolver4 } from "@hookform/resolvers/zod";
11947
11976
  import { jsx as jsx61, jsxs as jsxs38 } from "react/jsx-runtime";
11948
11977
  var formSchema = external_exports.object({
11949
- roleIds: external_exports.instanceof(Set).refine((set) => set.size > 0, {
11950
- message: "At least one role must be selected"
11951
- })
11978
+ roleId: external_exports.string().min(1, "A role must be selected")
11952
11979
  });
11953
11980
  var AssignRole = ({
11954
11981
  roles = [],
@@ -11957,80 +11984,38 @@ var AssignRole = ({
11957
11984
  onRoleUpdate,
11958
11985
  onClose
11959
11986
  }) => {
11960
- const transport = useTransport4();
11987
+ const currentRoleId = user?.roleIds?.[0] || "";
11961
11988
  const {
11962
11989
  handleSubmit,
11963
11990
  watch,
11964
11991
  setValue,
11965
- formState: { isSubmitting, errors }
11992
+ formState: { isSubmitting, errors, isDirty: isDirty2 }
11966
11993
  } = useForm4({
11967
11994
  defaultValues: {
11968
- roleIds: new Set(user?.roleIds || [])
11995
+ roleId: currentRoleId
11969
11996
  },
11970
11997
  resolver: zodResolver4(formSchema)
11971
11998
  });
11972
- const { mutateAsync: deletePolicy } = useMutation6(
11973
- FrontierServiceQueries7.deletePolicy
11999
+ const { mutateAsync: setMemberRole } = useMutation6(
12000
+ FrontierServiceQueries7.setOrganizationMemberRole
11974
12001
  );
11975
- const { mutateAsync: createPolicy } = useMutation6(
11976
- FrontierServiceQueries7.createPolicy
11977
- );
11978
- const roleIds = watch("roleIds");
12002
+ const selectedRoleId = watch("roleId");
11979
12003
  function onCheckedChange(value, roleId) {
11980
12004
  if (!roleId)
11981
12005
  return;
11982
- const currentRoles = new Set(roleIds);
11983
12006
  if (value) {
11984
- currentRoles.add(roleId);
11985
- } else {
11986
- currentRoles.delete(roleId);
12007
+ setValue("roleId", roleId, { shouldDirty: true });
11987
12008
  }
11988
- setValue("roleIds", currentRoles);
11989
12009
  }
11990
- const checkRole = useCallback10(
11991
- (roleId) => {
11992
- if (!roleId)
11993
- return false;
11994
- return roleIds?.has(roleId) || false;
11995
- },
11996
- [roleIds]
11997
- );
11998
12010
  const onSubmit = async (data) => {
11999
12011
  try {
12000
- const client = createClient(FrontierService, transport);
12001
- const policiesResp = await client.listPolicies(
12002
- create6(ListPoliciesRequestSchema, {
12012
+ await setMemberRole(
12013
+ create6(SetOrganizationMemberRoleRequestSchema, {
12003
12014
  orgId: organizationId,
12004
- userId: user?.id
12015
+ userId: user?.id,
12016
+ roleId: data.roleId
12005
12017
  })
12006
12018
  );
12007
- const policies = policiesResp.policies || [];
12008
- const removedRolesPolicies = policies.filter(
12009
- (policy) => !(policy.roleId && data.roleIds.has(policy.roleId))
12010
- );
12011
- await Promise.all(
12012
- removedRolesPolicies.map(
12013
- (policy) => deletePolicy(
12014
- create6(DeletePolicyRequestSchema, { id: policy.id || "" })
12015
- )
12016
- )
12017
- );
12018
- const resource = `${SCOPES.ORG}:${organizationId}`;
12019
- const principal = `${SCOPES.USER}:${user?.id}`;
12020
- const assignedRolesArr = Array.from(data.roleIds);
12021
- await Promise.all(
12022
- assignedRolesArr.map(
12023
- (roleId) => createPolicy(
12024
- create6(CreatePolicyRequestSchema, {
12025
- body: {
12026
- roleId,
12027
- resource,
12028
- principal
12029
- }
12030
- })
12031
- )
12032
- )
12033
- );
12034
12019
  if (onRoleUpdate) {
12035
12020
  onRoleUpdate();
12036
12021
  }
@@ -12051,7 +12036,7 @@ var AssignRole = ({
12051
12036
  /* @__PURE__ */ jsx61("div", { role: "group", "aria-labelledby": "roles-group", children: /* @__PURE__ */ jsxs38(Flex38, { direction: "column", gap: 4, children: [
12052
12037
  roles.map((role) => {
12053
12038
  const htmlId = `role-${role.id}`;
12054
- const checked = checkRole(role.id);
12039
+ const checked = selectedRoleId === role.id;
12055
12040
  return /* @__PURE__ */ jsxs38(Flex38, { gap: 3, children: [
12056
12041
  /* @__PURE__ */ jsx61(
12057
12042
  Checkbox2,
@@ -12065,7 +12050,7 @@ var AssignRole = ({
12065
12050
  /* @__PURE__ */ jsx61(Label3, { htmlFor: htmlId, children: role.title })
12066
12051
  ] }, role.id);
12067
12052
  }),
12068
- errors.roleIds && /* @__PURE__ */ jsx61(Text23, { variant: "danger", children: errors.roleIds.message })
12053
+ errors.roleId && /* @__PURE__ */ jsx61(Text23, { variant: "danger", children: errors.roleId.message })
12069
12054
  ] }) })
12070
12055
  ] }) }),
12071
12056
  /* @__PURE__ */ jsxs38(Dialog4.Footer, { children: [
@@ -12083,6 +12068,7 @@ var AssignRole = ({
12083
12068
  Button9,
12084
12069
  {
12085
12070
  type: "submit",
12071
+ disabled: !isDirty2,
12086
12072
  "data-test-id": "assign-role-update-button",
12087
12073
  loading: isSubmitting,
12088
12074
  loaderText: "Updating...",
@@ -12307,8 +12293,8 @@ var SidePanelMembership = ({
12307
12293
  ] });
12308
12294
  };
12309
12295
 
12310
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-pWvJk6eZbf0W/sdk/admin/views/users/details/layout/side-panel.module.css.js
12311
- var digest32 = "3807fac40541f15b079f7ac294fd94978708d932071f07f229026eaedaa6143c";
12296
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-86dmM58nBOQT/sdk/admin/views/users/details/layout/side-panel.module.css.js
12297
+ var digest32 = "3c1108a1665d85453eea178790babdd22b82fb3f4ddba38e6225eeb513700f42";
12312
12298
  var css32 = `._side-panel_1oc3f_1 {
12313
12299
  transform: all 0.3s ease-in-out;
12314
12300
  padding-bottom: 80px;
@@ -12426,8 +12412,8 @@ var UserDetailsSidePanel = () => {
12426
12412
  );
12427
12413
  };
12428
12414
 
12429
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-yQKREvFZq6SE/sdk/admin/views/users/details/layout/layout.module.css.js
12430
- var digest33 = "0645a75a7b9b19484832c30581481ed2d4ee0ab4e3f41cd2fa21e8c468f9c004";
12415
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-TkEpDev7BeoD/sdk/admin/views/users/details/layout/layout.module.css.js
12416
+ var digest33 = "d940d5d95896c2786198deab6e5399af70cd7c71f7835afe4ce53e5e83ac6b85";
12431
12417
  var css33 = `._page_190wz_1 {
12432
12418
  height: 100vh;
12433
12419
  width: 100%;
@@ -12468,8 +12454,8 @@ import {
12468
12454
  } from "@raystack/apsara";
12469
12455
  import { SidebarIcon } from "@raystack/apsara/icons";
12470
12456
 
12471
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-t6fx1zEGS26D/sdk/admin/views/users/details/layout/navbar.module.css.js
12472
- var digest34 = "c51b86639e08809b727da00a3778ad02bd08b9bcb68ca594dd8337230da9bc82";
12457
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-Sj4RAYXf0ds9/sdk/admin/views/users/details/layout/navbar.module.css.js
12458
+ var digest34 = "ced89e4794721e2996ef3a341a34d52e0d0fea55f57f6e0f3eb89e0a5fbab2ca";
12473
12459
  var css34 = `._navbar_1ahsl_1 {
12474
12460
  padding: var(--rs-space-4) var(--rs-space-7);
12475
12461
  border-bottom: 0.5px solid var(--rs-color-border-base-primary);
@@ -12595,12 +12581,12 @@ import { AdminServiceQueries as AdminServiceQueries14 } from "@raystack/proton/f
12595
12581
  import { Flex as Flex47, Separator as Separator3, Text as Text31 } from "@raystack/apsara";
12596
12582
 
12597
12583
  // admin/views/users/details/security/block-user.tsx
12598
- import { useCallback as useCallback11, useState as useState15 } from "react";
12584
+ import { useCallback as useCallback10, useState as useState15 } from "react";
12599
12585
  import { Button as Button11, Dialog as Dialog6, toast as toast4 } from "@raystack/apsara";
12600
12586
  import {
12601
12587
  createConnectQueryKey as createConnectQueryKey3,
12602
12588
  useMutation as useMutation7,
12603
- useTransport as useTransport5
12589
+ useTransport as useTransport4
12604
12590
  } from "@connectrpc/connect-query";
12605
12591
  import {
12606
12592
  AdminServiceQueries as AdminServiceQueries12,
@@ -12613,10 +12599,10 @@ var BlockUserDialog = () => {
12613
12599
  const [isDialogOpen, setIsDialogOpen] = useState15(false);
12614
12600
  const { user, reset } = useUser();
12615
12601
  const queryClient = useQueryClient5();
12616
- const transport = useTransport5();
12602
+ const transport = useTransport4();
12617
12603
  const isActive = user?.state === "enabled";
12618
12604
  const userName = getUserName(user);
12619
- const optimisticUpdateState = useCallback11(
12605
+ const optimisticUpdateState = useCallback10(
12620
12606
  (state) => {
12621
12607
  queryClient.setQueryData(
12622
12608
  createConnectQueryKey3({
@@ -12647,9 +12633,6 @@ var BlockUserDialog = () => {
12647
12633
  optimisticUpdateState("disabled");
12648
12634
  reset?.();
12649
12635
  onOpenChange(false);
12650
- },
12651
- onError: (error) => {
12652
- console.error("Failed to block user", error);
12653
12636
  }
12654
12637
  }
12655
12638
  );
@@ -12661,9 +12644,6 @@ var BlockUserDialog = () => {
12661
12644
  optimisticUpdateState("enabled");
12662
12645
  reset?.();
12663
12646
  onOpenChange(false);
12664
- },
12665
- onError: (error) => {
12666
- console.error("Failed to block user", error);
12667
12647
  }
12668
12648
  }
12669
12649
  );
@@ -12671,8 +12651,19 @@ var BlockUserDialog = () => {
12671
12651
  const onOpenChange = (value) => {
12672
12652
  setIsDialogOpen(value);
12673
12653
  };
12654
+ const handleAction = async (action, errorMessage) => {
12655
+ try {
12656
+ await action({ id: user?.id || "" });
12657
+ } catch (error) {
12658
+ handleConnectError(error, {
12659
+ PermissionDenied: () => toast4.error("You don't have permission to perform this action"),
12660
+ NotFound: (err) => toast4.error("Not found", { description: err.message }),
12661
+ Default: (err) => toast4.error(errorMessage, { description: err.message })
12662
+ });
12663
+ }
12664
+ };
12674
12665
  const config = isActive ? {
12675
- onClick: blockUser,
12666
+ onClick: () => handleAction(blockUser, `Failed to block ${t.user({ case: "lower" })}`),
12676
12667
  btnColor: "danger",
12677
12668
  btnText: "Block",
12678
12669
  dialogTitle: `Block ${t.user({ case: "lower" })}`,
@@ -12680,7 +12671,7 @@ var BlockUserDialog = () => {
12680
12671
  dialogConfirmText: "Block",
12681
12672
  dialogConfirmLoadingText: "Blocking..."
12682
12673
  } : {
12683
- onClick: unblockUser,
12674
+ onClick: () => handleAction(unblockUser, `Failed to unblock ${t.user({ case: "lower" })}`),
12684
12675
  btnColor: "accent",
12685
12676
  btnText: "Unblock",
12686
12677
  dialogTitle: `Unblock ${t.user({ case: "lower" })}`,
@@ -12724,7 +12715,7 @@ var BlockUserDialog = () => {
12724
12715
  "data-test-id": "admin-security-block-user-submit",
12725
12716
  loading: isSubmitting,
12726
12717
  loaderText: config.dialogConfirmLoadingText,
12727
- onClick: () => config.onClick({ id: user?.id || "" }),
12718
+ onClick: config.onClick,
12728
12719
  children: config.dialogConfirmText
12729
12720
  }
12730
12721
  )
@@ -12756,8 +12747,8 @@ import {
12756
12747
  Text as Text28
12757
12748
  } from "@raystack/apsara";
12758
12749
 
12759
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-4m11s50scT3y/sdk/admin/views/users/details/security/sessions/sessions.module.css.js
12760
- var digest35 = "662dba6748cef091da875f0aa8b0762563df1535d240170cfbb6746a5b5a4f5d";
12750
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-Yrp5cDtSWOID/sdk/admin/views/users/details/security/sessions/sessions.module.css.js
12751
+ var digest35 = "e6c25c5f57e4916f0eeaf4377249f19ab6476d57cb62af2e40ce505de02ffabc";
12761
12752
  var css35 = `._sessionsContainer_aq82p_1 {
12762
12753
  border: 1px solid var(--rs-color-border-base-primary);
12763
12754
  border-radius: var(--rs-radius-2);
@@ -12878,8 +12869,8 @@ var RevokeSessionFinalConfirm = ({
12878
12869
  ) });
12879
12870
  };
12880
12871
 
12881
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-SkKeLrqBkFKS/sdk/admin/views/users/details/security/sessions/sessions.module.css.js
12882
- var digest36 = "47a17f29d198f7214008439d8d5d2cf540868599d18cd954edb4d47ab3ac4b56";
12872
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-0d5Pr0UCkwH7/sdk/admin/views/users/details/security/sessions/sessions.module.css.js
12873
+ var digest36 = "0b8ab0fc0e27f04a1931039b52a6ffcad57bbfffaa27ed1e5e3acbeb2ce87a55";
12883
12874
  var css36 = `._sessionsContainer_aq82p_1 {
12884
12875
  border: 1px solid var(--rs-color-border-base-primary);
12885
12876
  border-radius: var(--rs-radius-2);
@@ -13023,8 +13014,8 @@ var RevokeSessionConfirm = ({ isOpen, onOpenChange, sessionInfo, onRevokeConfirm
13023
13014
  // admin/views/users/details/security/sessions/session-skeleton.tsx
13024
13015
  import { Flex as Flex45, Skeleton as Skeleton3 } from "@raystack/apsara";
13025
13016
 
13026
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-CT0njuAHYO0n/sdk/admin/views/users/details/security/sessions/sessions.module.css.js
13027
- var digest37 = "3ede86ec7c99d703beff61de3fa8955548852dd78be02b2c85db8a5bbc969724";
13017
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-hXfkKyy1Acqu/sdk/admin/views/users/details/security/sessions/sessions.module.css.js
13018
+ var digest37 = "ea9420802d8b8476c3bc4300e7b46d0c50b22533818332a6d3ec0e14c37107e5";
13028
13019
  var css37 = `._sessionsContainer_aq82p_1 {
13029
13020
  border: 1px solid var(--rs-color-border-base-primary);
13030
13021
  border-radius: var(--rs-radius-2);
@@ -13099,14 +13090,14 @@ var SessionSkeleton = ({ count: count2 = 3 }) => {
13099
13090
  };
13100
13091
 
13101
13092
  // admin/views/users/details/security/sessions/index.tsx
13102
- import { useQuery as useQuery10, useMutation as useMutation8, createConnectQueryKey as createConnectQueryKey4, useTransport as useTransport6 } from "@connectrpc/connect-query";
13093
+ import { useQuery as useQuery10, useMutation as useMutation8, createConnectQueryKey as createConnectQueryKey4, useTransport as useTransport5 } from "@connectrpc/connect-query";
13103
13094
  import { useQueryClient as useQueryClient6 } from "@tanstack/react-query";
13104
13095
  import { AdminServiceQueries as AdminServiceQueries13 } from "@raystack/proton/frontier";
13105
13096
  import dayjs9 from "dayjs";
13106
13097
  import relativeTime from "dayjs/plugin/relativeTime";
13107
13098
 
13108
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-cejpVfV3vuQi/sdk/admin/views/users/details/security/sessions/sessions.module.css.js
13109
- var digest38 = "3a3a89bd06e6c2ac78738cd18e74faaf499c3a8640ef4928bdc25d281f6cc0f7";
13099
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-hALxsp5uvQaN/sdk/admin/views/users/details/security/sessions/sessions.module.css.js
13100
+ var digest38 = "fc6224916de6ca15e608116db109a167102d793c4e975eb3092b395a8387b1a9";
13110
13101
  var css38 = `._sessionsContainer_aq82p_1 {
13111
13102
  border: 1px solid var(--rs-color-border-base-primary);
13112
13103
  border-radius: var(--rs-radius-2);
@@ -13201,7 +13192,7 @@ var formatDeviceDisplay = (browser, operatingSystem) => {
13201
13192
  var UserSessions = () => {
13202
13193
  const { user } = useUser();
13203
13194
  const queryClient = useQueryClient6();
13204
- const transport = useTransport6();
13195
+ const transport = useTransport5();
13205
13196
  const [isRevokeDialogOpen, setIsRevokeDialogOpen] = useState17(false);
13206
13197
  const [selectedSession, setSelectedSession] = useState17(null);
13207
13198
  const {
@@ -13315,8 +13306,8 @@ var UserSessions = () => {
13315
13306
  ] });
13316
13307
  };
13317
13308
 
13318
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-vaP0uh9a4Unm/sdk/admin/views/users/details/security/security.module.css.js
13319
- var digest39 = "ae12fb901017974679888b44f96bf6336335cf2bb17c7053c1d03ddd83b3d684";
13309
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-4bJ9rsba90zw/sdk/admin/views/users/details/security/security.module.css.js
13310
+ var digest39 = "7777fcab28408bb42c6ba13faa55d68a9c8716f0f0a5c7f2135101e9ad92e96f";
13320
13311
  var css39 = `._container_4259p_1 {
13321
13312
  width: 100%;
13322
13313
  }
@@ -13450,8 +13441,8 @@ import {
13450
13441
  } from "@raystack/apsara";
13451
13442
  import { OrganizationIcon } from "@raystack/apsara/icons";
13452
13443
 
13453
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-dm8JDanka2S2/sdk/admin/views/organizations/list/list.module.css.js
13454
- var digest40 = "2ed57792de7597b7ac392c6d85483d4cc0f7e6f93cb96f810633265a0826e59a";
13444
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-EZ3JN1SxmPA8/sdk/admin/views/organizations/list/list.module.css.js
13445
+ var digest40 = "4f1ee5a4cb2f9f997c139493a24055c869ac3c0d49b348ac2fe4a08afffda942";
13455
13446
  var css40 = `._navbar_1py96_1 {
13456
13447
  padding: var(--rs-space-4) var(--rs-space-7);
13457
13448
  border-bottom: 0.5px solid var(--rs-color-border-base-primary);
@@ -13640,8 +13631,8 @@ var OrganizationsNavabar = ({
13640
13631
  ] });
13641
13632
  };
13642
13633
 
13643
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-zStzqnrONISr/sdk/admin/views/organizations/list/list.module.css.js
13644
- var digest41 = "f915e64c091ff9e6843f54db457f3247443d5eea489efd4d781e6a6763fa994e";
13634
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-sKGOHvz8bpEf/sdk/admin/views/organizations/list/list.module.css.js
13635
+ var digest41 = "f3254fd4ebd423acc90e432cddd6c0c0029776ef63928f78edccff6b2da9aaf0";
13645
13636
  var css41 = `._navbar_1py96_1 {
13646
13637
  padding: var(--rs-space-4) var(--rs-space-7);
13647
13638
  border-bottom: 0.5px solid var(--rs-color-border-base-primary);
@@ -13755,8 +13746,8 @@ import {
13755
13746
  } from "@raystack/apsara";
13756
13747
  import dayjs10 from "dayjs";
13757
13748
 
13758
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-sO6ljtap17Eo/sdk/admin/views/organizations/list/list.module.css.js
13759
- var digest42 = "3238eceb57cbf4a0eaa7658816fbf64e7d79411ec875feb3bd16fd534c633e3c";
13749
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-Z5ycL6jDkK9u/sdk/admin/views/organizations/list/list.module.css.js
13750
+ var digest42 = "f3c81f662f07cab9cb05e6a2e0d76b276b9226f72c8788bba8f53a9a04df4782";
13760
13751
  var css42 = `._navbar_1py96_1 {
13761
13752
  padding: var(--rs-space-4) var(--rs-space-7);
13762
13753
  border-bottom: 0.5px solid var(--rs-color-border-base-primary);
@@ -14026,8 +14017,8 @@ import { create as create8 } from "@bufbuild/protobuf";
14026
14017
  // admin/views/organizations/list/create.tsx
14027
14018
  import { useEffect as useEffect6, useState as useState20 } from "react";
14028
14019
 
14029
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-mQtKlspD808j/sdk/admin/views/organizations/list/list.module.css.js
14030
- var digest43 = "73747d7a79eb60845ae0d8f7be57ed5caf14aa4e05274f817bde1b000d01f245";
14020
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-j0Bcw8NJZNur/sdk/admin/views/organizations/list/list.module.css.js
14021
+ var digest43 = "aea868627e1b2a1c722a90cc75060af1c4ad7f00d4f7e55c9da5e17e5f9ae2ee";
14031
14022
  var css43 = `._navbar_1py96_1 {
14032
14023
  padding: var(--rs-space-4) var(--rs-space-7);
14033
14024
  border-bottom: 0.5px solid var(--rs-color-border-base-primary);
@@ -14158,8 +14149,8 @@ var cross_default = 'data:image/svg+xml,<svg width="20" height="20" viewBox="0 0
14158
14149
  // react/components/avatar-upload/index.tsx
14159
14150
  import "react-image-crop/dist/ReactCrop.css";
14160
14151
 
14161
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-TgB9tIFb7h4r/sdk/react/components/avatar-upload/avatar-upload.module.css.js
14162
- var digest44 = "12a4c2527af95a5a0a73beb156cfb0c977ca53a348d7396c47de8cd167ce80a6";
14152
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-E1Of7aNWX1yQ/sdk/react/components/avatar-upload/avatar-upload.module.css.js
14153
+ var digest44 = "6c64c02ffb81f6bb134aae3bab767efd29557ba22e444808965f094d69b82a48";
14163
14154
  var css44 = `._container_1k4dc_1 {
14164
14155
  display: flex;
14165
14156
  flex-direction: column;
@@ -14893,7 +14884,7 @@ import { useEffect as useEffect12, useMemo as useMemo9, useState as useState25 }
14893
14884
  import {
14894
14885
  useQuery as useQuery16,
14895
14886
  createConnectQueryKey as createConnectQueryKey9,
14896
- useTransport as useTransport11
14887
+ useTransport as useTransport10
14897
14888
  } from "@connectrpc/connect-query";
14898
14889
  import { useQueryClient as useQueryClient11 } from "@tanstack/react-query";
14899
14890
  import { create as create18 } from "@bufbuild/protobuf";
@@ -14914,8 +14905,8 @@ import {
14914
14905
  Search
14915
14906
  } from "@raystack/apsara";
14916
14907
 
14917
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-3rX1FdL3kmGS/sdk/admin/views/organizations/details/layout/layout.module.css.js
14918
- var digest45 = "5c65acaab1c3edbc445202063f6fa48357344edb89ec89a813aec6165013fc0c";
14908
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-MwZq2vGYUiI2/sdk/admin/views/organizations/details/layout/layout.module.css.js
14909
+ var digest45 = "5792e88628258d55af7966ae7d9041a28e08411b4bf268e3fce20ce618724a98";
14919
14910
  var css45 = `._page_1jsqa_1 {
14920
14911
  width: 100%;
14921
14912
  height: 100vh;
@@ -15021,8 +15012,8 @@ import {
15021
15012
  } from "@raystack/apsara";
15022
15013
  import { useContext as useContext5, useMemo as useMemo7 } from "react";
15023
15014
 
15024
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-MRhBFEKBml3Y/sdk/admin/views/organizations/details/layout/layout.module.css.js
15025
- var digest46 = "53e600c9a6f164bef559d2fc44871d760907639bfcc698254c750ec286bfd103";
15015
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-lfpKJ3dwBenC/sdk/admin/views/organizations/details/layout/layout.module.css.js
15016
+ var digest46 = "c485776d20f2ed090fb897951970fb80162ff51df04d23713f42cc04bac93733";
15026
15017
  var css46 = `._page_1jsqa_1 {
15027
15018
  width: 100%;
15028
15019
  height: 100vh;
@@ -15168,9 +15159,16 @@ var PROJECT_NAMESPACE = "app/project";
15168
15159
  var DEFAULT_INVITE_ROLE = "app_organization_viewer";
15169
15160
 
15170
15161
  // admin/views/organizations/details/layout/invite-users-dialog.tsx
15171
- import { useMutation as useMutation10, createConnectQueryKey as createConnectQueryKey5, useTransport as useTransport7 } from "@connectrpc/connect-query";
15162
+ import {
15163
+ useMutation as useMutation10,
15164
+ createConnectQueryKey as createConnectQueryKey5,
15165
+ useTransport as useTransport6
15166
+ } from "@connectrpc/connect-query";
15172
15167
  import { useQueryClient as useQueryClient7 } from "@tanstack/react-query";
15173
- import { FrontierServiceQueries as FrontierServiceQueries11, CreateOrganizationInvitationRequestSchema } from "@raystack/proton/frontier";
15168
+ import {
15169
+ FrontierServiceQueries as FrontierServiceQueries11,
15170
+ CreateOrganizationInvitationRequestSchema
15171
+ } from "@raystack/proton/frontier";
15174
15172
  import { create as create10 } from "@bufbuild/protobuf";
15175
15173
  import { jsx as jsx81, jsxs as jsxs57 } from "react/jsx-runtime";
15176
15174
  var inviteSchema2 = objectType({
@@ -15181,7 +15179,7 @@ var InviteUsersDialog = ({ onOpenChange }) => {
15181
15179
  const t = useTerminology();
15182
15180
  const { roles = [], organization } = useContext5(OrganizationContext);
15183
15181
  const queryClient = useQueryClient7();
15184
- const transport = useTransport7();
15182
+ const transport = useTransport6();
15185
15183
  const organizationId = organization?.id || "";
15186
15184
  const defaultRoleId = useMemo7(
15187
15185
  () => roles?.find((role) => role.name === DEFAULT_INVITE_ROLE)?.id,
@@ -15210,25 +15208,28 @@ var InviteUsersDialog = ({ onOpenChange }) => {
15210
15208
  `${t.user({ case: "capital", plural: inviteCount > 1 })} invited`
15211
15209
  );
15212
15210
  onOpenChange(false);
15213
- },
15214
- onError: (error) => {
15215
- toast7.error("Something went wrong", {
15216
- description: error.message
15217
- });
15218
- console.error("Unable to invite user:", error);
15219
15211
  }
15220
15212
  }
15221
15213
  );
15222
15214
  const onSubmit = async (data) => {
15223
15215
  if (!organizationId)
15224
15216
  return;
15225
- await createInvitation(
15226
- create10(CreateOrganizationInvitationRequestSchema, {
15227
- orgId: organizationId,
15228
- userIds: data.emails,
15229
- roleIds: data.role ? [data.role] : []
15230
- })
15231
- );
15217
+ try {
15218
+ await createInvitation(
15219
+ create10(CreateOrganizationInvitationRequestSchema, {
15220
+ orgId: organizationId,
15221
+ userIds: data.emails,
15222
+ roleIds: data.role ? [data.role] : []
15223
+ })
15224
+ );
15225
+ } catch (error) {
15226
+ handleConnectError(error, {
15227
+ AlreadyExists: () => toast7.error("Invitation already exists"),
15228
+ InvalidArgument: (err) => toast7.error("Invalid input", { description: err.message }),
15229
+ PermissionDenied: () => toast7.error("You don't have permission to perform this action"),
15230
+ Default: (err) => toast7.error("Something went wrong", { description: err.message })
15231
+ });
15232
+ }
15232
15233
  };
15233
15234
  const isSubmitting = methods?.formState?.isSubmitting;
15234
15235
  const errors = methods?.formState?.errors;
@@ -15318,8 +15319,8 @@ import {
15318
15319
  import { useContext as useContext6 } from "react";
15319
15320
  import { Controller as Controller5, FormProvider as FormProvider4, useForm as useForm7 } from "react-hook-form";
15320
15321
 
15321
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-3J8YZbWRVdDn/sdk/admin/views/organizations/details/layout/layout.module.css.js
15322
- var digest47 = "50be9a77d45d3240d352c0d2e81f97f0be0af42ce6a10e74d774fa230dbab1f0";
15322
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-fShcRQmgp6Oq/sdk/admin/views/organizations/details/layout/layout.module.css.js
15323
+ var digest47 = "e00a77cb0befa3dfc8f97c9692c692015dd3dc47e053ccfef319f2356adfbd87";
15323
15324
  var css47 = `._page_1jsqa_1 {
15324
15325
  width: 100%;
15325
15326
  height: 100vh;
@@ -15414,7 +15415,7 @@ var layout_module_css_default4 = { "page": "_page_1jsqa_1", "main_content": "_ma
15414
15415
 
15415
15416
  // admin/views/organizations/details/layout/add-tokens-dialog.tsx
15416
15417
  import { zodResolver as zodResolver7 } from "@hookform/resolvers/zod";
15417
- import { useMutation as useMutation11, createConnectQueryKey as createConnectQueryKey6, useTransport as useTransport8 } from "@connectrpc/connect-query";
15418
+ import { useMutation as useMutation11, createConnectQueryKey as createConnectQueryKey6, useTransport as useTransport7 } from "@connectrpc/connect-query";
15418
15419
  import { useQueryClient as useQueryClient8 } from "@tanstack/react-query";
15419
15420
  import { AdminServiceQueries as AdminServiceQueries17, CheckoutProductBodySchema, DelegatedCheckoutRequestSchema } from "@raystack/proton/frontier";
15420
15421
  import { create as create11 } from "@bufbuild/protobuf";
@@ -15429,7 +15430,7 @@ var addTokensSchema = objectType({
15429
15430
  var AddTokensDialog = ({ onOpenChange }) => {
15430
15431
  const { organization, billingAccount, fetchTokenBalance, tokenProductId } = useContext6(OrganizationContext);
15431
15432
  const queryClient = useQueryClient8();
15432
- const transport = useTransport8();
15433
+ const transport = useTransport7();
15433
15434
  const organisationId = organization?.id || "";
15434
15435
  const billingAccountId = billingAccount?.id || "";
15435
15436
  const methods = useForm7({
@@ -15814,8 +15815,8 @@ var OrganizationsDetailsNavabar = ({
15814
15815
  ] });
15815
15816
  };
15816
15817
 
15817
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-5gQct7PBSpzH/sdk/admin/views/organizations/details/layout/layout.module.css.js
15818
- var digest48 = "3dfd6abba59f3e803f58fddc81655f706e1381ca509fbc9e577784072767f826";
15818
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-NFE8BuxAyL3Z/sdk/admin/views/organizations/details/layout/layout.module.css.js
15819
+ var digest48 = "df77363a6dc6a520050de0cb04ac415e909149613f16d41f6ed8c8444cd9893b";
15819
15820
  var css48 = `._page_1jsqa_1 {
15820
15821
  width: 100%;
15821
15822
  height: 100vh;
@@ -15917,8 +15918,8 @@ import { Avatar as Avatar9, getAvatarColor as getAvatarColor7, SidePanel as Side
15917
15918
  // admin/views/organizations/details/side-panel/org-details-section.tsx
15918
15919
  import { Flex as Flex57, List as List7, Text as Text39, CopyButton as CopyButton3, Tooltip as Tooltip3 } from "@raystack/apsara";
15919
15920
 
15920
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-owm8mxw5RIC7/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
15921
- var digest49 = "b5e44e878881b28dc55bdcfe8f5a05534dbb6bd4d30ac5d06f4461ac7de4462f";
15921
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-UNkiYLCyfAYt/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
15922
+ var digest49 = "8ddb1a5355302d58bc5b623c66dc30cf3c37e2810c03b9d99838b573ab57550c";
15922
15923
  var css49 = `._side-panel-section-item-label_yeg6h_1 {
15923
15924
  width: 120px;
15924
15925
  }
@@ -16008,8 +16009,8 @@ var OrganizationDetailsSection = ({
16008
16009
  import { Flex as Flex58, List as List8, Text as Text40, Link as Link2, Tooltip as Tooltip4 } from "@raystack/apsara";
16009
16010
  import { useContext as useContext9 } from "react";
16010
16011
 
16011
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-QKshJxo3JZ8z/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
16012
- var digest50 = "e48781b58bac86f75765420213adfaa4d8d51dee1dd32463eadbcdc75d7e5271";
16012
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-EigEbbgJnRIX/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
16013
+ var digest50 = "d353e0458bd3a593bf7f9213355277bef29bc6abdd15fd34e9bc07fadeb48569";
16013
16014
  var css50 = `._side-panel-section-item-label_yeg6h_1 {
16014
16015
  width: 120px;
16015
16016
  }
@@ -16095,8 +16096,8 @@ var KYCDetailsSection = () => {
16095
16096
  import { useContext as useContext10 } from "react";
16096
16097
  import { List as List9, Text as Text41, Flex as Flex59 } from "@raystack/apsara";
16097
16098
 
16098
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-czSEzvyu3xM6/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
16099
- var digest51 = "f6ea34ee164c374526486b54cd0f625f80a3ffed6fd57261be94e311c7be0b8c";
16099
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-0VTiNtLOTWEw/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
16100
+ var digest51 = "8b6716efc172df8a3e03a9f5a028ee28f6b5c06613e8b04f6bd503058774c38e";
16100
16101
  var css51 = `._side-panel-section-item-label_yeg6h_1 {
16101
16102
  width: 120px;
16102
16103
  }
@@ -16197,8 +16198,8 @@ var PlanDetailsSection = () => {
16197
16198
  // admin/views/organizations/details/side-panel/tokens-details-section.tsx
16198
16199
  import { List as List10, Text as Text42, Flex as Flex60 } from "@raystack/apsara";
16199
16200
 
16200
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-GAcMCca8W7NJ/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
16201
- var digest52 = "696d202f9a19b4fe96f0a4d009bfbf6ff941a23c11a455b4474267ff094e0b31";
16201
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-TOgrLn7D0Chh/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
16202
+ var digest52 = "284ed1e29df7406aa7eab3359f2ef9e47ebc807a8647b2abaec0df8a12992e87";
16202
16203
  var css52 = `._side-panel-section-item-label_yeg6h_1 {
16203
16204
  width: 120px;
16204
16205
  }
@@ -16299,8 +16300,8 @@ var TokensDetailsSection = () => {
16299
16300
  // admin/views/organizations/details/side-panel/billing-details-section.tsx
16300
16301
  import { CopyButton as CopyButton4, Flex as Flex61, Link as Link3, List as List11, Text as Text43 } from "@raystack/apsara";
16301
16302
 
16302
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-xOil84jgkij6/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
16303
- var digest53 = "5e1aaf4c35641fed0d2c623c1831696d4d4ac67e4263fb8ced6b534973d83c91";
16303
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-n7Egsl1xjPXp/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
16304
+ var digest53 = "f2566f33385c8524ffb1f41e72f0eb2d8e771b659f6fb8661c7d8adf32c26f52";
16304
16305
  var css53 = `._side-panel-section-item-label_yeg6h_1 {
16305
16306
  width: 120px;
16306
16307
  }
@@ -16458,8 +16459,8 @@ import {
16458
16459
  toast as toast10
16459
16460
  } from "@raystack/apsara";
16460
16461
 
16461
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-92ERkmSE5w4v/sdk/admin/views/organizations/details/edit/edit.module.css.js
16462
- var digest54 = "b6553457b1780ba0871fca981315f9e7413c1d6e531ae7f1d63d93e969fe0e53";
16462
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-niy5m05tydil/sdk/admin/views/organizations/details/edit/edit.module.css.js
16463
+ var digest54 = "9ae0143a9da95cb95c83d7c58398a226c74148f9a6e4b8d6521d9cda6e4bd6d5";
16463
16464
  var css54 = `._drawer-content_1o0os_1 {
16464
16465
  min-width: 500px;
16465
16466
  padding: 0;
@@ -16515,7 +16516,7 @@ var edit_module_css_default = { "drawer-content": "_drawer-content_1o0os_1", "dr
16515
16516
  import { useContext as useContext13 } from "react";
16516
16517
  import { Controller as Controller6, useForm as useForm8 } from "react-hook-form";
16517
16518
  import { zodResolver as zodResolver8 } from "@hookform/resolvers/zod";
16518
- import { useMutation as useMutation12, createConnectQueryKey as createConnectQueryKey7, useTransport as useTransport9 } from "@connectrpc/connect-query";
16519
+ import { useMutation as useMutation12, createConnectQueryKey as createConnectQueryKey7, useTransport as useTransport8 } from "@connectrpc/connect-query";
16519
16520
  import { useQueryClient as useQueryClient9 } from "@tanstack/react-query";
16520
16521
  import { AdminServiceQueries as AdminServiceQueries18, FrontierServiceQueries as FrontierServiceQueries15, SetOrganizationKycRequestSchema } from "@raystack/proton/frontier";
16521
16522
  import { create as create15 } from "@bufbuild/protobuf";
@@ -16535,7 +16536,7 @@ var kycUpdateSchema = external_exports.object({
16535
16536
  function EditKYCPanel({ onClose }) {
16536
16537
  const { organization, kycDetails, updateKYCDetails } = useContext13(OrganizationContext);
16537
16538
  const queryClient = useQueryClient9();
16538
- const transport = useTransport9();
16539
+ const transport = useTransport8();
16539
16540
  const orgId = organization?.id || "";
16540
16541
  const {
16541
16542
  handleSubmit,
@@ -16696,8 +16697,8 @@ function EditKYCPanel({ onClose }) {
16696
16697
  // admin/views/organizations/details/edit/organization.tsx
16697
16698
  import { useContext as useContext14, useEffect as useEffect10, useState as useState23 } from "react";
16698
16699
 
16699
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-B0OOW0Uphoab/sdk/admin/views/organizations/details/edit/edit.module.css.js
16700
- var digest55 = "dcbfa227ba6d7001eded0bf397a6984c7b068de52055777dd4fb055cb1242d1e";
16700
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-XI5EBPKfwsS1/sdk/admin/views/organizations/details/edit/edit.module.css.js
16701
+ var digest55 = "0bdb42ab4cf39d5848fd82a8cfae6ca8ea29c0e053299a75180e0e9f80066f51";
16701
16702
  var css55 = `._drawer-content_1o0os_1 {
16702
16703
  min-width: 500px;
16703
16704
  padding: 0;
@@ -16763,7 +16764,7 @@ import {
16763
16764
  } from "@raystack/apsara";
16764
16765
  import { Controller as Controller7, useForm as useForm9 } from "react-hook-form";
16765
16766
  import { zodResolver as zodResolver9 } from "@hookform/resolvers/zod";
16766
- import { useMutation as useMutation13, createConnectQueryKey as createConnectQueryKey8, useTransport as useTransport10 } from "@connectrpc/connect-query";
16767
+ import { useMutation as useMutation13, createConnectQueryKey as createConnectQueryKey8, useTransport as useTransport9 } from "@connectrpc/connect-query";
16767
16768
  import { useQueryClient as useQueryClient10 } from "@tanstack/react-query";
16768
16769
  import { FrontierServiceQueries as FrontierServiceQueries16, UpdateOrganizationRequestSchema } from "@raystack/proton/frontier";
16769
16770
  import { create as create16 } from "@bufbuild/protobuf";
@@ -16808,7 +16809,7 @@ function EditOrganizationPanel({ onClose }) {
16808
16809
  const { organization, appUrl, countries: countriesFromContext = [], organizationTypes: industries = [] } = useContext14(OrganizationContext);
16809
16810
  const [countries, setCountries] = useState23(countriesFromContext);
16810
16811
  const queryClient = useQueryClient10();
16811
- const transport = useTransport10();
16812
+ const transport = useTransport9();
16812
16813
  const orgId = organization?.id || "";
16813
16814
  useEffect10(() => {
16814
16815
  if (countriesFromContext.length > 0)
@@ -17079,8 +17080,8 @@ import {
17079
17080
  toast as toast11
17080
17081
  } from "@raystack/apsara";
17081
17082
 
17082
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-b2bYAUkR5KBZ/sdk/admin/views/organizations/details/edit/edit.module.css.js
17083
- var digest56 = "c5eaf85a1832f27c652f940fa9961cbd57457b770f19e15c950c15d89db881a0";
17083
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-ZEyHJvhO47Oj/sdk/admin/views/organizations/details/edit/edit.module.css.js
17084
+ var digest56 = "36f5ce668889af50e83ef9747a0996fc4cc53958a7ce854f968f29db65bb527d";
17084
17085
  var css56 = `._drawer-content_1o0os_1 {
17085
17086
  min-width: 500px;
17086
17087
  padding: 0;
@@ -17133,7 +17134,7 @@ var css56 = `._drawer-content_1o0os_1 {
17133
17134
  var edit_module_css_default3 = { "drawer-content": "_drawer-content_1o0os_1", "drawerContent": "_drawer-content_1o0os_1", "side-panel": "_side-panel_1o0os_7", "sidePanel": "_side-panel_1o0os_7", "side-panel-form": "_side-panel-form_1o0os_15", "sidePanelForm": "_side-panel-form_1o0os_15", "side-panel-content": "_side-panel-content_1o0os_22", "sidePanelContent": "_side-panel-content_1o0os_22", "side-panel-footer": "_side-panel-footer_1o0os_26", "sidePanelFooter": "_side-panel-footer_1o0os_26", "select-value": "_select-value_1o0os_31", "selectValue": "_select-value_1o0os_31", "select-content": "_select-content_1o0os_35", "selectContent": "_select-content_1o0os_35" };
17134
17135
 
17135
17136
  // admin/views/organizations/details/edit/billing.tsx
17136
- import { useCallback as useCallback12, useContext as useContext15, useEffect as useEffect11, useMemo as useMemo8 } from "react";
17137
+ import { useCallback as useCallback11, useContext as useContext15, useEffect as useEffect11, useMemo as useMemo8 } from "react";
17137
17138
  import { useForm as useForm10 } from "react-hook-form";
17138
17139
  import { zodResolver as zodResolver10 } from "@hookform/resolvers/zod";
17139
17140
  import { useMutation as useMutation14 } from "@connectrpc/connect-query";
@@ -17246,7 +17247,7 @@ function EditBillingPanel({ onClose }) {
17246
17247
  console.error("Failed to update billing details:", error);
17247
17248
  }
17248
17249
  };
17249
- const onValueChange = useCallback12((value) => {
17250
+ const onValueChange = useCallback11((value) => {
17250
17251
  const paymentType = value;
17251
17252
  setValue("tokenPaymentType", paymentType);
17252
17253
  if (paymentType === "prepaid") {
@@ -17481,7 +17482,7 @@ var OrganizationDetailsView = ({
17481
17482
  const [isSearchVisible, setIsSearchVisible] = useState25(false);
17482
17483
  const [searchQuery, setSearchQuery] = useState25("");
17483
17484
  const queryClient = useQueryClient11();
17484
- const transport = useTransport11();
17485
+ const transport = useTransport10();
17485
17486
  const {
17486
17487
  data: organization,
17487
17488
  isLoading: isOrganizationLoading,
@@ -17713,8 +17714,8 @@ import {
17713
17714
  toast as toast14
17714
17715
  } from "@raystack/apsara";
17715
17716
 
17716
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-io4CHG9E0FNE/sdk/admin/views/organizations/details/security/security.module.css.js
17717
- var digest57 = "5414aaf4bbe3d7a159cdadbbed2c4b90278033ddfa435cd4b52f0f981f84f913";
17717
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-81JpMp2q98a4/sdk/admin/views/organizations/details/security/security.module.css.js
17718
+ var digest57 = "1c97a03283727ff4d84277692bc1ec6842039fe116a01bc494af53672ec2de6d";
17718
17719
  var css57 = `._container_1wkae_1 {
17719
17720
  width: 100%;
17720
17721
  }
@@ -17760,7 +17761,7 @@ import { useContext as useContext18 } from "react";
17760
17761
  // admin/views/organizations/details/security/block-organization.tsx
17761
17762
  import { Button as Button23, Dialog as Dialog12, Flex as Flex66, Text as Text47, toast as toast12 } from "@raystack/apsara";
17762
17763
  import { useContext as useContext16, useState as useState26 } from "react";
17763
- import { createConnectQueryKey as createConnectQueryKey10, useMutation as useMutation15, useTransport as useTransport12 } from "@connectrpc/connect-query";
17764
+ import { createConnectQueryKey as createConnectQueryKey10, useMutation as useMutation15, useTransport as useTransport11 } from "@connectrpc/connect-query";
17764
17765
  import { FrontierServiceQueries as FrontierServiceQueries18, DisableOrganizationRequestSchema, EnableOrganizationRequestSchema } from "@raystack/proton/frontier";
17765
17766
  import { create as create19 } from "@bufbuild/protobuf";
17766
17767
  import { useQueryClient as useQueryClient12 } from "@tanstack/react-query";
@@ -17769,7 +17770,7 @@ var BlockOrganizationDialog = () => {
17769
17770
  const t = useTerminology();
17770
17771
  const { organization } = useContext16(OrganizationContext);
17771
17772
  const queryClient = useQueryClient12();
17772
- const transport = useTransport12();
17773
+ const transport = useTransport11();
17773
17774
  const [isDialogOpen, setIsDialogOpen] = useState26(false);
17774
17775
  const { mutateAsync: disableOrganization, isPending: isDisabling } = useMutation15(
17775
17776
  FrontierServiceQueries18.disableOrganization,
@@ -17914,8 +17915,8 @@ import {
17914
17915
  toast as toast13
17915
17916
  } from "@raystack/apsara";
17916
17917
 
17917
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-AusSprhsq5Bk/sdk/admin/views/organizations/details/security/security.module.css.js
17918
- var digest58 = "b7c579eb3cc99248f6b700a973272f36ae9185b0e181668abda1b1e765f168bf";
17918
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-qQ1qdd3luPue/sdk/admin/views/organizations/details/security/security.module.css.js
17919
+ var digest58 = "6b8241b8777001dfb761b52a9938c78701b713f65604501d40074bb531d20834";
17919
17920
  var css58 = `._container_1wkae_1 {
17920
17921
  width: 100%;
17921
17922
  }
@@ -17957,7 +17958,7 @@ var security_module_css_default3 = { "container": "_container_1wkae_1", "content
17957
17958
 
17958
17959
  // admin/views/organizations/details/security/domains-list.tsx
17959
17960
  import { useContext as useContext17, useState as useState27 } from "react";
17960
- import { useMutation as useMutation16, createConnectQueryKey as createConnectQueryKey11, useTransport as useTransport13 } from "@connectrpc/connect-query";
17961
+ import { useMutation as useMutation16, createConnectQueryKey as createConnectQueryKey11, useTransport as useTransport12 } from "@connectrpc/connect-query";
17961
17962
  import { useQueryClient as useQueryClient13 } from "@tanstack/react-query";
17962
17963
  import { FrontierServiceQueries as FrontierServiceQueries19, DeleteOrganizationDomainRequestSchema } from "@raystack/proton/frontier";
17963
17964
  import { create as create20 } from "@bufbuild/protobuf";
@@ -17968,7 +17969,7 @@ var DeleteDomainDialog = ({
17968
17969
  const { organization } = useContext17(OrganizationContext);
17969
17970
  const [isDialogOpen, setIsDialogOpen] = useState27(false);
17970
17971
  const queryClient = useQueryClient13();
17971
- const transport = useTransport13();
17972
+ const transport = useTransport12();
17972
17973
  const { mutateAsync: deleteDomain, isPending } = useMutation16(
17973
17974
  FrontierServiceQueries19.deleteOrganizationDomain,
17974
17975
  {
@@ -18139,8 +18140,8 @@ var OrganizationSecurity = () => {
18139
18140
  // admin/views/organizations/details/members/index.tsx
18140
18141
  import { DataTable as DataTable20, EmptyState as EmptyState15, Flex as Flex71 } from "@raystack/apsara";
18141
18142
 
18142
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-d9qcC6RZWCrq/sdk/admin/views/organizations/details/members/members.module.css.js
18143
- var digest59 = "99429a9dfb02302c0b211e179f3e660192341970626667cff0354363273c6d3e";
18143
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-EsKoLyEHmRna/sdk/admin/views/organizations/details/members/members.module.css.js
18144
+ var digest59 = "e10f52ddb053df59da5e7ed1eee3929b0154c92d7ed1eaef017b9556e538305f";
18144
18145
  var css59 = `._container_6bi1j_1 {
18145
18146
  width: 100%;
18146
18147
  }
@@ -18203,8 +18204,8 @@ import {
18203
18204
  DropdownMenu as DropdownMenu4
18204
18205
  } from "@raystack/apsara";
18205
18206
 
18206
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-bc4vYLTi418C/sdk/admin/views/organizations/details/members/members.module.css.js
18207
- var digest60 = "a4c960d40ddbc70d8b1b69dda0f66483837aac28413e1dec166b065471586848";
18207
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-VCbN9SxgU5qc/sdk/admin/views/organizations/details/members/members.module.css.js
18208
+ var digest60 = "9112171ab734b94977fc874290a1b462b3bdbe36d08d4ee7640bff9fcda52026";
18208
18209
  var css60 = `._container_6bi1j_1 {
18209
18210
  width: 100%;
18210
18211
  }
@@ -18389,7 +18390,7 @@ import { AdminServiceQueries as AdminServiceQueries20 } from "@raystack/proton/f
18389
18390
  import {
18390
18391
  useInfiniteQuery as useInfiniteQuery5,
18391
18392
  createConnectQueryKey as createConnectQueryKey12,
18392
- useTransport as useTransport14
18393
+ useTransport as useTransport13
18393
18394
  } from "@connectrpc/connect-query";
18394
18395
  import { useQueryClient as useQueryClient14 } from "@tanstack/react-query";
18395
18396
 
@@ -18401,7 +18402,7 @@ import {
18401
18402
  import { create as create22 } from "@bufbuild/protobuf";
18402
18403
  import { useMutation as useMutation17 } from "@connectrpc/connect-query";
18403
18404
  import { Button as Button26, Dialog as Dialog14, Flex as Flex70, Text as Text51, toast as toast15 } from "@raystack/apsara";
18404
- import { ConnectError } from "@connectrpc/connect";
18405
+ import { ConnectError as ConnectError2 } from "@connectrpc/connect";
18405
18406
  import { jsx as jsx99, jsxs as jsxs74 } from "react/jsx-runtime";
18406
18407
  var RemoveMember = ({
18407
18408
  organizationId,
@@ -18428,7 +18429,7 @@ var RemoveMember = ({
18428
18429
  }
18429
18430
  toast15.success(`${t.member({ case: "capital" })} removed successfully`);
18430
18431
  } catch (error) {
18431
- const message = error instanceof ConnectError ? error.message : "Unknown error";
18432
+ const message = error instanceof ConnectError2 ? error.message : "Unknown error";
18432
18433
  toast15.error(`Failed to remove ${t.member({ case: "lower" })}: ${message}`);
18433
18434
  console.error(error);
18434
18435
  }
@@ -18487,7 +18488,7 @@ var RemoveMember = ({
18487
18488
 
18488
18489
  // ../node_modules/.pnpm/usehooks-ts@3.1.1_react@19.2.4/node_modules/usehooks-ts/dist/index.js
18489
18490
  var import_lodash2 = __toESM(require_lodash(), 1);
18490
- import { useState as useState28, useCallback as useCallback13, useLayoutEffect as useLayoutEffect3, useEffect as useEffect14, useRef as useRef3, useMemo as useMemo10 } from "react";
18491
+ import { useState as useState28, useCallback as useCallback12, useLayoutEffect as useLayoutEffect3, useEffect as useEffect14, useRef as useRef3, useMemo as useMemo10 } from "react";
18491
18492
  function useUnmount(func) {
18492
18493
  const funcRef = useRef3(func);
18493
18494
  funcRef.current = func;
@@ -18594,7 +18595,7 @@ function OrganizationMembersView() {
18594
18595
  query: searchQuery
18595
18596
  } = search;
18596
18597
  const queryClient = useQueryClient14();
18597
- const transport = useTransport14();
18598
+ const transport = useTransport13();
18598
18599
  const organizationId = organization?.id || "";
18599
18600
  const [assignRoleConfig, setAssignRoleConfig] = useState29({ isOpen: false, user: null });
18600
18601
  const [removeMemberConfig, setRemoveMemberConfig] = useState29({ isOpen: false, user: null });
@@ -18740,8 +18741,8 @@ import {
18740
18741
  Flex as Flex79
18741
18742
  } from "@raystack/apsara";
18742
18743
 
18743
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-h5qWD3LiHYSU/sdk/admin/views/organizations/details/projects/projects.module.css.js
18744
- var digest61 = "2e914c401266181e6b7ee3bf9fca1882ee25aa5f164c04c2edd946f99e779cad";
18744
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-E4mP55lGvClQ/sdk/admin/views/organizations/details/projects/projects.module.css.js
18745
+ var digest61 = "3fad90e0fbd0879443c8a56f11edf01fa30f03c5855801b65f66721b44c9ddab";
18745
18746
  var css61 = `._container_1rf4u_1 {
18746
18747
  width: 100%;
18747
18748
  }
@@ -18810,8 +18811,8 @@ import {
18810
18811
  DropdownMenu as DropdownMenu5
18811
18812
  } from "@raystack/apsara";
18812
18813
 
18813
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-eFicMlnAjrqr/sdk/admin/views/organizations/details/projects/projects.module.css.js
18814
- var digest62 = "6f0d34a95a4b10fe39c216890744573d74c26acd6384a006542377c079d956fa";
18814
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-UNZob5mraS9M/sdk/admin/views/organizations/details/projects/projects.module.css.js
18815
+ var digest62 = "4f509fd8778755ef8304ac08241b3420e9dc50790f5956d3023d7fe1ec7bec13";
18815
18816
  var css62 = `._container_1rf4u_1 {
18816
18817
  width: 100%;
18817
18818
  }
@@ -18993,10 +18994,10 @@ function RenameProjectDialog({
18993
18994
  import { useState as useState31 } from "react";
18994
18995
 
18995
18996
  // admin/views/organizations/details/projects/use-add-project-members.tsx
18996
- import { useCallback as useCallback14, useContext as useContext20, useMemo as useMemo12, useState as useState30 } from "react";
18997
+ import { useCallback as useCallback13, useContext as useContext20, useMemo as useMemo12, useState as useState30 } from "react";
18997
18998
  import { toast as toast17 } from "@raystack/apsara";
18998
18999
  import { useQuery as useQuery18, useMutation as useMutation19 } from "@connectrpc/connect-query";
18999
- import { FrontierServiceQueries as FrontierServiceQueries23, ListProjectUsersRequestSchema, CreatePolicyRequestSchema as CreatePolicyRequestSchema2 } from "@raystack/proton/frontier";
19000
+ import { FrontierServiceQueries as FrontierServiceQueries23, ListProjectUsersRequestSchema, ListRolesRequestSchema as ListRolesRequestSchema3, SetProjectMemberRoleRequestSchema } from "@raystack/proton/frontier";
19000
19001
  import { create as create24 } from "@bufbuild/protobuf";
19001
19002
  function useAddProjectMembers({ projectId }) {
19002
19003
  const t = useTerminology();
@@ -19027,34 +19028,47 @@ function useAddProjectMembers({ projectId }) {
19027
19028
  return name.toLowerCase().includes(searchQuery.toLowerCase());
19028
19029
  }) : nonMembers;
19029
19030
  }, [nonMembers, searchQuery]);
19030
- const { mutateAsync: createPolicy } = useMutation19(
19031
- FrontierServiceQueries23.createPolicy
19031
+ const { data: rolesData } = useQuery18(
19032
+ FrontierServiceQueries23.listRoles,
19033
+ create24(ListRolesRequestSchema3, {
19034
+ state: "enabled",
19035
+ scopes: [SCOPES.PROJECT]
19036
+ }),
19037
+ { enabled: !!projectId }
19038
+ );
19039
+ const viewerRoleId = useMemo12(
19040
+ () => rolesData?.roles?.find((r) => r.name === DEFAULT_ROLES.PROJECT_VIEWER)?.id ?? "",
19041
+ [rolesData]
19032
19042
  );
19033
- const addMember = useCallback14(
19043
+ const { mutateAsync: setProjectMemberRole } = useMutation19(
19044
+ FrontierServiceQueries23.setProjectMemberRole
19045
+ );
19046
+ const addMember = useCallback13(
19034
19047
  async (userId) => {
19035
- if (!userId || !projectId)
19048
+ if (!userId || !projectId || !viewerRoleId)
19036
19049
  return;
19037
19050
  try {
19038
- const principal = `app/user:${userId}`;
19039
- const resource = `app/project:${projectId}`;
19040
- await createPolicy(
19041
- create24(CreatePolicyRequestSchema2, {
19042
- body: {
19043
- roleId: DEFAULT_ROLES.PROJECT_VIEWER,
19044
- principal,
19045
- resource
19046
- }
19051
+ await setProjectMemberRole(
19052
+ create24(SetProjectMemberRoleRequestSchema, {
19053
+ projectId,
19054
+ principalId: userId,
19055
+ principalType: SCOPES.USER,
19056
+ roleId: viewerRoleId
19047
19057
  })
19048
19058
  );
19049
19059
  toast17.success(`${memberLabel} added`);
19050
19060
  await refetch();
19051
19061
  return projectMembers;
19052
19062
  } catch (error) {
19053
- console.error(error);
19054
- toast17.error("Something went wrong");
19063
+ handleConnectError(error, {
19064
+ AlreadyExists: () => toast17.error(`${memberLabel} already exists in this project`),
19065
+ PermissionDenied: () => toast17.error("You don't have permission to perform this action"),
19066
+ InvalidArgument: (err) => toast17.error("Invalid input", { description: err.message }),
19067
+ Default: (err) => toast17.error("Something went wrong", { description: err.message })
19068
+ });
19055
19069
  }
19056
19070
  },
19057
- [projectId, createPolicy, refetch, projectMembers, memberLabel]
19071
+ [projectId, setProjectMemberRole, refetch, projectMembers, memberLabel, viewerRoleId]
19058
19072
  );
19059
19073
  return {
19060
19074
  isLoading,
@@ -19302,98 +19316,97 @@ import { useInfiniteQuery as useInfiniteQuery7 } from "@connectrpc/connect-query
19302
19316
 
19303
19317
  // admin/views/organizations/details/projects/members/index.tsx
19304
19318
  import { DataTable as DataTable21, Dialog as Dialog18, EmptyState as EmptyState16, Flex as Flex78 } from "@raystack/apsara";
19305
- import { useCallback as useCallback16, useMemo as useMemo13, useState as useState33 } from "react";
19319
+ import { useCallback as useCallback14, useMemo as useMemo13, useState as useState33 } from "react";
19306
19320
  import {
19307
19321
  AdminServiceQueries as AdminServiceQueries21,
19308
19322
  FrontierServiceQueries as FrontierServiceQueries26,
19309
19323
  GetProjectRequestSchema,
19310
- ListRolesRequestSchema as ListRolesRequestSchema3
19324
+ ListRolesRequestSchema as ListRolesRequestSchema4
19311
19325
  } from "@raystack/proton/frontier";
19312
19326
  import { create as create27 } from "@bufbuild/protobuf";
19313
19327
  import { useQuery as useQuery19, useInfiniteQuery as useInfiniteQuery6 } from "@connectrpc/connect-query";
19314
19328
  import { useDebouncedState as useDebouncedState4 } from "@raystack/apsara/hooks";
19315
19329
 
19316
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-eeKD7vW3BkhN/sdk/admin/views/organizations/details/projects/members/members.module.css.js
19317
- var digest63 = "e98c048fa9d62fb9b6de70533d3535d317013dd47c45f323b3115bcfd6654c46";
19318
- var css63 = `._flex1_nxqqi_1 {
19330
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-hB5d0u7dZt31/sdk/admin/views/organizations/details/projects/members/members.module.css.js
19331
+ var digest63 = "5c6a5c19e492bed71f6a94e3dca789958cdeb9d592ff7be75b2ad602023ccdc3";
19332
+ var css63 = `._flex1_1k2kc_1 {
19319
19333
  flex: 1;
19320
19334
  }
19321
19335
 
19322
- ._dialog-content_nxqqi_5 {
19336
+ ._dialog-content_1k2kc_5 {
19323
19337
  height: 70vh;
19324
19338
  width: 80vw;
19325
19339
  }
19326
19340
 
19327
- ._dialog-body_nxqqi_10 {
19341
+ ._dialog-body_1k2kc_10 {
19328
19342
  height: 100%;
19329
19343
  }
19330
19344
 
19331
- ._empty-state_nxqqi_14 {
19345
+ ._empty-state_1k2kc_14 {
19332
19346
  height: 100%;
19333
19347
  }
19334
19348
 
19335
- ._empty-state-subheading_nxqqi_18 {
19349
+ ._empty-state-subheading_1k2kc_18 {
19336
19350
  max-width: 360px;
19337
19351
  text-wrap: auto;
19338
19352
  }
19339
19353
 
19340
- ._table_nxqqi_23 {
19354
+ ._table_1k2kc_23 {
19341
19355
  width: 100%;
19342
- height: 100%;
19343
19356
  table-layout: fixed;
19344
19357
  }
19345
19358
 
19346
- ._table-wrapper_nxqqi_29 {
19359
+ ._table-wrapper_1k2kc_28 {
19347
19360
  /* Toolbar height */
19348
19361
  max-height: calc(100% - 90px);
19349
19362
  overflow: scroll;
19350
19363
  }
19351
19364
 
19352
- ._table-header_nxqqi_35 {
19365
+ ._table-header_1k2kc_34 {
19353
19366
  /* position: relative; */
19354
19367
  z-index: 2;
19355
19368
  }
19356
19369
 
19357
- ._table-search_nxqqi_40 {
19370
+ ._table-search_1k2kc_39 {
19358
19371
  max-width: 360px;
19359
19372
  }
19360
19373
 
19361
- ._table-content-wrapper_nxqqi_44 {
19374
+ ._table-content-wrapper_1k2kc_43 {
19362
19375
  height: 100%;
19363
19376
  }
19364
19377
 
19365
- ._table-action-column_nxqqi_48 {
19378
+ ._table-action-column_1k2kc_47 {
19366
19379
  width: 24px;
19367
19380
  }
19368
19381
 
19369
- ._table-action-dropdown_nxqqi_52 {
19382
+ ._table-action-dropdown_1k2kc_51 {
19370
19383
  z-index: 10000;
19371
19384
  min-width: 150px;
19372
19385
  }
19373
19386
 
19374
- ._action-dialog-overlay_nxqqi_57 {
19387
+ ._action-dialog-overlay_1k2kc_56 {
19375
19388
  z-index: 10001;
19376
19389
  }
19377
19390
 
19378
- ._action-dialog-content_nxqqi_61 {
19391
+ ._action-dialog-content_1k2kc_60 {
19379
19392
  z-index: 10002;
19380
19393
  }
19381
19394
 
19382
- ._add-member-dropdown_nxqqi_65 {
19395
+ ._add-member-dropdown_1k2kc_64 {
19383
19396
  width: 240px;
19384
19397
  /* position: relative; */
19385
19398
  }
19386
19399
 
19387
- ._add-member-dropdown-member_nxqqi_70 {
19400
+ ._add-member-dropdown-member_1k2kc_69 {
19388
19401
  width: 100%;
19389
19402
  }
19390
- ._add-member-dropdown-member-name_nxqqi_73 {
19403
+
19404
+ ._add-member-dropdown-member-name_1k2kc_73 {
19391
19405
  max-width: 100%;
19392
19406
  overflow: hidden;
19393
19407
  text-overflow: ellipsis;
19394
19408
  white-space: nowrap;
19395
- }
19396
- `;
19409
+ }`;
19397
19410
  (function() {
19398
19411
  if (typeof document === "undefined") {
19399
19412
  return;
@@ -19405,89 +19418,88 @@ var css63 = `._flex1_nxqqi_1 {
19405
19418
  document.head.appendChild(el);
19406
19419
  }
19407
19420
  })();
19408
- var members_module_css_default3 = { "flex1": "_flex1_nxqqi_1", "dialog-content": "_dialog-content_nxqqi_5", "dialogContent": "_dialog-content_nxqqi_5", "dialog-body": "_dialog-body_nxqqi_10", "dialogBody": "_dialog-body_nxqqi_10", "empty-state": "_empty-state_nxqqi_14", "emptyState": "_empty-state_nxqqi_14", "empty-state-subheading": "_empty-state-subheading_nxqqi_18", "emptyStateSubheading": "_empty-state-subheading_nxqqi_18", "table": "_table_nxqqi_23", "table-wrapper": "_table-wrapper_nxqqi_29", "tableWrapper": "_table-wrapper_nxqqi_29", "table-header": "_table-header_nxqqi_35", "tableHeader": "_table-header_nxqqi_35", "table-search": "_table-search_nxqqi_40", "tableSearch": "_table-search_nxqqi_40", "table-content-wrapper": "_table-content-wrapper_nxqqi_44", "tableContentWrapper": "_table-content-wrapper_nxqqi_44", "table-action-column": "_table-action-column_nxqqi_48", "tableActionColumn": "_table-action-column_nxqqi_48", "table-action-dropdown": "_table-action-dropdown_nxqqi_52", "tableActionDropdown": "_table-action-dropdown_nxqqi_52", "action-dialog-overlay": "_action-dialog-overlay_nxqqi_57", "actionDialogOverlay": "_action-dialog-overlay_nxqqi_57", "action-dialog-content": "_action-dialog-content_nxqqi_61", "actionDialogContent": "_action-dialog-content_nxqqi_61", "add-member-dropdown": "_add-member-dropdown_nxqqi_65", "addMemberDropdown": "_add-member-dropdown_nxqqi_65", "add-member-dropdown-member": "_add-member-dropdown-member_nxqqi_70", "addMemberDropdownMember": "_add-member-dropdown-member_nxqqi_70", "add-member-dropdown-member-name": "_add-member-dropdown-member-name_nxqqi_73", "addMemberDropdownMemberName": "_add-member-dropdown-member-name_nxqqi_73" };
19421
+ var members_module_css_default3 = { "flex1": "_flex1_1k2kc_1", "dialog-content": "_dialog-content_1k2kc_5", "dialogContent": "_dialog-content_1k2kc_5", "dialog-body": "_dialog-body_1k2kc_10", "dialogBody": "_dialog-body_1k2kc_10", "empty-state": "_empty-state_1k2kc_14", "emptyState": "_empty-state_1k2kc_14", "empty-state-subheading": "_empty-state-subheading_1k2kc_18", "emptyStateSubheading": "_empty-state-subheading_1k2kc_18", "table": "_table_1k2kc_23", "table-wrapper": "_table-wrapper_1k2kc_28", "tableWrapper": "_table-wrapper_1k2kc_28", "table-header": "_table-header_1k2kc_34", "tableHeader": "_table-header_1k2kc_34", "table-search": "_table-search_1k2kc_39", "tableSearch": "_table-search_1k2kc_39", "table-content-wrapper": "_table-content-wrapper_1k2kc_43", "tableContentWrapper": "_table-content-wrapper_1k2kc_43", "table-action-column": "_table-action-column_1k2kc_47", "tableActionColumn": "_table-action-column_1k2kc_47", "table-action-dropdown": "_table-action-dropdown_1k2kc_51", "tableActionDropdown": "_table-action-dropdown_1k2kc_51", "action-dialog-overlay": "_action-dialog-overlay_1k2kc_56", "actionDialogOverlay": "_action-dialog-overlay_1k2kc_56", "action-dialog-content": "_action-dialog-content_1k2kc_60", "actionDialogContent": "_action-dialog-content_1k2kc_60", "add-member-dropdown": "_add-member-dropdown_1k2kc_64", "addMemberDropdown": "_add-member-dropdown_1k2kc_64", "add-member-dropdown-member": "_add-member-dropdown-member_1k2kc_69", "addMemberDropdownMember": "_add-member-dropdown-member_1k2kc_69", "add-member-dropdown-member-name": "_add-member-dropdown-member-name_1k2kc_73", "addMemberDropdownMemberName": "_add-member-dropdown-member-name_1k2kc_73" };
19409
19422
 
19410
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-S5JNv9zUwHl7/sdk/admin/views/organizations/details/projects/members/members.module.css.js
19411
- var digest64 = "8292edf8e41bffc0b87fc0623b1451a049035e39dcde03fdb25542220d06929e";
19412
- var css64 = `._flex1_nxqqi_1 {
19423
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-AtWmW1Hy6D4k/sdk/admin/views/organizations/details/projects/members/members.module.css.js
19424
+ var digest64 = "cc38b00971b8fb168916ccf5ee0a0e1a4dd32f42d41c2500c5a20385b903a3ed";
19425
+ var css64 = `._flex1_1k2kc_1 {
19413
19426
  flex: 1;
19414
19427
  }
19415
19428
 
19416
- ._dialog-content_nxqqi_5 {
19429
+ ._dialog-content_1k2kc_5 {
19417
19430
  height: 70vh;
19418
19431
  width: 80vw;
19419
19432
  }
19420
19433
 
19421
- ._dialog-body_nxqqi_10 {
19434
+ ._dialog-body_1k2kc_10 {
19422
19435
  height: 100%;
19423
19436
  }
19424
19437
 
19425
- ._empty-state_nxqqi_14 {
19438
+ ._empty-state_1k2kc_14 {
19426
19439
  height: 100%;
19427
19440
  }
19428
19441
 
19429
- ._empty-state-subheading_nxqqi_18 {
19442
+ ._empty-state-subheading_1k2kc_18 {
19430
19443
  max-width: 360px;
19431
19444
  text-wrap: auto;
19432
19445
  }
19433
19446
 
19434
- ._table_nxqqi_23 {
19447
+ ._table_1k2kc_23 {
19435
19448
  width: 100%;
19436
- height: 100%;
19437
19449
  table-layout: fixed;
19438
19450
  }
19439
19451
 
19440
- ._table-wrapper_nxqqi_29 {
19452
+ ._table-wrapper_1k2kc_28 {
19441
19453
  /* Toolbar height */
19442
19454
  max-height: calc(100% - 90px);
19443
19455
  overflow: scroll;
19444
19456
  }
19445
19457
 
19446
- ._table-header_nxqqi_35 {
19458
+ ._table-header_1k2kc_34 {
19447
19459
  /* position: relative; */
19448
19460
  z-index: 2;
19449
19461
  }
19450
19462
 
19451
- ._table-search_nxqqi_40 {
19463
+ ._table-search_1k2kc_39 {
19452
19464
  max-width: 360px;
19453
19465
  }
19454
19466
 
19455
- ._table-content-wrapper_nxqqi_44 {
19467
+ ._table-content-wrapper_1k2kc_43 {
19456
19468
  height: 100%;
19457
19469
  }
19458
19470
 
19459
- ._table-action-column_nxqqi_48 {
19471
+ ._table-action-column_1k2kc_47 {
19460
19472
  width: 24px;
19461
19473
  }
19462
19474
 
19463
- ._table-action-dropdown_nxqqi_52 {
19475
+ ._table-action-dropdown_1k2kc_51 {
19464
19476
  z-index: 10000;
19465
19477
  min-width: 150px;
19466
19478
  }
19467
19479
 
19468
- ._action-dialog-overlay_nxqqi_57 {
19480
+ ._action-dialog-overlay_1k2kc_56 {
19469
19481
  z-index: 10001;
19470
19482
  }
19471
19483
 
19472
- ._action-dialog-content_nxqqi_61 {
19484
+ ._action-dialog-content_1k2kc_60 {
19473
19485
  z-index: 10002;
19474
19486
  }
19475
19487
 
19476
- ._add-member-dropdown_nxqqi_65 {
19488
+ ._add-member-dropdown_1k2kc_64 {
19477
19489
  width: 240px;
19478
19490
  /* position: relative; */
19479
19491
  }
19480
19492
 
19481
- ._add-member-dropdown-member_nxqqi_70 {
19493
+ ._add-member-dropdown-member_1k2kc_69 {
19482
19494
  width: 100%;
19483
19495
  }
19484
- ._add-member-dropdown-member-name_nxqqi_73 {
19496
+
19497
+ ._add-member-dropdown-member-name_1k2kc_73 {
19485
19498
  max-width: 100%;
19486
19499
  overflow: hidden;
19487
19500
  text-overflow: ellipsis;
19488
19501
  white-space: nowrap;
19489
- }
19490
- `;
19502
+ }`;
19491
19503
  (function() {
19492
19504
  if (typeof document === "undefined") {
19493
19505
  return;
@@ -19499,7 +19511,7 @@ var css64 = `._flex1_nxqqi_1 {
19499
19511
  document.head.appendChild(el);
19500
19512
  }
19501
19513
  })();
19502
- var members_module_css_default4 = { "flex1": "_flex1_nxqqi_1", "dialog-content": "_dialog-content_nxqqi_5", "dialogContent": "_dialog-content_nxqqi_5", "dialog-body": "_dialog-body_nxqqi_10", "dialogBody": "_dialog-body_nxqqi_10", "empty-state": "_empty-state_nxqqi_14", "emptyState": "_empty-state_nxqqi_14", "empty-state-subheading": "_empty-state-subheading_nxqqi_18", "emptyStateSubheading": "_empty-state-subheading_nxqqi_18", "table": "_table_nxqqi_23", "table-wrapper": "_table-wrapper_nxqqi_29", "tableWrapper": "_table-wrapper_nxqqi_29", "table-header": "_table-header_nxqqi_35", "tableHeader": "_table-header_nxqqi_35", "table-search": "_table-search_nxqqi_40", "tableSearch": "_table-search_nxqqi_40", "table-content-wrapper": "_table-content-wrapper_nxqqi_44", "tableContentWrapper": "_table-content-wrapper_nxqqi_44", "table-action-column": "_table-action-column_nxqqi_48", "tableActionColumn": "_table-action-column_nxqqi_48", "table-action-dropdown": "_table-action-dropdown_nxqqi_52", "tableActionDropdown": "_table-action-dropdown_nxqqi_52", "action-dialog-overlay": "_action-dialog-overlay_nxqqi_57", "actionDialogOverlay": "_action-dialog-overlay_nxqqi_57", "action-dialog-content": "_action-dialog-content_nxqqi_61", "actionDialogContent": "_action-dialog-content_nxqqi_61", "add-member-dropdown": "_add-member-dropdown_nxqqi_65", "addMemberDropdown": "_add-member-dropdown_nxqqi_65", "add-member-dropdown-member": "_add-member-dropdown-member_nxqqi_70", "addMemberDropdownMember": "_add-member-dropdown-member_nxqqi_70", "add-member-dropdown-member-name": "_add-member-dropdown-member-name_nxqqi_73", "addMemberDropdownMemberName": "_add-member-dropdown-member-name_nxqqi_73" };
19514
+ var members_module_css_default4 = { "flex1": "_flex1_1k2kc_1", "dialog-content": "_dialog-content_1k2kc_5", "dialogContent": "_dialog-content_1k2kc_5", "dialog-body": "_dialog-body_1k2kc_10", "dialogBody": "_dialog-body_1k2kc_10", "empty-state": "_empty-state_1k2kc_14", "emptyState": "_empty-state_1k2kc_14", "empty-state-subheading": "_empty-state-subheading_1k2kc_18", "emptyStateSubheading": "_empty-state-subheading_1k2kc_18", "table": "_table_1k2kc_23", "table-wrapper": "_table-wrapper_1k2kc_28", "tableWrapper": "_table-wrapper_1k2kc_28", "table-header": "_table-header_1k2kc_34", "tableHeader": "_table-header_1k2kc_34", "table-search": "_table-search_1k2kc_39", "tableSearch": "_table-search_1k2kc_39", "table-content-wrapper": "_table-content-wrapper_1k2kc_43", "tableContentWrapper": "_table-content-wrapper_1k2kc_43", "table-action-column": "_table-action-column_1k2kc_47", "tableActionColumn": "_table-action-column_1k2kc_47", "table-action-dropdown": "_table-action-dropdown_1k2kc_51", "tableActionDropdown": "_table-action-dropdown_1k2kc_51", "action-dialog-overlay": "_action-dialog-overlay_1k2kc_56", "actionDialogOverlay": "_action-dialog-overlay_1k2kc_56", "action-dialog-content": "_action-dialog-content_1k2kc_60", "actionDialogContent": "_action-dialog-content_1k2kc_60", "add-member-dropdown": "_add-member-dropdown_1k2kc_64", "addMemberDropdown": "_add-member-dropdown_1k2kc_64", "add-member-dropdown-member": "_add-member-dropdown-member_1k2kc_69", "addMemberDropdownMember": "_add-member-dropdown-member_1k2kc_69", "add-member-dropdown-member-name": "_add-member-dropdown-member-name_1k2kc_73", "addMemberDropdownMemberName": "_add-member-dropdown-member-name_1k2kc_73" };
19503
19515
 
19504
19516
  // admin/views/organizations/details/projects/members/columns.tsx
19505
19517
  import {
@@ -19617,87 +19629,86 @@ import {
19617
19629
  toast as toast18
19618
19630
  } from "@raystack/apsara";
19619
19631
 
19620
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-Mzh48lnLi8yS/sdk/admin/views/organizations/details/projects/members/members.module.css.js
19621
- var digest65 = "6ea7a10a33598906b6d0d137d65e28d85024e274bf29d5c0fd15b1ce6ddaad58";
19622
- var css65 = `._flex1_nxqqi_1 {
19632
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-o0D7DEDuAcKI/sdk/admin/views/organizations/details/projects/members/members.module.css.js
19633
+ var digest65 = "89074c15ddbf0d51ff565e4c1b8b6d49ccbb92e5ed89c473907da009a5fc0141";
19634
+ var css65 = `._flex1_1k2kc_1 {
19623
19635
  flex: 1;
19624
19636
  }
19625
19637
 
19626
- ._dialog-content_nxqqi_5 {
19638
+ ._dialog-content_1k2kc_5 {
19627
19639
  height: 70vh;
19628
19640
  width: 80vw;
19629
19641
  }
19630
19642
 
19631
- ._dialog-body_nxqqi_10 {
19643
+ ._dialog-body_1k2kc_10 {
19632
19644
  height: 100%;
19633
19645
  }
19634
19646
 
19635
- ._empty-state_nxqqi_14 {
19647
+ ._empty-state_1k2kc_14 {
19636
19648
  height: 100%;
19637
19649
  }
19638
19650
 
19639
- ._empty-state-subheading_nxqqi_18 {
19651
+ ._empty-state-subheading_1k2kc_18 {
19640
19652
  max-width: 360px;
19641
19653
  text-wrap: auto;
19642
19654
  }
19643
19655
 
19644
- ._table_nxqqi_23 {
19656
+ ._table_1k2kc_23 {
19645
19657
  width: 100%;
19646
- height: 100%;
19647
19658
  table-layout: fixed;
19648
19659
  }
19649
19660
 
19650
- ._table-wrapper_nxqqi_29 {
19661
+ ._table-wrapper_1k2kc_28 {
19651
19662
  /* Toolbar height */
19652
19663
  max-height: calc(100% - 90px);
19653
19664
  overflow: scroll;
19654
19665
  }
19655
19666
 
19656
- ._table-header_nxqqi_35 {
19667
+ ._table-header_1k2kc_34 {
19657
19668
  /* position: relative; */
19658
19669
  z-index: 2;
19659
19670
  }
19660
19671
 
19661
- ._table-search_nxqqi_40 {
19672
+ ._table-search_1k2kc_39 {
19662
19673
  max-width: 360px;
19663
19674
  }
19664
19675
 
19665
- ._table-content-wrapper_nxqqi_44 {
19676
+ ._table-content-wrapper_1k2kc_43 {
19666
19677
  height: 100%;
19667
19678
  }
19668
19679
 
19669
- ._table-action-column_nxqqi_48 {
19680
+ ._table-action-column_1k2kc_47 {
19670
19681
  width: 24px;
19671
19682
  }
19672
19683
 
19673
- ._table-action-dropdown_nxqqi_52 {
19684
+ ._table-action-dropdown_1k2kc_51 {
19674
19685
  z-index: 10000;
19675
19686
  min-width: 150px;
19676
19687
  }
19677
19688
 
19678
- ._action-dialog-overlay_nxqqi_57 {
19689
+ ._action-dialog-overlay_1k2kc_56 {
19679
19690
  z-index: 10001;
19680
19691
  }
19681
19692
 
19682
- ._action-dialog-content_nxqqi_61 {
19693
+ ._action-dialog-content_1k2kc_60 {
19683
19694
  z-index: 10002;
19684
19695
  }
19685
19696
 
19686
- ._add-member-dropdown_nxqqi_65 {
19697
+ ._add-member-dropdown_1k2kc_64 {
19687
19698
  width: 240px;
19688
19699
  /* position: relative; */
19689
19700
  }
19690
19701
 
19691
- ._add-member-dropdown-member_nxqqi_70 {
19702
+ ._add-member-dropdown-member_1k2kc_69 {
19692
19703
  width: 100%;
19693
19704
  }
19694
- ._add-member-dropdown-member-name_nxqqi_73 {
19705
+
19706
+ ._add-member-dropdown-member-name_1k2kc_73 {
19695
19707
  max-width: 100%;
19696
19708
  overflow: hidden;
19697
19709
  text-overflow: ellipsis;
19698
19710
  white-space: nowrap;
19699
- }
19700
- `;
19711
+ }`;
19701
19712
  (function() {
19702
19713
  if (typeof document === "undefined") {
19703
19714
  return;
@@ -19709,27 +19720,20 @@ var css65 = `._flex1_nxqqi_1 {
19709
19720
  document.head.appendChild(el);
19710
19721
  }
19711
19722
  })();
19712
- var members_module_css_default5 = { "flex1": "_flex1_nxqqi_1", "dialog-content": "_dialog-content_nxqqi_5", "dialogContent": "_dialog-content_nxqqi_5", "dialog-body": "_dialog-body_nxqqi_10", "dialogBody": "_dialog-body_nxqqi_10", "empty-state": "_empty-state_nxqqi_14", "emptyState": "_empty-state_nxqqi_14", "empty-state-subheading": "_empty-state-subheading_nxqqi_18", "emptyStateSubheading": "_empty-state-subheading_nxqqi_18", "table": "_table_nxqqi_23", "table-wrapper": "_table-wrapper_nxqqi_29", "tableWrapper": "_table-wrapper_nxqqi_29", "table-header": "_table-header_nxqqi_35", "tableHeader": "_table-header_nxqqi_35", "table-search": "_table-search_nxqqi_40", "tableSearch": "_table-search_nxqqi_40", "table-content-wrapper": "_table-content-wrapper_nxqqi_44", "tableContentWrapper": "_table-content-wrapper_nxqqi_44", "table-action-column": "_table-action-column_nxqqi_48", "tableActionColumn": "_table-action-column_nxqqi_48", "table-action-dropdown": "_table-action-dropdown_nxqqi_52", "tableActionDropdown": "_table-action-dropdown_nxqqi_52", "action-dialog-overlay": "_action-dialog-overlay_nxqqi_57", "actionDialogOverlay": "_action-dialog-overlay_nxqqi_57", "action-dialog-content": "_action-dialog-content_nxqqi_61", "actionDialogContent": "_action-dialog-content_nxqqi_61", "add-member-dropdown": "_add-member-dropdown_nxqqi_65", "addMemberDropdown": "_add-member-dropdown_nxqqi_65", "add-member-dropdown-member": "_add-member-dropdown-member_nxqqi_70", "addMemberDropdownMember": "_add-member-dropdown-member_nxqqi_70", "add-member-dropdown-member-name": "_add-member-dropdown-member-name_nxqqi_73", "addMemberDropdownMemberName": "_add-member-dropdown-member-name_nxqqi_73" };
19723
+ var members_module_css_default5 = { "flex1": "_flex1_1k2kc_1", "dialog-content": "_dialog-content_1k2kc_5", "dialogContent": "_dialog-content_1k2kc_5", "dialog-body": "_dialog-body_1k2kc_10", "dialogBody": "_dialog-body_1k2kc_10", "empty-state": "_empty-state_1k2kc_14", "emptyState": "_empty-state_1k2kc_14", "empty-state-subheading": "_empty-state-subheading_1k2kc_18", "emptyStateSubheading": "_empty-state-subheading_1k2kc_18", "table": "_table_1k2kc_23", "table-wrapper": "_table-wrapper_1k2kc_28", "tableWrapper": "_table-wrapper_1k2kc_28", "table-header": "_table-header_1k2kc_34", "tableHeader": "_table-header_1k2kc_34", "table-search": "_table-search_1k2kc_39", "tableSearch": "_table-search_1k2kc_39", "table-content-wrapper": "_table-content-wrapper_1k2kc_43", "tableContentWrapper": "_table-content-wrapper_1k2kc_43", "table-action-column": "_table-action-column_1k2kc_47", "tableActionColumn": "_table-action-column_1k2kc_47", "table-action-dropdown": "_table-action-dropdown_1k2kc_51", "tableActionDropdown": "_table-action-dropdown_1k2kc_51", "action-dialog-overlay": "_action-dialog-overlay_1k2kc_56", "actionDialogOverlay": "_action-dialog-overlay_1k2kc_56", "action-dialog-content": "_action-dialog-content_1k2kc_60", "actionDialogContent": "_action-dialog-content_1k2kc_60", "add-member-dropdown": "_add-member-dropdown_1k2kc_64", "addMemberDropdown": "_add-member-dropdown_1k2kc_64", "add-member-dropdown-member": "_add-member-dropdown-member_1k2kc_69", "addMemberDropdownMember": "_add-member-dropdown-member_1k2kc_69", "add-member-dropdown-member-name": "_add-member-dropdown-member-name_1k2kc_73", "addMemberDropdownMemberName": "_add-member-dropdown-member-name_1k2kc_73" };
19713
19724
 
19714
19725
  // admin/views/organizations/details/projects/members/assign-role.tsx
19715
- import { useCallback as useCallback15 } from "react";
19716
19726
  import {
19717
19727
  FrontierServiceQueries as FrontierServiceQueries24,
19718
- FrontierService as FrontierService2,
19719
- ListPoliciesRequestSchema as ListPoliciesRequestSchema2,
19720
- DeletePolicyRequestSchema as DeletePolicyRequestSchema2,
19721
- CreatePolicyRequestSchema as CreatePolicyRequestSchema3
19728
+ SetProjectMemberRoleRequestSchema as SetProjectMemberRoleRequestSchema2
19722
19729
  } from "@raystack/proton/frontier";
19723
19730
  import { create as create25 } from "@bufbuild/protobuf";
19724
- import { useMutation as useMutation20, useTransport as useTransport15 } from "@connectrpc/connect-query";
19725
- import { createClient as createClient2 } from "@connectrpc/connect";
19731
+ import { useMutation as useMutation20 } from "@connectrpc/connect-query";
19726
19732
  import { useForm as useForm12 } from "react-hook-form";
19727
19733
  import { zodResolver as zodResolver12 } from "@hookform/resolvers/zod";
19728
19734
  import { jsx as jsx104, jsxs as jsxs79 } from "react/jsx-runtime";
19729
19735
  var formSchema2 = external_exports.object({
19730
- roleIds: external_exports.instanceof(Set).refine((set) => set.size > 0, {
19731
- message: "At least one role must be selected"
19732
- })
19736
+ roleId: external_exports.string().min(1, "A role must be selected")
19733
19737
  });
19734
19738
  var AssignRole2 = ({
19735
19739
  roles = [],
@@ -19738,84 +19742,36 @@ var AssignRole2 = ({
19738
19742
  onRoleUpdate,
19739
19743
  onClose
19740
19744
  }) => {
19741
- const transport = useTransport15();
19745
+ const currentRoleId = user?.roleIds?.[0] || "";
19742
19746
  const {
19743
19747
  handleSubmit,
19744
19748
  watch,
19745
19749
  setValue,
19746
- formState: { isSubmitting, errors }
19750
+ formState: { isSubmitting, errors, isDirty: isDirty2 }
19747
19751
  } = useForm12({
19748
19752
  defaultValues: {
19749
- roleIds: new Set(user?.roleIds || [])
19753
+ roleId: currentRoleId
19750
19754
  },
19751
19755
  resolver: zodResolver12(formSchema2)
19752
19756
  });
19753
- const { mutateAsync: deletePolicy } = useMutation20(
19754
- FrontierServiceQueries24.deletePolicy
19755
- );
19756
- const { mutateAsync: createPolicy } = useMutation20(
19757
- FrontierServiceQueries24.createPolicy
19758
- );
19759
- const roleIds = watch("roleIds");
19760
- function onCheckedChange(value, roleId) {
19761
- if (!roleId)
19762
- return;
19763
- const currentRoles = new Set(roleIds);
19764
- if (value) {
19765
- currentRoles.add(roleId);
19766
- } else {
19767
- currentRoles.delete(roleId);
19768
- }
19769
- setValue("roleIds", currentRoles);
19770
- }
19771
- const checkRole = useCallback15(
19772
- (roleId) => {
19773
- if (!roleId)
19774
- return false;
19775
- return roleIds?.has(roleId) || false;
19776
- },
19777
- [roleIds]
19757
+ const { mutateAsync: setProjectMemberRole } = useMutation20(
19758
+ FrontierServiceQueries24.setProjectMemberRole
19778
19759
  );
19760
+ const selectedRoleId = watch("roleId");
19779
19761
  const onSubmit = async (data) => {
19780
19762
  try {
19781
- const client = createClient2(FrontierService2, transport);
19782
- const policiesResp = await client.listPolicies(
19783
- create25(ListPoliciesRequestSchema2, {
19763
+ await setProjectMemberRole(
19764
+ create25(SetProjectMemberRoleRequestSchema2, {
19784
19765
  projectId,
19785
- userId: user?.id
19766
+ principalId: user?.id || "",
19767
+ principalType: SCOPES.USER,
19768
+ roleId: data.roleId
19786
19769
  })
19787
19770
  );
19788
- const policies = policiesResp.policies || [];
19789
- const removedRolesPolicies = policies.filter(
19790
- (policy) => !(policy.roleId && data.roleIds.has(policy.roleId))
19791
- );
19792
- await Promise.all(
19793
- removedRolesPolicies.map(
19794
- (policy) => deletePolicy(
19795
- create25(DeletePolicyRequestSchema2, { id: policy.id || "" })
19796
- )
19797
- )
19798
- );
19799
- const resource = `app/project:${projectId}`;
19800
- const principal = `app/user:${user?.id}`;
19801
- const assignedRolesArr = Array.from(data.roleIds);
19802
- await Promise.all(
19803
- assignedRolesArr.map(
19804
- (roleId) => createPolicy(
19805
- create25(CreatePolicyRequestSchema3, {
19806
- body: {
19807
- roleId,
19808
- resource,
19809
- principal
19810
- }
19811
- })
19812
- )
19813
- )
19814
- );
19815
19771
  if (onRoleUpdate) {
19816
19772
  onRoleUpdate({
19817
19773
  ...user,
19818
- roleIds: assignedRolesArr
19774
+ roleIds: [data.roleId]
19819
19775
  });
19820
19776
  }
19821
19777
  toast18.success("Role assigned successfully");
@@ -19841,7 +19797,7 @@ var AssignRole2 = ({
19841
19797
  /* @__PURE__ */ jsx104("div", { role: "group", "aria-labelledby": "roles-group", children: /* @__PURE__ */ jsxs79(Flex75, { direction: "column", gap: 4, children: [
19842
19798
  roles.map((role) => {
19843
19799
  const htmlId = `role-${role.id}`;
19844
- const checked = checkRole(role.id);
19800
+ const checked = selectedRoleId === role.id;
19845
19801
  return /* @__PURE__ */ jsxs79(Flex75, { gap: 3, children: [
19846
19802
  /* @__PURE__ */ jsx104(
19847
19803
  Checkbox3,
@@ -19849,13 +19805,15 @@ var AssignRole2 = ({
19849
19805
  id: htmlId,
19850
19806
  "data-test-id": `role-checkbox-${role.id}`,
19851
19807
  checked,
19852
- onCheckedChange: (value) => onCheckedChange(value, role.id)
19808
+ onCheckedChange: () => setValue("roleId", role.id || "", {
19809
+ shouldDirty: true
19810
+ })
19853
19811
  }
19854
19812
  ),
19855
19813
  /* @__PURE__ */ jsx104(Label9, { htmlFor: htmlId, children: role.title })
19856
19814
  ] }, role.id);
19857
19815
  }),
19858
- errors.roleIds && /* @__PURE__ */ jsx104(Text54, { variant: "danger", children: errors.roleIds.message })
19816
+ errors.roleId && /* @__PURE__ */ jsx104(Text54, { variant: "danger", children: errors.roleId.message })
19859
19817
  ] }) })
19860
19818
  ] }) }),
19861
19819
  /* @__PURE__ */ jsxs79(Dialog16.Footer, { children: [
@@ -19873,6 +19831,7 @@ var AssignRole2 = ({
19873
19831
  Button28,
19874
19832
  {
19875
19833
  type: "submit",
19834
+ disabled: !isDirty2,
19876
19835
  "data-test-id": "assign-role-update-button",
19877
19836
  loading: isSubmitting,
19878
19837
  loaderText: "Updating...",
@@ -19889,96 +19848,92 @@ var AssignRole2 = ({
19889
19848
  // admin/views/organizations/details/projects/members/remove-member.tsx
19890
19849
  import { useState as useState32 } from "react";
19891
19850
  import {
19892
- FrontierService as FrontierService3,
19893
19851
  FrontierServiceQueries as FrontierServiceQueries25,
19894
- ListPoliciesRequestSchema as ListPoliciesRequestSchema3,
19895
- DeletePolicyRequestSchema as DeletePolicyRequestSchema3
19852
+ RemoveProjectMemberRequestSchema
19896
19853
  } from "@raystack/proton/frontier";
19897
19854
  import { create as create26 } from "@bufbuild/protobuf";
19898
- import { useMutation as useMutation21, useTransport as useTransport16 } from "@connectrpc/connect-query";
19899
- import { createClient as createClient3 } from "@connectrpc/connect";
19855
+ import { useMutation as useMutation21 } from "@connectrpc/connect-query";
19900
19856
 
19901
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-rk0p1kPwXyUi/sdk/admin/views/organizations/details/projects/members/members.module.css.js
19902
- var digest66 = "38570f0fcf0c33113fe75b76c4f4b3eb3a01d557146250b4aff4d1e037a13b01";
19903
- var css66 = `._flex1_nxqqi_1 {
19857
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-SrV51SfRUPdt/sdk/admin/views/organizations/details/projects/members/members.module.css.js
19858
+ var digest66 = "105166671a7bfa102fa5e90ad7e32bc4ed9d58ae60687cbda8247a0923b1c096";
19859
+ var css66 = `._flex1_1k2kc_1 {
19904
19860
  flex: 1;
19905
19861
  }
19906
19862
 
19907
- ._dialog-content_nxqqi_5 {
19863
+ ._dialog-content_1k2kc_5 {
19908
19864
  height: 70vh;
19909
19865
  width: 80vw;
19910
19866
  }
19911
19867
 
19912
- ._dialog-body_nxqqi_10 {
19868
+ ._dialog-body_1k2kc_10 {
19913
19869
  height: 100%;
19914
19870
  }
19915
19871
 
19916
- ._empty-state_nxqqi_14 {
19872
+ ._empty-state_1k2kc_14 {
19917
19873
  height: 100%;
19918
19874
  }
19919
19875
 
19920
- ._empty-state-subheading_nxqqi_18 {
19876
+ ._empty-state-subheading_1k2kc_18 {
19921
19877
  max-width: 360px;
19922
19878
  text-wrap: auto;
19923
19879
  }
19924
19880
 
19925
- ._table_nxqqi_23 {
19881
+ ._table_1k2kc_23 {
19926
19882
  width: 100%;
19927
- height: 100%;
19928
19883
  table-layout: fixed;
19929
19884
  }
19930
19885
 
19931
- ._table-wrapper_nxqqi_29 {
19886
+ ._table-wrapper_1k2kc_28 {
19932
19887
  /* Toolbar height */
19933
19888
  max-height: calc(100% - 90px);
19934
19889
  overflow: scroll;
19935
19890
  }
19936
19891
 
19937
- ._table-header_nxqqi_35 {
19892
+ ._table-header_1k2kc_34 {
19938
19893
  /* position: relative; */
19939
19894
  z-index: 2;
19940
19895
  }
19941
19896
 
19942
- ._table-search_nxqqi_40 {
19897
+ ._table-search_1k2kc_39 {
19943
19898
  max-width: 360px;
19944
19899
  }
19945
19900
 
19946
- ._table-content-wrapper_nxqqi_44 {
19901
+ ._table-content-wrapper_1k2kc_43 {
19947
19902
  height: 100%;
19948
19903
  }
19949
19904
 
19950
- ._table-action-column_nxqqi_48 {
19905
+ ._table-action-column_1k2kc_47 {
19951
19906
  width: 24px;
19952
19907
  }
19953
19908
 
19954
- ._table-action-dropdown_nxqqi_52 {
19909
+ ._table-action-dropdown_1k2kc_51 {
19955
19910
  z-index: 10000;
19956
19911
  min-width: 150px;
19957
19912
  }
19958
19913
 
19959
- ._action-dialog-overlay_nxqqi_57 {
19914
+ ._action-dialog-overlay_1k2kc_56 {
19960
19915
  z-index: 10001;
19961
19916
  }
19962
19917
 
19963
- ._action-dialog-content_nxqqi_61 {
19918
+ ._action-dialog-content_1k2kc_60 {
19964
19919
  z-index: 10002;
19965
19920
  }
19966
19921
 
19967
- ._add-member-dropdown_nxqqi_65 {
19922
+ ._add-member-dropdown_1k2kc_64 {
19968
19923
  width: 240px;
19969
19924
  /* position: relative; */
19970
19925
  }
19971
19926
 
19972
- ._add-member-dropdown-member_nxqqi_70 {
19927
+ ._add-member-dropdown-member_1k2kc_69 {
19973
19928
  width: 100%;
19974
19929
  }
19975
- ._add-member-dropdown-member-name_nxqqi_73 {
19930
+
19931
+ ._add-member-dropdown-member-name_1k2kc_73 {
19976
19932
  max-width: 100%;
19977
19933
  overflow: hidden;
19978
19934
  text-overflow: ellipsis;
19979
19935
  white-space: nowrap;
19980
- }
19981
- `;
19936
+ }`;
19982
19937
  (function() {
19983
19938
  if (typeof document === "undefined") {
19984
19939
  return;
@@ -19990,7 +19945,7 @@ var css66 = `._flex1_nxqqi_1 {
19990
19945
  document.head.appendChild(el);
19991
19946
  }
19992
19947
  })();
19993
- var members_module_css_default6 = { "flex1": "_flex1_nxqqi_1", "dialog-content": "_dialog-content_nxqqi_5", "dialogContent": "_dialog-content_nxqqi_5", "dialog-body": "_dialog-body_nxqqi_10", "dialogBody": "_dialog-body_nxqqi_10", "empty-state": "_empty-state_nxqqi_14", "emptyState": "_empty-state_nxqqi_14", "empty-state-subheading": "_empty-state-subheading_nxqqi_18", "emptyStateSubheading": "_empty-state-subheading_nxqqi_18", "table": "_table_nxqqi_23", "table-wrapper": "_table-wrapper_nxqqi_29", "tableWrapper": "_table-wrapper_nxqqi_29", "table-header": "_table-header_nxqqi_35", "tableHeader": "_table-header_nxqqi_35", "table-search": "_table-search_nxqqi_40", "tableSearch": "_table-search_nxqqi_40", "table-content-wrapper": "_table-content-wrapper_nxqqi_44", "tableContentWrapper": "_table-content-wrapper_nxqqi_44", "table-action-column": "_table-action-column_nxqqi_48", "tableActionColumn": "_table-action-column_nxqqi_48", "table-action-dropdown": "_table-action-dropdown_nxqqi_52", "tableActionDropdown": "_table-action-dropdown_nxqqi_52", "action-dialog-overlay": "_action-dialog-overlay_nxqqi_57", "actionDialogOverlay": "_action-dialog-overlay_nxqqi_57", "action-dialog-content": "_action-dialog-content_nxqqi_61", "actionDialogContent": "_action-dialog-content_nxqqi_61", "add-member-dropdown": "_add-member-dropdown_nxqqi_65", "addMemberDropdown": "_add-member-dropdown_nxqqi_65", "add-member-dropdown-member": "_add-member-dropdown-member_nxqqi_70", "addMemberDropdownMember": "_add-member-dropdown-member_nxqqi_70", "add-member-dropdown-member-name": "_add-member-dropdown-member-name_nxqqi_73", "addMemberDropdownMemberName": "_add-member-dropdown-member-name_nxqqi_73" };
19948
+ var members_module_css_default6 = { "flex1": "_flex1_1k2kc_1", "dialog-content": "_dialog-content_1k2kc_5", "dialogContent": "_dialog-content_1k2kc_5", "dialog-body": "_dialog-body_1k2kc_10", "dialogBody": "_dialog-body_1k2kc_10", "empty-state": "_empty-state_1k2kc_14", "emptyState": "_empty-state_1k2kc_14", "empty-state-subheading": "_empty-state-subheading_1k2kc_18", "emptyStateSubheading": "_empty-state-subheading_1k2kc_18", "table": "_table_1k2kc_23", "table-wrapper": "_table-wrapper_1k2kc_28", "tableWrapper": "_table-wrapper_1k2kc_28", "table-header": "_table-header_1k2kc_34", "tableHeader": "_table-header_1k2kc_34", "table-search": "_table-search_1k2kc_39", "tableSearch": "_table-search_1k2kc_39", "table-content-wrapper": "_table-content-wrapper_1k2kc_43", "tableContentWrapper": "_table-content-wrapper_1k2kc_43", "table-action-column": "_table-action-column_1k2kc_47", "tableActionColumn": "_table-action-column_1k2kc_47", "table-action-dropdown": "_table-action-dropdown_1k2kc_51", "tableActionDropdown": "_table-action-dropdown_1k2kc_51", "action-dialog-overlay": "_action-dialog-overlay_1k2kc_56", "actionDialogOverlay": "_action-dialog-overlay_1k2kc_56", "action-dialog-content": "_action-dialog-content_1k2kc_60", "actionDialogContent": "_action-dialog-content_1k2kc_60", "add-member-dropdown": "_add-member-dropdown_1k2kc_64", "addMemberDropdown": "_add-member-dropdown_1k2kc_64", "add-member-dropdown-member": "_add-member-dropdown-member_1k2kc_69", "addMemberDropdownMember": "_add-member-dropdown-member_1k2kc_69", "add-member-dropdown-member-name": "_add-member-dropdown-member-name_1k2kc_73", "addMemberDropdownMemberName": "_add-member-dropdown-member-name_1k2kc_73" };
19994
19949
 
19995
19950
  // admin/views/organizations/details/projects/members/remove-member.tsx
19996
19951
  import { Button as Button29, Dialog as Dialog17, Flex as Flex76, Text as Text55, toast as toast19 } from "@raystack/apsara";
@@ -20003,30 +19958,21 @@ var RemoveMember2 = ({
20003
19958
  }) => {
20004
19959
  const t = useTerminology();
20005
19960
  const [isSubmitting, setIsSubmitting] = useState32(false);
20006
- const transport = useTransport16();
20007
- const { mutateAsync: deletePolicy } = useMutation21(
20008
- FrontierServiceQueries25.deletePolicy
19961
+ const { mutateAsync: removeProjectMember } = useMutation21(
19962
+ FrontierServiceQueries25.removeProjectMember
20009
19963
  );
20010
19964
  async function onSubmit() {
20011
19965
  try {
20012
19966
  if (!user)
20013
19967
  return;
20014
19968
  setIsSubmitting(true);
20015
- const client = createClient3(FrontierService3, transport);
20016
- const policiesResp = await client.listPolicies(
20017
- create26(ListPoliciesRequestSchema3, {
19969
+ await removeProjectMember(
19970
+ create26(RemoveProjectMemberRequestSchema, {
20018
19971
  projectId,
20019
- userId: user?.id
19972
+ principalId: user.id,
19973
+ principalType: "app/user"
20020
19974
  })
20021
19975
  );
20022
- const policies = policiesResp.policies || [];
20023
- await Promise.all(
20024
- policies.map(
20025
- (policy) => deletePolicy(
20026
- create26(DeletePolicyRequestSchema3, { id: policy.id || "" })
20027
- )
20028
- )
20029
- );
20030
19976
  if (onRemove) {
20031
19977
  onRemove(user);
20032
19978
  }
@@ -20106,87 +20052,86 @@ import {
20106
20052
  Text as Text56
20107
20053
  } from "@raystack/apsara";
20108
20054
 
20109
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-7FpAB62LurUm/sdk/admin/views/organizations/details/projects/members/members.module.css.js
20110
- var digest67 = "db02c9c535f3bdf9e4fc884eb995ce1348527345b516df07889efae152fcfce9";
20111
- var css67 = `._flex1_nxqqi_1 {
20055
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-NH8Aka9fq0OZ/sdk/admin/views/organizations/details/projects/members/members.module.css.js
20056
+ var digest67 = "276d0dda5aa83a3bdc77a747c6824a596f5ffa1c62db3d7abd0044b34c590091";
20057
+ var css67 = `._flex1_1k2kc_1 {
20112
20058
  flex: 1;
20113
20059
  }
20114
20060
 
20115
- ._dialog-content_nxqqi_5 {
20061
+ ._dialog-content_1k2kc_5 {
20116
20062
  height: 70vh;
20117
20063
  width: 80vw;
20118
20064
  }
20119
20065
 
20120
- ._dialog-body_nxqqi_10 {
20066
+ ._dialog-body_1k2kc_10 {
20121
20067
  height: 100%;
20122
20068
  }
20123
20069
 
20124
- ._empty-state_nxqqi_14 {
20070
+ ._empty-state_1k2kc_14 {
20125
20071
  height: 100%;
20126
20072
  }
20127
20073
 
20128
- ._empty-state-subheading_nxqqi_18 {
20074
+ ._empty-state-subheading_1k2kc_18 {
20129
20075
  max-width: 360px;
20130
20076
  text-wrap: auto;
20131
20077
  }
20132
20078
 
20133
- ._table_nxqqi_23 {
20079
+ ._table_1k2kc_23 {
20134
20080
  width: 100%;
20135
- height: 100%;
20136
20081
  table-layout: fixed;
20137
20082
  }
20138
20083
 
20139
- ._table-wrapper_nxqqi_29 {
20084
+ ._table-wrapper_1k2kc_28 {
20140
20085
  /* Toolbar height */
20141
20086
  max-height: calc(100% - 90px);
20142
20087
  overflow: scroll;
20143
20088
  }
20144
20089
 
20145
- ._table-header_nxqqi_35 {
20090
+ ._table-header_1k2kc_34 {
20146
20091
  /* position: relative; */
20147
20092
  z-index: 2;
20148
20093
  }
20149
20094
 
20150
- ._table-search_nxqqi_40 {
20095
+ ._table-search_1k2kc_39 {
20151
20096
  max-width: 360px;
20152
20097
  }
20153
20098
 
20154
- ._table-content-wrapper_nxqqi_44 {
20099
+ ._table-content-wrapper_1k2kc_43 {
20155
20100
  height: 100%;
20156
20101
  }
20157
20102
 
20158
- ._table-action-column_nxqqi_48 {
20103
+ ._table-action-column_1k2kc_47 {
20159
20104
  width: 24px;
20160
20105
  }
20161
20106
 
20162
- ._table-action-dropdown_nxqqi_52 {
20107
+ ._table-action-dropdown_1k2kc_51 {
20163
20108
  z-index: 10000;
20164
20109
  min-width: 150px;
20165
20110
  }
20166
20111
 
20167
- ._action-dialog-overlay_nxqqi_57 {
20112
+ ._action-dialog-overlay_1k2kc_56 {
20168
20113
  z-index: 10001;
20169
20114
  }
20170
20115
 
20171
- ._action-dialog-content_nxqqi_61 {
20116
+ ._action-dialog-content_1k2kc_60 {
20172
20117
  z-index: 10002;
20173
20118
  }
20174
20119
 
20175
- ._add-member-dropdown_nxqqi_65 {
20120
+ ._add-member-dropdown_1k2kc_64 {
20176
20121
  width: 240px;
20177
20122
  /* position: relative; */
20178
20123
  }
20179
20124
 
20180
- ._add-member-dropdown-member_nxqqi_70 {
20125
+ ._add-member-dropdown-member_1k2kc_69 {
20181
20126
  width: 100%;
20182
20127
  }
20183
- ._add-member-dropdown-member-name_nxqqi_73 {
20128
+
20129
+ ._add-member-dropdown-member-name_1k2kc_73 {
20184
20130
  max-width: 100%;
20185
20131
  overflow: hidden;
20186
20132
  text-overflow: ellipsis;
20187
20133
  white-space: nowrap;
20188
- }
20189
- `;
20134
+ }`;
20190
20135
  (function() {
20191
20136
  if (typeof document === "undefined") {
20192
20137
  return;
@@ -20198,7 +20143,7 @@ var css67 = `._flex1_nxqqi_1 {
20198
20143
  document.head.appendChild(el);
20199
20144
  }
20200
20145
  })();
20201
- var members_module_css_default7 = { "flex1": "_flex1_nxqqi_1", "dialog-content": "_dialog-content_nxqqi_5", "dialogContent": "_dialog-content_nxqqi_5", "dialog-body": "_dialog-body_nxqqi_10", "dialogBody": "_dialog-body_nxqqi_10", "empty-state": "_empty-state_nxqqi_14", "emptyState": "_empty-state_nxqqi_14", "empty-state-subheading": "_empty-state-subheading_nxqqi_18", "emptyStateSubheading": "_empty-state-subheading_nxqqi_18", "table": "_table_nxqqi_23", "table-wrapper": "_table-wrapper_nxqqi_29", "tableWrapper": "_table-wrapper_nxqqi_29", "table-header": "_table-header_nxqqi_35", "tableHeader": "_table-header_nxqqi_35", "table-search": "_table-search_nxqqi_40", "tableSearch": "_table-search_nxqqi_40", "table-content-wrapper": "_table-content-wrapper_nxqqi_44", "tableContentWrapper": "_table-content-wrapper_nxqqi_44", "table-action-column": "_table-action-column_nxqqi_48", "tableActionColumn": "_table-action-column_nxqqi_48", "table-action-dropdown": "_table-action-dropdown_nxqqi_52", "tableActionDropdown": "_table-action-dropdown_nxqqi_52", "action-dialog-overlay": "_action-dialog-overlay_nxqqi_57", "actionDialogOverlay": "_action-dialog-overlay_nxqqi_57", "action-dialog-content": "_action-dialog-content_nxqqi_61", "actionDialogContent": "_action-dialog-content_nxqqi_61", "add-member-dropdown": "_add-member-dropdown_nxqqi_65", "addMemberDropdown": "_add-member-dropdown_nxqqi_65", "add-member-dropdown-member": "_add-member-dropdown-member_nxqqi_70", "addMemberDropdownMember": "_add-member-dropdown-member_nxqqi_70", "add-member-dropdown-member-name": "_add-member-dropdown-member-name_nxqqi_73", "addMemberDropdownMemberName": "_add-member-dropdown-member-name_nxqqi_73" };
20146
+ var members_module_css_default7 = { "flex1": "_flex1_1k2kc_1", "dialog-content": "_dialog-content_1k2kc_5", "dialogContent": "_dialog-content_1k2kc_5", "dialog-body": "_dialog-body_1k2kc_10", "dialogBody": "_dialog-body_1k2kc_10", "empty-state": "_empty-state_1k2kc_14", "emptyState": "_empty-state_1k2kc_14", "empty-state-subheading": "_empty-state-subheading_1k2kc_18", "emptyStateSubheading": "_empty-state-subheading_1k2kc_18", "table": "_table_1k2kc_23", "table-wrapper": "_table-wrapper_1k2kc_28", "tableWrapper": "_table-wrapper_1k2kc_28", "table-header": "_table-header_1k2kc_34", "tableHeader": "_table-header_1k2kc_34", "table-search": "_table-search_1k2kc_39", "tableSearch": "_table-search_1k2kc_39", "table-content-wrapper": "_table-content-wrapper_1k2kc_43", "tableContentWrapper": "_table-content-wrapper_1k2kc_43", "table-action-column": "_table-action-column_1k2kc_47", "tableActionColumn": "_table-action-column_1k2kc_47", "table-action-dropdown": "_table-action-dropdown_1k2kc_51", "tableActionDropdown": "_table-action-dropdown_1k2kc_51", "action-dialog-overlay": "_action-dialog-overlay_1k2kc_56", "actionDialogOverlay": "_action-dialog-overlay_1k2kc_56", "action-dialog-content": "_action-dialog-content_1k2kc_60", "actionDialogContent": "_action-dialog-content_1k2kc_60", "add-member-dropdown": "_add-member-dropdown_1k2kc_64", "addMemberDropdown": "_add-member-dropdown_1k2kc_64", "add-member-dropdown-member": "_add-member-dropdown-member_1k2kc_69", "addMemberDropdownMember": "_add-member-dropdown-member_1k2kc_69", "add-member-dropdown-member-name": "_add-member-dropdown-member-name_1k2kc_73", "addMemberDropdownMemberName": "_add-member-dropdown-member-name_1k2kc_73" };
20202
20147
 
20203
20148
  // admin/views/organizations/details/projects/members/add-members-dropdown.tsx
20204
20149
  import { Fragment as Fragment25, jsx as jsx106, jsxs as jsxs81 } from "react/jsx-runtime";
@@ -20302,7 +20247,7 @@ var ProjectMembersDialog = ({
20302
20247
  );
20303
20248
  const { data: projectRoles = [], isLoading: isProjectRolesLoading, error: rolesError } = useQuery19(
20304
20249
  FrontierServiceQueries26.listRoles,
20305
- create27(ListRolesRequestSchema3, { scopes: [PROJECT_NAMESPACE] }),
20250
+ create27(ListRolesRequestSchema4, { scopes: [PROJECT_NAMESPACE] }),
20306
20251
  {
20307
20252
  select: (data2) => data2?.roles || []
20308
20253
  }
@@ -20337,7 +20282,7 @@ var ProjectMembersDialog = ({
20337
20282
  }
20338
20283
  );
20339
20284
  const data = infiniteData?.pages?.flatMap((page) => page?.projectUsers || []) || [];
20340
- const onTableQueryChange = useCallback16((query) => {
20285
+ const onTableQueryChange = useCallback14((query) => {
20341
20286
  const updatedQuery = {
20342
20287
  ...query,
20343
20288
  offset: 0,
@@ -20354,7 +20299,7 @@ var ProjectMembersDialog = ({
20354
20299
  rqlRequest: updatedRQLRequest
20355
20300
  });
20356
20301
  }, []);
20357
- const handleLoadMore = useCallback16(async () => {
20302
+ const handleLoadMore = useCallback14(async () => {
20358
20303
  try {
20359
20304
  if (!hasNextPage)
20360
20305
  return;
@@ -20366,22 +20311,22 @@ var ProjectMembersDialog = ({
20366
20311
  async function refetchMembers() {
20367
20312
  await refetch();
20368
20313
  }
20369
- const openAssignRoleDialog = useCallback16(
20314
+ const openAssignRoleDialog = useCallback14(
20370
20315
  (user) => {
20371
20316
  setAssignRoleConfig({ isOpen: true, user });
20372
20317
  },
20373
20318
  []
20374
20319
  );
20375
- const closeAssignRoleDialog = useCallback16(() => {
20320
+ const closeAssignRoleDialog = useCallback14(() => {
20376
20321
  setAssignRoleConfig({ isOpen: false, user: null });
20377
20322
  }, []);
20378
- const openRemoveMemberDialog = useCallback16(
20323
+ const openRemoveMemberDialog = useCallback14(
20379
20324
  (user) => {
20380
20325
  setRemoveMemberConfig({ isOpen: true, user });
20381
20326
  },
20382
20327
  []
20383
20328
  );
20384
- const closeRemoveMemberDialog = useCallback16(() => {
20329
+ const closeRemoveMemberDialog = useCallback14(() => {
20385
20330
  setRemoveMemberConfig({ isOpen: false, user: null });
20386
20331
  }, []);
20387
20332
  const columns = useMemo13(
@@ -20642,8 +20587,8 @@ function OrganizationProjectsView() {
20642
20587
  // admin/views/organizations/details/invoices/index.tsx
20643
20588
  import { DataTable as DataTable23, EmptyState as EmptyState18, Flex as Flex80 } from "@raystack/apsara";
20644
20589
 
20645
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-xN3eyJ5PM27E/sdk/admin/views/organizations/details/invoices/invoices.module.css.js
20646
- var digest68 = "bb9eabb4c3088d1ef22128d5613c3c15746974fd2d98f39f8d0d516ca857efad";
20590
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-0kTAB6rMZSsc/sdk/admin/views/organizations/details/invoices/invoices.module.css.js
20591
+ var digest68 = "e8d908a98d8d714aff961c1b55407c5791f8c0470d82b9689a8d502b9825a83a";
20647
20592
  var css68 = `._empty-state_ct7gw_1 {
20648
20593
  height: 100%;
20649
20594
  }
@@ -20689,8 +20634,8 @@ var invoices_module_css_default3 = { "empty-state": "_empty-state_ct7gw_1", "emp
20689
20634
  // admin/views/organizations/details/invoices/index.tsx
20690
20635
  import { useContext as useContext22, useEffect as useEffect17, useMemo as useMemo15, useState as useState35 } from "react";
20691
20636
 
20692
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-P11yUVq1hf6B/sdk/admin/views/organizations/details/invoices/invoices.module.css.js
20693
- var digest69 = "f295ae6616a993a588212b10e809b8df8a6c85f2ecbcb8a57352d80ec34ef04e";
20637
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-Lz96qKGh8m4p/sdk/admin/views/organizations/details/invoices/invoices.module.css.js
20638
+ var digest69 = "3eefb61b83213c39ee24f402f7b010c1eae75a8350a4e7f45e600a4f1d0f0c8f";
20694
20639
  var css69 = `._empty-state_ct7gw_1 {
20695
20640
  height: 100%;
20696
20641
  }
@@ -20951,8 +20896,8 @@ function OrganizationInvoicesView() {
20951
20896
  // admin/views/organizations/details/tokens/index.tsx
20952
20897
  import { DataTable as DataTable24, EmptyState as EmptyState19, Flex as Flex82 } from "@raystack/apsara";
20953
20898
 
20954
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-Si2J1tTTNy8i/sdk/admin/views/organizations/details/tokens/tokens.module.css.js
20955
- var digest70 = "b4768ed97816291f98d51d3565d5d290fee2ac8042c490807cf96c61048c9806";
20899
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-BwaKknykYtsi/sdk/admin/views/organizations/details/tokens/tokens.module.css.js
20900
+ var digest70 = "fff9eb4f9ff142f5c947261d004b6e4a4331f236af80cbc9fe91df1ad0e30b48";
20956
20901
  var css70 = `._empty-state_1mf09_1 {
20957
20902
  height: 100%;
20958
20903
  }
@@ -21012,8 +20957,8 @@ import { useContext as useContext23, useEffect as useEffect18, useMemo as useMem
21012
20957
  import { AdminServiceQueries as AdminServiceQueries24 } from "@raystack/proton/frontier";
21013
20958
  import { useInfiniteQuery as useInfiniteQuery9 } from "@connectrpc/connect-query";
21014
20959
 
21015
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-GBkYNFZyt6yE/sdk/admin/views/organizations/details/tokens/tokens.module.css.js
21016
- var digest71 = "b6fe81d0646eb3b90c57eec967fb9b0801b439bb439812c0d1aec1fe506c3b2d";
20960
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-OoIR3hwRmUpd/sdk/admin/views/organizations/details/tokens/tokens.module.css.js
20961
+ var digest71 = "982003139f647e0796cd32c445f6c80782f9a3fb6b464d0b1baf3b3d616f4109";
21017
20962
  var css71 = `._empty-state_1mf09_1 {
21018
20963
  height: 100%;
21019
20964
  }
@@ -21288,8 +21233,8 @@ function OrganizationTokensView() {
21288
21233
  // admin/views/organizations/details/apis/index.tsx
21289
21234
  import { DataTable as DataTable25, EmptyState as EmptyState20, Flex as Flex84 } from "@raystack/apsara";
21290
21235
 
21291
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-c0aFb9qCbYfD/sdk/admin/views/organizations/details/apis/apis.module.css.js
21292
- var digest72 = "433a98c357dcd2860bf1c134953b7f705f180984c44f24feb735677d89bf8a42";
21236
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-bi1BQ00oXola/sdk/admin/views/organizations/details/apis/apis.module.css.js
21237
+ var digest72 = "6ab3db25dd195a38c69ee04856fabe120999362f78f43c0649de6e2e2a51ca5f";
21293
21238
  var css72 = `._empty-state_r9k2f_1 {
21294
21239
  height: 100%;
21295
21240
  }
@@ -21368,14 +21313,14 @@ var css72 = `._empty-state_r9k2f_1 {
21368
21313
  var apis_module_css_default = { "empty-state": "_empty-state_r9k2f_1", "emptyState": "_empty-state_r9k2f_1", "empty-state-subheading": "_empty-state-subheading_r9k2f_5", "emptyStateSubheading": "_empty-state-subheading_r9k2f_5", "table": "_table_r9k2f_10", "table-wrapper": "_table-wrapper_r9k2f_15", "tableWrapper": "_table-wrapper_r9k2f_15", "table-header": "_table-header_r9k2f_21", "tableHeader": "_table-header_r9k2f_21", "first-column": "_first-column_r9k2f_26", "firstColumn": "_first-column_r9k2f_26", "details-dialog": "_details-dialog_r9k2f_30", "detailsDialog": "_details-dialog_r9k2f_30", "skeleton": "_skeleton_r9k2f_38", "tab-root": "_tab-root_r9k2f_42", "tabRoot": "_tab-root_r9k2f_42", "tab-content": "_tab-content_r9k2f_47", "tabContent": "_tab-content_r9k2f_47", "list-item": "_list-item_r9k2f_52", "listItem": "_list-item_r9k2f_52", "dialog-body": "_dialog-body_r9k2f_60", "dialogBody": "_dialog-body_r9k2f_60" };
21369
21314
 
21370
21315
  // admin/views/organizations/details/apis/index.tsx
21371
- import { useCallback as useCallback18, useContext as useContext24, useEffect as useEffect20, useMemo as useMemo18, useState as useState37 } from "react";
21316
+ import { useCallback as useCallback16, useContext as useContext24, useEffect as useEffect20, useMemo as useMemo18, useState as useState37 } from "react";
21372
21317
 
21373
21318
  // admin/views/organizations/details/apis/columns.tsx
21374
21319
  import { Text as Text58 } from "@raystack/apsara";
21375
21320
  import dayjs16 from "dayjs";
21376
21321
 
21377
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-3VzLOKu3EIEG/sdk/admin/views/organizations/details/apis/apis.module.css.js
21378
- var digest73 = "375d696068c1b1e8beb82225f429090b66eb58ed636efeccfecb1d2a4093d102";
21322
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-DgfqrAfH5cEM/sdk/admin/views/organizations/details/apis/apis.module.css.js
21323
+ var digest73 = "dde08c3aa7c298397d001ecd6ce03f2e7051ecec2a64ed69e2efcb92ef330b52";
21379
21324
  var css73 = `._empty-state_r9k2f_1 {
21380
21325
  height: 100%;
21381
21326
  }
@@ -21499,8 +21444,8 @@ function getColumns17(options) {
21499
21444
  // admin/views/organizations/details/apis/details-dialog.tsx
21500
21445
  import { Dialog as Dialog19, Flex as Flex83, Skeleton as Skeleton4, Tabs, Text as Text59, toast as toast20 } from "@raystack/apsara";
21501
21446
 
21502
- // esbuild-css-modules-plugin-namespace:/tmp/tmp-2401-tslqgrq1vCa9/sdk/admin/views/organizations/details/apis/apis.module.css.js
21503
- var digest74 = "521ce50eea08478c386c2eb1aa82ef73ee3202e20dc5283cb2e0e454db32964d";
21447
+ // esbuild-css-modules-plugin-namespace:/tmp/tmp-2433-II83Yn1LS7NY/sdk/admin/views/organizations/details/apis/apis.module.css.js
21448
+ var digest74 = "3e65a544bf59e2a6185d30a638e97753e846edb3479a36ceb1eeba060ca27770";
21504
21449
  var css74 = `._empty-state_r9k2f_1 {
21505
21450
  height: 100%;
21506
21451
  }
@@ -21579,7 +21524,7 @@ var css74 = `._empty-state_r9k2f_1 {
21579
21524
  var apis_module_css_default3 = { "empty-state": "_empty-state_r9k2f_1", "emptyState": "_empty-state_r9k2f_1", "empty-state-subheading": "_empty-state-subheading_r9k2f_5", "emptyStateSubheading": "_empty-state-subheading_r9k2f_5", "table": "_table_r9k2f_10", "table-wrapper": "_table-wrapper_r9k2f_15", "tableWrapper": "_table-wrapper_r9k2f_15", "table-header": "_table-header_r9k2f_21", "tableHeader": "_table-header_r9k2f_21", "first-column": "_first-column_r9k2f_26", "firstColumn": "_first-column_r9k2f_26", "details-dialog": "_details-dialog_r9k2f_30", "detailsDialog": "_details-dialog_r9k2f_30", "skeleton": "_skeleton_r9k2f_38", "tab-root": "_tab-root_r9k2f_42", "tabRoot": "_tab-root_r9k2f_42", "tab-content": "_tab-content_r9k2f_47", "tabContent": "_tab-content_r9k2f_47", "list-item": "_list-item_r9k2f_52", "listItem": "_list-item_r9k2f_52", "dialog-body": "_dialog-body_r9k2f_60", "dialogBody": "_dialog-body_r9k2f_60" };
21580
21525
 
21581
21526
  // admin/views/organizations/details/apis/details-dialog.tsx
21582
- import { useCallback as useCallback17, useEffect as useEffect19, useMemo as useMemo17 } from "react";
21527
+ import { useCallback as useCallback15, useEffect as useEffect19, useMemo as useMemo17 } from "react";
21583
21528
  import { useQuery as useQuery20 } from "@connectrpc/connect-query";
21584
21529
  import {
21585
21530
  FrontierServiceQueries as FrontierServiceQueries27,
@@ -21638,7 +21583,7 @@ var ServiceUserDetailsDialog = ({
21638
21583
  console.error("Unable to fetch tokens:", tokenError);
21639
21584
  }
21640
21585
  }, [projectError, tokenError]);
21641
- const onOpenChange = useCallback17(
21586
+ const onOpenChange = useCallback15(
21642
21587
  (val) => {
21643
21588
  if (!val) {
21644
21589
  onClose();
@@ -21817,10 +21762,10 @@ function OrganizationApisView() {
21817
21762
  }
21818
21763
  };
21819
21764
  const loading = isLoading || isFetchingNextPage;
21820
- const onDialogClose = useCallback18(() => {
21765
+ const onDialogClose = useCallback16(() => {
21821
21766
  setSelectedServiceUser(null);
21822
21767
  }, []);
21823
- const onRowClick = useCallback18(
21768
+ const onRowClick = useCallback16(
21824
21769
  (row) => {
21825
21770
  setSelectedServiceUser(row);
21826
21771
  },