@findatruck/shared-schemas 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -32,6 +32,7 @@ var index_exports = {};
32
32
  __export(index_exports, {
33
33
  ConvexUpdate: () => ConvexUpdate,
34
34
  ConvexUpdateNested: () => ConvexUpdateNested,
35
+ DriverIdentity: () => DriverIdentity,
35
36
  DriverLocation: () => DriverLocation,
36
37
  DriverLogin: () => DriverLogin,
37
38
  DriverStatus: () => DriverStatus,
@@ -40,6 +41,7 @@ __export(index_exports, {
40
41
  NewLoginResponse: () => NewLoginResponse,
41
42
  NewLoginResponseFailure: () => NewLoginResponseFailure,
42
43
  NewLoginResponseSuccess: () => NewLoginResponseSuccess,
44
+ VehicleIdentity: () => VehicleIdentity,
43
45
  decryptRsaOaepSha256B64: () => decryptRsaOaepSha256B64,
44
46
  encryptRsaOaepSha256ToB64: () => encryptRsaOaepSha256ToB64
45
47
  });
@@ -103,6 +105,10 @@ var ConvexUpdate = import_zod2.default.object({
103
105
  username: import_zod2.default.string().describe("The driver's login username"),
104
106
  password: import_zod2.default.string().describe("The driver's login password"),
105
107
  driver_id: import_zod2.default.string().optional().describe("The ELD's internal driver ID"),
108
+ driver_first_name: import_zod2.default.string().optional().describe("The driver's first name"),
109
+ driver_last_name: import_zod2.default.string().optional().describe("The driver's last name"),
110
+ driver_name: import_zod2.default.string().optional().describe("The driver's full name"),
111
+ vehicle_id: import_zod2.default.string().optional().describe("The vehicle ID"),
106
112
  driver_status: import_zod2.default.string().describe("The driver's duty status (direct from ELD)"),
107
113
  time_remaining_in_shift: import_zod2.default.number().describe("Seconds remaining in current shift"),
108
114
  time_remaining_till_break: import_zod2.default.number().describe("Seconds remaining until next required break"),
@@ -131,8 +137,18 @@ var DriverLogin = import_zod2.default.object({
131
137
  username: import_zod2.default.string().describe("The driver's login username"),
132
138
  password: import_zod2.default.string().describe("The driver's login password")
133
139
  }).describe("Schema for driver login information");
134
- var ConvexUpdateNested = import_zod2.default.object({
140
+ var DriverIdentity = import_zod2.default.object({
135
141
  driverId: import_zod2.default.string().describe("The ELD's internal driver ID"),
142
+ driverFirstName: import_zod2.default.string().optional().describe("The driver's first name"),
143
+ driverLastName: import_zod2.default.string().optional().describe("The driver's last name"),
144
+ driverName: import_zod2.default.string().optional().describe("The driver's full name")
145
+ }).describe("Schema for identifying the driver");
146
+ var VehicleIdentity = import_zod2.default.object({
147
+ vehicleId: import_zod2.default.string().optional().describe("The vehicle ID")
148
+ }).describe("Schema for identifying the vehicle");
149
+ var ConvexUpdateNested = import_zod2.default.object({
150
+ driver: DriverIdentity,
151
+ vehicle: VehicleIdentity,
136
152
  hoursOfService: HoursOfService,
137
153
  driverLocation: DriverLocation,
138
154
  driverStatus: DriverStatus,
@@ -168,6 +184,7 @@ function decryptRsaOaepSha256B64(ciphertextB64, privateKeyPem, passphrase) {
168
184
  0 && (module.exports = {
169
185
  ConvexUpdate,
170
186
  ConvexUpdateNested,
187
+ DriverIdentity,
171
188
  DriverLocation,
172
189
  DriverLogin,
173
190
  DriverStatus,
@@ -176,6 +193,7 @@ function decryptRsaOaepSha256B64(ciphertextB64, privateKeyPem, passphrase) {
176
193
  NewLoginResponse,
177
194
  NewLoginResponseFailure,
178
195
  NewLoginResponseSuccess,
196
+ VehicleIdentity,
179
197
  decryptRsaOaepSha256B64,
180
198
  encryptRsaOaepSha256ToB64
181
199
  });
package/dist/index.d.cts CHANGED
@@ -150,6 +150,10 @@ declare const ConvexUpdate: z$1.ZodObject<{
150
150
  username: z$1.ZodString;
151
151
  password: z$1.ZodString;
152
152
  driver_id: z$1.ZodOptional<z$1.ZodString>;
153
+ driver_first_name: z$1.ZodOptional<z$1.ZodString>;
154
+ driver_last_name: z$1.ZodOptional<z$1.ZodString>;
155
+ driver_name: z$1.ZodOptional<z$1.ZodString>;
156
+ vehicle_id: z$1.ZodOptional<z$1.ZodString>;
153
157
  driver_status: z$1.ZodString;
154
158
  time_remaining_in_shift: z$1.ZodNumber;
155
159
  time_remaining_till_break: z$1.ZodNumber;
@@ -171,6 +175,10 @@ declare const ConvexUpdate: z$1.ZodObject<{
171
175
  driver_current_location_longitude: number;
172
176
  driver_current_location_address: string;
173
177
  driver_id?: string | undefined;
178
+ driver_first_name?: string | undefined;
179
+ driver_last_name?: string | undefined;
180
+ driver_name?: string | undefined;
181
+ vehicle_id?: string | undefined;
174
182
  }, {
175
183
  providerUrl: string;
176
184
  username: string;
@@ -184,6 +192,10 @@ declare const ConvexUpdate: z$1.ZodObject<{
184
192
  driver_current_location_longitude: number;
185
193
  driver_current_location_address: string;
186
194
  driver_id?: string | undefined;
195
+ driver_first_name?: string | undefined;
196
+ driver_last_name?: string | undefined;
197
+ driver_name?: string | undefined;
198
+ vehicle_id?: string | undefined;
187
199
  }>;
188
200
  type ConvexUpdate = z$1.infer<typeof ConvexUpdate>;
189
201
  declare const HoursOfService: z$1.ZodObject<{
@@ -239,8 +251,55 @@ declare const DriverLogin: z$1.ZodObject<{
239
251
  password: string;
240
252
  }>;
241
253
  type DriverLogin = z$1.infer<typeof DriverLogin>;
242
- declare const ConvexUpdateNested: z$1.ZodObject<{
254
+ declare const DriverIdentity: z$1.ZodObject<{
243
255
  driverId: z$1.ZodString;
256
+ driverFirstName: z$1.ZodOptional<z$1.ZodString>;
257
+ driverLastName: z$1.ZodOptional<z$1.ZodString>;
258
+ driverName: z$1.ZodOptional<z$1.ZodString>;
259
+ }, "strip", z$1.ZodTypeAny, {
260
+ driverId: string;
261
+ driverFirstName?: string | undefined;
262
+ driverLastName?: string | undefined;
263
+ driverName?: string | undefined;
264
+ }, {
265
+ driverId: string;
266
+ driverFirstName?: string | undefined;
267
+ driverLastName?: string | undefined;
268
+ driverName?: string | undefined;
269
+ }>;
270
+ type DriverIdentity = z$1.infer<typeof DriverIdentity>;
271
+ declare const VehicleIdentity: z$1.ZodObject<{
272
+ vehicleId: z$1.ZodOptional<z$1.ZodString>;
273
+ }, "strip", z$1.ZodTypeAny, {
274
+ vehicleId?: string | undefined;
275
+ }, {
276
+ vehicleId?: string | undefined;
277
+ }>;
278
+ type VehicleIdentity = z$1.infer<typeof VehicleIdentity>;
279
+ declare const ConvexUpdateNested: z$1.ZodObject<{
280
+ driver: z$1.ZodObject<{
281
+ driverId: z$1.ZodString;
282
+ driverFirstName: z$1.ZodOptional<z$1.ZodString>;
283
+ driverLastName: z$1.ZodOptional<z$1.ZodString>;
284
+ driverName: z$1.ZodOptional<z$1.ZodString>;
285
+ }, "strip", z$1.ZodTypeAny, {
286
+ driverId: string;
287
+ driverFirstName?: string | undefined;
288
+ driverLastName?: string | undefined;
289
+ driverName?: string | undefined;
290
+ }, {
291
+ driverId: string;
292
+ driverFirstName?: string | undefined;
293
+ driverLastName?: string | undefined;
294
+ driverName?: string | undefined;
295
+ }>;
296
+ vehicle: z$1.ZodObject<{
297
+ vehicleId: z$1.ZodOptional<z$1.ZodString>;
298
+ }, "strip", z$1.ZodTypeAny, {
299
+ vehicleId?: string | undefined;
300
+ }, {
301
+ vehicleId?: string | undefined;
302
+ }>;
244
303
  hoursOfService: z$1.ZodObject<{
245
304
  timeRemainingInShift: z$1.ZodNumber;
246
305
  timeRemainingTillBreak: z$1.ZodNumber;
@@ -291,7 +350,15 @@ declare const ConvexUpdateNested: z$1.ZodObject<{
291
350
  password: string;
292
351
  }>;
293
352
  }, "strip", z$1.ZodTypeAny, {
294
- driverId: string;
353
+ driver: {
354
+ driverId: string;
355
+ driverFirstName?: string | undefined;
356
+ driverLastName?: string | undefined;
357
+ driverName?: string | undefined;
358
+ };
359
+ vehicle: {
360
+ vehicleId?: string | undefined;
361
+ };
295
362
  hoursOfService: {
296
363
  timeRemainingInShift: number;
297
364
  timeRemainingTillBreak: number;
@@ -312,7 +379,15 @@ declare const ConvexUpdateNested: z$1.ZodObject<{
312
379
  password: string;
313
380
  };
314
381
  }, {
315
- driverId: string;
382
+ driver: {
383
+ driverId: string;
384
+ driverFirstName?: string | undefined;
385
+ driverLastName?: string | undefined;
386
+ driverName?: string | undefined;
387
+ };
388
+ vehicle: {
389
+ vehicleId?: string | undefined;
390
+ };
316
391
  hoursOfService: {
317
392
  timeRemainingInShift: number;
318
393
  timeRemainingTillBreak: number;
@@ -338,4 +413,4 @@ type ConvexUpdateNested = z$1.infer<typeof ConvexUpdateNested>;
338
413
  declare function encryptRsaOaepSha256ToB64(plaintext: string, publicKeyPem: string): string;
339
414
  declare function decryptRsaOaepSha256B64(ciphertextB64: string, privateKeyPem: string, passphrase?: string): string;
340
415
 
341
- export { ConvexUpdate, ConvexUpdateNested, DriverLocation, DriverLogin, DriverStatus, HoursOfService, NewLoginRequest, NewLoginResponse, NewLoginResponseFailure, NewLoginResponseSuccess, decryptRsaOaepSha256B64, encryptRsaOaepSha256ToB64 };
416
+ export { ConvexUpdate, ConvexUpdateNested, DriverIdentity, DriverLocation, DriverLogin, DriverStatus, HoursOfService, NewLoginRequest, NewLoginResponse, NewLoginResponseFailure, NewLoginResponseSuccess, VehicleIdentity, decryptRsaOaepSha256B64, encryptRsaOaepSha256ToB64 };
package/dist/index.d.ts CHANGED
@@ -150,6 +150,10 @@ declare const ConvexUpdate: z$1.ZodObject<{
150
150
  username: z$1.ZodString;
151
151
  password: z$1.ZodString;
152
152
  driver_id: z$1.ZodOptional<z$1.ZodString>;
153
+ driver_first_name: z$1.ZodOptional<z$1.ZodString>;
154
+ driver_last_name: z$1.ZodOptional<z$1.ZodString>;
155
+ driver_name: z$1.ZodOptional<z$1.ZodString>;
156
+ vehicle_id: z$1.ZodOptional<z$1.ZodString>;
153
157
  driver_status: z$1.ZodString;
154
158
  time_remaining_in_shift: z$1.ZodNumber;
155
159
  time_remaining_till_break: z$1.ZodNumber;
@@ -171,6 +175,10 @@ declare const ConvexUpdate: z$1.ZodObject<{
171
175
  driver_current_location_longitude: number;
172
176
  driver_current_location_address: string;
173
177
  driver_id?: string | undefined;
178
+ driver_first_name?: string | undefined;
179
+ driver_last_name?: string | undefined;
180
+ driver_name?: string | undefined;
181
+ vehicle_id?: string | undefined;
174
182
  }, {
175
183
  providerUrl: string;
176
184
  username: string;
@@ -184,6 +192,10 @@ declare const ConvexUpdate: z$1.ZodObject<{
184
192
  driver_current_location_longitude: number;
185
193
  driver_current_location_address: string;
186
194
  driver_id?: string | undefined;
195
+ driver_first_name?: string | undefined;
196
+ driver_last_name?: string | undefined;
197
+ driver_name?: string | undefined;
198
+ vehicle_id?: string | undefined;
187
199
  }>;
188
200
  type ConvexUpdate = z$1.infer<typeof ConvexUpdate>;
189
201
  declare const HoursOfService: z$1.ZodObject<{
@@ -239,8 +251,55 @@ declare const DriverLogin: z$1.ZodObject<{
239
251
  password: string;
240
252
  }>;
241
253
  type DriverLogin = z$1.infer<typeof DriverLogin>;
242
- declare const ConvexUpdateNested: z$1.ZodObject<{
254
+ declare const DriverIdentity: z$1.ZodObject<{
243
255
  driverId: z$1.ZodString;
256
+ driverFirstName: z$1.ZodOptional<z$1.ZodString>;
257
+ driverLastName: z$1.ZodOptional<z$1.ZodString>;
258
+ driverName: z$1.ZodOptional<z$1.ZodString>;
259
+ }, "strip", z$1.ZodTypeAny, {
260
+ driverId: string;
261
+ driverFirstName?: string | undefined;
262
+ driverLastName?: string | undefined;
263
+ driverName?: string | undefined;
264
+ }, {
265
+ driverId: string;
266
+ driverFirstName?: string | undefined;
267
+ driverLastName?: string | undefined;
268
+ driverName?: string | undefined;
269
+ }>;
270
+ type DriverIdentity = z$1.infer<typeof DriverIdentity>;
271
+ declare const VehicleIdentity: z$1.ZodObject<{
272
+ vehicleId: z$1.ZodOptional<z$1.ZodString>;
273
+ }, "strip", z$1.ZodTypeAny, {
274
+ vehicleId?: string | undefined;
275
+ }, {
276
+ vehicleId?: string | undefined;
277
+ }>;
278
+ type VehicleIdentity = z$1.infer<typeof VehicleIdentity>;
279
+ declare const ConvexUpdateNested: z$1.ZodObject<{
280
+ driver: z$1.ZodObject<{
281
+ driverId: z$1.ZodString;
282
+ driverFirstName: z$1.ZodOptional<z$1.ZodString>;
283
+ driverLastName: z$1.ZodOptional<z$1.ZodString>;
284
+ driverName: z$1.ZodOptional<z$1.ZodString>;
285
+ }, "strip", z$1.ZodTypeAny, {
286
+ driverId: string;
287
+ driverFirstName?: string | undefined;
288
+ driverLastName?: string | undefined;
289
+ driverName?: string | undefined;
290
+ }, {
291
+ driverId: string;
292
+ driverFirstName?: string | undefined;
293
+ driverLastName?: string | undefined;
294
+ driverName?: string | undefined;
295
+ }>;
296
+ vehicle: z$1.ZodObject<{
297
+ vehicleId: z$1.ZodOptional<z$1.ZodString>;
298
+ }, "strip", z$1.ZodTypeAny, {
299
+ vehicleId?: string | undefined;
300
+ }, {
301
+ vehicleId?: string | undefined;
302
+ }>;
244
303
  hoursOfService: z$1.ZodObject<{
245
304
  timeRemainingInShift: z$1.ZodNumber;
246
305
  timeRemainingTillBreak: z$1.ZodNumber;
@@ -291,7 +350,15 @@ declare const ConvexUpdateNested: z$1.ZodObject<{
291
350
  password: string;
292
351
  }>;
293
352
  }, "strip", z$1.ZodTypeAny, {
294
- driverId: string;
353
+ driver: {
354
+ driverId: string;
355
+ driverFirstName?: string | undefined;
356
+ driverLastName?: string | undefined;
357
+ driverName?: string | undefined;
358
+ };
359
+ vehicle: {
360
+ vehicleId?: string | undefined;
361
+ };
295
362
  hoursOfService: {
296
363
  timeRemainingInShift: number;
297
364
  timeRemainingTillBreak: number;
@@ -312,7 +379,15 @@ declare const ConvexUpdateNested: z$1.ZodObject<{
312
379
  password: string;
313
380
  };
314
381
  }, {
315
- driverId: string;
382
+ driver: {
383
+ driverId: string;
384
+ driverFirstName?: string | undefined;
385
+ driverLastName?: string | undefined;
386
+ driverName?: string | undefined;
387
+ };
388
+ vehicle: {
389
+ vehicleId?: string | undefined;
390
+ };
316
391
  hoursOfService: {
317
392
  timeRemainingInShift: number;
318
393
  timeRemainingTillBreak: number;
@@ -338,4 +413,4 @@ type ConvexUpdateNested = z$1.infer<typeof ConvexUpdateNested>;
338
413
  declare function encryptRsaOaepSha256ToB64(plaintext: string, publicKeyPem: string): string;
339
414
  declare function decryptRsaOaepSha256B64(ciphertextB64: string, privateKeyPem: string, passphrase?: string): string;
340
415
 
341
- export { ConvexUpdate, ConvexUpdateNested, DriverLocation, DriverLogin, DriverStatus, HoursOfService, NewLoginRequest, NewLoginResponse, NewLoginResponseFailure, NewLoginResponseSuccess, decryptRsaOaepSha256B64, encryptRsaOaepSha256ToB64 };
416
+ export { ConvexUpdate, ConvexUpdateNested, DriverIdentity, DriverLocation, DriverLogin, DriverStatus, HoursOfService, NewLoginRequest, NewLoginResponse, NewLoginResponseFailure, NewLoginResponseSuccess, VehicleIdentity, decryptRsaOaepSha256B64, encryptRsaOaepSha256ToB64 };
package/dist/index.js CHANGED
@@ -56,6 +56,10 @@ var ConvexUpdate = z2.object({
56
56
  username: z2.string().describe("The driver's login username"),
57
57
  password: z2.string().describe("The driver's login password"),
58
58
  driver_id: z2.string().optional().describe("The ELD's internal driver ID"),
59
+ driver_first_name: z2.string().optional().describe("The driver's first name"),
60
+ driver_last_name: z2.string().optional().describe("The driver's last name"),
61
+ driver_name: z2.string().optional().describe("The driver's full name"),
62
+ vehicle_id: z2.string().optional().describe("The vehicle ID"),
59
63
  driver_status: z2.string().describe("The driver's duty status (direct from ELD)"),
60
64
  time_remaining_in_shift: z2.number().describe("Seconds remaining in current shift"),
61
65
  time_remaining_till_break: z2.number().describe("Seconds remaining until next required break"),
@@ -84,8 +88,18 @@ var DriverLogin = z2.object({
84
88
  username: z2.string().describe("The driver's login username"),
85
89
  password: z2.string().describe("The driver's login password")
86
90
  }).describe("Schema for driver login information");
87
- var ConvexUpdateNested = z2.object({
91
+ var DriverIdentity = z2.object({
88
92
  driverId: z2.string().describe("The ELD's internal driver ID"),
93
+ driverFirstName: z2.string().optional().describe("The driver's first name"),
94
+ driverLastName: z2.string().optional().describe("The driver's last name"),
95
+ driverName: z2.string().optional().describe("The driver's full name")
96
+ }).describe("Schema for identifying the driver");
97
+ var VehicleIdentity = z2.object({
98
+ vehicleId: z2.string().optional().describe("The vehicle ID")
99
+ }).describe("Schema for identifying the vehicle");
100
+ var ConvexUpdateNested = z2.object({
101
+ driver: DriverIdentity,
102
+ vehicle: VehicleIdentity,
89
103
  hoursOfService: HoursOfService,
90
104
  driverLocation: DriverLocation,
91
105
  driverStatus: DriverStatus,
@@ -120,6 +134,7 @@ function decryptRsaOaepSha256B64(ciphertextB64, privateKeyPem, passphrase) {
120
134
  export {
121
135
  ConvexUpdate,
122
136
  ConvexUpdateNested,
137
+ DriverIdentity,
123
138
  DriverLocation,
124
139
  DriverLogin,
125
140
  DriverStatus,
@@ -128,6 +143,7 @@ export {
128
143
  NewLoginResponse,
129
144
  NewLoginResponseFailure,
130
145
  NewLoginResponseSuccess,
146
+ VehicleIdentity,
131
147
  decryptRsaOaepSha256B64,
132
148
  encryptRsaOaepSha256ToB64
133
149
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@findatruck/shared-schemas",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",