@findatruck/shared-schemas 2.12.0 → 2.14.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
@@ -153,6 +153,7 @@ var ScrapeStatus = /* @__PURE__ */ ((ScrapeStatus2) => {
153
153
  ScrapeStatus2["LOGIN_SUCCESS"] = "LOGIN_SUCCESS";
154
154
  ScrapeStatus2["LOGIN_FAILED"] = "LOGIN_FAILED";
155
155
  ScrapeStatus2["LOGIN_SUCCESS_FETCH_FAILED"] = "LOGIN_SUCCESS_FETCH_FAILED";
156
+ ScrapeStatus2["LOGIN_SUCCESS_UNSUPPORTED_PROVIDER"] = "LOGIN_SUCCESS_UNSUPPORTED_PROVIDER";
156
157
  ScrapeStatus2["DATA_FETCH_IN_PROGRESS"] = "DATA_FETCH_IN_PROGRESS";
157
158
  ScrapeStatus2["DATA_FETCH_SUCCESS"] = "DATA_FETCH_SUCCESS";
158
159
  ScrapeStatus2["DATA_FETCH_FAILED"] = "DATA_FETCH_FAILED";
@@ -297,6 +297,7 @@ declare enum ScrapeStatus {
297
297
  LOGIN_SUCCESS = "LOGIN_SUCCESS",
298
298
  LOGIN_FAILED = "LOGIN_FAILED",
299
299
  LOGIN_SUCCESS_FETCH_FAILED = "LOGIN_SUCCESS_FETCH_FAILED",
300
+ LOGIN_SUCCESS_UNSUPPORTED_PROVIDER = "LOGIN_SUCCESS_UNSUPPORTED_PROVIDER",
300
301
  DATA_FETCH_IN_PROGRESS = "DATA_FETCH_IN_PROGRESS",
301
302
  DATA_FETCH_SUCCESS = "DATA_FETCH_SUCCESS",
302
303
  DATA_FETCH_FAILED = "DATA_FETCH_FAILED"
package/dist/browser.d.ts CHANGED
@@ -297,6 +297,7 @@ declare enum ScrapeStatus {
297
297
  LOGIN_SUCCESS = "LOGIN_SUCCESS",
298
298
  LOGIN_FAILED = "LOGIN_FAILED",
299
299
  LOGIN_SUCCESS_FETCH_FAILED = "LOGIN_SUCCESS_FETCH_FAILED",
300
+ LOGIN_SUCCESS_UNSUPPORTED_PROVIDER = "LOGIN_SUCCESS_UNSUPPORTED_PROVIDER",
300
301
  DATA_FETCH_IN_PROGRESS = "DATA_FETCH_IN_PROGRESS",
301
302
  DATA_FETCH_SUCCESS = "DATA_FETCH_SUCCESS",
302
303
  DATA_FETCH_FAILED = "DATA_FETCH_FAILED"
package/dist/browser.js CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  UpdateScrapeStatusMessage,
17
17
  ValidatePasswordRequestSchema,
18
18
  ValidatePasswordResponseSchema
19
- } from "./chunk-UWBIQBUR.js";
19
+ } from "./chunk-S53TIE72.js";
20
20
  export {
21
21
  BatchConvexUpdate,
22
22
  BatchConvexUpdateSchema,
@@ -101,6 +101,7 @@ var ScrapeStatus = /* @__PURE__ */ ((ScrapeStatus2) => {
101
101
  ScrapeStatus2["LOGIN_SUCCESS"] = "LOGIN_SUCCESS";
102
102
  ScrapeStatus2["LOGIN_FAILED"] = "LOGIN_FAILED";
103
103
  ScrapeStatus2["LOGIN_SUCCESS_FETCH_FAILED"] = "LOGIN_SUCCESS_FETCH_FAILED";
104
+ ScrapeStatus2["LOGIN_SUCCESS_UNSUPPORTED_PROVIDER"] = "LOGIN_SUCCESS_UNSUPPORTED_PROVIDER";
104
105
  ScrapeStatus2["DATA_FETCH_IN_PROGRESS"] = "DATA_FETCH_IN_PROGRESS";
105
106
  ScrapeStatus2["DATA_FETCH_SUCCESS"] = "DATA_FETCH_SUCCESS";
106
107
  ScrapeStatus2["DATA_FETCH_FAILED"] = "DATA_FETCH_FAILED";
package/dist/index.cjs CHANGED
@@ -30,6 +30,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/index.ts
31
31
  var index_exports = {};
32
32
  __export(index_exports, {
33
+ AnonymousDriverErrorResponseSchema: () => AnonymousDriverErrorResponseSchema,
34
+ AnonymousDriverResponseSchema: () => AnonymousDriverResponseSchema,
33
35
  BatchConvexUpdate: () => BatchConvexUpdate,
34
36
  BatchConvexUpdateSchema: () => BatchConvexUpdateSchema,
35
37
  BrowserAuthFailureSchema: () => BrowserAuthFailureSchema,
@@ -39,10 +41,12 @@ __export(index_exports, {
39
41
  BrowserCrawlFailureSchema: () => BrowserCrawlFailureSchema,
40
42
  BrowserCrawlResponseSchema: () => BrowserCrawlResponseSchema,
41
43
  BrowserCrawlSuccessSchema: () => BrowserCrawlSuccessSchema,
44
+ CapturedTrafficEntrySchema: () => CapturedTrafficEntrySchema,
42
45
  ConvexDriverSchema: () => ConvexDriverSchema,
43
46
  ConvexUpdate: () => ConvexUpdate,
44
47
  ConvexUpdateSchema: () => ConvexUpdateSchema,
45
48
  CrawlPageSchema: () => CrawlPageSchema,
49
+ CreateAnonymousDriverBodySchema: () => CreateAnonymousDriverBodySchema,
46
50
  DeleteProviderAccountRequestSchema: () => DeleteProviderAccountRequestSchema,
47
51
  DeleteProviderAccountResponseSchema: () => DeleteProviderAccountResponseSchema,
48
52
  DriverRankingSchema: () => DriverRankingSchema,
@@ -172,144 +176,157 @@ var BatchConvexUpdateSchema = import_zod2.default.object({
172
176
  var ConvexUpdate = ConvexUpdateSchema;
173
177
  var BatchConvexUpdate = BatchConvexUpdateSchema;
174
178
 
175
- // src/schemas/providerAccounts/update-status.ts
179
+ // src/schemas/drivers/anonymous-driver.ts
176
180
  var import_zod3 = __toESM(require("zod"), 1);
181
+ var CreateAnonymousDriverBodySchema = import_zod3.default.object({
182
+ convex_user_id: import_zod3.default.string().min(1)
183
+ });
184
+ var AnonymousDriverResponseSchema = import_zod3.default.object({
185
+ driver_id: import_zod3.default.string()
186
+ });
187
+ var AnonymousDriverErrorResponseSchema = import_zod3.default.object({
188
+ error: import_zod3.default.string()
189
+ });
190
+
191
+ // src/schemas/providerAccounts/update-status.ts
192
+ var import_zod4 = __toESM(require("zod"), 1);
177
193
  var ScrapeStatus = /* @__PURE__ */ ((ScrapeStatus2) => {
178
194
  ScrapeStatus2["NEW_LOGIN_RECEIVED"] = "NEW_LOGIN_RECEIVED";
179
195
  ScrapeStatus2["LOGIN_IN_PROGRESS"] = "LOGIN_IN_PROGRESS";
180
196
  ScrapeStatus2["LOGIN_SUCCESS"] = "LOGIN_SUCCESS";
181
197
  ScrapeStatus2["LOGIN_FAILED"] = "LOGIN_FAILED";
182
198
  ScrapeStatus2["LOGIN_SUCCESS_FETCH_FAILED"] = "LOGIN_SUCCESS_FETCH_FAILED";
199
+ ScrapeStatus2["LOGIN_SUCCESS_UNSUPPORTED_PROVIDER"] = "LOGIN_SUCCESS_UNSUPPORTED_PROVIDER";
183
200
  ScrapeStatus2["DATA_FETCH_IN_PROGRESS"] = "DATA_FETCH_IN_PROGRESS";
184
201
  ScrapeStatus2["DATA_FETCH_SUCCESS"] = "DATA_FETCH_SUCCESS";
185
202
  ScrapeStatus2["DATA_FETCH_FAILED"] = "DATA_FETCH_FAILED";
186
203
  return ScrapeStatus2;
187
204
  })(ScrapeStatus || {});
188
- var UpdateScrapeStatusMessage = import_zod3.default.object({
189
- status: import_zod3.default.nativeEnum(ScrapeStatus).describe("The current status of the scrape process"),
190
- correctPassword: import_zod3.default.boolean().optional().describe("Indicates if the provided password was correct, if applicable"),
191
- externalProviderAccountId: import_zod3.default.string().describe("The external identifier for the provider account (convex ID or similar)"),
192
- username: import_zod3.default.string().describe("The username of the provider account whose status is being updated"),
193
- provider_url: import_zod3.default.string().describe("The URL of the ELD provider"),
194
- driverCount: import_zod3.default.number().optional().describe("The number of drivers associated with the account, if applicable"),
195
- providerSlug: import_zod3.default.string().optional().describe("The slug identifier for the provider")
205
+ var UpdateScrapeStatusMessage = import_zod4.default.object({
206
+ status: import_zod4.default.nativeEnum(ScrapeStatus).describe("The current status of the scrape process"),
207
+ correctPassword: import_zod4.default.boolean().optional().describe("Indicates if the provided password was correct, if applicable"),
208
+ externalProviderAccountId: import_zod4.default.string().describe("The external identifier for the provider account (convex ID or similar)"),
209
+ username: import_zod4.default.string().describe("The username of the provider account whose status is being updated"),
210
+ provider_url: import_zod4.default.string().describe("The URL of the ELD provider"),
211
+ driverCount: import_zod4.default.number().optional().describe("The number of drivers associated with the account, if applicable"),
212
+ providerSlug: import_zod4.default.string().optional().describe("The slug identifier for the provider")
196
213
  }).describe("Schema for update status messages");
197
214
 
198
215
  // src/schemas/providerAccounts/validate-password.ts
199
- var import_zod4 = require("zod");
200
- var ValidatePasswordRequestSchema = import_zod4.z.object({
201
- providerAccountId: import_zod4.z.string().min(1).describe("The unique identifier of the provider account in postgres to validate the password for"),
202
- encryptedPassword: import_zod4.z.string().min(1).describe("The encrypted password to validate against the stored password")
216
+ var import_zod5 = require("zod");
217
+ var ValidatePasswordRequestSchema = import_zod5.z.object({
218
+ providerAccountId: import_zod5.z.string().min(1).describe("The unique identifier of the provider account in postgres to validate the password for"),
219
+ encryptedPassword: import_zod5.z.string().min(1).describe("The encrypted password to validate against the stored password")
203
220
  }).describe("Request schema for validating a provider account password");
204
- var ValidatePasswordResponseSchema = import_zod4.z.object({
205
- isValid: import_zod4.z.boolean().describe("Indicates if the provided password is valid"),
206
- driverIds: import_zod4.z.array(import_zod4.z.string()).describe("List of driver IDs associated with the provider account")
221
+ var ValidatePasswordResponseSchema = import_zod5.z.object({
222
+ isValid: import_zod5.z.boolean().describe("Indicates if the provided password is valid"),
223
+ driverIds: import_zod5.z.array(import_zod5.z.string()).describe("List of driver IDs associated with the provider account")
207
224
  }).describe("Response schema for password validation");
208
225
 
209
226
  // src/schemas/providerAccounts/delete-provider-account.ts
210
- var import_zod5 = require("zod");
211
- var DeleteProviderAccountRequestSchema = import_zod5.z.object({
212
- providerAccountId: import_zod5.z.string().min(1).describe("The external provider account ID to delete")
227
+ var import_zod6 = require("zod");
228
+ var DeleteProviderAccountRequestSchema = import_zod6.z.object({
229
+ providerAccountId: import_zod6.z.string().min(1).describe("The external provider account ID to delete")
213
230
  }).describe("Request schema for deleting a provider account");
214
- var DeleteProviderAccountResponseSchema = import_zod5.z.object({
215
- success: import_zod5.z.boolean().describe("Indicates if the provider account was successfully deleted")
231
+ var DeleteProviderAccountResponseSchema = import_zod6.z.object({
232
+ success: import_zod6.z.boolean().describe("Indicates if the provider account was successfully deleted")
216
233
  }).describe("Response schema for provider account deletion");
217
234
 
218
235
  // src/schemas/telemetry/driver-rankings.ts
219
- var import_zod6 = require("zod");
220
- var DriverRankingsRequestSchema = import_zod6.z.object({
221
- start_date: import_zod6.z.string().describe("Start date for the ranking period (ISO 8601 format)"),
222
- end_date: import_zod6.z.string().describe("End date for the ranking period (ISO 8601 format)"),
223
- state: import_zod6.z.string().length(2).optional().describe("Optional 2-letter state abbreviation to filter telemetry by location")
236
+ var import_zod7 = require("zod");
237
+ var DriverRankingsRequestSchema = import_zod7.z.object({
238
+ start_date: import_zod7.z.string().describe("Start date for the ranking period (ISO 8601 format)"),
239
+ end_date: import_zod7.z.string().describe("End date for the ranking period (ISO 8601 format)"),
240
+ state: import_zod7.z.string().length(2).optional().describe("Optional 2-letter state abbreviation to filter telemetry by location")
224
241
  }).describe("Request schema for driver rankings by miles driven");
225
- var DriverRankingSchema = import_zod6.z.object({
226
- rank: import_zod6.z.number().int().positive().describe("Rank position based on miles driven"),
227
- driver_id: import_zod6.z.string().uuid().describe("Unique identifier of the driver"),
228
- driver_name: import_zod6.z.string().describe("Name of the driver"),
229
- total_miles: import_zod6.z.number().min(0).describe("Total miles driven in the specified period")
242
+ var DriverRankingSchema = import_zod7.z.object({
243
+ rank: import_zod7.z.number().int().positive().describe("Rank position based on miles driven"),
244
+ driver_id: import_zod7.z.string().uuid().describe("Unique identifier of the driver"),
245
+ driver_name: import_zod7.z.string().describe("Name of the driver"),
246
+ total_miles: import_zod7.z.number().min(0).describe("Total miles driven in the specified period")
230
247
  }).describe("Single driver ranking entry");
231
- var DriverRankingsResponseSchema = import_zod6.z.array(DriverRankingSchema).describe("Array of driver rankings sorted by miles driven in descending order");
248
+ var DriverRankingsResponseSchema = import_zod7.z.array(DriverRankingSchema).describe("Array of driver rankings sorted by miles driven in descending order");
232
249
 
233
250
  // src/schemas/telemetry/state-heatmap.ts
234
- var import_zod7 = require("zod");
235
- var StateHeatmapRequestSchema = import_zod7.z.object({
236
- driver_id: import_zod7.z.string().uuid().describe("Unique identifier of the driver"),
237
- start_date: import_zod7.z.string().describe("Start date for the heatmap period (ISO 8601 format)"),
238
- end_date: import_zod7.z.string().describe("End date for the heatmap period (ISO 8601 format)")
251
+ var import_zod8 = require("zod");
252
+ var StateHeatmapRequestSchema = import_zod8.z.object({
253
+ driver_id: import_zod8.z.string().uuid().describe("Unique identifier of the driver"),
254
+ start_date: import_zod8.z.string().describe("Start date for the heatmap period (ISO 8601 format)"),
255
+ end_date: import_zod8.z.string().describe("End date for the heatmap period (ISO 8601 format)")
239
256
  }).describe("Request schema for driver state heatmap");
240
- var StateHeatmapEntrySchema = import_zod7.z.object({
241
- count: import_zod7.z.number().int().min(0).describe("Number of telemetry points in this state"),
242
- percentage: import_zod7.z.number().min(0).max(100).describe("Percentage of total telemetry points in this state")
257
+ var StateHeatmapEntrySchema = import_zod8.z.object({
258
+ count: import_zod8.z.number().int().min(0).describe("Number of telemetry points in this state"),
259
+ percentage: import_zod8.z.number().min(0).max(100).describe("Percentage of total telemetry points in this state")
243
260
  }).describe("Single state entry in the heatmap");
244
- var StateHeatmapResponseSchema = import_zod7.z.record(
245
- import_zod7.z.string().length(2),
261
+ var StateHeatmapResponseSchema = import_zod8.z.record(
262
+ import_zod8.z.string().length(2),
246
263
  StateHeatmapEntrySchema
247
264
  ).describe("Record of 2-letter state codes to heatmap entries");
248
265
 
249
266
  // src/schemas/telemetry/manual-batch.ts
250
- var import_zod8 = require("zod");
251
- var ManualBatchEntrySchema = import_zod8.z.object({
252
- driver_id: import_zod8.z.string().uuid().describe("Internal UUID of the driver"),
253
- timestamp: import_zod8.z.string().datetime().describe("Timestamp of the GPS reading (ISO 8601 format)"),
254
- location_latitude: import_zod8.z.number().min(-90).max(90).describe("GPS latitude coordinate"),
255
- location_longitude: import_zod8.z.number().min(-180).max(180).describe("GPS longitude coordinate"),
256
- location_address: import_zod8.z.string().optional().describe("Optional human-readable address"),
257
- vehicle_odometer_miles: import_zod8.z.number().min(0).optional().describe("Optional vehicle odometer reading in miles")
267
+ var import_zod9 = require("zod");
268
+ var ManualBatchEntrySchema = import_zod9.z.object({
269
+ driver_id: import_zod9.z.string().uuid().describe("Internal UUID of the driver"),
270
+ timestamp: import_zod9.z.string().datetime().describe("Timestamp of the GPS reading (ISO 8601 format)"),
271
+ location_latitude: import_zod9.z.number().min(-90).max(90).describe("GPS latitude coordinate"),
272
+ location_longitude: import_zod9.z.number().min(-180).max(180).describe("GPS longitude coordinate"),
273
+ location_address: import_zod9.z.string().optional().describe("Optional human-readable address"),
274
+ vehicle_odometer_miles: import_zod9.z.number().min(0).optional().describe("Optional vehicle odometer reading in miles")
258
275
  }).describe("Single manual telemetry entry");
259
- var ManualBatchRequestSchema = import_zod8.z.object({
260
- entries: import_zod8.z.array(ManualBatchEntrySchema).min(1).max(1e3).describe("Array of manual telemetry entries (1-1000)")
276
+ var ManualBatchRequestSchema = import_zod9.z.object({
277
+ entries: import_zod9.z.array(ManualBatchEntrySchema).min(1).max(1e3).describe("Array of manual telemetry entries (1-1000)")
261
278
  }).describe("Request schema for manual batch telemetry insertion");
262
- var ManualBatchTelemetrySchema = import_zod8.z.object({
263
- id: import_zod8.z.number().int().describe("Telemetry record ID"),
264
- driver_id: import_zod8.z.string().uuid().describe("Internal UUID of the driver"),
265
- timestamp: import_zod8.z.union([import_zod8.z.string(), import_zod8.z.date()]).describe("Timestamp of the telemetry reading"),
266
- remaining_drive_time_in_seconds: import_zod8.z.number().min(0),
267
- remaining_shift_time_in_seconds: import_zod8.z.number().min(0),
268
- remaining_cycle_time_in_seconds: import_zod8.z.number().min(0),
269
- remaining_break_time_in_seconds: import_zod8.z.number().min(0),
270
- location_latitude: import_zod8.z.number().min(-90).max(90),
271
- location_longitude: import_zod8.z.number().min(-180).max(180),
272
- previous_location_latitude: import_zod8.z.number().min(-90).max(90).nullable(),
273
- previous_location_longitude: import_zod8.z.number().min(-180).max(180).nullable(),
274
- location_address: import_zod8.z.string().nullable(),
275
- location_state: import_zod8.z.string().length(2).nullable(),
276
- vehicle_odometer_miles: import_zod8.z.number().min(0).nullable(),
277
- source: import_zod8.z.enum(["eld", "manual"])
279
+ var ManualBatchTelemetrySchema = import_zod9.z.object({
280
+ id: import_zod9.z.number().int().describe("Telemetry record ID"),
281
+ driver_id: import_zod9.z.string().uuid().describe("Internal UUID of the driver"),
282
+ timestamp: import_zod9.z.union([import_zod9.z.string(), import_zod9.z.date()]).describe("Timestamp of the telemetry reading"),
283
+ remaining_drive_time_in_seconds: import_zod9.z.number().min(0),
284
+ remaining_shift_time_in_seconds: import_zod9.z.number().min(0),
285
+ remaining_cycle_time_in_seconds: import_zod9.z.number().min(0),
286
+ remaining_break_time_in_seconds: import_zod9.z.number().min(0),
287
+ location_latitude: import_zod9.z.number().min(-90).max(90),
288
+ location_longitude: import_zod9.z.number().min(-180).max(180),
289
+ previous_location_latitude: import_zod9.z.number().min(-90).max(90).nullable(),
290
+ previous_location_longitude: import_zod9.z.number().min(-180).max(180).nullable(),
291
+ location_address: import_zod9.z.string().nullable(),
292
+ location_state: import_zod9.z.string().length(2).nullable(),
293
+ vehicle_odometer_miles: import_zod9.z.number().min(0).nullable(),
294
+ source: import_zod9.z.enum(["eld", "manual"])
278
295
  }).describe("Telemetry record returned from manual batch insertion");
279
- var ManualBatchResponseSchema = import_zod8.z.object({
280
- message: import_zod8.z.string().describe("Success message"),
281
- inserted_count: import_zod8.z.number().int().min(0).describe("Number of telemetry entries inserted"),
282
- telemetry: import_zod8.z.array(ManualBatchTelemetrySchema).describe("Array of inserted telemetry records")
296
+ var ManualBatchResponseSchema = import_zod9.z.object({
297
+ message: import_zod9.z.string().describe("Success message"),
298
+ inserted_count: import_zod9.z.number().int().min(0).describe("Number of telemetry entries inserted"),
299
+ telemetry: import_zod9.z.array(ManualBatchTelemetrySchema).describe("Array of inserted telemetry records")
283
300
  }).describe("Response schema for manual batch telemetry insertion");
284
301
 
285
302
  // src/auth-data.ts
286
- var import_zod9 = require("zod");
287
- var GomotiveAuthDataSchema = import_zod9.z.object({
288
- kind: import_zod9.z.literal("gomotive"),
289
- token: import_zod9.z.string(),
290
- ownerOperator: import_zod9.z.boolean()
303
+ var import_zod10 = require("zod");
304
+ var GomotiveAuthDataSchema = import_zod10.z.object({
305
+ kind: import_zod10.z.literal("gomotive"),
306
+ token: import_zod10.z.string(),
307
+ ownerOperator: import_zod10.z.boolean()
291
308
  });
292
- var VistaAuthDataSchema = import_zod9.z.object({
293
- kind: import_zod9.z.literal("vista"),
294
- driverId: import_zod9.z.string(),
295
- cookie: import_zod9.z.string()
309
+ var VistaAuthDataSchema = import_zod10.z.object({
310
+ kind: import_zod10.z.literal("vista"),
311
+ driverId: import_zod10.z.string(),
312
+ cookie: import_zod10.z.string()
296
313
  });
297
- var MockAuthDataSchema = import_zod9.z.object({
298
- kind: import_zod9.z.literal("mock"),
299
- cookie: import_zod9.z.string()
314
+ var MockAuthDataSchema = import_zod10.z.object({
315
+ kind: import_zod10.z.literal("mock"),
316
+ cookie: import_zod10.z.string()
300
317
  });
301
- var NoneAuthDataSchema = import_zod9.z.object({
302
- kind: import_zod9.z.literal("none")
318
+ var NoneAuthDataSchema = import_zod10.z.object({
319
+ kind: import_zod10.z.literal("none")
303
320
  });
304
- var ProviderAuthDataSchema = import_zod9.z.discriminatedUnion("kind", [
321
+ var ProviderAuthDataSchema = import_zod10.z.discriminatedUnion("kind", [
305
322
  GomotiveAuthDataSchema,
306
323
  VistaAuthDataSchema,
307
324
  MockAuthDataSchema,
308
325
  NoneAuthDataSchema
309
326
  ]);
310
- var LegacyVistaAuthSchema = import_zod9.z.object({
311
- driverId: import_zod9.z.string(),
312
- cookie: import_zod9.z.string()
327
+ var LegacyVistaAuthSchema = import_zod10.z.object({
328
+ driverId: import_zod10.z.string(),
329
+ cookie: import_zod10.z.string()
313
330
  });
314
331
  function serializeAuthData(data) {
315
332
  if (data.kind === "none") {
@@ -345,43 +362,53 @@ function deserializeAuthData(authToken) {
345
362
  }
346
363
 
347
364
  // src/browser-auth.ts
348
- var import_zod10 = require("zod");
349
- var BrowserAuthRequestSchema = import_zod10.z.object({
350
- providerStub: import_zod10.z.string(),
351
- providerUrl: import_zod10.z.string(),
352
- username: import_zod10.z.string(),
353
- encryptedPassword: import_zod10.z.string()
365
+ var import_zod11 = require("zod");
366
+ var CapturedTrafficEntrySchema = import_zod11.z.object({
367
+ method: import_zod11.z.string(),
368
+ url: import_zod11.z.string(),
369
+ status: import_zod11.z.number(),
370
+ responseBody: import_zod11.z.string().optional()
371
+ });
372
+ var BrowserAuthRequestSchema = import_zod11.z.object({
373
+ providerStub: import_zod11.z.string(),
374
+ providerUrl: import_zod11.z.string(),
375
+ username: import_zod11.z.string(),
376
+ encryptedPassword: import_zod11.z.string(),
377
+ captureTraffic: import_zod11.z.boolean().optional()
354
378
  });
355
- var BrowserAuthSuccessSchema = import_zod10.z.object({
356
- success: import_zod10.z.literal(true),
357
- authData: ProviderAuthDataSchema
379
+ var BrowserAuthSuccessSchema = import_zod11.z.object({
380
+ success: import_zod11.z.literal(true),
381
+ authData: ProviderAuthDataSchema,
382
+ capturedTraffic: import_zod11.z.array(CapturedTrafficEntrySchema).optional()
358
383
  });
359
- var BrowserAuthFailureSchema = import_zod10.z.object({
360
- success: import_zod10.z.literal(false),
361
- error: import_zod10.z.string()
384
+ var BrowserAuthFailureSchema = import_zod11.z.object({
385
+ success: import_zod11.z.literal(false),
386
+ error: import_zod11.z.string()
362
387
  });
363
- var BrowserAuthResponseSchema = import_zod10.z.discriminatedUnion("success", [
388
+ var BrowserAuthResponseSchema = import_zod11.z.discriminatedUnion("success", [
364
389
  BrowserAuthSuccessSchema,
365
390
  BrowserAuthFailureSchema
366
391
  ]);
367
- var CrawlPageSchema = import_zod10.z.object({
368
- url: import_zod10.z.string(),
369
- html: import_zod10.z.string()
392
+ var CrawlPageSchema = import_zod11.z.object({
393
+ url: import_zod11.z.string(),
394
+ html: import_zod11.z.string()
370
395
  });
371
- var BrowserCrawlSuccessSchema = import_zod10.z.object({
372
- success: import_zod10.z.literal(true),
373
- pages: import_zod10.z.array(CrawlPageSchema)
396
+ var BrowserCrawlSuccessSchema = import_zod11.z.object({
397
+ success: import_zod11.z.literal(true),
398
+ pages: import_zod11.z.array(CrawlPageSchema)
374
399
  });
375
- var BrowserCrawlFailureSchema = import_zod10.z.object({
376
- success: import_zod10.z.literal(false),
377
- error: import_zod10.z.string()
400
+ var BrowserCrawlFailureSchema = import_zod11.z.object({
401
+ success: import_zod11.z.literal(false),
402
+ error: import_zod11.z.string()
378
403
  });
379
- var BrowserCrawlResponseSchema = import_zod10.z.discriminatedUnion("success", [
404
+ var BrowserCrawlResponseSchema = import_zod11.z.discriminatedUnion("success", [
380
405
  BrowserCrawlSuccessSchema,
381
406
  BrowserCrawlFailureSchema
382
407
  ]);
383
408
  // Annotate the CommonJS export names for ESM import in node:
384
409
  0 && (module.exports = {
410
+ AnonymousDriverErrorResponseSchema,
411
+ AnonymousDriverResponseSchema,
385
412
  BatchConvexUpdate,
386
413
  BatchConvexUpdateSchema,
387
414
  BrowserAuthFailureSchema,
@@ -391,10 +418,12 @@ var BrowserCrawlResponseSchema = import_zod10.z.discriminatedUnion("success", [
391
418
  BrowserCrawlFailureSchema,
392
419
  BrowserCrawlResponseSchema,
393
420
  BrowserCrawlSuccessSchema,
421
+ CapturedTrafficEntrySchema,
394
422
  ConvexDriverSchema,
395
423
  ConvexUpdate,
396
424
  ConvexUpdateSchema,
397
425
  CrawlPageSchema,
426
+ CreateAnonymousDriverBodySchema,
398
427
  DeleteProviderAccountRequestSchema,
399
428
  DeleteProviderAccountResponseSchema,
400
429
  DriverRankingSchema,