@findatruck/shared-schemas 2.4.0 → 2.5.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/browser.cjs CHANGED
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/browser.ts
31
31
  var browser_exports = {};
32
32
  __export(browser_exports, {
33
+ BatchConvexUpdate: () => BatchConvexUpdate,
33
34
  ConvexUpdate: () => ConvexUpdate,
34
35
  NewLoginRequest: () => NewLoginRequest,
35
36
  NewLoginResponse: () => NewLoginResponse,
@@ -120,6 +121,9 @@ var ConvexUpdate = import_zod2.default.object({
120
121
  external_driver_id: import_zod2.default.string().describe("The driver ID on backend"),
121
122
  mileage_since_last_update: import_zod2.default.number().optional().describe("Mileage since last update in miles")
122
123
  }).describe("Schema for updating driver ELD status information");
124
+ var BatchConvexUpdate = import_zod2.default.object({
125
+ updates: import_zod2.default.array(ConvexUpdate).describe("An array of Convex ELD driver updates")
126
+ }).describe("Schema for batch updating driver ELD status information");
123
127
 
124
128
  // src/schemas/providerAccounts/update-status.ts
125
129
  var import_zod3 = __toESM(require("zod"), 1);
@@ -155,6 +159,7 @@ var ValidatePasswordResponseSchema = import_zod4.z.object({
155
159
  }).describe("Response schema for password validation");
156
160
  // Annotate the CommonJS export names for ESM import in node:
157
161
  0 && (module.exports = {
162
+ BatchConvexUpdate,
158
163
  ConvexUpdate,
159
164
  NewLoginRequest,
160
165
  NewLoginResponse,
@@ -226,6 +226,119 @@ declare const ConvexUpdate: z$1.ZodObject<{
226
226
  mileage_since_last_update?: number | undefined;
227
227
  }>;
228
228
  type ConvexUpdate = z$1.infer<typeof ConvexUpdate>;
229
+ declare const BatchConvexUpdate: z$1.ZodObject<{
230
+ updates: z$1.ZodArray<z$1.ZodObject<{
231
+ provider_url: z$1.ZodEffects<z$1.ZodString, string, string>;
232
+ username: z$1.ZodString;
233
+ driver_name: z$1.ZodOptional<z$1.ZodString>;
234
+ vehicle_id: z$1.ZodOptional<z$1.ZodString>;
235
+ driver_status: z$1.ZodString;
236
+ time_remaining_in_shift: z$1.ZodNumber;
237
+ time_remaining_till_break: z$1.ZodNumber;
238
+ time_remaining_in_week: z$1.ZodNumber;
239
+ time_remaining_in_drive: z$1.ZodNumber;
240
+ driver_current_location_latitude: z$1.ZodNumber;
241
+ driver_current_location_longitude: z$1.ZodNumber;
242
+ driver_current_location_address: z$1.ZodString;
243
+ license_number: z$1.ZodOptional<z$1.ZodString>;
244
+ license_state: z$1.ZodOptional<z$1.ZodString>;
245
+ speed: z$1.ZodOptional<z$1.ZodNumber>;
246
+ odometer: z$1.ZodOptional<z$1.ZodNumber>;
247
+ convex_provider_account_id: z$1.ZodString;
248
+ external_provider_account_id: z$1.ZodString;
249
+ external_driver_id: z$1.ZodString;
250
+ mileage_since_last_update: z$1.ZodOptional<z$1.ZodNumber>;
251
+ }, "strip", z$1.ZodTypeAny, {
252
+ username: string;
253
+ provider_url: string;
254
+ driver_status: string;
255
+ time_remaining_in_shift: number;
256
+ time_remaining_till_break: number;
257
+ time_remaining_in_week: number;
258
+ time_remaining_in_drive: number;
259
+ driver_current_location_latitude: number;
260
+ driver_current_location_longitude: number;
261
+ driver_current_location_address: string;
262
+ convex_provider_account_id: string;
263
+ external_provider_account_id: string;
264
+ external_driver_id: string;
265
+ driver_name?: string | undefined;
266
+ vehicle_id?: string | undefined;
267
+ license_number?: string | undefined;
268
+ license_state?: string | undefined;
269
+ speed?: number | undefined;
270
+ odometer?: number | undefined;
271
+ mileage_since_last_update?: number | undefined;
272
+ }, {
273
+ username: string;
274
+ provider_url: string;
275
+ driver_status: string;
276
+ time_remaining_in_shift: number;
277
+ time_remaining_till_break: number;
278
+ time_remaining_in_week: number;
279
+ time_remaining_in_drive: number;
280
+ driver_current_location_latitude: number;
281
+ driver_current_location_longitude: number;
282
+ driver_current_location_address: string;
283
+ convex_provider_account_id: string;
284
+ external_provider_account_id: string;
285
+ external_driver_id: string;
286
+ driver_name?: string | undefined;
287
+ vehicle_id?: string | undefined;
288
+ license_number?: string | undefined;
289
+ license_state?: string | undefined;
290
+ speed?: number | undefined;
291
+ odometer?: number | undefined;
292
+ mileage_since_last_update?: number | undefined;
293
+ }>, "many">;
294
+ }, "strip", z$1.ZodTypeAny, {
295
+ updates: {
296
+ username: string;
297
+ provider_url: string;
298
+ driver_status: string;
299
+ time_remaining_in_shift: number;
300
+ time_remaining_till_break: number;
301
+ time_remaining_in_week: number;
302
+ time_remaining_in_drive: number;
303
+ driver_current_location_latitude: number;
304
+ driver_current_location_longitude: number;
305
+ driver_current_location_address: string;
306
+ convex_provider_account_id: string;
307
+ external_provider_account_id: string;
308
+ external_driver_id: string;
309
+ driver_name?: string | undefined;
310
+ vehicle_id?: string | undefined;
311
+ license_number?: string | undefined;
312
+ license_state?: string | undefined;
313
+ speed?: number | undefined;
314
+ odometer?: number | undefined;
315
+ mileage_since_last_update?: number | undefined;
316
+ }[];
317
+ }, {
318
+ updates: {
319
+ username: string;
320
+ provider_url: string;
321
+ driver_status: string;
322
+ time_remaining_in_shift: number;
323
+ time_remaining_till_break: number;
324
+ time_remaining_in_week: number;
325
+ time_remaining_in_drive: number;
326
+ driver_current_location_latitude: number;
327
+ driver_current_location_longitude: number;
328
+ driver_current_location_address: string;
329
+ convex_provider_account_id: string;
330
+ external_provider_account_id: string;
331
+ external_driver_id: string;
332
+ driver_name?: string | undefined;
333
+ vehicle_id?: string | undefined;
334
+ license_number?: string | undefined;
335
+ license_state?: string | undefined;
336
+ speed?: number | undefined;
337
+ odometer?: number | undefined;
338
+ mileage_since_last_update?: number | undefined;
339
+ }[];
340
+ }>;
341
+ type BatchConvexUpdate = z$1.infer<typeof BatchConvexUpdate>;
229
342
 
230
343
  declare enum ScrapeStatus {
231
344
  NEW_LOGIN_RECEIVED = "NEW_LOGIN_RECEIVED",
@@ -286,4 +399,4 @@ declare const ValidatePasswordResponseSchema: z.ZodObject<{
286
399
  }>;
287
400
  type ValidatePasswordResponse = z.infer<typeof ValidatePasswordResponseSchema>;
288
401
 
289
- export { ConvexUpdate, NewLoginRequest, NewLoginResponse, NewLoginResponseFailure, NewLoginResponseSuccess, ScrapeStatus, UpdateScrapeStatusMessage, type ValidatePasswordRequest, ValidatePasswordRequestSchema, type ValidatePasswordResponse, ValidatePasswordResponseSchema };
402
+ export { BatchConvexUpdate, ConvexUpdate, NewLoginRequest, NewLoginResponse, NewLoginResponseFailure, NewLoginResponseSuccess, ScrapeStatus, UpdateScrapeStatusMessage, type ValidatePasswordRequest, ValidatePasswordRequestSchema, type ValidatePasswordResponse, ValidatePasswordResponseSchema };
package/dist/browser.d.ts CHANGED
@@ -226,6 +226,119 @@ declare const ConvexUpdate: z$1.ZodObject<{
226
226
  mileage_since_last_update?: number | undefined;
227
227
  }>;
228
228
  type ConvexUpdate = z$1.infer<typeof ConvexUpdate>;
229
+ declare const BatchConvexUpdate: z$1.ZodObject<{
230
+ updates: z$1.ZodArray<z$1.ZodObject<{
231
+ provider_url: z$1.ZodEffects<z$1.ZodString, string, string>;
232
+ username: z$1.ZodString;
233
+ driver_name: z$1.ZodOptional<z$1.ZodString>;
234
+ vehicle_id: z$1.ZodOptional<z$1.ZodString>;
235
+ driver_status: z$1.ZodString;
236
+ time_remaining_in_shift: z$1.ZodNumber;
237
+ time_remaining_till_break: z$1.ZodNumber;
238
+ time_remaining_in_week: z$1.ZodNumber;
239
+ time_remaining_in_drive: z$1.ZodNumber;
240
+ driver_current_location_latitude: z$1.ZodNumber;
241
+ driver_current_location_longitude: z$1.ZodNumber;
242
+ driver_current_location_address: z$1.ZodString;
243
+ license_number: z$1.ZodOptional<z$1.ZodString>;
244
+ license_state: z$1.ZodOptional<z$1.ZodString>;
245
+ speed: z$1.ZodOptional<z$1.ZodNumber>;
246
+ odometer: z$1.ZodOptional<z$1.ZodNumber>;
247
+ convex_provider_account_id: z$1.ZodString;
248
+ external_provider_account_id: z$1.ZodString;
249
+ external_driver_id: z$1.ZodString;
250
+ mileage_since_last_update: z$1.ZodOptional<z$1.ZodNumber>;
251
+ }, "strip", z$1.ZodTypeAny, {
252
+ username: string;
253
+ provider_url: string;
254
+ driver_status: string;
255
+ time_remaining_in_shift: number;
256
+ time_remaining_till_break: number;
257
+ time_remaining_in_week: number;
258
+ time_remaining_in_drive: number;
259
+ driver_current_location_latitude: number;
260
+ driver_current_location_longitude: number;
261
+ driver_current_location_address: string;
262
+ convex_provider_account_id: string;
263
+ external_provider_account_id: string;
264
+ external_driver_id: string;
265
+ driver_name?: string | undefined;
266
+ vehicle_id?: string | undefined;
267
+ license_number?: string | undefined;
268
+ license_state?: string | undefined;
269
+ speed?: number | undefined;
270
+ odometer?: number | undefined;
271
+ mileage_since_last_update?: number | undefined;
272
+ }, {
273
+ username: string;
274
+ provider_url: string;
275
+ driver_status: string;
276
+ time_remaining_in_shift: number;
277
+ time_remaining_till_break: number;
278
+ time_remaining_in_week: number;
279
+ time_remaining_in_drive: number;
280
+ driver_current_location_latitude: number;
281
+ driver_current_location_longitude: number;
282
+ driver_current_location_address: string;
283
+ convex_provider_account_id: string;
284
+ external_provider_account_id: string;
285
+ external_driver_id: string;
286
+ driver_name?: string | undefined;
287
+ vehicle_id?: string | undefined;
288
+ license_number?: string | undefined;
289
+ license_state?: string | undefined;
290
+ speed?: number | undefined;
291
+ odometer?: number | undefined;
292
+ mileage_since_last_update?: number | undefined;
293
+ }>, "many">;
294
+ }, "strip", z$1.ZodTypeAny, {
295
+ updates: {
296
+ username: string;
297
+ provider_url: string;
298
+ driver_status: string;
299
+ time_remaining_in_shift: number;
300
+ time_remaining_till_break: number;
301
+ time_remaining_in_week: number;
302
+ time_remaining_in_drive: number;
303
+ driver_current_location_latitude: number;
304
+ driver_current_location_longitude: number;
305
+ driver_current_location_address: string;
306
+ convex_provider_account_id: string;
307
+ external_provider_account_id: string;
308
+ external_driver_id: string;
309
+ driver_name?: string | undefined;
310
+ vehicle_id?: string | undefined;
311
+ license_number?: string | undefined;
312
+ license_state?: string | undefined;
313
+ speed?: number | undefined;
314
+ odometer?: number | undefined;
315
+ mileage_since_last_update?: number | undefined;
316
+ }[];
317
+ }, {
318
+ updates: {
319
+ username: string;
320
+ provider_url: string;
321
+ driver_status: string;
322
+ time_remaining_in_shift: number;
323
+ time_remaining_till_break: number;
324
+ time_remaining_in_week: number;
325
+ time_remaining_in_drive: number;
326
+ driver_current_location_latitude: number;
327
+ driver_current_location_longitude: number;
328
+ driver_current_location_address: string;
329
+ convex_provider_account_id: string;
330
+ external_provider_account_id: string;
331
+ external_driver_id: string;
332
+ driver_name?: string | undefined;
333
+ vehicle_id?: string | undefined;
334
+ license_number?: string | undefined;
335
+ license_state?: string | undefined;
336
+ speed?: number | undefined;
337
+ odometer?: number | undefined;
338
+ mileage_since_last_update?: number | undefined;
339
+ }[];
340
+ }>;
341
+ type BatchConvexUpdate = z$1.infer<typeof BatchConvexUpdate>;
229
342
 
230
343
  declare enum ScrapeStatus {
231
344
  NEW_LOGIN_RECEIVED = "NEW_LOGIN_RECEIVED",
@@ -286,4 +399,4 @@ declare const ValidatePasswordResponseSchema: z.ZodObject<{
286
399
  }>;
287
400
  type ValidatePasswordResponse = z.infer<typeof ValidatePasswordResponseSchema>;
288
401
 
289
- export { ConvexUpdate, NewLoginRequest, NewLoginResponse, NewLoginResponseFailure, NewLoginResponseSuccess, ScrapeStatus, UpdateScrapeStatusMessage, type ValidatePasswordRequest, ValidatePasswordRequestSchema, type ValidatePasswordResponse, ValidatePasswordResponseSchema };
402
+ export { BatchConvexUpdate, ConvexUpdate, NewLoginRequest, NewLoginResponse, NewLoginResponseFailure, NewLoginResponseSuccess, ScrapeStatus, UpdateScrapeStatusMessage, type ValidatePasswordRequest, ValidatePasswordRequestSchema, type ValidatePasswordResponse, ValidatePasswordResponseSchema };
package/dist/browser.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import {
2
+ BatchConvexUpdate,
2
3
  ConvexUpdate,
3
4
  NewLoginRequest,
4
5
  NewLoginResponse,
@@ -8,8 +9,9 @@ import {
8
9
  UpdateScrapeStatusMessage,
9
10
  ValidatePasswordRequestSchema,
10
11
  ValidatePasswordResponseSchema
11
- } from "./chunk-RDX5SWB6.js";
12
+ } from "./chunk-NMPXS227.js";
12
13
  export {
14
+ BatchConvexUpdate,
13
15
  ConvexUpdate,
14
16
  NewLoginRequest,
15
17
  NewLoginResponse,
@@ -76,6 +76,9 @@ var ConvexUpdate = z2.object({
76
76
  external_driver_id: z2.string().describe("The driver ID on backend"),
77
77
  mileage_since_last_update: z2.number().optional().describe("Mileage since last update in miles")
78
78
  }).describe("Schema for updating driver ELD status information");
79
+ var BatchConvexUpdate = z2.object({
80
+ updates: z2.array(ConvexUpdate).describe("An array of Convex ELD driver updates")
81
+ }).describe("Schema for batch updating driver ELD status information");
79
82
 
80
83
  // src/schemas/providerAccounts/update-status.ts
81
84
  import z3 from "zod";
@@ -116,6 +119,7 @@ export {
116
119
  NewLoginResponseFailure,
117
120
  NewLoginResponse,
118
121
  ConvexUpdate,
122
+ BatchConvexUpdate,
119
123
  ScrapeStatus,
120
124
  UpdateScrapeStatusMessage,
121
125
  ValidatePasswordRequestSchema,
package/dist/index.cjs CHANGED
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/index.ts
31
31
  var index_exports = {};
32
32
  __export(index_exports, {
33
+ BatchConvexUpdate: () => BatchConvexUpdate,
33
34
  ConvexUpdate: () => ConvexUpdate,
34
35
  NewLoginRequest: () => NewLoginRequest,
35
36
  NewLoginResponse: () => NewLoginResponse,
@@ -122,6 +123,9 @@ var ConvexUpdate = import_zod2.default.object({
122
123
  external_driver_id: import_zod2.default.string().describe("The driver ID on backend"),
123
124
  mileage_since_last_update: import_zod2.default.number().optional().describe("Mileage since last update in miles")
124
125
  }).describe("Schema for updating driver ELD status information");
126
+ var BatchConvexUpdate = import_zod2.default.object({
127
+ updates: import_zod2.default.array(ConvexUpdate).describe("An array of Convex ELD driver updates")
128
+ }).describe("Schema for batch updating driver ELD status information");
125
129
 
126
130
  // src/security/transit-crypto.ts
127
131
  var import_node_crypto = require("crypto");
@@ -183,6 +187,7 @@ var ValidatePasswordResponseSchema = import_zod4.z.object({
183
187
  }).describe("Response schema for password validation");
184
188
  // Annotate the CommonJS export names for ESM import in node:
185
189
  0 && (module.exports = {
190
+ BatchConvexUpdate,
186
191
  ConvexUpdate,
187
192
  NewLoginRequest,
188
193
  NewLoginResponse,
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- export { ConvexUpdate, NewLoginRequest, NewLoginResponse, NewLoginResponseFailure, NewLoginResponseSuccess, ScrapeStatus, UpdateScrapeStatusMessage, ValidatePasswordRequest, ValidatePasswordRequestSchema, ValidatePasswordResponse, ValidatePasswordResponseSchema } from './browser.cjs';
1
+ export { BatchConvexUpdate, ConvexUpdate, NewLoginRequest, NewLoginResponse, NewLoginResponseFailure, NewLoginResponseSuccess, ScrapeStatus, UpdateScrapeStatusMessage, ValidatePasswordRequest, ValidatePasswordRequestSchema, ValidatePasswordResponse, ValidatePasswordResponseSchema } from './browser.cjs';
2
2
  import 'zod';
3
3
 
4
4
  declare function encryptRsaOaepSha256ToB64(plaintext: string, publicKeyPem: string): string;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { ConvexUpdate, NewLoginRequest, NewLoginResponse, NewLoginResponseFailure, NewLoginResponseSuccess, ScrapeStatus, UpdateScrapeStatusMessage, ValidatePasswordRequest, ValidatePasswordRequestSchema, ValidatePasswordResponse, ValidatePasswordResponseSchema } from './browser.js';
1
+ export { BatchConvexUpdate, ConvexUpdate, NewLoginRequest, NewLoginResponse, NewLoginResponseFailure, NewLoginResponseSuccess, ScrapeStatus, UpdateScrapeStatusMessage, ValidatePasswordRequest, ValidatePasswordRequestSchema, ValidatePasswordResponse, ValidatePasswordResponseSchema } from './browser.js';
2
2
  import 'zod';
3
3
 
4
4
  declare function encryptRsaOaepSha256ToB64(plaintext: string, publicKeyPem: string): string;
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import {
2
+ BatchConvexUpdate,
2
3
  ConvexUpdate,
3
4
  NewLoginRequest,
4
5
  NewLoginResponse,
@@ -8,7 +9,7 @@ import {
8
9
  UpdateScrapeStatusMessage,
9
10
  ValidatePasswordRequestSchema,
10
11
  ValidatePasswordResponseSchema
11
- } from "./chunk-RDX5SWB6.js";
12
+ } from "./chunk-NMPXS227.js";
12
13
 
13
14
  // src/security/transit-crypto.ts
14
15
  import { publicEncrypt, privateDecrypt, constants } from "crypto";
@@ -36,6 +37,7 @@ function decryptRsaOaepSha256B64(ciphertextB64, privateKeyPem, passphrase) {
36
37
  return plaintext.toString("utf8");
37
38
  }
38
39
  export {
40
+ BatchConvexUpdate,
39
41
  ConvexUpdate,
40
42
  NewLoginRequest,
41
43
  NewLoginResponse,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@findatruck/shared-schemas",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",