@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 +1 -0
- package/dist/browser.d.cts +1 -0
- package/dist/browser.d.ts +1 -0
- package/dist/browser.js +1 -1
- package/dist/{chunk-UWBIQBUR.js → chunk-S53TIE72.js} +1 -0
- package/dist/index.cjs +142 -113
- package/dist/index.d.cts +251 -209
- package/dist/index.d.ts +251 -209
- package/dist/index.js +122 -98
- package/package.json +1 -1
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";
|
package/dist/browser.d.cts
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.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
|
@@ -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/
|
|
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 =
|
|
189
|
-
status:
|
|
190
|
-
correctPassword:
|
|
191
|
-
externalProviderAccountId:
|
|
192
|
-
username:
|
|
193
|
-
provider_url:
|
|
194
|
-
driverCount:
|
|
195
|
-
providerSlug:
|
|
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
|
|
200
|
-
var ValidatePasswordRequestSchema =
|
|
201
|
-
providerAccountId:
|
|
202
|
-
encryptedPassword:
|
|
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 =
|
|
205
|
-
isValid:
|
|
206
|
-
driverIds:
|
|
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
|
|
211
|
-
var DeleteProviderAccountRequestSchema =
|
|
212
|
-
providerAccountId:
|
|
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 =
|
|
215
|
-
success:
|
|
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
|
|
220
|
-
var DriverRankingsRequestSchema =
|
|
221
|
-
start_date:
|
|
222
|
-
end_date:
|
|
223
|
-
state:
|
|
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 =
|
|
226
|
-
rank:
|
|
227
|
-
driver_id:
|
|
228
|
-
driver_name:
|
|
229
|
-
total_miles:
|
|
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 =
|
|
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
|
|
235
|
-
var StateHeatmapRequestSchema =
|
|
236
|
-
driver_id:
|
|
237
|
-
start_date:
|
|
238
|
-
end_date:
|
|
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 =
|
|
241
|
-
count:
|
|
242
|
-
percentage:
|
|
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 =
|
|
245
|
-
|
|
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
|
|
251
|
-
var ManualBatchEntrySchema =
|
|
252
|
-
driver_id:
|
|
253
|
-
timestamp:
|
|
254
|
-
location_latitude:
|
|
255
|
-
location_longitude:
|
|
256
|
-
location_address:
|
|
257
|
-
vehicle_odometer_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 =
|
|
260
|
-
entries:
|
|
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 =
|
|
263
|
-
id:
|
|
264
|
-
driver_id:
|
|
265
|
-
timestamp:
|
|
266
|
-
remaining_drive_time_in_seconds:
|
|
267
|
-
remaining_shift_time_in_seconds:
|
|
268
|
-
remaining_cycle_time_in_seconds:
|
|
269
|
-
remaining_break_time_in_seconds:
|
|
270
|
-
location_latitude:
|
|
271
|
-
location_longitude:
|
|
272
|
-
previous_location_latitude:
|
|
273
|
-
previous_location_longitude:
|
|
274
|
-
location_address:
|
|
275
|
-
location_state:
|
|
276
|
-
vehicle_odometer_miles:
|
|
277
|
-
source:
|
|
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 =
|
|
280
|
-
message:
|
|
281
|
-
inserted_count:
|
|
282
|
-
telemetry:
|
|
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
|
|
287
|
-
var GomotiveAuthDataSchema =
|
|
288
|
-
kind:
|
|
289
|
-
token:
|
|
290
|
-
ownerOperator:
|
|
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 =
|
|
293
|
-
kind:
|
|
294
|
-
driverId:
|
|
295
|
-
cookie:
|
|
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 =
|
|
298
|
-
kind:
|
|
299
|
-
cookie:
|
|
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 =
|
|
302
|
-
kind:
|
|
318
|
+
var NoneAuthDataSchema = import_zod10.z.object({
|
|
319
|
+
kind: import_zod10.z.literal("none")
|
|
303
320
|
});
|
|
304
|
-
var ProviderAuthDataSchema =
|
|
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 =
|
|
311
|
-
driverId:
|
|
312
|
-
cookie:
|
|
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
|
|
349
|
-
var
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
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 =
|
|
356
|
-
success:
|
|
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 =
|
|
360
|
-
success:
|
|
361
|
-
error:
|
|
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 =
|
|
388
|
+
var BrowserAuthResponseSchema = import_zod11.z.discriminatedUnion("success", [
|
|
364
389
|
BrowserAuthSuccessSchema,
|
|
365
390
|
BrowserAuthFailureSchema
|
|
366
391
|
]);
|
|
367
|
-
var CrawlPageSchema =
|
|
368
|
-
url:
|
|
369
|
-
html:
|
|
392
|
+
var CrawlPageSchema = import_zod11.z.object({
|
|
393
|
+
url: import_zod11.z.string(),
|
|
394
|
+
html: import_zod11.z.string()
|
|
370
395
|
});
|
|
371
|
-
var BrowserCrawlSuccessSchema =
|
|
372
|
-
success:
|
|
373
|
-
pages:
|
|
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 =
|
|
376
|
-
success:
|
|
377
|
-
error:
|
|
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 =
|
|
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,
|