@primocaredentgroup/elettromedicali 0.1.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.
Files changed (197) hide show
  1. package/dist/client/index.d.ts +72 -0
  2. package/dist/client/index.d.ts.map +1 -0
  3. package/dist/client/index.js +233 -0
  4. package/dist/client/index.js.map +1 -0
  5. package/dist/component/_generated/api.d.ts +94 -0
  6. package/dist/component/_generated/api.d.ts.map +1 -0
  7. package/dist/component/_generated/api.js +31 -0
  8. package/dist/component/_generated/api.js.map +1 -0
  9. package/dist/component/_generated/component.d.ts +1444 -0
  10. package/dist/component/_generated/component.d.ts.map +1 -0
  11. package/dist/component/_generated/component.js +11 -0
  12. package/dist/component/_generated/component.js.map +1 -0
  13. package/dist/component/_generated/dataModel.d.ts +46 -0
  14. package/dist/component/_generated/dataModel.d.ts.map +1 -0
  15. package/dist/component/_generated/dataModel.js +11 -0
  16. package/dist/component/_generated/dataModel.js.map +1 -0
  17. package/dist/component/_generated/server.d.ts +121 -0
  18. package/dist/component/_generated/server.d.ts.map +1 -0
  19. package/dist/component/_generated/server.js +78 -0
  20. package/dist/component/_generated/server.js.map +1 -0
  21. package/dist/component/apiKeys.d.ts +69 -0
  22. package/dist/component/apiKeys.d.ts.map +1 -0
  23. package/dist/component/apiKeys.js +207 -0
  24. package/dist/component/apiKeys.js.map +1 -0
  25. package/dist/component/clinics.d.ts +103 -0
  26. package/dist/component/clinics.d.ts.map +1 -0
  27. package/dist/component/clinics.js +126 -0
  28. package/dist/component/clinics.js.map +1 -0
  29. package/dist/component/contracts.d.ts +85 -0
  30. package/dist/component/contracts.d.ts.map +1 -0
  31. package/dist/component/contracts.js +115 -0
  32. package/dist/component/contracts.js.map +1 -0
  33. package/dist/component/convex.config.d.ts +3 -0
  34. package/dist/component/convex.config.d.ts.map +1 -0
  35. package/dist/component/convex.config.js +3 -0
  36. package/dist/component/convex.config.js.map +1 -0
  37. package/dist/component/crons.d.ts +3 -0
  38. package/dist/component/crons.d.ts.map +1 -0
  39. package/dist/component/crons.js +7 -0
  40. package/dist/component/crons.js.map +1 -0
  41. package/dist/component/dashboardStats.d.ts +14 -0
  42. package/dist/component/dashboardStats.d.ts.map +1 -0
  43. package/dist/component/dashboardStats.js +136 -0
  44. package/dist/component/dashboardStats.js.map +1 -0
  45. package/dist/component/dashboardStatsCache.d.ts +32 -0
  46. package/dist/component/dashboardStatsCache.d.ts.map +1 -0
  47. package/dist/component/dashboardStatsCache.js +129 -0
  48. package/dist/component/dashboardStatsCache.js.map +1 -0
  49. package/dist/component/deviceCategories.d.ts +108 -0
  50. package/dist/component/deviceCategories.d.ts.map +1 -0
  51. package/dist/component/deviceCategories.js +254 -0
  52. package/dist/component/deviceCategories.js.map +1 -0
  53. package/dist/component/deviceQuestions.d.ts +129 -0
  54. package/dist/component/deviceQuestions.d.ts.map +1 -0
  55. package/dist/component/deviceQuestions.js +175 -0
  56. package/dist/component/deviceQuestions.js.map +1 -0
  57. package/dist/component/deviceRepairHistory.d.ts +30 -0
  58. package/dist/component/deviceRepairHistory.d.ts.map +1 -0
  59. package/dist/component/deviceRepairHistory.js +84 -0
  60. package/dist/component/deviceRepairHistory.js.map +1 -0
  61. package/dist/component/deviceStatus.d.ts +63 -0
  62. package/dist/component/deviceStatus.d.ts.map +1 -0
  63. package/dist/component/deviceStatus.js +58 -0
  64. package/dist/component/deviceStatus.js.map +1 -0
  65. package/dist/component/devices.d.ts +299 -0
  66. package/dist/component/devices.d.ts.map +1 -0
  67. package/dist/component/devices.js +587 -0
  68. package/dist/component/devices.js.map +1 -0
  69. package/dist/component/emailHelpers.d.ts +17 -0
  70. package/dist/component/emailHelpers.d.ts.map +1 -0
  71. package/dist/component/emailHelpers.js +39 -0
  72. package/dist/component/emailHelpers.js.map +1 -0
  73. package/dist/component/emails.d.ts +56 -0
  74. package/dist/component/emails.d.ts.map +1 -0
  75. package/dist/component/emails.js +58 -0
  76. package/dist/component/emails.js.map +1 -0
  77. package/dist/component/http.d.ts +3 -0
  78. package/dist/component/http.d.ts.map +1 -0
  79. package/dist/component/http.js +229 -0
  80. package/dist/component/http.js.map +1 -0
  81. package/dist/component/maintenanceTasks.d.ts +733 -0
  82. package/dist/component/maintenanceTasks.d.ts.map +1 -0
  83. package/dist/component/maintenanceTasks.js +937 -0
  84. package/dist/component/maintenanceTasks.js.map +1 -0
  85. package/dist/component/roles.d.ts +75 -0
  86. package/dist/component/roles.d.ts.map +1 -0
  87. package/dist/component/roles.js +98 -0
  88. package/dist/component/roles.js.map +1 -0
  89. package/dist/component/schema.d.ts +1295 -0
  90. package/dist/component/schema.d.ts.map +1 -0
  91. package/dist/component/schema.js +724 -0
  92. package/dist/component/schema.js.map +1 -0
  93. package/dist/component/slaMonitoring.d.ts +32 -0
  94. package/dist/component/slaMonitoring.d.ts.map +1 -0
  95. package/dist/component/slaMonitoring.js +111 -0
  96. package/dist/component/slaMonitoring.js.map +1 -0
  97. package/dist/component/slaRules.d.ts +72 -0
  98. package/dist/component/slaRules.d.ts.map +1 -0
  99. package/dist/component/slaRules.js +193 -0
  100. package/dist/component/slaRules.js.map +1 -0
  101. package/dist/component/sparePartOrders.d.ts +177 -0
  102. package/dist/component/sparePartOrders.d.ts.map +1 -0
  103. package/dist/component/sparePartOrders.js +243 -0
  104. package/dist/component/sparePartOrders.js.map +1 -0
  105. package/dist/component/spareParts.d.ts +472 -0
  106. package/dist/component/spareParts.d.ts.map +1 -0
  107. package/dist/component/spareParts.js +319 -0
  108. package/dist/component/spareParts.js.map +1 -0
  109. package/dist/component/supplierCategories.d.ts +22 -0
  110. package/dist/component/supplierCategories.d.ts.map +1 -0
  111. package/dist/component/supplierCategories.js +64 -0
  112. package/dist/component/supplierCategories.js.map +1 -0
  113. package/dist/component/suppliers.d.ts +94 -0
  114. package/dist/component/suppliers.d.ts.map +1 -0
  115. package/dist/component/suppliers.js +195 -0
  116. package/dist/component/suppliers.js.map +1 -0
  117. package/dist/component/ticketComments.d.ts +89 -0
  118. package/dist/component/ticketComments.d.ts.map +1 -0
  119. package/dist/component/ticketComments.js +246 -0
  120. package/dist/component/ticketComments.js.map +1 -0
  121. package/dist/component/ticketCustomFields.d.ts +149 -0
  122. package/dist/component/ticketCustomFields.d.ts.map +1 -0
  123. package/dist/component/ticketCustomFields.js +215 -0
  124. package/dist/component/ticketCustomFields.js.map +1 -0
  125. package/dist/component/ticketExport.d.ts +83 -0
  126. package/dist/component/ticketExport.d.ts.map +1 -0
  127. package/dist/component/ticketExport.js +182 -0
  128. package/dist/component/ticketExport.js.map +1 -0
  129. package/dist/component/ticketHistory.d.ts +57 -0
  130. package/dist/component/ticketHistory.d.ts.map +1 -0
  131. package/dist/component/ticketHistory.js +81 -0
  132. package/dist/component/ticketHistory.js.map +1 -0
  133. package/dist/component/ticketMacros.d.ts +141 -0
  134. package/dist/component/ticketMacros.d.ts.map +1 -0
  135. package/dist/component/ticketMacros.js +255 -0
  136. package/dist/component/ticketMacros.js.map +1 -0
  137. package/dist/component/ticketStatuses.d.ts +60 -0
  138. package/dist/component/ticketStatuses.d.ts.map +1 -0
  139. package/dist/component/ticketStatuses.js +110 -0
  140. package/dist/component/ticketStatuses.js.map +1 -0
  141. package/dist/component/ticketTriggers.d.ts +408 -0
  142. package/dist/component/ticketTriggers.d.ts.map +1 -0
  143. package/dist/component/ticketTriggers.js +941 -0
  144. package/dist/component/ticketTriggers.js.map +1 -0
  145. package/dist/component/userProfiles.d.ts +259 -0
  146. package/dist/component/userProfiles.d.ts.map +1 -0
  147. package/dist/component/userProfiles.js +634 -0
  148. package/dist/component/userProfiles.js.map +1 -0
  149. package/dist/component/vendorArticles.d.ts +64 -0
  150. package/dist/component/vendorArticles.d.ts.map +1 -0
  151. package/dist/component/vendorArticles.js +116 -0
  152. package/dist/component/vendorArticles.js.map +1 -0
  153. package/dist/test.d.ts +1302 -0
  154. package/dist/test.d.ts.map +1 -0
  155. package/dist/test.js +7 -0
  156. package/dist/test.js.map +1 -0
  157. package/package.json +71 -0
  158. package/src/client/index.ts +344 -0
  159. package/src/component/_generated/api.ts +110 -0
  160. package/src/component/_generated/component.ts +2460 -0
  161. package/src/component/_generated/dataModel.ts +60 -0
  162. package/src/component/_generated/server.ts +156 -0
  163. package/src/component/apiKeys.ts +229 -0
  164. package/src/component/clinics.ts +136 -0
  165. package/src/component/contracts.ts +136 -0
  166. package/src/component/convex.config.js +2 -0
  167. package/src/component/convex.config.ts +3 -0
  168. package/src/component/crons.ts +18 -0
  169. package/src/component/dashboardStats.ts +141 -0
  170. package/src/component/dashboardStatsCache.ts +145 -0
  171. package/src/component/deviceCategories.ts +280 -0
  172. package/src/component/deviceQuestions.ts +225 -0
  173. package/src/component/deviceRepairHistory.ts +94 -0
  174. package/src/component/deviceStatus.ts +79 -0
  175. package/src/component/devices.ts +645 -0
  176. package/src/component/emailHelpers.ts +38 -0
  177. package/src/component/emails.ts +61 -0
  178. package/src/component/http.ts +231 -0
  179. package/src/component/maintenanceTasks.ts +1003 -0
  180. package/src/component/roles.ts +99 -0
  181. package/src/component/schema.ts +842 -0
  182. package/src/component/slaMonitoring.ts +125 -0
  183. package/src/component/slaRules.ts +231 -0
  184. package/src/component/sparePartOrders.ts +290 -0
  185. package/src/component/spareParts.ts +362 -0
  186. package/src/component/supplierCategories.ts +65 -0
  187. package/src/component/suppliers.ts +234 -0
  188. package/src/component/ticketComments.ts +288 -0
  189. package/src/component/ticketCustomFields.ts +260 -0
  190. package/src/component/ticketExport.ts +220 -0
  191. package/src/component/ticketHistory.ts +106 -0
  192. package/src/component/ticketMacros.ts +291 -0
  193. package/src/component/ticketStatuses.ts +109 -0
  194. package/src/component/ticketTriggers.ts +1152 -0
  195. package/src/component/userProfiles.ts +745 -0
  196. package/src/component/vendorArticles.ts +139 -0
  197. package/src/test.ts +15 -0
package/dist/test.d.ts ADDED
@@ -0,0 +1,1302 @@
1
+ import type { TestConvex } from "convex-test";
2
+ import type { GenericSchema, SchemaDefinition } from "convex/server";
3
+ export declare function register(t: TestConvex<SchemaDefinition<GenericSchema, boolean>>, name?: string): void;
4
+ declare const _default: {
5
+ register: typeof register;
6
+ schema: SchemaDefinition<{
7
+ roles: import("convex/server").TableDefinition<import("convex/values").VObject<{
8
+ policies?: {
9
+ canViewAllClinics?: boolean | undefined;
10
+ canEditClinics?: boolean | undefined;
11
+ canViewAllDevices?: boolean | undefined;
12
+ canEditDevices?: boolean | undefined;
13
+ canViewAllTickets?: boolean | undefined;
14
+ canEditTickets?: boolean | undefined;
15
+ canManageUsers?: boolean | undefined;
16
+ canManageRoles?: boolean | undefined;
17
+ canViewReports?: boolean | undefined;
18
+ } | undefined;
19
+ createdAt?: number | undefined;
20
+ name: string;
21
+ description: string;
22
+ }, {
23
+ name: import("convex/values").VString<string, "required">;
24
+ description: import("convex/values").VString<string, "required">;
25
+ policies: import("convex/values").VObject<{
26
+ canViewAllClinics?: boolean | undefined;
27
+ canEditClinics?: boolean | undefined;
28
+ canViewAllDevices?: boolean | undefined;
29
+ canEditDevices?: boolean | undefined;
30
+ canViewAllTickets?: boolean | undefined;
31
+ canEditTickets?: boolean | undefined;
32
+ canManageUsers?: boolean | undefined;
33
+ canManageRoles?: boolean | undefined;
34
+ canViewReports?: boolean | undefined;
35
+ } | undefined, {
36
+ canViewAllClinics: import("convex/values").VBoolean<boolean | undefined, "optional">;
37
+ canEditClinics: import("convex/values").VBoolean<boolean | undefined, "optional">;
38
+ canViewAllDevices: import("convex/values").VBoolean<boolean | undefined, "optional">;
39
+ canEditDevices: import("convex/values").VBoolean<boolean | undefined, "optional">;
40
+ canViewAllTickets: import("convex/values").VBoolean<boolean | undefined, "optional">;
41
+ canEditTickets: import("convex/values").VBoolean<boolean | undefined, "optional">;
42
+ canManageUsers: import("convex/values").VBoolean<boolean | undefined, "optional">;
43
+ canManageRoles: import("convex/values").VBoolean<boolean | undefined, "optional">;
44
+ canViewReports: import("convex/values").VBoolean<boolean | undefined, "optional">;
45
+ }, "optional", "canViewAllClinics" | "canEditClinics" | "canViewAllDevices" | "canEditDevices" | "canViewAllTickets" | "canEditTickets" | "canManageUsers" | "canManageRoles" | "canViewReports">;
46
+ createdAt: import("convex/values").VFloat64<number | undefined, "optional">;
47
+ }, "required", "name" | "description" | "policies" | "createdAt" | "policies.canViewAllClinics" | "policies.canEditClinics" | "policies.canViewAllDevices" | "policies.canEditDevices" | "policies.canViewAllTickets" | "policies.canEditTickets" | "policies.canManageUsers" | "policies.canManageRoles" | "policies.canViewReports">, {
48
+ by_name: ["name", "_creationTime"];
49
+ }, {}, {}>;
50
+ user_profiles: import("convex/server").TableDefinition<import("convex/values").VObject<{
51
+ name?: string | undefined;
52
+ roleId?: import("convex/values").GenericId<"roles"> | undefined;
53
+ role?: string | undefined;
54
+ clinicId?: import("convex/values").GenericId<"clinics"> | undefined;
55
+ supplierId?: import("convex/values").GenericId<"suppliers"> | undefined;
56
+ primoupClinics?: any[] | undefined;
57
+ selectedClinicId?: number | undefined;
58
+ clinicChangeCounter?: number | undefined;
59
+ impersonatingUserId?: import("convex/values").GenericId<"user_profiles"> | undefined;
60
+ isActive?: boolean | undefined;
61
+ auth0Id: string;
62
+ email: string;
63
+ }, {
64
+ auth0Id: import("convex/values").VString<string, "required">;
65
+ roleId: import("convex/values").VId<import("convex/values").GenericId<"roles"> | undefined, "optional">;
66
+ role: import("convex/values").VString<string | undefined, "optional">;
67
+ clinicId: import("convex/values").VId<import("convex/values").GenericId<"clinics"> | undefined, "optional">;
68
+ supplierId: import("convex/values").VId<import("convex/values").GenericId<"suppliers"> | undefined, "optional">;
69
+ email: import("convex/values").VString<string, "required">;
70
+ name: import("convex/values").VString<string | undefined, "optional">;
71
+ primoupClinics: import("convex/values").VArray<any[] | undefined, import("convex/values").VAny<any, "required", string>, "optional">;
72
+ selectedClinicId: import("convex/values").VFloat64<number | undefined, "optional">;
73
+ clinicChangeCounter: import("convex/values").VFloat64<number | undefined, "optional">;
74
+ impersonatingUserId: import("convex/values").VId<import("convex/values").GenericId<"user_profiles"> | undefined, "optional">;
75
+ isActive: import("convex/values").VBoolean<boolean | undefined, "optional">;
76
+ }, "required", "name" | "auth0Id" | "roleId" | "role" | "clinicId" | "supplierId" | "email" | "primoupClinics" | "selectedClinicId" | "clinicChangeCounter" | "impersonatingUserId" | "isActive">, {
77
+ by_auth0Id: ["auth0Id", "_creationTime"];
78
+ by_email: ["email", "_creationTime"];
79
+ by_roleId: ["roleId", "_creationTime"];
80
+ by_clinicId: ["clinicId", "_creationTime"];
81
+ by_supplierId: ["supplierId", "_creationTime"];
82
+ by_isActive: ["isActive", "_creationTime"];
83
+ }, {}, {}>;
84
+ primoup_tokens: import("convex/server").TableDefinition<import("convex/values").VObject<{
85
+ refreshToken?: string | undefined;
86
+ expiresAt?: number | undefined;
87
+ lastUsedAt?: number | undefined;
88
+ createdAt: number;
89
+ isActive: boolean;
90
+ userId: string;
91
+ token: string;
92
+ }, {
93
+ userId: import("convex/values").VString<string, "required">;
94
+ token: import("convex/values").VString<string, "required">;
95
+ refreshToken: import("convex/values").VString<string | undefined, "optional">;
96
+ expiresAt: import("convex/values").VFloat64<number | undefined, "optional">;
97
+ createdAt: import("convex/values").VFloat64<number, "required">;
98
+ lastUsedAt: import("convex/values").VFloat64<number | undefined, "optional">;
99
+ isActive: import("convex/values").VBoolean<boolean, "required">;
100
+ }, "required", "createdAt" | "isActive" | "userId" | "token" | "refreshToken" | "expiresAt" | "lastUsedAt">, {
101
+ by_userId: ["userId", "_creationTime"];
102
+ by_userId_active: ["userId", "isActive", "_creationTime"];
103
+ }, {}, {}>;
104
+ primoup_access_logs: import("convex/server").TableDefinition<import("convex/values").VObject<{
105
+ endpoint?: string | undefined;
106
+ errorMessage?: string | undefined;
107
+ metadata?: any;
108
+ userId: string;
109
+ action: string;
110
+ success: boolean;
111
+ timestamp: number;
112
+ }, {
113
+ userId: import("convex/values").VString<string, "required">;
114
+ action: import("convex/values").VString<string, "required">;
115
+ endpoint: import("convex/values").VString<string | undefined, "optional">;
116
+ success: import("convex/values").VBoolean<boolean, "required">;
117
+ errorMessage: import("convex/values").VString<string | undefined, "optional">;
118
+ timestamp: import("convex/values").VFloat64<number, "required">;
119
+ metadata: import("convex/values").VAny<any, "optional", string>;
120
+ }, "required", "userId" | "action" | "endpoint" | "success" | "errorMessage" | "timestamp" | "metadata" | `metadata.${string}`>, {
121
+ by_userId: ["userId", "_creationTime"];
122
+ by_timestamp: ["timestamp", "_creationTime"];
123
+ by_userId_timestamp: ["userId", "timestamp", "_creationTime"];
124
+ }, {}, {}>;
125
+ clinics: import("convex/server").TableDefinition<import("convex/values").VObject<{
126
+ region?: string | undefined;
127
+ primoupId?: string | undefined;
128
+ name: string;
129
+ address: string;
130
+ contact_email: string;
131
+ contact_phone: string;
132
+ }, {
133
+ name: import("convex/values").VString<string, "required">;
134
+ address: import("convex/values").VString<string, "required">;
135
+ contact_email: import("convex/values").VString<string, "required">;
136
+ contact_phone: import("convex/values").VString<string, "required">;
137
+ region: import("convex/values").VString<string | undefined, "optional">;
138
+ primoupId: import("convex/values").VString<string | undefined, "optional">;
139
+ }, "required", "name" | "address" | "contact_email" | "contact_phone" | "region" | "primoupId">, {
140
+ by_primoupId: ["primoupId", "_creationTime"];
141
+ }, {}, {}>;
142
+ devices: import("convex/server").TableDefinition<import("convex/values").VObject<{
143
+ supplierId?: import("convex/values").GenericId<"suppliers"> | undefined;
144
+ metadata?: any;
145
+ primoupClinicId?: number | undefined;
146
+ photo?: string | undefined;
147
+ photoStorageId?: import("convex/values").GenericId<"_storage"> | undefined;
148
+ internalId?: string | undefined;
149
+ articleId?: string | undefined;
150
+ primoupCategoryId?: string | undefined;
151
+ industry40Data?: string | undefined;
152
+ quantity?: number | undefined;
153
+ purchaseDate?: number | undefined;
154
+ vendor?: string | undefined;
155
+ purchaseCost?: number | undefined;
156
+ warrantyEndDate?: number | undefined;
157
+ spareParts?: {
158
+ photoStorageId?: import("convex/values").GenericId<"_storage"> | undefined;
159
+ notes?: string | undefined;
160
+ name: string;
161
+ quantity: number;
162
+ code: string;
163
+ }[] | undefined;
164
+ maintenanceManualStorageId?: import("convex/values").GenericId<"_storage"> | undefined;
165
+ maintenanceReportsStorageIds?: import("convex/values").GenericId<"_storage">[] | undefined;
166
+ conformityDeclarationStorageId?: import("convex/values").GenericId<"_storage"> | undefined;
167
+ authorizationsStorageIds?: import("convex/values").GenericId<"_storage">[] | undefined;
168
+ otherAttachmentsStorageIds?: import("convex/values").GenericId<"_storage">[] | undefined;
169
+ name: string;
170
+ clinicId: import("convex/values").GenericId<"clinics">;
171
+ category: string;
172
+ brand: string;
173
+ model: string;
174
+ serial_number: string;
175
+ status: "active" | "in_maintenance" | "out_of_service";
176
+ }, {
177
+ clinicId: import("convex/values").VId<import("convex/values").GenericId<"clinics">, "required">;
178
+ primoupClinicId: import("convex/values").VFloat64<number | undefined, "optional">;
179
+ supplierId: import("convex/values").VId<import("convex/values").GenericId<"suppliers"> | undefined, "optional">;
180
+ name: import("convex/values").VString<string, "required">;
181
+ category: import("convex/values").VString<string, "required">;
182
+ brand: import("convex/values").VString<string, "required">;
183
+ model: import("convex/values").VString<string, "required">;
184
+ serial_number: import("convex/values").VString<string, "required">;
185
+ photo: import("convex/values").VString<string | undefined, "optional">;
186
+ photoStorageId: import("convex/values").VId<import("convex/values").GenericId<"_storage"> | undefined, "optional">;
187
+ status: import("convex/values").VUnion<"active" | "in_maintenance" | "out_of_service", [import("convex/values").VLiteral<"active", "required">, import("convex/values").VLiteral<"in_maintenance", "required">, import("convex/values").VLiteral<"out_of_service", "required">], "required", never>;
188
+ metadata: import("convex/values").VAny<any, "optional", string>;
189
+ internalId: import("convex/values").VString<string | undefined, "optional">;
190
+ articleId: import("convex/values").VString<string | undefined, "optional">;
191
+ primoupCategoryId: import("convex/values").VString<string | undefined, "optional">;
192
+ industry40Data: import("convex/values").VString<string | undefined, "optional">;
193
+ quantity: import("convex/values").VFloat64<number | undefined, "optional">;
194
+ purchaseDate: import("convex/values").VFloat64<number | undefined, "optional">;
195
+ vendor: import("convex/values").VString<string | undefined, "optional">;
196
+ purchaseCost: import("convex/values").VFloat64<number | undefined, "optional">;
197
+ warrantyEndDate: import("convex/values").VFloat64<number | undefined, "optional">;
198
+ spareParts: import("convex/values").VArray<{
199
+ photoStorageId?: import("convex/values").GenericId<"_storage"> | undefined;
200
+ notes?: string | undefined;
201
+ name: string;
202
+ quantity: number;
203
+ code: string;
204
+ }[] | undefined, import("convex/values").VObject<{
205
+ photoStorageId?: import("convex/values").GenericId<"_storage"> | undefined;
206
+ notes?: string | undefined;
207
+ name: string;
208
+ quantity: number;
209
+ code: string;
210
+ }, {
211
+ name: import("convex/values").VString<string, "required">;
212
+ code: import("convex/values").VString<string, "required">;
213
+ photoStorageId: import("convex/values").VId<import("convex/values").GenericId<"_storage"> | undefined, "optional">;
214
+ quantity: import("convex/values").VFloat64<number, "required">;
215
+ notes: import("convex/values").VString<string | undefined, "optional">;
216
+ }, "required", "name" | "photoStorageId" | "quantity" | "code" | "notes">, "optional">;
217
+ maintenanceManualStorageId: import("convex/values").VId<import("convex/values").GenericId<"_storage"> | undefined, "optional">;
218
+ maintenanceReportsStorageIds: import("convex/values").VArray<import("convex/values").GenericId<"_storage">[] | undefined, import("convex/values").VId<import("convex/values").GenericId<"_storage">, "required">, "optional">;
219
+ conformityDeclarationStorageId: import("convex/values").VId<import("convex/values").GenericId<"_storage"> | undefined, "optional">;
220
+ authorizationsStorageIds: import("convex/values").VArray<import("convex/values").GenericId<"_storage">[] | undefined, import("convex/values").VId<import("convex/values").GenericId<"_storage">, "required">, "optional">;
221
+ otherAttachmentsStorageIds: import("convex/values").VArray<import("convex/values").GenericId<"_storage">[] | undefined, import("convex/values").VId<import("convex/values").GenericId<"_storage">, "required">, "optional">;
222
+ }, "required", "name" | "clinicId" | "supplierId" | "metadata" | `metadata.${string}` | "primoupClinicId" | "category" | "brand" | "model" | "serial_number" | "photo" | "photoStorageId" | "status" | "internalId" | "articleId" | "primoupCategoryId" | "industry40Data" | "quantity" | "purchaseDate" | "vendor" | "purchaseCost" | "warrantyEndDate" | "spareParts" | "maintenanceManualStorageId" | "maintenanceReportsStorageIds" | "conformityDeclarationStorageId" | "authorizationsStorageIds" | "otherAttachmentsStorageIds">, {
223
+ by_clinicId: ["clinicId", "_creationTime"];
224
+ by_primoupClinicId: ["primoupClinicId", "_creationTime"];
225
+ by_supplierId: ["supplierId", "_creationTime"];
226
+ by_category: ["category", "_creationTime"];
227
+ by_status: ["status", "_creationTime"];
228
+ by_internalId: ["internalId", "_creationTime"];
229
+ by_articleId: ["articleId", "_creationTime"];
230
+ by_primoupCategoryId: ["primoupCategoryId", "_creationTime"];
231
+ }, {}, {}>;
232
+ device_repair_history: import("convex/server").TableDefinition<import("convex/values").VObject<{
233
+ notes?: string | undefined;
234
+ ticketId?: import("convex/values").GenericId<"maintenance_tasks"> | undefined;
235
+ returnedAt?: number | undefined;
236
+ statusAfterRepair?: "active" | "out_of_service" | undefined;
237
+ returnedBy?: string | undefined;
238
+ clinicId: import("convex/values").GenericId<"clinics">;
239
+ deviceId: import("convex/values").GenericId<"devices">;
240
+ sentToRepairAt: number;
241
+ createdBy: string;
242
+ }, {
243
+ deviceId: import("convex/values").VId<import("convex/values").GenericId<"devices">, "required">;
244
+ clinicId: import("convex/values").VId<import("convex/values").GenericId<"clinics">, "required">;
245
+ ticketId: import("convex/values").VId<import("convex/values").GenericId<"maintenance_tasks"> | undefined, "optional">;
246
+ sentToRepairAt: import("convex/values").VFloat64<number, "required">;
247
+ returnedAt: import("convex/values").VFloat64<number | undefined, "optional">;
248
+ statusAfterRepair: import("convex/values").VUnion<"active" | "out_of_service" | undefined, [import("convex/values").VLiteral<"active", "required">, import("convex/values").VLiteral<"out_of_service", "required">], "optional", never>;
249
+ notes: import("convex/values").VString<string | undefined, "optional">;
250
+ createdBy: import("convex/values").VString<string, "required">;
251
+ returnedBy: import("convex/values").VString<string | undefined, "optional">;
252
+ }, "required", "clinicId" | "notes" | "deviceId" | "ticketId" | "sentToRepairAt" | "returnedAt" | "statusAfterRepair" | "createdBy" | "returnedBy">, {
253
+ by_deviceId: ["deviceId", "_creationTime"];
254
+ by_clinicId: ["clinicId", "_creationTime"];
255
+ by_deviceId_sentAt: ["deviceId", "sentToRepairAt", "_creationTime"];
256
+ }, {}, {}>;
257
+ supplier_categories: import("convex/server").TableDefinition<import("convex/values").VObject<{
258
+ description?: string | undefined;
259
+ name: string;
260
+ createdAt: number;
261
+ }, {
262
+ name: import("convex/values").VString<string, "required">;
263
+ description: import("convex/values").VString<string | undefined, "optional">;
264
+ createdAt: import("convex/values").VFloat64<number, "required">;
265
+ }, "required", "name" | "description" | "createdAt">, {
266
+ by_name: ["name", "_creationTime"];
267
+ }, {}, {}>;
268
+ sla_rules: import("convex/server").TableDefinition<import("convex/values").VObject<{
269
+ name?: string | undefined;
270
+ description?: string | undefined;
271
+ deviceCategory?: string | undefined;
272
+ createdAt: number;
273
+ supplierId: import("convex/values").GenericId<"suppliers">;
274
+ priority: "low" | "medium" | "high";
275
+ responseTimeHours: number;
276
+ resolutionTimeHours: number;
277
+ updatedAt: number;
278
+ }, {
279
+ name: import("convex/values").VString<string | undefined, "optional">;
280
+ supplierId: import("convex/values").VId<import("convex/values").GenericId<"suppliers">, "required">;
281
+ deviceCategory: import("convex/values").VString<string | undefined, "optional">;
282
+ priority: import("convex/values").VUnion<"low" | "medium" | "high", [import("convex/values").VLiteral<"low", "required">, import("convex/values").VLiteral<"medium", "required">, import("convex/values").VLiteral<"high", "required">], "required", never>;
283
+ responseTimeHours: import("convex/values").VFloat64<number, "required">;
284
+ resolutionTimeHours: import("convex/values").VFloat64<number, "required">;
285
+ description: import("convex/values").VString<string | undefined, "optional">;
286
+ createdAt: import("convex/values").VFloat64<number, "required">;
287
+ updatedAt: import("convex/values").VFloat64<number, "required">;
288
+ }, "required", "name" | "description" | "createdAt" | "supplierId" | "deviceCategory" | "priority" | "responseTimeHours" | "resolutionTimeHours" | "updatedAt">, {
289
+ by_supplierId: ["supplierId", "_creationTime"];
290
+ by_supplierId_priority: ["supplierId", "priority", "_creationTime"];
291
+ by_supplierId_category_priority: ["supplierId", "deviceCategory", "priority", "_creationTime"];
292
+ }, {}, {}>;
293
+ suppliers: import("convex/server").TableDefinition<import("convex/values").VObject<{
294
+ type?: string | undefined;
295
+ primoupId?: string | undefined;
296
+ notes?: string | undefined;
297
+ name: string;
298
+ contact_email: string;
299
+ contact_phone: string;
300
+ categories: string[];
301
+ sla_days: number;
302
+ }, {
303
+ name: import("convex/values").VString<string, "required">;
304
+ contact_email: import("convex/values").VString<string, "required">;
305
+ contact_phone: import("convex/values").VString<string, "required">;
306
+ categories: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
307
+ sla_days: import("convex/values").VFloat64<number, "required">;
308
+ notes: import("convex/values").VString<string | undefined, "optional">;
309
+ primoupId: import("convex/values").VString<string | undefined, "optional">;
310
+ type: import("convex/values").VString<string | undefined, "optional">;
311
+ }, "required", "name" | "type" | "contact_email" | "contact_phone" | "primoupId" | "notes" | "categories" | "sla_days">, {
312
+ by_primoupId: ["primoupId", "_creationTime"];
313
+ }, {}, {}>;
314
+ vendor_articles: import("convex/server").TableDefinition<import("convex/values").VObject<{
315
+ metadata?: any;
316
+ primoupVendorId?: string | undefined;
317
+ primoupArticleId?: string | undefined;
318
+ deviceId: import("convex/values").GenericId<"devices">;
319
+ vendorId: import("convex/values").GenericId<"suppliers">;
320
+ }, {
321
+ vendorId: import("convex/values").VId<import("convex/values").GenericId<"suppliers">, "required">;
322
+ deviceId: import("convex/values").VId<import("convex/values").GenericId<"devices">, "required">;
323
+ primoupVendorId: import("convex/values").VString<string | undefined, "optional">;
324
+ primoupArticleId: import("convex/values").VString<string | undefined, "optional">;
325
+ metadata: import("convex/values").VAny<any, "optional", string>;
326
+ }, "required", "metadata" | `metadata.${string}` | "deviceId" | "vendorId" | "primoupVendorId" | "primoupArticleId">, {
327
+ by_vendorId: ["vendorId", "_creationTime"];
328
+ by_deviceId: ["deviceId", "_creationTime"];
329
+ by_vendorId_deviceId: ["vendorId", "deviceId", "_creationTime"];
330
+ by_primoupVendorId: ["primoupVendorId", "_creationTime"];
331
+ by_primoupArticleId: ["primoupArticleId", "_creationTime"];
332
+ }, {}, {}>;
333
+ contracts: import("convex/server").TableDefinition<import("convex/values").VObject<{
334
+ description?: string | undefined;
335
+ clinicId?: import("convex/values").GenericId<"clinics"> | undefined;
336
+ clinicIds?: import("convex/values").GenericId<"clinics">[] | undefined;
337
+ pdfStorageId?: import("convex/values").GenericId<"_storage"> | undefined;
338
+ pdf_url?: string | undefined;
339
+ type: "full" | "on_demand" | "mixed";
340
+ supplierId: import("convex/values").GenericId<"suppliers">;
341
+ start_date: number;
342
+ end_date: number;
343
+ amount: number;
344
+ related_devices: import("convex/values").GenericId<"devices">[];
345
+ }, {
346
+ supplierId: import("convex/values").VId<import("convex/values").GenericId<"suppliers">, "required">;
347
+ clinicId: import("convex/values").VId<import("convex/values").GenericId<"clinics"> | undefined, "optional">;
348
+ clinicIds: import("convex/values").VArray<import("convex/values").GenericId<"clinics">[] | undefined, import("convex/values").VId<import("convex/values").GenericId<"clinics">, "required">, "optional">;
349
+ start_date: import("convex/values").VFloat64<number, "required">;
350
+ end_date: import("convex/values").VFloat64<number, "required">;
351
+ amount: import("convex/values").VFloat64<number, "required">;
352
+ type: import("convex/values").VUnion<"full" | "on_demand" | "mixed", [import("convex/values").VLiteral<"full", "required">, import("convex/values").VLiteral<"on_demand", "required">, import("convex/values").VLiteral<"mixed", "required">], "required", never>;
353
+ description: import("convex/values").VString<string | undefined, "optional">;
354
+ pdfStorageId: import("convex/values").VId<import("convex/values").GenericId<"_storage"> | undefined, "optional">;
355
+ pdf_url: import("convex/values").VString<string | undefined, "optional">;
356
+ related_devices: import("convex/values").VArray<import("convex/values").GenericId<"devices">[], import("convex/values").VId<import("convex/values").GenericId<"devices">, "required">, "required">;
357
+ }, "required", "description" | "type" | "clinicId" | "supplierId" | "clinicIds" | "start_date" | "end_date" | "amount" | "pdfStorageId" | "pdf_url" | "related_devices">, {
358
+ by_supplierId: ["supplierId", "_creationTime"];
359
+ by_clinicId: ["clinicId", "_creationTime"];
360
+ }, {}, {}>;
361
+ ticket_statuses: import("convex/server").TableDefinition<import("convex/values").VObject<{
362
+ slug?: string | undefined;
363
+ name: string;
364
+ createdAt: number;
365
+ isActive: boolean;
366
+ label: string;
367
+ color: string;
368
+ order: number;
369
+ }, {
370
+ name: import("convex/values").VString<string, "required">;
371
+ slug: import("convex/values").VString<string | undefined, "optional">;
372
+ label: import("convex/values").VString<string, "required">;
373
+ color: import("convex/values").VString<string, "required">;
374
+ order: import("convex/values").VFloat64<number, "required">;
375
+ isActive: import("convex/values").VBoolean<boolean, "required">;
376
+ createdAt: import("convex/values").VFloat64<number, "required">;
377
+ }, "required", "name" | "createdAt" | "isActive" | "slug" | "label" | "color" | "order">, {
378
+ by_name: ["name", "_creationTime"];
379
+ by_slug: ["slug", "_creationTime"];
380
+ by_order: ["order", "_creationTime"];
381
+ by_isActive: ["isActive", "_creationTime"];
382
+ }, {}, {}>;
383
+ ticket_custom_fields: import("convex/server").TableDefinition<import("convex/values").VObject<{
384
+ categories?: string[] | undefined;
385
+ options?: string[] | undefined;
386
+ placeholder?: string | undefined;
387
+ helpText?: string | undefined;
388
+ deviceIds?: import("convex/values").GenericId<"devices">[] | undefined;
389
+ parentFieldId?: import("convex/values").GenericId<"ticket_custom_fields"> | undefined;
390
+ parentFieldValue?: string | undefined;
391
+ childFields?: {
392
+ parentValue: string;
393
+ childFieldIds: import("convex/values").GenericId<"ticket_custom_fields">[];
394
+ }[] | undefined;
395
+ name: string;
396
+ createdAt: number;
397
+ isActive: boolean;
398
+ updatedAt: number;
399
+ order: number;
400
+ fieldType: "number" | "text" | "textarea" | "select" | "multiselect" | "date" | "checkbox" | "radio";
401
+ isRequired: boolean;
402
+ applyToAll: boolean;
403
+ }, {
404
+ name: import("convex/values").VString<string, "required">;
405
+ fieldType: import("convex/values").VUnion<"number" | "text" | "textarea" | "select" | "multiselect" | "date" | "checkbox" | "radio", [import("convex/values").VLiteral<"text", "required">, import("convex/values").VLiteral<"textarea", "required">, import("convex/values").VLiteral<"number", "required">, import("convex/values").VLiteral<"select", "required">, import("convex/values").VLiteral<"multiselect", "required">, import("convex/values").VLiteral<"date", "required">, import("convex/values").VLiteral<"checkbox", "required">, import("convex/values").VLiteral<"radio", "required">], "required", never>;
406
+ options: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
407
+ isRequired: import("convex/values").VBoolean<boolean, "required">;
408
+ placeholder: import("convex/values").VString<string | undefined, "optional">;
409
+ helpText: import("convex/values").VString<string | undefined, "optional">;
410
+ order: import("convex/values").VFloat64<number, "required">;
411
+ isActive: import("convex/values").VBoolean<boolean, "required">;
412
+ applyToAll: import("convex/values").VBoolean<boolean, "required">;
413
+ categories: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
414
+ deviceIds: import("convex/values").VArray<import("convex/values").GenericId<"devices">[] | undefined, import("convex/values").VId<import("convex/values").GenericId<"devices">, "required">, "optional">;
415
+ parentFieldId: import("convex/values").VId<import("convex/values").GenericId<"ticket_custom_fields"> | undefined, "optional">;
416
+ parentFieldValue: import("convex/values").VString<string | undefined, "optional">;
417
+ childFields: import("convex/values").VArray<{
418
+ parentValue: string;
419
+ childFieldIds: import("convex/values").GenericId<"ticket_custom_fields">[];
420
+ }[] | undefined, import("convex/values").VObject<{
421
+ parentValue: string;
422
+ childFieldIds: import("convex/values").GenericId<"ticket_custom_fields">[];
423
+ }, {
424
+ parentValue: import("convex/values").VString<string, "required">;
425
+ childFieldIds: import("convex/values").VArray<import("convex/values").GenericId<"ticket_custom_fields">[], import("convex/values").VId<import("convex/values").GenericId<"ticket_custom_fields">, "required">, "required">;
426
+ }, "required", "parentValue" | "childFieldIds">, "optional">;
427
+ createdAt: import("convex/values").VFloat64<number, "required">;
428
+ updatedAt: import("convex/values").VFloat64<number, "required">;
429
+ }, "required", "name" | "createdAt" | "isActive" | "updatedAt" | "categories" | "order" | "fieldType" | "options" | "isRequired" | "placeholder" | "helpText" | "applyToAll" | "deviceIds" | "parentFieldId" | "parentFieldValue" | "childFields">, {
430
+ by_order: ["order", "_creationTime"];
431
+ by_isActive: ["isActive", "_creationTime"];
432
+ by_applyToAll: ["applyToAll", "_creationTime"];
433
+ by_parentFieldId: ["parentFieldId", "_creationTime"];
434
+ }, {}, {}>;
435
+ maintenance_tasks: import("convex/server").TableDefinition<import("convex/values").VObject<{
436
+ supplierId?: import("convex/values").GenericId<"suppliers"> | undefined;
437
+ notes?: string | undefined;
438
+ deviceId?: import("convex/values").GenericId<"devices"> | undefined;
439
+ priority?: "low" | "medium" | "high" | undefined;
440
+ ticketNumber?: string | undefined;
441
+ title?: string | undefined;
442
+ createdByEmail?: string | undefined;
443
+ photoStorageIds?: import("convex/values").GenericId<"_storage">[] | undefined;
444
+ customFields?: any;
445
+ deviceQuestionAnswers?: {
446
+ questionId: import("convex/values").GenericId<"device_questions">;
447
+ question: string;
448
+ answer: any;
449
+ }[] | undefined;
450
+ slaDeadline?: number | undefined;
451
+ slaBreached?: boolean | undefined;
452
+ slaWarningSent?: boolean | undefined;
453
+ externalTicketId?: string | undefined;
454
+ externalTicketNumber?: number | undefined;
455
+ importSource?: string | undefined;
456
+ legacyTicketId?: number | undefined;
457
+ isExternal?: boolean | undefined;
458
+ needsAssignment?: boolean | undefined;
459
+ closed_at?: number | undefined;
460
+ description: string;
461
+ clinicId: import("convex/values").GenericId<"clinics">;
462
+ status: string;
463
+ created_by: string;
464
+ photos: string[];
465
+ created_at: number;
466
+ updated_at: number;
467
+ }, {
468
+ ticketNumber: import("convex/values").VString<string | undefined, "optional">;
469
+ title: import("convex/values").VString<string | undefined, "optional">;
470
+ deviceId: import("convex/values").VId<import("convex/values").GenericId<"devices"> | undefined, "optional">;
471
+ clinicId: import("convex/values").VId<import("convex/values").GenericId<"clinics">, "required">;
472
+ supplierId: import("convex/values").VId<import("convex/values").GenericId<"suppliers"> | undefined, "optional">;
473
+ created_by: import("convex/values").VString<string, "required">;
474
+ createdByEmail: import("convex/values").VString<string | undefined, "optional">;
475
+ description: import("convex/values").VString<string, "required">;
476
+ photos: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
477
+ photoStorageIds: import("convex/values").VArray<import("convex/values").GenericId<"_storage">[] | undefined, import("convex/values").VId<import("convex/values").GenericId<"_storage">, "required">, "optional">;
478
+ status: import("convex/values").VString<string, "required">;
479
+ priority: import("convex/values").VUnion<"low" | "medium" | "high" | undefined, [import("convex/values").VLiteral<"low", "required">, import("convex/values").VLiteral<"medium", "required">, import("convex/values").VLiteral<"high", "required">], "optional", never>;
480
+ notes: import("convex/values").VString<string | undefined, "optional">;
481
+ customFields: import("convex/values").VAny<any, "optional", string>;
482
+ deviceQuestionAnswers: import("convex/values").VArray<{
483
+ questionId: import("convex/values").GenericId<"device_questions">;
484
+ question: string;
485
+ answer: any;
486
+ }[] | undefined, import("convex/values").VObject<{
487
+ questionId: import("convex/values").GenericId<"device_questions">;
488
+ question: string;
489
+ answer: any;
490
+ }, {
491
+ questionId: import("convex/values").VId<import("convex/values").GenericId<"device_questions">, "required">;
492
+ question: import("convex/values").VString<string, "required">;
493
+ answer: import("convex/values").VAny<any, "required", string>;
494
+ }, "required", "questionId" | "question" | "answer" | `answer.${string}`>, "optional">;
495
+ slaDeadline: import("convex/values").VFloat64<number | undefined, "optional">;
496
+ slaBreached: import("convex/values").VBoolean<boolean | undefined, "optional">;
497
+ slaWarningSent: import("convex/values").VBoolean<boolean | undefined, "optional">;
498
+ externalTicketId: import("convex/values").VString<string | undefined, "optional">;
499
+ externalTicketNumber: import("convex/values").VFloat64<number | undefined, "optional">;
500
+ importSource: import("convex/values").VString<string | undefined, "optional">;
501
+ legacyTicketId: import("convex/values").VFloat64<number | undefined, "optional">;
502
+ isExternal: import("convex/values").VBoolean<boolean | undefined, "optional">;
503
+ needsAssignment: import("convex/values").VBoolean<boolean | undefined, "optional">;
504
+ created_at: import("convex/values").VFloat64<number, "required">;
505
+ updated_at: import("convex/values").VFloat64<number, "required">;
506
+ closed_at: import("convex/values").VFloat64<number | undefined, "optional">;
507
+ }, "required", "description" | "clinicId" | "supplierId" | "status" | "notes" | "deviceId" | "priority" | "ticketNumber" | "title" | "created_by" | "createdByEmail" | "photos" | "photoStorageIds" | "customFields" | "deviceQuestionAnswers" | "slaDeadline" | "slaBreached" | "slaWarningSent" | "externalTicketId" | "externalTicketNumber" | "importSource" | "legacyTicketId" | "isExternal" | "needsAssignment" | "created_at" | "updated_at" | "closed_at" | `customFields.${string}`>, {
508
+ by_ticketNumber: ["ticketNumber", "_creationTime"];
509
+ by_deviceId: ["deviceId", "_creationTime"];
510
+ by_clinicId: ["clinicId", "_creationTime"];
511
+ by_supplierId: ["supplierId", "_creationTime"];
512
+ by_status: ["status", "_creationTime"];
513
+ by_status_created_at: ["status", "created_at", "_creationTime"];
514
+ by_priority: ["priority", "_creationTime"];
515
+ by_created_at: ["created_at", "_creationTime"];
516
+ by_slaDeadline: ["slaDeadline", "_creationTime"];
517
+ by_externalTicketId: ["externalTicketId", "_creationTime"];
518
+ by_importSource: ["importSource", "_creationTime"];
519
+ }, {}, {}>;
520
+ dashboard_stats_cache: import("convex/server").TableDefinition<import("convex/values").VObject<{
521
+ lastUpdated: number;
522
+ totalClinics: number;
523
+ totalSuppliers: number;
524
+ totalDevices: number;
525
+ deviceCountByStatus: any;
526
+ ticketStats: any;
527
+ totalTickets: number;
528
+ }, {
529
+ lastUpdated: import("convex/values").VFloat64<number, "required">;
530
+ totalClinics: import("convex/values").VFloat64<number, "required">;
531
+ totalSuppliers: import("convex/values").VFloat64<number, "required">;
532
+ totalDevices: import("convex/values").VFloat64<number, "required">;
533
+ deviceCountByStatus: import("convex/values").VAny<any, "required", string>;
534
+ ticketStats: import("convex/values").VAny<any, "required", string>;
535
+ totalTickets: import("convex/values").VFloat64<number, "required">;
536
+ }, "required", "lastUpdated" | "totalClinics" | "totalSuppliers" | "totalDevices" | "deviceCountByStatus" | "ticketStats" | "totalTickets" | `deviceCountByStatus.${string}` | `ticketStats.${string}`>, {}, {}, {}>;
537
+ push_subscriptions: import("convex/server").TableDefinition<import("convex/values").VObject<{
538
+ userId: string;
539
+ subscription: any;
540
+ }, {
541
+ userId: import("convex/values").VString<string, "required">;
542
+ subscription: import("convex/values").VAny<any, "required", string>;
543
+ }, "required", "userId" | "subscription" | `subscription.${string}`>, {
544
+ by_userId: ["userId", "_creationTime"];
545
+ }, {}, {}>;
546
+ ticket_triggers: import("convex/server").TableDefinition<import("convex/values").VObject<{
547
+ description?: string | undefined;
548
+ name: string;
549
+ createdAt: number;
550
+ isActive: boolean;
551
+ createdBy: string;
552
+ priority: number;
553
+ updatedAt: number;
554
+ conditions: {
555
+ categories?: string[] | undefined;
556
+ conditionLogic?: "AND" | "OR" | undefined;
557
+ conditionsList?: {
558
+ customFieldId?: import("convex/values").GenericId<"ticket_custom_fields"> | undefined;
559
+ customFieldOperator?: "equals" | "not_equals" | "contains" | "greater_than" | "less_than" | "is_empty" | "is_not_empty" | undefined;
560
+ type: "region" | "category" | "brand" | "model" | "status" | "priority" | "trigger_event" | "custom_field";
561
+ negated: boolean;
562
+ value: string | string[];
563
+ nextOperator: "AND" | "OR";
564
+ }[] | undefined;
565
+ regions?: string[] | undefined;
566
+ applyToAllRegions?: boolean | undefined;
567
+ brands?: string[] | undefined;
568
+ brandOperator?: "is" | "is_not" | undefined;
569
+ models?: string[] | undefined;
570
+ modelOperator?: "is" | "is_not" | undefined;
571
+ statuses?: string[] | undefined;
572
+ statusOperator?: "is" | "is_not" | undefined;
573
+ customFieldConditions?: {
574
+ value?: any;
575
+ fieldId: import("convex/values").GenericId<"ticket_custom_fields">;
576
+ operator: "equals" | "not_equals" | "contains" | "greater_than" | "less_than" | "is_empty" | "is_not_empty";
577
+ }[] | undefined;
578
+ sparePartOrderFilters?: {
579
+ statuses?: string[] | undefined;
580
+ supplierIds?: import("convex/values").GenericId<"suppliers">[] | undefined;
581
+ applyToAllSuppliers?: boolean | undefined;
582
+ } | undefined;
583
+ applyToAllCategories: boolean;
584
+ triggerOn: "create" | "status_change" | "update" | "sla_warning" | "sla_breach" | "spare_part_order_created" | "spare_part_order_status_change";
585
+ };
586
+ actions: {
587
+ changeStatus?: string | undefined;
588
+ assignSupplier?: import("convex/values").GenericId<"suppliers"> | undefined;
589
+ assignUser?: import("convex/values").GenericId<"user_profiles"> | undefined;
590
+ setSlaHours?: number | undefined;
591
+ applySlaRule?: boolean | undefined;
592
+ addNote?: string | undefined;
593
+ sendNotification?: {
594
+ recipients: ("admin" | "supplier" | {
595
+ supplierId?: import("convex/values").GenericId<"suppliers"> | undefined;
596
+ userId?: import("convex/values").GenericId<"user_profiles"> | undefined;
597
+ type: "admin" | "supplier" | "ticket_creator" | "ticket_assignee" | "specific_user" | "specific_supplier";
598
+ } | "clinic")[];
599
+ message: string;
600
+ } | undefined;
601
+ setPriority?: string | undefined;
602
+ requireAttachment?: boolean | undefined;
603
+ sparePartOrderActions?: {
604
+ changeOrderStatus?: string | undefined;
605
+ addOrderNote?: string | undefined;
606
+ sendOrderNotification?: {
607
+ recipients: ("admin" | "supplier" | "order_creator")[];
608
+ message: string;
609
+ } | undefined;
610
+ } | undefined;
611
+ };
612
+ }, {
613
+ name: import("convex/values").VString<string, "required">;
614
+ description: import("convex/values").VString<string | undefined, "optional">;
615
+ isActive: import("convex/values").VBoolean<boolean, "required">;
616
+ priority: import("convex/values").VFloat64<number, "required">;
617
+ conditions: import("convex/values").VObject<{
618
+ categories?: string[] | undefined;
619
+ conditionLogic?: "AND" | "OR" | undefined;
620
+ conditionsList?: {
621
+ customFieldId?: import("convex/values").GenericId<"ticket_custom_fields"> | undefined;
622
+ customFieldOperator?: "equals" | "not_equals" | "contains" | "greater_than" | "less_than" | "is_empty" | "is_not_empty" | undefined;
623
+ type: "region" | "category" | "brand" | "model" | "status" | "priority" | "trigger_event" | "custom_field";
624
+ negated: boolean;
625
+ value: string | string[];
626
+ nextOperator: "AND" | "OR";
627
+ }[] | undefined;
628
+ regions?: string[] | undefined;
629
+ applyToAllRegions?: boolean | undefined;
630
+ brands?: string[] | undefined;
631
+ brandOperator?: "is" | "is_not" | undefined;
632
+ models?: string[] | undefined;
633
+ modelOperator?: "is" | "is_not" | undefined;
634
+ statuses?: string[] | undefined;
635
+ statusOperator?: "is" | "is_not" | undefined;
636
+ customFieldConditions?: {
637
+ value?: any;
638
+ fieldId: import("convex/values").GenericId<"ticket_custom_fields">;
639
+ operator: "equals" | "not_equals" | "contains" | "greater_than" | "less_than" | "is_empty" | "is_not_empty";
640
+ }[] | undefined;
641
+ sparePartOrderFilters?: {
642
+ statuses?: string[] | undefined;
643
+ supplierIds?: import("convex/values").GenericId<"suppliers">[] | undefined;
644
+ applyToAllSuppliers?: boolean | undefined;
645
+ } | undefined;
646
+ applyToAllCategories: boolean;
647
+ triggerOn: "create" | "status_change" | "update" | "sla_warning" | "sla_breach" | "spare_part_order_created" | "spare_part_order_status_change";
648
+ }, {
649
+ conditionLogic: import("convex/values").VUnion<"AND" | "OR" | undefined, [import("convex/values").VLiteral<"AND", "required">, import("convex/values").VLiteral<"OR", "required">], "optional", never>;
650
+ conditionsList: import("convex/values").VArray<{
651
+ customFieldId?: import("convex/values").GenericId<"ticket_custom_fields"> | undefined;
652
+ customFieldOperator?: "equals" | "not_equals" | "contains" | "greater_than" | "less_than" | "is_empty" | "is_not_empty" | undefined;
653
+ type: "region" | "category" | "brand" | "model" | "status" | "priority" | "trigger_event" | "custom_field";
654
+ negated: boolean;
655
+ value: string | string[];
656
+ nextOperator: "AND" | "OR";
657
+ }[] | undefined, import("convex/values").VObject<{
658
+ customFieldId?: import("convex/values").GenericId<"ticket_custom_fields"> | undefined;
659
+ customFieldOperator?: "equals" | "not_equals" | "contains" | "greater_than" | "less_than" | "is_empty" | "is_not_empty" | undefined;
660
+ type: "region" | "category" | "brand" | "model" | "status" | "priority" | "trigger_event" | "custom_field";
661
+ negated: boolean;
662
+ value: string | string[];
663
+ nextOperator: "AND" | "OR";
664
+ }, {
665
+ type: import("convex/values").VUnion<"region" | "category" | "brand" | "model" | "status" | "priority" | "trigger_event" | "custom_field", [import("convex/values").VLiteral<"trigger_event", "required">, import("convex/values").VLiteral<"status", "required">, import("convex/values").VLiteral<"category", "required">, import("convex/values").VLiteral<"brand", "required">, import("convex/values").VLiteral<"model", "required">, import("convex/values").VLiteral<"region", "required">, import("convex/values").VLiteral<"priority", "required">, import("convex/values").VLiteral<"custom_field", "required">], "required", never>;
666
+ negated: import("convex/values").VBoolean<boolean, "required">;
667
+ value: import("convex/values").VUnion<string | string[], [import("convex/values").VString<string, "required">, import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">], "required", never>;
668
+ nextOperator: import("convex/values").VUnion<"AND" | "OR", [import("convex/values").VLiteral<"AND", "required">, import("convex/values").VLiteral<"OR", "required">], "required", never>;
669
+ customFieldId: import("convex/values").VId<import("convex/values").GenericId<"ticket_custom_fields"> | undefined, "optional">;
670
+ customFieldOperator: import("convex/values").VUnion<"equals" | "not_equals" | "contains" | "greater_than" | "less_than" | "is_empty" | "is_not_empty" | undefined, [import("convex/values").VLiteral<"equals", "required">, import("convex/values").VLiteral<"not_equals", "required">, import("convex/values").VLiteral<"contains", "required">, import("convex/values").VLiteral<"greater_than", "required">, import("convex/values").VLiteral<"less_than", "required">, import("convex/values").VLiteral<"is_empty", "required">, import("convex/values").VLiteral<"is_not_empty", "required">], "optional", never>;
671
+ }, "required", "type" | "negated" | "value" | "nextOperator" | "customFieldId" | "customFieldOperator">, "optional">;
672
+ categories: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
673
+ applyToAllCategories: import("convex/values").VBoolean<boolean, "required">;
674
+ regions: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
675
+ applyToAllRegions: import("convex/values").VBoolean<boolean | undefined, "optional">;
676
+ brands: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
677
+ brandOperator: import("convex/values").VUnion<"is" | "is_not" | undefined, [import("convex/values").VLiteral<"is", "required">, import("convex/values").VLiteral<"is_not", "required">], "optional", never>;
678
+ models: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
679
+ modelOperator: import("convex/values").VUnion<"is" | "is_not" | undefined, [import("convex/values").VLiteral<"is", "required">, import("convex/values").VLiteral<"is_not", "required">], "optional", never>;
680
+ statuses: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
681
+ statusOperator: import("convex/values").VUnion<"is" | "is_not" | undefined, [import("convex/values").VLiteral<"is", "required">, import("convex/values").VLiteral<"is_not", "required">], "optional", never>;
682
+ customFieldConditions: import("convex/values").VArray<{
683
+ value?: any;
684
+ fieldId: import("convex/values").GenericId<"ticket_custom_fields">;
685
+ operator: "equals" | "not_equals" | "contains" | "greater_than" | "less_than" | "is_empty" | "is_not_empty";
686
+ }[] | undefined, import("convex/values").VObject<{
687
+ value?: any;
688
+ fieldId: import("convex/values").GenericId<"ticket_custom_fields">;
689
+ operator: "equals" | "not_equals" | "contains" | "greater_than" | "less_than" | "is_empty" | "is_not_empty";
690
+ }, {
691
+ fieldId: import("convex/values").VId<import("convex/values").GenericId<"ticket_custom_fields">, "required">;
692
+ operator: import("convex/values").VUnion<"equals" | "not_equals" | "contains" | "greater_than" | "less_than" | "is_empty" | "is_not_empty", [import("convex/values").VLiteral<"equals", "required">, import("convex/values").VLiteral<"not_equals", "required">, import("convex/values").VLiteral<"contains", "required">, import("convex/values").VLiteral<"greater_than", "required">, import("convex/values").VLiteral<"less_than", "required">, import("convex/values").VLiteral<"is_empty", "required">, import("convex/values").VLiteral<"is_not_empty", "required">], "required", never>;
693
+ value: import("convex/values").VAny<any, "optional", string>;
694
+ }, "required", "value" | "fieldId" | "operator" | `value.${string}`>, "optional">;
695
+ triggerOn: import("convex/values").VUnion<"create" | "status_change" | "update" | "sla_warning" | "sla_breach" | "spare_part_order_created" | "spare_part_order_status_change", [import("convex/values").VLiteral<"create", "required">, import("convex/values").VLiteral<"status_change", "required">, import("convex/values").VLiteral<"update", "required">, import("convex/values").VLiteral<"sla_warning", "required">, import("convex/values").VLiteral<"sla_breach", "required">, import("convex/values").VLiteral<"spare_part_order_created", "required">, import("convex/values").VLiteral<"spare_part_order_status_change", "required">], "required", never>;
696
+ sparePartOrderFilters: import("convex/values").VObject<{
697
+ statuses?: string[] | undefined;
698
+ supplierIds?: import("convex/values").GenericId<"suppliers">[] | undefined;
699
+ applyToAllSuppliers?: boolean | undefined;
700
+ } | undefined, {
701
+ supplierIds: import("convex/values").VArray<import("convex/values").GenericId<"suppliers">[] | undefined, import("convex/values").VId<import("convex/values").GenericId<"suppliers">, "required">, "optional">;
702
+ applyToAllSuppliers: import("convex/values").VBoolean<boolean | undefined, "optional">;
703
+ statuses: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
704
+ }, "optional", "statuses" | "supplierIds" | "applyToAllSuppliers">;
705
+ }, "required", "categories" | "conditionLogic" | "conditionsList" | "applyToAllCategories" | "regions" | "applyToAllRegions" | "brands" | "brandOperator" | "models" | "modelOperator" | "statuses" | "statusOperator" | "customFieldConditions" | "triggerOn" | "sparePartOrderFilters" | "sparePartOrderFilters.statuses" | "sparePartOrderFilters.supplierIds" | "sparePartOrderFilters.applyToAllSuppliers">;
706
+ actions: import("convex/values").VObject<{
707
+ changeStatus?: string | undefined;
708
+ assignSupplier?: import("convex/values").GenericId<"suppliers"> | undefined;
709
+ assignUser?: import("convex/values").GenericId<"user_profiles"> | undefined;
710
+ setSlaHours?: number | undefined;
711
+ applySlaRule?: boolean | undefined;
712
+ addNote?: string | undefined;
713
+ sendNotification?: {
714
+ recipients: ("admin" | "supplier" | {
715
+ supplierId?: import("convex/values").GenericId<"suppliers"> | undefined;
716
+ userId?: import("convex/values").GenericId<"user_profiles"> | undefined;
717
+ type: "admin" | "supplier" | "ticket_creator" | "ticket_assignee" | "specific_user" | "specific_supplier";
718
+ } | "clinic")[];
719
+ message: string;
720
+ } | undefined;
721
+ setPriority?: string | undefined;
722
+ requireAttachment?: boolean | undefined;
723
+ sparePartOrderActions?: {
724
+ changeOrderStatus?: string | undefined;
725
+ addOrderNote?: string | undefined;
726
+ sendOrderNotification?: {
727
+ recipients: ("admin" | "supplier" | "order_creator")[];
728
+ message: string;
729
+ } | undefined;
730
+ } | undefined;
731
+ }, {
732
+ changeStatus: import("convex/values").VString<string | undefined, "optional">;
733
+ assignSupplier: import("convex/values").VId<import("convex/values").GenericId<"suppliers"> | undefined, "optional">;
734
+ assignUser: import("convex/values").VId<import("convex/values").GenericId<"user_profiles"> | undefined, "optional">;
735
+ setSlaHours: import("convex/values").VFloat64<number | undefined, "optional">;
736
+ applySlaRule: import("convex/values").VBoolean<boolean | undefined, "optional">;
737
+ addNote: import("convex/values").VString<string | undefined, "optional">;
738
+ sendNotification: import("convex/values").VObject<{
739
+ recipients: ("admin" | "supplier" | {
740
+ supplierId?: import("convex/values").GenericId<"suppliers"> | undefined;
741
+ userId?: import("convex/values").GenericId<"user_profiles"> | undefined;
742
+ type: "admin" | "supplier" | "ticket_creator" | "ticket_assignee" | "specific_user" | "specific_supplier";
743
+ } | "clinic")[];
744
+ message: string;
745
+ } | undefined, {
746
+ recipients: import("convex/values").VArray<("admin" | "supplier" | {
747
+ supplierId?: import("convex/values").GenericId<"suppliers"> | undefined;
748
+ userId?: import("convex/values").GenericId<"user_profiles"> | undefined;
749
+ type: "admin" | "supplier" | "ticket_creator" | "ticket_assignee" | "specific_user" | "specific_supplier";
750
+ } | "clinic")[], import("convex/values").VUnion<"admin" | "supplier" | {
751
+ supplierId?: import("convex/values").GenericId<"suppliers"> | undefined;
752
+ userId?: import("convex/values").GenericId<"user_profiles"> | undefined;
753
+ type: "admin" | "supplier" | "ticket_creator" | "ticket_assignee" | "specific_user" | "specific_supplier";
754
+ } | "clinic", [import("convex/values").VObject<{
755
+ supplierId?: import("convex/values").GenericId<"suppliers"> | undefined;
756
+ userId?: import("convex/values").GenericId<"user_profiles"> | undefined;
757
+ type: "admin" | "supplier" | "ticket_creator" | "ticket_assignee" | "specific_user" | "specific_supplier";
758
+ }, {
759
+ type: import("convex/values").VUnion<"admin" | "supplier" | "ticket_creator" | "ticket_assignee" | "specific_user" | "specific_supplier", [import("convex/values").VLiteral<"admin", "required">, import("convex/values").VLiteral<"supplier", "required">, import("convex/values").VLiteral<"ticket_creator", "required">, import("convex/values").VLiteral<"ticket_assignee", "required">, import("convex/values").VLiteral<"specific_user", "required">, import("convex/values").VLiteral<"specific_supplier", "required">], "required", never>;
760
+ userId: import("convex/values").VId<import("convex/values").GenericId<"user_profiles"> | undefined, "optional">;
761
+ supplierId: import("convex/values").VId<import("convex/values").GenericId<"suppliers"> | undefined, "optional">;
762
+ }, "required", "type" | "supplierId" | "userId">, import("convex/values").VLiteral<"admin", "required">, import("convex/values").VLiteral<"supplier", "required">, import("convex/values").VLiteral<"clinic", "required">], "required", "type" | "supplierId" | "userId">, "required">;
763
+ message: import("convex/values").VString<string, "required">;
764
+ }, "optional", "recipients" | "message">;
765
+ setPriority: import("convex/values").VString<string | undefined, "optional">;
766
+ requireAttachment: import("convex/values").VBoolean<boolean | undefined, "optional">;
767
+ sparePartOrderActions: import("convex/values").VObject<{
768
+ changeOrderStatus?: string | undefined;
769
+ addOrderNote?: string | undefined;
770
+ sendOrderNotification?: {
771
+ recipients: ("admin" | "supplier" | "order_creator")[];
772
+ message: string;
773
+ } | undefined;
774
+ } | undefined, {
775
+ changeOrderStatus: import("convex/values").VString<string | undefined, "optional">;
776
+ addOrderNote: import("convex/values").VString<string | undefined, "optional">;
777
+ sendOrderNotification: import("convex/values").VObject<{
778
+ recipients: ("admin" | "supplier" | "order_creator")[];
779
+ message: string;
780
+ } | undefined, {
781
+ recipients: import("convex/values").VArray<("admin" | "supplier" | "order_creator")[], import("convex/values").VUnion<"admin" | "supplier" | "order_creator", [import("convex/values").VLiteral<"admin", "required">, import("convex/values").VLiteral<"supplier", "required">, import("convex/values").VLiteral<"order_creator", "required">], "required", never>, "required">;
782
+ message: import("convex/values").VString<string, "required">;
783
+ }, "optional", "recipients" | "message">;
784
+ }, "optional", "changeOrderStatus" | "addOrderNote" | "sendOrderNotification" | "sendOrderNotification.recipients" | "sendOrderNotification.message">;
785
+ }, "required", "changeStatus" | "assignSupplier" | "assignUser" | "setSlaHours" | "applySlaRule" | "addNote" | "sendNotification" | "setPriority" | "requireAttachment" | "sparePartOrderActions" | "sendNotification.recipients" | "sendNotification.message" | "sparePartOrderActions.changeOrderStatus" | "sparePartOrderActions.addOrderNote" | "sparePartOrderActions.sendOrderNotification" | "sparePartOrderActions.sendOrderNotification.recipients" | "sparePartOrderActions.sendOrderNotification.message">;
786
+ createdAt: import("convex/values").VFloat64<number, "required">;
787
+ updatedAt: import("convex/values").VFloat64<number, "required">;
788
+ createdBy: import("convex/values").VString<string, "required">;
789
+ }, "required", "name" | "description" | "createdAt" | "isActive" | "createdBy" | "priority" | "updatedAt" | "conditions" | "actions" | "conditions.categories" | "conditions.conditionLogic" | "conditions.conditionsList" | "conditions.applyToAllCategories" | "conditions.regions" | "conditions.applyToAllRegions" | "conditions.brands" | "conditions.brandOperator" | "conditions.models" | "conditions.modelOperator" | "conditions.statuses" | "conditions.statusOperator" | "conditions.customFieldConditions" | "conditions.triggerOn" | "conditions.sparePartOrderFilters" | "conditions.sparePartOrderFilters.statuses" | "conditions.sparePartOrderFilters.supplierIds" | "conditions.sparePartOrderFilters.applyToAllSuppliers" | "actions.changeStatus" | "actions.assignSupplier" | "actions.assignUser" | "actions.setSlaHours" | "actions.applySlaRule" | "actions.addNote" | "actions.sendNotification" | "actions.setPriority" | "actions.requireAttachment" | "actions.sparePartOrderActions" | "actions.sendNotification.recipients" | "actions.sendNotification.message" | "actions.sparePartOrderActions.changeOrderStatus" | "actions.sparePartOrderActions.addOrderNote" | "actions.sparePartOrderActions.sendOrderNotification" | "actions.sparePartOrderActions.sendOrderNotification.recipients" | "actions.sparePartOrderActions.sendOrderNotification.message">, {
790
+ by_isActive: ["isActive", "_creationTime"];
791
+ by_priority: ["priority", "_creationTime"];
792
+ by_createdAt: ["createdAt", "_creationTime"];
793
+ }, {}, {}>;
794
+ ticket_macros: import("convex/server").TableDefinition<import("convex/values").VObject<{
795
+ description?: string | undefined;
796
+ name: string;
797
+ createdAt: number;
798
+ isActive: boolean;
799
+ createdBy: import("convex/values").GenericId<"user_profiles">;
800
+ updatedAt: number;
801
+ actions: {
802
+ changeStatus?: string | undefined;
803
+ assignSupplier?: import("convex/values").GenericId<"suppliers"> | undefined;
804
+ assignUser?: import("convex/values").GenericId<"user_profiles"> | undefined;
805
+ setSlaHours?: number | undefined;
806
+ applySlaRule?: boolean | undefined;
807
+ addNote?: string | undefined;
808
+ sendNotification?: {
809
+ recipients: ("admin" | "supplier" | "clinic" | {
810
+ supplierId?: import("convex/values").GenericId<"suppliers"> | undefined;
811
+ userId?: import("convex/values").GenericId<"user_profiles"> | undefined;
812
+ type: "admin" | "supplier" | "ticket_creator" | "ticket_assignee" | "specific_user" | "specific_supplier";
813
+ })[];
814
+ message: string;
815
+ } | undefined;
816
+ setPriority?: string | undefined;
817
+ };
818
+ isGlobal: boolean;
819
+ }, {
820
+ name: import("convex/values").VString<string, "required">;
821
+ description: import("convex/values").VString<string | undefined, "optional">;
822
+ isGlobal: import("convex/values").VBoolean<boolean, "required">;
823
+ isActive: import("convex/values").VBoolean<boolean, "required">;
824
+ actions: import("convex/values").VObject<{
825
+ changeStatus?: string | undefined;
826
+ assignSupplier?: import("convex/values").GenericId<"suppliers"> | undefined;
827
+ assignUser?: import("convex/values").GenericId<"user_profiles"> | undefined;
828
+ setSlaHours?: number | undefined;
829
+ applySlaRule?: boolean | undefined;
830
+ addNote?: string | undefined;
831
+ sendNotification?: {
832
+ recipients: ("admin" | "supplier" | "clinic" | {
833
+ supplierId?: import("convex/values").GenericId<"suppliers"> | undefined;
834
+ userId?: import("convex/values").GenericId<"user_profiles"> | undefined;
835
+ type: "admin" | "supplier" | "ticket_creator" | "ticket_assignee" | "specific_user" | "specific_supplier";
836
+ })[];
837
+ message: string;
838
+ } | undefined;
839
+ setPriority?: string | undefined;
840
+ }, {
841
+ changeStatus: import("convex/values").VString<string | undefined, "optional">;
842
+ assignSupplier: import("convex/values").VId<import("convex/values").GenericId<"suppliers"> | undefined, "optional">;
843
+ assignUser: import("convex/values").VId<import("convex/values").GenericId<"user_profiles"> | undefined, "optional">;
844
+ setSlaHours: import("convex/values").VFloat64<number | undefined, "optional">;
845
+ applySlaRule: import("convex/values").VBoolean<boolean | undefined, "optional">;
846
+ addNote: import("convex/values").VString<string | undefined, "optional">;
847
+ sendNotification: import("convex/values").VObject<{
848
+ recipients: ("admin" | "supplier" | "clinic" | {
849
+ supplierId?: import("convex/values").GenericId<"suppliers"> | undefined;
850
+ userId?: import("convex/values").GenericId<"user_profiles"> | undefined;
851
+ type: "admin" | "supplier" | "ticket_creator" | "ticket_assignee" | "specific_user" | "specific_supplier";
852
+ })[];
853
+ message: string;
854
+ } | undefined, {
855
+ recipients: import("convex/values").VArray<("admin" | "supplier" | "clinic" | {
856
+ supplierId?: import("convex/values").GenericId<"suppliers"> | undefined;
857
+ userId?: import("convex/values").GenericId<"user_profiles"> | undefined;
858
+ type: "admin" | "supplier" | "ticket_creator" | "ticket_assignee" | "specific_user" | "specific_supplier";
859
+ })[], import("convex/values").VUnion<"admin" | "supplier" | "clinic" | {
860
+ supplierId?: import("convex/values").GenericId<"suppliers"> | undefined;
861
+ userId?: import("convex/values").GenericId<"user_profiles"> | undefined;
862
+ type: "admin" | "supplier" | "ticket_creator" | "ticket_assignee" | "specific_user" | "specific_supplier";
863
+ }, [import("convex/values").VObject<{
864
+ supplierId?: import("convex/values").GenericId<"suppliers"> | undefined;
865
+ userId?: import("convex/values").GenericId<"user_profiles"> | undefined;
866
+ type: "admin" | "supplier" | "ticket_creator" | "ticket_assignee" | "specific_user" | "specific_supplier";
867
+ }, {
868
+ type: import("convex/values").VUnion<"admin" | "supplier" | "ticket_creator" | "ticket_assignee" | "specific_user" | "specific_supplier", [import("convex/values").VLiteral<"admin", "required">, import("convex/values").VLiteral<"supplier", "required">, import("convex/values").VLiteral<"ticket_creator", "required">, import("convex/values").VLiteral<"ticket_assignee", "required">, import("convex/values").VLiteral<"specific_user", "required">, import("convex/values").VLiteral<"specific_supplier", "required">], "required", never>;
869
+ userId: import("convex/values").VId<import("convex/values").GenericId<"user_profiles"> | undefined, "optional">;
870
+ supplierId: import("convex/values").VId<import("convex/values").GenericId<"suppliers"> | undefined, "optional">;
871
+ }, "required", "type" | "supplierId" | "userId">, import("convex/values").VLiteral<"admin", "required">, import("convex/values").VLiteral<"supplier", "required">, import("convex/values").VLiteral<"clinic", "required">], "required", "type" | "supplierId" | "userId">, "required">;
872
+ message: import("convex/values").VString<string, "required">;
873
+ }, "optional", "recipients" | "message">;
874
+ setPriority: import("convex/values").VString<string | undefined, "optional">;
875
+ }, "required", "changeStatus" | "assignSupplier" | "assignUser" | "setSlaHours" | "applySlaRule" | "addNote" | "sendNotification" | "setPriority" | "sendNotification.recipients" | "sendNotification.message">;
876
+ createdAt: import("convex/values").VFloat64<number, "required">;
877
+ updatedAt: import("convex/values").VFloat64<number, "required">;
878
+ createdBy: import("convex/values").VId<import("convex/values").GenericId<"user_profiles">, "required">;
879
+ }, "required", "name" | "description" | "createdAt" | "isActive" | "createdBy" | "updatedAt" | "actions" | "actions.changeStatus" | "actions.assignSupplier" | "actions.assignUser" | "actions.setSlaHours" | "actions.applySlaRule" | "actions.addNote" | "actions.sendNotification" | "actions.setPriority" | "actions.sendNotification.recipients" | "actions.sendNotification.message" | "isGlobal">, {
880
+ by_createdBy: ["createdBy", "_creationTime"];
881
+ by_isGlobal: ["isGlobal", "_creationTime"];
882
+ by_isActive: ["isActive", "_creationTime"];
883
+ }, {}, {}>;
884
+ device_questions: import("convex/server").TableDefinition<import("convex/values").VObject<{
885
+ options?: string[] | undefined;
886
+ placeholder?: string | undefined;
887
+ helpText?: string | undefined;
888
+ conditionalLogic?: {
889
+ conditions: {
890
+ questionId: import("convex/values").GenericId<"device_questions">;
891
+ value: any;
892
+ operator: "equals" | "not_equals" | "contains" | "greater_than" | "less_than" | "is_empty" | "is_not_empty" | "not_contains";
893
+ }[];
894
+ enabled: boolean;
895
+ logic: "AND" | "OR";
896
+ } | undefined;
897
+ createdAt: number;
898
+ isActive: boolean;
899
+ deviceId: import("convex/values").GenericId<"devices">;
900
+ createdBy: string;
901
+ updatedAt: number;
902
+ order: number;
903
+ isRequired: boolean;
904
+ question: string;
905
+ questionType: "number" | "text" | "textarea" | "select" | "multiselect" | "date" | "yes_no";
906
+ }, {
907
+ deviceId: import("convex/values").VId<import("convex/values").GenericId<"devices">, "required">;
908
+ question: import("convex/values").VString<string, "required">;
909
+ questionType: import("convex/values").VUnion<"number" | "text" | "textarea" | "select" | "multiselect" | "date" | "yes_no", [import("convex/values").VLiteral<"text", "required">, import("convex/values").VLiteral<"textarea", "required">, import("convex/values").VLiteral<"select", "required">, import("convex/values").VLiteral<"multiselect", "required">, import("convex/values").VLiteral<"yes_no", "required">, import("convex/values").VLiteral<"number", "required">, import("convex/values").VLiteral<"date", "required">], "required", never>;
910
+ options: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
911
+ isRequired: import("convex/values").VBoolean<boolean, "required">;
912
+ order: import("convex/values").VFloat64<number, "required">;
913
+ placeholder: import("convex/values").VString<string | undefined, "optional">;
914
+ helpText: import("convex/values").VString<string | undefined, "optional">;
915
+ conditionalLogic: import("convex/values").VObject<{
916
+ conditions: {
917
+ questionId: import("convex/values").GenericId<"device_questions">;
918
+ value: any;
919
+ operator: "equals" | "not_equals" | "contains" | "greater_than" | "less_than" | "is_empty" | "is_not_empty" | "not_contains";
920
+ }[];
921
+ enabled: boolean;
922
+ logic: "AND" | "OR";
923
+ } | undefined, {
924
+ enabled: import("convex/values").VBoolean<boolean, "required">;
925
+ conditions: import("convex/values").VArray<{
926
+ questionId: import("convex/values").GenericId<"device_questions">;
927
+ value: any;
928
+ operator: "equals" | "not_equals" | "contains" | "greater_than" | "less_than" | "is_empty" | "is_not_empty" | "not_contains";
929
+ }[], import("convex/values").VObject<{
930
+ questionId: import("convex/values").GenericId<"device_questions">;
931
+ value: any;
932
+ operator: "equals" | "not_equals" | "contains" | "greater_than" | "less_than" | "is_empty" | "is_not_empty" | "not_contains";
933
+ }, {
934
+ questionId: import("convex/values").VId<import("convex/values").GenericId<"device_questions">, "required">;
935
+ operator: import("convex/values").VUnion<"equals" | "not_equals" | "contains" | "greater_than" | "less_than" | "is_empty" | "is_not_empty" | "not_contains", [import("convex/values").VLiteral<"equals", "required">, import("convex/values").VLiteral<"not_equals", "required">, import("convex/values").VLiteral<"contains", "required">, import("convex/values").VLiteral<"not_contains", "required">, import("convex/values").VLiteral<"greater_than", "required">, import("convex/values").VLiteral<"less_than", "required">, import("convex/values").VLiteral<"is_empty", "required">, import("convex/values").VLiteral<"is_not_empty", "required">], "required", never>;
936
+ value: import("convex/values").VAny<any, "required", string>;
937
+ }, "required", "questionId" | "value" | "operator" | `value.${string}`>, "required">;
938
+ logic: import("convex/values").VUnion<"AND" | "OR", [import("convex/values").VLiteral<"AND", "required">, import("convex/values").VLiteral<"OR", "required">], "required", never>;
939
+ }, "optional", "conditions" | "enabled" | "logic">;
940
+ isActive: import("convex/values").VBoolean<boolean, "required">;
941
+ createdAt: import("convex/values").VFloat64<number, "required">;
942
+ updatedAt: import("convex/values").VFloat64<number, "required">;
943
+ createdBy: import("convex/values").VString<string, "required">;
944
+ }, "required", "createdAt" | "isActive" | "deviceId" | "createdBy" | "updatedAt" | "order" | "options" | "isRequired" | "placeholder" | "helpText" | "question" | "questionType" | "conditionalLogic" | "conditionalLogic.conditions" | "conditionalLogic.enabled" | "conditionalLogic.logic">, {
945
+ by_deviceId: ["deviceId", "_creationTime"];
946
+ by_deviceId_order: ["deviceId", "order", "_creationTime"];
947
+ by_isActive: ["isActive", "_creationTime"];
948
+ }, {}, {}>;
949
+ spare_parts: import("convex/server").TableDefinition<import("convex/values").VObject<{
950
+ type?: string | undefined;
951
+ brand?: string | undefined;
952
+ model?: string | undefined;
953
+ quantity?: number | undefined;
954
+ code?: string | undefined;
955
+ vendorId?: number | undefined;
956
+ dentalUnitQuantity?: number | undefined;
957
+ minQuantity?: number | undefined;
958
+ minimumStockAmount?: number | undefined;
959
+ lot?: string | undefined;
960
+ netPrice?: number | undefined;
961
+ deadlineDate?: string | undefined;
962
+ warehouseOrisId?: string | undefined;
963
+ warehouseCreatedAt?: string | undefined;
964
+ warehouseUpdatedAt?: string | undefined;
965
+ warehouseDeletedAt?: string | undefined;
966
+ articleInternalId?: number | undefined;
967
+ barcode?: string | undefined;
968
+ articleName?: string | undefined;
969
+ articleCategoryId?: number | undefined;
970
+ mu?: string | undefined;
971
+ sellingUnit?: string | undefined;
972
+ warehouseUnit?: string | undefined;
973
+ case?: string | undefined;
974
+ package?: string | undefined;
975
+ articleOrisId?: string | undefined;
976
+ articleDeadlineDate?: string | undefined;
977
+ alternativeArticleId?: number | undefined;
978
+ labelInfosLength?: number | undefined;
979
+ articleCreatedAt?: string | undefined;
980
+ articleUpdatedAt?: string | undefined;
981
+ articleDeletedAt?: string | undefined;
982
+ categoryId?: number | undefined;
983
+ categoryName?: string | undefined;
984
+ parentId?: number | undefined;
985
+ activeWarehouseCategory?: number | undefined;
986
+ categoryOrisId?: string | undefined;
987
+ categoryType?: string | undefined;
988
+ categoryCreatedAt?: string | undefined;
989
+ categoryUpdatedAt?: string | undefined;
990
+ name: string;
991
+ clinicId: number;
992
+ articleId: number;
993
+ warehouseItemId: number;
994
+ }, {
995
+ warehouseItemId: import("convex/values").VFloat64<number, "required">;
996
+ name: import("convex/values").VString<string, "required">;
997
+ quantity: import("convex/values").VFloat64<number | undefined, "optional">;
998
+ dentalUnitQuantity: import("convex/values").VFloat64<number | undefined, "optional">;
999
+ minQuantity: import("convex/values").VFloat64<number | undefined, "optional">;
1000
+ minimumStockAmount: import("convex/values").VFloat64<number | undefined, "optional">;
1001
+ lot: import("convex/values").VString<string | undefined, "optional">;
1002
+ netPrice: import("convex/values").VFloat64<number | undefined, "optional">;
1003
+ deadlineDate: import("convex/values").VString<string | undefined, "optional">;
1004
+ warehouseOrisId: import("convex/values").VString<string | undefined, "optional">;
1005
+ articleId: import("convex/values").VFloat64<number, "required">;
1006
+ clinicId: import("convex/values").VFloat64<number, "required">;
1007
+ vendorId: import("convex/values").VFloat64<number | undefined, "optional">;
1008
+ warehouseCreatedAt: import("convex/values").VString<string | undefined, "optional">;
1009
+ warehouseUpdatedAt: import("convex/values").VString<string | undefined, "optional">;
1010
+ warehouseDeletedAt: import("convex/values").VString<string | undefined, "optional">;
1011
+ articleInternalId: import("convex/values").VFloat64<number | undefined, "optional">;
1012
+ code: import("convex/values").VString<string | undefined, "optional">;
1013
+ barcode: import("convex/values").VString<string | undefined, "optional">;
1014
+ articleName: import("convex/values").VString<string | undefined, "optional">;
1015
+ brand: import("convex/values").VString<string | undefined, "optional">;
1016
+ model: import("convex/values").VString<string | undefined, "optional">;
1017
+ articleCategoryId: import("convex/values").VFloat64<number | undefined, "optional">;
1018
+ mu: import("convex/values").VString<string | undefined, "optional">;
1019
+ sellingUnit: import("convex/values").VString<string | undefined, "optional">;
1020
+ warehouseUnit: import("convex/values").VString<string | undefined, "optional">;
1021
+ case: import("convex/values").VString<string | undefined, "optional">;
1022
+ package: import("convex/values").VString<string | undefined, "optional">;
1023
+ articleOrisId: import("convex/values").VString<string | undefined, "optional">;
1024
+ articleDeadlineDate: import("convex/values").VString<string | undefined, "optional">;
1025
+ alternativeArticleId: import("convex/values").VFloat64<number | undefined, "optional">;
1026
+ type: import("convex/values").VString<string | undefined, "optional">;
1027
+ labelInfosLength: import("convex/values").VFloat64<number | undefined, "optional">;
1028
+ articleCreatedAt: import("convex/values").VString<string | undefined, "optional">;
1029
+ articleUpdatedAt: import("convex/values").VString<string | undefined, "optional">;
1030
+ articleDeletedAt: import("convex/values").VString<string | undefined, "optional">;
1031
+ categoryId: import("convex/values").VFloat64<number | undefined, "optional">;
1032
+ categoryName: import("convex/values").VString<string | undefined, "optional">;
1033
+ parentId: import("convex/values").VFloat64<number | undefined, "optional">;
1034
+ activeWarehouseCategory: import("convex/values").VFloat64<number | undefined, "optional">;
1035
+ categoryOrisId: import("convex/values").VString<string | undefined, "optional">;
1036
+ categoryType: import("convex/values").VString<string | undefined, "optional">;
1037
+ categoryCreatedAt: import("convex/values").VString<string | undefined, "optional">;
1038
+ categoryUpdatedAt: import("convex/values").VString<string | undefined, "optional">;
1039
+ }, "required", "name" | "type" | "clinicId" | "brand" | "model" | "articleId" | "quantity" | "code" | "vendorId" | "warehouseItemId" | "dentalUnitQuantity" | "minQuantity" | "minimumStockAmount" | "lot" | "netPrice" | "deadlineDate" | "warehouseOrisId" | "warehouseCreatedAt" | "warehouseUpdatedAt" | "warehouseDeletedAt" | "articleInternalId" | "barcode" | "articleName" | "articleCategoryId" | "mu" | "sellingUnit" | "warehouseUnit" | "case" | "package" | "articleOrisId" | "articleDeadlineDate" | "alternativeArticleId" | "labelInfosLength" | "articleCreatedAt" | "articleUpdatedAt" | "articleDeletedAt" | "categoryId" | "categoryName" | "parentId" | "activeWarehouseCategory" | "categoryOrisId" | "categoryType" | "categoryCreatedAt" | "categoryUpdatedAt">, {
1040
+ by_clinicId: ["clinicId", "_creationTime"];
1041
+ by_articleId: ["articleId", "_creationTime"];
1042
+ by_warehouseItemId: ["warehouseItemId", "_creationTime"];
1043
+ by_vendorId: ["vendorId", "_creationTime"];
1044
+ by_articleCategoryId: ["articleCategoryId", "_creationTime"];
1045
+ }, {}, {}>;
1046
+ api_keys: import("convex/server").TableDefinition<import("convex/values").VObject<{
1047
+ expiresAt?: number | undefined;
1048
+ lastUsedAt?: number | undefined;
1049
+ notes?: string | undefined;
1050
+ createdByEmail?: string | undefined;
1051
+ usageCount?: number | undefined;
1052
+ revokedAt?: number | undefined;
1053
+ revokedBy?: string | undefined;
1054
+ name: string;
1055
+ createdAt: number;
1056
+ isActive: boolean;
1057
+ createdBy: string;
1058
+ keyHash: string;
1059
+ keyPrefix: string;
1060
+ permissions: string[];
1061
+ }, {
1062
+ name: import("convex/values").VString<string, "required">;
1063
+ keyHash: import("convex/values").VString<string, "required">;
1064
+ keyPrefix: import("convex/values").VString<string, "required">;
1065
+ permissions: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
1066
+ createdBy: import("convex/values").VString<string, "required">;
1067
+ createdByEmail: import("convex/values").VString<string | undefined, "optional">;
1068
+ isActive: import("convex/values").VBoolean<boolean, "required">;
1069
+ lastUsedAt: import("convex/values").VFloat64<number | undefined, "optional">;
1070
+ usageCount: import("convex/values").VFloat64<number | undefined, "optional">;
1071
+ expiresAt: import("convex/values").VFloat64<number | undefined, "optional">;
1072
+ revokedAt: import("convex/values").VFloat64<number | undefined, "optional">;
1073
+ revokedBy: import("convex/values").VString<string | undefined, "optional">;
1074
+ notes: import("convex/values").VString<string | undefined, "optional">;
1075
+ createdAt: import("convex/values").VFloat64<number, "required">;
1076
+ }, "required", "name" | "createdAt" | "isActive" | "expiresAt" | "lastUsedAt" | "notes" | "createdBy" | "createdByEmail" | "keyHash" | "keyPrefix" | "permissions" | "usageCount" | "revokedAt" | "revokedBy">, {
1077
+ by_keyHash: ["keyHash", "_creationTime"];
1078
+ by_keyPrefix: ["keyPrefix", "_creationTime"];
1079
+ by_isActive: ["isActive", "_creationTime"];
1080
+ by_createdBy: ["createdBy", "_creationTime"];
1081
+ }, {}, {}>;
1082
+ ticket_comments: import("convex/server").TableDefinition<import("convex/values").VObject<{
1083
+ updatedAt?: number | undefined;
1084
+ authorName?: string | undefined;
1085
+ authorEmail?: string | undefined;
1086
+ authorRole?: string | undefined;
1087
+ isInternal?: boolean | undefined;
1088
+ isFromApi?: boolean | undefined;
1089
+ attachments?: import("convex/values").GenericId<"_storage">[] | undefined;
1090
+ mentions?: {
1091
+ name: string;
1092
+ email: string;
1093
+ userId: import("convex/values").GenericId<"user_profiles">;
1094
+ }[] | undefined;
1095
+ createdAt: number;
1096
+ taskId: import("convex/values").GenericId<"maintenance_tasks">;
1097
+ authorId: string;
1098
+ content: string;
1099
+ }, {
1100
+ taskId: import("convex/values").VId<import("convex/values").GenericId<"maintenance_tasks">, "required">;
1101
+ authorId: import("convex/values").VString<string, "required">;
1102
+ authorName: import("convex/values").VString<string | undefined, "optional">;
1103
+ authorEmail: import("convex/values").VString<string | undefined, "optional">;
1104
+ authorRole: import("convex/values").VString<string | undefined, "optional">;
1105
+ content: import("convex/values").VString<string, "required">;
1106
+ isInternal: import("convex/values").VBoolean<boolean | undefined, "optional">;
1107
+ isFromApi: import("convex/values").VBoolean<boolean | undefined, "optional">;
1108
+ attachments: import("convex/values").VArray<import("convex/values").GenericId<"_storage">[] | undefined, import("convex/values").VId<import("convex/values").GenericId<"_storage">, "required">, "optional">;
1109
+ mentions: import("convex/values").VArray<{
1110
+ name: string;
1111
+ email: string;
1112
+ userId: import("convex/values").GenericId<"user_profiles">;
1113
+ }[] | undefined, import("convex/values").VObject<{
1114
+ name: string;
1115
+ email: string;
1116
+ userId: import("convex/values").GenericId<"user_profiles">;
1117
+ }, {
1118
+ userId: import("convex/values").VId<import("convex/values").GenericId<"user_profiles">, "required">;
1119
+ name: import("convex/values").VString<string, "required">;
1120
+ email: import("convex/values").VString<string, "required">;
1121
+ }, "required", "name" | "email" | "userId">, "optional">;
1122
+ createdAt: import("convex/values").VFloat64<number, "required">;
1123
+ updatedAt: import("convex/values").VFloat64<number | undefined, "optional">;
1124
+ }, "required", "createdAt" | "updatedAt" | "taskId" | "authorId" | "authorName" | "authorEmail" | "authorRole" | "content" | "isInternal" | "isFromApi" | "attachments" | "mentions">, {
1125
+ by_taskId: ["taskId", "_creationTime"];
1126
+ by_authorId: ["authorId", "_creationTime"];
1127
+ by_taskId_createdAt: ["taskId", "createdAt", "_creationTime"];
1128
+ }, {}, {}>;
1129
+ spare_part_orders: import("convex/server").TableDefinition<import("convex/values").VObject<{
1130
+ notes?: string | undefined;
1131
+ totalAmount?: number | undefined;
1132
+ requestedDeliveryDate?: number | undefined;
1133
+ actualDeliveryDate?: number | undefined;
1134
+ confirmedAt?: number | undefined;
1135
+ shippedAt?: number | undefined;
1136
+ deliveredAt?: number | undefined;
1137
+ createdAt: number;
1138
+ clinicId: number;
1139
+ supplierId: import("convex/values").GenericId<"suppliers">;
1140
+ status: "draft" | "pending" | "confirmed" | "shipped" | "delivered" | "cancelled";
1141
+ createdBy: string;
1142
+ updatedAt: number;
1143
+ orderNumber: string;
1144
+ items: {
1145
+ code?: string | undefined;
1146
+ notes?: string | undefined;
1147
+ unitPrice?: number | undefined;
1148
+ totalPrice?: number | undefined;
1149
+ articleId: number;
1150
+ quantity: number;
1151
+ articleName: string;
1152
+ sparePartId: import("convex/values").GenericId<"spare_parts">;
1153
+ }[];
1154
+ }, {
1155
+ orderNumber: import("convex/values").VString<string, "required">;
1156
+ clinicId: import("convex/values").VFloat64<number, "required">;
1157
+ supplierId: import("convex/values").VId<import("convex/values").GenericId<"suppliers">, "required">;
1158
+ status: import("convex/values").VUnion<"draft" | "pending" | "confirmed" | "shipped" | "delivered" | "cancelled", [import("convex/values").VLiteral<"draft", "required">, import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"confirmed", "required">, import("convex/values").VLiteral<"shipped", "required">, import("convex/values").VLiteral<"delivered", "required">, import("convex/values").VLiteral<"cancelled", "required">], "required", never>;
1159
+ items: import("convex/values").VArray<{
1160
+ code?: string | undefined;
1161
+ notes?: string | undefined;
1162
+ unitPrice?: number | undefined;
1163
+ totalPrice?: number | undefined;
1164
+ articleId: number;
1165
+ quantity: number;
1166
+ articleName: string;
1167
+ sparePartId: import("convex/values").GenericId<"spare_parts">;
1168
+ }[], import("convex/values").VObject<{
1169
+ code?: string | undefined;
1170
+ notes?: string | undefined;
1171
+ unitPrice?: number | undefined;
1172
+ totalPrice?: number | undefined;
1173
+ articleId: number;
1174
+ quantity: number;
1175
+ articleName: string;
1176
+ sparePartId: import("convex/values").GenericId<"spare_parts">;
1177
+ }, {
1178
+ sparePartId: import("convex/values").VId<import("convex/values").GenericId<"spare_parts">, "required">;
1179
+ articleId: import("convex/values").VFloat64<number, "required">;
1180
+ articleName: import("convex/values").VString<string, "required">;
1181
+ code: import("convex/values").VString<string | undefined, "optional">;
1182
+ quantity: import("convex/values").VFloat64<number, "required">;
1183
+ unitPrice: import("convex/values").VFloat64<number | undefined, "optional">;
1184
+ totalPrice: import("convex/values").VFloat64<number | undefined, "optional">;
1185
+ notes: import("convex/values").VString<string | undefined, "optional">;
1186
+ }, "required", "articleId" | "quantity" | "code" | "notes" | "articleName" | "sparePartId" | "unitPrice" | "totalPrice">, "required">;
1187
+ totalAmount: import("convex/values").VFloat64<number | undefined, "optional">;
1188
+ notes: import("convex/values").VString<string | undefined, "optional">;
1189
+ requestedDeliveryDate: import("convex/values").VFloat64<number | undefined, "optional">;
1190
+ actualDeliveryDate: import("convex/values").VFloat64<number | undefined, "optional">;
1191
+ createdBy: import("convex/values").VString<string, "required">;
1192
+ createdAt: import("convex/values").VFloat64<number, "required">;
1193
+ updatedAt: import("convex/values").VFloat64<number, "required">;
1194
+ confirmedAt: import("convex/values").VFloat64<number | undefined, "optional">;
1195
+ shippedAt: import("convex/values").VFloat64<number | undefined, "optional">;
1196
+ deliveredAt: import("convex/values").VFloat64<number | undefined, "optional">;
1197
+ }, "required", "createdAt" | "clinicId" | "supplierId" | "status" | "notes" | "createdBy" | "updatedAt" | "orderNumber" | "items" | "totalAmount" | "requestedDeliveryDate" | "actualDeliveryDate" | "confirmedAt" | "shippedAt" | "deliveredAt">, {
1198
+ by_clinicId: ["clinicId", "_creationTime"];
1199
+ by_supplierId: ["supplierId", "_creationTime"];
1200
+ by_status: ["status", "_creationTime"];
1201
+ by_orderNumber: ["orderNumber", "_creationTime"];
1202
+ by_createdAt: ["createdAt", "_creationTime"];
1203
+ }, {}, {}>;
1204
+ device_categories: import("convex/server").TableDefinition<import("convex/values").VObject<{
1205
+ type?: string | undefined;
1206
+ createdAt?: string | undefined;
1207
+ updatedAt?: string | undefined;
1208
+ parentId?: number | undefined;
1209
+ activeWarehouseCategory?: number | undefined;
1210
+ orisId?: string | undefined;
1211
+ note?: string | undefined;
1212
+ name: string;
1213
+ primoupId: number;
1214
+ importedAt: number;
1215
+ }, {
1216
+ primoupId: import("convex/values").VFloat64<number, "required">;
1217
+ name: import("convex/values").VString<string, "required">;
1218
+ parentId: import("convex/values").VFloat64<number | undefined, "optional">;
1219
+ activeWarehouseCategory: import("convex/values").VFloat64<number | undefined, "optional">;
1220
+ orisId: import("convex/values").VString<string | undefined, "optional">;
1221
+ type: import("convex/values").VString<string | undefined, "optional">;
1222
+ note: import("convex/values").VString<string | undefined, "optional">;
1223
+ createdAt: import("convex/values").VString<string | undefined, "optional">;
1224
+ updatedAt: import("convex/values").VString<string | undefined, "optional">;
1225
+ importedAt: import("convex/values").VFloat64<number, "required">;
1226
+ }, "required", "name" | "type" | "createdAt" | "primoupId" | "updatedAt" | "parentId" | "activeWarehouseCategory" | "orisId" | "note" | "importedAt">, {
1227
+ by_primoupId: ["primoupId", "_creationTime"];
1228
+ by_parentId: ["parentId", "_creationTime"];
1229
+ by_note: ["note", "_creationTime"];
1230
+ by_type: ["type", "_creationTime"];
1231
+ by_name: ["name", "_creationTime"];
1232
+ }, {}, {}>;
1233
+ email_logs: import("convex/server").TableDefinition<import("convex/values").VObject<{
1234
+ errorMessage?: string | undefined;
1235
+ ticketId?: import("convex/values").GenericId<"maintenance_tasks"> | undefined;
1236
+ resendId?: string | undefined;
1237
+ status: "pending" | "sent" | "failed";
1238
+ from: string;
1239
+ to: string | string[];
1240
+ subject: string;
1241
+ html: string;
1242
+ sentAt: number;
1243
+ }, {
1244
+ from: import("convex/values").VString<string, "required">;
1245
+ to: import("convex/values").VUnion<string | string[], [import("convex/values").VString<string, "required">, import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">], "required", never>;
1246
+ subject: import("convex/values").VString<string, "required">;
1247
+ html: import("convex/values").VString<string, "required">;
1248
+ ticketId: import("convex/values").VId<import("convex/values").GenericId<"maintenance_tasks"> | undefined, "optional">;
1249
+ status: import("convex/values").VUnion<"pending" | "sent" | "failed", [import("convex/values").VLiteral<"sent", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"pending", "required">], "required", never>;
1250
+ resendId: import("convex/values").VString<string | undefined, "optional">;
1251
+ errorMessage: import("convex/values").VString<string | undefined, "optional">;
1252
+ sentAt: import("convex/values").VFloat64<number, "required">;
1253
+ }, "required", "errorMessage" | "status" | "ticketId" | "from" | "to" | "subject" | "html" | "resendId" | "sentAt">, {
1254
+ by_ticketId: ["ticketId", "_creationTime"];
1255
+ by_status: ["status", "_creationTime"];
1256
+ by_sentAt: ["sentAt", "_creationTime"];
1257
+ }, {}, {}>;
1258
+ ticket_history: import("convex/server").TableDefinition<import("convex/values").VObject<{
1259
+ notes?: string | undefined;
1260
+ oldValue?: string | undefined;
1261
+ newValue?: string | undefined;
1262
+ triggerName?: string | undefined;
1263
+ triggerId?: import("convex/values").GenericId<"ticket_triggers"> | undefined;
1264
+ oldSupplierId?: import("convex/values").GenericId<"suppliers"> | undefined;
1265
+ newSupplierId?: import("convex/values").GenericId<"suppliers"> | undefined;
1266
+ oldSupplierName?: string | undefined;
1267
+ newSupplierName?: string | undefined;
1268
+ performedBy?: string | undefined;
1269
+ performedByName?: string | undefined;
1270
+ performedByEmail?: string | undefined;
1271
+ timestamp: number;
1272
+ ticketId: import("convex/values").GenericId<"maintenance_tasks">;
1273
+ eventType: "status_change" | "sla_warning" | "sla_breach" | "created" | "assignee_change" | "priority_change" | "trigger_executed" | "comment_added" | "sla_set" | "updated";
1274
+ isSystemAction: boolean;
1275
+ }, {
1276
+ ticketId: import("convex/values").VId<import("convex/values").GenericId<"maintenance_tasks">, "required">;
1277
+ eventType: import("convex/values").VUnion<"status_change" | "sla_warning" | "sla_breach" | "created" | "assignee_change" | "priority_change" | "trigger_executed" | "comment_added" | "sla_set" | "updated", [import("convex/values").VLiteral<"created", "required">, import("convex/values").VLiteral<"status_change", "required">, import("convex/values").VLiteral<"assignee_change", "required">, import("convex/values").VLiteral<"priority_change", "required">, import("convex/values").VLiteral<"trigger_executed", "required">, import("convex/values").VLiteral<"comment_added", "required">, import("convex/values").VLiteral<"sla_set", "required">, import("convex/values").VLiteral<"sla_warning", "required">, import("convex/values").VLiteral<"sla_breach", "required">, import("convex/values").VLiteral<"updated", "required">], "required", never>;
1278
+ oldValue: import("convex/values").VString<string | undefined, "optional">;
1279
+ newValue: import("convex/values").VString<string | undefined, "optional">;
1280
+ triggerName: import("convex/values").VString<string | undefined, "optional">;
1281
+ triggerId: import("convex/values").VId<import("convex/values").GenericId<"ticket_triggers"> | undefined, "optional">;
1282
+ oldSupplierId: import("convex/values").VId<import("convex/values").GenericId<"suppliers"> | undefined, "optional">;
1283
+ newSupplierId: import("convex/values").VId<import("convex/values").GenericId<"suppliers"> | undefined, "optional">;
1284
+ oldSupplierName: import("convex/values").VString<string | undefined, "optional">;
1285
+ newSupplierName: import("convex/values").VString<string | undefined, "optional">;
1286
+ performedBy: import("convex/values").VString<string | undefined, "optional">;
1287
+ performedByName: import("convex/values").VString<string | undefined, "optional">;
1288
+ performedByEmail: import("convex/values").VString<string | undefined, "optional">;
1289
+ isSystemAction: import("convex/values").VBoolean<boolean, "required">;
1290
+ notes: import("convex/values").VString<string | undefined, "optional">;
1291
+ timestamp: import("convex/values").VFloat64<number, "required">;
1292
+ }, "required", "timestamp" | "notes" | "ticketId" | "eventType" | "oldValue" | "newValue" | "triggerName" | "triggerId" | "oldSupplierId" | "newSupplierId" | "oldSupplierName" | "newSupplierName" | "performedBy" | "performedByName" | "performedByEmail" | "isSystemAction">, {
1293
+ by_ticketId: ["ticketId", "_creationTime"];
1294
+ by_ticketId_timestamp: ["ticketId", "timestamp", "_creationTime"];
1295
+ by_eventType: ["eventType", "_creationTime"];
1296
+ by_timestamp: ["timestamp", "_creationTime"];
1297
+ }, {}, {}>;
1298
+ }, true>;
1299
+ modules: Record<string, () => Promise<unknown>>;
1300
+ };
1301
+ export default _default;
1302
+ //# sourceMappingURL=test.d.ts.map