@primocaredentgroup/elettromedicali 0.1.0 → 0.1.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.
- package/dist/client/index.d.ts +0 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +2 -28
- package/dist/client/index.js.map +1 -1
- package/dist/component/_generated/api.d.ts +4 -4
- package/dist/component/_generated/api.d.ts.map +1 -1
- package/dist/component/_generated/component.d.ts +165 -218
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/contracts.d.ts +9 -9
- package/dist/component/contracts.d.ts.map +1 -1
- package/dist/component/contracts.js +7 -13
- package/dist/component/contracts.js.map +1 -1
- package/dist/component/crons.d.ts.map +1 -1
- package/dist/component/crons.js +1 -2
- package/dist/component/crons.js.map +1 -1
- package/dist/component/dashboardStats.d.ts +8 -3
- package/dist/component/dashboardStats.d.ts.map +1 -1
- package/dist/component/dashboardStats.js +24 -39
- package/dist/component/dashboardStats.js.map +1 -1
- package/dist/component/dashboardStatsCache.d.ts +5 -11
- package/dist/component/dashboardStatsCache.d.ts.map +1 -1
- package/dist/component/dashboardStatsCache.js +12 -53
- package/dist/component/dashboardStatsCache.js.map +1 -1
- package/dist/component/deviceCategories.d.ts +22 -15
- package/dist/component/deviceCategories.d.ts.map +1 -1
- package/dist/component/deviceCategories.js +10 -4
- package/dist/component/deviceCategories.js.map +1 -1
- package/dist/component/deviceQuestions.d.ts +36 -27
- package/dist/component/deviceQuestions.d.ts.map +1 -1
- package/dist/component/deviceQuestions.js +22 -5
- package/dist/component/deviceQuestions.js.map +1 -1
- package/dist/component/deviceRepairHistory.d.ts +3 -3
- package/dist/component/deviceRepairHistory.js +1 -1
- package/dist/component/deviceRepairHistory.js.map +1 -1
- package/dist/component/deviceStatus.d.ts +8 -57
- package/dist/component/deviceStatus.d.ts.map +1 -1
- package/dist/component/deviceStatus.js +32 -30
- package/dist/component/deviceStatus.js.map +1 -1
- package/dist/component/devices.d.ts +39 -22
- package/dist/component/devices.d.ts.map +1 -1
- package/dist/component/devices.js +85 -96
- package/dist/component/devices.js.map +1 -1
- package/dist/component/emailHelpers.d.ts +10 -3
- package/dist/component/emailHelpers.d.ts.map +1 -1
- package/dist/component/emailHelpers.js +9 -20
- package/dist/component/emailHelpers.js.map +1 -1
- package/dist/component/emails.d.ts +5 -5
- package/dist/component/emails.js +2 -2
- package/dist/component/emails.js.map +1 -1
- package/dist/component/http.d.ts.map +1 -1
- package/dist/component/http.js +3 -108
- package/dist/component/http.js.map +1 -1
- package/dist/component/migrationHelpers.d.ts +29 -0
- package/dist/component/migrationHelpers.d.ts.map +1 -0
- package/dist/component/migrationHelpers.js +84 -0
- package/dist/component/migrationHelpers.js.map +1 -0
- package/dist/component/roles.d.ts +1 -0
- package/dist/component/roles.d.ts.map +1 -1
- package/dist/component/roles.js +5 -6
- package/dist/component/roles.js.map +1 -1
- package/dist/component/schema.d.ts +69 -150
- package/dist/component/schema.d.ts.map +1 -1
- package/dist/component/schema.js +35 -88
- package/dist/component/schema.js.map +1 -1
- package/dist/component/slaMonitoring.d.ts +16 -30
- package/dist/component/slaMonitoring.d.ts.map +1 -1
- package/dist/component/slaMonitoring.js +48 -99
- package/dist/component/slaMonitoring.js.map +1 -1
- package/dist/component/spareParts.d.ts +11 -48
- package/dist/component/spareParts.d.ts.map +1 -1
- package/dist/component/spareParts.js +41 -11
- package/dist/component/spareParts.js.map +1 -1
- package/dist/component/suppliers.d.ts +38 -19
- package/dist/component/suppliers.d.ts.map +1 -1
- package/dist/component/suppliers.js +63 -44
- package/dist/component/suppliers.js.map +1 -1
- package/dist/component/ticketComments.d.ts +18 -12
- package/dist/component/ticketComments.d.ts.map +1 -1
- package/dist/component/ticketComments.js +28 -59
- package/dist/component/ticketComments.js.map +1 -1
- package/dist/component/ticketDeviceData.d.ts +63 -0
- package/dist/component/ticketDeviceData.d.ts.map +1 -0
- package/dist/component/ticketDeviceData.js +103 -0
- package/dist/component/ticketDeviceData.js.map +1 -0
- package/dist/component/ticketExport.d.ts +22 -40
- package/dist/component/ticketExport.d.ts.map +1 -1
- package/dist/component/ticketExport.js +43 -109
- package/dist/component/ticketExport.js.map +1 -1
- package/dist/component/ticketHistory.d.ts +4 -4
- package/dist/component/ticketHistory.d.ts.map +1 -1
- package/dist/component/ticketHistory.js +6 -9
- package/dist/component/ticketHistory.js.map +1 -1
- package/dist/component/ticketMacros.d.ts +19 -18
- package/dist/component/ticketMacros.d.ts.map +1 -1
- package/dist/component/ticketMacros.js +24 -30
- package/dist/component/ticketMacros.js.map +1 -1
- package/dist/component/ticketStatuses.d.ts +1 -0
- package/dist/component/ticketStatuses.d.ts.map +1 -1
- package/dist/component/ticketStatuses.js +5 -6
- package/dist/component/ticketStatuses.js.map +1 -1
- package/dist/component/ticketTriggers.d.ts +36 -16
- package/dist/component/ticketTriggers.d.ts.map +1 -1
- package/dist/component/ticketTriggers.js +115 -153
- package/dist/component/ticketTriggers.js.map +1 -1
- package/dist/component/userProfiles.d.ts +25 -120
- package/dist/component/userProfiles.d.ts.map +1 -1
- package/dist/component/userProfiles.js +73 -384
- package/dist/component/userProfiles.js.map +1 -1
- package/dist/test.d.ts +69 -150
- package/dist/test.d.ts.map +1 -1
- package/package.json +12 -3
- package/src/client/index.ts +2 -30
- package/src/component/_generated/api.ts +4 -4
- package/src/component/_generated/component.ts +228 -350
- package/src/component/contracts.ts +7 -14
- package/src/component/crons.ts +2 -7
- package/src/component/dashboardStats.ts +24 -41
- package/src/component/dashboardStatsCache.ts +12 -61
- package/src/component/deviceCategories.ts +12 -4
- package/src/component/deviceQuestions.ts +28 -5
- package/src/component/deviceRepairHistory.ts +1 -1
- package/src/component/deviceStatus.ts +43 -45
- package/src/component/devices.ts +87 -106
- package/src/component/emailHelpers.ts +9 -19
- package/src/component/emails.ts +2 -2
- package/src/component/http.ts +3 -108
- package/src/component/migrationHelpers.ts +96 -0
- package/src/component/roles.ts +5 -6
- package/src/component/schema.ts +35 -93
- package/src/component/slaMonitoring.ts +52 -107
- package/src/component/spareParts.ts +46 -12
- package/src/component/suppliers.ts +71 -48
- package/src/component/ticketComments.ts +28 -71
- package/src/component/ticketDeviceData.ts +113 -0
- package/src/component/ticketExport.ts +52 -137
- package/src/component/ticketHistory.ts +6 -9
- package/src/component/ticketMacros.ts +25 -37
- package/src/component/ticketStatuses.ts +5 -6
- package/src/component/ticketTriggers.ts +121 -217
- package/src/component/userProfiles.ts +67 -451
- package/dist/component/clinics.d.ts +0 -103
- package/dist/component/clinics.d.ts.map +0 -1
- package/dist/component/clinics.js +0 -126
- package/dist/component/clinics.js.map +0 -1
- package/dist/component/maintenanceTasks.d.ts +0 -733
- package/dist/component/maintenanceTasks.d.ts.map +0 -1
- package/dist/component/maintenanceTasks.js +0 -937
- package/dist/component/maintenanceTasks.js.map +0 -1
- package/src/component/clinics.ts +0 -136
- package/src/component/maintenanceTasks.ts +0 -1003
package/package.json
CHANGED
|
@@ -2,9 +2,15 @@
|
|
|
2
2
|
"name": "@primocaredentgroup/elettromedicali",
|
|
3
3
|
"description": "Convex component for medical device management, maintenance ticketing, SLA monitoring, and clinic/supplier management.",
|
|
4
4
|
"repository": "github:primocaredentgroup/elettromedicali_componente",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.1",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
|
-
"keywords": [
|
|
7
|
+
"keywords": [
|
|
8
|
+
"convex",
|
|
9
|
+
"component",
|
|
10
|
+
"medical-devices",
|
|
11
|
+
"maintenance",
|
|
12
|
+
"ticketing"
|
|
13
|
+
],
|
|
8
14
|
"type": "module",
|
|
9
15
|
"publishConfig": {
|
|
10
16
|
"access": "restricted"
|
|
@@ -26,7 +32,10 @@
|
|
|
26
32
|
"alpha": "npm version prerelease --preid alpha && npm publish --tag alpha && git push --follow-tags",
|
|
27
33
|
"release": "npm version patch && npm publish && git push --follow-tags"
|
|
28
34
|
},
|
|
29
|
-
"files": [
|
|
35
|
+
"files": [
|
|
36
|
+
"dist",
|
|
37
|
+
"src"
|
|
38
|
+
],
|
|
30
39
|
"exports": {
|
|
31
40
|
"./package.json": "./package.json",
|
|
32
41
|
".": {
|
package/src/client/index.ts
CHANGED
|
@@ -215,16 +215,6 @@ export function exposeApi(
|
|
|
215
215
|
},
|
|
216
216
|
) {
|
|
217
217
|
return {
|
|
218
|
-
// Clinics
|
|
219
|
-
listClinics: queryGeneric({
|
|
220
|
-
args: {},
|
|
221
|
-
handler: async (ctx) => {
|
|
222
|
-
const user = await options.auth(ctx);
|
|
223
|
-
if (!user || user.role !== "admin") throw new Error("Not authorized");
|
|
224
|
-
return await ctx.runQuery(component.clinics.listClinics);
|
|
225
|
-
},
|
|
226
|
-
}),
|
|
227
|
-
|
|
228
218
|
// Devices
|
|
229
219
|
listDevices: queryGeneric({
|
|
230
220
|
args: {
|
|
@@ -273,32 +263,13 @@ export function exposeApi(
|
|
|
273
263
|
},
|
|
274
264
|
}),
|
|
275
265
|
|
|
276
|
-
// Tickets
|
|
277
|
-
listMaintenanceTasks: queryGeneric({
|
|
278
|
-
args: {},
|
|
279
|
-
handler: async (ctx) => {
|
|
280
|
-
const user = await options.auth(ctx);
|
|
281
|
-
if (!user) throw new Error("Not authenticated");
|
|
282
|
-
return await ctx.runQuery(
|
|
283
|
-
component.maintenanceTasks.listMaintenanceTasks,
|
|
284
|
-
{
|
|
285
|
-
userRole: user.role,
|
|
286
|
-
userAuth0Id: user.auth0Id,
|
|
287
|
-
userSupplierId: user.supplierId,
|
|
288
|
-
userClinicId: user.clinicId,
|
|
289
|
-
userSelectedClinicId: user.selectedClinicId,
|
|
290
|
-
},
|
|
291
|
-
);
|
|
292
|
-
},
|
|
293
|
-
}),
|
|
294
|
-
|
|
295
266
|
// Suppliers
|
|
296
267
|
listSuppliers: queryGeneric({
|
|
297
268
|
args: {},
|
|
298
269
|
handler: async (ctx) => {
|
|
299
270
|
const user = await options.auth(ctx);
|
|
300
271
|
if (!user || user.role !== "admin") throw new Error("Not authorized");
|
|
301
|
-
return await ctx.runQuery(component.suppliers.listSuppliers);
|
|
272
|
+
return await ctx.runQuery(component.suppliers.listSuppliers, {});
|
|
302
273
|
},
|
|
303
274
|
}),
|
|
304
275
|
|
|
@@ -310,6 +281,7 @@ export function exposeApi(
|
|
|
310
281
|
if (!user || user.role !== "admin") throw new Error("Not authorized");
|
|
311
282
|
return await ctx.runQuery(
|
|
312
283
|
component.dashboardStats.getAdminDashboardStats,
|
|
284
|
+
{},
|
|
313
285
|
);
|
|
314
286
|
},
|
|
315
287
|
}),
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type * as apiKeys from "../apiKeys.js";
|
|
12
|
-
import type * as clinics from "../clinics.js";
|
|
13
12
|
import type * as contracts from "../contracts.js";
|
|
14
13
|
import type * as crons from "../crons.js";
|
|
15
14
|
import type * as dashboardStats from "../dashboardStats.js";
|
|
@@ -22,7 +21,7 @@ import type * as devices from "../devices.js";
|
|
|
22
21
|
import type * as emailHelpers from "../emailHelpers.js";
|
|
23
22
|
import type * as emails from "../emails.js";
|
|
24
23
|
import type * as http from "../http.js";
|
|
25
|
-
import type * as
|
|
24
|
+
import type * as migrationHelpers from "../migrationHelpers.js";
|
|
26
25
|
import type * as roles from "../roles.js";
|
|
27
26
|
import type * as slaMonitoring from "../slaMonitoring.js";
|
|
28
27
|
import type * as slaRules from "../slaRules.js";
|
|
@@ -32,6 +31,7 @@ import type * as supplierCategories from "../supplierCategories.js";
|
|
|
32
31
|
import type * as suppliers from "../suppliers.js";
|
|
33
32
|
import type * as ticketComments from "../ticketComments.js";
|
|
34
33
|
import type * as ticketCustomFields from "../ticketCustomFields.js";
|
|
34
|
+
import type * as ticketDeviceData from "../ticketDeviceData.js";
|
|
35
35
|
import type * as ticketExport from "../ticketExport.js";
|
|
36
36
|
import type * as ticketHistory from "../ticketHistory.js";
|
|
37
37
|
import type * as ticketMacros from "../ticketMacros.js";
|
|
@@ -49,7 +49,6 @@ import { anyApi, componentsGeneric } from "convex/server";
|
|
|
49
49
|
|
|
50
50
|
const fullApi: ApiFromModules<{
|
|
51
51
|
apiKeys: typeof apiKeys;
|
|
52
|
-
clinics: typeof clinics;
|
|
53
52
|
contracts: typeof contracts;
|
|
54
53
|
crons: typeof crons;
|
|
55
54
|
dashboardStats: typeof dashboardStats;
|
|
@@ -62,7 +61,7 @@ const fullApi: ApiFromModules<{
|
|
|
62
61
|
emailHelpers: typeof emailHelpers;
|
|
63
62
|
emails: typeof emails;
|
|
64
63
|
http: typeof http;
|
|
65
|
-
|
|
64
|
+
migrationHelpers: typeof migrationHelpers;
|
|
66
65
|
roles: typeof roles;
|
|
67
66
|
slaMonitoring: typeof slaMonitoring;
|
|
68
67
|
slaRules: typeof slaRules;
|
|
@@ -72,6 +71,7 @@ const fullApi: ApiFromModules<{
|
|
|
72
71
|
suppliers: typeof suppliers;
|
|
73
72
|
ticketComments: typeof ticketComments;
|
|
74
73
|
ticketCustomFields: typeof ticketCustomFields;
|
|
74
|
+
ticketDeviceData: typeof ticketDeviceData;
|
|
75
75
|
ticketExport: typeof ticketExport;
|
|
76
76
|
ticketHistory: typeof ticketHistory;
|
|
77
77
|
ticketMacros: typeof ticketMacros;
|