@raystack/frontier 0.109.0 → 0.111.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin/dist/index.d.ts +11 -7
- package/admin/dist/index.js +594 -657
- package/admin/dist/index.mjs +445 -508
- package/client/dist/index.js +130 -130
- package/client/dist/index.mjs +130 -130
- package/package.json +1 -1
package/admin/dist/index.js
CHANGED
|
@@ -105,8 +105,8 @@ function convertBillingAddressToString(address) {
|
|
|
105
105
|
// admin/views/roles/columns.tsx
|
|
106
106
|
var import_apsara = require("@raystack/apsara");
|
|
107
107
|
|
|
108
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
109
|
-
var digest = "
|
|
108
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-GeX2BjuR4eK4/sdk/admin/views/roles/roles.module.css.js
|
|
109
|
+
var digest = "226d4aee4c4e0c62471b7829b25893455e13f8e56aa6e5699f96a20e1a3bf477";
|
|
110
110
|
var css = `._tableRoot_1d549_1 {
|
|
111
111
|
width: 100%;
|
|
112
112
|
}
|
|
@@ -165,19 +165,22 @@ var getColumns = () => {
|
|
|
165
165
|
cell: roles_module_css_default["first-column"],
|
|
166
166
|
header: roles_module_css_default["first-column"]
|
|
167
167
|
},
|
|
168
|
-
|
|
168
|
+
filterType: "string",
|
|
169
|
+
enableColumnFilter: true,
|
|
169
170
|
cell: ({ getValue }) => getValue()
|
|
170
171
|
},
|
|
171
172
|
{
|
|
172
173
|
header: "Title",
|
|
173
174
|
accessorKey: "title",
|
|
174
|
-
|
|
175
|
+
filterType: "string",
|
|
176
|
+
enableColumnFilter: true,
|
|
175
177
|
cell: (info) => info.getValue()
|
|
176
178
|
},
|
|
177
179
|
{
|
|
178
180
|
header: "Name",
|
|
179
181
|
accessorKey: "name",
|
|
180
|
-
|
|
182
|
+
filterType: "string",
|
|
183
|
+
enableColumnFilter: true,
|
|
181
184
|
cell: (info) => info.getValue()
|
|
182
185
|
},
|
|
183
186
|
{
|
|
@@ -606,8 +609,8 @@ var UploadIcon = /* @__PURE__ */ (0, import_react.forwardRef)(function(_ref, for
|
|
|
606
609
|
// admin/components/PageHeader.tsx
|
|
607
610
|
var import_apsara2 = require("@raystack/apsara");
|
|
608
611
|
|
|
609
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
610
|
-
var digest2 = "
|
|
612
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-sgdgAfJAxrNg/sdk/admin/components/page-header.module.css.js
|
|
613
|
+
var digest2 = "fbe6f5d76e2de4a35a5bd95a116346a293eb3396e6613298c119ae7fe3432512";
|
|
611
614
|
var css2 = `._breadcrumb_1kaun_1 {
|
|
612
615
|
list-style: none;
|
|
613
616
|
padding: 0;
|
|
@@ -729,8 +732,8 @@ function PageTitle({ title, appName }) {
|
|
|
729
732
|
return null;
|
|
730
733
|
}
|
|
731
734
|
|
|
732
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
733
|
-
var digest3 = "
|
|
735
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-gILfv7afeWb7/sdk/admin/views/roles/roles.module.css.js
|
|
736
|
+
var digest3 = "2c75e0bc5600f5ac2b81c29ba305937e2c30c152c258660e3bd42fe39c25ed41";
|
|
734
737
|
var css3 = `._tableRoot_1d549_1 {
|
|
735
738
|
width: 100%;
|
|
736
739
|
}
|
|
@@ -922,8 +925,8 @@ var import_react6 = require("react");
|
|
|
922
925
|
// admin/views/invoices/navbar.tsx
|
|
923
926
|
var import_apsara6 = require("@raystack/apsara");
|
|
924
927
|
|
|
925
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
926
|
-
var digest4 = "
|
|
928
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-LLgsRaHURPDn/sdk/admin/views/invoices/invoices.module.css.js
|
|
929
|
+
var digest4 = "e965bb6419cfb819225459213b9b9a04a373002120f1a13736c34bacea8ba4c8";
|
|
927
930
|
var css4 = `._navbar_1o5oc_1 {
|
|
928
931
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
929
932
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -1041,8 +1044,8 @@ var InvoicesNavabar = ({ searchQuery }) => {
|
|
|
1041
1044
|
] });
|
|
1042
1045
|
};
|
|
1043
1046
|
|
|
1044
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
1045
|
-
var digest5 = "
|
|
1047
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-t4S9OwMGVr8F/sdk/admin/views/invoices/invoices.module.css.js
|
|
1048
|
+
var digest5 = "e5cbe028443896962907f8c30924e30be24732cdbc4bbd50c8228aee7841bc61";
|
|
1046
1049
|
var css5 = `._navbar_1o5oc_1 {
|
|
1047
1050
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
1048
1051
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -1096,7 +1099,6 @@ var invoices_module_css_default2 = { "navbar": "_navbar_1o5oc_1", "table": "_tab
|
|
|
1096
1099
|
|
|
1097
1100
|
// admin/views/invoices/columns.tsx
|
|
1098
1101
|
var import_apsara7 = require("@raystack/apsara");
|
|
1099
|
-
var import_dayjs2 = __toESM(require("dayjs"));
|
|
1100
1102
|
|
|
1101
1103
|
// admin/utils/connect-timestamp.ts
|
|
1102
1104
|
var import_wkt = require("@bufbuild/protobuf/wkt");
|
|
@@ -1115,9 +1117,16 @@ function isNullTimestamp(timestamp) {
|
|
|
1115
1117
|
return true;
|
|
1116
1118
|
return Number(timestamp.seconds) <= 0;
|
|
1117
1119
|
}
|
|
1120
|
+
var DATE_FORMAT = "DD MMM YYYY";
|
|
1121
|
+
function formatTimestamp(timestamp, format = DATE_FORMAT) {
|
|
1122
|
+
if (isNullTimestamp(timestamp))
|
|
1123
|
+
return "-";
|
|
1124
|
+
const date = timestampToDayjs(timestamp);
|
|
1125
|
+
return date ? date.format(format) : "-";
|
|
1126
|
+
}
|
|
1118
1127
|
|
|
1119
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
1120
|
-
var digest6 = "
|
|
1128
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-YI6yadbj2Ixu/sdk/admin/views/invoices/invoices.module.css.js
|
|
1129
|
+
var digest6 = "d6033e4bfb4023f1ad44818dd53954e14df8c2c6f545ffdb0559ba9fc226357e";
|
|
1121
1130
|
var css6 = `._navbar_1o5oc_1 {
|
|
1122
1131
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
1123
1132
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -1182,11 +1191,7 @@ var getColumns2 = ({ t }) => {
|
|
|
1182
1191
|
},
|
|
1183
1192
|
filterType: "date",
|
|
1184
1193
|
enableColumnFilter: true,
|
|
1185
|
-
cell: ({ getValue }) => {
|
|
1186
|
-
const value = getValue();
|
|
1187
|
-
const date = isNullTimestamp(value) ? "-" : (0, import_dayjs2.default)(timestampToDate(value)).format("YYYY-MM-DD");
|
|
1188
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_apsara7.Text, { children: date });
|
|
1189
|
-
},
|
|
1194
|
+
cell: ({ getValue }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_apsara7.Text, { children: formatTimestamp(getValue()) }),
|
|
1190
1195
|
enableHiding: true,
|
|
1191
1196
|
enableSorting: true
|
|
1192
1197
|
},
|
|
@@ -1274,7 +1279,7 @@ function getGroupCountMapFromFirstPage(infiniteData) {
|
|
|
1274
1279
|
// utils/transform-query.ts
|
|
1275
1280
|
var import_frontier2 = require("@raystack/proton/frontier");
|
|
1276
1281
|
var import_protobuf = require("@bufbuild/protobuf");
|
|
1277
|
-
var
|
|
1282
|
+
var import_dayjs2 = __toESM(require("dayjs"));
|
|
1278
1283
|
function convertFilterValue(value) {
|
|
1279
1284
|
switch (typeof value) {
|
|
1280
1285
|
case "boolean":
|
|
@@ -1288,7 +1293,7 @@ function convertFilterValue(value) {
|
|
|
1288
1293
|
}
|
|
1289
1294
|
}
|
|
1290
1295
|
function transformDateFilter(filter, fieldName) {
|
|
1291
|
-
const startOfDay = (0,
|
|
1296
|
+
const startOfDay = (0, import_dayjs2.default)(filter.value).startOf("day");
|
|
1292
1297
|
if (filter.operator === "eq") {
|
|
1293
1298
|
return [
|
|
1294
1299
|
(0, import_protobuf.create)(import_frontier2.RQLFilterSchema, {
|
|
@@ -1571,8 +1576,8 @@ var import_frontier4 = require("@raystack/proton/frontier");
|
|
|
1571
1576
|
// admin/views/products/columns.tsx
|
|
1572
1577
|
var import_apsara9 = require("@raystack/apsara");
|
|
1573
1578
|
|
|
1574
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
1575
|
-
var digest7 = "
|
|
1579
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-SDlF9xdCNUQ2/sdk/admin/views/products/products.module.css.js
|
|
1580
|
+
var digest7 = "85844681fca73717ac52278e7ddf3e207fbd2f82e0b34231840f01a53bbf6cba";
|
|
1576
1581
|
var css7 = `._tableRoot_3ccjp_1 {
|
|
1577
1582
|
width: 100%;
|
|
1578
1583
|
}
|
|
@@ -1703,46 +1708,29 @@ var getColumns3 = (onNavigateToPrices) => {
|
|
|
1703
1708
|
{
|
|
1704
1709
|
header: "Product Id",
|
|
1705
1710
|
accessorKey: "id",
|
|
1706
|
-
|
|
1711
|
+
filterType: "string",
|
|
1712
|
+
enableColumnFilter: true,
|
|
1707
1713
|
cell: (info) => info.getValue()
|
|
1708
1714
|
},
|
|
1709
1715
|
{
|
|
1710
1716
|
header: "Created on",
|
|
1711
1717
|
accessorKey: "createdAt",
|
|
1712
|
-
cell: ({ getValue }) =>
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
if (!date)
|
|
1716
|
-
return "-";
|
|
1717
|
-
return date.toLocaleString("en", {
|
|
1718
|
-
month: "long",
|
|
1719
|
-
day: "numeric",
|
|
1720
|
-
year: "numeric"
|
|
1721
|
-
});
|
|
1722
|
-
},
|
|
1723
|
-
filterVariant: "date"
|
|
1718
|
+
cell: ({ getValue }) => formatTimestamp(getValue()),
|
|
1719
|
+
filterType: "date",
|
|
1720
|
+
enableColumnFilter: true
|
|
1724
1721
|
},
|
|
1725
1722
|
{
|
|
1726
1723
|
header: "Updated on",
|
|
1727
1724
|
accessorKey: "updatedAt",
|
|
1728
|
-
cell: ({ getValue }) =>
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
if (!date)
|
|
1732
|
-
return "-";
|
|
1733
|
-
return date.toLocaleString("en", {
|
|
1734
|
-
month: "long",
|
|
1735
|
-
day: "numeric",
|
|
1736
|
-
year: "numeric"
|
|
1737
|
-
});
|
|
1738
|
-
},
|
|
1739
|
-
filterVariant: "date"
|
|
1725
|
+
cell: ({ getValue }) => formatTimestamp(getValue()),
|
|
1726
|
+
filterType: "date",
|
|
1727
|
+
enableColumnFilter: true
|
|
1740
1728
|
}
|
|
1741
1729
|
];
|
|
1742
1730
|
};
|
|
1743
1731
|
|
|
1744
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
1745
|
-
var digest8 = "
|
|
1732
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-Omj5PspHVFhd/sdk/admin/views/products/products.module.css.js
|
|
1733
|
+
var digest8 = "44d7eb02b8f4bf4fa138d91d2dfb4c20ed831e41a80225326626b5c72ae2d857";
|
|
1746
1734
|
var css8 = `._tableRoot_3ccjp_1 {
|
|
1747
1735
|
width: 100%;
|
|
1748
1736
|
}
|
|
@@ -1799,8 +1787,8 @@ var products_module_css_default2 = { "tableRoot": "_tableRoot_3ccjp_1", "tableWr
|
|
|
1799
1787
|
// admin/views/products/details.tsx
|
|
1800
1788
|
var import_apsara10 = require("@raystack/apsara");
|
|
1801
1789
|
|
|
1802
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
1803
|
-
var digest9 = "
|
|
1790
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-qSPLGL9Dz5YB/sdk/admin/views/products/products.module.css.js
|
|
1791
|
+
var digest9 = "971e60f7cc879342aeb64b95526d6e34bc2547ddaeef0563b01c38717b6c4430";
|
|
1804
1792
|
var css9 = `._tableRoot_3ccjp_1 {
|
|
1805
1793
|
width: 100%;
|
|
1806
1794
|
}
|
|
@@ -2002,8 +1990,8 @@ var import_frontier5 = require("@raystack/proton/frontier");
|
|
|
2002
1990
|
// admin/views/products/prices/columns.tsx
|
|
2003
1991
|
var import_apsara12 = require("@raystack/apsara");
|
|
2004
1992
|
|
|
2005
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
2006
|
-
var digest10 = "
|
|
1993
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-bgNNHOYvqNZm/sdk/admin/views/products/prices/prices.module.css.js
|
|
1994
|
+
var digest10 = "c914a8291b9ad164cf35f89a82e97d35d328052610ee9266ab67bc918de02e75";
|
|
2007
1995
|
var css10 = `._first-column_6e56r_1 {
|
|
2008
1996
|
padding-left: var(--rs-space-7);
|
|
2009
1997
|
}
|
|
@@ -2033,31 +2021,36 @@ var getColumns4 = (prices) => {
|
|
|
2033
2021
|
header: prices_module_css_default["first-column"]
|
|
2034
2022
|
},
|
|
2035
2023
|
cell: (info) => info.getValue(),
|
|
2036
|
-
|
|
2024
|
+
filterType: "string",
|
|
2025
|
+
enableColumnFilter: true
|
|
2037
2026
|
},
|
|
2038
2027
|
{
|
|
2039
2028
|
header: "name",
|
|
2040
2029
|
accessorKey: "name",
|
|
2041
2030
|
cell: (info) => info.getValue(),
|
|
2042
|
-
|
|
2031
|
+
filterType: "string",
|
|
2032
|
+
enableColumnFilter: true
|
|
2043
2033
|
},
|
|
2044
2034
|
{
|
|
2045
2035
|
header: "interval",
|
|
2046
2036
|
accessorKey: "interval",
|
|
2047
2037
|
cell: (info) => info.getValue(),
|
|
2048
|
-
|
|
2038
|
+
filterType: "string",
|
|
2039
|
+
enableColumnFilter: true
|
|
2049
2040
|
},
|
|
2050
2041
|
{
|
|
2051
2042
|
header: "Usage Type",
|
|
2052
2043
|
accessorKey: "usageType",
|
|
2053
2044
|
cell: (info) => info.getValue(),
|
|
2054
|
-
|
|
2045
|
+
filterType: "string",
|
|
2046
|
+
enableColumnFilter: true
|
|
2055
2047
|
},
|
|
2056
2048
|
{
|
|
2057
2049
|
header: "billing_scheme",
|
|
2058
2050
|
accessorKey: "billingScheme",
|
|
2059
2051
|
cell: (info) => info.getValue(),
|
|
2060
|
-
|
|
2052
|
+
filterType: "string",
|
|
2053
|
+
enableColumnFilter: true
|
|
2061
2054
|
},
|
|
2062
2055
|
{
|
|
2063
2056
|
header: "Amount",
|
|
@@ -2069,44 +2062,28 @@ var getColumns4 = (prices) => {
|
|
|
2069
2062
|
currency: row.original.currency
|
|
2070
2063
|
}
|
|
2071
2064
|
),
|
|
2072
|
-
|
|
2065
|
+
filterType: "string",
|
|
2066
|
+
enableColumnFilter: true
|
|
2073
2067
|
},
|
|
2074
2068
|
{
|
|
2075
2069
|
header: "creation date",
|
|
2076
2070
|
accessorKey: "createdAt",
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
if (!date)
|
|
2081
|
-
return "-";
|
|
2082
|
-
return date.toLocaleString("en", {
|
|
2083
|
-
month: "long",
|
|
2084
|
-
day: "numeric",
|
|
2085
|
-
year: "numeric"
|
|
2086
|
-
});
|
|
2087
|
-
}
|
|
2071
|
+
filterType: "date",
|
|
2072
|
+
enableColumnFilter: true,
|
|
2073
|
+
cell: ({ getValue }) => formatTimestamp(getValue())
|
|
2088
2074
|
},
|
|
2089
2075
|
{
|
|
2090
2076
|
header: "Updated date",
|
|
2091
2077
|
accessorKey: "updatedAt",
|
|
2078
|
+
filterType: "date",
|
|
2092
2079
|
enableColumnFilter: false,
|
|
2093
|
-
cell: ({ getValue }) =>
|
|
2094
|
-
const timestamp = getValue();
|
|
2095
|
-
const date = timestampToDate(timestamp);
|
|
2096
|
-
if (!date)
|
|
2097
|
-
return "-";
|
|
2098
|
-
return date.toLocaleString("en", {
|
|
2099
|
-
month: "long",
|
|
2100
|
-
day: "numeric",
|
|
2101
|
-
year: "numeric"
|
|
2102
|
-
});
|
|
2103
|
-
}
|
|
2080
|
+
cell: ({ getValue }) => formatTimestamp(getValue())
|
|
2104
2081
|
}
|
|
2105
2082
|
];
|
|
2106
2083
|
};
|
|
2107
2084
|
|
|
2108
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
2109
|
-
var digest11 = "
|
|
2085
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-xKvQRYoFzH8Q/sdk/admin/views/products/products.module.css.js
|
|
2086
|
+
var digest11 = "a7072aed4219b04dbe5f90a07a32b3dab5b9602a8c578b937a5fa7d2f8a9f0fe";
|
|
2110
2087
|
var css11 = `._tableRoot_3ccjp_1 {
|
|
2111
2088
|
width: 100%;
|
|
2112
2089
|
}
|
|
@@ -2264,8 +2241,8 @@ function CpuChipIcon(props) {
|
|
|
2264
2241
|
);
|
|
2265
2242
|
}
|
|
2266
2243
|
|
|
2267
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
2268
|
-
var digest12 = "
|
|
2244
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-uKTyZ1idG9Ye/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
2245
|
+
var digest12 = "a0df9ca0e640f39c04011a37688b63822c8a39471ef4473a74fbe43e70851880";
|
|
2269
2246
|
var css12 = `._navbar_lxzqi_1 {
|
|
2270
2247
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
2271
2248
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -2485,8 +2462,8 @@ var Navbar = ({ searchQuery, onExportCsv }) => {
|
|
|
2485
2462
|
};
|
|
2486
2463
|
var navbar_default = Navbar;
|
|
2487
2464
|
|
|
2488
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
2489
|
-
var digest13 = "
|
|
2465
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-iEwbDB4hpbYO/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
2466
|
+
var digest13 = "dcde7ab2dedcd1459996133b232b0eac541495d088f41335f352c33d27a2eccc";
|
|
2490
2467
|
var css13 = `._navbar_lxzqi_1 {
|
|
2491
2468
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
2492
2469
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -2598,10 +2575,9 @@ var audit_logs_module_css_default2 = { "navbar": "_navbar_lxzqi_1", "table": "_t
|
|
|
2598
2575
|
|
|
2599
2576
|
// admin/views/audit-logs/columns.tsx
|
|
2600
2577
|
var import_apsara16 = require("@raystack/apsara");
|
|
2601
|
-
var import_dayjs4 = __toESM(require("dayjs"));
|
|
2602
2578
|
|
|
2603
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
2604
|
-
var digest14 = "
|
|
2579
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-k2JA9esPaez3/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
2580
|
+
var digest14 = "33d2af79f367045ae68c3a5520f884477a3a3a0fbffb6e113d5ac7e1f1a6d9fb";
|
|
2605
2581
|
var css14 = `._navbar_lxzqi_1 {
|
|
2606
2582
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
2607
2583
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -2848,10 +2824,9 @@ var getColumns5 = ({
|
|
|
2848
2824
|
if (isNullTimestamp(value)) {
|
|
2849
2825
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_apsara16.Text, { children: "-" });
|
|
2850
2826
|
}
|
|
2851
|
-
const date = (0, import_dayjs4.default)(timestampToDate(value));
|
|
2852
2827
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_apsara16.Flex, { gap: 1, direction: "column", children: [
|
|
2853
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_apsara16.Text, { size: "small", weight: "medium", children:
|
|
2854
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_apsara16.Text, { size: "small", variant: "secondary", children:
|
|
2828
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_apsara16.Text, { size: "small", weight: "medium", children: formatTimestamp(value) }),
|
|
2829
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_apsara16.Text, { size: "small", variant: "secondary", children: formatTimestamp(value, "hh:mm A") })
|
|
2855
2830
|
] });
|
|
2856
2831
|
},
|
|
2857
2832
|
enableHiding: true,
|
|
@@ -2861,15 +2836,15 @@ var getColumns5 = ({
|
|
|
2861
2836
|
};
|
|
2862
2837
|
|
|
2863
2838
|
// admin/views/audit-logs/index.tsx
|
|
2864
|
-
var
|
|
2865
|
-
var
|
|
2839
|
+
var import_connect_query6 = require("@connectrpc/connect-query");
|
|
2840
|
+
var import_frontier8 = require("@raystack/proton/frontier");
|
|
2866
2841
|
|
|
2867
2842
|
// admin/views/audit-logs/sidepanel-details.tsx
|
|
2868
2843
|
var import_apsara20 = require("@raystack/apsara");
|
|
2869
2844
|
var import_apsara21 = require("@raystack/apsara");
|
|
2870
2845
|
|
|
2871
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
2872
|
-
var digest15 = "
|
|
2846
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-a1bjgK6TsCGo/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
2847
|
+
var digest15 = "4972fd310c1eb8bcd3853942cbb25e142df16005fd8ad072971863764fb465fa";
|
|
2873
2848
|
var css15 = `._navbar_lxzqi_1 {
|
|
2874
2849
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
2875
2850
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -2979,9 +2954,6 @@ var css15 = `._navbar_lxzqi_1 {
|
|
|
2979
2954
|
})();
|
|
2980
2955
|
var audit_logs_module_css_default4 = { "navbar": "_navbar_lxzqi_1", "table": "_table_lxzqi_11", "table-empty": "_table-empty_lxzqi_15", "tableEmpty": "_table-empty_lxzqi_15", "empty-state": "_empty-state_lxzqi_19", "emptyState": "_empty-state_lxzqi_19", "empty-state-subheading": "_empty-state-subheading_lxzqi_23", "emptyStateSubheading": "_empty-state-subheading_lxzqi_23", "name-column": "_name-column_lxzqi_28", "nameColumn": "_name-column_lxzqi_28", "org-column": "_org-column_lxzqi_32", "orgColumn": "_org-column_lxzqi_32", "table-wrapper": "_table-wrapper_lxzqi_36", "tableWrapper": "_table-wrapper_lxzqi_36", "table-header": "_table-header_lxzqi_41", "tableHeader": "_table-header_lxzqi_41", "side-panel": "_side-panel_lxzqi_45", "sidePanel": "_side-panel_lxzqi_45", "capitalize": "_capitalize_lxzqi_50", "table-content-container": "_table-content-container_lxzqi_54", "tableContentContainer": "_table-content-container_lxzqi_54", "text-overflow": "_text-overflow_lxzqi_62", "textOverflow": "_text-overflow_lxzqi_62", "code-block-container": "_code-block-container_lxzqi_70", "codeBlockContainer": "_code-block-container_lxzqi_70", "code-block": "_code-block_lxzqi_70", "codeBlock": "_code-block_lxzqi_70", "sidepanel-link-trigger": "_sidepanel-link-trigger_lxzqi_77", "sidepanelLinkTrigger": "_sidepanel-link-trigger_lxzqi_77", "sidepanel-list-link": "_sidepanel-list-link_lxzqi_85", "sidepanelListLink": "_sidepanel-list-link_lxzqi_85", "sidepanel-list": "_sidepanel-list_lxzqi_85", "sidepanelList": "_sidepanel-list_lxzqi_85" };
|
|
2981
2956
|
|
|
2982
|
-
// admin/views/audit-logs/sidepanel-details.tsx
|
|
2983
|
-
var import_dayjs5 = __toESM(require("dayjs"));
|
|
2984
|
-
|
|
2985
2957
|
// admin/assets/icons/MapIcon.tsx
|
|
2986
2958
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2987
2959
|
function MapIcon(props) {
|
|
@@ -3010,8 +2982,8 @@ function MapIcon(props) {
|
|
|
3010
2982
|
// admin/views/audit-logs/sidepanel-log-dialog.tsx
|
|
3011
2983
|
var import_apsara17 = require("@raystack/apsara");
|
|
3012
2984
|
|
|
3013
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
3014
|
-
var digest16 = "
|
|
2985
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-2SPobCQkBM38/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
2986
|
+
var digest16 = "89db04ea5ef05ad34e0ba6e4fba393188d8f6c9745697669903c0127f504ef85";
|
|
3015
2987
|
var css16 = `._navbar_lxzqi_1 {
|
|
3016
2988
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
3017
2989
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -3219,8 +3191,8 @@ function SidePanelLogDialog(props) {
|
|
|
3219
3191
|
// admin/views/audit-logs/sidepanel-list-link.tsx
|
|
3220
3192
|
var import_apsara18 = require("@raystack/apsara");
|
|
3221
3193
|
|
|
3222
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
3223
|
-
var digest17 = "
|
|
3194
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-cSueuYuB1vs9/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
3195
|
+
var digest17 = "4994c3f405625453ce82a250aaa183c14e4e2f3ea9d3f566497a8fc43d503eff";
|
|
3224
3196
|
var css17 = `._navbar_lxzqi_1 {
|
|
3225
3197
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
3226
3198
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -3338,6 +3310,7 @@ function SidepanelListItemLink({
|
|
|
3338
3310
|
href,
|
|
3339
3311
|
label,
|
|
3340
3312
|
onNavigate,
|
|
3313
|
+
state,
|
|
3341
3314
|
"data-test-id": dataTestId
|
|
3342
3315
|
}) {
|
|
3343
3316
|
if (isLink && onNavigate) {
|
|
@@ -3350,7 +3323,7 @@ function SidepanelListItemLink({
|
|
|
3350
3323
|
color: "neutral",
|
|
3351
3324
|
"data-test-id": dataTestId,
|
|
3352
3325
|
className: audit_logs_module_css_default6["sidepanel-link-trigger"],
|
|
3353
|
-
onClick: () => onNavigate(href),
|
|
3326
|
+
onClick: () => onNavigate(href, state),
|
|
3354
3327
|
children
|
|
3355
3328
|
}
|
|
3356
3329
|
) })
|
|
@@ -3365,8 +3338,8 @@ function SidepanelListItemLink({
|
|
|
3365
3338
|
// admin/views/audit-logs/sidepanel-list-id.tsx
|
|
3366
3339
|
var import_apsara19 = require("@raystack/apsara");
|
|
3367
3340
|
|
|
3368
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
3369
|
-
var digest18 = "
|
|
3341
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-bWKNshm7oz0P/sdk/admin/views/audit-logs/audit-logs.module.css.js
|
|
3342
|
+
var digest18 = "571521a333dc6f99e5817bd260c002883a2aa1fbbf242e5284543579023fe0c5";
|
|
3370
3343
|
var css18 = `._navbar_lxzqi_1 {
|
|
3371
3344
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
3372
3345
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -3511,7 +3484,6 @@ var DEFAULT_ROLES = {
|
|
|
3511
3484
|
ORG_VIEWER: "app_organization_viewer",
|
|
3512
3485
|
PROJECT_VIEWER: "app_project_viewer"
|
|
3513
3486
|
};
|
|
3514
|
-
var NULL_DATE = "0001-01-01T00:00:00Z";
|
|
3515
3487
|
var defaultTerminology = {
|
|
3516
3488
|
organization: { singular: "Organization", plural: "Organizations" },
|
|
3517
3489
|
project: { singular: "Project", plural: "Projects" },
|
|
@@ -3577,6 +3549,19 @@ var useAdminPaths = () => {
|
|
|
3577
3549
|
};
|
|
3578
3550
|
};
|
|
3579
3551
|
|
|
3552
|
+
// admin/hooks/useOrganizationLookup.ts
|
|
3553
|
+
var import_connect_query5 = require("@connectrpc/connect-query");
|
|
3554
|
+
var import_frontier7 = require("@raystack/proton/frontier");
|
|
3555
|
+
var useOrganizationLookup = (orgId) => (0, import_connect_query5.useQuery)(
|
|
3556
|
+
import_frontier7.FrontierServiceQueries.getOrganization,
|
|
3557
|
+
{ id: orgId || "" },
|
|
3558
|
+
{
|
|
3559
|
+
enabled: !!orgId,
|
|
3560
|
+
staleTime: 5 * 60 * 1e3,
|
|
3561
|
+
select: (data) => data?.organization
|
|
3562
|
+
}
|
|
3563
|
+
);
|
|
3564
|
+
|
|
3580
3565
|
// admin/views/audit-logs/sidepanel-details.tsx
|
|
3581
3566
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
3582
3567
|
function SidePanelDetails({
|
|
@@ -3587,9 +3572,10 @@ function SidePanelDetails({
|
|
|
3587
3572
|
const t = useTerminology();
|
|
3588
3573
|
const paths = useAdminPaths();
|
|
3589
3574
|
const { actor, event, resource, occurredAt, id, orgId, orgName, target } = rest;
|
|
3590
|
-
const date = (0, import_dayjs5.default)(timestampToDate(occurredAt));
|
|
3591
3575
|
const session = actor?.metadata?.context;
|
|
3592
3576
|
const location = session && `${session.Location.City}, ${session.Location.Country}` || "-";
|
|
3577
|
+
const isOrgLink = !!orgId && !isZeroUUID(orgId);
|
|
3578
|
+
const { data: org } = useOrganizationLookup(isOrgLink ? orgId : void 0);
|
|
3593
3579
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
3594
3580
|
import_apsara20.SidePanel,
|
|
3595
3581
|
{
|
|
@@ -3631,8 +3617,9 @@ function SidePanelDetails({
|
|
|
3631
3617
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3632
3618
|
SidepanelListItemLink,
|
|
3633
3619
|
{
|
|
3634
|
-
isLink:
|
|
3635
|
-
href: `/${paths.organizations}/${orgId}`,
|
|
3620
|
+
isLink: isOrgLink && !!org,
|
|
3621
|
+
href: `/${paths.organizations}/${org?.name || orgId}`,
|
|
3622
|
+
state: orgId ? { orgId } : void 0,
|
|
3636
3623
|
label: t.organization({ case: "capital" }),
|
|
3637
3624
|
onNavigate,
|
|
3638
3625
|
"data-test-id": "actor-link",
|
|
@@ -3653,11 +3640,11 @@ function SidePanelDetails({
|
|
|
3653
3640
|
] }),
|
|
3654
3641
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_apsara21.List.Item, { children: [
|
|
3655
3642
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_apsara21.List.Label, { className: audit_logs_module_css_default4["sidepanel-list"], children: "Date" }),
|
|
3656
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_apsara21.List.Value, { children:
|
|
3643
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_apsara21.List.Value, { children: formatTimestamp(occurredAt) })
|
|
3657
3644
|
] }),
|
|
3658
3645
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_apsara21.List.Item, { children: [
|
|
3659
3646
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_apsara21.List.Label, { className: audit_logs_module_css_default4["sidepanel-list"], children: "Time" }),
|
|
3660
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_apsara21.List.Value, { children:
|
|
3647
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_apsara21.List.Value, { children: formatTimestamp(occurredAt, "hh:mm A") })
|
|
3661
3648
|
] }),
|
|
3662
3649
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_apsara21.List.Item, { children: [
|
|
3663
3650
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_apsara21.List.Label, { className: audit_logs_module_css_default4["sidepanel-list"], children: "ID" }),
|
|
@@ -3768,8 +3755,8 @@ function AuditLogsView({ appName, onExportCsv, onNavigate } = {}) {
|
|
|
3768
3755
|
error,
|
|
3769
3756
|
isError,
|
|
3770
3757
|
hasNextPage
|
|
3771
|
-
} = (0,
|
|
3772
|
-
|
|
3758
|
+
} = (0, import_connect_query6.useInfiniteQuery)(
|
|
3759
|
+
import_frontier8.AdminServiceQueries.listAuditRecords,
|
|
3773
3760
|
{ query: tableQuery.rqlRequest },
|
|
3774
3761
|
{
|
|
3775
3762
|
pageParamKey: "query",
|
|
@@ -3897,8 +3884,8 @@ var import_apsara24 = require("@raystack/apsara");
|
|
|
3897
3884
|
// admin/views/admins/columns.tsx
|
|
3898
3885
|
var import_apsara23 = require("@raystack/apsara");
|
|
3899
3886
|
|
|
3900
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
3901
|
-
var digest19 = "
|
|
3887
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-Ns5xBCMLAdZ0/sdk/admin/views/admins/admins.module.css.js
|
|
3888
|
+
var digest19 = "f8f5a21f9317a99a2bc7a8fda717b13333c2a119de2a5960957e90d02706823b";
|
|
3902
3889
|
var css19 = `._tableRoot_1tmha_1 {
|
|
3903
3890
|
width: 100%;
|
|
3904
3891
|
}
|
|
@@ -3931,6 +3918,22 @@ var admins_module_css_default = { "tableRoot": "_tableRoot_1tmha_1", "tableWrapp
|
|
|
3931
3918
|
|
|
3932
3919
|
// admin/views/admins/columns.tsx
|
|
3933
3920
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3921
|
+
var OrgCell = ({
|
|
3922
|
+
orgId,
|
|
3923
|
+
onNavigateToOrg
|
|
3924
|
+
}) => {
|
|
3925
|
+
const { data: org } = useOrganizationLookup(orgId);
|
|
3926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3927
|
+
import_apsara23.Button,
|
|
3928
|
+
{
|
|
3929
|
+
variant: "text",
|
|
3930
|
+
disabled: !org,
|
|
3931
|
+
onClick: () => org && onNavigateToOrg?.(org.name || orgId, orgId),
|
|
3932
|
+
"data-test-id": "frontier-admin-navigate-to-org-btn",
|
|
3933
|
+
children: org?.title || org?.name || orgId
|
|
3934
|
+
}
|
|
3935
|
+
);
|
|
3936
|
+
};
|
|
3934
3937
|
var getColumns6 = ({ onNavigateToOrg, t } = {}) => {
|
|
3935
3938
|
return [
|
|
3936
3939
|
{
|
|
@@ -3940,13 +3943,15 @@ var getColumns6 = ({ onNavigateToOrg, t } = {}) => {
|
|
|
3940
3943
|
cell: admins_module_css_default["first-column"],
|
|
3941
3944
|
header: admins_module_css_default["first-column"]
|
|
3942
3945
|
},
|
|
3943
|
-
|
|
3946
|
+
filterType: "string",
|
|
3947
|
+
enableColumnFilter: true,
|
|
3944
3948
|
cell: (info) => info.getValue() || "-"
|
|
3945
3949
|
},
|
|
3946
3950
|
{
|
|
3947
3951
|
header: "Email",
|
|
3948
3952
|
accessorKey: "email",
|
|
3949
|
-
|
|
3953
|
+
filterType: "string",
|
|
3954
|
+
enableColumnFilter: true,
|
|
3950
3955
|
cell: (info) => info.getValue() || "-"
|
|
3951
3956
|
},
|
|
3952
3957
|
{
|
|
@@ -3969,21 +3974,13 @@ var getColumns6 = ({ onNavigateToOrg, t } = {}) => {
|
|
|
3969
3974
|
accessorKey: "orgId",
|
|
3970
3975
|
cell: (info) => {
|
|
3971
3976
|
const org_id = info.getValue();
|
|
3972
|
-
return org_id ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3973
|
-
import_apsara23.Button,
|
|
3974
|
-
{
|
|
3975
|
-
variant: "text",
|
|
3976
|
-
onClick: () => onNavigateToOrg?.(org_id),
|
|
3977
|
-
"data-test-id": "frontier-admin-navigate-to-org-btn",
|
|
3978
|
-
children: org_id
|
|
3979
|
-
}
|
|
3980
|
-
) : "-";
|
|
3977
|
+
return org_id ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(OrgCell, { orgId: org_id, onNavigateToOrg }) : "-";
|
|
3981
3978
|
}
|
|
3982
3979
|
}
|
|
3983
3980
|
];
|
|
3984
3981
|
};
|
|
3985
3982
|
|
|
3986
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
3983
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-uw83377utmSd/sdk/admin/views/admins/admins.module.css.js
|
|
3987
3984
|
var digest20 = "5cd72e71043cbf53835fc5b3e7ee4bdaad1e4bae5b647fd8be2ea3b6fcb9c299";
|
|
3988
3985
|
var css20 = `._tableRoot_1tmha_1 {
|
|
3989
3986
|
width: 100%;
|
|
@@ -4016,8 +4013,8 @@ var css20 = `._tableRoot_1tmha_1 {
|
|
|
4016
4013
|
var admins_module_css_default2 = { "tableRoot": "_tableRoot_1tmha_1", "tableWrapper": "_tableWrapper_1tmha_5", "header": "_header_1tmha_9", "first-column": "_first-column_1tmha_14", "firstColumn": "_first-column_1tmha_14" };
|
|
4017
4014
|
|
|
4018
4015
|
// admin/views/admins/index.tsx
|
|
4019
|
-
var
|
|
4020
|
-
var
|
|
4016
|
+
var import_connect_query7 = require("@connectrpc/connect-query");
|
|
4017
|
+
var import_frontier9 = require("@raystack/proton/frontier");
|
|
4021
4018
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
4022
4019
|
var pageHeader = {
|
|
4023
4020
|
title: "Super Admins",
|
|
@@ -4040,7 +4037,7 @@ function AdminsView({ onNavigateToOrg, icon } = {}) {
|
|
|
4040
4037
|
isLoading,
|
|
4041
4038
|
error,
|
|
4042
4039
|
isError
|
|
4043
|
-
} = (0,
|
|
4040
|
+
} = (0, import_connect_query7.useQuery)(import_frontier9.AdminServiceQueries.listPlatformUsers, {}, {
|
|
4044
4041
|
staleTime: Infinity
|
|
4045
4042
|
});
|
|
4046
4043
|
const columns = getColumns6({ onNavigateToOrg, t });
|
|
@@ -4095,8 +4092,8 @@ var import_apsara27 = require("@raystack/apsara");
|
|
|
4095
4092
|
// admin/views/plans/columns.tsx
|
|
4096
4093
|
var import_apsara25 = require("@raystack/apsara");
|
|
4097
4094
|
|
|
4098
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
4099
|
-
var digest21 = "
|
|
4095
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-m4OUZIVHpGr8/sdk/admin/views/plans/plans.module.css.js
|
|
4096
|
+
var digest21 = "033ca61f45b7ac8fe78422248ee54c0b85281231f74f2b52aa2d2aef5207c2bb";
|
|
4100
4097
|
var css21 = `._tableRoot_1akba_1 {
|
|
4101
4098
|
width: 100%;
|
|
4102
4099
|
}
|
|
@@ -4150,7 +4147,8 @@ var getColumns7 = ({ onSelectPlan } = {}) => {
|
|
|
4150
4147
|
cell: plans_module_css_default["first-column"],
|
|
4151
4148
|
header: plans_module_css_default["first-column"]
|
|
4152
4149
|
},
|
|
4153
|
-
|
|
4150
|
+
filterType: "string",
|
|
4151
|
+
enableColumnFilter: true,
|
|
4154
4152
|
cell: ({ getValue }) => {
|
|
4155
4153
|
const id = getValue();
|
|
4156
4154
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
@@ -4167,35 +4165,27 @@ var getColumns7 = ({ onSelectPlan } = {}) => {
|
|
|
4167
4165
|
{
|
|
4168
4166
|
header: "Title",
|
|
4169
4167
|
accessorKey: "title",
|
|
4170
|
-
|
|
4168
|
+
filterType: "string",
|
|
4169
|
+
enableColumnFilter: true,
|
|
4171
4170
|
cell: (info) => info.getValue()
|
|
4172
4171
|
},
|
|
4173
4172
|
{
|
|
4174
4173
|
header: "Interval",
|
|
4175
4174
|
accessorKey: "interval",
|
|
4176
|
-
|
|
4175
|
+
filterType: "string",
|
|
4176
|
+
enableColumnFilter: true,
|
|
4177
4177
|
cell: (info) => info.getValue()
|
|
4178
4178
|
},
|
|
4179
4179
|
{
|
|
4180
4180
|
header: "Created At",
|
|
4181
4181
|
accessorKey: "createdAt",
|
|
4182
|
-
cell: ({ getValue }) =>
|
|
4183
|
-
const timestamp = getValue();
|
|
4184
|
-
const date = timestampToDate(timestamp);
|
|
4185
|
-
if (!date)
|
|
4186
|
-
return "-";
|
|
4187
|
-
return date.toLocaleString("en", {
|
|
4188
|
-
month: "long",
|
|
4189
|
-
day: "numeric",
|
|
4190
|
-
year: "numeric"
|
|
4191
|
-
});
|
|
4192
|
-
}
|
|
4182
|
+
cell: ({ getValue }) => formatTimestamp(getValue())
|
|
4193
4183
|
}
|
|
4194
4184
|
];
|
|
4195
4185
|
};
|
|
4196
4186
|
|
|
4197
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
4198
|
-
var digest22 = "
|
|
4187
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-a1dgthy5LhdN/sdk/admin/views/plans/plans.module.css.js
|
|
4188
|
+
var digest22 = "5a3d80fe28559a7f1e4cbddfa589f81cfe158e5c1941cb029ff58c943daa108c";
|
|
4199
4189
|
var css22 = `._tableRoot_1akba_1 {
|
|
4200
4190
|
width: 100%;
|
|
4201
4191
|
}
|
|
@@ -4239,8 +4229,8 @@ var css22 = `._tableRoot_1akba_1 {
|
|
|
4239
4229
|
var plans_module_css_default2 = { "tableRoot": "_tableRoot_1akba_1", "tableWrapper": "_tableWrapper_1akba_4", "table": "_table_1akba_1", "header": "_header_1akba_12", "first-column": "_first-column_1akba_17", "firstColumn": "_first-column_1akba_17", "sheetContent": "_sheetContent_1akba_21", "sheetContentBody": "_sheetContentBody_1akba_26" };
|
|
4240
4230
|
|
|
4241
4231
|
// admin/views/plans/index.tsx
|
|
4242
|
-
var
|
|
4243
|
-
var
|
|
4232
|
+
var import_connect_query8 = require("@connectrpc/connect-query");
|
|
4233
|
+
var import_frontier10 = require("@raystack/proton/frontier");
|
|
4244
4234
|
|
|
4245
4235
|
// admin/views/plans/details.tsx
|
|
4246
4236
|
var import_apsara26 = require("@raystack/apsara");
|
|
@@ -4259,14 +4249,7 @@ function PlanDetails({ plan }) {
|
|
|
4259
4249
|
] }),
|
|
4260
4250
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_apsara26.Grid, { columns: 2, gap: 3, children: [
|
|
4261
4251
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_apsara26.Text, { size: "mini", children: "Created At" }),
|
|
4262
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_apsara26.Text, { size: "mini", children: (
|
|
4263
|
-
const date = timestampToDate(plan?.createdAt);
|
|
4264
|
-
return date ? date.toLocaleString("en", {
|
|
4265
|
-
month: "long",
|
|
4266
|
-
day: "numeric",
|
|
4267
|
-
year: "numeric"
|
|
4268
|
-
}) : "-";
|
|
4269
|
-
})() })
|
|
4252
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_apsara26.Text, { size: "mini", children: formatTimestamp(plan?.createdAt) })
|
|
4270
4253
|
] })
|
|
4271
4254
|
] })
|
|
4272
4255
|
] });
|
|
@@ -4286,7 +4269,7 @@ function PlansView({
|
|
|
4286
4269
|
isLoading: isPlansLoading,
|
|
4287
4270
|
error,
|
|
4288
4271
|
isError
|
|
4289
|
-
} = (0,
|
|
4272
|
+
} = (0, import_connect_query8.useQuery)(import_frontier10.FrontierServiceQueries.listPlans, {}, {
|
|
4290
4273
|
staleTime: Infinity
|
|
4291
4274
|
});
|
|
4292
4275
|
const plans = plansResponse?.plans || [];
|
|
@@ -4354,8 +4337,8 @@ var import_apsara29 = require("@raystack/apsara");
|
|
|
4354
4337
|
// admin/views/webhooks/webhooks/columns.tsx
|
|
4355
4338
|
var import_apsara28 = require("@raystack/apsara");
|
|
4356
4339
|
|
|
4357
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
4358
|
-
var digest23 = "
|
|
4340
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-Ls2bXCnCE7US/sdk/admin/views/webhooks/webhooks/webhooks.module.css.js
|
|
4341
|
+
var digest23 = "e0215aca4a68e6a12749008604523c2b4d544b352aa20cf9ff6afed33753cc31";
|
|
4359
4342
|
var css23 = `._tableRoot_iq3pc_1 {
|
|
4360
4343
|
width: 100%;
|
|
4361
4344
|
}
|
|
@@ -4400,7 +4383,6 @@ var css23 = `._tableRoot_iq3pc_1 {
|
|
|
4400
4383
|
var webhooks_module_css_default = { "tableRoot": "_tableRoot_iq3pc_1", "tableWrapper": "_tableWrapper_iq3pc_5", "table": "_table_iq3pc_1", "first-column": "_first-column_iq3pc_13", "firstColumn": "_first-column_iq3pc_13", "stateColumn": "_stateColumn_iq3pc_17", "dateColumn": "_dateColumn_iq3pc_21", "header": "_header_iq3pc_25" };
|
|
4401
4384
|
|
|
4402
4385
|
// admin/views/webhooks/webhooks/columns.tsx
|
|
4403
|
-
var import_dayjs6 = __toESM(require("dayjs"));
|
|
4404
4386
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
4405
4387
|
var getColumns8 = () => {
|
|
4406
4388
|
return [
|
|
@@ -4411,13 +4393,15 @@ var getColumns8 = () => {
|
|
|
4411
4393
|
cell: webhooks_module_css_default["first-column"],
|
|
4412
4394
|
header: webhooks_module_css_default["first-column"]
|
|
4413
4395
|
},
|
|
4414
|
-
|
|
4396
|
+
filterType: "string",
|
|
4397
|
+
enableColumnFilter: true,
|
|
4415
4398
|
cell: (info) => info.getValue() || "-"
|
|
4416
4399
|
},
|
|
4417
4400
|
{
|
|
4418
4401
|
header: "State",
|
|
4419
4402
|
accessorKey: "state",
|
|
4420
|
-
|
|
4403
|
+
filterType: "string",
|
|
4404
|
+
enableColumnFilter: true,
|
|
4421
4405
|
classNames: { cell: webhooks_module_css_default.stateColumn, header: webhooks_module_css_default.stateColumn },
|
|
4422
4406
|
cell: (info) => info.getValue() || "-"
|
|
4423
4407
|
},
|
|
@@ -4430,16 +4414,12 @@ var getColumns8 = () => {
|
|
|
4430
4414
|
header: "Created at",
|
|
4431
4415
|
accessorKey: "createdAt",
|
|
4432
4416
|
classNames: { cell: webhooks_module_css_default.dateColumn, header: webhooks_module_css_default.dateColumn },
|
|
4433
|
-
cell: ({ getValue }) => {
|
|
4434
|
-
const value = getValue();
|
|
4435
|
-
const date = isNullTimestamp(value) ? "-" : (0, import_dayjs6.default)(timestampToDate(value)).format("YYYY-MM-DD");
|
|
4436
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_apsara28.Text, { children: date });
|
|
4437
|
-
}
|
|
4417
|
+
cell: ({ getValue }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_apsara28.Text, { children: formatTimestamp(getValue()) })
|
|
4438
4418
|
}
|
|
4439
4419
|
];
|
|
4440
4420
|
};
|
|
4441
4421
|
|
|
4442
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
4422
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-NAd1whgxZkor/sdk/admin/views/webhooks/webhooks/webhooks.module.css.js
|
|
4443
4423
|
var digest24 = "47f3f79b205ca26d98d73875adf933ee92122e78ac70b5e2a2b59f6729460399";
|
|
4444
4424
|
var css24 = `._tableRoot_iq3pc_1 {
|
|
4445
4425
|
width: 100%;
|
|
@@ -4485,11 +4465,11 @@ var css24 = `._tableRoot_iq3pc_1 {
|
|
|
4485
4465
|
var webhooks_module_css_default2 = { "tableRoot": "_tableRoot_iq3pc_1", "tableWrapper": "_tableWrapper_iq3pc_5", "table": "_table_iq3pc_1", "first-column": "_first-column_iq3pc_13", "firstColumn": "_first-column_iq3pc_13", "stateColumn": "_stateColumn_iq3pc_17", "dateColumn": "_dateColumn_iq3pc_21", "header": "_header_iq3pc_25" };
|
|
4486
4466
|
|
|
4487
4467
|
// admin/views/webhooks/webhooks/hooks/useWebhookQueries.ts
|
|
4488
|
-
var
|
|
4489
|
-
var
|
|
4468
|
+
var import_connect_query9 = require("@connectrpc/connect-query");
|
|
4469
|
+
var import_frontier11 = require("@raystack/proton/frontier");
|
|
4490
4470
|
function useWebhookQueries() {
|
|
4491
|
-
const listWebhooks = (0,
|
|
4492
|
-
|
|
4471
|
+
const listWebhooks = (0, import_connect_query9.useQuery)(
|
|
4472
|
+
import_frontier11.AdminServiceQueries.listWebhooks,
|
|
4493
4473
|
{},
|
|
4494
4474
|
{
|
|
4495
4475
|
staleTime: 0,
|
|
@@ -4552,8 +4532,8 @@ function WebhooksView({ icon } = {}) {
|
|
|
4552
4532
|
|
|
4553
4533
|
// admin/views/preferences/PreferencesView.tsx
|
|
4554
4534
|
var import_apsara33 = require("@raystack/apsara");
|
|
4555
|
-
var
|
|
4556
|
-
var
|
|
4535
|
+
var import_connect_query11 = require("@connectrpc/connect-query");
|
|
4536
|
+
var import_frontier14 = require("@raystack/proton/frontier");
|
|
4557
4537
|
var import_react_query4 = require("@tanstack/react-query");
|
|
4558
4538
|
|
|
4559
4539
|
// admin/views/preferences/index.tsx
|
|
@@ -4562,8 +4542,8 @@ var import_apsara31 = require("@raystack/apsara");
|
|
|
4562
4542
|
// admin/views/preferences/columns.tsx
|
|
4563
4543
|
var import_apsara30 = require("@raystack/apsara");
|
|
4564
4544
|
|
|
4565
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
4566
|
-
var digest25 = "
|
|
4545
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-XJiVe9U8cgog/sdk/admin/views/preferences/preferences.module.css.js
|
|
4546
|
+
var digest25 = "7356643712697aaa8e1a2a7a580eb07ab6461d037f9ab38e0a7da0055eeac98f";
|
|
4567
4547
|
var css25 = `._tableRoot_hre5m_1 {
|
|
4568
4548
|
width: 100%;
|
|
4569
4549
|
}
|
|
@@ -4614,7 +4594,8 @@ var getColumns9 = ({
|
|
|
4614
4594
|
cell: preferences_module_css_default["first-column"],
|
|
4615
4595
|
header: preferences_module_css_default["first-column"]
|
|
4616
4596
|
},
|
|
4617
|
-
|
|
4597
|
+
filterType: "string",
|
|
4598
|
+
enableColumnFilter: true,
|
|
4618
4599
|
cell: (info) => info.getValue(),
|
|
4619
4600
|
footer: (props) => props.column.id
|
|
4620
4601
|
},
|
|
@@ -4653,8 +4634,8 @@ var getColumns9 = ({
|
|
|
4653
4634
|
];
|
|
4654
4635
|
};
|
|
4655
4636
|
|
|
4656
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
4657
|
-
var digest26 = "
|
|
4637
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-1GiMwvi9eluY/sdk/admin/views/preferences/preferences.module.css.js
|
|
4638
|
+
var digest26 = "a328bf70efe845386173bb05271c741f1107bc6219fc6e664b3a7be9c75c5ce2";
|
|
4658
4639
|
var css26 = `._tableRoot_hre5m_1 {
|
|
4659
4640
|
width: 100%;
|
|
4660
4641
|
}
|
|
@@ -4826,8 +4807,7 @@ function Skeleton({ count = 1, wrapper: Wrapper, className: customClassName, con
|
|
|
4826
4807
|
}
|
|
4827
4808
|
|
|
4828
4809
|
// admin/views/preferences/details.tsx
|
|
4829
|
-
var
|
|
4830
|
-
var import_connect_query9 = require("@connectrpc/connect-query");
|
|
4810
|
+
var import_connect_query10 = require("@connectrpc/connect-query");
|
|
4831
4811
|
|
|
4832
4812
|
// utils/error.ts
|
|
4833
4813
|
var import_connect = require("@connectrpc/connect");
|
|
@@ -4859,14 +4839,13 @@ function handleConnectError(error, handlers) {
|
|
|
4859
4839
|
}
|
|
4860
4840
|
|
|
4861
4841
|
// admin/views/preferences/details.tsx
|
|
4862
|
-
var import_frontier11 = require("@raystack/proton/frontier");
|
|
4863
4842
|
var import_frontier12 = require("@raystack/proton/frontier");
|
|
4864
|
-
var
|
|
4843
|
+
var import_frontier13 = require("@raystack/proton/frontier");
|
|
4865
4844
|
var import_react_query3 = require("@tanstack/react-query");
|
|
4866
4845
|
var import_protobuf3 = require("@bufbuild/protobuf");
|
|
4867
4846
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
4868
4847
|
function PreferenceValue({ value, trait, onChange }) {
|
|
4869
|
-
if (trait.inputType ===
|
|
4848
|
+
if (trait.inputType === import_frontier13.PreferenceTrait_InputType.CHECKBOX) {
|
|
4870
4849
|
const checked = value === "true";
|
|
4871
4850
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4872
4851
|
import_apsara32.Switch,
|
|
@@ -4876,7 +4855,7 @@ function PreferenceValue({ value, trait, onChange }) {
|
|
|
4876
4855
|
"data-test-id": "admin-preference-select"
|
|
4877
4856
|
}
|
|
4878
4857
|
);
|
|
4879
|
-
} else if (trait.inputType ===
|
|
4858
|
+
} else if (trait.inputType === import_frontier13.PreferenceTrait_InputType.TEXT || trait.inputType === import_frontier13.PreferenceTrait_InputType.TEXTAREA) {
|
|
4880
4859
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4881
4860
|
import_apsara32.Input,
|
|
4882
4861
|
{
|
|
@@ -4901,11 +4880,11 @@ function PreferenceDetails({
|
|
|
4901
4880
|
const preference = preferences?.find((p) => p.name === name);
|
|
4902
4881
|
const trait = traits?.find((t) => t.name === name);
|
|
4903
4882
|
const queryClient = (0, import_react_query3.useQueryClient)();
|
|
4904
|
-
const transport = (0,
|
|
4905
|
-
const { mutateAsync: createPreferences, isPending: isActionLoading } = (0,
|
|
4883
|
+
const transport = (0, import_connect_query10.useTransport)();
|
|
4884
|
+
const { mutateAsync: createPreferences, isPending: isActionLoading } = (0, import_connect_query10.useMutation)(import_frontier12.AdminServiceQueries.createPreferences, {
|
|
4906
4885
|
onSuccess: (data) => {
|
|
4907
|
-
const queryKey = (0,
|
|
4908
|
-
schema:
|
|
4886
|
+
const queryKey = (0, import_connect_query10.createConnectQueryKey)({
|
|
4887
|
+
schema: import_frontier12.AdminServiceQueries.listPreferences,
|
|
4909
4888
|
transport,
|
|
4910
4889
|
input: {},
|
|
4911
4890
|
cardinality: "finite"
|
|
@@ -4978,12 +4957,12 @@ function PreferenceDetails({
|
|
|
4978
4957
|
},
|
|
4979
4958
|
{
|
|
4980
4959
|
key: "Last updated",
|
|
4981
|
-
value: preference?.updatedAt
|
|
4960
|
+
value: formatTimestamp(preference?.updatedAt, `${DATE_FORMAT} hh:mm:ss A`)
|
|
4982
4961
|
}
|
|
4983
4962
|
];
|
|
4984
4963
|
const onSave = (0, import_react12.useCallback)(async () => {
|
|
4985
4964
|
try {
|
|
4986
|
-
await createPreferences((0, import_protobuf3.create)(
|
|
4965
|
+
await createPreferences((0, import_protobuf3.create)(import_frontier12.CreatePreferencesRequestSchema, {
|
|
4987
4966
|
preferences: [
|
|
4988
4967
|
{
|
|
4989
4968
|
name,
|
|
@@ -5069,15 +5048,15 @@ function PreferencesView({
|
|
|
5069
5048
|
onSelectPreference,
|
|
5070
5049
|
icon
|
|
5071
5050
|
} = {}) {
|
|
5072
|
-
const transport = (0,
|
|
5051
|
+
const transport = (0, import_connect_query11.useTransport)();
|
|
5073
5052
|
const [preferencesQuery, traitsQuery] = (0, import_react_query4.useQueries)({
|
|
5074
5053
|
queries: [
|
|
5075
5054
|
{
|
|
5076
|
-
...(0,
|
|
5055
|
+
...(0, import_connect_query11.createQueryOptions)(import_frontier14.AdminServiceQueries.listPreferences, {}, { transport }),
|
|
5077
5056
|
staleTime: Infinity
|
|
5078
5057
|
},
|
|
5079
5058
|
{
|
|
5080
|
-
...(0,
|
|
5059
|
+
...(0, import_connect_query11.createQueryOptions)(import_frontier14.FrontierServiceQueries.describePreferences, {}, { transport }),
|
|
5081
5060
|
staleTime: Infinity
|
|
5082
5061
|
}
|
|
5083
5062
|
]
|
|
@@ -5128,8 +5107,8 @@ var import_apsara37 = require("@raystack/apsara");
|
|
|
5128
5107
|
// admin/views/users/list/navbar.tsx
|
|
5129
5108
|
var import_apsara35 = require("@raystack/apsara");
|
|
5130
5109
|
|
|
5131
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
5132
|
-
var digest27 = "
|
|
5110
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-e3JO0h0IXDxO/sdk/admin/views/users/list/list.module.css.js
|
|
5111
|
+
var digest27 = "18abc05116b52221c275a1ead6f3a8e4bfb52daf7dc08154f8301755f588fa99";
|
|
5133
5112
|
var css27 = `._navbar_vt0az_1 {
|
|
5134
5113
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
5135
5114
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -9267,8 +9246,8 @@ var NEVER = INVALID;
|
|
|
9267
9246
|
var import_react_hook_form = require("react-hook-form");
|
|
9268
9247
|
var import_zod = require("@hookform/resolvers/zod");
|
|
9269
9248
|
|
|
9270
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
9271
|
-
var digest28 = "
|
|
9249
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-62xd6jYC98zs/sdk/admin/views/users/list/invite-users.module.css.js
|
|
9250
|
+
var digest28 = "a7a2aecda1dab9e7c851580abff27b554e3f45d1c8f12e34d5e32b5d71a66b06";
|
|
9272
9251
|
var css28 = `._invite-users-dialog-body_daxb4_1 {
|
|
9273
9252
|
display: flex;
|
|
9274
9253
|
flex-direction: column;
|
|
@@ -9295,8 +9274,8 @@ var css28 = `._invite-users-dialog-body_daxb4_1 {
|
|
|
9295
9274
|
var invite_users_module_css_default = { "invite-users-dialog-body": "_invite-users-dialog-body_daxb4_1", "inviteUsersDialogBody": "_invite-users-dialog-body_daxb4_1", "invite-users-emails-textarea": "_invite-users-emails-textarea_daxb4_8", "inviteUsersEmailsTextarea": "_invite-users-emails-textarea_daxb4_8" };
|
|
9296
9275
|
|
|
9297
9276
|
// admin/views/users/list/invite-users.tsx
|
|
9298
|
-
var
|
|
9299
|
-
var
|
|
9277
|
+
var import_connect_query12 = require("@connectrpc/connect-query");
|
|
9278
|
+
var import_frontier15 = require("@raystack/proton/frontier");
|
|
9300
9279
|
var import_protobuf4 = require("@bufbuild/protobuf");
|
|
9301
9280
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
9302
9281
|
var createInviteSchema = (t) => objectType({
|
|
@@ -9317,9 +9296,9 @@ var InviteUser = () => {
|
|
|
9317
9296
|
data: organizations,
|
|
9318
9297
|
isLoading: isOrganizationsLoading,
|
|
9319
9298
|
error: organizationsError
|
|
9320
|
-
} = (0,
|
|
9321
|
-
|
|
9322
|
-
(0, import_protobuf4.create)(
|
|
9299
|
+
} = (0, import_connect_query12.useQuery)(
|
|
9300
|
+
import_frontier15.AdminServiceQueries.searchOrganizations,
|
|
9301
|
+
(0, import_protobuf4.create)(import_frontier15.SearchOrganizationsRequestSchema, { query: {} }),
|
|
9323
9302
|
{
|
|
9324
9303
|
select: (data) => data?.organizations || []
|
|
9325
9304
|
}
|
|
@@ -9328,9 +9307,9 @@ var InviteUser = () => {
|
|
|
9328
9307
|
data: roles,
|
|
9329
9308
|
isLoading: isRolesLoading,
|
|
9330
9309
|
error: rolesError
|
|
9331
|
-
} = (0,
|
|
9332
|
-
|
|
9333
|
-
(0, import_protobuf4.create)(
|
|
9310
|
+
} = (0, import_connect_query12.useQuery)(
|
|
9311
|
+
import_frontier15.FrontierServiceQueries.listRoles,
|
|
9312
|
+
(0, import_protobuf4.create)(import_frontier15.ListRolesRequestSchema, { scopes: [SCOPES.ORG] }),
|
|
9334
9313
|
{
|
|
9335
9314
|
select: (data) => data?.roles || []
|
|
9336
9315
|
}
|
|
@@ -9362,8 +9341,8 @@ var InviteUser = () => {
|
|
|
9362
9341
|
role: defaultRoleId
|
|
9363
9342
|
}
|
|
9364
9343
|
});
|
|
9365
|
-
const { mutateAsync: inviteUser } = (0,
|
|
9366
|
-
|
|
9344
|
+
const { mutateAsync: inviteUser } = (0, import_connect_query12.useMutation)(
|
|
9345
|
+
import_frontier15.FrontierServiceQueries.createOrganizationInvitation,
|
|
9367
9346
|
{
|
|
9368
9347
|
onSuccess: (data) => {
|
|
9369
9348
|
const invitedCount = data?.invitations?.length ?? 0;
|
|
@@ -9595,8 +9574,8 @@ var Navbar2 = ({ searchQuery, onExportUsers }) => {
|
|
|
9595
9574
|
};
|
|
9596
9575
|
var navbar_default2 = Navbar2;
|
|
9597
9576
|
|
|
9598
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
9599
|
-
var digest29 = "
|
|
9577
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-jxcIXYG640Sl/sdk/admin/views/users/list/list.module.css.js
|
|
9578
|
+
var digest29 = "175cde6a5040d8559e83340e29907c43005c59cf1dd9a4964a8569fc8dc26b85";
|
|
9600
9579
|
var css29 = `._navbar_vt0az_1 {
|
|
9601
9580
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
9602
9581
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -9659,10 +9638,9 @@ var list_module_css_default2 = { "navbar": "_navbar_vt0az_1", "table": "_table_v
|
|
|
9659
9638
|
|
|
9660
9639
|
// admin/views/users/list/columns.tsx
|
|
9661
9640
|
var import_apsara36 = require("@raystack/apsara");
|
|
9662
|
-
var import_dayjs8 = __toESM(require("dayjs"));
|
|
9663
9641
|
|
|
9664
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
9665
|
-
var digest30 = "
|
|
9642
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-ESr3QpI7wa3Z/sdk/admin/views/users/list/list.module.css.js
|
|
9643
|
+
var digest30 = "bac431640a3f12098af393bd72f94863c98858360d94d9d48cad7a0b94eec635";
|
|
9666
9644
|
var css30 = `._navbar_vt0az_1 {
|
|
9667
9645
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
9668
9646
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -9784,10 +9762,9 @@ var getColumns10 = ({
|
|
|
9784
9762
|
accessorKey: "createdAt",
|
|
9785
9763
|
header: "Joined on",
|
|
9786
9764
|
filterType: "date",
|
|
9765
|
+
enableColumnFilter: true,
|
|
9787
9766
|
cell: ({ getValue }) => {
|
|
9788
|
-
|
|
9789
|
-
const date = isNullTimestamp(value) ? "-" : (0, import_dayjs8.default)(timestampToDate(value)).format("YYYY-MM-DD");
|
|
9790
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_apsara36.Text, { children: date });
|
|
9767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_apsara36.Text, { children: formatTimestamp(getValue()) });
|
|
9791
9768
|
},
|
|
9792
9769
|
enableHiding: true,
|
|
9793
9770
|
enableSorting: true
|
|
@@ -9815,8 +9792,8 @@ var getColumns10 = ({
|
|
|
9815
9792
|
};
|
|
9816
9793
|
|
|
9817
9794
|
// admin/views/users/list/list.tsx
|
|
9818
|
-
var
|
|
9819
|
-
var
|
|
9795
|
+
var import_connect_query13 = require("@connectrpc/connect-query");
|
|
9796
|
+
var import_frontier16 = require("@raystack/proton/frontier");
|
|
9820
9797
|
var import_hooks2 = require("@raystack/apsara/hooks");
|
|
9821
9798
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
9822
9799
|
var NoUsers = () => {
|
|
@@ -9858,8 +9835,8 @@ var UsersList = ({ onExportUsers, onNavigateToUser }) => {
|
|
|
9858
9835
|
fetchNextPage,
|
|
9859
9836
|
error,
|
|
9860
9837
|
isError
|
|
9861
|
-
} = (0,
|
|
9862
|
-
|
|
9838
|
+
} = (0, import_connect_query13.useInfiniteQuery)(
|
|
9839
|
+
import_frontier16.AdminServiceQueries.searchUsers,
|
|
9863
9840
|
{ query },
|
|
9864
9841
|
{
|
|
9865
9842
|
pageParamKey: "query",
|
|
@@ -9955,8 +9932,8 @@ var import_apsara43 = require("@raystack/apsara");
|
|
|
9955
9932
|
// admin/views/users/details/layout/side-panel-details.tsx
|
|
9956
9933
|
var import_apsara38 = require("@raystack/apsara");
|
|
9957
9934
|
|
|
9958
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
9959
|
-
var digest31 = "
|
|
9935
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-idmYV7GKxnMx/sdk/admin/views/users/details/layout/side-panel.module.css.js
|
|
9936
|
+
var digest31 = "b4466db82e93fccc8c9c209a1fe57412611babbb01df4fd332193a364cecd62f";
|
|
9960
9937
|
var css31 = `._side-panel_t3ekz_1 {
|
|
9961
9938
|
transform: all 0.3s ease-in-out;
|
|
9962
9939
|
padding-bottom: var(--rs-space-15);
|
|
@@ -10059,7 +10036,7 @@ var SidePanelDetails2 = () => {
|
|
|
10059
10036
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_apsara38.List.Label, { className: side_panel_module_css_default.listLabel, children: "Created on" }),
|
|
10060
10037
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_apsara38.List.Value, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_apsara38.Flex, { gap: 3, children: [
|
|
10061
10038
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(CalendarIcon, {}),
|
|
10062
|
-
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_apsara38.Text, { children:
|
|
10039
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_apsara38.Text, { children: formatTimestamp(user?.createdAt) })
|
|
10063
10040
|
] }) })
|
|
10064
10041
|
] }),
|
|
10065
10042
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_apsara38.List.Item, { children: [
|
|
@@ -10071,10 +10048,9 @@ var SidePanelDetails2 = () => {
|
|
|
10071
10048
|
|
|
10072
10049
|
// admin/views/users/details/layout/side-panel-membership.tsx
|
|
10073
10050
|
var import_apsara42 = require("@raystack/apsara");
|
|
10074
|
-
var import_dayjs9 = __toESM(require("dayjs"));
|
|
10075
10051
|
|
|
10076
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
10077
|
-
var digest32 = "
|
|
10052
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-uxngcDFaxWhv/sdk/admin/views/users/details/layout/side-panel.module.css.js
|
|
10053
|
+
var digest32 = "704b55280a471c6dd0ce1d3899d1bdcdbbd9c617578c0edd092012f851a63f61";
|
|
10078
10054
|
var css32 = `._side-panel_t3ekz_1 {
|
|
10079
10055
|
transform: all 0.3s ease-in-out;
|
|
10080
10056
|
padding-bottom: var(--rs-space-15);
|
|
@@ -10139,8 +10115,8 @@ var side_panel_module_css_default2 = { "side-panel": "_side-panel_t3ekz_1", "sid
|
|
|
10139
10115
|
// admin/views/users/details/layout/membership-dropdown.tsx
|
|
10140
10116
|
var import_apsara41 = require("@raystack/apsara");
|
|
10141
10117
|
|
|
10142
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
10143
|
-
var digest33 = "
|
|
10118
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-7tPZeOWsLdmV/sdk/admin/views/users/details/layout/side-panel.module.css.js
|
|
10119
|
+
var digest33 = "ea186cc15de340de617b4044ad932700e54089f658b56d634b33c32b320a56a0";
|
|
10144
10120
|
var css33 = `._side-panel_t3ekz_1 {
|
|
10145
10121
|
transform: all 0.3s ease-in-out;
|
|
10146
10122
|
padding-bottom: var(--rs-space-15);
|
|
@@ -10204,16 +10180,16 @@ var side_panel_module_css_default3 = { "side-panel": "_side-panel_t3ekz_1", "sid
|
|
|
10204
10180
|
|
|
10205
10181
|
// admin/views/users/details/layout/membership-dropdown.tsx
|
|
10206
10182
|
var import_react17 = require("react");
|
|
10207
|
-
var
|
|
10183
|
+
var import_frontier18 = require("@raystack/proton/frontier");
|
|
10208
10184
|
var import_protobuf6 = require("@bufbuild/protobuf");
|
|
10209
|
-
var
|
|
10185
|
+
var import_connect_query15 = require("@connectrpc/connect-query");
|
|
10210
10186
|
|
|
10211
10187
|
// admin/components/AssignRole.tsx
|
|
10212
10188
|
var import_apsara39 = require("@raystack/apsara");
|
|
10213
|
-
var
|
|
10189
|
+
var import_frontier17 = require("@raystack/proton/frontier");
|
|
10214
10190
|
var import_protobuf5 = require("@bufbuild/protobuf");
|
|
10215
10191
|
var import_connect2 = require("@connectrpc/connect");
|
|
10216
|
-
var
|
|
10192
|
+
var import_connect_query14 = require("@connectrpc/connect-query");
|
|
10217
10193
|
var import_react_hook_form2 = require("react-hook-form");
|
|
10218
10194
|
var import_zod2 = require("@hookform/resolvers/zod");
|
|
10219
10195
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
@@ -10239,14 +10215,14 @@ var AssignRole = ({
|
|
|
10239
10215
|
},
|
|
10240
10216
|
resolver: (0, import_zod2.zodResolver)(formSchema)
|
|
10241
10217
|
});
|
|
10242
|
-
const { mutateAsync: setMemberRole } = (0,
|
|
10243
|
-
|
|
10218
|
+
const { mutateAsync: setMemberRole } = (0, import_connect_query14.useMutation)(
|
|
10219
|
+
import_frontier17.FrontierServiceQueries.setOrganizationMemberRole
|
|
10244
10220
|
);
|
|
10245
10221
|
const selectedRoleId = watch("roleId");
|
|
10246
10222
|
const onSubmit = async (data) => {
|
|
10247
10223
|
try {
|
|
10248
10224
|
await setMemberRole(
|
|
10249
|
-
(0, import_protobuf5.create)(
|
|
10225
|
+
(0, import_protobuf5.create)(import_frontier17.SetOrganizationMemberRoleRequestSchema, {
|
|
10250
10226
|
orgId: organizationId,
|
|
10251
10227
|
userId: user?.id,
|
|
10252
10228
|
roleId: data.roleId
|
|
@@ -10407,16 +10383,16 @@ var MembershipDropdown = ({
|
|
|
10407
10383
|
const [isAssignRoleDialogOpen, setIsAssignRoleDialogOpen] = (0, import_react17.useState)(false);
|
|
10408
10384
|
const [isSuspendDialogOpen, setIsSuspendDialogOpen] = (0, import_react17.useState)(false);
|
|
10409
10385
|
const { user } = useUser();
|
|
10410
|
-
const { data: defaultRoles = [], isLoading: isDefaultRolesLoading, error: defaultRolesError } = (0,
|
|
10411
|
-
|
|
10412
|
-
(0, import_protobuf6.create)(
|
|
10386
|
+
const { data: defaultRoles = [], isLoading: isDefaultRolesLoading, error: defaultRolesError } = (0, import_connect_query15.useQuery)(
|
|
10387
|
+
import_frontier18.FrontierServiceQueries.listRoles,
|
|
10388
|
+
(0, import_protobuf6.create)(import_frontier18.ListRolesRequestSchema, { scopes: [SCOPES.ORG] }),
|
|
10413
10389
|
{
|
|
10414
10390
|
select: (data2) => data2?.roles || []
|
|
10415
10391
|
}
|
|
10416
10392
|
);
|
|
10417
|
-
const { data: organizationRoles = [], isLoading: isOrgRolesLoading, error: orgRolesError } = (0,
|
|
10418
|
-
|
|
10419
|
-
(0, import_protobuf6.create)(
|
|
10393
|
+
const { data: organizationRoles = [], isLoading: isOrgRolesLoading, error: orgRolesError } = (0, import_connect_query15.useQuery)(
|
|
10394
|
+
import_frontier18.FrontierServiceQueries.listOrganizationRoles,
|
|
10395
|
+
(0, import_protobuf6.create)(import_frontier18.ListOrganizationRolesRequestSchema, {
|
|
10420
10396
|
orgId: data?.orgId || "",
|
|
10421
10397
|
scopes: [SCOPES.ORG]
|
|
10422
10398
|
}),
|
|
@@ -10452,7 +10428,7 @@ var MembershipDropdown = ({
|
|
|
10452
10428
|
};
|
|
10453
10429
|
const memoizedUser = (0, import_react17.useMemo)(
|
|
10454
10430
|
() => (0, import_protobuf6.create)(
|
|
10455
|
-
|
|
10431
|
+
import_frontier18.SearchOrganizationUsersResponse_OrganizationUserSchema,
|
|
10456
10432
|
Object.assign(user ?? {}, {
|
|
10457
10433
|
roleNames: data?.roleNames || [],
|
|
10458
10434
|
roleTitles: data?.roleTitles || [],
|
|
@@ -10539,7 +10515,7 @@ var SidePanelMembership = ({
|
|
|
10539
10515
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_apsara42.List.Label, { className: side_panel_module_css_default2.listLabel, children: "Joined on" }),
|
|
10540
10516
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_apsara42.List.Value, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_apsara42.Flex, { gap: 3, children: [
|
|
10541
10517
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(CalendarIcon, {}),
|
|
10542
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_apsara42.Text, { children: data?.orgJoinedOn
|
|
10518
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_apsara42.Text, { children: formatTimestamp(data?.orgJoinedOn) })
|
|
10543
10519
|
] }) })
|
|
10544
10520
|
] }),
|
|
10545
10521
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_apsara42.List.Item, { children: [
|
|
@@ -10549,8 +10525,8 @@ var SidePanelMembership = ({
|
|
|
10549
10525
|
] });
|
|
10550
10526
|
};
|
|
10551
10527
|
|
|
10552
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
10553
|
-
var digest34 = "
|
|
10528
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-PgY77aPf3G49/sdk/admin/views/users/details/layout/side-panel.module.css.js
|
|
10529
|
+
var digest34 = "b27d090ee163a26480c6e12b586af107e1c12cf6d76a2039918a9cd7acba3f3d";
|
|
10554
10530
|
var css34 = `._side-panel_t3ekz_1 {
|
|
10555
10531
|
transform: all 0.3s ease-in-out;
|
|
10556
10532
|
padding-bottom: var(--rs-space-15);
|
|
@@ -10613,8 +10589,8 @@ var css34 = `._side-panel_t3ekz_1 {
|
|
|
10613
10589
|
var side_panel_module_css_default4 = { "side-panel": "_side-panel_t3ekz_1", "sidePanel": "_side-panel_t3ekz_1", "side-panel-label": "_side-panel-label_t3ekz_6", "sidePanelLabel": "_side-panel-label_t3ekz_6", "text-overflow": "_text-overflow_t3ekz_10", "textOverflow": "_text-overflow_t3ekz_10", "loader-header": "_loader-header_t3ekz_17", "loaderHeader": "_loader-header_t3ekz_17", "dropdown-item": "_dropdown-item_t3ekz_26", "dropdownItem": "_dropdown-item_t3ekz_26", "dropdown-menu-trigger": "_dropdown-menu-trigger_t3ekz_31", "dropdownMenuTrigger": "_dropdown-menu-trigger_t3ekz_31", "listLabel": "_listLabel_t3ekz_46" };
|
|
10614
10590
|
|
|
10615
10591
|
// admin/views/users/details/layout/side-panel.tsx
|
|
10616
|
-
var
|
|
10617
|
-
var
|
|
10592
|
+
var import_frontier19 = require("@raystack/proton/frontier");
|
|
10593
|
+
var import_connect_query16 = require("@connectrpc/connect-query");
|
|
10618
10594
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
10619
10595
|
var UserDetailsSidePanel = () => {
|
|
10620
10596
|
const { user } = useUser();
|
|
@@ -10623,8 +10599,8 @@ var UserDetailsSidePanel = () => {
|
|
|
10623
10599
|
isLoading,
|
|
10624
10600
|
refetch: onReset,
|
|
10625
10601
|
error
|
|
10626
|
-
} = (0,
|
|
10627
|
-
|
|
10602
|
+
} = (0, import_connect_query16.useQuery)(
|
|
10603
|
+
import_frontier19.AdminServiceQueries.searchUserOrganizations,
|
|
10628
10604
|
{
|
|
10629
10605
|
id: user?.id || "",
|
|
10630
10606
|
query: {}
|
|
@@ -10670,8 +10646,8 @@ var UserDetailsSidePanel = () => {
|
|
|
10670
10646
|
);
|
|
10671
10647
|
};
|
|
10672
10648
|
|
|
10673
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
10674
|
-
var digest35 = "
|
|
10649
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-ob789xaEru38/sdk/admin/views/users/details/layout/layout.module.css.js
|
|
10650
|
+
var digest35 = "fafd43f242d0a48543d49e47228f92378df99594f4c402cbe279ab2124a93e4e";
|
|
10675
10651
|
var css35 = `._page_190wz_1 {
|
|
10676
10652
|
height: 100vh;
|
|
10677
10653
|
width: 100%;
|
|
@@ -10705,8 +10681,8 @@ var layout_module_css_default = { "page": "_page_190wz_1", "main_content": "_mai
|
|
|
10705
10681
|
var import_apsara44 = require("@raystack/apsara");
|
|
10706
10682
|
var import_icons = require("@raystack/apsara/icons");
|
|
10707
10683
|
|
|
10708
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
10709
|
-
var digest36 = "
|
|
10684
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-308ybD6Rc7mX/sdk/admin/views/users/details/layout/navbar.module.css.js
|
|
10685
|
+
var digest36 = "312b9372a5681465793c87199bcef5b383828ce2d9aa4e94dec07c388d1d66eb";
|
|
10710
10686
|
var css36 = `._navbar_1ahsl_1 {
|
|
10711
10687
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
10712
10688
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -10826,8 +10802,8 @@ var UserDetailsLayout = ({ children, currentPath, onNavigate }) => {
|
|
|
10826
10802
|
};
|
|
10827
10803
|
|
|
10828
10804
|
// admin/views/users/details/user-details.tsx
|
|
10829
|
-
var
|
|
10830
|
-
var
|
|
10805
|
+
var import_connect_query19 = require("@connectrpc/connect-query");
|
|
10806
|
+
var import_frontier22 = require("@raystack/proton/frontier");
|
|
10831
10807
|
|
|
10832
10808
|
// admin/views/users/details/security/security.tsx
|
|
10833
10809
|
var import_apsara51 = require("@raystack/apsara");
|
|
@@ -10835,8 +10811,8 @@ var import_apsara51 = require("@raystack/apsara");
|
|
|
10835
10811
|
// admin/views/users/details/security/block-user.tsx
|
|
10836
10812
|
var import_react19 = require("react");
|
|
10837
10813
|
var import_apsara46 = require("@raystack/apsara");
|
|
10838
|
-
var
|
|
10839
|
-
var
|
|
10814
|
+
var import_connect_query17 = require("@connectrpc/connect-query");
|
|
10815
|
+
var import_frontier20 = require("@raystack/proton/frontier");
|
|
10840
10816
|
var import_react_query5 = require("@tanstack/react-query");
|
|
10841
10817
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
10842
10818
|
var BlockUserDialog = () => {
|
|
@@ -10844,14 +10820,14 @@ var BlockUserDialog = () => {
|
|
|
10844
10820
|
const [isDialogOpen, setIsDialogOpen] = (0, import_react19.useState)(false);
|
|
10845
10821
|
const { user, reset } = useUser();
|
|
10846
10822
|
const queryClient = (0, import_react_query5.useQueryClient)();
|
|
10847
|
-
const transport = (0,
|
|
10823
|
+
const transport = (0, import_connect_query17.useTransport)();
|
|
10848
10824
|
const isActive = user?.state === "enabled";
|
|
10849
10825
|
const userName = getUserName(user);
|
|
10850
10826
|
const optimisticUpdateState = (0, import_react19.useCallback)(
|
|
10851
10827
|
(state) => {
|
|
10852
10828
|
queryClient.setQueryData(
|
|
10853
|
-
(0,
|
|
10854
|
-
schema:
|
|
10829
|
+
(0, import_connect_query17.createConnectQueryKey)({
|
|
10830
|
+
schema: import_frontier20.FrontierServiceQueries.getUser,
|
|
10855
10831
|
transport,
|
|
10856
10832
|
input: { id: user?.id || "" },
|
|
10857
10833
|
cardinality: "finite"
|
|
@@ -10868,8 +10844,8 @@ var BlockUserDialog = () => {
|
|
|
10868
10844
|
},
|
|
10869
10845
|
[queryClient, transport, user?.id]
|
|
10870
10846
|
);
|
|
10871
|
-
const { mutateAsync: blockUser, isPending: isBlockingUser } = (0,
|
|
10872
|
-
|
|
10847
|
+
const { mutateAsync: blockUser, isPending: isBlockingUser } = (0, import_connect_query17.useMutation)(
|
|
10848
|
+
import_frontier20.FrontierServiceQueries.disableUser,
|
|
10873
10849
|
{
|
|
10874
10850
|
onSuccess: () => {
|
|
10875
10851
|
import_apsara46.toastManager.add({ title: `${t.user({ case: "capital" })} blocked successfully`, type: "success" });
|
|
@@ -10879,8 +10855,8 @@ var BlockUserDialog = () => {
|
|
|
10879
10855
|
}
|
|
10880
10856
|
}
|
|
10881
10857
|
);
|
|
10882
|
-
const { mutateAsync: unblockUser, isPending: isUnblockingUser } = (0,
|
|
10883
|
-
|
|
10858
|
+
const { mutateAsync: unblockUser, isPending: isUnblockingUser } = (0, import_connect_query17.useMutation)(
|
|
10859
|
+
import_frontier20.FrontierServiceQueries.enableUser,
|
|
10884
10860
|
{
|
|
10885
10861
|
onSuccess: () => {
|
|
10886
10862
|
import_apsara46.toastManager.add({ title: `${t.user({ case: "capital" })} unblocked successfully`, type: "success" });
|
|
@@ -11050,8 +11026,8 @@ var RevokeSessionFinalConfirm = ({
|
|
|
11050
11026
|
] }) });
|
|
11051
11027
|
};
|
|
11052
11028
|
|
|
11053
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
11054
|
-
var digest37 = "
|
|
11029
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-vsafjw3HRJGO/sdk/admin/views/users/details/security/sessions/sessions.module.css.js
|
|
11030
|
+
var digest37 = "4565ba878e55a8874838061a4a368a58f3475236136b787c010e8fe4c451b5d8";
|
|
11055
11031
|
var css37 = `._sessionsContainer_jptao_1 {
|
|
11056
11032
|
border: 1px solid var(--rs-color-border-base-primary);
|
|
11057
11033
|
border-radius: var(--rs-radius-2);
|
|
@@ -11188,8 +11164,8 @@ var RevokeSessionConfirm = ({ isOpen, onOpenChange, sessionInfo, onRevokeConfirm
|
|
|
11188
11164
|
// admin/views/users/details/security/sessions/session-skeleton.tsx
|
|
11189
11165
|
var import_apsara49 = require("@raystack/apsara");
|
|
11190
11166
|
|
|
11191
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
11192
|
-
var digest38 = "
|
|
11167
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-ptUmvr3wk2nK/sdk/admin/views/users/details/security/sessions/sessions.module.css.js
|
|
11168
|
+
var digest38 = "0c8e8d1b0ce4577a6bfcfdd47e7701fdf3a40122059798b3e7d66c1f3a5f753e";
|
|
11193
11169
|
var css38 = `._sessionsContainer_jptao_1 {
|
|
11194
11170
|
border: 1px solid var(--rs-color-border-base-primary);
|
|
11195
11171
|
border-radius: var(--rs-radius-2);
|
|
@@ -11262,14 +11238,14 @@ var SessionSkeleton = ({ count = 3 }) => {
|
|
|
11262
11238
|
};
|
|
11263
11239
|
|
|
11264
11240
|
// admin/views/users/details/security/sessions/index.tsx
|
|
11265
|
-
var
|
|
11241
|
+
var import_connect_query18 = require("@connectrpc/connect-query");
|
|
11266
11242
|
var import_react_query6 = require("@tanstack/react-query");
|
|
11267
|
-
var
|
|
11268
|
-
var
|
|
11243
|
+
var import_frontier21 = require("@raystack/proton/frontier");
|
|
11244
|
+
var import_dayjs3 = __toESM(require("dayjs"));
|
|
11269
11245
|
var import_relativeTime = __toESM(require("dayjs/plugin/relativeTime"));
|
|
11270
11246
|
|
|
11271
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
11272
|
-
var digest39 = "
|
|
11247
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-Z0DHMqmDty5k/sdk/admin/views/users/details/security/sessions/sessions.module.css.js
|
|
11248
|
+
var digest39 = "4fa54557f722657c83f626cb6770368f02478288486306dcf09062f17880c2bf";
|
|
11273
11249
|
var css39 = `._sessionsContainer_jptao_1 {
|
|
11274
11250
|
border: 1px solid var(--rs-color-border-base-primary);
|
|
11275
11251
|
border-radius: var(--rs-radius-2);
|
|
@@ -11347,7 +11323,7 @@ var formatLocation = (location) => {
|
|
|
11347
11323
|
}
|
|
11348
11324
|
return "Unknown location";
|
|
11349
11325
|
};
|
|
11350
|
-
|
|
11326
|
+
import_dayjs3.default.extend(import_relativeTime.default);
|
|
11351
11327
|
var getErrorMessage = (error) => {
|
|
11352
11328
|
if (error?.status === 500) {
|
|
11353
11329
|
return "Something went wrong";
|
|
@@ -11362,15 +11338,15 @@ var formatDeviceDisplay = (browser, operatingSystem) => {
|
|
|
11362
11338
|
var UserSessions = () => {
|
|
11363
11339
|
const { user } = useUser();
|
|
11364
11340
|
const queryClient = (0, import_react_query6.useQueryClient)();
|
|
11365
|
-
const transport = (0,
|
|
11341
|
+
const transport = (0, import_connect_query18.useTransport)();
|
|
11366
11342
|
const [isRevokeDialogOpen, setIsRevokeDialogOpen] = (0, import_react21.useState)(false);
|
|
11367
11343
|
const [selectedSession, setSelectedSession] = (0, import_react21.useState)(null);
|
|
11368
11344
|
const {
|
|
11369
11345
|
data: sessionsData,
|
|
11370
11346
|
isLoading,
|
|
11371
11347
|
error
|
|
11372
|
-
} = (0,
|
|
11373
|
-
|
|
11348
|
+
} = (0, import_connect_query18.useQuery)(
|
|
11349
|
+
import_frontier21.AdminServiceQueries.listUserSessions,
|
|
11374
11350
|
{ userId: user?.id || "" },
|
|
11375
11351
|
{
|
|
11376
11352
|
enabled: !!user?.id
|
|
@@ -11379,11 +11355,11 @@ var UserSessions = () => {
|
|
|
11379
11355
|
const {
|
|
11380
11356
|
mutate: revokeUserSession,
|
|
11381
11357
|
isPending: isRevokingSession
|
|
11382
|
-
} = (0,
|
|
11358
|
+
} = (0, import_connect_query18.useMutation)(import_frontier21.AdminServiceQueries.revokeUserSession, {
|
|
11383
11359
|
onSuccess: () => {
|
|
11384
11360
|
queryClient.invalidateQueries({
|
|
11385
|
-
queryKey: (0,
|
|
11386
|
-
schema:
|
|
11361
|
+
queryKey: (0, import_connect_query18.createConnectQueryKey)({
|
|
11362
|
+
schema: import_frontier21.AdminServiceQueries.listUserSessions,
|
|
11387
11363
|
transport,
|
|
11388
11364
|
input: { userId: user?.id || "" },
|
|
11389
11365
|
cardinality: "finite"
|
|
@@ -11421,7 +11397,7 @@ var UserSessions = () => {
|
|
|
11421
11397
|
const date = timestampToDate(updatedAt);
|
|
11422
11398
|
if (!date)
|
|
11423
11399
|
return "Unknown";
|
|
11424
|
-
return (0,
|
|
11400
|
+
return (0, import_dayjs3.default)(date).fromNow();
|
|
11425
11401
|
};
|
|
11426
11402
|
const renderSessionsHeader = () => /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_apsara50.Flex, { direction: "column", gap: 3, children: [
|
|
11427
11403
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_apsara50.Text, { size: "large", weight: "medium", children: "Sessions" }),
|
|
@@ -11478,8 +11454,8 @@ var UserSessions = () => {
|
|
|
11478
11454
|
] });
|
|
11479
11455
|
};
|
|
11480
11456
|
|
|
11481
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
11482
|
-
var digest40 = "
|
|
11457
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-dKv590YqCm4w/sdk/admin/views/users/details/security/security.module.css.js
|
|
11458
|
+
var digest40 = "af48236b23460b363ef7c230a5aa9856ce1d7be6ec9681a161b6454d62810937";
|
|
11483
11459
|
var css40 = `._container_4259p_1 {
|
|
11484
11460
|
width: 100%;
|
|
11485
11461
|
}
|
|
@@ -11535,8 +11511,8 @@ var UserDetailContent = ({ user, refetch, currentPath, onNavigate }) => {
|
|
|
11535
11511
|
};
|
|
11536
11512
|
var UserDetailsByUserId = ({ userId, currentPath, onNavigate }) => {
|
|
11537
11513
|
const t = useTerminology();
|
|
11538
|
-
const { data, isLoading, refetch } = (0,
|
|
11539
|
-
|
|
11514
|
+
const { data, isLoading, refetch } = (0, import_connect_query19.useQuery)(
|
|
11515
|
+
import_frontier22.FrontierServiceQueries.getUser,
|
|
11540
11516
|
{ id: userId },
|
|
11541
11517
|
{
|
|
11542
11518
|
enabled: !!userId,
|
|
@@ -11605,8 +11581,8 @@ var import_react25 = require("react");
|
|
|
11605
11581
|
var import_apsara53 = require("@raystack/apsara");
|
|
11606
11582
|
var import_icons2 = require("@raystack/apsara/icons");
|
|
11607
11583
|
|
|
11608
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
11609
|
-
var digest41 = "
|
|
11584
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-f7lelzGJ8aVJ/sdk/admin/views/organizations/list/list.module.css.js
|
|
11585
|
+
var digest41 = "a1b8f35566e978c90f4fd8213a9c391bba19d558d85c395d8c7148758f551140";
|
|
11610
11586
|
var css41 = `._navbar_1laab_1 {
|
|
11611
11587
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
11612
11588
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -11793,8 +11769,8 @@ var OrganizationsNavabar = ({
|
|
|
11793
11769
|
] });
|
|
11794
11770
|
};
|
|
11795
11771
|
|
|
11796
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
11797
|
-
var digest42 = "
|
|
11772
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-LRgsupK2KjQe/sdk/admin/views/organizations/list/list.module.css.js
|
|
11773
|
+
var digest42 = "60ce2347f2da6958afa8a814049882c2fc8517b1dd14021a2ae0aa12c1b6abd5";
|
|
11798
11774
|
var css42 = `._navbar_1laab_1 {
|
|
11799
11775
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
11800
11776
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -11897,10 +11873,9 @@ var list_module_css_default5 = { "navbar": "_navbar_1laab_1", "table": "_table_1
|
|
|
11897
11873
|
|
|
11898
11874
|
// admin/views/organizations/list/columns.tsx
|
|
11899
11875
|
var import_apsara54 = require("@raystack/apsara");
|
|
11900
|
-
var import_dayjs11 = __toESM(require("dayjs"));
|
|
11901
11876
|
|
|
11902
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
11903
|
-
var digest43 = "
|
|
11877
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-5zGKe6s4gMHd/sdk/admin/views/organizations/list/list.module.css.js
|
|
11878
|
+
var digest43 = "e2468e40440529d3a56daba7aba4372abb916283e3015487226d8f16c38c7a6b";
|
|
11904
11879
|
var css43 = `._navbar_1laab_1 {
|
|
11905
11880
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
11906
11881
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -12092,11 +12067,7 @@ var getColumns11 = ({
|
|
|
12092
12067
|
accessorKey: "subscriptionCycleEndAt",
|
|
12093
12068
|
header: "Cycle ends on",
|
|
12094
12069
|
filterType: "date",
|
|
12095
|
-
cell: ({ getValue }) => {
|
|
12096
|
-
const value = getValue();
|
|
12097
|
-
const date = isNullTimestamp(value) ? "-" : (0, import_dayjs11.default)(timestampToDate(value)).format("YYYY-MM-DD");
|
|
12098
|
-
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_apsara54.Text, { children: date });
|
|
12099
|
-
},
|
|
12070
|
+
cell: ({ getValue }) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_apsara54.Text, { children: formatTimestamp(getValue()) }),
|
|
12100
12071
|
enableColumnFilter: true,
|
|
12101
12072
|
// enableSorting: true,
|
|
12102
12073
|
enableHiding: true
|
|
@@ -12143,11 +12114,8 @@ var getColumns11 = ({
|
|
|
12143
12114
|
accessorKey: "createdAt",
|
|
12144
12115
|
header: "Created On",
|
|
12145
12116
|
filterType: "date",
|
|
12146
|
-
|
|
12147
|
-
|
|
12148
|
-
const date = isNullTimestamp(value) ? "-" : (0, import_dayjs11.default)(timestampToDate(value)).format("YYYY-MM-DD");
|
|
12149
|
-
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_apsara54.Text, { children: date });
|
|
12150
|
-
},
|
|
12117
|
+
enableColumnFilter: true,
|
|
12118
|
+
cell: ({ getValue }) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_apsara54.Text, { children: formatTimestamp(getValue()) }),
|
|
12151
12119
|
enableHiding: true,
|
|
12152
12120
|
defaultHidden: true,
|
|
12153
12121
|
enableSorting: true
|
|
@@ -12156,15 +12124,15 @@ var getColumns11 = ({
|
|
|
12156
12124
|
};
|
|
12157
12125
|
|
|
12158
12126
|
// admin/views/organizations/list/index.tsx
|
|
12159
|
-
var
|
|
12160
|
-
var
|
|
12127
|
+
var import_connect_query21 = require("@connectrpc/connect-query");
|
|
12128
|
+
var import_frontier24 = require("@raystack/proton/frontier");
|
|
12161
12129
|
var import_protobuf7 = require("@bufbuild/protobuf");
|
|
12162
12130
|
|
|
12163
12131
|
// admin/views/organizations/list/create.tsx
|
|
12164
12132
|
var import_react24 = require("react");
|
|
12165
12133
|
|
|
12166
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
12167
|
-
var digest44 = "
|
|
12134
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-60NwZBbqAoyv/sdk/admin/views/organizations/list/list.module.css.js
|
|
12135
|
+
var digest44 = "07c7121f6e8a7a35270b4b5a4289d52309af3617fc1a15af472a245b68503920";
|
|
12168
12136
|
var css44 = `._navbar_1laab_1 {
|
|
12169
12137
|
padding: var(--rs-space-4) var(--rs-space-7);
|
|
12170
12138
|
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
|
|
@@ -12274,8 +12242,8 @@ var import_react_image_crop = __toESM(require("react-image-crop"));
|
|
|
12274
12242
|
var import_apsara55 = require("@raystack/apsara");
|
|
12275
12243
|
var import_ReactCrop = require("react-image-crop/dist/ReactCrop.css");
|
|
12276
12244
|
|
|
12277
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
12278
|
-
var digest45 = "
|
|
12245
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-48R49LFDcTR1/sdk/client/components/image-upload/image-upload.module.css.js
|
|
12246
|
+
var digest45 = "e4f8c8a982ee3a35dffac73836428b81edb4810704d476842cd44e6cfcef265e";
|
|
12279
12247
|
var css45 = `._iconButton_1ifr2_1 {
|
|
12280
12248
|
position: relative;
|
|
12281
12249
|
width: var(--rs-space-14);
|
|
@@ -12578,9 +12546,9 @@ function ImageUpload({
|
|
|
12578
12546
|
var import_lodash2 = require("lodash");
|
|
12579
12547
|
var import_react_hook_form3 = require("react-hook-form");
|
|
12580
12548
|
var import_zod5 = require("@hookform/resolvers/zod");
|
|
12581
|
-
var
|
|
12549
|
+
var import_connect_query20 = require("@connectrpc/connect-query");
|
|
12582
12550
|
var import_connect3 = require("@connectrpc/connect");
|
|
12583
|
-
var
|
|
12551
|
+
var import_frontier23 = require("@raystack/proton/frontier");
|
|
12584
12552
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
12585
12553
|
var orgCreateSchema = external_exports.object({
|
|
12586
12554
|
avatar: external_exports.string().optional(),
|
|
@@ -12640,8 +12608,8 @@ function CreateOrganizationPanel({
|
|
|
12640
12608
|
},
|
|
12641
12609
|
[debouncedGenerateSlug, dirtyFields.name]
|
|
12642
12610
|
);
|
|
12643
|
-
const { mutateAsync: createOrganization, isPending } = (0,
|
|
12644
|
-
|
|
12611
|
+
const { mutateAsync: createOrganization, isPending } = (0, import_connect_query20.useMutation)(
|
|
12612
|
+
import_frontier23.AdminServiceQueries.adminCreateOrganization,
|
|
12645
12613
|
{
|
|
12646
12614
|
onError: (error) => {
|
|
12647
12615
|
if (error?.code === import_connect3.Code.AlreadyExists) {
|
|
@@ -12668,7 +12636,7 @@ function CreateOrganizationPanel({
|
|
|
12668
12636
|
const orgResp = await createOrganization({ body: payload });
|
|
12669
12637
|
const organization = orgResp.organization;
|
|
12670
12638
|
if (organization?.id) {
|
|
12671
|
-
onSuccess?.(organization.id);
|
|
12639
|
+
onSuccess?.(organization.name || organization.id, organization.id);
|
|
12672
12640
|
}
|
|
12673
12641
|
} catch (err) {
|
|
12674
12642
|
console.error("Unable to create new org:", err);
|
|
@@ -12885,8 +12853,8 @@ var OrganizationListView = ({
|
|
|
12885
12853
|
fetchNextPage,
|
|
12886
12854
|
error,
|
|
12887
12855
|
isError
|
|
12888
|
-
} = (0,
|
|
12889
|
-
|
|
12856
|
+
} = (0, import_connect_query21.useInfiniteQuery)(
|
|
12857
|
+
import_frontier24.AdminServiceQueries.searchOrganizations,
|
|
12890
12858
|
{ query },
|
|
12891
12859
|
{
|
|
12892
12860
|
pageParamKey: "query",
|
|
@@ -12897,9 +12865,9 @@ var OrganizationListView = ({
|
|
|
12897
12865
|
retryDelay: 1e3
|
|
12898
12866
|
}
|
|
12899
12867
|
);
|
|
12900
|
-
const { data: plans = [], isLoading: isPlansLoading, error: plansError } = (0,
|
|
12901
|
-
|
|
12902
|
-
(0, import_protobuf7.create)(
|
|
12868
|
+
const { data: plans = [], isLoading: isPlansLoading, error: plansError } = (0, import_connect_query21.useQuery)(
|
|
12869
|
+
import_frontier24.FrontierServiceQueries.listPlans,
|
|
12870
|
+
(0, import_protobuf7.create)(import_frontier24.ListPlansRequestSchema, {}),
|
|
12903
12871
|
{
|
|
12904
12872
|
select: (data2) => data2?.plans || []
|
|
12905
12873
|
}
|
|
@@ -12949,7 +12917,7 @@ var OrganizationListView = ({
|
|
|
12949
12917
|
const tableClassName = data.length || loading ? list_module_css_default5["table"] : list_module_css_default5["table-empty"];
|
|
12950
12918
|
function onRowClick(row) {
|
|
12951
12919
|
if (row.id && onNavigateToOrg)
|
|
12952
|
-
onNavigateToOrg(row.id);
|
|
12920
|
+
onNavigateToOrg(row.name || row.id, row.id);
|
|
12953
12921
|
}
|
|
12954
12922
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
|
|
12955
12923
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
@@ -12960,9 +12928,9 @@ var OrganizationListView = ({
|
|
|
12960
12928
|
organizationTypes,
|
|
12961
12929
|
appUrl,
|
|
12962
12930
|
countries,
|
|
12963
|
-
onSuccess: (
|
|
12931
|
+
onSuccess: (slug, orgId) => {
|
|
12964
12932
|
closeCreateOrgPanel();
|
|
12965
|
-
onNavigateToOrg?.(
|
|
12933
|
+
onNavigateToOrg?.(slug, orgId);
|
|
12966
12934
|
}
|
|
12967
12935
|
}
|
|
12968
12936
|
),
|
|
@@ -13010,7 +12978,7 @@ var OrganizationListView = ({
|
|
|
13010
12978
|
|
|
13011
12979
|
// admin/views/organizations/details/index.tsx
|
|
13012
12980
|
var import_react39 = require("react");
|
|
13013
|
-
var
|
|
12981
|
+
var import_connect_query30 = require("@connectrpc/connect-query");
|
|
13014
12982
|
var import_react_query11 = require("@tanstack/react-query");
|
|
13015
12983
|
var import_protobuf17 = require("@bufbuild/protobuf");
|
|
13016
12984
|
|
|
@@ -13018,8 +12986,8 @@ var import_protobuf17 = require("@bufbuild/protobuf");
|
|
|
13018
12986
|
var import_icons4 = require("@raystack/apsara/icons");
|
|
13019
12987
|
var import_apsara60 = require("@raystack/apsara");
|
|
13020
12988
|
|
|
13021
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
13022
|
-
var digest46 = "
|
|
12989
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-GjA6vNMsWZSO/sdk/admin/views/organizations/details/layout/layout.module.css.js
|
|
12990
|
+
var digest46 = "2336637f93aeeb2134e7dc8165caec0ab9c1af88844af18f62d422344574ad39";
|
|
13023
12991
|
var css46 = `._page_1jsqa_1 {
|
|
13024
12992
|
width: 100%;
|
|
13025
12993
|
height: 100vh;
|
|
@@ -13116,8 +13084,8 @@ var layout_module_css_default2 = { "page": "_page_1jsqa_1", "main_content": "_ma
|
|
|
13116
13084
|
var import_apsara58 = require("@raystack/apsara");
|
|
13117
13085
|
var import_react27 = require("react");
|
|
13118
13086
|
|
|
13119
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
13120
|
-
var digest47 = "
|
|
13087
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-CiVX1q8y206N/sdk/admin/views/organizations/details/layout/layout.module.css.js
|
|
13088
|
+
var digest47 = "effafb779a045d64f1c25ec8c8e50b661aa6ea7fb5bc24104d48b24ae6650234";
|
|
13121
13089
|
var css47 = `._page_1jsqa_1 {
|
|
13122
13090
|
width: 100%;
|
|
13123
13091
|
height: 100vh;
|
|
@@ -13211,12 +13179,12 @@ var css47 = `._page_1jsqa_1 {
|
|
|
13211
13179
|
var layout_module_css_default3 = { "page": "_page_1jsqa_1", "main_content": "_main_content_1jsqa_7", "mainContent": "_main_content_1jsqa_7", "main_content_with_sidepanel": "_main_content_with_sidepanel_1jsqa_12", "mainContentWithSidepanel": "_main_content_with_sidepanel_1jsqa_12", "navbar": "_navbar_1jsqa_17", "navbar-action-menu-content": "_navbar-action-menu-content_1jsqa_27", "navbarActionMenuContent": "_navbar-action-menu-content_1jsqa_27", "navbar-action-menu-item": "_navbar-action-menu-item_1jsqa_31", "navbarActionMenuItem": "_navbar-action-menu-item_1jsqa_31", "side-panel-section-item-label": "_side-panel-section-item-label_1jsqa_36", "sidePanelSectionItemLabel": "_side-panel-section-item-label_1jsqa_36", "invite-users-dialog-body": "_invite-users-dialog-body_1jsqa_40", "inviteUsersDialogBody": "_invite-users-dialog-body_1jsqa_40", "invite-users-dialog-label": "_invite-users-dialog-label_1jsqa_47", "inviteUsersDialogLabel": "_invite-users-dialog-label_1jsqa_47", "invite-users-dialog-roles-content": "_invite-users-dialog-roles-content_1jsqa_51", "inviteUsersDialogRolesContent": "_invite-users-dialog-roles-content_1jsqa_51", "form-error-message": "_form-error-message_1jsqa_56", "formErrorMessage": "_form-error-message_1jsqa_56", "invite-users-emails-textarea": "_invite-users-emails-textarea_1jsqa_60", "inviteUsersEmailsTextarea": "_invite-users-emails-textarea_1jsqa_60", "add-token-dialog-tokens-field": "_add-token-dialog-tokens-field_1jsqa_66", "addTokenDialogTokensField": "_add-token-dialog-tokens-field_1jsqa_66", "nav-chip": "_nav-chip_1jsqa_77", "navChip": "_nav-chip_1jsqa_77" };
|
|
13212
13180
|
|
|
13213
13181
|
// admin/views/organizations/details/contexts/organization-context.tsx
|
|
13214
|
-
var
|
|
13182
|
+
var import_frontier25 = require("@raystack/proton/frontier");
|
|
13215
13183
|
var import_protobuf8 = require("@bufbuild/protobuf");
|
|
13216
13184
|
var import_react26 = require("react");
|
|
13217
13185
|
var defaultOrganiztionContextValue = {
|
|
13218
13186
|
roles: [],
|
|
13219
|
-
organization: (0, import_protobuf8.create)(
|
|
13187
|
+
organization: (0, import_protobuf8.create)(import_frontier25.OrganizationSchema),
|
|
13220
13188
|
updateOrganization: async () => {
|
|
13221
13189
|
},
|
|
13222
13190
|
isBillingAccountLoading: false,
|
|
@@ -13261,9 +13229,9 @@ var PROJECT_NAMESPACE = "app/project";
|
|
|
13261
13229
|
var DEFAULT_INVITE_ROLE = "app_organization_viewer";
|
|
13262
13230
|
|
|
13263
13231
|
// admin/views/organizations/details/layout/invite-users-dialog.tsx
|
|
13264
|
-
var
|
|
13232
|
+
var import_connect_query22 = require("@connectrpc/connect-query");
|
|
13265
13233
|
var import_react_query7 = require("@tanstack/react-query");
|
|
13266
|
-
var
|
|
13234
|
+
var import_frontier26 = require("@raystack/proton/frontier");
|
|
13267
13235
|
var import_protobuf9 = require("@bufbuild/protobuf");
|
|
13268
13236
|
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
13269
13237
|
var inviteSchema = objectType({
|
|
@@ -13278,7 +13246,7 @@ var InviteUsersDialog = ({ onOpenChange }) => {
|
|
|
13278
13246
|
const t = useTerminology();
|
|
13279
13247
|
const { roles = [], organization } = (0, import_react27.useContext)(OrganizationContext);
|
|
13280
13248
|
const queryClient = (0, import_react_query7.useQueryClient)();
|
|
13281
|
-
const transport = (0,
|
|
13249
|
+
const transport = (0, import_connect_query22.useTransport)();
|
|
13282
13250
|
const organizationId = organization?.id || "";
|
|
13283
13251
|
const defaultRoleId = (0, import_react27.useMemo)(
|
|
13284
13252
|
() => roles?.find((role) => role.name === DEFAULT_INVITE_ROLE)?.id,
|
|
@@ -13290,13 +13258,13 @@ var InviteUsersDialog = ({ onOpenChange }) => {
|
|
|
13290
13258
|
role: defaultRoleId
|
|
13291
13259
|
}
|
|
13292
13260
|
});
|
|
13293
|
-
const { mutateAsync: createInvitation } = (0,
|
|
13294
|
-
|
|
13261
|
+
const { mutateAsync: createInvitation } = (0, import_connect_query22.useMutation)(
|
|
13262
|
+
import_frontier26.FrontierServiceQueries.createOrganizationInvitation,
|
|
13295
13263
|
{
|
|
13296
13264
|
onSuccess: (data) => {
|
|
13297
13265
|
queryClient.invalidateQueries({
|
|
13298
|
-
queryKey: (0,
|
|
13299
|
-
schema:
|
|
13266
|
+
queryKey: (0, import_connect_query22.createConnectQueryKey)({
|
|
13267
|
+
schema: import_frontier26.FrontierServiceQueries.listOrganizationInvitations,
|
|
13300
13268
|
transport,
|
|
13301
13269
|
input: { orgId: organizationId },
|
|
13302
13270
|
cardinality: "finite"
|
|
@@ -13316,7 +13284,7 @@ var InviteUsersDialog = ({ onOpenChange }) => {
|
|
|
13316
13284
|
return;
|
|
13317
13285
|
try {
|
|
13318
13286
|
await createInvitation(
|
|
13319
|
-
(0, import_protobuf9.create)(
|
|
13287
|
+
(0, import_protobuf9.create)(import_frontier26.CreateOrganizationInvitationRequestSchema, {
|
|
13320
13288
|
orgId: organizationId,
|
|
13321
13289
|
userIds: data.emails,
|
|
13322
13290
|
roleIds: data.role ? [data.role] : []
|
|
@@ -13411,8 +13379,8 @@ var import_apsara59 = require("@raystack/apsara");
|
|
|
13411
13379
|
var import_react28 = require("react");
|
|
13412
13380
|
var import_react_hook_form5 = require("react-hook-form");
|
|
13413
13381
|
|
|
13414
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
13415
|
-
var digest48 = "
|
|
13382
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-qIj12PbBaC6b/sdk/admin/views/organizations/details/layout/layout.module.css.js
|
|
13383
|
+
var digest48 = "3052b59ebbbe8ae15f126ce6130422258c7562e3c4d83a0230d623b5765005bb";
|
|
13416
13384
|
var css48 = `._page_1jsqa_1 {
|
|
13417
13385
|
width: 100%;
|
|
13418
13386
|
height: 100vh;
|
|
@@ -13507,9 +13475,9 @@ var layout_module_css_default4 = { "page": "_page_1jsqa_1", "main_content": "_ma
|
|
|
13507
13475
|
|
|
13508
13476
|
// admin/views/organizations/details/layout/add-tokens-dialog.tsx
|
|
13509
13477
|
var import_zod7 = require("@hookform/resolvers/zod");
|
|
13510
|
-
var
|
|
13478
|
+
var import_connect_query23 = require("@connectrpc/connect-query");
|
|
13511
13479
|
var import_react_query8 = require("@tanstack/react-query");
|
|
13512
|
-
var
|
|
13480
|
+
var import_frontier27 = require("@raystack/proton/frontier");
|
|
13513
13481
|
var import_protobuf10 = require("@bufbuild/protobuf");
|
|
13514
13482
|
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
13515
13483
|
var addTokensSchema = objectType({
|
|
@@ -13522,7 +13490,7 @@ var addTokensSchema = objectType({
|
|
|
13522
13490
|
var AddTokensDialog = ({ onOpenChange }) => {
|
|
13523
13491
|
const { organization, billingAccount, fetchTokenBalance, tokenProductId } = (0, import_react28.useContext)(OrganizationContext);
|
|
13524
13492
|
const queryClient = (0, import_react_query8.useQueryClient)();
|
|
13525
|
-
const transport = (0,
|
|
13493
|
+
const transport = (0, import_connect_query23.useTransport)();
|
|
13526
13494
|
const organisationId = organization?.id || "";
|
|
13527
13495
|
const billingAccountId = billingAccount?.id || "";
|
|
13528
13496
|
const methods = (0, import_react_hook_form5.useForm)({
|
|
@@ -13532,13 +13500,13 @@ var AddTokensDialog = ({ onOpenChange }) => {
|
|
|
13532
13500
|
product: tokenProductId || defaultConfig.token_product_id || "token"
|
|
13533
13501
|
}
|
|
13534
13502
|
});
|
|
13535
|
-
const { mutateAsync: delegatedCheckout } = (0,
|
|
13536
|
-
|
|
13503
|
+
const { mutateAsync: delegatedCheckout } = (0, import_connect_query23.useMutation)(
|
|
13504
|
+
import_frontier27.AdminServiceQueries.delegatedCheckout,
|
|
13537
13505
|
{
|
|
13538
13506
|
onSuccess: () => {
|
|
13539
13507
|
queryClient.invalidateQueries({
|
|
13540
|
-
queryKey: (0,
|
|
13541
|
-
schema:
|
|
13508
|
+
queryKey: (0, import_connect_query23.createConnectQueryKey)({
|
|
13509
|
+
schema: import_frontier27.FrontierServiceQueries.searchOrganizationTokens,
|
|
13542
13510
|
transport,
|
|
13543
13511
|
input: { id: organisationId },
|
|
13544
13512
|
cardinality: "infinite"
|
|
@@ -13562,10 +13530,10 @@ var AddTokensDialog = ({ onOpenChange }) => {
|
|
|
13562
13530
|
if (!organisationId)
|
|
13563
13531
|
return;
|
|
13564
13532
|
await delegatedCheckout(
|
|
13565
|
-
(0, import_protobuf10.create)(
|
|
13533
|
+
(0, import_protobuf10.create)(import_frontier27.DelegatedCheckoutRequestSchema, {
|
|
13566
13534
|
orgId: organisationId,
|
|
13567
13535
|
billingId: billingAccountId,
|
|
13568
|
-
productBody: (0, import_protobuf10.create)(
|
|
13536
|
+
productBody: (0, import_protobuf10.create)(import_frontier27.CheckoutProductBodySchema, {
|
|
13569
13537
|
product: product_body.product,
|
|
13570
13538
|
quantity: BigInt(product_body.quantity)
|
|
13571
13539
|
})
|
|
@@ -13793,7 +13761,10 @@ var NavLinks = ({
|
|
|
13793
13761
|
}) => {
|
|
13794
13762
|
const t = useTerminology();
|
|
13795
13763
|
const paths = useAdminPaths();
|
|
13796
|
-
const
|
|
13764
|
+
const orgPrefix = `/${paths.organizations}/`;
|
|
13765
|
+
const path = currentPath.split(/[?#]/)[0];
|
|
13766
|
+
const orgSegment = path.startsWith(orgPrefix) ? path.slice(orgPrefix.length).split("/")[0] : organizationId;
|
|
13767
|
+
const basePath = `/${paths.organizations}/${orgSegment}`;
|
|
13797
13768
|
const links = [
|
|
13798
13769
|
{ name: t.member({ plural: true, case: "capital" }), path: `${basePath}/${paths.members}` },
|
|
13799
13770
|
{ name: t.project({ plural: true, case: "capital" }), path: `${basePath}/${paths.projects}` },
|
|
@@ -13803,8 +13774,8 @@ var NavLinks = ({
|
|
|
13803
13774
|
{ name: "PAT", path: `${basePath}/pat` },
|
|
13804
13775
|
{ name: "Security", path: `${basePath}/security` }
|
|
13805
13776
|
];
|
|
13806
|
-
function checkActive(
|
|
13807
|
-
return currentPath.startsWith(
|
|
13777
|
+
function checkActive(path2) {
|
|
13778
|
+
return currentPath.startsWith(path2);
|
|
13808
13779
|
}
|
|
13809
13780
|
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_apsara60.Flex, { gap: 3, children: links.map((link, i) => {
|
|
13810
13781
|
const isActive = checkActive(link.path);
|
|
@@ -13848,6 +13819,10 @@ var OrganizationsDetailsNavabar = ({
|
|
|
13848
13819
|
import_apsara60.Breadcrumb.Item,
|
|
13849
13820
|
{
|
|
13850
13821
|
href: `/${adminPaths.organizations}`,
|
|
13822
|
+
onClick: (e) => {
|
|
13823
|
+
e.preventDefault();
|
|
13824
|
+
onNavigate(`/${adminPaths.organizations}`);
|
|
13825
|
+
},
|
|
13851
13826
|
leadingIcon: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_icons4.OrganizationIcon, {}),
|
|
13852
13827
|
children: t.organization({ plural: true, case: "capital" })
|
|
13853
13828
|
}
|
|
@@ -13856,7 +13831,14 @@ var OrganizationsDetailsNavabar = ({
|
|
|
13856
13831
|
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
13857
13832
|
import_apsara60.Breadcrumb.Item,
|
|
13858
13833
|
{
|
|
13859
|
-
href: `/${adminPaths.organizations}/${organization
|
|
13834
|
+
href: `/${adminPaths.organizations}/${organization.name || organization.id}`,
|
|
13835
|
+
onClick: (e) => {
|
|
13836
|
+
e.preventDefault();
|
|
13837
|
+
onNavigate(
|
|
13838
|
+
`/${adminPaths.organizations}/${organization.name || organization.id}`,
|
|
13839
|
+
{ orgId: organization.id }
|
|
13840
|
+
);
|
|
13841
|
+
},
|
|
13860
13842
|
leadingIcon: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
13861
13843
|
import_apsara60.Avatar,
|
|
13862
13844
|
{
|
|
@@ -13918,8 +13900,8 @@ var OrganizationsDetailsNavabar = ({
|
|
|
13918
13900
|
] });
|
|
13919
13901
|
};
|
|
13920
13902
|
|
|
13921
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
13922
|
-
var digest49 = "
|
|
13903
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-5tYkzutAVkEZ/sdk/admin/views/organizations/details/layout/layout.module.css.js
|
|
13904
|
+
var digest49 = "29347f64b89452b9351bf8707f397e33e42a4f7271e6d6dbe2ceccd5181a2d45";
|
|
13923
13905
|
var css49 = `._page_1jsqa_1 {
|
|
13924
13906
|
width: 100%;
|
|
13925
13907
|
height: 100vh;
|
|
@@ -14021,8 +14003,8 @@ var import_apsara66 = require("@raystack/apsara");
|
|
|
14021
14003
|
// admin/views/organizations/details/side-panel/org-details-section.tsx
|
|
14022
14004
|
var import_apsara61 = require("@raystack/apsara");
|
|
14023
14005
|
|
|
14024
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
14025
|
-
var digest50 = "
|
|
14006
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-BBwaCXV8zf6x/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
|
|
14007
|
+
var digest50 = "6025afe95681f0a0c6f186954b055a7d485e8d31d9658bbf697bf60472e7195f";
|
|
14026
14008
|
var css50 = `._side-panel-section-item-label_slrfc_1 {
|
|
14027
14009
|
width: 120px;
|
|
14028
14010
|
}
|
|
@@ -14086,7 +14068,6 @@ var css50 = `._side-panel-section-item-label_slrfc_1 {
|
|
|
14086
14068
|
var side_panel_module_css_default5 = { "side-panel-section-item-label": "_side-panel-section-item-label_slrfc_1", "sidePanelSectionItemLabel": "_side-panel-section-item-label_slrfc_1", "org-details-section-org-id": "_org-details-section-org-id_slrfc_5", "orgDetailsSectionOrgId": "_org-details-section-org-id_slrfc_5", "kyc_link": "_kyc_link_slrfc_6", "kycLink": "_kyc_link_slrfc_6", "kyc-status-icon": "_kyc-status-icon_slrfc_13", "kycStatusIcon": "_kyc-status-icon_slrfc_13", "billing-header": "_billing-header_slrfc_18", "billingHeader": "_billing-header_slrfc_18", "billing-edit": "_billing-edit_slrfc_25", "billingEdit": "_billing-edit_slrfc_25", "billing-section": "_billing-section_slrfc_30", "billingSection": "_billing-section_slrfc_30", "billing-edit-disabled": "_billing-edit-disabled_slrfc_38", "billingEditDisabled": "_billing-edit-disabled_slrfc_38" };
|
|
14087
14069
|
|
|
14088
14070
|
// admin/views/organizations/details/side-panel/org-details-section.tsx
|
|
14089
|
-
var import_dayjs12 = __toESM(require("dayjs"));
|
|
14090
14071
|
var import_react30 = require("react");
|
|
14091
14072
|
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
14092
14073
|
var OrganizationDetailsSection = ({
|
|
@@ -14124,9 +14105,7 @@ var OrganizationDetailsSection = ({
|
|
|
14124
14105
|
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_apsara61.List.Label, { className: side_panel_module_css_default5["side-panel-section-item-label"], children: "Created on" }),
|
|
14125
14106
|
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_apsara61.List.Value, { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_apsara61.Flex, { gap: 3, children: [
|
|
14126
14107
|
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(CalendarIcon, {}),
|
|
14127
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_apsara61.Text, { children: (
|
|
14128
|
-
"DD MMM YYYY"
|
|
14129
|
-
) })
|
|
14108
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_apsara61.Text, { children: formatTimestamp(organization.createdAt) })
|
|
14130
14109
|
] }) })
|
|
14131
14110
|
] }),
|
|
14132
14111
|
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_apsara61.List.Item, { children: [
|
|
@@ -14152,8 +14131,8 @@ var OrganizationDetailsSection = ({
|
|
|
14152
14131
|
var import_apsara62 = require("@raystack/apsara");
|
|
14153
14132
|
var import_react31 = require("react");
|
|
14154
14133
|
|
|
14155
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
14156
|
-
var digest51 = "
|
|
14134
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-2grjnQGxeDF1/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
|
|
14135
|
+
var digest51 = "e53870f410b83f9d278793c8e47bdb61fc82b45d7febf3ef6cbaa273c68da26a";
|
|
14157
14136
|
var css51 = `._side-panel-section-item-label_slrfc_1 {
|
|
14158
14137
|
width: 120px;
|
|
14159
14138
|
}
|
|
@@ -14276,8 +14255,8 @@ var KYCDetailsSection = () => {
|
|
|
14276
14255
|
var import_react32 = require("react");
|
|
14277
14256
|
var import_apsara63 = require("@raystack/apsara");
|
|
14278
14257
|
|
|
14279
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
14280
|
-
var digest52 = "
|
|
14258
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-2vnyKrK8qMcw/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
|
|
14259
|
+
var digest52 = "29634080b29fee8c2f24ee149b3996d41049a43128a94206c4cfe66dca245bd7";
|
|
14281
14260
|
var css52 = `._side-panel-section-item-label_slrfc_1 {
|
|
14282
14261
|
width: 120px;
|
|
14283
14262
|
}
|
|
@@ -14341,17 +14320,17 @@ var css52 = `._side-panel-section-item-label_slrfc_1 {
|
|
|
14341
14320
|
var side_panel_module_css_default7 = { "side-panel-section-item-label": "_side-panel-section-item-label_slrfc_1", "sidePanelSectionItemLabel": "_side-panel-section-item-label_slrfc_1", "org-details-section-org-id": "_org-details-section-org-id_slrfc_5", "orgDetailsSectionOrgId": "_org-details-section-org-id_slrfc_5", "kyc_link": "_kyc_link_slrfc_6", "kycLink": "_kyc_link_slrfc_6", "kyc-status-icon": "_kyc-status-icon_slrfc_13", "kycStatusIcon": "_kyc-status-icon_slrfc_13", "billing-header": "_billing-header_slrfc_18", "billingHeader": "_billing-header_slrfc_18", "billing-edit": "_billing-edit_slrfc_25", "billingEdit": "_billing-edit_slrfc_25", "billing-section": "_billing-section_slrfc_30", "billingSection": "_billing-section_slrfc_30", "billing-edit-disabled": "_billing-edit-disabled_slrfc_38", "billingEditDisabled": "_billing-edit-disabled_slrfc_38" };
|
|
14342
14321
|
|
|
14343
14322
|
// admin/views/organizations/details/side-panel/plan-details-section.tsx
|
|
14344
|
-
var
|
|
14345
|
-
var
|
|
14323
|
+
var import_connect_query24 = require("@connectrpc/connect-query");
|
|
14324
|
+
var import_frontier28 = require("@raystack/proton/frontier");
|
|
14346
14325
|
var import_protobuf11 = require("@bufbuild/protobuf");
|
|
14347
14326
|
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
14348
14327
|
var PlanDetailsSection = () => {
|
|
14349
14328
|
const { billingAccount, organization } = (0, import_react32.useContext)(OrganizationContext);
|
|
14350
14329
|
const billingAccountId = billingAccount?.id || "";
|
|
14351
14330
|
const organizationId = organization?.id || "";
|
|
14352
|
-
const { data: activeSubscription, isLoading: isSubscriptionLoading, error: subscriptionsError } = (0,
|
|
14353
|
-
|
|
14354
|
-
(0, import_protobuf11.create)(
|
|
14331
|
+
const { data: activeSubscription, isLoading: isSubscriptionLoading, error: subscriptionsError } = (0, import_connect_query24.useQuery)(
|
|
14332
|
+
import_frontier28.FrontierServiceQueries.listSubscriptions,
|
|
14333
|
+
(0, import_protobuf11.create)(import_frontier28.ListSubscriptionsRequestSchema, {
|
|
14355
14334
|
orgId: organizationId
|
|
14356
14335
|
}),
|
|
14357
14336
|
{
|
|
@@ -14367,9 +14346,9 @@ var PlanDetailsSection = () => {
|
|
|
14367
14346
|
if (subscriptionsError) {
|
|
14368
14347
|
console.error("Error fetching subscriptions:", subscriptionsError);
|
|
14369
14348
|
}
|
|
14370
|
-
const { data: planData, isLoading: isPlanLoading, error: planError } = (0,
|
|
14371
|
-
|
|
14372
|
-
(0, import_protobuf11.create)(
|
|
14349
|
+
const { data: planData, isLoading: isPlanLoading, error: planError } = (0, import_connect_query24.useQuery)(
|
|
14350
|
+
import_frontier28.FrontierServiceQueries.getPlan,
|
|
14351
|
+
(0, import_protobuf11.create)(import_frontier28.GetPlanRequestSchema, {
|
|
14373
14352
|
id: activeSubscription?.planId ?? ""
|
|
14374
14353
|
}),
|
|
14375
14354
|
{
|
|
@@ -14388,20 +14367,16 @@ var PlanDetailsSection = () => {
|
|
|
14388
14367
|
] }),
|
|
14389
14368
|
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_apsara63.List.Item, { children: [
|
|
14390
14369
|
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_apsara63.List.Label, { className: side_panel_module_css_default7["side-panel-section-item-label"], children: "Started from" }),
|
|
14391
|
-
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_apsara63.List.Value, { children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Skeleton, {}) :
|
|
14370
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_apsara63.List.Value, { children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Skeleton, {}) : !isNullTimestamp(activeSubscription?.currentPeriodStartAt) ? /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_apsara63.Flex, { gap: 3, children: [
|
|
14392
14371
|
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(CalendarIcon, {}),
|
|
14393
|
-
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_apsara63.Text, { children:
|
|
14394
|
-
"DD MMM YYYY"
|
|
14395
|
-
) })
|
|
14372
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_apsara63.Text, { children: formatTimestamp(activeSubscription?.currentPeriodStartAt) })
|
|
14396
14373
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_apsara63.Text, { children: "-" }) })
|
|
14397
14374
|
] }),
|
|
14398
14375
|
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_apsara63.List.Item, { children: [
|
|
14399
14376
|
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_apsara63.List.Label, { className: side_panel_module_css_default7["side-panel-section-item-label"], children: "Ends on" }),
|
|
14400
|
-
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_apsara63.List.Value, { children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Skeleton, {}) :
|
|
14377
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_apsara63.List.Value, { children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Skeleton, {}) : !isNullTimestamp(activeSubscription?.currentPeriodEndAt) ? /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_apsara63.Flex, { gap: 3, children: [
|
|
14401
14378
|
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(CalendarIcon, {}),
|
|
14402
|
-
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_apsara63.Text, { children:
|
|
14403
|
-
"DD MMM YYYY"
|
|
14404
|
-
) })
|
|
14379
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_apsara63.Text, { children: formatTimestamp(activeSubscription?.currentPeriodEndAt) })
|
|
14405
14380
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_apsara63.Text, { children: "-" }) })
|
|
14406
14381
|
] })
|
|
14407
14382
|
] });
|
|
@@ -14411,8 +14386,8 @@ var PlanDetailsSection = () => {
|
|
|
14411
14386
|
var import_apsara64 = require("@raystack/apsara");
|
|
14412
14387
|
var import_icons6 = require("@raystack/apsara/icons");
|
|
14413
14388
|
|
|
14414
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
14415
|
-
var digest53 = "
|
|
14389
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-3BPrxn8oZn85/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
|
|
14390
|
+
var digest53 = "30dae16e487afb0555449d55b231224e778ef1a7bad55115d183ed0ea50e64a8";
|
|
14416
14391
|
var css53 = `._side-panel-section-item-label_slrfc_1 {
|
|
14417
14392
|
width: 120px;
|
|
14418
14393
|
}
|
|
@@ -14477,8 +14452,8 @@ var side_panel_module_css_default8 = { "side-panel-section-item-label": "_side-p
|
|
|
14477
14452
|
|
|
14478
14453
|
// admin/views/organizations/details/side-panel/tokens-details-section.tsx
|
|
14479
14454
|
var import_react33 = require("react");
|
|
14480
|
-
var
|
|
14481
|
-
var
|
|
14455
|
+
var import_connect_query25 = require("@connectrpc/connect-query");
|
|
14456
|
+
var import_frontier29 = require("@raystack/proton/frontier");
|
|
14482
14457
|
var import_protobuf12 = require("@bufbuild/protobuf");
|
|
14483
14458
|
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
14484
14459
|
var TokensDetailsSection = () => {
|
|
@@ -14491,9 +14466,9 @@ var TokensDetailsSection = () => {
|
|
|
14491
14466
|
} = (0, import_react33.useContext)(OrganizationContext);
|
|
14492
14467
|
const organizationId = organization?.id || "";
|
|
14493
14468
|
const billingAccountId = billingAccount?.id || "";
|
|
14494
|
-
const { data: tokensUsed = "0", isLoading: isTokensLoading, error } = (0,
|
|
14495
|
-
|
|
14496
|
-
(0, import_protobuf12.create)(
|
|
14469
|
+
const { data: tokensUsed = "0", isLoading: isTokensLoading, error } = (0, import_connect_query25.useQuery)(
|
|
14470
|
+
import_frontier29.FrontierServiceQueries.totalDebitedTransactions,
|
|
14471
|
+
(0, import_protobuf12.create)(import_frontier29.TotalDebitedTransactionsRequestSchema, {
|
|
14497
14472
|
orgId: organizationId,
|
|
14498
14473
|
billingId: billingAccountId
|
|
14499
14474
|
}),
|
|
@@ -14545,8 +14520,8 @@ var TokensDetailsSection = () => {
|
|
|
14545
14520
|
// admin/views/organizations/details/side-panel/billing-details-section.tsx
|
|
14546
14521
|
var import_apsara65 = require("@raystack/apsara");
|
|
14547
14522
|
|
|
14548
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
14549
|
-
var digest54 = "
|
|
14523
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-bMVXWdgwA7ae/sdk/admin/views/organizations/details/side-panel/side-panel.module.css.js
|
|
14524
|
+
var digest54 = "3cfb55cf44019ea2174affd1acbcb5107911e880c850536b595a7e3ccbbc05ba";
|
|
14550
14525
|
var css54 = `._side-panel-section-item-label_slrfc_1 {
|
|
14551
14526
|
width: 120px;
|
|
14552
14527
|
}
|
|
@@ -14611,17 +14586,17 @@ var side_panel_module_css_default9 = { "side-panel-section-item-label": "_side-p
|
|
|
14611
14586
|
|
|
14612
14587
|
// admin/views/organizations/details/side-panel/billing-details-section.tsx
|
|
14613
14588
|
var import_react34 = require("react");
|
|
14614
|
-
var
|
|
14615
|
-
var
|
|
14589
|
+
var import_connect_query26 = require("@connectrpc/connect-query");
|
|
14590
|
+
var import_frontier30 = require("@raystack/proton/frontier");
|
|
14616
14591
|
var import_protobuf13 = require("@bufbuild/protobuf");
|
|
14617
14592
|
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
14618
14593
|
var BillingDetailsSection = () => {
|
|
14619
14594
|
const { billingAccount, organization } = (0, import_react34.useContext)(OrganizationContext);
|
|
14620
14595
|
const organizationId = organization?.id || "";
|
|
14621
14596
|
const billingAccountId = billingAccount?.id || "";
|
|
14622
|
-
const { data: upcomingInvoice, isLoading, error } = (0,
|
|
14623
|
-
|
|
14624
|
-
(0, import_protobuf13.create)(
|
|
14597
|
+
const { data: upcomingInvoice, isLoading, error } = (0, import_connect_query26.useQuery)(
|
|
14598
|
+
import_frontier30.FrontierServiceQueries.getUpcomingInvoice,
|
|
14599
|
+
(0, import_protobuf13.create)(import_frontier30.GetUpcomingInvoiceRequestSchema, {
|
|
14625
14600
|
orgId: organizationId,
|
|
14626
14601
|
billingId: billingAccountId
|
|
14627
14602
|
}),
|
|
@@ -14637,7 +14612,7 @@ var BillingDetailsSection = () => {
|
|
|
14637
14612
|
}, [error]);
|
|
14638
14613
|
const due_date = upcomingInvoice?.dueDate || upcomingInvoice?.periodEndAt;
|
|
14639
14614
|
const stripeLink = billingAccount?.providerId ? "https://dashboard.stripe.com/customers/" + billingAccount?.providerId : "";
|
|
14640
|
-
const { mutateAsync: createCheckout, isPending: isPortalLoading } = (0,
|
|
14615
|
+
const { mutateAsync: createCheckout, isPending: isPortalLoading } = (0, import_connect_query26.useMutation)(import_frontier30.FrontierServiceQueries.createCheckout, {
|
|
14641
14616
|
onError: (error2) => {
|
|
14642
14617
|
import_apsara65.toastManager.add({
|
|
14643
14618
|
title: "Something went wrong",
|
|
@@ -14654,7 +14629,7 @@ var BillingDetailsSection = () => {
|
|
|
14654
14629
|
const returnUrl = window.location.href;
|
|
14655
14630
|
try {
|
|
14656
14631
|
const resp = await createCheckout(
|
|
14657
|
-
(0, import_protobuf13.create)(
|
|
14632
|
+
(0, import_protobuf13.create)(import_frontier30.CreateCheckoutRequestSchema, {
|
|
14658
14633
|
orgId: organizationId,
|
|
14659
14634
|
cancelUrl: returnUrl,
|
|
14660
14635
|
successUrl: returnUrl,
|
|
@@ -14719,9 +14694,9 @@ var BillingDetailsSection = () => {
|
|
|
14719
14694
|
] }),
|
|
14720
14695
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_apsara65.List.Item, { children: [
|
|
14721
14696
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_apsara65.List.Label, { className: side_panel_module_css_default9["side-panel-section-item-label"], children: "Next billing date" }),
|
|
14722
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_apsara65.List.Value, { className: side_panel_module_css_default9["side-panel-section-item-value"], children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Skeleton, {}) :
|
|
14697
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_apsara65.List.Value, { className: side_panel_module_css_default9["side-panel-section-item-value"], children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Skeleton, {}) : !isNullTimestamp(due_date) ? /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_apsara65.Flex, { gap: 3, children: [
|
|
14723
14698
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(CalendarIcon, {}),
|
|
14724
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_apsara65.Text, { children:
|
|
14699
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_apsara65.Text, { children: formatTimestamp(due_date) })
|
|
14725
14700
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_apsara65.Text, { children: "-" }) })
|
|
14726
14701
|
] }),
|
|
14727
14702
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_apsara65.List.Item, { children: [
|
|
@@ -14777,8 +14752,8 @@ var import_icons7 = require("@raystack/apsara/icons");
|
|
|
14777
14752
|
// admin/views/organizations/details/edit/kyc.tsx
|
|
14778
14753
|
var import_apsara67 = require("@raystack/apsara");
|
|
14779
14754
|
|
|
14780
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
14781
|
-
var digest55 = "
|
|
14755
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-yWFQ9RcCym5j/sdk/admin/views/organizations/details/edit/edit.module.css.js
|
|
14756
|
+
var digest55 = "8e3e6c9ed206704fca8a243f6a66555ed9a033394ff7f3cb6405f5fc06f5a772";
|
|
14782
14757
|
var css55 = `._drawer-content_18xgg_1 {
|
|
14783
14758
|
min-width: 500px;
|
|
14784
14759
|
padding: 0;
|
|
@@ -14830,9 +14805,9 @@ var edit_module_css_default = { "drawer-content": "_drawer-content_18xgg_1", "dr
|
|
|
14830
14805
|
var import_react35 = require("react");
|
|
14831
14806
|
var import_react_hook_form6 = require("react-hook-form");
|
|
14832
14807
|
var import_zod9 = require("@hookform/resolvers/zod");
|
|
14833
|
-
var
|
|
14808
|
+
var import_connect_query27 = require("@connectrpc/connect-query");
|
|
14834
14809
|
var import_react_query9 = require("@tanstack/react-query");
|
|
14835
|
-
var
|
|
14810
|
+
var import_frontier31 = require("@raystack/proton/frontier");
|
|
14836
14811
|
var import_protobuf14 = require("@bufbuild/protobuf");
|
|
14837
14812
|
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
14838
14813
|
var kycUpdateSchema = external_exports.object({
|
|
@@ -14850,7 +14825,7 @@ var kycUpdateSchema = external_exports.object({
|
|
|
14850
14825
|
function EditKYCPanel({ open = false, onClose }) {
|
|
14851
14826
|
const { organization, kycDetails, updateKYCDetails } = (0, import_react35.useContext)(OrganizationContext);
|
|
14852
14827
|
const queryClient = (0, import_react_query9.useQueryClient)();
|
|
14853
|
-
const transport = (0,
|
|
14828
|
+
const transport = (0, import_connect_query27.useTransport)();
|
|
14854
14829
|
const orgId = organization?.id || "";
|
|
14855
14830
|
const {
|
|
14856
14831
|
handleSubmit,
|
|
@@ -14865,15 +14840,15 @@ function EditKYCPanel({ open = false, onClose }) {
|
|
|
14865
14840
|
});
|
|
14866
14841
|
const {
|
|
14867
14842
|
mutateAsync: setOrganizationKycMutation
|
|
14868
|
-
} = (0,
|
|
14843
|
+
} = (0, import_connect_query27.useMutation)(import_frontier31.AdminServiceQueries.setOrganizationKyc, {
|
|
14869
14844
|
onSuccess: (data) => {
|
|
14870
14845
|
const newKycDetails = data.organizationKyc;
|
|
14871
14846
|
if (newKycDetails) {
|
|
14872
14847
|
updateKYCDetails(newKycDetails);
|
|
14873
14848
|
}
|
|
14874
14849
|
queryClient.invalidateQueries({
|
|
14875
|
-
queryKey: (0,
|
|
14876
|
-
schema:
|
|
14850
|
+
queryKey: (0, import_connect_query27.createConnectQueryKey)({
|
|
14851
|
+
schema: import_frontier31.FrontierServiceQueries.getOrganizationKyc,
|
|
14877
14852
|
transport,
|
|
14878
14853
|
input: { orgId },
|
|
14879
14854
|
cardinality: "finite"
|
|
@@ -14892,7 +14867,7 @@ function EditKYCPanel({ open = false, onClose }) {
|
|
|
14892
14867
|
return;
|
|
14893
14868
|
}
|
|
14894
14869
|
await setOrganizationKycMutation(
|
|
14895
|
-
(0, import_protobuf14.create)(
|
|
14870
|
+
(0, import_protobuf14.create)(import_frontier31.SetOrganizationKycRequestSchema, {
|
|
14896
14871
|
orgId,
|
|
14897
14872
|
status: data.status,
|
|
14898
14873
|
link: data.link || ""
|
|
@@ -15004,8 +14979,8 @@ function EditKYCPanel({ open = false, onClose }) {
|
|
|
15004
14979
|
// admin/views/organizations/details/edit/organization.tsx
|
|
15005
14980
|
var import_react36 = require("react");
|
|
15006
14981
|
|
|
15007
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
15008
|
-
var digest56 = "
|
|
14982
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-rxIX3biztge6/sdk/admin/views/organizations/details/edit/edit.module.css.js
|
|
14983
|
+
var digest56 = "2c30906d7144d21a65971d32a8e10f8b946fbadb9da8345a2b2eca28c1ce2fa1";
|
|
15009
14984
|
var css56 = `._drawer-content_18xgg_1 {
|
|
15010
14985
|
min-width: 500px;
|
|
15011
14986
|
padding: 0;
|
|
@@ -15057,9 +15032,9 @@ var edit_module_css_default2 = { "drawer-content": "_drawer-content_18xgg_1", "d
|
|
|
15057
15032
|
var import_apsara68 = require("@raystack/apsara");
|
|
15058
15033
|
var import_react_hook_form7 = require("react-hook-form");
|
|
15059
15034
|
var import_zod11 = require("@hookform/resolvers/zod");
|
|
15060
|
-
var
|
|
15035
|
+
var import_connect_query28 = require("@connectrpc/connect-query");
|
|
15061
15036
|
var import_react_query10 = require("@tanstack/react-query");
|
|
15062
|
-
var
|
|
15037
|
+
var import_frontier32 = require("@raystack/proton/frontier");
|
|
15063
15038
|
var import_protobuf15 = require("@bufbuild/protobuf");
|
|
15064
15039
|
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
15065
15040
|
var orgUpdateSchema = external_exports.object({
|
|
@@ -15103,7 +15078,7 @@ function EditOrganizationPanel({ open = false, onClose }) {
|
|
|
15103
15078
|
const { organization, appUrl, countries: countriesFromContext = [], organizationTypes: industries = [] } = (0, import_react36.useContext)(OrganizationContext);
|
|
15104
15079
|
const [countries, setCountries] = (0, import_react36.useState)(countriesFromContext);
|
|
15105
15080
|
const queryClient = (0, import_react_query10.useQueryClient)();
|
|
15106
|
-
const transport = (0,
|
|
15081
|
+
const transport = (0, import_connect_query28.useTransport)();
|
|
15107
15082
|
const orgId = organization?.id || "";
|
|
15108
15083
|
(0, import_react36.useEffect)(() => {
|
|
15109
15084
|
if (countriesFromContext.length > 0)
|
|
@@ -15124,11 +15099,11 @@ function EditOrganizationPanel({ open = false, onClose }) {
|
|
|
15124
15099
|
mutateAsync: updateOrganizationMutation,
|
|
15125
15100
|
error: mutationError,
|
|
15126
15101
|
isPending: isSubmitting
|
|
15127
|
-
} = (0,
|
|
15102
|
+
} = (0, import_connect_query28.useMutation)(import_frontier32.FrontierServiceQueries.updateOrganization, {
|
|
15128
15103
|
onSuccess: () => {
|
|
15129
15104
|
queryClient.invalidateQueries({
|
|
15130
|
-
queryKey: (0,
|
|
15131
|
-
schema:
|
|
15105
|
+
queryKey: (0, import_connect_query28.createConnectQueryKey)({
|
|
15106
|
+
schema: import_frontier32.FrontierServiceQueries.getOrganization,
|
|
15132
15107
|
transport,
|
|
15133
15108
|
input: { id: orgId },
|
|
15134
15109
|
cardinality: "finite"
|
|
@@ -15158,7 +15133,7 @@ function EditOrganizationPanel({ open = false, onClose }) {
|
|
|
15158
15133
|
country: data.country
|
|
15159
15134
|
}
|
|
15160
15135
|
};
|
|
15161
|
-
await updateOrganizationMutation((0, import_protobuf15.create)(
|
|
15136
|
+
await updateOrganizationMutation((0, import_protobuf15.create)(import_frontier32.UpdateOrganizationRequestSchema, {
|
|
15162
15137
|
id: orgId,
|
|
15163
15138
|
body: payload
|
|
15164
15139
|
}));
|
|
@@ -15360,8 +15335,8 @@ function EditOrganizationPanel({ open = false, onClose }) {
|
|
|
15360
15335
|
// admin/views/organizations/details/edit/billing.tsx
|
|
15361
15336
|
var import_apsara69 = require("@raystack/apsara");
|
|
15362
15337
|
|
|
15363
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
15364
|
-
var digest57 = "
|
|
15338
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-pmwDkU1Auj6A/sdk/admin/views/organizations/details/edit/edit.module.css.js
|
|
15339
|
+
var digest57 = "84873069284608b7107c914853654eee88863f84429d3854bb0bd0de8abfa209";
|
|
15365
15340
|
var css57 = `._drawer-content_18xgg_1 {
|
|
15366
15341
|
min-width: 500px;
|
|
15367
15342
|
padding: 0;
|
|
@@ -15413,8 +15388,8 @@ var edit_module_css_default3 = { "drawer-content": "_drawer-content_18xgg_1", "d
|
|
|
15413
15388
|
var import_react37 = require("react");
|
|
15414
15389
|
var import_react_hook_form8 = require("react-hook-form");
|
|
15415
15390
|
var import_zod13 = require("@hookform/resolvers/zod");
|
|
15416
|
-
var
|
|
15417
|
-
var
|
|
15391
|
+
var import_connect_query29 = require("@connectrpc/connect-query");
|
|
15392
|
+
var import_frontier33 = require("@raystack/proton/frontier");
|
|
15418
15393
|
var import_protobuf16 = require("@bufbuild/protobuf");
|
|
15419
15394
|
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
15420
15395
|
var billingDetailsUpdateSchema = external_exports.object({
|
|
@@ -15487,8 +15462,8 @@ function EditBillingPanel({ open = false, onClose }) {
|
|
|
15487
15462
|
reset(billingDetailsData);
|
|
15488
15463
|
}
|
|
15489
15464
|
}, [billingDetailsData, reset]);
|
|
15490
|
-
const { mutateAsync: updateBillingDetails } = (0,
|
|
15491
|
-
|
|
15465
|
+
const { mutateAsync: updateBillingDetails } = (0, import_connect_query29.useMutation)(
|
|
15466
|
+
import_frontier33.AdminServiceQueries.updateBillingAccountDetails,
|
|
15492
15467
|
{
|
|
15493
15468
|
onError: (error) => {
|
|
15494
15469
|
import_apsara69.toastManager.add({
|
|
@@ -15506,7 +15481,7 @@ function EditBillingPanel({ open = false, onClose }) {
|
|
|
15506
15481
|
const dueInDaysValue = data.tokenPaymentType === "prepaid" ? 0n : BigInt(data.dueInDays);
|
|
15507
15482
|
const creditMinForApi = data.tokenPaymentType === "postpaid" ? -creditMinValue : creditMinValue;
|
|
15508
15483
|
await updateBillingDetails(
|
|
15509
|
-
(0, import_protobuf16.create)(
|
|
15484
|
+
(0, import_protobuf16.create)(import_frontier33.UpdateBillingAccountDetailsRequestSchema, {
|
|
15510
15485
|
orgId: organizationId,
|
|
15511
15486
|
id: billingId,
|
|
15512
15487
|
creditMin: creditMinForApi,
|
|
@@ -15739,7 +15714,7 @@ var OrganizationDetailsLayout = ({
|
|
|
15739
15714
|
};
|
|
15740
15715
|
|
|
15741
15716
|
// admin/views/organizations/details/index.tsx
|
|
15742
|
-
var
|
|
15717
|
+
var import_frontier34 = require("@raystack/proton/frontier");
|
|
15743
15718
|
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
15744
15719
|
var OrganizationDetailsView = ({
|
|
15745
15720
|
organizationId,
|
|
@@ -15757,13 +15732,13 @@ var OrganizationDetailsView = ({
|
|
|
15757
15732
|
const [isSearchVisible, setIsSearchVisible] = (0, import_react39.useState)(false);
|
|
15758
15733
|
const [searchQuery, setSearchQuery] = (0, import_react39.useState)("");
|
|
15759
15734
|
const queryClient = (0, import_react_query11.useQueryClient)();
|
|
15760
|
-
const transport = (0,
|
|
15735
|
+
const transport = (0, import_connect_query30.useTransport)();
|
|
15761
15736
|
const {
|
|
15762
15737
|
data: organization,
|
|
15763
15738
|
isLoading: isOrganizationLoading,
|
|
15764
15739
|
error: organizationError
|
|
15765
|
-
} = (0,
|
|
15766
|
-
|
|
15740
|
+
} = (0, import_connect_query30.useQuery)(
|
|
15741
|
+
import_frontier34.FrontierServiceQueries.getOrganization,
|
|
15767
15742
|
{ id: organizationId },
|
|
15768
15743
|
{
|
|
15769
15744
|
enabled: !!organizationId,
|
|
@@ -15771,7 +15746,7 @@ var OrganizationDetailsView = ({
|
|
|
15771
15746
|
}
|
|
15772
15747
|
);
|
|
15773
15748
|
const getOrganizationQueryKey = [
|
|
15774
|
-
|
|
15749
|
+
import_frontier34.FrontierServiceQueries.getOrganization,
|
|
15775
15750
|
{ id: organizationId }
|
|
15776
15751
|
];
|
|
15777
15752
|
async function updateOrganization(org) {
|
|
@@ -15781,8 +15756,8 @@ var OrganizationDetailsView = ({
|
|
|
15781
15756
|
data: kycData,
|
|
15782
15757
|
isLoading: isKYCLoading,
|
|
15783
15758
|
error: kycError
|
|
15784
|
-
} = (0,
|
|
15785
|
-
|
|
15759
|
+
} = (0, import_connect_query30.useQuery)(
|
|
15760
|
+
import_frontier34.FrontierServiceQueries.getOrganizationKyc,
|
|
15786
15761
|
{ orgId: organizationId || "" },
|
|
15787
15762
|
{
|
|
15788
15763
|
enabled: !!organizationId
|
|
@@ -15793,21 +15768,21 @@ var OrganizationDetailsView = ({
|
|
|
15793
15768
|
if (!organizationId)
|
|
15794
15769
|
return;
|
|
15795
15770
|
queryClient.setQueryData(
|
|
15796
|
-
(0,
|
|
15797
|
-
schema:
|
|
15771
|
+
(0, import_connect_query30.createConnectQueryKey)({
|
|
15772
|
+
schema: import_frontier34.FrontierServiceQueries.getOrganizationKyc,
|
|
15798
15773
|
transport,
|
|
15799
15774
|
input: { orgId: organizationId },
|
|
15800
15775
|
cardinality: "finite"
|
|
15801
15776
|
}),
|
|
15802
|
-
(0, import_protobuf17.create)(
|
|
15777
|
+
(0, import_protobuf17.create)(import_frontier34.GetOrganizationKycResponseSchema, { organizationKyc: kyc })
|
|
15803
15778
|
);
|
|
15804
15779
|
}
|
|
15805
15780
|
const {
|
|
15806
15781
|
data: defaultRoles = [],
|
|
15807
15782
|
isLoading: isDefaultRolesLoading,
|
|
15808
15783
|
error: defaultRolesError
|
|
15809
|
-
} = (0,
|
|
15810
|
-
|
|
15784
|
+
} = (0, import_connect_query30.useQuery)(
|
|
15785
|
+
import_frontier34.FrontierServiceQueries.listRoles,
|
|
15811
15786
|
{ scopes: [ORG_NAMESPACE] },
|
|
15812
15787
|
{
|
|
15813
15788
|
enabled: !!organizationId,
|
|
@@ -15818,8 +15793,8 @@ var OrganizationDetailsView = ({
|
|
|
15818
15793
|
data: organizationRoles = [],
|
|
15819
15794
|
isLoading: isOrgRolesLoading,
|
|
15820
15795
|
error: orgRolesError
|
|
15821
|
-
} = (0,
|
|
15822
|
-
|
|
15796
|
+
} = (0, import_connect_query30.useQuery)(
|
|
15797
|
+
import_frontier34.FrontierServiceQueries.listOrganizationRoles,
|
|
15823
15798
|
{ orgId: organizationId || "", scopes: [ORG_NAMESPACE] },
|
|
15824
15799
|
{
|
|
15825
15800
|
enabled: !!organizationId,
|
|
@@ -15831,8 +15806,8 @@ var OrganizationDetailsView = ({
|
|
|
15831
15806
|
data: orgMembersMap = {},
|
|
15832
15807
|
isLoading: isOrgMembersMapLoading,
|
|
15833
15808
|
error: orgMembersError
|
|
15834
|
-
} = (0,
|
|
15835
|
-
|
|
15809
|
+
} = (0, import_connect_query30.useQuery)(
|
|
15810
|
+
import_frontier34.FrontierServiceQueries.listOrganizationUsers,
|
|
15836
15811
|
{ id: organizationId || "" },
|
|
15837
15812
|
{
|
|
15838
15813
|
enabled: !!organizationId,
|
|
@@ -15849,8 +15824,8 @@ var OrganizationDetailsView = ({
|
|
|
15849
15824
|
}
|
|
15850
15825
|
}
|
|
15851
15826
|
);
|
|
15852
|
-
const { data: firstBillingAccountId = "", error: billingAccountsError } = (0,
|
|
15853
|
-
|
|
15827
|
+
const { data: firstBillingAccountId = "", error: billingAccountsError } = (0, import_connect_query30.useQuery)(
|
|
15828
|
+
import_frontier34.FrontierServiceQueries.listBillingAccounts,
|
|
15854
15829
|
{ orgId: organizationId || "" },
|
|
15855
15830
|
{
|
|
15856
15831
|
enabled: !!organizationId,
|
|
@@ -15862,9 +15837,9 @@ var OrganizationDetailsView = ({
|
|
|
15862
15837
|
isLoading: isBillingAccountLoading,
|
|
15863
15838
|
error: billingAccountError,
|
|
15864
15839
|
refetch: fetchBillingAccountDetails
|
|
15865
|
-
} = (0,
|
|
15866
|
-
|
|
15867
|
-
(0, import_protobuf17.create)(
|
|
15840
|
+
} = (0, import_connect_query30.useQuery)(
|
|
15841
|
+
import_frontier34.FrontierServiceQueries.getBillingAccount,
|
|
15842
|
+
(0, import_protobuf17.create)(import_frontier34.GetBillingAccountRequestSchema, {
|
|
15868
15843
|
id: firstBillingAccountId,
|
|
15869
15844
|
withBillingDetails: true
|
|
15870
15845
|
}),
|
|
@@ -15883,9 +15858,9 @@ var OrganizationDetailsView = ({
|
|
|
15883
15858
|
isLoading: isTokenBalanceLoading,
|
|
15884
15859
|
error: tokenBalanceError,
|
|
15885
15860
|
refetch: fetchTokenBalance
|
|
15886
|
-
} = (0,
|
|
15887
|
-
|
|
15888
|
-
(0, import_protobuf17.create)(
|
|
15861
|
+
} = (0, import_connect_query30.useQuery)(
|
|
15862
|
+
import_frontier34.FrontierServiceQueries.getBillingBalance,
|
|
15863
|
+
(0, import_protobuf17.create)(import_frontier34.GetBillingBalanceRequestSchema, {
|
|
15889
15864
|
id: firstBillingAccountId
|
|
15890
15865
|
}),
|
|
15891
15866
|
{
|
|
@@ -15982,8 +15957,8 @@ var OrganizationDetailsView = ({
|
|
|
15982
15957
|
// admin/views/organizations/details/security/index.tsx
|
|
15983
15958
|
var import_apsara73 = require("@raystack/apsara");
|
|
15984
15959
|
|
|
15985
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
15986
|
-
var digest58 = "
|
|
15960
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-jsM2cH03uxS4/sdk/admin/views/organizations/details/security/security.module.css.js
|
|
15961
|
+
var digest58 = "2bd1e85b7f3ca9c440950acb801746307b85f2d7eb92d53873758595d831c6fa";
|
|
15987
15962
|
var css58 = `._container_gfopt_1 {
|
|
15988
15963
|
width: 100%;
|
|
15989
15964
|
}
|
|
@@ -16039,8 +16014,8 @@ var import_react42 = require("react");
|
|
|
16039
16014
|
// admin/views/organizations/details/security/block-organization.tsx
|
|
16040
16015
|
var import_apsara71 = require("@raystack/apsara");
|
|
16041
16016
|
var import_react40 = require("react");
|
|
16042
|
-
var
|
|
16043
|
-
var
|
|
16017
|
+
var import_connect_query31 = require("@connectrpc/connect-query");
|
|
16018
|
+
var import_frontier35 = require("@raystack/proton/frontier");
|
|
16044
16019
|
var import_protobuf18 = require("@bufbuild/protobuf");
|
|
16045
16020
|
var import_react_query12 = require("@tanstack/react-query");
|
|
16046
16021
|
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
@@ -16048,15 +16023,15 @@ var BlockOrganizationDialog = () => {
|
|
|
16048
16023
|
const t = useTerminology();
|
|
16049
16024
|
const { organization } = (0, import_react40.useContext)(OrganizationContext);
|
|
16050
16025
|
const queryClient = (0, import_react_query12.useQueryClient)();
|
|
16051
|
-
const transport = (0,
|
|
16026
|
+
const transport = (0, import_connect_query31.useTransport)();
|
|
16052
16027
|
const [isDialogOpen, setIsDialogOpen] = (0, import_react40.useState)(false);
|
|
16053
|
-
const { mutateAsync: disableOrganization, isPending: isDisabling } = (0,
|
|
16054
|
-
|
|
16028
|
+
const { mutateAsync: disableOrganization, isPending: isDisabling } = (0, import_connect_query31.useMutation)(
|
|
16029
|
+
import_frontier35.FrontierServiceQueries.disableOrganization,
|
|
16055
16030
|
{
|
|
16056
16031
|
onSuccess: async () => {
|
|
16057
16032
|
await queryClient.invalidateQueries({
|
|
16058
|
-
queryKey: (0,
|
|
16059
|
-
schema:
|
|
16033
|
+
queryKey: (0, import_connect_query31.createConnectQueryKey)({
|
|
16034
|
+
schema: import_frontier35.FrontierServiceQueries.getOrganization,
|
|
16060
16035
|
transport,
|
|
16061
16036
|
input: { id: organization?.id },
|
|
16062
16037
|
cardinality: "finite"
|
|
@@ -16075,13 +16050,13 @@ var BlockOrganizationDialog = () => {
|
|
|
16075
16050
|
}
|
|
16076
16051
|
}
|
|
16077
16052
|
);
|
|
16078
|
-
const { mutateAsync: enableOrganization, isPending: isEnabling } = (0,
|
|
16079
|
-
|
|
16053
|
+
const { mutateAsync: enableOrganization, isPending: isEnabling } = (0, import_connect_query31.useMutation)(
|
|
16054
|
+
import_frontier35.FrontierServiceQueries.enableOrganization,
|
|
16080
16055
|
{
|
|
16081
16056
|
onSuccess: async () => {
|
|
16082
16057
|
await queryClient.invalidateQueries({
|
|
16083
|
-
queryKey: (0,
|
|
16084
|
-
schema:
|
|
16058
|
+
queryKey: (0, import_connect_query31.createConnectQueryKey)({
|
|
16059
|
+
schema: import_frontier35.FrontierServiceQueries.getOrganization,
|
|
16085
16060
|
transport,
|
|
16086
16061
|
input: { id: organization?.id },
|
|
16087
16062
|
cardinality: "finite"
|
|
@@ -16102,14 +16077,14 @@ var BlockOrganizationDialog = () => {
|
|
|
16102
16077
|
);
|
|
16103
16078
|
async function onBlockOrganization() {
|
|
16104
16079
|
await disableOrganization(
|
|
16105
|
-
(0, import_protobuf18.create)(
|
|
16080
|
+
(0, import_protobuf18.create)(import_frontier35.DisableOrganizationRequestSchema, {
|
|
16106
16081
|
id: organization?.id || ""
|
|
16107
16082
|
})
|
|
16108
16083
|
);
|
|
16109
16084
|
}
|
|
16110
16085
|
async function onUnblockOrganization() {
|
|
16111
16086
|
await enableOrganization(
|
|
16112
|
-
(0, import_protobuf18.create)(
|
|
16087
|
+
(0, import_protobuf18.create)(import_frontier35.EnableOrganizationRequestSchema, {
|
|
16113
16088
|
id: organization?.id || ""
|
|
16114
16089
|
})
|
|
16115
16090
|
);
|
|
@@ -16201,8 +16176,8 @@ var BlockOrganizationSection = () => {
|
|
|
16201
16176
|
// admin/views/organizations/details/security/domains-list.tsx
|
|
16202
16177
|
var import_apsara72 = require("@raystack/apsara");
|
|
16203
16178
|
|
|
16204
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
16205
|
-
var digest59 = "
|
|
16179
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-x9q26zSFVf00/sdk/admin/views/organizations/details/security/security.module.css.js
|
|
16180
|
+
var digest59 = "1ea6faa73ff72d8e79ca27457f2d3f0b94a73112c10a99f493d68de25de7a870";
|
|
16206
16181
|
var css59 = `._container_gfopt_1 {
|
|
16207
16182
|
width: 100%;
|
|
16208
16183
|
}
|
|
@@ -16254,9 +16229,9 @@ var security_module_css_default3 = { "container": "_container_gfopt_1", "content
|
|
|
16254
16229
|
|
|
16255
16230
|
// admin/views/organizations/details/security/domains-list.tsx
|
|
16256
16231
|
var import_react41 = require("react");
|
|
16257
|
-
var
|
|
16232
|
+
var import_connect_query32 = require("@connectrpc/connect-query");
|
|
16258
16233
|
var import_react_query13 = require("@tanstack/react-query");
|
|
16259
|
-
var
|
|
16234
|
+
var import_frontier36 = require("@raystack/proton/frontier");
|
|
16260
16235
|
var import_protobuf19 = require("@bufbuild/protobuf");
|
|
16261
16236
|
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
16262
16237
|
var DeleteDomainDialog = ({
|
|
@@ -16265,14 +16240,14 @@ var DeleteDomainDialog = ({
|
|
|
16265
16240
|
const { organization } = (0, import_react41.useContext)(OrganizationContext);
|
|
16266
16241
|
const [isDialogOpen, setIsDialogOpen] = (0, import_react41.useState)(false);
|
|
16267
16242
|
const queryClient = (0, import_react_query13.useQueryClient)();
|
|
16268
|
-
const transport = (0,
|
|
16269
|
-
const { mutateAsync: deleteDomain, isPending } = (0,
|
|
16270
|
-
|
|
16243
|
+
const transport = (0, import_connect_query32.useTransport)();
|
|
16244
|
+
const { mutateAsync: deleteDomain, isPending } = (0, import_connect_query32.useMutation)(
|
|
16245
|
+
import_frontier36.FrontierServiceQueries.deleteOrganizationDomain,
|
|
16271
16246
|
{
|
|
16272
16247
|
onSuccess: () => {
|
|
16273
16248
|
queryClient.invalidateQueries({
|
|
16274
|
-
queryKey: (0,
|
|
16275
|
-
schema:
|
|
16249
|
+
queryKey: (0, import_connect_query32.createConnectQueryKey)({
|
|
16250
|
+
schema: import_frontier36.FrontierServiceQueries.listOrganizationDomains,
|
|
16276
16251
|
transport,
|
|
16277
16252
|
input: { orgId: organization?.id || "" },
|
|
16278
16253
|
cardinality: "finite"
|
|
@@ -16293,7 +16268,7 @@ var DeleteDomainDialog = ({
|
|
|
16293
16268
|
);
|
|
16294
16269
|
const handleDelete = async () => {
|
|
16295
16270
|
await deleteDomain(
|
|
16296
|
-
(0, import_protobuf19.create)(
|
|
16271
|
+
(0, import_protobuf19.create)(import_frontier36.DeleteOrganizationDomainRequestSchema, {
|
|
16297
16272
|
orgId: domain?.orgId || "",
|
|
16298
16273
|
id: domain?.id || ""
|
|
16299
16274
|
})
|
|
@@ -16409,8 +16384,8 @@ var DomainsList = ({
|
|
|
16409
16384
|
};
|
|
16410
16385
|
|
|
16411
16386
|
// admin/views/organizations/details/security/index.tsx
|
|
16412
|
-
var
|
|
16413
|
-
var
|
|
16387
|
+
var import_connect_query33 = require("@connectrpc/connect-query");
|
|
16388
|
+
var import_frontier37 = require("@raystack/proton/frontier");
|
|
16414
16389
|
var import_protobuf20 = require("@bufbuild/protobuf");
|
|
16415
16390
|
var import_react43 = require("react");
|
|
16416
16391
|
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
@@ -16439,9 +16414,9 @@ var AddDomainSection = () => {
|
|
|
16439
16414
|
};
|
|
16440
16415
|
var OrganizationSecurity = () => {
|
|
16441
16416
|
const { organization } = (0, import_react42.useContext)(OrganizationContext);
|
|
16442
|
-
const { data: domains, isLoading, error, refetch } = (0,
|
|
16443
|
-
|
|
16444
|
-
(0, import_protobuf20.create)(
|
|
16417
|
+
const { data: domains, isLoading, error, refetch } = (0, import_connect_query33.useQuery)(
|
|
16418
|
+
import_frontier37.FrontierServiceQueries.listOrganizationDomains,
|
|
16419
|
+
(0, import_protobuf20.create)(import_frontier37.ListOrganizationDomainsRequestSchema, {
|
|
16445
16420
|
orgId: organization?.id
|
|
16446
16421
|
}),
|
|
16447
16422
|
{
|
|
@@ -16482,8 +16457,8 @@ var OrganizationSecurity = () => {
|
|
|
16482
16457
|
// admin/views/organizations/details/members/index.tsx
|
|
16483
16458
|
var import_apsara77 = require("@raystack/apsara");
|
|
16484
16459
|
|
|
16485
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
16486
|
-
var digest60 = "
|
|
16460
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-BihP2iY6Ker7/sdk/admin/views/organizations/details/members/members.module.css.js
|
|
16461
|
+
var digest60 = "2b158130c5415f0d44ac7758ccc2f23df946c0959f3bd59be281556c2fbb2036";
|
|
16487
16462
|
var css60 = `._container_jkaqi_1 {
|
|
16488
16463
|
width: 100%;
|
|
16489
16464
|
}
|
|
@@ -16540,8 +16515,8 @@ var import_react45 = require("react");
|
|
|
16540
16515
|
// admin/views/organizations/details/members/columns.tsx
|
|
16541
16516
|
var import_apsara74 = require("@raystack/apsara");
|
|
16542
16517
|
|
|
16543
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
16544
|
-
var digest61 = "
|
|
16518
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-vNEHk3GKFHmh/sdk/admin/views/organizations/details/members/members.module.css.js
|
|
16519
|
+
var digest61 = "6c18009975f033c03ca036c9c76ca85bb160c9c5502f35abc98dc3cad6dc0708";
|
|
16545
16520
|
var css61 = `._container_jkaqi_1 {
|
|
16546
16521
|
width: 100%;
|
|
16547
16522
|
}
|
|
@@ -16592,9 +16567,6 @@ var css61 = `._container_jkaqi_1 {
|
|
|
16592
16567
|
})();
|
|
16593
16568
|
var members_module_css_default2 = { "container": "_container_jkaqi_1", "name-column": "_name-column_jkaqi_5", "nameColumn": "_name-column_jkaqi_5", "empty-state": "_empty-state_jkaqi_9", "emptyState": "_empty-state_jkaqi_9", "empty-state-subheading": "_empty-state-subheading_jkaqi_13", "emptyStateSubheading": "_empty-state-subheading_jkaqi_13", "table": "_table_jkaqi_18", "table-wrapper": "_table-wrapper_jkaqi_23", "tableWrapper": "_table-wrapper_jkaqi_23", "table-header": "_table-header_jkaqi_29", "tableHeader": "_table-header_jkaqi_29", "table-action-column": "_table-action-column_jkaqi_34", "tableActionColumn": "_table-action-column_jkaqi_34" };
|
|
16594
16569
|
|
|
16595
|
-
// admin/views/organizations/details/members/columns.tsx
|
|
16596
|
-
var import_dayjs13 = __toESM(require("dayjs"));
|
|
16597
|
-
|
|
16598
16570
|
// admin/assets/icons/DeleteIcon.tsx
|
|
16599
16571
|
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
16600
16572
|
function DeleteIcon(props) {
|
|
@@ -16705,11 +16677,7 @@ var getColumns12 = ({
|
|
|
16705
16677
|
{
|
|
16706
16678
|
accessorKey: "orgJoinedAt",
|
|
16707
16679
|
header: "Joined On",
|
|
16708
|
-
cell: ({ getValue }) => {
|
|
16709
|
-
const value = getValue();
|
|
16710
|
-
const date = isNullTimestamp(value) ? "-" : (0, import_dayjs13.default)(timestampToDate(value)).format("YYYY-MM-DD");
|
|
16711
|
-
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_apsara74.Text, { children: date });
|
|
16712
|
-
},
|
|
16680
|
+
cell: ({ getValue }) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_apsara74.Text, { children: formatTimestamp(getValue()) }),
|
|
16713
16681
|
enableSorting: true,
|
|
16714
16682
|
enableHiding: true
|
|
16715
16683
|
// enableColumnFilter: true,
|
|
@@ -16777,14 +16745,14 @@ var getColumns12 = ({
|
|
|
16777
16745
|
};
|
|
16778
16746
|
|
|
16779
16747
|
// admin/views/organizations/details/members/index.tsx
|
|
16780
|
-
var
|
|
16781
|
-
var
|
|
16748
|
+
var import_frontier41 = require("@raystack/proton/frontier");
|
|
16749
|
+
var import_connect_query37 = require("@connectrpc/connect-query");
|
|
16782
16750
|
var import_react_query15 = require("@tanstack/react-query");
|
|
16783
16751
|
|
|
16784
16752
|
// admin/views/organizations/details/members/update-role.tsx
|
|
16785
|
-
var
|
|
16753
|
+
var import_frontier38 = require("@raystack/proton/frontier");
|
|
16786
16754
|
var import_protobuf21 = require("@bufbuild/protobuf");
|
|
16787
|
-
var
|
|
16755
|
+
var import_connect_query34 = require("@connectrpc/connect-query");
|
|
16788
16756
|
var import_apsara75 = require("@raystack/apsara");
|
|
16789
16757
|
var import_connect4 = require("@connectrpc/connect");
|
|
16790
16758
|
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
@@ -16812,13 +16780,13 @@ function UpdateRoleContent({
|
|
|
16812
16780
|
onClose,
|
|
16813
16781
|
onRoleUpdate
|
|
16814
16782
|
}) {
|
|
16815
|
-
const { mutateAsync: setMemberRole, isPending } = (0,
|
|
16816
|
-
|
|
16783
|
+
const { mutateAsync: setMemberRole, isPending } = (0, import_connect_query34.useMutation)(
|
|
16784
|
+
import_frontier38.FrontierServiceQueries.setOrganizationMemberRole
|
|
16817
16785
|
);
|
|
16818
16786
|
async function onSubmit() {
|
|
16819
16787
|
try {
|
|
16820
16788
|
await setMemberRole(
|
|
16821
|
-
(0, import_protobuf21.create)(
|
|
16789
|
+
(0, import_protobuf21.create)(import_frontier38.SetOrganizationMemberRoleRequestSchema, {
|
|
16822
16790
|
orgId: organizationId,
|
|
16823
16791
|
userId: payload.user.id,
|
|
16824
16792
|
roleId: payload.role.id
|
|
@@ -16871,9 +16839,9 @@ function UpdateRoleContent({
|
|
|
16871
16839
|
}
|
|
16872
16840
|
|
|
16873
16841
|
// admin/views/organizations/details/members/remove-member.tsx
|
|
16874
|
-
var
|
|
16842
|
+
var import_frontier39 = require("@raystack/proton/frontier");
|
|
16875
16843
|
var import_protobuf22 = require("@bufbuild/protobuf");
|
|
16876
|
-
var
|
|
16844
|
+
var import_connect_query35 = require("@connectrpc/connect-query");
|
|
16877
16845
|
var import_apsara76 = require("@raystack/apsara");
|
|
16878
16846
|
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
16879
16847
|
var RemoveMember = ({
|
|
@@ -16883,15 +16851,15 @@ var RemoveMember = ({
|
|
|
16883
16851
|
onClose
|
|
16884
16852
|
}) => {
|
|
16885
16853
|
const t = useTerminology();
|
|
16886
|
-
const { mutateAsync: removeOrganizationMember, isPending } = (0,
|
|
16887
|
-
|
|
16854
|
+
const { mutateAsync: removeOrganizationMember, isPending } = (0, import_connect_query35.useMutation)(
|
|
16855
|
+
import_frontier39.FrontierServiceQueries.removeOrganizationMember
|
|
16888
16856
|
);
|
|
16889
16857
|
async function onSubmit() {
|
|
16890
16858
|
try {
|
|
16891
16859
|
if (!user)
|
|
16892
16860
|
return;
|
|
16893
16861
|
await removeOrganizationMember(
|
|
16894
|
-
(0, import_protobuf22.create)(
|
|
16862
|
+
(0, import_protobuf22.create)(import_frontier39.RemoveOrganizationMemberRequestSchema, {
|
|
16895
16863
|
orgId: organizationId,
|
|
16896
16864
|
principalId: user?.id || "",
|
|
16897
16865
|
principalType: "app/user"
|
|
@@ -16969,9 +16937,9 @@ var RemoveMember = ({
|
|
|
16969
16937
|
};
|
|
16970
16938
|
|
|
16971
16939
|
// hooks/index.ts
|
|
16972
|
-
var
|
|
16940
|
+
var import_connect_query36 = require("@connectrpc/connect-query");
|
|
16973
16941
|
var import_connect5 = require("@connectrpc/connect");
|
|
16974
|
-
var
|
|
16942
|
+
var import_frontier40 = require("@raystack/proton/frontier");
|
|
16975
16943
|
var import_react_query14 = require("@tanstack/react-query");
|
|
16976
16944
|
var import_protobuf23 = require("@bufbuild/protobuf");
|
|
16977
16945
|
|
|
@@ -17038,7 +17006,7 @@ function OrganizationMembersView() {
|
|
|
17038
17006
|
query: searchQuery
|
|
17039
17007
|
} = search;
|
|
17040
17008
|
const queryClient = (0, import_react_query15.useQueryClient)();
|
|
17041
|
-
const transport = (0,
|
|
17009
|
+
const transport = (0, import_connect_query37.useTransport)();
|
|
17042
17010
|
const organizationId = organization?.id || "";
|
|
17043
17011
|
const [removeMemberConfig, setRemoveMemberConfig] = (0, import_react45.useState)({ isOpen: false, user: null });
|
|
17044
17012
|
const title = `Members | ${organization?.title} | Organizations`;
|
|
@@ -17058,8 +17026,8 @@ function OrganizationMembersView() {
|
|
|
17058
17026
|
fetchNextPage,
|
|
17059
17027
|
hasNextPage,
|
|
17060
17028
|
isError
|
|
17061
|
-
} = (0,
|
|
17062
|
-
|
|
17029
|
+
} = (0, import_connect_query37.useInfiniteQuery)(
|
|
17030
|
+
import_frontier41.AdminServiceQueries.searchOrganizationUsers,
|
|
17063
17031
|
{ id: organizationId, query },
|
|
17064
17032
|
{
|
|
17065
17033
|
enabled: !!organizationId,
|
|
@@ -17103,8 +17071,8 @@ function OrganizationMembersView() {
|
|
|
17103
17071
|
});
|
|
17104
17072
|
async function invalidateMembersQuery() {
|
|
17105
17073
|
await queryClient.invalidateQueries({
|
|
17106
|
-
queryKey: (0,
|
|
17107
|
-
schema:
|
|
17074
|
+
queryKey: (0, import_connect_query37.createConnectQueryKey)({
|
|
17075
|
+
schema: import_frontier41.AdminServiceQueries.searchOrganizationUsers,
|
|
17108
17076
|
transport,
|
|
17109
17077
|
input: {},
|
|
17110
17078
|
cardinality: "infinite"
|
|
@@ -17172,8 +17140,8 @@ function OrganizationMembersView() {
|
|
|
17172
17140
|
// admin/views/organizations/details/projects/index.tsx
|
|
17173
17141
|
var import_apsara86 = require("@raystack/apsara");
|
|
17174
17142
|
|
|
17175
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
17176
|
-
var digest62 = "
|
|
17143
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-AEUVYJrmVNs4/sdk/admin/views/organizations/details/projects/projects.module.css.js
|
|
17144
|
+
var digest62 = "68d32c193173cc70f4b9c2818ca758ea03a907858d2f87ca738fb85b08221854";
|
|
17177
17145
|
var css62 = `._container_1xzwm_1 {
|
|
17178
17146
|
width: 100%;
|
|
17179
17147
|
}
|
|
@@ -17234,8 +17202,8 @@ var import_react50 = require("react");
|
|
|
17234
17202
|
// admin/views/organizations/details/projects/columns.tsx
|
|
17235
17203
|
var import_apsara80 = require("@raystack/apsara");
|
|
17236
17204
|
|
|
17237
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
17238
|
-
var digest63 = "
|
|
17205
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-J39fLTpk0U8I/sdk/admin/views/organizations/details/projects/projects.module.css.js
|
|
17206
|
+
var digest63 = "f5d99c029ecfe625de040d585fac84161a172f46f604adf2752981d0bed092f4";
|
|
17239
17207
|
var css63 = `._container_1xzwm_1 {
|
|
17240
17208
|
width: 100%;
|
|
17241
17209
|
}
|
|
@@ -17290,16 +17258,13 @@ var css63 = `._container_1xzwm_1 {
|
|
|
17290
17258
|
})();
|
|
17291
17259
|
var projects_module_css_default2 = { "container": "_container_1xzwm_1", "title-column": "_title-column_1xzwm_5", "titleColumn": "_title-column_1xzwm_5", "empty-state": "_empty-state_1xzwm_9", "emptyState": "_empty-state_1xzwm_9", "empty-state-subheading": "_empty-state-subheading_1xzwm_13", "emptyStateSubheading": "_empty-state-subheading_1xzwm_13", "table": "_table_1xzwm_18", "table-wrapper": "_table-wrapper_1xzwm_23", "tableWrapper": "_table-wrapper_1xzwm_23", "table-header": "_table-header_1xzwm_29", "tableHeader": "_table-header_1xzwm_29", "table-action-column": "_table-action-column_1xzwm_34", "tableActionColumn": "_table-action-column_1xzwm_34", "flex1": "_flex1_1xzwm_38" };
|
|
17292
17260
|
|
|
17293
|
-
// admin/views/organizations/details/projects/columns.tsx
|
|
17294
|
-
var import_dayjs14 = __toESM(require("dayjs"));
|
|
17295
|
-
|
|
17296
17261
|
// admin/views/organizations/details/projects/rename-project.tsx
|
|
17297
17262
|
var import_apsara78 = require("@raystack/apsara");
|
|
17298
|
-
var
|
|
17263
|
+
var import_frontier42 = require("@raystack/proton/frontier");
|
|
17299
17264
|
var import_protobuf24 = require("@bufbuild/protobuf");
|
|
17300
17265
|
var import_zod15 = require("@hookform/resolvers/zod");
|
|
17301
17266
|
var import_react_hook_form9 = require("react-hook-form");
|
|
17302
|
-
var
|
|
17267
|
+
var import_connect_query38 = require("@connectrpc/connect-query");
|
|
17303
17268
|
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
17304
17269
|
var projectRenameSchema = external_exports.object({
|
|
17305
17270
|
title: external_exports.string(),
|
|
@@ -17325,13 +17290,13 @@ function RenameProjectDialog({
|
|
|
17325
17290
|
},
|
|
17326
17291
|
resolver: (0, import_zod15.zodResolver)(projectRenameSchema)
|
|
17327
17292
|
});
|
|
17328
|
-
const { mutateAsync: updateProject } = (0,
|
|
17329
|
-
|
|
17293
|
+
const { mutateAsync: updateProject } = (0, import_connect_query38.useMutation)(
|
|
17294
|
+
import_frontier42.FrontierServiceQueries.updateProject
|
|
17330
17295
|
);
|
|
17331
17296
|
const submit = async (data) => {
|
|
17332
17297
|
try {
|
|
17333
17298
|
const resp = await updateProject(
|
|
17334
|
-
(0, import_protobuf24.create)(
|
|
17299
|
+
(0, import_protobuf24.create)(import_frontier42.UpdateProjectRequestSchema, {
|
|
17335
17300
|
id: project?.id || "",
|
|
17336
17301
|
body: { ...data }
|
|
17337
17302
|
})
|
|
@@ -17427,17 +17392,17 @@ var import_react47 = require("react");
|
|
|
17427
17392
|
// admin/views/organizations/details/projects/use-add-project-members.tsx
|
|
17428
17393
|
var import_react46 = require("react");
|
|
17429
17394
|
var import_apsara79 = require("@raystack/apsara");
|
|
17430
|
-
var
|
|
17431
|
-
var
|
|
17395
|
+
var import_connect_query39 = require("@connectrpc/connect-query");
|
|
17396
|
+
var import_frontier43 = require("@raystack/proton/frontier");
|
|
17432
17397
|
var import_protobuf25 = require("@bufbuild/protobuf");
|
|
17433
17398
|
function useAddProjectMembers({ projectId }) {
|
|
17434
17399
|
const t = useTerminology();
|
|
17435
17400
|
const memberLabel = t.member({ case: "capital" });
|
|
17436
17401
|
const { orgMembersMap } = (0, import_react46.useContext)(OrganizationContext);
|
|
17437
17402
|
const [searchQuery, setSearchQuery] = (0, import_react46.useState)("");
|
|
17438
|
-
const { data: projectMembers, isLoading, refetch } = (0,
|
|
17439
|
-
|
|
17440
|
-
(0, import_protobuf25.create)(
|
|
17403
|
+
const { data: projectMembers, isLoading, refetch } = (0, import_connect_query39.useQuery)(
|
|
17404
|
+
import_frontier43.FrontierServiceQueries.listProjectUsers,
|
|
17405
|
+
(0, import_protobuf25.create)(import_frontier43.ListProjectUsersRequestSchema, { id: projectId }),
|
|
17441
17406
|
{
|
|
17442
17407
|
enabled: !!projectId,
|
|
17443
17408
|
select: (data) => data?.users || []
|
|
@@ -17459,9 +17424,9 @@ function useAddProjectMembers({ projectId }) {
|
|
|
17459
17424
|
return name.toLowerCase().includes(searchQuery.toLowerCase());
|
|
17460
17425
|
}) : nonMembers;
|
|
17461
17426
|
}, [nonMembers, searchQuery]);
|
|
17462
|
-
const { data: rolesData } = (0,
|
|
17463
|
-
|
|
17464
|
-
(0, import_protobuf25.create)(
|
|
17427
|
+
const { data: rolesData } = (0, import_connect_query39.useQuery)(
|
|
17428
|
+
import_frontier43.FrontierServiceQueries.listRoles,
|
|
17429
|
+
(0, import_protobuf25.create)(import_frontier43.ListRolesRequestSchema, {
|
|
17465
17430
|
state: "enabled",
|
|
17466
17431
|
scopes: [SCOPES.PROJECT]
|
|
17467
17432
|
}),
|
|
@@ -17471,8 +17436,8 @@ function useAddProjectMembers({ projectId }) {
|
|
|
17471
17436
|
() => rolesData?.roles?.find((r) => r.name === DEFAULT_ROLES.PROJECT_VIEWER)?.id ?? "",
|
|
17472
17437
|
[rolesData]
|
|
17473
17438
|
);
|
|
17474
|
-
const { mutateAsync: setProjectMemberRole } = (0,
|
|
17475
|
-
|
|
17439
|
+
const { mutateAsync: setProjectMemberRole } = (0, import_connect_query39.useMutation)(
|
|
17440
|
+
import_frontier43.FrontierServiceQueries.setProjectMemberRole
|
|
17476
17441
|
);
|
|
17477
17442
|
const addMember = (0, import_react46.useCallback)(
|
|
17478
17443
|
async (userId) => {
|
|
@@ -17480,7 +17445,7 @@ function useAddProjectMembers({ projectId }) {
|
|
|
17480
17445
|
return;
|
|
17481
17446
|
try {
|
|
17482
17447
|
await setProjectMemberRole(
|
|
17483
|
-
(0, import_protobuf25.create)(
|
|
17448
|
+
(0, import_protobuf25.create)(import_frontier43.SetProjectMemberRoleRequestSchema, {
|
|
17484
17449
|
projectId,
|
|
17485
17450
|
principalId: userId,
|
|
17486
17451
|
principalType: SCOPES.USER,
|
|
@@ -17709,11 +17674,7 @@ var getColumns13 = ({
|
|
|
17709
17674
|
{
|
|
17710
17675
|
accessorKey: "createdAt",
|
|
17711
17676
|
header: "Created On",
|
|
17712
|
-
cell: ({ getValue }) =>
|
|
17713
|
-
const value = getValue();
|
|
17714
|
-
const date = isNullTimestamp(value) ? "-" : (0, import_dayjs14.default)(timestampToDate(value)).format("YYYY-MM-DD");
|
|
17715
|
-
return date;
|
|
17716
|
-
},
|
|
17677
|
+
cell: ({ getValue }) => formatTimestamp(getValue()),
|
|
17717
17678
|
enableSorting: true,
|
|
17718
17679
|
enableHiding: true,
|
|
17719
17680
|
enableColumnFilter: true,
|
|
@@ -17740,19 +17701,19 @@ var getColumns13 = ({
|
|
|
17740
17701
|
};
|
|
17741
17702
|
|
|
17742
17703
|
// admin/views/organizations/details/projects/index.tsx
|
|
17743
|
-
var
|
|
17744
|
-
var
|
|
17704
|
+
var import_frontier47 = require("@raystack/proton/frontier");
|
|
17705
|
+
var import_connect_query43 = require("@connectrpc/connect-query");
|
|
17745
17706
|
|
|
17746
17707
|
// admin/views/organizations/details/projects/members/index.tsx
|
|
17747
17708
|
var import_apsara85 = require("@raystack/apsara");
|
|
17748
17709
|
var import_react49 = require("react");
|
|
17749
|
-
var
|
|
17710
|
+
var import_frontier46 = require("@raystack/proton/frontier");
|
|
17750
17711
|
var import_protobuf28 = require("@bufbuild/protobuf");
|
|
17751
|
-
var
|
|
17712
|
+
var import_connect_query42 = require("@connectrpc/connect-query");
|
|
17752
17713
|
var import_hooks5 = require("@raystack/apsara/hooks");
|
|
17753
17714
|
|
|
17754
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
17755
|
-
var digest64 = "
|
|
17715
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-1XNlKYLf4ZKw/sdk/admin/views/organizations/details/projects/members/members.module.css.js
|
|
17716
|
+
var digest64 = "edcef42f98754613e699eecb01f2ce7feec2391bb0959eaad4780092c6527476";
|
|
17756
17717
|
var css64 = `._flex1_65nkt_1 {
|
|
17757
17718
|
flex: 1;
|
|
17758
17719
|
}
|
|
@@ -17840,8 +17801,8 @@ var css64 = `._flex1_65nkt_1 {
|
|
|
17840
17801
|
})();
|
|
17841
17802
|
var members_module_css_default3 = { "flex1": "_flex1_65nkt_1", "dialog-content": "_dialog-content_65nkt_5", "dialogContent": "_dialog-content_65nkt_5", "dialog-body": "_dialog-body_65nkt_10", "dialogBody": "_dialog-body_65nkt_10", "empty-state": "_empty-state_65nkt_14", "emptyState": "_empty-state_65nkt_14", "empty-state-subheading": "_empty-state-subheading_65nkt_18", "emptyStateSubheading": "_empty-state-subheading_65nkt_18", "table": "_table_65nkt_23", "table-wrapper": "_table-wrapper_65nkt_28", "tableWrapper": "_table-wrapper_65nkt_28", "table-header": "_table-header_65nkt_34", "tableHeader": "_table-header_65nkt_34", "table-search": "_table-search_65nkt_39", "tableSearch": "_table-search_65nkt_39", "table-content-wrapper": "_table-content-wrapper_65nkt_43", "tableContentWrapper": "_table-content-wrapper_65nkt_43", "table-action-column": "_table-action-column_65nkt_47", "tableActionColumn": "_table-action-column_65nkt_47", "table-action-dropdown": "_table-action-dropdown_65nkt_51", "tableActionDropdown": "_table-action-dropdown_65nkt_51", "action-dialog-content": "_action-dialog-content_65nkt_56", "actionDialogContent": "_action-dialog-content_65nkt_56", "add-member-dropdown": "_add-member-dropdown_65nkt_60", "addMemberDropdown": "_add-member-dropdown_65nkt_60", "add-member-dropdown-member": "_add-member-dropdown-member_65nkt_65", "addMemberDropdownMember": "_add-member-dropdown-member_65nkt_65", "add-member-dropdown-member-name": "_add-member-dropdown-member-name_65nkt_69", "addMemberDropdownMemberName": "_add-member-dropdown-member-name_65nkt_69" };
|
|
17842
17803
|
|
|
17843
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
17844
|
-
var digest65 = "
|
|
17804
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-IWUoHS40dLGa/sdk/admin/views/organizations/details/projects/members/members.module.css.js
|
|
17805
|
+
var digest65 = "08553f7500b8aca23771d6474d5c3041774f8b6772cce998a14f32e4d6bd99ad";
|
|
17845
17806
|
var css65 = `._flex1_65nkt_1 {
|
|
17846
17807
|
flex: 1;
|
|
17847
17808
|
}
|
|
@@ -18051,8 +18012,8 @@ var getColumns14 = ({
|
|
|
18051
18012
|
];
|
|
18052
18013
|
};
|
|
18053
18014
|
|
|
18054
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
18055
|
-
var digest66 = "
|
|
18015
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-W0YmA14Uvr9o/sdk/admin/views/organizations/details/projects/members/members.module.css.js
|
|
18016
|
+
var digest66 = "714dab720bb5500e428556c5f27034f4b6f8b2616463bac301b87838fcb7de95";
|
|
18056
18017
|
var css66 = `._flex1_65nkt_1 {
|
|
18057
18018
|
flex: 1;
|
|
18058
18019
|
}
|
|
@@ -18141,10 +18102,10 @@ var css66 = `._flex1_65nkt_1 {
|
|
|
18141
18102
|
var members_module_css_default5 = { "flex1": "_flex1_65nkt_1", "dialog-content": "_dialog-content_65nkt_5", "dialogContent": "_dialog-content_65nkt_5", "dialog-body": "_dialog-body_65nkt_10", "dialogBody": "_dialog-body_65nkt_10", "empty-state": "_empty-state_65nkt_14", "emptyState": "_empty-state_65nkt_14", "empty-state-subheading": "_empty-state-subheading_65nkt_18", "emptyStateSubheading": "_empty-state-subheading_65nkt_18", "table": "_table_65nkt_23", "table-wrapper": "_table-wrapper_65nkt_28", "tableWrapper": "_table-wrapper_65nkt_28", "table-header": "_table-header_65nkt_34", "tableHeader": "_table-header_65nkt_34", "table-search": "_table-search_65nkt_39", "tableSearch": "_table-search_65nkt_39", "table-content-wrapper": "_table-content-wrapper_65nkt_43", "tableContentWrapper": "_table-content-wrapper_65nkt_43", "table-action-column": "_table-action-column_65nkt_47", "tableActionColumn": "_table-action-column_65nkt_47", "table-action-dropdown": "_table-action-dropdown_65nkt_51", "tableActionDropdown": "_table-action-dropdown_65nkt_51", "action-dialog-content": "_action-dialog-content_65nkt_56", "actionDialogContent": "_action-dialog-content_65nkt_56", "add-member-dropdown": "_add-member-dropdown_65nkt_60", "addMemberDropdown": "_add-member-dropdown_65nkt_60", "add-member-dropdown-member": "_add-member-dropdown-member_65nkt_65", "addMemberDropdownMember": "_add-member-dropdown-member_65nkt_65", "add-member-dropdown-member-name": "_add-member-dropdown-member-name_65nkt_69", "addMemberDropdownMemberName": "_add-member-dropdown-member-name_65nkt_69" };
|
|
18142
18103
|
|
|
18143
18104
|
// admin/views/organizations/details/projects/members/update-role.tsx
|
|
18144
|
-
var
|
|
18105
|
+
var import_frontier44 = require("@raystack/proton/frontier");
|
|
18145
18106
|
var import_protobuf26 = require("@bufbuild/protobuf");
|
|
18146
18107
|
var import_connect6 = require("@connectrpc/connect");
|
|
18147
|
-
var
|
|
18108
|
+
var import_connect_query40 = require("@connectrpc/connect-query");
|
|
18148
18109
|
var import_apsara82 = require("@raystack/apsara");
|
|
18149
18110
|
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
18150
18111
|
var UpdateRole2 = ({
|
|
@@ -18171,13 +18132,13 @@ function UpdateRoleContent2({
|
|
|
18171
18132
|
onClose,
|
|
18172
18133
|
onRoleUpdate
|
|
18173
18134
|
}) {
|
|
18174
|
-
const { mutateAsync: setProjectMemberRole, isPending } = (0,
|
|
18175
|
-
|
|
18135
|
+
const { mutateAsync: setProjectMemberRole, isPending } = (0, import_connect_query40.useMutation)(
|
|
18136
|
+
import_frontier44.FrontierServiceQueries.setProjectMemberRole
|
|
18176
18137
|
);
|
|
18177
18138
|
async function onSubmit() {
|
|
18178
18139
|
try {
|
|
18179
18140
|
await setProjectMemberRole(
|
|
18180
|
-
(0, import_protobuf26.create)(
|
|
18141
|
+
(0, import_protobuf26.create)(import_frontier44.SetProjectMemberRoleRequestSchema, {
|
|
18181
18142
|
projectId,
|
|
18182
18143
|
principalId: payload.user.id || "",
|
|
18183
18144
|
principalType: SCOPES.USER,
|
|
@@ -18239,12 +18200,12 @@ function UpdateRoleContent2({
|
|
|
18239
18200
|
|
|
18240
18201
|
// admin/views/organizations/details/projects/members/remove-member.tsx
|
|
18241
18202
|
var import_react48 = require("react");
|
|
18242
|
-
var
|
|
18203
|
+
var import_frontier45 = require("@raystack/proton/frontier");
|
|
18243
18204
|
var import_protobuf27 = require("@bufbuild/protobuf");
|
|
18244
|
-
var
|
|
18205
|
+
var import_connect_query41 = require("@connectrpc/connect-query");
|
|
18245
18206
|
|
|
18246
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
18247
|
-
var digest67 = "
|
|
18207
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-Z25iy0vpLSb2/sdk/admin/views/organizations/details/projects/members/members.module.css.js
|
|
18208
|
+
var digest67 = "ea3c84aebd8d6d5c045964cf6ec6076aa69e0cb1dda87be5bbacf27e15017d18";
|
|
18248
18209
|
var css67 = `._flex1_65nkt_1 {
|
|
18249
18210
|
flex: 1;
|
|
18250
18211
|
}
|
|
@@ -18343,8 +18304,8 @@ var RemoveMember2 = ({
|
|
|
18343
18304
|
}) => {
|
|
18344
18305
|
const t = useTerminology();
|
|
18345
18306
|
const [isSubmitting, setIsSubmitting] = (0, import_react48.useState)(false);
|
|
18346
|
-
const { mutateAsync: removeProjectMember } = (0,
|
|
18347
|
-
|
|
18307
|
+
const { mutateAsync: removeProjectMember } = (0, import_connect_query41.useMutation)(
|
|
18308
|
+
import_frontier45.FrontierServiceQueries.removeProjectMember
|
|
18348
18309
|
);
|
|
18349
18310
|
async function onSubmit() {
|
|
18350
18311
|
try {
|
|
@@ -18352,7 +18313,7 @@ var RemoveMember2 = ({
|
|
|
18352
18313
|
return;
|
|
18353
18314
|
setIsSubmitting(true);
|
|
18354
18315
|
await removeProjectMember(
|
|
18355
|
-
(0, import_protobuf27.create)(
|
|
18316
|
+
(0, import_protobuf27.create)(import_frontier45.RemoveProjectMemberRequestSchema, {
|
|
18356
18317
|
projectId,
|
|
18357
18318
|
principalId: user.id,
|
|
18358
18319
|
principalType: "app/user"
|
|
@@ -18442,8 +18403,8 @@ var RemoveMember2 = ({
|
|
|
18442
18403
|
// admin/views/organizations/details/projects/members/add-members-dropdown.tsx
|
|
18443
18404
|
var import_apsara84 = require("@raystack/apsara");
|
|
18444
18405
|
|
|
18445
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
18446
|
-
var digest68 = "
|
|
18406
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-rrOKUywFUcrc/sdk/admin/views/organizations/details/projects/members/members.module.css.js
|
|
18407
|
+
var digest68 = "28badb3b1f71585c32bf3cb3956c444b798cc2ad2baa5e4ba1928256419a6600";
|
|
18447
18408
|
var css68 = `._flex1_65nkt_1 {
|
|
18448
18409
|
flex: 1;
|
|
18449
18410
|
}
|
|
@@ -18629,17 +18590,17 @@ var ProjectMembersDialog = ({
|
|
|
18629
18590
|
200
|
|
18630
18591
|
);
|
|
18631
18592
|
const [removeMemberConfig, setRemoveMemberConfig] = (0, import_react49.useState)({ isOpen: false, user: null });
|
|
18632
|
-
const { data: project, isLoading: isProjectLoading, error: projectError } = (0,
|
|
18633
|
-
|
|
18634
|
-
(0, import_protobuf28.create)(
|
|
18593
|
+
const { data: project, isLoading: isProjectLoading, error: projectError } = (0, import_connect_query42.useQuery)(
|
|
18594
|
+
import_frontier46.FrontierServiceQueries.getProject,
|
|
18595
|
+
(0, import_protobuf28.create)(import_frontier46.GetProjectRequestSchema, { id: projectId }),
|
|
18635
18596
|
{
|
|
18636
18597
|
enabled: !!projectId,
|
|
18637
18598
|
select: (data2) => data2?.project
|
|
18638
18599
|
}
|
|
18639
18600
|
);
|
|
18640
|
-
const { data: projectRoles = [], isLoading: isProjectRolesLoading, error: rolesError } = (0,
|
|
18641
|
-
|
|
18642
|
-
(0, import_protobuf28.create)(
|
|
18601
|
+
const { data: projectRoles = [], isLoading: isProjectRolesLoading, error: rolesError } = (0, import_connect_query42.useQuery)(
|
|
18602
|
+
import_frontier46.FrontierServiceQueries.listRoles,
|
|
18603
|
+
(0, import_protobuf28.create)(import_frontier46.ListRolesRequestSchema, { scopes: [PROJECT_NAMESPACE] }),
|
|
18643
18604
|
{
|
|
18644
18605
|
select: (data2) => data2?.roles || []
|
|
18645
18606
|
}
|
|
@@ -18657,8 +18618,8 @@ var ProjectMembersDialog = ({
|
|
|
18657
18618
|
fetchNextPage,
|
|
18658
18619
|
hasNextPage,
|
|
18659
18620
|
refetch
|
|
18660
|
-
} = (0,
|
|
18661
|
-
|
|
18621
|
+
} = (0, import_connect_query42.useInfiniteQuery)(
|
|
18622
|
+
import_frontier46.AdminServiceQueries.searchProjectUsers,
|
|
18662
18623
|
{ id: projectId, query: tableQuery.rqlRequest },
|
|
18663
18624
|
{
|
|
18664
18625
|
pageParamKey: "query",
|
|
@@ -18875,8 +18836,8 @@ function OrganizationProjectsView() {
|
|
|
18875
18836
|
hasNextPage,
|
|
18876
18837
|
refetch: refetchOrgProjects,
|
|
18877
18838
|
isError
|
|
18878
|
-
} = (0,
|
|
18879
|
-
|
|
18839
|
+
} = (0, import_connect_query43.useInfiniteQuery)(
|
|
18840
|
+
import_frontier47.AdminServiceQueries.searchOrganizationProjects,
|
|
18880
18841
|
{ id: organizationId, query },
|
|
18881
18842
|
{
|
|
18882
18843
|
enabled: !!organizationId,
|
|
@@ -18967,8 +18928,8 @@ function OrganizationProjectsView() {
|
|
|
18967
18928
|
// admin/views/organizations/details/invoices/index.tsx
|
|
18968
18929
|
var import_apsara88 = require("@raystack/apsara");
|
|
18969
18930
|
|
|
18970
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
18971
|
-
var digest69 = "
|
|
18931
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-WWAxGjaLoLyV/sdk/admin/views/organizations/details/invoices/invoices.module.css.js
|
|
18932
|
+
var digest69 = "cbe703deecc03176a8099ada62ed24b53f68b69432f717cb879aca828162b7bb";
|
|
18972
18933
|
var css69 = `._empty-state_ct7gw_1 {
|
|
18973
18934
|
height: 100%;
|
|
18974
18935
|
}
|
|
@@ -19014,8 +18975,8 @@ var invoices_module_css_default4 = { "empty-state": "_empty-state_ct7gw_1", "emp
|
|
|
19014
18975
|
// admin/views/organizations/details/invoices/index.tsx
|
|
19015
18976
|
var import_react51 = require("react");
|
|
19016
18977
|
|
|
19017
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
19018
|
-
var digest70 = "
|
|
18978
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-lR2Wih2cewrM/sdk/admin/views/organizations/details/invoices/invoices.module.css.js
|
|
18979
|
+
var digest70 = "b745cd8d213cbac34dbfa6b3543d020ab248ef948f9bce789128651d3f4dca87";
|
|
19019
18980
|
var css70 = `._empty-state_ct7gw_1 {
|
|
19020
18981
|
height: 100%;
|
|
19021
18982
|
}
|
|
@@ -19059,7 +19020,6 @@ var css70 = `._empty-state_ct7gw_1 {
|
|
|
19059
19020
|
var invoices_module_css_default5 = { "empty-state": "_empty-state_ct7gw_1", "emptyState": "_empty-state_ct7gw_1", "empty-state-subheading": "_empty-state-subheading_ct7gw_5", "emptyStateSubheading": "_empty-state-subheading_ct7gw_5", "table": "_table_ct7gw_10", "table-wrapper": "_table-wrapper_ct7gw_15", "tableWrapper": "_table-wrapper_ct7gw_15", "table-header": "_table-header_ct7gw_21", "tableHeader": "_table-header_ct7gw_21", "first-column": "_first-column_ct7gw_26", "firstColumn": "_first-column_ct7gw_26" };
|
|
19060
19021
|
|
|
19061
19022
|
// admin/views/organizations/details/invoices/columns.tsx
|
|
19062
|
-
var import_dayjs15 = __toESM(require("dayjs"));
|
|
19063
19023
|
var import_apsara87 = require("@raystack/apsara");
|
|
19064
19024
|
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
19065
19025
|
var InvoiceStatusesMap = {
|
|
@@ -19079,11 +19039,7 @@ var getColumns15 = ({
|
|
|
19079
19039
|
cell: invoices_module_css_default5["first-column"],
|
|
19080
19040
|
header: invoices_module_css_default5["first-column"]
|
|
19081
19041
|
},
|
|
19082
|
-
cell: ({ getValue }) =>
|
|
19083
|
-
const value = getValue();
|
|
19084
|
-
const date = isNullTimestamp(value) ? "-" : (0, import_dayjs15.default)(timestampToDate(value)).format("YYYY-MM-DD");
|
|
19085
|
-
return date;
|
|
19086
|
-
},
|
|
19042
|
+
cell: ({ getValue }) => formatTimestamp(getValue()),
|
|
19087
19043
|
enableSorting: true,
|
|
19088
19044
|
enableColumnFilter: true,
|
|
19089
19045
|
filterType: "date"
|
|
@@ -19130,8 +19086,8 @@ var getColumns15 = ({
|
|
|
19130
19086
|
];
|
|
19131
19087
|
|
|
19132
19088
|
// admin/views/organizations/details/invoices/index.tsx
|
|
19133
|
-
var
|
|
19134
|
-
var
|
|
19089
|
+
var import_frontier48 = require("@raystack/proton/frontier");
|
|
19090
|
+
var import_connect_query44 = require("@connectrpc/connect-query");
|
|
19135
19091
|
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
19136
19092
|
var DEFAULT_SORT7 = { name: "createdAt", order: "desc" };
|
|
19137
19093
|
var INITIAL_QUERY8 = {
|
|
@@ -19224,8 +19180,8 @@ function OrganizationInvoicesView() {
|
|
|
19224
19180
|
fetchNextPage,
|
|
19225
19181
|
hasNextPage,
|
|
19226
19182
|
isError
|
|
19227
|
-
} = (0,
|
|
19228
|
-
|
|
19183
|
+
} = (0, import_connect_query44.useInfiniteQuery)(
|
|
19184
|
+
import_frontier48.FrontierServiceQueries.searchOrganizationInvoices,
|
|
19229
19185
|
{ id: organizationId, query },
|
|
19230
19186
|
{
|
|
19231
19187
|
enabled: !!organizationId,
|
|
@@ -19295,8 +19251,8 @@ function OrganizationInvoicesView() {
|
|
|
19295
19251
|
// admin/views/organizations/details/tokens/index.tsx
|
|
19296
19252
|
var import_apsara90 = require("@raystack/apsara");
|
|
19297
19253
|
|
|
19298
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
19299
|
-
var digest71 = "
|
|
19254
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-3B610iKjoJLX/sdk/admin/views/organizations/details/tokens/tokens.module.css.js
|
|
19255
|
+
var digest71 = "f2cfe02a4eb4924cb2cc2909c81514969aecf0bfdf60a3adaa14e2291e797752";
|
|
19300
19256
|
var css71 = `._empty-state_1mf09_1 {
|
|
19301
19257
|
height: 100%;
|
|
19302
19258
|
}
|
|
@@ -19353,11 +19309,11 @@ var tokens_module_css_default = { "empty-state": "_empty-state_1mf09_1", "emptyS
|
|
|
19353
19309
|
// admin/views/organizations/details/tokens/index.tsx
|
|
19354
19310
|
var import_icons8 = require("@raystack/apsara/icons");
|
|
19355
19311
|
var import_react52 = require("react");
|
|
19356
|
-
var
|
|
19357
|
-
var
|
|
19312
|
+
var import_frontier49 = require("@raystack/proton/frontier");
|
|
19313
|
+
var import_connect_query45 = require("@connectrpc/connect-query");
|
|
19358
19314
|
|
|
19359
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
19360
|
-
var digest72 = "
|
|
19315
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-XgTXfYEqA871/sdk/admin/views/organizations/details/tokens/tokens.module.css.js
|
|
19316
|
+
var digest72 = "2afbc866eb8ef5bdb9fe8c7af64d20795d151e580d4225974f279fef396d52f9";
|
|
19361
19317
|
var css72 = `._empty-state_1mf09_1 {
|
|
19362
19318
|
height: 100%;
|
|
19363
19319
|
}
|
|
@@ -19412,7 +19368,6 @@ var css72 = `._empty-state_1mf09_1 {
|
|
|
19412
19368
|
var tokens_module_css_default2 = { "empty-state": "_empty-state_1mf09_1", "emptyState": "_empty-state_1mf09_1", "empty-state-subheading": "_empty-state-subheading_1mf09_5", "emptyStateSubheading": "_empty-state-subheading_1mf09_5", "table": "_table_1mf09_10", "table-wrapper": "_table-wrapper_1mf09_15", "tableWrapper": "_table-wrapper_1mf09_15", "table-header": "_table-header_1mf09_21", "tableHeader": "_table-header_1mf09_21", "first-column": "_first-column_1mf09_26", "firstColumn": "_first-column_1mf09_26", "truncate-tooltip-wrapper": "_truncate-tooltip-wrapper_1mf09_31", "truncateTooltipWrapper": "_truncate-tooltip-wrapper_1mf09_31", "truncate-text": "_truncate-text_1mf09_35", "truncateText": "_truncate-text_1mf09_35" };
|
|
19413
19369
|
|
|
19414
19370
|
// admin/views/organizations/details/tokens/columns.tsx
|
|
19415
|
-
var import_dayjs16 = __toESM(require("dayjs"));
|
|
19416
19371
|
var import_apsara89 = require("@raystack/apsara");
|
|
19417
19372
|
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
19418
19373
|
var getColumns16 = ({ t }) => {
|
|
@@ -19425,11 +19380,7 @@ var getColumns16 = ({ t }) => {
|
|
|
19425
19380
|
header: tokens_module_css_default2["first-column"]
|
|
19426
19381
|
},
|
|
19427
19382
|
styles: { header: { width: "180px" } },
|
|
19428
|
-
cell: ({ getValue }) =>
|
|
19429
|
-
const value = getValue();
|
|
19430
|
-
const date = isNullTimestamp(value) ? "-" : (0, import_dayjs16.default)(timestampToDate(value)).format("YYYY-MM-DD");
|
|
19431
|
-
return date;
|
|
19432
|
-
},
|
|
19383
|
+
cell: ({ getValue }) => formatTimestamp(getValue()),
|
|
19433
19384
|
enableSorting: true,
|
|
19434
19385
|
enableColumnFilter: true,
|
|
19435
19386
|
filterType: "date"
|
|
@@ -19564,8 +19515,8 @@ function OrganizationTokensView() {
|
|
|
19564
19515
|
fetchNextPage,
|
|
19565
19516
|
hasNextPage,
|
|
19566
19517
|
isError
|
|
19567
|
-
} = (0,
|
|
19568
|
-
|
|
19518
|
+
} = (0, import_connect_query45.useInfiniteQuery)(
|
|
19519
|
+
import_frontier49.FrontierServiceQueries.searchOrganizationTokens,
|
|
19569
19520
|
{ id: organizationId, query },
|
|
19570
19521
|
{
|
|
19571
19522
|
enabled: !!organizationId,
|
|
@@ -19634,8 +19585,8 @@ function OrganizationTokensView() {
|
|
|
19634
19585
|
// admin/views/organizations/details/apis/index.tsx
|
|
19635
19586
|
var import_apsara93 = require("@raystack/apsara");
|
|
19636
19587
|
|
|
19637
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
19638
|
-
var digest73 = "
|
|
19588
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-GnhZnimWln01/sdk/admin/views/organizations/details/apis/apis.module.css.js
|
|
19589
|
+
var digest73 = "5b80c686172f125ab640a8eba2fdade7ea97a6853fee8239a42136f699ae32c9";
|
|
19639
19590
|
var css73 = `._empty-state_r9k2f_1 {
|
|
19640
19591
|
height: 100%;
|
|
19641
19592
|
}
|
|
@@ -19718,10 +19669,9 @@ var import_react54 = require("react");
|
|
|
19718
19669
|
|
|
19719
19670
|
// admin/views/organizations/details/apis/columns.tsx
|
|
19720
19671
|
var import_apsara91 = require("@raystack/apsara");
|
|
19721
|
-
var import_dayjs17 = __toESM(require("dayjs"));
|
|
19722
19672
|
|
|
19723
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
19724
|
-
var digest74 = "
|
|
19673
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-Cv6Daj3XxMgu/sdk/admin/views/organizations/details/apis/apis.module.css.js
|
|
19674
|
+
var digest74 = "90406517ce56a487f0ac8c98812c411215bddd6c6420ec71e1a7968f66f16516";
|
|
19725
19675
|
var css74 = `._empty-state_r9k2f_1 {
|
|
19726
19676
|
height: 100%;
|
|
19727
19677
|
}
|
|
@@ -19828,12 +19778,9 @@ function getColumns17(options) {
|
|
|
19828
19778
|
enableColumnFilter: true
|
|
19829
19779
|
},
|
|
19830
19780
|
{
|
|
19831
|
-
accessorKey: "
|
|
19781
|
+
accessorKey: "createdAt",
|
|
19832
19782
|
header: "Created on",
|
|
19833
|
-
cell: ({ getValue }) =>
|
|
19834
|
-
const value = getValue();
|
|
19835
|
-
return value !== NULL_DATE ? (0, import_dayjs17.default)(value).format("YYYY-MM-DD") : "-";
|
|
19836
|
-
},
|
|
19783
|
+
cell: ({ getValue }) => formatTimestamp(getValue()),
|
|
19837
19784
|
enableSorting: true,
|
|
19838
19785
|
enableColumnFilter: true,
|
|
19839
19786
|
filterType: "date",
|
|
@@ -19845,8 +19792,8 @@ function getColumns17(options) {
|
|
|
19845
19792
|
// admin/views/organizations/details/apis/details-dialog.tsx
|
|
19846
19793
|
var import_apsara92 = require("@raystack/apsara");
|
|
19847
19794
|
|
|
19848
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
19849
|
-
var digest75 = "
|
|
19795
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-6ML7oTsdBPng/sdk/admin/views/organizations/details/apis/apis.module.css.js
|
|
19796
|
+
var digest75 = "dd5f8fba7b4d05c70514c4dd3d49a65adbc2a24413186da624d608d40736bfb7";
|
|
19850
19797
|
var css75 = `._empty-state_r9k2f_1 {
|
|
19851
19798
|
height: 100%;
|
|
19852
19799
|
}
|
|
@@ -19926,8 +19873,8 @@ var apis_module_css_default3 = { "empty-state": "_empty-state_r9k2f_1", "emptySt
|
|
|
19926
19873
|
|
|
19927
19874
|
// admin/views/organizations/details/apis/details-dialog.tsx
|
|
19928
19875
|
var import_react53 = require("react");
|
|
19929
|
-
var
|
|
19930
|
-
var
|
|
19876
|
+
var import_connect_query46 = require("@connectrpc/connect-query");
|
|
19877
|
+
var import_frontier50 = require("@raystack/proton/frontier");
|
|
19931
19878
|
var import_protobuf29 = require("@bufbuild/protobuf");
|
|
19932
19879
|
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
19933
19880
|
var ServiceUserDetailsDialog = ({
|
|
@@ -19937,14 +19884,14 @@ var ServiceUserDetailsDialog = ({
|
|
|
19937
19884
|
const t = useTerminology();
|
|
19938
19885
|
const { id = "", orgId = "", title = "" } = serviceUser || {};
|
|
19939
19886
|
const projectsRequest = (0, import_react53.useMemo)(
|
|
19940
|
-
() => (0, import_protobuf29.create)(
|
|
19887
|
+
() => (0, import_protobuf29.create)(import_frontier50.ListServiceUserProjectsRequestSchema, {
|
|
19941
19888
|
orgId,
|
|
19942
19889
|
id
|
|
19943
19890
|
}),
|
|
19944
19891
|
[orgId, id]
|
|
19945
19892
|
);
|
|
19946
19893
|
const tokensRequest = (0, import_react53.useMemo)(
|
|
19947
|
-
() => (0, import_protobuf29.create)(
|
|
19894
|
+
() => (0, import_protobuf29.create)(import_frontier50.ListServiceUserTokensRequestSchema, {
|
|
19948
19895
|
orgId,
|
|
19949
19896
|
id
|
|
19950
19897
|
}),
|
|
@@ -19954,7 +19901,7 @@ var ServiceUserDetailsDialog = ({
|
|
|
19954
19901
|
data: projects = [],
|
|
19955
19902
|
isLoading: isProjectLoading,
|
|
19956
19903
|
error: projectError
|
|
19957
|
-
} = (0,
|
|
19904
|
+
} = (0, import_connect_query46.useQuery)(import_frontier50.FrontierServiceQueries.listServiceUserProjects, projectsRequest, {
|
|
19958
19905
|
enabled: !!orgId && !!id,
|
|
19959
19906
|
select: (data) => data?.projects || []
|
|
19960
19907
|
});
|
|
@@ -19962,7 +19909,7 @@ var ServiceUserDetailsDialog = ({
|
|
|
19962
19909
|
data: tokens = [],
|
|
19963
19910
|
isLoading: isTokenLoading,
|
|
19964
19911
|
error: tokenError
|
|
19965
|
-
} = (0,
|
|
19912
|
+
} = (0, import_connect_query46.useQuery)(import_frontier50.FrontierServiceQueries.listServiceUserTokens, tokensRequest, {
|
|
19966
19913
|
enabled: !!orgId && !!id,
|
|
19967
19914
|
select: (data) => data?.tokens || []
|
|
19968
19915
|
});
|
|
@@ -20022,7 +19969,7 @@ var ServiceUserDetailsDialog = ({
|
|
|
20022
19969
|
gap: 2,
|
|
20023
19970
|
children: [
|
|
20024
19971
|
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_apsara92.Text, { weight: "medium", children: token.title }),
|
|
20025
|
-
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_apsara92.Text, { size: "micro", children:
|
|
19972
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_apsara92.Text, { size: "micro", children: formatTimestamp(token.createdAt) })
|
|
20026
19973
|
]
|
|
20027
19974
|
},
|
|
20028
19975
|
token.id
|
|
@@ -20049,8 +19996,8 @@ var ServiceUserDetailsDialog = ({
|
|
|
20049
19996
|
};
|
|
20050
19997
|
|
|
20051
19998
|
// admin/views/organizations/details/apis/index.tsx
|
|
20052
|
-
var
|
|
20053
|
-
var
|
|
19999
|
+
var import_connect_query47 = require("@connectrpc/connect-query");
|
|
20000
|
+
var import_frontier51 = require("@raystack/proton/frontier");
|
|
20054
20001
|
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
20055
20002
|
var NoCredentials = () => {
|
|
20056
20003
|
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
@@ -20127,8 +20074,8 @@ function OrganizationApisView() {
|
|
|
20127
20074
|
error,
|
|
20128
20075
|
isError,
|
|
20129
20076
|
hasNextPage
|
|
20130
|
-
} = (0,
|
|
20131
|
-
|
|
20077
|
+
} = (0, import_connect_query47.useInfiniteQuery)(
|
|
20078
|
+
import_frontier51.AdminServiceQueries.searchOrganizationServiceUsers,
|
|
20132
20079
|
{ id: organizationId, query },
|
|
20133
20080
|
{
|
|
20134
20081
|
pageParamKey: "query",
|
|
@@ -20220,12 +20167,12 @@ function OrganizationApisView() {
|
|
|
20220
20167
|
// admin/views/organizations/details/pat/index.tsx
|
|
20221
20168
|
var import_apsara96 = require("@raystack/apsara");
|
|
20222
20169
|
var import_react56 = require("react");
|
|
20223
|
-
var
|
|
20224
|
-
var
|
|
20170
|
+
var import_connect_query49 = require("@connectrpc/connect-query");
|
|
20171
|
+
var import_frontier53 = require("@raystack/proton/frontier");
|
|
20225
20172
|
|
|
20226
20173
|
// admin/views/organizations/details/pat/columns.tsx
|
|
20227
20174
|
var import_apsara94 = require("@raystack/apsara");
|
|
20228
|
-
var
|
|
20175
|
+
var import_dayjs4 = __toESM(require("dayjs"));
|
|
20229
20176
|
var import_relativeTime2 = __toESM(require("dayjs/plugin/relativeTime"));
|
|
20230
20177
|
|
|
20231
20178
|
// utils/index.ts
|
|
@@ -20237,8 +20184,8 @@ var getInitials = function(name = "") {
|
|
|
20237
20184
|
return initials;
|
|
20238
20185
|
};
|
|
20239
20186
|
|
|
20240
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
20241
|
-
var digest76 = "
|
|
20187
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-83s3fYYxscKO/sdk/admin/views/organizations/details/pat/pat.module.css.js
|
|
20188
|
+
var digest76 = "a89329b8aed64ed7ebff531735c90d2f27bcb111062b8259ae3ff3d635500a6a";
|
|
20242
20189
|
var css76 = `._empty-state_1xap9_1 {
|
|
20243
20190
|
height: 100%;
|
|
20244
20191
|
}
|
|
@@ -20302,8 +20249,7 @@ var pat_module_css_default = { "empty-state": "_empty-state_1xap9_1", "emptyStat
|
|
|
20302
20249
|
|
|
20303
20250
|
// admin/views/organizations/details/pat/columns.tsx
|
|
20304
20251
|
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
20305
|
-
|
|
20306
|
-
var DATE_FORMAT = "DD MMM YYYY";
|
|
20252
|
+
import_dayjs4.default.extend(import_relativeTime2.default);
|
|
20307
20253
|
function getColumns18({
|
|
20308
20254
|
projectsMap
|
|
20309
20255
|
}) {
|
|
@@ -20362,10 +20308,7 @@ function getColumns18({
|
|
|
20362
20308
|
accessorKey: "createdAt",
|
|
20363
20309
|
header: "Created On",
|
|
20364
20310
|
styles: { header: { width: "152px" } },
|
|
20365
|
-
cell: ({
|
|
20366
|
-
const date = timestampToDayjs(row.original.createdAt);
|
|
20367
|
-
return date ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_apsara94.Text, { children: date.format(DATE_FORMAT) }) : /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_apsara94.Text, { children: "-" });
|
|
20368
|
-
},
|
|
20311
|
+
cell: ({ getValue }) => /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_apsara94.Text, { children: formatTimestamp(getValue()) }),
|
|
20369
20312
|
enableSorting: true,
|
|
20370
20313
|
enableColumnFilter: true,
|
|
20371
20314
|
filterType: "date",
|
|
@@ -20375,13 +20318,7 @@ function getColumns18({
|
|
|
20375
20318
|
accessorKey: "expiresAt",
|
|
20376
20319
|
header: "Expiry Date",
|
|
20377
20320
|
styles: { header: { width: "152px" } },
|
|
20378
|
-
cell: ({
|
|
20379
|
-
const expiresAt = row.original.expiresAt;
|
|
20380
|
-
if (!expiresAt || isNullTimestamp(expiresAt))
|
|
20381
|
-
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_apsara94.Text, { children: "-" });
|
|
20382
|
-
const date = timestampToDayjs(expiresAt);
|
|
20383
|
-
return date ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_apsara94.Text, { children: date.format(DATE_FORMAT) }) : /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_apsara94.Text, { children: "-" });
|
|
20384
|
-
},
|
|
20321
|
+
cell: ({ getValue }) => /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_apsara94.Text, { children: formatTimestamp(getValue()) }),
|
|
20385
20322
|
enableSorting: true,
|
|
20386
20323
|
enableColumnFilter: true,
|
|
20387
20324
|
filterType: "date",
|
|
@@ -20409,11 +20346,11 @@ function getColumns18({
|
|
|
20409
20346
|
// admin/views/organizations/details/pat/components/pat-details-dialog.tsx
|
|
20410
20347
|
var import_react55 = require("react");
|
|
20411
20348
|
var import_apsara95 = require("@raystack/apsara");
|
|
20412
|
-
var
|
|
20413
|
-
var
|
|
20349
|
+
var import_connect_query48 = require("@connectrpc/connect-query");
|
|
20350
|
+
var import_frontier52 = require("@raystack/proton/frontier");
|
|
20414
20351
|
|
|
20415
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
20416
|
-
var digest77 = "
|
|
20352
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-pCdWCCoPEmem/sdk/admin/views/organizations/details/pat/components/pat-details-dialog.module.css.js
|
|
20353
|
+
var digest77 = "bd2a5c53b25b36fbe1b664c259149210ed9d3fb292b409d6e8a88f3ef472744a";
|
|
20417
20354
|
var css77 = `._details-dialog_1dwlo_1 {
|
|
20418
20355
|
width: 100%;
|
|
20419
20356
|
max-width: 400px;
|
|
@@ -20500,8 +20437,8 @@ function PatDetailsDialog({
|
|
|
20500
20437
|
() => scopeProjectIds.map((id) => projectsMap[id]).filter((p) => Boolean(p)),
|
|
20501
20438
|
[scopeProjectIds, projectsMap]
|
|
20502
20439
|
);
|
|
20503
|
-
const { data: rolesData, isLoading: isRolesLoading } = (0,
|
|
20504
|
-
|
|
20440
|
+
const { data: rolesData, isLoading: isRolesLoading } = (0, import_connect_query48.useQuery)(
|
|
20441
|
+
import_frontier52.FrontierServiceQueries.listRolesForPAT,
|
|
20505
20442
|
{ scopes: [SCOPES.ORG, SCOPES.PROJECT] },
|
|
20506
20443
|
{ enabled: open }
|
|
20507
20444
|
);
|
|
@@ -20604,8 +20541,8 @@ function PatDetailsDialog({
|
|
|
20604
20541
|
] }) });
|
|
20605
20542
|
}
|
|
20606
20543
|
|
|
20607
|
-
// esbuild-css-modules-plugin-namespace:/tmp/tmp-
|
|
20608
|
-
var digest78 = "
|
|
20544
|
+
// esbuild-css-modules-plugin-namespace:/tmp/tmp-2387-Dh6KsC9uRTkX/sdk/admin/views/organizations/details/pat/pat.module.css.js
|
|
20545
|
+
var digest78 = "032895c421a8e59cc64e89a6c316ef66c2680082ab6036bb6850e23bf3029c96";
|
|
20609
20546
|
var css78 = `._empty-state_1xap9_1 {
|
|
20610
20547
|
height: 100%;
|
|
20611
20548
|
}
|
|
@@ -20753,8 +20690,8 @@ function OrganizationPatView() {
|
|
|
20753
20690
|
fetchNextPage,
|
|
20754
20691
|
hasNextPage,
|
|
20755
20692
|
isError
|
|
20756
|
-
} = (0,
|
|
20757
|
-
|
|
20693
|
+
} = (0, import_connect_query49.useInfiniteQuery)(
|
|
20694
|
+
import_frontier53.AdminServiceQueries.searchOrganizationPATs,
|
|
20758
20695
|
{ orgId: organizationId, query },
|
|
20759
20696
|
{
|
|
20760
20697
|
enabled: !!organizationId,
|
|
@@ -20766,8 +20703,8 @@ function OrganizationPatView() {
|
|
|
20766
20703
|
retryDelay: 1e3
|
|
20767
20704
|
}
|
|
20768
20705
|
);
|
|
20769
|
-
const { data: projects = [] } = (0,
|
|
20770
|
-
|
|
20706
|
+
const { data: projects = [] } = (0, import_connect_query49.useQuery)(
|
|
20707
|
+
import_frontier53.FrontierServiceQueries.listOrganizationProjects,
|
|
20771
20708
|
{ id: organizationId, state: "", withMemberCount: false },
|
|
20772
20709
|
{
|
|
20773
20710
|
enabled: !!organizationId,
|