@secrecy/trpc-api-types 1.40.1 → 1.41.0-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.d.ts +548 -217
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -103,46 +103,122 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
103
103
  transformer: true;
104
104
  }, _trpc_server.TRPCDecorateCreateRouterOptions<{
105
105
  limits: _trpc_server.TRPCQueryProcedure<{
106
- input: Record<string, never> | undefined;
106
+ input: {
107
+ appId?: string | null | undefined;
108
+ paidByApp?: boolean | undefined;
109
+ userIds?: string[] | undefined;
110
+ };
107
111
  output: {
108
- cloud: {
109
- count: bigint;
110
- maxCount: bigint | null;
111
- size: bigint;
112
- maxSize: bigint | null;
112
+ metrics: {
113
+ lastReset: Date;
114
+ hasDatabase: boolean;
115
+ devsCount: bigint;
116
+ usersCount: bigint;
117
+ } & {
118
+ totalDataCount: bigint;
119
+ totalDataSize: bigint;
113
120
  downloadBandwidth: bigint;
114
- maxDownloadBandwidth: bigint | null;
115
- uploadBandwidth: bigint;
116
- maxUploadBandwidth: bigint | null;
117
121
  downloadCount: bigint;
118
- maxDownloadCount: bigint | null;
122
+ uploadBandwidth: bigint;
119
123
  uploadCount: bigint;
120
- maxUploadCount: bigint | null;
121
- };
122
- mail: {
123
- sent: {
124
- count: bigint;
125
- maxCount: bigint | null;
126
- dataCount: bigint;
127
- maxDataCount: bigint | null;
128
- dataSize: bigint;
129
- maxDataSize: bigint | null;
124
+ sentMailCount: bigint;
125
+ sentMailDataCount: bigint;
126
+ sentMailDataSize: bigint;
127
+ };
128
+ quotas: {
129
+ devsCount: bigint | null;
130
+ usersCount: bigint | null;
131
+ bandwidth: bigint | null;
132
+ totalDataSize: bigint | null;
133
+ totalDataCount: bigint | null;
134
+ perDataSize: bigint | null;
135
+ uploadCount: bigint | null;
136
+ downloadCount: bigint | null;
137
+ sentMails: {
138
+ count: bigint | null;
139
+ perDataSize: bigint | null;
140
+ totalStorageSize: bigint | null;
141
+ totalDataCount: bigint | null;
142
+ dataCount: bigint | null;
143
+ dataSize: bigint | null;
144
+ totalCount: bigint | null;
130
145
  };
131
146
  };
147
+ object: "application-limits";
148
+ } | {
149
+ lastReset: Date;
150
+ details: {
151
+ userId: string;
152
+ metrics: {
153
+ totalDataCount: bigint;
154
+ totalDataSize: bigint;
155
+ downloadBandwidth: bigint;
156
+ downloadCount: bigint;
157
+ uploadBandwidth: bigint;
158
+ uploadCount: bigint;
159
+ sentMailCount: bigint;
160
+ sentMailDataCount: bigint;
161
+ sentMailDataSize: bigint;
162
+ };
163
+ quotas: {
164
+ totalDataSize: bigint | null;
165
+ totalDataCount: bigint | null;
166
+ uploadBandwidth: bigint | null;
167
+ downloadBandwidth: bigint | null;
168
+ perDataSize: bigint | null;
169
+ uploadCount: bigint | null;
170
+ downloadCount: bigint | null;
171
+ sentMails: {
172
+ count: bigint | null;
173
+ perDataSize: bigint | null;
174
+ totalStorageSize: bigint | null;
175
+ totalDataCount: bigint | null;
176
+ dataCount: bigint | null;
177
+ dataSize: bigint | null;
178
+ totalCount: bigint | null;
179
+ } | null;
180
+ } | null;
181
+ }[];
182
+ object: "application-limits-details";
132
183
  };
133
184
  meta: any;
134
185
  }>;
135
186
  metrics: _trpc_server.TRPCQueryProcedure<{
136
187
  input: {
137
188
  appId?: string | undefined;
189
+ paidByApp?: boolean | undefined;
190
+ userIds?: string[] | undefined;
138
191
  };
139
- output: {
192
+ output: ({
193
+ lastReset: Date;
140
194
  hasDatabase: boolean;
141
- developers: number;
142
- users: number;
143
- storageUsage: number;
144
- downloadBandwidthUsage: number;
145
- uploadBandwidthUsage: number;
195
+ devsCount: bigint;
196
+ usersCount: bigint;
197
+ } & {
198
+ totalDataCount: bigint;
199
+ totalDataSize: bigint;
200
+ downloadBandwidth: bigint;
201
+ downloadCount: bigint;
202
+ uploadBandwidth: bigint;
203
+ uploadCount: bigint;
204
+ sentMailCount: bigint;
205
+ sentMailDataCount: bigint;
206
+ sentMailDataSize: bigint;
207
+ }) | {
208
+ lastReset: Date;
209
+ details: ({
210
+ userId: string;
211
+ } & {
212
+ totalDataCount: bigint;
213
+ totalDataSize: bigint;
214
+ downloadBandwidth: bigint;
215
+ downloadCount: bigint;
216
+ uploadBandwidth: bigint;
217
+ uploadCount: bigint;
218
+ sentMailCount: bigint;
219
+ sentMailDataCount: bigint;
220
+ sentMailDataSize: bigint;
221
+ })[];
146
222
  };
147
223
  meta: any;
148
224
  }>;
@@ -211,8 +287,6 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
211
287
  } & {
212
288
  quotas: {
213
289
  users: bigint | null;
214
- totalStorageSize: bigint | null;
215
- perDataSize: bigint | null;
216
290
  devs: bigint | null;
217
291
  devsBase: bigint | null;
218
292
  devsUnit: bigint | null;
@@ -220,6 +294,7 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
220
294
  usersBase: bigint | null;
221
295
  usersUnit: bigint | null;
222
296
  usersPrice: number | null;
297
+ perDataSize: bigint | null;
223
298
  perDataSizeBase: bigint | null;
224
299
  perDataSizeUnit: bigint | null;
225
300
  perDataSizePrice: number | null;
@@ -227,19 +302,20 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
227
302
  bandwidthBase: bigint | null;
228
303
  bandwidthUnit: bigint | null;
229
304
  bandwidthPrice: number | null;
305
+ totalStorageSize: bigint | null;
230
306
  totalStorageSizeBase: bigint | null;
231
307
  totalStorageSizeUnit: bigint | null;
232
308
  totalStorageSizePrice: number | null;
233
309
  baseQuotasId: string;
234
310
  } & {
235
311
  baseQuotas: {
312
+ perDataSize: bigint | null;
313
+ totalStorageSize: bigint | null;
314
+ totalDataCount: bigint | null;
236
315
  downloadBandwidth: bigint | null;
237
- uploadBandwidth: bigint | null;
238
316
  downloadCount: bigint | null;
317
+ uploadBandwidth: bigint | null;
239
318
  uploadCount: bigint | null;
240
- totalDataCount: bigint | null;
241
- totalStorageSize: bigint | null;
242
- perDataSize: bigint | null;
243
319
  sentMailsId: string;
244
320
  };
245
321
  };
@@ -260,11 +336,40 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
260
336
  };
261
337
  meta: any;
262
338
  }>;
339
+ setUsersLimits: _trpc_server.TRPCMutationProcedure<{
340
+ input: {
341
+ appId?: string | undefined;
342
+ users: ({
343
+ userId: string;
344
+ } & {
345
+ totalDataSize?: bigint | null | undefined;
346
+ totalDataCount?: bigint | null | undefined;
347
+ uploadBandwidth?: bigint | null | undefined;
348
+ downloadBandwidth?: bigint | null | undefined;
349
+ perDataSize?: bigint | null | undefined;
350
+ uploadCount?: bigint | null | undefined;
351
+ downloadCount?: bigint | null | undefined;
352
+ sentMails?: {
353
+ count: bigint | null;
354
+ perDataSize: bigint | null;
355
+ totalStorageSize: bigint | null;
356
+ totalDataCount: bigint | null;
357
+ dataCount: bigint | null;
358
+ dataSize: bigint | null;
359
+ totalCount: bigint | null;
360
+ } | null | undefined;
361
+ })[];
362
+ };
363
+ output: {
364
+ isUpdated: boolean;
365
+ };
366
+ meta: any;
367
+ }>;
263
368
  updateNotification: _trpc_server.TRPCMutationProcedure<{
264
369
  input: {
265
370
  mail?: boolean | undefined;
266
- cloud?: boolean | undefined;
267
371
  enableAll?: boolean | undefined;
372
+ cloud?: boolean | undefined;
268
373
  disableAllUntil?: Date | null | undefined;
269
374
  };
270
375
  output: {
@@ -565,14 +670,17 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
565
670
  id: string;
566
671
  name: string;
567
672
  createdAt: Date;
673
+ deletedAt: Date | null;
568
674
  ownerId: string;
569
675
  planId: string;
570
676
  quotasId: string;
571
677
  stripeSubId: string | null;
572
678
  stripeSubPaidUntil: Date | null;
679
+ stripeLastMetricReport: Date;
573
680
  billingProfileStripeCustomerId: string | null;
574
- status: "active" | "inactive" | "pending_for_payment";
681
+ status: "active" | "inactive" | "deleted" | "pending_for_payment";
575
682
  minMembersToReport: number;
683
+ lastMetricsReset: Date;
576
684
  };
577
685
  meta: any;
578
686
  }>;
@@ -986,6 +1094,10 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
986
1094
  appId?: string | null | undefined;
987
1095
  dataId: string;
988
1096
  nodeId: string;
1097
+ encryptedAccesses: {
1098
+ pubKey: string;
1099
+ key: string | null;
1100
+ }[];
989
1101
  };
990
1102
  output: {
991
1103
  id: string;
@@ -1004,15 +1116,20 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
1004
1116
  appId: string;
1005
1117
  };
1006
1118
  accesses: {
1119
+ id: string;
1120
+ type: "ROOT" | "INHERITED";
1121
+ identityPubKey: string;
1122
+ sharedByPubKey: string;
1007
1123
  rights: "delete" | "read" | "write";
1008
1124
  nameKey: string | null;
1009
- isRoot: boolean;
1010
1125
  addAccess: "delete" | "read" | "write" | null;
1011
1126
  sharingAddAccess: "delete" | "read" | "write" | null;
1012
1127
  delAccess: "delete" | "read" | "write" | null;
1013
1128
  sharingDelAccess: "delete" | "read" | "write" | null;
1014
- sharedByPubKey: string;
1015
- identityPubKey: string;
1129
+ rootAccess: {
1130
+ type: "ROOT" | "INHERITED";
1131
+ sharedByPubKey: string;
1132
+ } | null;
1016
1133
  }[];
1017
1134
  permissions: {
1018
1135
  rights: "delete" | "read" | "write";
@@ -1053,15 +1170,20 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
1053
1170
  appId: string;
1054
1171
  };
1055
1172
  accesses: {
1173
+ id: string;
1174
+ type: "ROOT" | "INHERITED";
1175
+ identityPubKey: string;
1176
+ sharedByPubKey: string;
1056
1177
  rights: "delete" | "read" | "write";
1057
1178
  nameKey: string | null;
1058
- isRoot: boolean;
1059
1179
  addAccess: "delete" | "read" | "write" | null;
1060
1180
  sharingAddAccess: "delete" | "read" | "write" | null;
1061
1181
  delAccess: "delete" | "read" | "write" | null;
1062
1182
  sharingDelAccess: "delete" | "read" | "write" | null;
1063
- sharedByPubKey: string;
1064
- identityPubKey: string;
1183
+ rootAccess: {
1184
+ type: "ROOT" | "INHERITED";
1185
+ sharedByPubKey: string;
1186
+ } | null;
1065
1187
  }[];
1066
1188
  permissions: {
1067
1189
  rights: "delete" | "read" | "write";
@@ -1097,15 +1219,20 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
1097
1219
  appId: string;
1098
1220
  };
1099
1221
  accesses: {
1222
+ id: string;
1223
+ type: "ROOT" | "INHERITED";
1224
+ identityPubKey: string;
1225
+ sharedByPubKey: string;
1100
1226
  rights: "delete" | "read" | "write";
1101
1227
  nameKey: string | null;
1102
- isRoot: boolean;
1103
1228
  addAccess: "delete" | "read" | "write" | null;
1104
1229
  sharingAddAccess: "delete" | "read" | "write" | null;
1105
1230
  delAccess: "delete" | "read" | "write" | null;
1106
1231
  sharingDelAccess: "delete" | "read" | "write" | null;
1107
- sharedByPubKey: string;
1108
- identityPubKey: string;
1232
+ rootAccess: {
1233
+ type: "ROOT" | "INHERITED";
1234
+ sharedByPubKey: string;
1235
+ } | null;
1109
1236
  }[];
1110
1237
  permissions: {
1111
1238
  rights: "delete" | "read" | "write";
@@ -1233,8 +1360,8 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
1233
1360
  };
1234
1361
  output: {
1235
1362
  id: string;
1236
- size: bigint;
1237
1363
  md5: string;
1364
+ size: bigint;
1238
1365
  sizeEncrypted: bigint | null;
1239
1366
  md5Encrypted: string | null;
1240
1367
  mime: string | null;
@@ -1252,8 +1379,8 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
1252
1379
  maybeContent: Uint8Array<ArrayBufferLike> | null;
1253
1380
  } | {
1254
1381
  id: string;
1255
- size: bigint;
1256
1382
  md5: string;
1383
+ size: bigint;
1257
1384
  sizeEncrypted: bigint | null;
1258
1385
  md5Encrypted: string | null;
1259
1386
  mime: string | null;
@@ -1270,8 +1397,8 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
1270
1397
  maybeContent: Uint8Array<ArrayBufferLike> | null;
1271
1398
  } | {
1272
1399
  id: string;
1273
- size: bigint;
1274
1400
  md5: string;
1401
+ size: bigint;
1275
1402
  sizeEncrypted: bigint | null;
1276
1403
  md5Encrypted: string | null;
1277
1404
  mime: string | null;
@@ -1288,8 +1415,8 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
1288
1415
  }[];
1289
1416
  } | {
1290
1417
  id: string;
1291
- size: bigint;
1292
1418
  md5: string;
1419
+ size: bigint;
1293
1420
  sizeEncrypted: bigint | null;
1294
1421
  md5Encrypted: string | null;
1295
1422
  mime: string | null;
@@ -1311,8 +1438,8 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
1311
1438
  };
1312
1439
  output: ({
1313
1440
  id: string;
1314
- size: bigint;
1315
1441
  md5: string;
1442
+ size: bigint;
1316
1443
  sizeEncrypted: bigint | null;
1317
1444
  md5Encrypted: string | null;
1318
1445
  mime: string | null;
@@ -1330,8 +1457,8 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
1330
1457
  maybeContent: Uint8Array<ArrayBufferLike> | null;
1331
1458
  } | {
1332
1459
  id: string;
1333
- size: bigint;
1334
1460
  md5: string;
1461
+ size: bigint;
1335
1462
  sizeEncrypted: bigint | null;
1336
1463
  md5Encrypted: string | null;
1337
1464
  mime: string | null;
@@ -1348,8 +1475,8 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
1348
1475
  maybeContent: Uint8Array<ArrayBufferLike> | null;
1349
1476
  } | {
1350
1477
  id: string;
1351
- size: bigint;
1352
1478
  md5: string;
1479
+ size: bigint;
1353
1480
  sizeEncrypted: bigint | null;
1354
1481
  md5Encrypted: string | null;
1355
1482
  mime: string | null;
@@ -1366,8 +1493,8 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
1366
1493
  }[];
1367
1494
  } | {
1368
1495
  id: string;
1369
- size: bigint;
1370
1496
  md5: string;
1497
+ size: bigint;
1371
1498
  sizeEncrypted: bigint | null;
1372
1499
  md5Encrypted: string | null;
1373
1500
  mime: string | null;
@@ -1406,9 +1533,12 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
1406
1533
  appId?: string | null | undefined;
1407
1534
  dataId: string;
1408
1535
  nodeId: string | null;
1409
- key: string | null;
1410
1536
  fileName: string;
1411
- nameKey: string;
1537
+ encryptedAccesses: {
1538
+ pubKey: string;
1539
+ key: string | null;
1540
+ nameKey: string;
1541
+ }[];
1412
1542
  };
1413
1543
  output: {
1414
1544
  id: string;
@@ -1427,15 +1557,20 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
1427
1557
  appId: string;
1428
1558
  };
1429
1559
  accesses: {
1560
+ id: string;
1561
+ type: "ROOT" | "INHERITED";
1562
+ identityPubKey: string;
1563
+ sharedByPubKey: string;
1430
1564
  rights: "delete" | "read" | "write";
1431
1565
  nameKey: string | null;
1432
- isRoot: boolean;
1433
1566
  addAccess: "delete" | "read" | "write" | null;
1434
1567
  sharingAddAccess: "delete" | "read" | "write" | null;
1435
1568
  delAccess: "delete" | "read" | "write" | null;
1436
1569
  sharingDelAccess: "delete" | "read" | "write" | null;
1437
- sharedByPubKey: string;
1438
- identityPubKey: string;
1570
+ rootAccess: {
1571
+ type: "ROOT" | "INHERITED";
1572
+ sharedByPubKey: string;
1573
+ } | null;
1439
1574
  }[];
1440
1575
  permissions: {
1441
1576
  rights: "delete" | "read" | "write";
@@ -1476,15 +1611,20 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
1476
1611
  appId: string;
1477
1612
  };
1478
1613
  accesses: {
1614
+ id: string;
1615
+ type: "ROOT" | "INHERITED";
1616
+ identityPubKey: string;
1617
+ sharedByPubKey: string;
1479
1618
  rights: "delete" | "read" | "write";
1480
1619
  nameKey: string | null;
1481
- isRoot: boolean;
1482
1620
  addAccess: "delete" | "read" | "write" | null;
1483
1621
  sharingAddAccess: "delete" | "read" | "write" | null;
1484
1622
  delAccess: "delete" | "read" | "write" | null;
1485
1623
  sharingDelAccess: "delete" | "read" | "write" | null;
1486
- sharedByPubKey: string;
1487
- identityPubKey: string;
1624
+ rootAccess: {
1625
+ type: "ROOT" | "INHERITED";
1626
+ sharedByPubKey: string;
1627
+ } | null;
1488
1628
  }[];
1489
1629
  permissions: {
1490
1630
  rights: "delete" | "read" | "write";
@@ -1520,15 +1660,20 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
1520
1660
  appId: string;
1521
1661
  };
1522
1662
  accesses: {
1663
+ id: string;
1664
+ type: "ROOT" | "INHERITED";
1665
+ identityPubKey: string;
1666
+ sharedByPubKey: string;
1523
1667
  rights: "delete" | "read" | "write";
1524
1668
  nameKey: string | null;
1525
- isRoot: boolean;
1526
1669
  addAccess: "delete" | "read" | "write" | null;
1527
1670
  sharingAddAccess: "delete" | "read" | "write" | null;
1528
1671
  delAccess: "delete" | "read" | "write" | null;
1529
1672
  sharingDelAccess: "delete" | "read" | "write" | null;
1530
- sharedByPubKey: string;
1531
- identityPubKey: string;
1673
+ rootAccess: {
1674
+ type: "ROOT" | "INHERITED";
1675
+ sharedByPubKey: string;
1676
+ } | null;
1532
1677
  }[];
1533
1678
  permissions: {
1534
1679
  rights: "delete" | "read" | "write";
@@ -1662,6 +1807,7 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
1662
1807
  access: {
1663
1808
  identityPubKey: string;
1664
1809
  sharedByPubKey: string;
1810
+ rootAccessSharedByPubKey: string;
1665
1811
  nameKey: string;
1666
1812
  };
1667
1813
  history: {
@@ -1695,6 +1841,7 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
1695
1841
  };
1696
1842
  output: {
1697
1843
  isShared: boolean;
1844
+ missingPubKeys: string[];
1698
1845
  };
1699
1846
  meta: any;
1700
1847
  }>;
@@ -1809,7 +1956,7 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
1809
1956
  sizeEncrypted: bigint;
1810
1957
  md5Encrypted: string;
1811
1958
  type: "encrypted";
1812
- content: Uint8Array<ArrayBuffer>;
1959
+ content: Buffer<ArrayBufferLike>;
1813
1960
  mime?: string | undefined;
1814
1961
  ext?: string | undefined;
1815
1962
  fromIdentityPubKey?: string | null | undefined;
@@ -1818,7 +1965,7 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
1818
1965
  size: bigint;
1819
1966
  md5: string;
1820
1967
  type: "unencrypted";
1821
- content: Uint8Array<ArrayBuffer>;
1968
+ content: Buffer<ArrayBufferLike>;
1822
1969
  mime?: string | undefined;
1823
1970
  ext?: string | undefined;
1824
1971
  fromIdentityPubKey?: string | null | undefined;
@@ -2001,9 +2148,12 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
2001
2148
  input: {
2002
2149
  fromIdentityPubKey?: string | null | undefined;
2003
2150
  appId?: string | null | undefined;
2004
- nameKey: string | null;
2005
2151
  name: string;
2006
2152
  parentId: string | null;
2153
+ encryptedAccesses: {
2154
+ pubKey: string;
2155
+ nameKey: string;
2156
+ }[];
2007
2157
  };
2008
2158
  output: {
2009
2159
  id: string;
@@ -2022,15 +2172,20 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
2022
2172
  appId: string;
2023
2173
  };
2024
2174
  accesses: {
2175
+ id: string;
2176
+ type: "ROOT" | "INHERITED";
2177
+ identityPubKey: string;
2178
+ sharedByPubKey: string;
2025
2179
  rights: "delete" | "read" | "write";
2026
2180
  nameKey: string | null;
2027
- isRoot: boolean;
2028
2181
  addAccess: "delete" | "read" | "write" | null;
2029
2182
  sharingAddAccess: "delete" | "read" | "write" | null;
2030
2183
  delAccess: "delete" | "read" | "write" | null;
2031
2184
  sharingDelAccess: "delete" | "read" | "write" | null;
2032
- sharedByPubKey: string;
2033
- identityPubKey: string;
2185
+ rootAccess: {
2186
+ type: "ROOT" | "INHERITED";
2187
+ sharedByPubKey: string;
2188
+ } | null;
2034
2189
  }[];
2035
2190
  permissions: {
2036
2191
  rights: "delete" | "read" | "write";
@@ -2071,15 +2226,20 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
2071
2226
  appId: string;
2072
2227
  };
2073
2228
  accesses: {
2229
+ id: string;
2230
+ type: "ROOT" | "INHERITED";
2231
+ identityPubKey: string;
2232
+ sharedByPubKey: string;
2074
2233
  rights: "delete" | "read" | "write";
2075
2234
  nameKey: string | null;
2076
- isRoot: boolean;
2077
2235
  addAccess: "delete" | "read" | "write" | null;
2078
2236
  sharingAddAccess: "delete" | "read" | "write" | null;
2079
2237
  delAccess: "delete" | "read" | "write" | null;
2080
2238
  sharingDelAccess: "delete" | "read" | "write" | null;
2081
- sharedByPubKey: string;
2082
- identityPubKey: string;
2239
+ rootAccess: {
2240
+ type: "ROOT" | "INHERITED";
2241
+ sharedByPubKey: string;
2242
+ } | null;
2083
2243
  }[];
2084
2244
  permissions: {
2085
2245
  rights: "delete" | "read" | "write";
@@ -2115,15 +2275,20 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
2115
2275
  appId: string;
2116
2276
  };
2117
2277
  accesses: {
2278
+ id: string;
2279
+ type: "ROOT" | "INHERITED";
2280
+ identityPubKey: string;
2281
+ sharedByPubKey: string;
2118
2282
  rights: "delete" | "read" | "write";
2119
2283
  nameKey: string | null;
2120
- isRoot: boolean;
2121
2284
  addAccess: "delete" | "read" | "write" | null;
2122
2285
  sharingAddAccess: "delete" | "read" | "write" | null;
2123
2286
  delAccess: "delete" | "read" | "write" | null;
2124
2287
  sharingDelAccess: "delete" | "read" | "write" | null;
2125
- sharedByPubKey: string;
2126
- identityPubKey: string;
2288
+ rootAccess: {
2289
+ type: "ROOT" | "INHERITED";
2290
+ sharedByPubKey: string;
2291
+ } | null;
2127
2292
  }[];
2128
2293
  permissions: {
2129
2294
  rights: "delete" | "read" | "write";
@@ -2218,6 +2383,7 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
2218
2383
  appId?: string | null | undefined;
2219
2384
  nodeId: string;
2220
2385
  destPubKey: string;
2386
+ rootAccessSharedByPubKey?: string | undefined;
2221
2387
  };
2222
2388
  output: {
2223
2389
  isDeleted: boolean;
@@ -2292,9 +2458,11 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
2292
2458
  output: {
2293
2459
  id: string;
2294
2460
  nodeId: string;
2461
+ type: "ROOT" | "INHERITED";
2462
+ origin: "OWNED" | "SHARED";
2463
+ rootAccessId: string | null;
2295
2464
  rights: "delete" | "read" | "write";
2296
2465
  nameKey: string | null;
2297
- isRoot: boolean;
2298
2466
  createdAt: Date;
2299
2467
  addAccess: "delete" | "read" | "write" | null;
2300
2468
  sharingAddAccess: "delete" | "read" | "write" | null;
@@ -2346,15 +2514,20 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
2346
2514
  appId: string;
2347
2515
  };
2348
2516
  accesses: {
2517
+ id: string;
2518
+ type: "ROOT" | "INHERITED";
2519
+ identityPubKey: string;
2520
+ sharedByPubKey: string;
2349
2521
  rights: "delete" | "read" | "write";
2350
2522
  nameKey: string | null;
2351
- isRoot: boolean;
2352
2523
  addAccess: "delete" | "read" | "write" | null;
2353
2524
  sharingAddAccess: "delete" | "read" | "write" | null;
2354
2525
  delAccess: "delete" | "read" | "write" | null;
2355
2526
  sharingDelAccess: "delete" | "read" | "write" | null;
2356
- sharedByPubKey: string;
2357
- identityPubKey: string;
2527
+ rootAccess: {
2528
+ type: "ROOT" | "INHERITED";
2529
+ sharedByPubKey: string;
2530
+ } | null;
2358
2531
  }[];
2359
2532
  permissions: {
2360
2533
  rights: "delete" | "read" | "write";
@@ -2405,15 +2578,20 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
2405
2578
  appId: string;
2406
2579
  };
2407
2580
  accesses: {
2581
+ id: string;
2582
+ type: "ROOT" | "INHERITED";
2583
+ identityPubKey: string;
2584
+ sharedByPubKey: string;
2408
2585
  rights: "delete" | "read" | "write";
2409
2586
  nameKey: string | null;
2410
- isRoot: boolean;
2411
2587
  addAccess: "delete" | "read" | "write" | null;
2412
2588
  sharingAddAccess: "delete" | "read" | "write" | null;
2413
2589
  delAccess: "delete" | "read" | "write" | null;
2414
2590
  sharingDelAccess: "delete" | "read" | "write" | null;
2415
- sharedByPubKey: string;
2416
- identityPubKey: string;
2591
+ rootAccess: {
2592
+ type: "ROOT" | "INHERITED";
2593
+ sharedByPubKey: string;
2594
+ } | null;
2417
2595
  }[];
2418
2596
  permissions: {
2419
2597
  rights: "delete" | "read" | "write";
@@ -2465,15 +2643,20 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
2465
2643
  appId: string;
2466
2644
  };
2467
2645
  accesses: {
2646
+ id: string;
2647
+ type: "ROOT" | "INHERITED";
2648
+ identityPubKey: string;
2649
+ sharedByPubKey: string;
2468
2650
  rights: "delete" | "read" | "write";
2469
2651
  nameKey: string | null;
2470
- isRoot: boolean;
2471
2652
  addAccess: "delete" | "read" | "write" | null;
2472
2653
  sharingAddAccess: "delete" | "read" | "write" | null;
2473
2654
  delAccess: "delete" | "read" | "write" | null;
2474
2655
  sharingDelAccess: "delete" | "read" | "write" | null;
2475
- sharedByPubKey: string;
2476
- identityPubKey: string;
2656
+ rootAccess: {
2657
+ type: "ROOT" | "INHERITED";
2658
+ sharedByPubKey: string;
2659
+ } | null;
2477
2660
  }[];
2478
2661
  permissions: {
2479
2662
  rights: "delete" | "read" | "write";
@@ -2514,15 +2697,20 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
2514
2697
  appId: string;
2515
2698
  };
2516
2699
  accesses: {
2700
+ id: string;
2701
+ type: "ROOT" | "INHERITED";
2702
+ identityPubKey: string;
2703
+ sharedByPubKey: string;
2517
2704
  rights: "delete" | "read" | "write";
2518
2705
  nameKey: string | null;
2519
- isRoot: boolean;
2520
2706
  addAccess: "delete" | "read" | "write" | null;
2521
2707
  sharingAddAccess: "delete" | "read" | "write" | null;
2522
2708
  delAccess: "delete" | "read" | "write" | null;
2523
2709
  sharingDelAccess: "delete" | "read" | "write" | null;
2524
- sharedByPubKey: string;
2525
- identityPubKey: string;
2710
+ rootAccess: {
2711
+ type: "ROOT" | "INHERITED";
2712
+ sharedByPubKey: string;
2713
+ } | null;
2526
2714
  }[];
2527
2715
  permissions: {
2528
2716
  rights: "delete" | "read" | "write";
@@ -2558,15 +2746,20 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
2558
2746
  appId: string;
2559
2747
  };
2560
2748
  accesses: {
2749
+ id: string;
2750
+ type: "ROOT" | "INHERITED";
2751
+ identityPubKey: string;
2752
+ sharedByPubKey: string;
2561
2753
  rights: "delete" | "read" | "write";
2562
2754
  nameKey: string | null;
2563
- isRoot: boolean;
2564
2755
  addAccess: "delete" | "read" | "write" | null;
2565
2756
  sharingAddAccess: "delete" | "read" | "write" | null;
2566
2757
  delAccess: "delete" | "read" | "write" | null;
2567
2758
  sharingDelAccess: "delete" | "read" | "write" | null;
2568
- sharedByPubKey: string;
2569
- identityPubKey: string;
2759
+ rootAccess: {
2760
+ type: "ROOT" | "INHERITED";
2761
+ sharedByPubKey: string;
2762
+ } | null;
2570
2763
  }[];
2571
2764
  permissions: {
2572
2765
  rights: "delete" | "read" | "write";
@@ -2669,15 +2862,20 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
2669
2862
  appId: string;
2670
2863
  };
2671
2864
  accesses: {
2865
+ id: string;
2866
+ type: "ROOT" | "INHERITED";
2867
+ identityPubKey: string;
2868
+ sharedByPubKey: string;
2672
2869
  rights: "delete" | "read" | "write";
2673
2870
  nameKey: string | null;
2674
- isRoot: boolean;
2675
2871
  addAccess: "delete" | "read" | "write" | null;
2676
2872
  sharingAddAccess: "delete" | "read" | "write" | null;
2677
2873
  delAccess: "delete" | "read" | "write" | null;
2678
2874
  sharingDelAccess: "delete" | "read" | "write" | null;
2679
- sharedByPubKey: string;
2680
- identityPubKey: string;
2875
+ rootAccess: {
2876
+ type: "ROOT" | "INHERITED";
2877
+ sharedByPubKey: string;
2878
+ } | null;
2681
2879
  }[];
2682
2880
  permissions: {
2683
2881
  rights: "delete" | "read" | "write";
@@ -2718,15 +2916,20 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
2718
2916
  appId: string;
2719
2917
  };
2720
2918
  accesses: {
2919
+ id: string;
2920
+ type: "ROOT" | "INHERITED";
2921
+ identityPubKey: string;
2922
+ sharedByPubKey: string;
2721
2923
  rights: "delete" | "read" | "write";
2722
2924
  nameKey: string | null;
2723
- isRoot: boolean;
2724
2925
  addAccess: "delete" | "read" | "write" | null;
2725
2926
  sharingAddAccess: "delete" | "read" | "write" | null;
2726
2927
  delAccess: "delete" | "read" | "write" | null;
2727
2928
  sharingDelAccess: "delete" | "read" | "write" | null;
2728
- sharedByPubKey: string;
2729
- identityPubKey: string;
2929
+ rootAccess: {
2930
+ type: "ROOT" | "INHERITED";
2931
+ sharedByPubKey: string;
2932
+ } | null;
2730
2933
  }[];
2731
2934
  permissions: {
2732
2935
  rights: "delete" | "read" | "write";
@@ -2762,15 +2965,20 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
2762
2965
  appId: string;
2763
2966
  };
2764
2967
  accesses: {
2968
+ id: string;
2969
+ type: "ROOT" | "INHERITED";
2970
+ identityPubKey: string;
2971
+ sharedByPubKey: string;
2765
2972
  rights: "delete" | "read" | "write";
2766
2973
  nameKey: string | null;
2767
- isRoot: boolean;
2768
2974
  addAccess: "delete" | "read" | "write" | null;
2769
2975
  sharingAddAccess: "delete" | "read" | "write" | null;
2770
2976
  delAccess: "delete" | "read" | "write" | null;
2771
2977
  sharingDelAccess: "delete" | "read" | "write" | null;
2772
- sharedByPubKey: string;
2773
- identityPubKey: string;
2978
+ rootAccess: {
2979
+ type: "ROOT" | "INHERITED";
2980
+ sharedByPubKey: string;
2981
+ } | null;
2774
2982
  }[];
2775
2983
  permissions: {
2776
2984
  rights: "delete" | "read" | "write";
@@ -2910,15 +3118,20 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
2910
3118
  appId: string;
2911
3119
  };
2912
3120
  accesses: {
3121
+ id: string;
3122
+ type: "ROOT" | "INHERITED";
3123
+ identityPubKey: string;
3124
+ sharedByPubKey: string;
2913
3125
  rights: "delete" | "read" | "write";
2914
3126
  nameKey: string | null;
2915
- isRoot: boolean;
2916
3127
  addAccess: "delete" | "read" | "write" | null;
2917
3128
  sharingAddAccess: "delete" | "read" | "write" | null;
2918
3129
  delAccess: "delete" | "read" | "write" | null;
2919
3130
  sharingDelAccess: "delete" | "read" | "write" | null;
2920
- sharedByPubKey: string;
2921
- identityPubKey: string;
3131
+ rootAccess: {
3132
+ type: "ROOT" | "INHERITED";
3133
+ sharedByPubKey: string;
3134
+ } | null;
2922
3135
  }[];
2923
3136
  permissions: {
2924
3137
  rights: "delete" | "read" | "write";
@@ -2962,15 +3175,20 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
2962
3175
  appId: string;
2963
3176
  };
2964
3177
  accesses: {
3178
+ id: string;
3179
+ type: "ROOT" | "INHERITED";
3180
+ identityPubKey: string;
3181
+ sharedByPubKey: string;
2965
3182
  rights: "delete" | "read" | "write";
2966
3183
  nameKey: string | null;
2967
- isRoot: boolean;
2968
3184
  addAccess: "delete" | "read" | "write" | null;
2969
3185
  sharingAddAccess: "delete" | "read" | "write" | null;
2970
3186
  delAccess: "delete" | "read" | "write" | null;
2971
3187
  sharingDelAccess: "delete" | "read" | "write" | null;
2972
- sharedByPubKey: string;
2973
- identityPubKey: string;
3188
+ rootAccess: {
3189
+ type: "ROOT" | "INHERITED";
3190
+ sharedByPubKey: string;
3191
+ } | null;
2974
3192
  }[];
2975
3193
  permissions: {
2976
3194
  rights: "delete" | "read" | "write";
@@ -3013,15 +3231,20 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
3013
3231
  appId: string;
3014
3232
  };
3015
3233
  accesses: {
3234
+ id: string;
3235
+ type: "ROOT" | "INHERITED";
3236
+ identityPubKey: string;
3237
+ sharedByPubKey: string;
3016
3238
  rights: "delete" | "read" | "write";
3017
3239
  nameKey: string | null;
3018
- isRoot: boolean;
3019
3240
  addAccess: "delete" | "read" | "write" | null;
3020
3241
  sharingAddAccess: "delete" | "read" | "write" | null;
3021
3242
  delAccess: "delete" | "read" | "write" | null;
3022
3243
  sharingDelAccess: "delete" | "read" | "write" | null;
3023
- sharedByPubKey: string;
3024
- identityPubKey: string;
3244
+ rootAccess: {
3245
+ type: "ROOT" | "INHERITED";
3246
+ sharedByPubKey: string;
3247
+ } | null;
3025
3248
  }[];
3026
3249
  permissions: {
3027
3250
  rights: "delete" | "read" | "write";
@@ -3199,15 +3422,20 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
3199
3422
  appId: string;
3200
3423
  };
3201
3424
  accesses: {
3425
+ id: string;
3426
+ type: "ROOT" | "INHERITED";
3427
+ identityPubKey: string;
3428
+ sharedByPubKey: string;
3202
3429
  rights: "delete" | "read" | "write";
3203
3430
  nameKey: string | null;
3204
- isRoot: boolean;
3205
3431
  addAccess: "delete" | "read" | "write" | null;
3206
3432
  sharingAddAccess: "delete" | "read" | "write" | null;
3207
3433
  delAccess: "delete" | "read" | "write" | null;
3208
3434
  sharingDelAccess: "delete" | "read" | "write" | null;
3209
- sharedByPubKey: string;
3210
- identityPubKey: string;
3435
+ rootAccess: {
3436
+ type: "ROOT" | "INHERITED";
3437
+ sharedByPubKey: string;
3438
+ } | null;
3211
3439
  }[];
3212
3440
  permissions: {
3213
3441
  rights: "delete" | "read" | "write";
@@ -3248,15 +3476,20 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
3248
3476
  appId: string;
3249
3477
  };
3250
3478
  accesses: {
3479
+ id: string;
3480
+ type: "ROOT" | "INHERITED";
3481
+ identityPubKey: string;
3482
+ sharedByPubKey: string;
3251
3483
  rights: "delete" | "read" | "write";
3252
3484
  nameKey: string | null;
3253
- isRoot: boolean;
3254
3485
  addAccess: "delete" | "read" | "write" | null;
3255
3486
  sharingAddAccess: "delete" | "read" | "write" | null;
3256
3487
  delAccess: "delete" | "read" | "write" | null;
3257
3488
  sharingDelAccess: "delete" | "read" | "write" | null;
3258
- sharedByPubKey: string;
3259
- identityPubKey: string;
3489
+ rootAccess: {
3490
+ type: "ROOT" | "INHERITED";
3491
+ sharedByPubKey: string;
3492
+ } | null;
3260
3493
  }[];
3261
3494
  permissions: {
3262
3495
  rights: "delete" | "read" | "write";
@@ -3292,15 +3525,20 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
3292
3525
  appId: string;
3293
3526
  };
3294
3527
  accesses: {
3528
+ id: string;
3529
+ type: "ROOT" | "INHERITED";
3530
+ identityPubKey: string;
3531
+ sharedByPubKey: string;
3295
3532
  rights: "delete" | "read" | "write";
3296
3533
  nameKey: string | null;
3297
- isRoot: boolean;
3298
3534
  addAccess: "delete" | "read" | "write" | null;
3299
3535
  sharingAddAccess: "delete" | "read" | "write" | null;
3300
3536
  delAccess: "delete" | "read" | "write" | null;
3301
3537
  sharingDelAccess: "delete" | "read" | "write" | null;
3302
- sharedByPubKey: string;
3303
- identityPubKey: string;
3538
+ rootAccess: {
3539
+ type: "ROOT" | "INHERITED";
3540
+ sharedByPubKey: string;
3541
+ } | null;
3304
3542
  }[];
3305
3543
  permissions: {
3306
3544
  rights: "delete" | "read" | "write";
@@ -3383,7 +3621,8 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
3383
3621
  fromIdentityPubKey?: string | null | undefined;
3384
3622
  appId?: string | null | undefined;
3385
3623
  nodeId: string;
3386
- fromPubKey: string;
3624
+ sharedByPubKey?: string | undefined;
3625
+ fromPubKey?: string | undefined;
3387
3626
  };
3388
3627
  output: {
3389
3628
  isDeleted: boolean;
@@ -5229,6 +5468,27 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
5229
5468
  company: string;
5230
5469
  createdAt: Date;
5231
5470
  coveredAt: Date | null;
5471
+ message: string | null;
5472
+ };
5473
+ meta: any;
5474
+ }>;
5475
+ contactUs: _trpc_server.TRPCMutationProcedure<{
5476
+ input: {
5477
+ firstname: string;
5478
+ lastname: string;
5479
+ email: string;
5480
+ company: string;
5481
+ message: string;
5482
+ };
5483
+ output: {
5484
+ id: string;
5485
+ email: string;
5486
+ firstname: string;
5487
+ lastname: string;
5488
+ company: string;
5489
+ createdAt: Date;
5490
+ coveredAt: Date | null;
5491
+ message: string | null;
5232
5492
  };
5233
5493
  meta: any;
5234
5494
  }>;
@@ -5268,14 +5528,17 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
5268
5528
  id: string;
5269
5529
  name: string;
5270
5530
  createdAt: Date;
5531
+ deletedAt: Date | null;
5271
5532
  ownerId: string;
5272
5533
  planId: string;
5273
5534
  quotasId: string;
5274
5535
  stripeSubId: string | null;
5275
5536
  stripeSubPaidUntil: Date | null;
5537
+ stripeLastMetricReport: Date;
5276
5538
  billingProfileStripeCustomerId: string | null;
5277
- status: "active" | "inactive" | "pending_for_payment";
5539
+ status: "active" | "inactive" | "deleted" | "pending_for_payment";
5278
5540
  minMembersToReport: number;
5541
+ lastMetricsReset: Date;
5279
5542
  } & {
5280
5543
  plan: {
5281
5544
  id: string;
@@ -5338,14 +5601,17 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
5338
5601
  id: string;
5339
5602
  name: string;
5340
5603
  createdAt: Date;
5604
+ deletedAt: Date | null;
5341
5605
  ownerId: string;
5342
5606
  planId: string;
5343
5607
  quotasId: string;
5344
5608
  stripeSubId: string | null;
5345
5609
  stripeSubPaidUntil: Date | null;
5610
+ stripeLastMetricReport: Date;
5346
5611
  billingProfileStripeCustomerId: string | null;
5347
- status: "active" | "inactive" | "pending_for_payment";
5612
+ status: "active" | "inactive" | "deleted" | "pending_for_payment";
5348
5613
  minMembersToReport: number;
5614
+ lastMetricsReset: Date;
5349
5615
  };
5350
5616
  } | {
5351
5617
  type: "checkout";
@@ -5354,14 +5620,17 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
5354
5620
  id: string;
5355
5621
  name: string;
5356
5622
  createdAt: Date;
5623
+ deletedAt: Date | null;
5357
5624
  ownerId: string;
5358
5625
  planId: string;
5359
5626
  quotasId: string;
5360
5627
  stripeSubId: string | null;
5361
5628
  stripeSubPaidUntil: Date | null;
5629
+ stripeLastMetricReport: Date;
5362
5630
  billingProfileStripeCustomerId: string | null;
5363
- status: "active" | "inactive" | "pending_for_payment";
5631
+ status: "active" | "inactive" | "deleted" | "pending_for_payment";
5364
5632
  minMembersToReport: number;
5633
+ lastMetricsReset: Date;
5365
5634
  };
5366
5635
  };
5367
5636
  meta: any;
@@ -5374,14 +5643,17 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
5374
5643
  id: string;
5375
5644
  name: string;
5376
5645
  createdAt: Date;
5646
+ deletedAt: Date | null;
5377
5647
  ownerId: string;
5378
5648
  planId: string;
5379
5649
  quotasId: string;
5380
5650
  stripeSubId: string | null;
5381
5651
  stripeSubPaidUntil: Date | null;
5652
+ stripeLastMetricReport: Date;
5382
5653
  billingProfileStripeCustomerId: string | null;
5383
- status: "active" | "inactive" | "pending_for_payment";
5654
+ status: "active" | "inactive" | "deleted" | "pending_for_payment";
5384
5655
  minMembersToReport: number;
5656
+ lastMetricsReset: Date;
5385
5657
  };
5386
5658
  meta: any;
5387
5659
  }>;
@@ -5419,23 +5691,33 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
5419
5691
  id: string;
5420
5692
  name: string;
5421
5693
  createdAt: Date;
5694
+ deletedAt: Date | null;
5422
5695
  ownerId: string;
5423
5696
  planId: string;
5424
5697
  quotasId: string;
5425
5698
  stripeSubId: string | null;
5426
5699
  stripeSubPaidUntil: Date | null;
5700
+ stripeLastMetricReport: Date;
5427
5701
  billingProfileStripeCustomerId: string | null;
5428
- status: "active" | "inactive" | "pending_for_payment";
5702
+ status: "active" | "inactive" | "deleted" | "pending_for_payment";
5429
5703
  minMembersToReport: number;
5704
+ lastMetricsReset: Date;
5430
5705
  }[];
5431
5706
  meta: any;
5432
5707
  }>;
5433
- organizationLimits: _trpc_server.TRPCQueryProcedure<{
5708
+ limits: _trpc_server.TRPCQueryProcedure<{
5434
5709
  input: {
5435
5710
  orgId: string;
5711
+ paidByApp?: boolean | undefined;
5712
+ userIds?: string[] | undefined;
5436
5713
  };
5437
5714
  output: {
5438
5715
  metrics: {
5716
+ lastReset: Date;
5717
+ membersCount: bigint;
5718
+ } & {
5719
+ totalDataCount: bigint;
5720
+ totalDataSize: bigint;
5439
5721
  downloadBandwidth: bigint;
5440
5722
  downloadCount: bigint;
5441
5723
  uploadBandwidth: bigint;
@@ -5443,8 +5725,6 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
5443
5725
  sentMailCount: bigint;
5444
5726
  sentMailDataCount: bigint;
5445
5727
  sentMailDataSize: bigint;
5446
- totalDataSize: bigint;
5447
- totalDataCount: bigint;
5448
5728
  };
5449
5729
  quotas: {
5450
5730
  downloadBandwidth: bigint | null;
@@ -5452,21 +5732,56 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
5452
5732
  uploadBandwidth: bigint | null;
5453
5733
  uploadCount: bigint | null;
5454
5734
  totalDataCount: bigint | null;
5455
- totalStorageSize: bigint | null;
5735
+ totalDataSize: bigint | null;
5456
5736
  perDataSize: bigint | null;
5457
5737
  sentMails: {
5458
5738
  count: bigint | null;
5459
- totalCount: bigint | null;
5460
5739
  perDataSize: bigint | null;
5740
+ totalStorageSize: bigint | null;
5741
+ totalDataCount: bigint | null;
5461
5742
  dataCount: bigint | null;
5462
5743
  dataSize: bigint | null;
5463
- totalDataCount: bigint | null;
5464
- totalStorageSize: bigint | null;
5744
+ totalCount: bigint | null;
5465
5745
  };
5466
5746
  };
5467
5747
  };
5468
5748
  meta: any;
5469
5749
  }>;
5750
+ metrics: _trpc_server.TRPCQueryProcedure<{
5751
+ input: {
5752
+ orgId: string;
5753
+ paidByApp?: boolean | undefined;
5754
+ userIds?: string[] | undefined;
5755
+ };
5756
+ output: ({
5757
+ lastReset: Date;
5758
+ membersCount: bigint;
5759
+ } & {
5760
+ totalDataCount: bigint;
5761
+ totalDataSize: bigint;
5762
+ downloadBandwidth: bigint;
5763
+ downloadCount: bigint;
5764
+ uploadBandwidth: bigint;
5765
+ uploadCount: bigint;
5766
+ sentMailCount: bigint;
5767
+ sentMailDataCount: bigint;
5768
+ sentMailDataSize: bigint;
5769
+ }) | {
5770
+ lastReset: Date;
5771
+ details: {
5772
+ totalDataCount: bigint;
5773
+ totalDataSize: bigint;
5774
+ downloadBandwidth: bigint;
5775
+ downloadCount: bigint;
5776
+ uploadBandwidth: bigint;
5777
+ uploadCount: bigint;
5778
+ sentMailCount: bigint;
5779
+ sentMailDataCount: bigint;
5780
+ sentMailDataSize: bigint;
5781
+ }[];
5782
+ };
5783
+ meta: any;
5784
+ }>;
5470
5785
  plans: _trpc_server.TRPCQueryProcedure<{
5471
5786
  input: Record<string, never>;
5472
5787
  output: {
@@ -5476,20 +5791,20 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
5476
5791
  quotasId: string;
5477
5792
  stripePricesId: string | null;
5478
5793
  quotas: {
5794
+ perDataSize: bigint | null;
5795
+ totalStorageSize: bigint | null;
5796
+ totalDataCount: bigint | null;
5479
5797
  downloadBandwidth: bigint | null;
5480
- uploadBandwidth: bigint | null;
5481
5798
  downloadCount: bigint | null;
5799
+ uploadBandwidth: bigint | null;
5482
5800
  uploadCount: bigint | null;
5483
- totalDataCount: bigint | null;
5484
- totalStorageSize: bigint | null;
5485
- perDataSize: bigint | null;
5486
5801
  sentMails: {
5487
5802
  count: bigint | null;
5803
+ perDataSize: bigint | null;
5804
+ totalStorageSize: bigint | null;
5805
+ totalDataCount: bigint | null;
5488
5806
  dataCount: bigint | null;
5489
5807
  dataSize: bigint | null;
5490
- totalDataCount: bigint | null;
5491
- totalStorageSize: bigint | null;
5492
- perDataSize: bigint | null;
5493
5808
  totalCount: bigint | null;
5494
5809
  };
5495
5810
  };
@@ -5521,14 +5836,17 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
5521
5836
  id: string;
5522
5837
  name: string;
5523
5838
  createdAt: Date;
5839
+ deletedAt: Date | null;
5524
5840
  ownerId: string;
5525
5841
  planId: string;
5526
5842
  quotasId: string;
5527
5843
  stripeSubId: string | null;
5528
5844
  stripeSubPaidUntil: Date | null;
5845
+ stripeLastMetricReport: Date;
5529
5846
  billingProfileStripeCustomerId: string | null;
5530
- status: "active" | "inactive" | "pending_for_payment";
5847
+ status: "active" | "inactive" | "deleted" | "pending_for_payment";
5531
5848
  minMembersToReport: number;
5849
+ lastMetricsReset: Date;
5532
5850
  };
5533
5851
  meta: any;
5534
5852
  }>;
@@ -5556,80 +5874,17 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
5556
5874
  id: string;
5557
5875
  name: string;
5558
5876
  createdAt: Date;
5877
+ deletedAt: Date | null;
5559
5878
  ownerId: string;
5560
5879
  planId: string;
5561
5880
  quotasId: string;
5562
5881
  stripeSubId: string | null;
5563
5882
  stripeSubPaidUntil: Date | null;
5883
+ stripeLastMetricReport: Date;
5564
5884
  billingProfileStripeCustomerId: string | null;
5565
- status: "active" | "inactive" | "pending_for_payment";
5885
+ status: "active" | "inactive" | "deleted" | "pending_for_payment";
5566
5886
  minMembersToReport: number;
5567
- };
5568
- meta: any;
5569
- }>;
5570
- userContextLimits: _trpc_server.TRPCQueryProcedure<{
5571
- input: {
5572
- orgId: string;
5573
- appId: string;
5574
- };
5575
- output: {
5576
- type: "app";
5577
- appId: string;
5578
- orgId: string;
5579
- settings: {
5580
- payForUsers: boolean;
5581
- bandwidthLimit: bigint | null;
5582
- perDataSizeLimit: bigint | null;
5583
- totalStorageSizeLimit: bigint | null;
5584
- };
5585
- quotas: {
5586
- bandwith: bigint | null;
5587
- uploadCount: bigint | null;
5588
- downloadCount: bigint | null;
5589
- totalDataCount: bigint | null;
5590
- perDataSize: bigint | null;
5591
- totalStorageSize: bigint | null;
5592
- };
5593
- metrics: {
5594
- uploadCount: bigint;
5595
- uploadBandwidth: bigint;
5596
- downloadBandwidth: bigint;
5597
- downloadCount: bigint;
5598
- };
5599
- } | {
5600
- type: "org";
5601
- appId: string;
5602
- orgId: string;
5603
- settings: {
5604
- payForUsers: boolean;
5605
- bandwidthLimit: bigint | null;
5606
- perDataSizeLimit: bigint | null;
5607
- totalStorageSizeLimit: bigint | null;
5608
- };
5609
- quotas: {
5610
- uploadBandwidth: bigint | null;
5611
- uploadCount: bigint | null;
5612
- perDataSize: bigint | null;
5613
- totalStorageSize: bigint | null;
5614
- totalDataCount: bigint | null;
5615
- downloadBandwidth: bigint | null;
5616
- downloadCount: bigint | null;
5617
- };
5618
- userLimitedQuotas: {
5619
- uploadBandwidth: bigint | null;
5620
- uploadCount: bigint | null;
5621
- perDataSize: bigint | null;
5622
- totalStorageSize: bigint | null;
5623
- totalDataCount: bigint | null;
5624
- downloadBandwidth: bigint | null;
5625
- downloadCount: bigint | null;
5626
- } | null;
5627
- metrics: {
5628
- uploadCount: bigint;
5629
- uploadBandwidth: bigint;
5630
- downloadBandwidth: bigint;
5631
- downloadCount: bigint;
5632
- };
5887
+ lastMetricsReset: Date;
5633
5888
  };
5634
5889
  meta: any;
5635
5890
  }>;
@@ -6155,8 +6410,6 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
6155
6410
  } & {
6156
6411
  quotas: {
6157
6412
  users: bigint | null;
6158
- totalStorageSize: bigint | null;
6159
- perDataSize: bigint | null;
6160
6413
  devs: bigint | null;
6161
6414
  devsBase: bigint | null;
6162
6415
  devsUnit: bigint | null;
@@ -6164,6 +6417,7 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
6164
6417
  usersBase: bigint | null;
6165
6418
  usersUnit: bigint | null;
6166
6419
  usersPrice: number | null;
6420
+ perDataSize: bigint | null;
6167
6421
  perDataSizeBase: bigint | null;
6168
6422
  perDataSizeUnit: bigint | null;
6169
6423
  perDataSizePrice: number | null;
@@ -6171,19 +6425,20 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
6171
6425
  bandwidthBase: bigint | null;
6172
6426
  bandwidthUnit: bigint | null;
6173
6427
  bandwidthPrice: number | null;
6428
+ totalStorageSize: bigint | null;
6174
6429
  totalStorageSizeBase: bigint | null;
6175
6430
  totalStorageSizeUnit: bigint | null;
6176
6431
  totalStorageSizePrice: number | null;
6177
6432
  baseQuotasId: string;
6178
6433
  } & {
6179
6434
  baseQuotas: {
6435
+ perDataSize: bigint | null;
6436
+ totalStorageSize: bigint | null;
6437
+ totalDataCount: bigint | null;
6180
6438
  downloadBandwidth: bigint | null;
6181
- uploadBandwidth: bigint | null;
6182
6439
  downloadCount: bigint | null;
6440
+ uploadBandwidth: bigint | null;
6183
6441
  uploadCount: bigint | null;
6184
- totalDataCount: bigint | null;
6185
- totalStorageSize: bigint | null;
6186
- perDataSize: bigint | null;
6187
6442
  sentMailsId: string;
6188
6443
  };
6189
6444
  };
@@ -6233,8 +6488,6 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
6233
6488
  } & {
6234
6489
  quotas: {
6235
6490
  users: bigint | null;
6236
- totalStorageSize: bigint | null;
6237
- perDataSize: bigint | null;
6238
6491
  devs: bigint | null;
6239
6492
  devsBase: bigint | null;
6240
6493
  devsUnit: bigint | null;
@@ -6242,6 +6495,7 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
6242
6495
  usersBase: bigint | null;
6243
6496
  usersUnit: bigint | null;
6244
6497
  usersPrice: number | null;
6498
+ perDataSize: bigint | null;
6245
6499
  perDataSizeBase: bigint | null;
6246
6500
  perDataSizeUnit: bigint | null;
6247
6501
  perDataSizePrice: number | null;
@@ -6249,19 +6503,20 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
6249
6503
  bandwidthBase: bigint | null;
6250
6504
  bandwidthUnit: bigint | null;
6251
6505
  bandwidthPrice: number | null;
6506
+ totalStorageSize: bigint | null;
6252
6507
  totalStorageSizeBase: bigint | null;
6253
6508
  totalStorageSizeUnit: bigint | null;
6254
6509
  totalStorageSizePrice: number | null;
6255
6510
  baseQuotasId: string;
6256
6511
  } & {
6257
6512
  baseQuotas: {
6513
+ perDataSize: bigint | null;
6514
+ totalStorageSize: bigint | null;
6515
+ totalDataCount: bigint | null;
6258
6516
  downloadBandwidth: bigint | null;
6259
- uploadBandwidth: bigint | null;
6260
6517
  downloadCount: bigint | null;
6518
+ uploadBandwidth: bigint | null;
6261
6519
  uploadCount: bigint | null;
6262
- totalDataCount: bigint | null;
6263
- totalStorageSize: bigint | null;
6264
- perDataSize: bigint | null;
6265
6520
  sentMailsId: string;
6266
6521
  };
6267
6522
  };
@@ -6290,6 +6545,7 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
6290
6545
  updatedAt: Date;
6291
6546
  deletedAt: Date | null;
6292
6547
  lastMetricsReset: Date;
6548
+ status: "active" | "inactive" | "deleted" | "pending_for_payment";
6293
6549
  origin: string[];
6294
6550
  isCare: boolean;
6295
6551
  stripeInvoices: string[];
@@ -6462,6 +6718,16 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
6462
6718
  };
6463
6719
  meta: any;
6464
6720
  }>;
6721
+ updatePaidByApp: _trpc_server.TRPCMutationProcedure<{
6722
+ input: {
6723
+ appId: string;
6724
+ payForUsers: boolean;
6725
+ };
6726
+ output: {
6727
+ isUpdated: boolean;
6728
+ };
6729
+ meta: any;
6730
+ }>;
6465
6731
  }>>;
6466
6732
  user: _trpc_server.TRPCBuiltRouter<{
6467
6733
  ctx: any;
@@ -6641,6 +6907,71 @@ declare var appRouter: _trpc_server.TRPCBuiltRouter<{
6641
6907
  };
6642
6908
  meta: any;
6643
6909
  }>;
6910
+ limits: _trpc_server.TRPCQueryProcedure<{
6911
+ input: {
6912
+ orgId: string;
6913
+ appId: string;
6914
+ };
6915
+ output: {
6916
+ type: "app";
6917
+ appId: string;
6918
+ orgId: string;
6919
+ settings: {
6920
+ paidByApp: boolean;
6921
+ bandwidthLimit: bigint | null;
6922
+ perDataSizeLimit: bigint | null;
6923
+ totalStorageSizeLimit: bigint | null;
6924
+ };
6925
+ quotas: null;
6926
+ metrics: {
6927
+ uploadCount: bigint;
6928
+ uploadBandwidth: bigint;
6929
+ downloadBandwidth: bigint;
6930
+ downloadCount: bigint;
6931
+ sentMailCount: bigint;
6932
+ sentMailDataCount: bigint;
6933
+ sentMailDataSize: bigint;
6934
+ };
6935
+ userLimitedQuotas: {
6936
+ uploadBandwidth: bigint | null;
6937
+ uploadCount: bigint | null;
6938
+ perDataSize: bigint | null;
6939
+ totalStorageSize: bigint | null;
6940
+ totalDataCount: bigint | null;
6941
+ downloadBandwidth: bigint | null;
6942
+ downloadCount: bigint | null;
6943
+ } | null;
6944
+ } | {
6945
+ type: "org";
6946
+ appId: string;
6947
+ orgId: string;
6948
+ settings: {
6949
+ paidByApp: boolean;
6950
+ bandwidthLimit: bigint | null;
6951
+ perDataSizeLimit: bigint | null;
6952
+ totalStorageSizeLimit: bigint | null;
6953
+ };
6954
+ quotas: {
6955
+ uploadBandwidth: bigint | null;
6956
+ uploadCount: bigint | null;
6957
+ perDataSize: bigint | null;
6958
+ totalStorageSize: bigint | null;
6959
+ totalDataCount: bigint | null;
6960
+ downloadBandwidth: bigint | null;
6961
+ downloadCount: bigint | null;
6962
+ };
6963
+ metrics: {
6964
+ uploadCount: bigint;
6965
+ uploadBandwidth: bigint;
6966
+ downloadBandwidth: bigint;
6967
+ downloadCount: bigint;
6968
+ sentMailCount: bigint;
6969
+ sentMailDataCount: bigint;
6970
+ sentMailDataSize: bigint;
6971
+ };
6972
+ };
6973
+ meta: any;
6974
+ }>;
6644
6975
  }>>;
6645
6976
  identity: _trpc_server.TRPCBuiltRouter<{
6646
6977
  ctx: any;