@findatruck/shared-schemas 2.7.0 → 2.9.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 +56 -32
- package/dist/browser.d.cts +234 -403
- package/dist/browser.d.ts +234 -403
- package/dist/browser.js +15 -1
- package/dist/{chunk-5AS6K3Q5.js → chunk-CUV2KQXS.js} +49 -32
- package/dist/index.cjs +56 -32
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +15 -1
- package/package.json +1 -1
package/dist/browser.cjs
CHANGED
|
@@ -31,11 +31,18 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var browser_exports = {};
|
|
32
32
|
__export(browser_exports, {
|
|
33
33
|
BatchConvexUpdate: () => BatchConvexUpdate,
|
|
34
|
+
BatchConvexUpdateSchema: () => BatchConvexUpdateSchema,
|
|
35
|
+
ConvexDriverSchema: () => ConvexDriverSchema,
|
|
34
36
|
ConvexUpdate: () => ConvexUpdate,
|
|
37
|
+
ConvexUpdateSchema: () => ConvexUpdateSchema,
|
|
35
38
|
NewLoginRequest: () => NewLoginRequest,
|
|
39
|
+
NewLoginRequestSchema: () => NewLoginRequestSchema,
|
|
36
40
|
NewLoginResponse: () => NewLoginResponse,
|
|
37
41
|
NewLoginResponseFailure: () => NewLoginResponseFailure,
|
|
42
|
+
NewLoginResponseFailureSchema: () => NewLoginResponseFailureSchema,
|
|
43
|
+
NewLoginResponseSchema: () => NewLoginResponseSchema,
|
|
38
44
|
NewLoginResponseSuccess: () => NewLoginResponseSuccess,
|
|
45
|
+
NewLoginResponseSuccessSchema: () => NewLoginResponseSuccessSchema,
|
|
39
46
|
ScrapeStatus: () => ScrapeStatus,
|
|
40
47
|
UpdateScrapeStatusMessage: () => UpdateScrapeStatusMessage,
|
|
41
48
|
ValidatePasswordRequestSchema: () => ValidatePasswordRequestSchema,
|
|
@@ -56,35 +63,42 @@ var UrlSchema = import_zod.z.string().refine(
|
|
|
56
63
|
},
|
|
57
64
|
{ message: "Invalid URL" }
|
|
58
65
|
);
|
|
59
|
-
var
|
|
66
|
+
var NewLoginRequestSchema = import_zod.z.object({
|
|
60
67
|
providerUrl: UrlSchema,
|
|
61
68
|
username: import_zod.z.string().min(1),
|
|
62
69
|
encryptedPassword: import_zod.z.string().min(1),
|
|
63
70
|
ownerId: import_zod.z.string(),
|
|
64
|
-
externalProviderAccountId: import_zod.z.string()
|
|
71
|
+
externalProviderAccountId: import_zod.z.string(),
|
|
72
|
+
convexUpdateUrl: import_zod.z.string().url().describe("The Convex function URL to send updates to")
|
|
65
73
|
});
|
|
66
|
-
var
|
|
74
|
+
var PublicUserSchema = import_zod.z.object({
|
|
67
75
|
id: import_zod.z.string(),
|
|
68
76
|
username: import_zod.z.string(),
|
|
69
77
|
created_at: import_zod.z.coerce.date(),
|
|
70
78
|
updated_at: import_zod.z.coerce.date()
|
|
71
79
|
});
|
|
72
|
-
var
|
|
80
|
+
var PublicProviderSchema = import_zod.z.object({
|
|
73
81
|
name: import_zod.z.string(),
|
|
74
82
|
url: UrlSchema
|
|
75
83
|
});
|
|
76
|
-
var
|
|
84
|
+
var NewLoginResponseSuccessSchema = import_zod.z.object({
|
|
85
|
+
success: import_zod.z.boolean().optional(),
|
|
77
86
|
message: import_zod.z.string(),
|
|
78
|
-
user:
|
|
79
|
-
provider:
|
|
87
|
+
user: PublicUserSchema,
|
|
88
|
+
provider: PublicProviderSchema,
|
|
80
89
|
driverIds: import_zod.z.array(import_zod.z.string()).describe("An array of driver IDs associated with the login"),
|
|
81
90
|
organizationId: import_zod.z.string().optional(),
|
|
82
91
|
honkUserId: import_zod.z.string().optional()
|
|
83
92
|
});
|
|
84
|
-
var
|
|
93
|
+
var NewLoginResponseFailureSchema = import_zod.z.object({
|
|
94
|
+
success: import_zod.z.boolean().optional(),
|
|
85
95
|
error: import_zod.z.string()
|
|
86
96
|
});
|
|
87
|
-
var
|
|
97
|
+
var NewLoginResponseSchema = import_zod.z.union([NewLoginResponseSuccessSchema, NewLoginResponseFailureSchema]);
|
|
98
|
+
var NewLoginRequest = NewLoginRequestSchema;
|
|
99
|
+
var NewLoginResponseSuccess = NewLoginResponseSuccessSchema;
|
|
100
|
+
var NewLoginResponseFailure = NewLoginResponseFailureSchema;
|
|
101
|
+
var NewLoginResponse = NewLoginResponseSchema;
|
|
88
102
|
|
|
89
103
|
// src/schemas/drivers/convex-update.ts
|
|
90
104
|
var import_zod2 = __toESM(require("zod"), 1);
|
|
@@ -99,34 +113,37 @@ var UrlSchema2 = import_zod2.default.string().refine(
|
|
|
99
113
|
},
|
|
100
114
|
{ message: "Invalid URL" }
|
|
101
115
|
);
|
|
102
|
-
var
|
|
116
|
+
var ConvexDriverSchema = import_zod2.default.object({
|
|
117
|
+
driver_name: import_zod2.default.string().optional().describe("The driver's full name"),
|
|
118
|
+
vehicle_id: import_zod2.default.string().optional().describe("The vehicle ID"),
|
|
119
|
+
driver_status: import_zod2.default.string().describe("The driver's duty status (direct from ELD)"),
|
|
120
|
+
time_remaining_in_shift: import_zod2.default.number().describe("Seconds remaining in current shift"),
|
|
121
|
+
time_remaining_till_break: import_zod2.default.number().describe("Seconds remaining until next required break"),
|
|
122
|
+
time_remaining_in_week: import_zod2.default.number().describe("Seconds remaining in current cycle/week"),
|
|
123
|
+
time_remaining_in_drive: import_zod2.default.number().describe("Seconds remaining in current drive period"),
|
|
124
|
+
driver_current_location_latitude: import_zod2.default.number().describe("Driver's current latitude"),
|
|
125
|
+
driver_current_location_longitude: import_zod2.default.number().describe("Driver's current longitude"),
|
|
126
|
+
driver_current_location_address: import_zod2.default.string().describe("Driver's current address"),
|
|
127
|
+
license_number: import_zod2.default.string().optional().describe("The driver's license number"),
|
|
128
|
+
license_state: import_zod2.default.string().optional().describe("The state that issued the driver's license"),
|
|
129
|
+
speed: import_zod2.default.number().optional().describe("The vehicle's current speed in mph"),
|
|
130
|
+
odometer: import_zod2.default.number().optional().describe("The vehicle's current odometer reading in miles"),
|
|
131
|
+
convex_provider_account_id: import_zod2.default.string().describe("The Convex ELD provider account ID"),
|
|
132
|
+
external_provider_account_id: import_zod2.default.string().describe("The provider account ID on backend"),
|
|
133
|
+
external_driver_id: import_zod2.default.string().describe("The driver ID on backend"),
|
|
134
|
+
mileage_since_last_update: import_zod2.default.number().optional().describe("Mileage since last update in miles")
|
|
135
|
+
}).describe("An object containing driver ELD status information");
|
|
136
|
+
var ConvexUpdateSchema = import_zod2.default.object({
|
|
103
137
|
provider_url: UrlSchema2.describe("The URL of the ELD provider"),
|
|
104
138
|
username: import_zod2.default.string().describe("The ELD account's login username"),
|
|
105
|
-
drivers: import_zod2.default.array(
|
|
106
|
-
driver_name: import_zod2.default.string().optional().describe("The driver's full name"),
|
|
107
|
-
vehicle_id: import_zod2.default.string().optional().describe("The vehicle ID"),
|
|
108
|
-
driver_status: import_zod2.default.string().describe("The driver's duty status (direct from ELD)"),
|
|
109
|
-
time_remaining_in_shift: import_zod2.default.number().describe("Seconds remaining in current shift"),
|
|
110
|
-
time_remaining_till_break: import_zod2.default.number().describe("Seconds remaining until next required break"),
|
|
111
|
-
time_remaining_in_week: import_zod2.default.number().describe("Seconds remaining in current cycle/week"),
|
|
112
|
-
time_remaining_in_drive: import_zod2.default.number().describe("Seconds remaining in current drive period"),
|
|
113
|
-
driver_current_location_latitude: import_zod2.default.number().describe("Driver's current latitude"),
|
|
114
|
-
driver_current_location_longitude: import_zod2.default.number().describe("Driver's current longitude"),
|
|
115
|
-
driver_current_location_address: import_zod2.default.string().describe("Driver's current address"),
|
|
116
|
-
license_number: import_zod2.default.string().optional().describe("The driver's license number"),
|
|
117
|
-
license_state: import_zod2.default.string().optional().describe("The state that issued the driver's license"),
|
|
118
|
-
speed: import_zod2.default.number().optional().describe("The vehicle's current speed in mph"),
|
|
119
|
-
odometer: import_zod2.default.number().optional().describe("The vehicle's current odometer reading in miles"),
|
|
120
|
-
convex_provider_account_id: import_zod2.default.string().describe("The Convex ELD provider account ID"),
|
|
121
|
-
external_provider_account_id: import_zod2.default.string().describe("The provider account ID on backend"),
|
|
122
|
-
external_driver_id: import_zod2.default.string().describe("The driver ID on backend"),
|
|
123
|
-
mileage_since_last_update: import_zod2.default.number().optional().describe("Mileage since last update in miles")
|
|
124
|
-
}).describe("An object containing driver ELD status information")).describe("An array of driver ELD status updates"),
|
|
139
|
+
drivers: import_zod2.default.array(ConvexDriverSchema).describe("An array of driver ELD status updates"),
|
|
125
140
|
version: import_zod2.default.string().default("2.7.0").describe("The version of the Convex ELD API being used")
|
|
126
141
|
}).describe("Schema for updating driver ELD status information");
|
|
127
|
-
var
|
|
128
|
-
updates: import_zod2.default.array(
|
|
142
|
+
var BatchConvexUpdateSchema = import_zod2.default.object({
|
|
143
|
+
updates: import_zod2.default.array(ConvexUpdateSchema).describe("An array of Convex ELD driver updates")
|
|
129
144
|
}).describe("Schema for batch updating driver ELD status information");
|
|
145
|
+
var ConvexUpdate = ConvexUpdateSchema;
|
|
146
|
+
var BatchConvexUpdate = BatchConvexUpdateSchema;
|
|
130
147
|
|
|
131
148
|
// src/schemas/providerAccounts/update-status.ts
|
|
132
149
|
var import_zod3 = __toESM(require("zod"), 1);
|
|
@@ -163,11 +180,18 @@ var ValidatePasswordResponseSchema = import_zod4.z.object({
|
|
|
163
180
|
// Annotate the CommonJS export names for ESM import in node:
|
|
164
181
|
0 && (module.exports = {
|
|
165
182
|
BatchConvexUpdate,
|
|
183
|
+
BatchConvexUpdateSchema,
|
|
184
|
+
ConvexDriverSchema,
|
|
166
185
|
ConvexUpdate,
|
|
186
|
+
ConvexUpdateSchema,
|
|
167
187
|
NewLoginRequest,
|
|
188
|
+
NewLoginRequestSchema,
|
|
168
189
|
NewLoginResponse,
|
|
169
190
|
NewLoginResponseFailure,
|
|
191
|
+
NewLoginResponseFailureSchema,
|
|
192
|
+
NewLoginResponseSchema,
|
|
170
193
|
NewLoginResponseSuccess,
|
|
194
|
+
NewLoginResponseSuccessSchema,
|
|
171
195
|
ScrapeStatus,
|
|
172
196
|
UpdateScrapeStatusMessage,
|
|
173
197
|
ValidatePasswordRequestSchema,
|