@findatruck/shared-schemas 2.0.1 → 2.2.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.
@@ -0,0 +1,162 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/browser.ts
31
+ var browser_exports = {};
32
+ __export(browser_exports, {
33
+ ConvexUpdate: () => ConvexUpdate,
34
+ NewLoginRequest: () => NewLoginRequest,
35
+ NewLoginResponse: () => NewLoginResponse,
36
+ NewLoginResponseFailure: () => NewLoginResponseFailure,
37
+ NewLoginResponseSuccess: () => NewLoginResponseSuccess,
38
+ ScrapeStatus: () => ScrapeStatus,
39
+ UpdateScrapeStatusMessage: () => UpdateScrapeStatusMessage,
40
+ ValidatePasswordRequestSchema: () => ValidatePasswordRequestSchema,
41
+ ValidatePasswordResponseSchema: () => ValidatePasswordResponseSchema
42
+ });
43
+ module.exports = __toCommonJS(browser_exports);
44
+
45
+ // src/schemas/providerAccounts/new-login.ts
46
+ var import_zod = require("zod");
47
+ var UrlSchema = import_zod.z.string().refine(
48
+ (val) => {
49
+ try {
50
+ new URL(val);
51
+ return true;
52
+ } catch {
53
+ return false;
54
+ }
55
+ },
56
+ { message: "Invalid URL" }
57
+ );
58
+ var NewLoginRequest = import_zod.z.object({
59
+ providerUrl: UrlSchema,
60
+ username: import_zod.z.string().min(1),
61
+ encryptedPassword: import_zod.z.string().min(1),
62
+ ownerId: import_zod.z.string(),
63
+ externalProviderAccountId: import_zod.z.string()
64
+ });
65
+ var PublicUser = import_zod.z.object({
66
+ id: import_zod.z.string(),
67
+ username: import_zod.z.string(),
68
+ created_at: import_zod.z.coerce.date(),
69
+ updated_at: import_zod.z.coerce.date()
70
+ });
71
+ var PublicProvider = import_zod.z.object({
72
+ name: import_zod.z.string(),
73
+ url: UrlSchema
74
+ });
75
+ var NewLoginResponseSuccess = import_zod.z.object({
76
+ message: import_zod.z.string(),
77
+ user: PublicUser,
78
+ provider: PublicProvider,
79
+ driverIds: import_zod.z.array(import_zod.z.string()).describe("An array of driver IDs associated with the login"),
80
+ organizationId: import_zod.z.string().optional(),
81
+ honkUserId: import_zod.z.string().optional()
82
+ });
83
+ var NewLoginResponseFailure = import_zod.z.object({
84
+ error: import_zod.z.string()
85
+ });
86
+ var NewLoginResponse = import_zod.z.union([NewLoginResponseSuccess, NewLoginResponseFailure]);
87
+
88
+ // src/schemas/drivers/convex-update.ts
89
+ var import_zod2 = __toESM(require("zod"), 1);
90
+ var UrlSchema2 = import_zod2.default.string().refine(
91
+ (val) => {
92
+ try {
93
+ new URL(val);
94
+ return true;
95
+ } catch {
96
+ return false;
97
+ }
98
+ },
99
+ { message: "Invalid URL" }
100
+ );
101
+ var ConvexUpdate = import_zod2.default.object({
102
+ provider_url: UrlSchema2.describe("The URL of the ELD provider"),
103
+ username: import_zod2.default.string().describe("The driver's login username"),
104
+ driver_name: import_zod2.default.string().optional().describe("The driver's full name"),
105
+ vehicle_id: import_zod2.default.string().optional().describe("The vehicle ID"),
106
+ driver_status: import_zod2.default.string().describe("The driver's duty status (direct from ELD)"),
107
+ time_remaining_in_shift: import_zod2.default.number().describe("Seconds remaining in current shift"),
108
+ time_remaining_till_break: import_zod2.default.number().describe("Seconds remaining until next required break"),
109
+ time_remaining_in_week: import_zod2.default.number().describe("Seconds remaining in current cycle/week"),
110
+ time_remaining_in_drive: import_zod2.default.number().describe("Seconds remaining in current drive period"),
111
+ driver_current_location_latitude: import_zod2.default.number().describe("Driver's current latitude"),
112
+ driver_current_location_longitude: import_zod2.default.number().describe("Driver's current longitude"),
113
+ driver_current_location_address: import_zod2.default.string().describe("Driver's current address"),
114
+ license_number: import_zod2.default.string().optional().describe("The driver's license number"),
115
+ license_state: import_zod2.default.string().optional().describe("The state that issued the driver's license"),
116
+ speed: import_zod2.default.number().optional().describe("The vehicle's current speed in mph"),
117
+ odometer: import_zod2.default.number().optional().describe("The vehicle's current odometer reading in miles"),
118
+ convex_provider_account_id: import_zod2.default.string().describe("The Convex ELD provider account ID"),
119
+ external_provider_account_id: import_zod2.default.string().describe("The provider account ID on backend")
120
+ }).describe("Schema for updating driver ELD status information");
121
+
122
+ // src/schemas/providerAccounts/update-status.ts
123
+ var import_zod3 = __toESM(require("zod"), 1);
124
+ var ScrapeStatus = /* @__PURE__ */ ((ScrapeStatus2) => {
125
+ ScrapeStatus2["NEW_LOGIN_RECEIVED"] = "NEW_LOGIN_RECEIVED";
126
+ ScrapeStatus2["LOGIN_IN_PROGRESS"] = "LOGIN_IN_PROGRESS";
127
+ ScrapeStatus2["LOGIN_SUCCESS"] = "LOGIN_SUCCESS";
128
+ ScrapeStatus2["LOGIN_FAILED"] = "LOGIN_FAILED";
129
+ ScrapeStatus2["DATA_FETCH_IN_PROGRESS"] = "DATA_FETCH_IN_PROGRESS";
130
+ ScrapeStatus2["DATA_FETCH_SUCCESS"] = "DATA_FETCH_SUCCESS";
131
+ ScrapeStatus2["DATA_FETCH_FAILED"] = "DATA_FETCH_FAILED";
132
+ return ScrapeStatus2;
133
+ })(ScrapeStatus || {});
134
+ var UpdateScrapeStatusMessage = import_zod3.default.object({
135
+ status: import_zod3.default.nativeEnum(ScrapeStatus).describe("The current status of the scrape process"),
136
+ externalProviderAccountId: import_zod3.default.string().describe("The external identifier for the provider account"),
137
+ username: import_zod3.default.string().describe("The username of the provider account whose status is being updated"),
138
+ provider_url: import_zod3.default.string().describe("The URL of the ELD provider")
139
+ }).describe("Schema for update status messages");
140
+
141
+ // src/schemas/providerAccounts/validate-password.ts
142
+ var import_zod4 = require("zod");
143
+ var ValidatePasswordRequestSchema = import_zod4.z.object({
144
+ providerAccountId: import_zod4.z.string().min(1).describe("The unique identifier of the provider account in postgres to validate the password for"),
145
+ encryptedPassword: import_zod4.z.string().min(1).describe("The encrypted password to validate against the stored password")
146
+ }).describe("Request schema for validating a provider account password");
147
+ var ValidatePasswordResponseSchema = import_zod4.z.object({
148
+ isValid: import_zod4.z.boolean().describe("Indicates if the provided password is valid"),
149
+ driverIds: import_zod4.z.array(import_zod4.z.string()).describe("List of driver IDs associated with the provider account")
150
+ }).describe("Response schema for password validation");
151
+ // Annotate the CommonJS export names for ESM import in node:
152
+ 0 && (module.exports = {
153
+ ConvexUpdate,
154
+ NewLoginRequest,
155
+ NewLoginResponse,
156
+ NewLoginResponseFailure,
157
+ NewLoginResponseSuccess,
158
+ ScrapeStatus,
159
+ UpdateScrapeStatusMessage,
160
+ ValidatePasswordRequestSchema,
161
+ ValidatePasswordResponseSchema
162
+ });
@@ -0,0 +1,274 @@
1
+ import z$1, { z } from 'zod';
2
+
3
+ declare const NewLoginRequest: z.ZodObject<{
4
+ providerUrl: z.ZodEffects<z.ZodString, string, string>;
5
+ username: z.ZodString;
6
+ encryptedPassword: z.ZodString;
7
+ ownerId: z.ZodString;
8
+ externalProviderAccountId: z.ZodString;
9
+ }, "strip", z.ZodTypeAny, {
10
+ providerUrl: string;
11
+ username: string;
12
+ encryptedPassword: string;
13
+ ownerId: string;
14
+ externalProviderAccountId: string;
15
+ }, {
16
+ providerUrl: string;
17
+ username: string;
18
+ encryptedPassword: string;
19
+ ownerId: string;
20
+ externalProviderAccountId: string;
21
+ }>;
22
+ type NewLoginRequest = z.infer<typeof NewLoginRequest>;
23
+ declare const NewLoginResponseSuccess: z.ZodObject<{
24
+ message: z.ZodString;
25
+ user: z.ZodObject<{
26
+ id: z.ZodString;
27
+ username: z.ZodString;
28
+ created_at: z.ZodDate;
29
+ updated_at: z.ZodDate;
30
+ }, "strip", z.ZodTypeAny, {
31
+ username: string;
32
+ id: string;
33
+ created_at: Date;
34
+ updated_at: Date;
35
+ }, {
36
+ username: string;
37
+ id: string;
38
+ created_at: Date;
39
+ updated_at: Date;
40
+ }>;
41
+ provider: z.ZodObject<{
42
+ name: z.ZodString;
43
+ url: z.ZodEffects<z.ZodString, string, string>;
44
+ }, "strip", z.ZodTypeAny, {
45
+ name: string;
46
+ url: string;
47
+ }, {
48
+ name: string;
49
+ url: string;
50
+ }>;
51
+ driverIds: z.ZodArray<z.ZodString, "many">;
52
+ organizationId: z.ZodOptional<z.ZodString>;
53
+ honkUserId: z.ZodOptional<z.ZodString>;
54
+ }, "strip", z.ZodTypeAny, {
55
+ message: string;
56
+ user: {
57
+ username: string;
58
+ id: string;
59
+ created_at: Date;
60
+ updated_at: Date;
61
+ };
62
+ provider: {
63
+ name: string;
64
+ url: string;
65
+ };
66
+ driverIds: string[];
67
+ organizationId?: string | undefined;
68
+ honkUserId?: string | undefined;
69
+ }, {
70
+ message: string;
71
+ user: {
72
+ username: string;
73
+ id: string;
74
+ created_at: Date;
75
+ updated_at: Date;
76
+ };
77
+ provider: {
78
+ name: string;
79
+ url: string;
80
+ };
81
+ driverIds: string[];
82
+ organizationId?: string | undefined;
83
+ honkUserId?: string | undefined;
84
+ }>;
85
+ type NewLoginResponseSuccess = z.infer<typeof NewLoginResponseSuccess>;
86
+ declare const NewLoginResponseFailure: z.ZodObject<{
87
+ error: z.ZodString;
88
+ }, "strip", z.ZodTypeAny, {
89
+ error: string;
90
+ }, {
91
+ error: string;
92
+ }>;
93
+ type NewLoginResponseFailure = z.infer<typeof NewLoginResponseFailure>;
94
+ declare const NewLoginResponse: z.ZodUnion<[z.ZodObject<{
95
+ message: z.ZodString;
96
+ user: z.ZodObject<{
97
+ id: z.ZodString;
98
+ username: z.ZodString;
99
+ created_at: z.ZodDate;
100
+ updated_at: z.ZodDate;
101
+ }, "strip", z.ZodTypeAny, {
102
+ username: string;
103
+ id: string;
104
+ created_at: Date;
105
+ updated_at: Date;
106
+ }, {
107
+ username: string;
108
+ id: string;
109
+ created_at: Date;
110
+ updated_at: Date;
111
+ }>;
112
+ provider: z.ZodObject<{
113
+ name: z.ZodString;
114
+ url: z.ZodEffects<z.ZodString, string, string>;
115
+ }, "strip", z.ZodTypeAny, {
116
+ name: string;
117
+ url: string;
118
+ }, {
119
+ name: string;
120
+ url: string;
121
+ }>;
122
+ driverIds: z.ZodArray<z.ZodString, "many">;
123
+ organizationId: z.ZodOptional<z.ZodString>;
124
+ honkUserId: z.ZodOptional<z.ZodString>;
125
+ }, "strip", z.ZodTypeAny, {
126
+ message: string;
127
+ user: {
128
+ username: string;
129
+ id: string;
130
+ created_at: Date;
131
+ updated_at: Date;
132
+ };
133
+ provider: {
134
+ name: string;
135
+ url: string;
136
+ };
137
+ driverIds: string[];
138
+ organizationId?: string | undefined;
139
+ honkUserId?: string | undefined;
140
+ }, {
141
+ message: string;
142
+ user: {
143
+ username: string;
144
+ id: string;
145
+ created_at: Date;
146
+ updated_at: Date;
147
+ };
148
+ provider: {
149
+ name: string;
150
+ url: string;
151
+ };
152
+ driverIds: string[];
153
+ organizationId?: string | undefined;
154
+ honkUserId?: string | undefined;
155
+ }>, z.ZodObject<{
156
+ error: z.ZodString;
157
+ }, "strip", z.ZodTypeAny, {
158
+ error: string;
159
+ }, {
160
+ error: string;
161
+ }>]>;
162
+ type NewLoginResponse = z.infer<typeof NewLoginResponse>;
163
+
164
+ declare const ConvexUpdate: z$1.ZodObject<{
165
+ provider_url: z$1.ZodEffects<z$1.ZodString, string, string>;
166
+ username: z$1.ZodString;
167
+ driver_name: z$1.ZodOptional<z$1.ZodString>;
168
+ vehicle_id: z$1.ZodOptional<z$1.ZodString>;
169
+ driver_status: z$1.ZodString;
170
+ time_remaining_in_shift: z$1.ZodNumber;
171
+ time_remaining_till_break: z$1.ZodNumber;
172
+ time_remaining_in_week: z$1.ZodNumber;
173
+ time_remaining_in_drive: z$1.ZodNumber;
174
+ driver_current_location_latitude: z$1.ZodNumber;
175
+ driver_current_location_longitude: z$1.ZodNumber;
176
+ driver_current_location_address: z$1.ZodString;
177
+ license_number: z$1.ZodOptional<z$1.ZodString>;
178
+ license_state: z$1.ZodOptional<z$1.ZodString>;
179
+ speed: z$1.ZodOptional<z$1.ZodNumber>;
180
+ odometer: z$1.ZodOptional<z$1.ZodNumber>;
181
+ convex_provider_account_id: z$1.ZodString;
182
+ external_provider_account_id: z$1.ZodString;
183
+ }, "strip", z$1.ZodTypeAny, {
184
+ username: string;
185
+ provider_url: string;
186
+ driver_status: string;
187
+ time_remaining_in_shift: number;
188
+ time_remaining_till_break: number;
189
+ time_remaining_in_week: number;
190
+ time_remaining_in_drive: number;
191
+ driver_current_location_latitude: number;
192
+ driver_current_location_longitude: number;
193
+ driver_current_location_address: string;
194
+ convex_provider_account_id: string;
195
+ external_provider_account_id: string;
196
+ driver_name?: string | undefined;
197
+ vehicle_id?: string | undefined;
198
+ license_number?: string | undefined;
199
+ license_state?: string | undefined;
200
+ speed?: number | undefined;
201
+ odometer?: number | undefined;
202
+ }, {
203
+ username: string;
204
+ provider_url: string;
205
+ driver_status: string;
206
+ time_remaining_in_shift: number;
207
+ time_remaining_till_break: number;
208
+ time_remaining_in_week: number;
209
+ time_remaining_in_drive: number;
210
+ driver_current_location_latitude: number;
211
+ driver_current_location_longitude: number;
212
+ driver_current_location_address: string;
213
+ convex_provider_account_id: string;
214
+ external_provider_account_id: string;
215
+ driver_name?: string | undefined;
216
+ vehicle_id?: string | undefined;
217
+ license_number?: string | undefined;
218
+ license_state?: string | undefined;
219
+ speed?: number | undefined;
220
+ odometer?: number | undefined;
221
+ }>;
222
+ type ConvexUpdate = z$1.infer<typeof ConvexUpdate>;
223
+
224
+ declare enum ScrapeStatus {
225
+ NEW_LOGIN_RECEIVED = "NEW_LOGIN_RECEIVED",
226
+ LOGIN_IN_PROGRESS = "LOGIN_IN_PROGRESS",
227
+ LOGIN_SUCCESS = "LOGIN_SUCCESS",
228
+ LOGIN_FAILED = "LOGIN_FAILED",
229
+ DATA_FETCH_IN_PROGRESS = "DATA_FETCH_IN_PROGRESS",
230
+ DATA_FETCH_SUCCESS = "DATA_FETCH_SUCCESS",
231
+ DATA_FETCH_FAILED = "DATA_FETCH_FAILED"
232
+ }
233
+ declare const UpdateScrapeStatusMessage: z$1.ZodObject<{
234
+ status: z$1.ZodNativeEnum<typeof ScrapeStatus>;
235
+ externalProviderAccountId: z$1.ZodString;
236
+ username: z$1.ZodString;
237
+ provider_url: z$1.ZodString;
238
+ }, "strip", z$1.ZodTypeAny, {
239
+ username: string;
240
+ externalProviderAccountId: string;
241
+ status: ScrapeStatus;
242
+ provider_url: string;
243
+ }, {
244
+ username: string;
245
+ externalProviderAccountId: string;
246
+ status: ScrapeStatus;
247
+ provider_url: string;
248
+ }>;
249
+ type UpdateScrapeStatusMessage = z$1.infer<typeof UpdateScrapeStatusMessage>;
250
+
251
+ declare const ValidatePasswordRequestSchema: z.ZodObject<{
252
+ providerAccountId: z.ZodString;
253
+ encryptedPassword: z.ZodString;
254
+ }, "strip", z.ZodTypeAny, {
255
+ encryptedPassword: string;
256
+ providerAccountId: string;
257
+ }, {
258
+ encryptedPassword: string;
259
+ providerAccountId: string;
260
+ }>;
261
+ type ValidatePasswordRequest = z.infer<typeof ValidatePasswordRequestSchema>;
262
+ declare const ValidatePasswordResponseSchema: z.ZodObject<{
263
+ isValid: z.ZodBoolean;
264
+ driverIds: z.ZodArray<z.ZodString, "many">;
265
+ }, "strip", z.ZodTypeAny, {
266
+ driverIds: string[];
267
+ isValid: boolean;
268
+ }, {
269
+ driverIds: string[];
270
+ isValid: boolean;
271
+ }>;
272
+ type ValidatePasswordResponse = z.infer<typeof ValidatePasswordResponseSchema>;
273
+
274
+ export { ConvexUpdate, NewLoginRequest, NewLoginResponse, NewLoginResponseFailure, NewLoginResponseSuccess, ScrapeStatus, UpdateScrapeStatusMessage, type ValidatePasswordRequest, ValidatePasswordRequestSchema, type ValidatePasswordResponse, ValidatePasswordResponseSchema };
@@ -0,0 +1,274 @@
1
+ import z$1, { z } from 'zod';
2
+
3
+ declare const NewLoginRequest: z.ZodObject<{
4
+ providerUrl: z.ZodEffects<z.ZodString, string, string>;
5
+ username: z.ZodString;
6
+ encryptedPassword: z.ZodString;
7
+ ownerId: z.ZodString;
8
+ externalProviderAccountId: z.ZodString;
9
+ }, "strip", z.ZodTypeAny, {
10
+ providerUrl: string;
11
+ username: string;
12
+ encryptedPassword: string;
13
+ ownerId: string;
14
+ externalProviderAccountId: string;
15
+ }, {
16
+ providerUrl: string;
17
+ username: string;
18
+ encryptedPassword: string;
19
+ ownerId: string;
20
+ externalProviderAccountId: string;
21
+ }>;
22
+ type NewLoginRequest = z.infer<typeof NewLoginRequest>;
23
+ declare const NewLoginResponseSuccess: z.ZodObject<{
24
+ message: z.ZodString;
25
+ user: z.ZodObject<{
26
+ id: z.ZodString;
27
+ username: z.ZodString;
28
+ created_at: z.ZodDate;
29
+ updated_at: z.ZodDate;
30
+ }, "strip", z.ZodTypeAny, {
31
+ username: string;
32
+ id: string;
33
+ created_at: Date;
34
+ updated_at: Date;
35
+ }, {
36
+ username: string;
37
+ id: string;
38
+ created_at: Date;
39
+ updated_at: Date;
40
+ }>;
41
+ provider: z.ZodObject<{
42
+ name: z.ZodString;
43
+ url: z.ZodEffects<z.ZodString, string, string>;
44
+ }, "strip", z.ZodTypeAny, {
45
+ name: string;
46
+ url: string;
47
+ }, {
48
+ name: string;
49
+ url: string;
50
+ }>;
51
+ driverIds: z.ZodArray<z.ZodString, "many">;
52
+ organizationId: z.ZodOptional<z.ZodString>;
53
+ honkUserId: z.ZodOptional<z.ZodString>;
54
+ }, "strip", z.ZodTypeAny, {
55
+ message: string;
56
+ user: {
57
+ username: string;
58
+ id: string;
59
+ created_at: Date;
60
+ updated_at: Date;
61
+ };
62
+ provider: {
63
+ name: string;
64
+ url: string;
65
+ };
66
+ driverIds: string[];
67
+ organizationId?: string | undefined;
68
+ honkUserId?: string | undefined;
69
+ }, {
70
+ message: string;
71
+ user: {
72
+ username: string;
73
+ id: string;
74
+ created_at: Date;
75
+ updated_at: Date;
76
+ };
77
+ provider: {
78
+ name: string;
79
+ url: string;
80
+ };
81
+ driverIds: string[];
82
+ organizationId?: string | undefined;
83
+ honkUserId?: string | undefined;
84
+ }>;
85
+ type NewLoginResponseSuccess = z.infer<typeof NewLoginResponseSuccess>;
86
+ declare const NewLoginResponseFailure: z.ZodObject<{
87
+ error: z.ZodString;
88
+ }, "strip", z.ZodTypeAny, {
89
+ error: string;
90
+ }, {
91
+ error: string;
92
+ }>;
93
+ type NewLoginResponseFailure = z.infer<typeof NewLoginResponseFailure>;
94
+ declare const NewLoginResponse: z.ZodUnion<[z.ZodObject<{
95
+ message: z.ZodString;
96
+ user: z.ZodObject<{
97
+ id: z.ZodString;
98
+ username: z.ZodString;
99
+ created_at: z.ZodDate;
100
+ updated_at: z.ZodDate;
101
+ }, "strip", z.ZodTypeAny, {
102
+ username: string;
103
+ id: string;
104
+ created_at: Date;
105
+ updated_at: Date;
106
+ }, {
107
+ username: string;
108
+ id: string;
109
+ created_at: Date;
110
+ updated_at: Date;
111
+ }>;
112
+ provider: z.ZodObject<{
113
+ name: z.ZodString;
114
+ url: z.ZodEffects<z.ZodString, string, string>;
115
+ }, "strip", z.ZodTypeAny, {
116
+ name: string;
117
+ url: string;
118
+ }, {
119
+ name: string;
120
+ url: string;
121
+ }>;
122
+ driverIds: z.ZodArray<z.ZodString, "many">;
123
+ organizationId: z.ZodOptional<z.ZodString>;
124
+ honkUserId: z.ZodOptional<z.ZodString>;
125
+ }, "strip", z.ZodTypeAny, {
126
+ message: string;
127
+ user: {
128
+ username: string;
129
+ id: string;
130
+ created_at: Date;
131
+ updated_at: Date;
132
+ };
133
+ provider: {
134
+ name: string;
135
+ url: string;
136
+ };
137
+ driverIds: string[];
138
+ organizationId?: string | undefined;
139
+ honkUserId?: string | undefined;
140
+ }, {
141
+ message: string;
142
+ user: {
143
+ username: string;
144
+ id: string;
145
+ created_at: Date;
146
+ updated_at: Date;
147
+ };
148
+ provider: {
149
+ name: string;
150
+ url: string;
151
+ };
152
+ driverIds: string[];
153
+ organizationId?: string | undefined;
154
+ honkUserId?: string | undefined;
155
+ }>, z.ZodObject<{
156
+ error: z.ZodString;
157
+ }, "strip", z.ZodTypeAny, {
158
+ error: string;
159
+ }, {
160
+ error: string;
161
+ }>]>;
162
+ type NewLoginResponse = z.infer<typeof NewLoginResponse>;
163
+
164
+ declare const ConvexUpdate: z$1.ZodObject<{
165
+ provider_url: z$1.ZodEffects<z$1.ZodString, string, string>;
166
+ username: z$1.ZodString;
167
+ driver_name: z$1.ZodOptional<z$1.ZodString>;
168
+ vehicle_id: z$1.ZodOptional<z$1.ZodString>;
169
+ driver_status: z$1.ZodString;
170
+ time_remaining_in_shift: z$1.ZodNumber;
171
+ time_remaining_till_break: z$1.ZodNumber;
172
+ time_remaining_in_week: z$1.ZodNumber;
173
+ time_remaining_in_drive: z$1.ZodNumber;
174
+ driver_current_location_latitude: z$1.ZodNumber;
175
+ driver_current_location_longitude: z$1.ZodNumber;
176
+ driver_current_location_address: z$1.ZodString;
177
+ license_number: z$1.ZodOptional<z$1.ZodString>;
178
+ license_state: z$1.ZodOptional<z$1.ZodString>;
179
+ speed: z$1.ZodOptional<z$1.ZodNumber>;
180
+ odometer: z$1.ZodOptional<z$1.ZodNumber>;
181
+ convex_provider_account_id: z$1.ZodString;
182
+ external_provider_account_id: z$1.ZodString;
183
+ }, "strip", z$1.ZodTypeAny, {
184
+ username: string;
185
+ provider_url: string;
186
+ driver_status: string;
187
+ time_remaining_in_shift: number;
188
+ time_remaining_till_break: number;
189
+ time_remaining_in_week: number;
190
+ time_remaining_in_drive: number;
191
+ driver_current_location_latitude: number;
192
+ driver_current_location_longitude: number;
193
+ driver_current_location_address: string;
194
+ convex_provider_account_id: string;
195
+ external_provider_account_id: string;
196
+ driver_name?: string | undefined;
197
+ vehicle_id?: string | undefined;
198
+ license_number?: string | undefined;
199
+ license_state?: string | undefined;
200
+ speed?: number | undefined;
201
+ odometer?: number | undefined;
202
+ }, {
203
+ username: string;
204
+ provider_url: string;
205
+ driver_status: string;
206
+ time_remaining_in_shift: number;
207
+ time_remaining_till_break: number;
208
+ time_remaining_in_week: number;
209
+ time_remaining_in_drive: number;
210
+ driver_current_location_latitude: number;
211
+ driver_current_location_longitude: number;
212
+ driver_current_location_address: string;
213
+ convex_provider_account_id: string;
214
+ external_provider_account_id: string;
215
+ driver_name?: string | undefined;
216
+ vehicle_id?: string | undefined;
217
+ license_number?: string | undefined;
218
+ license_state?: string | undefined;
219
+ speed?: number | undefined;
220
+ odometer?: number | undefined;
221
+ }>;
222
+ type ConvexUpdate = z$1.infer<typeof ConvexUpdate>;
223
+
224
+ declare enum ScrapeStatus {
225
+ NEW_LOGIN_RECEIVED = "NEW_LOGIN_RECEIVED",
226
+ LOGIN_IN_PROGRESS = "LOGIN_IN_PROGRESS",
227
+ LOGIN_SUCCESS = "LOGIN_SUCCESS",
228
+ LOGIN_FAILED = "LOGIN_FAILED",
229
+ DATA_FETCH_IN_PROGRESS = "DATA_FETCH_IN_PROGRESS",
230
+ DATA_FETCH_SUCCESS = "DATA_FETCH_SUCCESS",
231
+ DATA_FETCH_FAILED = "DATA_FETCH_FAILED"
232
+ }
233
+ declare const UpdateScrapeStatusMessage: z$1.ZodObject<{
234
+ status: z$1.ZodNativeEnum<typeof ScrapeStatus>;
235
+ externalProviderAccountId: z$1.ZodString;
236
+ username: z$1.ZodString;
237
+ provider_url: z$1.ZodString;
238
+ }, "strip", z$1.ZodTypeAny, {
239
+ username: string;
240
+ externalProviderAccountId: string;
241
+ status: ScrapeStatus;
242
+ provider_url: string;
243
+ }, {
244
+ username: string;
245
+ externalProviderAccountId: string;
246
+ status: ScrapeStatus;
247
+ provider_url: string;
248
+ }>;
249
+ type UpdateScrapeStatusMessage = z$1.infer<typeof UpdateScrapeStatusMessage>;
250
+
251
+ declare const ValidatePasswordRequestSchema: z.ZodObject<{
252
+ providerAccountId: z.ZodString;
253
+ encryptedPassword: z.ZodString;
254
+ }, "strip", z.ZodTypeAny, {
255
+ encryptedPassword: string;
256
+ providerAccountId: string;
257
+ }, {
258
+ encryptedPassword: string;
259
+ providerAccountId: string;
260
+ }>;
261
+ type ValidatePasswordRequest = z.infer<typeof ValidatePasswordRequestSchema>;
262
+ declare const ValidatePasswordResponseSchema: z.ZodObject<{
263
+ isValid: z.ZodBoolean;
264
+ driverIds: z.ZodArray<z.ZodString, "many">;
265
+ }, "strip", z.ZodTypeAny, {
266
+ driverIds: string[];
267
+ isValid: boolean;
268
+ }, {
269
+ driverIds: string[];
270
+ isValid: boolean;
271
+ }>;
272
+ type ValidatePasswordResponse = z.infer<typeof ValidatePasswordResponseSchema>;
273
+
274
+ export { ConvexUpdate, NewLoginRequest, NewLoginResponse, NewLoginResponseFailure, NewLoginResponseSuccess, ScrapeStatus, UpdateScrapeStatusMessage, type ValidatePasswordRequest, ValidatePasswordRequestSchema, type ValidatePasswordResponse, ValidatePasswordResponseSchema };