@polinetwork/backend 0.15.5 → 0.15.6
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/dist/index.cjs +10 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +89 -12
- package/dist/index.d.ts +89 -12
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -22,6 +22,7 @@ var index_exports = {};
|
|
|
22
22
|
__export(index_exports, {
|
|
23
23
|
AUTH_PATH: () => AUTH_PATH,
|
|
24
24
|
TRPC_PATH: () => TRPC_PATH,
|
|
25
|
+
USER_ROLE: () => USER_ROLE,
|
|
25
26
|
WS_PATH: () => WS_PATH
|
|
26
27
|
});
|
|
27
28
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -30,10 +31,19 @@ module.exports = __toCommonJS(index_exports);
|
|
|
30
31
|
var TRPC_PATH = "/api/trpc";
|
|
31
32
|
var AUTH_PATH = "/api/auth";
|
|
32
33
|
var WS_PATH = "/ws";
|
|
34
|
+
var USER_ROLE = {
|
|
35
|
+
ADMIN: "admin",
|
|
36
|
+
HR: "hr",
|
|
37
|
+
PRESIDENT: "president",
|
|
38
|
+
DIRETTIVO: "direttivo",
|
|
39
|
+
CREATOR: "creator",
|
|
40
|
+
OWNER: "owner"
|
|
41
|
+
};
|
|
33
42
|
// Annotate the CommonJS export names for ESM import in node:
|
|
34
43
|
0 && (module.exports = {
|
|
35
44
|
AUTH_PATH,
|
|
36
45
|
TRPC_PATH,
|
|
46
|
+
USER_ROLE,
|
|
37
47
|
WS_PATH
|
|
38
48
|
});
|
|
39
49
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/constants.ts"],"sourcesContent":["export { AUTH_PATH, TRPC_PATH, WS_PATH } from \"./constants\"\nexport type { AppRouter } from \"./routers\"\n\nimport type { telegramPlugin } from \"./auth/plugins/telegram\"\nexport type TelegramPlugin = typeof telegramPlugin\n\nexport type { TelegramSocket } from \"./websocket/telegram\"\n","export const TRPC_PATH = \"/api/trpc\"\nexport const AUTH_PATH = \"/api/auth\"\nexport const WS_PATH = \"/ws\"\n\nexport const TRUSTED_ORIGINS = [\n \"http://localhost:3001\",\n \"http://localhost:3002\",\n \"http://localhost:3003\",\n \"http://localhost:5173\",\n \"http://localhost:5174\",\n \"http://localhost:5175\",\n]\n\nexport const MESSAGES_RETENTION_DAYS = 7\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,YAAY;AAClB,IAAM,YAAY;AAClB,IAAM,UAAU;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/constants.ts"],"sourcesContent":["export { AUTH_PATH, TRPC_PATH, USER_ROLE, WS_PATH } from \"./constants\"\nexport type { AppRouter } from \"./routers\"\n\nimport type { telegramPlugin } from \"./auth/plugins/telegram\"\nexport type TelegramPlugin = typeof telegramPlugin\n\nexport type { TelegramSocket } from \"./websocket/telegram\"\n","export const TRPC_PATH = \"/api/trpc\"\nexport const AUTH_PATH = \"/api/auth\"\nexport const WS_PATH = \"/ws\"\n\nexport const TRUSTED_ORIGINS = [\n \"http://localhost:3001\",\n \"http://localhost:3002\",\n \"http://localhost:3003\",\n \"http://localhost:5173\",\n \"http://localhost:5174\",\n \"http://localhost:5175\",\n]\n\nexport const MESSAGES_RETENTION_DAYS = 7\n\nexport const USER_ROLE = {\n ADMIN: \"admin\",\n HR: \"hr\",\n PRESIDENT: \"president\",\n DIRETTIVO: \"direttivo\",\n CREATOR: \"creator\",\n OWNER: \"owner\",\n} as const\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,YAAY;AAClB,IAAM,YAAY;AAClB,IAAM,UAAU;AAahB,IAAM,YAAY;AAAA,EACvB,OAAO;AAAA,EACP,IAAI;AAAA,EACJ,WAAW;AAAA,EACX,WAAW;AAAA,EACX,SAAS;AAAA,EACT,OAAO;AACT;","names":[]}
|
package/dist/index.d.cts
CHANGED
|
@@ -6,6 +6,14 @@ import { Socket } from 'socket.io-client';
|
|
|
6
6
|
declare const TRPC_PATH = "/api/trpc";
|
|
7
7
|
declare const AUTH_PATH = "/api/auth";
|
|
8
8
|
declare const WS_PATH = "/ws";
|
|
9
|
+
declare const USER_ROLE: {
|
|
10
|
+
readonly ADMIN: "admin";
|
|
11
|
+
readonly HR: "hr";
|
|
12
|
+
readonly PRESIDENT: "president";
|
|
13
|
+
readonly DIRETTIVO: "direttivo";
|
|
14
|
+
readonly CREATOR: "creator";
|
|
15
|
+
readonly OWNER: "owner";
|
|
16
|
+
};
|
|
9
17
|
|
|
10
18
|
type ParsedUser = {
|
|
11
19
|
id: string;
|
|
@@ -29,14 +37,6 @@ declare const AUDIT_TYPE: {
|
|
|
29
37
|
};
|
|
30
38
|
type TAuditType = (typeof AUDIT_TYPE)[keyof typeof AUDIT_TYPE];
|
|
31
39
|
|
|
32
|
-
declare const USER_ROLE: {
|
|
33
|
-
readonly ADMIN: "admin";
|
|
34
|
-
readonly HR: "hr";
|
|
35
|
-
readonly PRESIDENT: "president";
|
|
36
|
-
readonly DIRETTIVO: "direttivo";
|
|
37
|
-
readonly CREATOR: "creator";
|
|
38
|
-
readonly OWNER: "owner";
|
|
39
|
-
};
|
|
40
40
|
type TUserRole = (typeof USER_ROLE)[keyof typeof USER_ROLE];
|
|
41
41
|
|
|
42
42
|
/**
|
|
@@ -227,6 +227,21 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
227
227
|
output: {
|
|
228
228
|
userId: number;
|
|
229
229
|
roles: TUserRole[] | null;
|
|
230
|
+
groupAdmin: ({
|
|
231
|
+
addedBy: {
|
|
232
|
+
id: number;
|
|
233
|
+
firstName: string;
|
|
234
|
+
isBot: boolean;
|
|
235
|
+
lastName?: string | undefined;
|
|
236
|
+
username?: string | undefined;
|
|
237
|
+
langCode?: string | undefined;
|
|
238
|
+
};
|
|
239
|
+
group: {
|
|
240
|
+
title: string;
|
|
241
|
+
id: number;
|
|
242
|
+
inviteLink: string | null;
|
|
243
|
+
};
|
|
244
|
+
} | null)[];
|
|
230
245
|
};
|
|
231
246
|
meta: object;
|
|
232
247
|
}>;
|
|
@@ -255,7 +270,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
255
270
|
addRole: _trpc_server.TRPCMutationProcedure<{
|
|
256
271
|
input: {
|
|
257
272
|
userId: number;
|
|
258
|
-
role: "
|
|
273
|
+
role: "admin" | "hr" | "president" | "direttivo" | "creator" | "owner";
|
|
259
274
|
adderId: number;
|
|
260
275
|
};
|
|
261
276
|
output: {
|
|
@@ -270,7 +285,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
270
285
|
removeRole: _trpc_server.TRPCMutationProcedure<{
|
|
271
286
|
input: {
|
|
272
287
|
userId: number;
|
|
273
|
-
role: "
|
|
288
|
+
role: "admin" | "hr" | "president" | "direttivo" | "creator" | "owner";
|
|
274
289
|
removerId: number;
|
|
275
290
|
};
|
|
276
291
|
output: {
|
|
@@ -290,7 +305,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
290
305
|
output: boolean;
|
|
291
306
|
meta: object;
|
|
292
307
|
}>;
|
|
293
|
-
addGroup: _trpc_server.
|
|
308
|
+
addGroup: _trpc_server.TRPCMutationProcedure<{
|
|
294
309
|
input: {
|
|
295
310
|
userId: number;
|
|
296
311
|
adderId: number;
|
|
@@ -299,6 +314,17 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
299
314
|
output: void;
|
|
300
315
|
meta: object;
|
|
301
316
|
}>;
|
|
317
|
+
removeGroup: _trpc_server.TRPCMutationProcedure<{
|
|
318
|
+
input: {
|
|
319
|
+
userId: number;
|
|
320
|
+
groupId: number;
|
|
321
|
+
removerId: number;
|
|
322
|
+
};
|
|
323
|
+
output: {
|
|
324
|
+
error: "INTERNAL_SERVER_ERROR" | "UNAUTHORIZED" | "NOT_FOUND" | "UNAUTHORIZED_SELF_ASSIGN" | null;
|
|
325
|
+
};
|
|
326
|
+
meta: object;
|
|
327
|
+
}>;
|
|
302
328
|
canAddBot: _trpc_server.TRPCQueryProcedure<{
|
|
303
329
|
input: {
|
|
304
330
|
userId: number;
|
|
@@ -381,6 +407,10 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
381
407
|
authorId: number;
|
|
382
408
|
message: string;
|
|
383
409
|
timestamp: Date;
|
|
410
|
+
group?: {
|
|
411
|
+
title: string;
|
|
412
|
+
inviteLink: string | null;
|
|
413
|
+
} | undefined;
|
|
384
414
|
};
|
|
385
415
|
error: null;
|
|
386
416
|
} | {
|
|
@@ -397,6 +427,10 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
397
427
|
authorId: number;
|
|
398
428
|
message: string;
|
|
399
429
|
timestamp: Date;
|
|
430
|
+
group?: {
|
|
431
|
+
title: string;
|
|
432
|
+
inviteLink: string | null;
|
|
433
|
+
} | undefined;
|
|
400
434
|
}[];
|
|
401
435
|
};
|
|
402
436
|
output: {
|
|
@@ -404,6 +438,29 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
404
438
|
};
|
|
405
439
|
meta: object;
|
|
406
440
|
}>;
|
|
441
|
+
getLastByUser: _trpc_server.TRPCQueryProcedure<{
|
|
442
|
+
input: {
|
|
443
|
+
userId: number;
|
|
444
|
+
};
|
|
445
|
+
output: {
|
|
446
|
+
messages: {
|
|
447
|
+
chatId: number;
|
|
448
|
+
messageId: number;
|
|
449
|
+
authorId: number;
|
|
450
|
+
message: string;
|
|
451
|
+
timestamp: Date;
|
|
452
|
+
group?: {
|
|
453
|
+
title: string;
|
|
454
|
+
inviteLink: string | null;
|
|
455
|
+
} | undefined;
|
|
456
|
+
}[];
|
|
457
|
+
error: null;
|
|
458
|
+
} | {
|
|
459
|
+
error: "INTERNAL_SERVER_ERROR" | "NOT_FOUND" | "DECRYPT_ERROR";
|
|
460
|
+
messages?: null | undefined;
|
|
461
|
+
};
|
|
462
|
+
meta: object;
|
|
463
|
+
}>;
|
|
407
464
|
}>>;
|
|
408
465
|
auditLog: _trpc_server.TRPCBuiltRouter<{
|
|
409
466
|
ctx: {
|
|
@@ -496,6 +553,26 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
496
553
|
};
|
|
497
554
|
meta: object;
|
|
498
555
|
}>;
|
|
556
|
+
getByUsername: _trpc_server.TRPCQueryProcedure<{
|
|
557
|
+
input: {
|
|
558
|
+
username: string;
|
|
559
|
+
};
|
|
560
|
+
output: {
|
|
561
|
+
user: {
|
|
562
|
+
id: number;
|
|
563
|
+
firstName: string;
|
|
564
|
+
isBot: boolean;
|
|
565
|
+
lastName?: string | undefined;
|
|
566
|
+
username?: string | undefined;
|
|
567
|
+
langCode?: string | undefined;
|
|
568
|
+
};
|
|
569
|
+
error: null;
|
|
570
|
+
} | {
|
|
571
|
+
error: "INTERNAL_SERVER_ERROR" | "NOT_FOUND" | "DECRYPT_ERROR";
|
|
572
|
+
user?: null | undefined;
|
|
573
|
+
};
|
|
574
|
+
meta: object;
|
|
575
|
+
}>;
|
|
499
576
|
add: _trpc_server.TRPCMutationProcedure<{
|
|
500
577
|
input: {
|
|
501
578
|
users: {
|
|
@@ -754,4 +831,4 @@ type TelegramSocket = Socket<ToClient, ToServer>;
|
|
|
754
831
|
|
|
755
832
|
type TelegramPlugin = typeof telegramPlugin;
|
|
756
833
|
|
|
757
|
-
export { AUTH_PATH, type AppRouter, TRPC_PATH, type TelegramPlugin, type TelegramSocket, WS_PATH };
|
|
834
|
+
export { AUTH_PATH, type AppRouter, TRPC_PATH, type TelegramPlugin, type TelegramSocket, USER_ROLE, WS_PATH };
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,14 @@ import { Socket } from 'socket.io-client';
|
|
|
6
6
|
declare const TRPC_PATH = "/api/trpc";
|
|
7
7
|
declare const AUTH_PATH = "/api/auth";
|
|
8
8
|
declare const WS_PATH = "/ws";
|
|
9
|
+
declare const USER_ROLE: {
|
|
10
|
+
readonly ADMIN: "admin";
|
|
11
|
+
readonly HR: "hr";
|
|
12
|
+
readonly PRESIDENT: "president";
|
|
13
|
+
readonly DIRETTIVO: "direttivo";
|
|
14
|
+
readonly CREATOR: "creator";
|
|
15
|
+
readonly OWNER: "owner";
|
|
16
|
+
};
|
|
9
17
|
|
|
10
18
|
type ParsedUser = {
|
|
11
19
|
id: string;
|
|
@@ -29,14 +37,6 @@ declare const AUDIT_TYPE: {
|
|
|
29
37
|
};
|
|
30
38
|
type TAuditType = (typeof AUDIT_TYPE)[keyof typeof AUDIT_TYPE];
|
|
31
39
|
|
|
32
|
-
declare const USER_ROLE: {
|
|
33
|
-
readonly ADMIN: "admin";
|
|
34
|
-
readonly HR: "hr";
|
|
35
|
-
readonly PRESIDENT: "president";
|
|
36
|
-
readonly DIRETTIVO: "direttivo";
|
|
37
|
-
readonly CREATOR: "creator";
|
|
38
|
-
readonly OWNER: "owner";
|
|
39
|
-
};
|
|
40
40
|
type TUserRole = (typeof USER_ROLE)[keyof typeof USER_ROLE];
|
|
41
41
|
|
|
42
42
|
/**
|
|
@@ -227,6 +227,21 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
227
227
|
output: {
|
|
228
228
|
userId: number;
|
|
229
229
|
roles: TUserRole[] | null;
|
|
230
|
+
groupAdmin: ({
|
|
231
|
+
addedBy: {
|
|
232
|
+
id: number;
|
|
233
|
+
firstName: string;
|
|
234
|
+
isBot: boolean;
|
|
235
|
+
lastName?: string | undefined;
|
|
236
|
+
username?: string | undefined;
|
|
237
|
+
langCode?: string | undefined;
|
|
238
|
+
};
|
|
239
|
+
group: {
|
|
240
|
+
title: string;
|
|
241
|
+
id: number;
|
|
242
|
+
inviteLink: string | null;
|
|
243
|
+
};
|
|
244
|
+
} | null)[];
|
|
230
245
|
};
|
|
231
246
|
meta: object;
|
|
232
247
|
}>;
|
|
@@ -255,7 +270,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
255
270
|
addRole: _trpc_server.TRPCMutationProcedure<{
|
|
256
271
|
input: {
|
|
257
272
|
userId: number;
|
|
258
|
-
role: "
|
|
273
|
+
role: "admin" | "hr" | "president" | "direttivo" | "creator" | "owner";
|
|
259
274
|
adderId: number;
|
|
260
275
|
};
|
|
261
276
|
output: {
|
|
@@ -270,7 +285,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
270
285
|
removeRole: _trpc_server.TRPCMutationProcedure<{
|
|
271
286
|
input: {
|
|
272
287
|
userId: number;
|
|
273
|
-
role: "
|
|
288
|
+
role: "admin" | "hr" | "president" | "direttivo" | "creator" | "owner";
|
|
274
289
|
removerId: number;
|
|
275
290
|
};
|
|
276
291
|
output: {
|
|
@@ -290,7 +305,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
290
305
|
output: boolean;
|
|
291
306
|
meta: object;
|
|
292
307
|
}>;
|
|
293
|
-
addGroup: _trpc_server.
|
|
308
|
+
addGroup: _trpc_server.TRPCMutationProcedure<{
|
|
294
309
|
input: {
|
|
295
310
|
userId: number;
|
|
296
311
|
adderId: number;
|
|
@@ -299,6 +314,17 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
299
314
|
output: void;
|
|
300
315
|
meta: object;
|
|
301
316
|
}>;
|
|
317
|
+
removeGroup: _trpc_server.TRPCMutationProcedure<{
|
|
318
|
+
input: {
|
|
319
|
+
userId: number;
|
|
320
|
+
groupId: number;
|
|
321
|
+
removerId: number;
|
|
322
|
+
};
|
|
323
|
+
output: {
|
|
324
|
+
error: "INTERNAL_SERVER_ERROR" | "UNAUTHORIZED" | "NOT_FOUND" | "UNAUTHORIZED_SELF_ASSIGN" | null;
|
|
325
|
+
};
|
|
326
|
+
meta: object;
|
|
327
|
+
}>;
|
|
302
328
|
canAddBot: _trpc_server.TRPCQueryProcedure<{
|
|
303
329
|
input: {
|
|
304
330
|
userId: number;
|
|
@@ -381,6 +407,10 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
381
407
|
authorId: number;
|
|
382
408
|
message: string;
|
|
383
409
|
timestamp: Date;
|
|
410
|
+
group?: {
|
|
411
|
+
title: string;
|
|
412
|
+
inviteLink: string | null;
|
|
413
|
+
} | undefined;
|
|
384
414
|
};
|
|
385
415
|
error: null;
|
|
386
416
|
} | {
|
|
@@ -397,6 +427,10 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
397
427
|
authorId: number;
|
|
398
428
|
message: string;
|
|
399
429
|
timestamp: Date;
|
|
430
|
+
group?: {
|
|
431
|
+
title: string;
|
|
432
|
+
inviteLink: string | null;
|
|
433
|
+
} | undefined;
|
|
400
434
|
}[];
|
|
401
435
|
};
|
|
402
436
|
output: {
|
|
@@ -404,6 +438,29 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
404
438
|
};
|
|
405
439
|
meta: object;
|
|
406
440
|
}>;
|
|
441
|
+
getLastByUser: _trpc_server.TRPCQueryProcedure<{
|
|
442
|
+
input: {
|
|
443
|
+
userId: number;
|
|
444
|
+
};
|
|
445
|
+
output: {
|
|
446
|
+
messages: {
|
|
447
|
+
chatId: number;
|
|
448
|
+
messageId: number;
|
|
449
|
+
authorId: number;
|
|
450
|
+
message: string;
|
|
451
|
+
timestamp: Date;
|
|
452
|
+
group?: {
|
|
453
|
+
title: string;
|
|
454
|
+
inviteLink: string | null;
|
|
455
|
+
} | undefined;
|
|
456
|
+
}[];
|
|
457
|
+
error: null;
|
|
458
|
+
} | {
|
|
459
|
+
error: "INTERNAL_SERVER_ERROR" | "NOT_FOUND" | "DECRYPT_ERROR";
|
|
460
|
+
messages?: null | undefined;
|
|
461
|
+
};
|
|
462
|
+
meta: object;
|
|
463
|
+
}>;
|
|
407
464
|
}>>;
|
|
408
465
|
auditLog: _trpc_server.TRPCBuiltRouter<{
|
|
409
466
|
ctx: {
|
|
@@ -496,6 +553,26 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
|
|
|
496
553
|
};
|
|
497
554
|
meta: object;
|
|
498
555
|
}>;
|
|
556
|
+
getByUsername: _trpc_server.TRPCQueryProcedure<{
|
|
557
|
+
input: {
|
|
558
|
+
username: string;
|
|
559
|
+
};
|
|
560
|
+
output: {
|
|
561
|
+
user: {
|
|
562
|
+
id: number;
|
|
563
|
+
firstName: string;
|
|
564
|
+
isBot: boolean;
|
|
565
|
+
lastName?: string | undefined;
|
|
566
|
+
username?: string | undefined;
|
|
567
|
+
langCode?: string | undefined;
|
|
568
|
+
};
|
|
569
|
+
error: null;
|
|
570
|
+
} | {
|
|
571
|
+
error: "INTERNAL_SERVER_ERROR" | "NOT_FOUND" | "DECRYPT_ERROR";
|
|
572
|
+
user?: null | undefined;
|
|
573
|
+
};
|
|
574
|
+
meta: object;
|
|
575
|
+
}>;
|
|
499
576
|
add: _trpc_server.TRPCMutationProcedure<{
|
|
500
577
|
input: {
|
|
501
578
|
users: {
|
|
@@ -754,4 +831,4 @@ type TelegramSocket = Socket<ToClient, ToServer>;
|
|
|
754
831
|
|
|
755
832
|
type TelegramPlugin = typeof telegramPlugin;
|
|
756
833
|
|
|
757
|
-
export { AUTH_PATH, type AppRouter, TRPC_PATH, type TelegramPlugin, type TelegramSocket, WS_PATH };
|
|
834
|
+
export { AUTH_PATH, type AppRouter, TRPC_PATH, type TelegramPlugin, type TelegramSocket, USER_ROLE, WS_PATH };
|
package/dist/index.js
CHANGED
|
@@ -2,9 +2,18 @@
|
|
|
2
2
|
var TRPC_PATH = "/api/trpc";
|
|
3
3
|
var AUTH_PATH = "/api/auth";
|
|
4
4
|
var WS_PATH = "/ws";
|
|
5
|
+
var USER_ROLE = {
|
|
6
|
+
ADMIN: "admin",
|
|
7
|
+
HR: "hr",
|
|
8
|
+
PRESIDENT: "president",
|
|
9
|
+
DIRETTIVO: "direttivo",
|
|
10
|
+
CREATOR: "creator",
|
|
11
|
+
OWNER: "owner"
|
|
12
|
+
};
|
|
5
13
|
export {
|
|
6
14
|
AUTH_PATH,
|
|
7
15
|
TRPC_PATH,
|
|
16
|
+
USER_ROLE,
|
|
8
17
|
WS_PATH
|
|
9
18
|
};
|
|
10
19
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/constants.ts"],"sourcesContent":["export const TRPC_PATH = \"/api/trpc\"\nexport const AUTH_PATH = \"/api/auth\"\nexport const WS_PATH = \"/ws\"\n\nexport const TRUSTED_ORIGINS = [\n \"http://localhost:3001\",\n \"http://localhost:3002\",\n \"http://localhost:3003\",\n \"http://localhost:5173\",\n \"http://localhost:5174\",\n \"http://localhost:5175\",\n]\n\nexport const MESSAGES_RETENTION_DAYS = 7\n"],"mappings":";AAAO,IAAM,YAAY;AAClB,IAAM,YAAY;AAClB,IAAM,UAAU;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/constants.ts"],"sourcesContent":["export const TRPC_PATH = \"/api/trpc\"\nexport const AUTH_PATH = \"/api/auth\"\nexport const WS_PATH = \"/ws\"\n\nexport const TRUSTED_ORIGINS = [\n \"http://localhost:3001\",\n \"http://localhost:3002\",\n \"http://localhost:3003\",\n \"http://localhost:5173\",\n \"http://localhost:5174\",\n \"http://localhost:5175\",\n]\n\nexport const MESSAGES_RETENTION_DAYS = 7\n\nexport const USER_ROLE = {\n ADMIN: \"admin\",\n HR: \"hr\",\n PRESIDENT: \"president\",\n DIRETTIVO: \"direttivo\",\n CREATOR: \"creator\",\n OWNER: \"owner\",\n} as const\n"],"mappings":";AAAO,IAAM,YAAY;AAClB,IAAM,YAAY;AAClB,IAAM,UAAU;AAahB,IAAM,YAAY;AAAA,EACvB,OAAO;AAAA,EACP,IAAI;AAAA,EACJ,WAAW;AAAA,EACX,WAAW;AAAA,EACX,SAAS;AAAA,EACT,OAAO;AACT;","names":[]}
|