@findatruck/shared-schemas 2.10.1 → 2.11.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/index.cjs +34 -21
- package/dist/index.d.cts +16 -1
- package/dist/index.d.ts +16 -1
- package/dist/index.js +32 -21
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -35,6 +35,8 @@ __export(index_exports, {
|
|
|
35
35
|
ConvexDriverSchema: () => ConvexDriverSchema,
|
|
36
36
|
ConvexUpdate: () => ConvexUpdate,
|
|
37
37
|
ConvexUpdateSchema: () => ConvexUpdateSchema,
|
|
38
|
+
DeleteProviderAccountRequestSchema: () => DeleteProviderAccountRequestSchema,
|
|
39
|
+
DeleteProviderAccountResponseSchema: () => DeleteProviderAccountResponseSchema,
|
|
38
40
|
DriverRankingSchema: () => DriverRankingSchema,
|
|
39
41
|
DriverRankingsRequestSchema: () => DriverRankingsRequestSchema,
|
|
40
42
|
DriverRankingsResponseSchema: () => DriverRankingsResponseSchema,
|
|
@@ -185,34 +187,43 @@ var ValidatePasswordResponseSchema = import_zod4.z.object({
|
|
|
185
187
|
driverIds: import_zod4.z.array(import_zod4.z.string()).describe("List of driver IDs associated with the provider account")
|
|
186
188
|
}).describe("Response schema for password validation");
|
|
187
189
|
|
|
188
|
-
// src/schemas/
|
|
190
|
+
// src/schemas/providerAccounts/delete-provider-account.ts
|
|
189
191
|
var import_zod5 = require("zod");
|
|
190
|
-
var
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
192
|
+
var DeleteProviderAccountRequestSchema = import_zod5.z.object({
|
|
193
|
+
providerAccountId: import_zod5.z.string().min(1).describe("The external provider account ID to delete")
|
|
194
|
+
}).describe("Request schema for deleting a provider account");
|
|
195
|
+
var DeleteProviderAccountResponseSchema = import_zod5.z.object({
|
|
196
|
+
success: import_zod5.z.boolean().describe("Indicates if the provider account was successfully deleted")
|
|
197
|
+
}).describe("Response schema for provider account deletion");
|
|
198
|
+
|
|
199
|
+
// src/schemas/telemetry/driver-rankings.ts
|
|
200
|
+
var import_zod6 = require("zod");
|
|
201
|
+
var DriverRankingsRequestSchema = import_zod6.z.object({
|
|
202
|
+
start_date: import_zod6.z.string().describe("Start date for the ranking period (ISO 8601 format)"),
|
|
203
|
+
end_date: import_zod6.z.string().describe("End date for the ranking period (ISO 8601 format)"),
|
|
204
|
+
state: import_zod6.z.string().length(2).optional().describe("Optional 2-letter state abbreviation to filter telemetry by location")
|
|
194
205
|
}).describe("Request schema for driver rankings by miles driven");
|
|
195
|
-
var DriverRankingSchema =
|
|
196
|
-
rank:
|
|
197
|
-
driver_id:
|
|
198
|
-
driver_name:
|
|
199
|
-
total_miles:
|
|
206
|
+
var DriverRankingSchema = import_zod6.z.object({
|
|
207
|
+
rank: import_zod6.z.number().int().positive().describe("Rank position based on miles driven"),
|
|
208
|
+
driver_id: import_zod6.z.string().uuid().describe("Unique identifier of the driver"),
|
|
209
|
+
driver_name: import_zod6.z.string().describe("Name of the driver"),
|
|
210
|
+
total_miles: import_zod6.z.number().min(0).describe("Total miles driven in the specified period")
|
|
200
211
|
}).describe("Single driver ranking entry");
|
|
201
|
-
var DriverRankingsResponseSchema =
|
|
212
|
+
var DriverRankingsResponseSchema = import_zod6.z.array(DriverRankingSchema).describe("Array of driver rankings sorted by miles driven in descending order");
|
|
202
213
|
|
|
203
214
|
// src/schemas/telemetry/state-heatmap.ts
|
|
204
|
-
var
|
|
205
|
-
var StateHeatmapRequestSchema =
|
|
206
|
-
driver_id:
|
|
207
|
-
start_date:
|
|
208
|
-
end_date:
|
|
215
|
+
var import_zod7 = require("zod");
|
|
216
|
+
var StateHeatmapRequestSchema = import_zod7.z.object({
|
|
217
|
+
driver_id: import_zod7.z.string().uuid().describe("Unique identifier of the driver"),
|
|
218
|
+
start_date: import_zod7.z.string().describe("Start date for the heatmap period (ISO 8601 format)"),
|
|
219
|
+
end_date: import_zod7.z.string().describe("End date for the heatmap period (ISO 8601 format)")
|
|
209
220
|
}).describe("Request schema for driver state heatmap");
|
|
210
|
-
var StateHeatmapEntrySchema =
|
|
211
|
-
count:
|
|
212
|
-
percentage:
|
|
221
|
+
var StateHeatmapEntrySchema = import_zod7.z.object({
|
|
222
|
+
count: import_zod7.z.number().int().min(0).describe("Number of telemetry points in this state"),
|
|
223
|
+
percentage: import_zod7.z.number().min(0).max(100).describe("Percentage of total telemetry points in this state")
|
|
213
224
|
}).describe("Single state entry in the heatmap");
|
|
214
|
-
var StateHeatmapResponseSchema =
|
|
215
|
-
|
|
225
|
+
var StateHeatmapResponseSchema = import_zod7.z.record(
|
|
226
|
+
import_zod7.z.string().length(2),
|
|
216
227
|
StateHeatmapEntrySchema
|
|
217
228
|
).describe("Record of 2-letter state codes to heatmap entries");
|
|
218
229
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -222,6 +233,8 @@ var StateHeatmapResponseSchema = import_zod6.z.record(
|
|
|
222
233
|
ConvexDriverSchema,
|
|
223
234
|
ConvexUpdate,
|
|
224
235
|
ConvexUpdateSchema,
|
|
236
|
+
DeleteProviderAccountRequestSchema,
|
|
237
|
+
DeleteProviderAccountResponseSchema,
|
|
225
238
|
DriverRankingSchema,
|
|
226
239
|
DriverRankingsRequestSchema,
|
|
227
240
|
DriverRankingsResponseSchema,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
export { BatchConvexUpdate, BatchConvexUpdateData, BatchConvexUpdateSchema, ConvexDriverData, ConvexDriverSchema, ConvexUpdate, ConvexUpdateData, ConvexUpdateSchema, NewLoginRequest, NewLoginRequestData, NewLoginRequestSchema, NewLoginResponse, NewLoginResponseData, NewLoginResponseFailure, NewLoginResponseFailureData, NewLoginResponseFailureSchema, NewLoginResponseSchema, NewLoginResponseSuccess, NewLoginResponseSuccessData, NewLoginResponseSuccessSchema, PublicProviderData, PublicUserData, ScrapeStatus, UpdateScrapeStatusMessage, ValidatePasswordRequest, ValidatePasswordRequestData, ValidatePasswordRequestSchema, ValidatePasswordResponse, ValidatePasswordResponseData, ValidatePasswordResponseSchema } from './browser.cjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
|
+
interface DeleteProviderAccountRequestData {
|
|
5
|
+
providerAccountId: string;
|
|
6
|
+
}
|
|
7
|
+
interface DeleteProviderAccountResponseData {
|
|
8
|
+
success: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const DeleteProviderAccountRequestSchema: z.ZodObject<{
|
|
11
|
+
providerAccountId: z.ZodString;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
declare const DeleteProviderAccountResponseSchema: z.ZodObject<{
|
|
14
|
+
success: z.ZodBoolean;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
type DeleteProviderAccountRequest = DeleteProviderAccountRequestData;
|
|
17
|
+
type DeleteProviderAccountResponse = DeleteProviderAccountResponseData;
|
|
18
|
+
|
|
4
19
|
interface DriverRankingsRequestData {
|
|
5
20
|
start_date: string;
|
|
6
21
|
end_date: string;
|
|
@@ -61,4 +76,4 @@ type StateHeatmapRequest = StateHeatmapRequestData;
|
|
|
61
76
|
type StateHeatmapEntry = StateHeatmapEntryData;
|
|
62
77
|
type StateHeatmapResponse = StateHeatmapResponseData;
|
|
63
78
|
|
|
64
|
-
export { type DriverRanking, type DriverRankingData, DriverRankingSchema, type DriverRankingsRequest, type DriverRankingsRequestData, DriverRankingsRequestSchema, type DriverRankingsResponse, type DriverRankingsResponseData, DriverRankingsResponseSchema, type StateHeatmapEntry, type StateHeatmapEntryData, StateHeatmapEntrySchema, type StateHeatmapRequest, type StateHeatmapRequestData, StateHeatmapRequestSchema, type StateHeatmapResponse, type StateHeatmapResponseData, StateHeatmapResponseSchema };
|
|
79
|
+
export { type DeleteProviderAccountRequest, type DeleteProviderAccountRequestData, DeleteProviderAccountRequestSchema, type DeleteProviderAccountResponse, type DeleteProviderAccountResponseData, DeleteProviderAccountResponseSchema, type DriverRanking, type DriverRankingData, DriverRankingSchema, type DriverRankingsRequest, type DriverRankingsRequestData, DriverRankingsRequestSchema, type DriverRankingsResponse, type DriverRankingsResponseData, DriverRankingsResponseSchema, type StateHeatmapEntry, type StateHeatmapEntryData, StateHeatmapEntrySchema, type StateHeatmapRequest, type StateHeatmapRequestData, StateHeatmapRequestSchema, type StateHeatmapResponse, type StateHeatmapResponseData, StateHeatmapResponseSchema };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
export { BatchConvexUpdate, BatchConvexUpdateData, BatchConvexUpdateSchema, ConvexDriverData, ConvexDriverSchema, ConvexUpdate, ConvexUpdateData, ConvexUpdateSchema, NewLoginRequest, NewLoginRequestData, NewLoginRequestSchema, NewLoginResponse, NewLoginResponseData, NewLoginResponseFailure, NewLoginResponseFailureData, NewLoginResponseFailureSchema, NewLoginResponseSchema, NewLoginResponseSuccess, NewLoginResponseSuccessData, NewLoginResponseSuccessSchema, PublicProviderData, PublicUserData, ScrapeStatus, UpdateScrapeStatusMessage, ValidatePasswordRequest, ValidatePasswordRequestData, ValidatePasswordRequestSchema, ValidatePasswordResponse, ValidatePasswordResponseData, ValidatePasswordResponseSchema } from './browser.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
|
+
interface DeleteProviderAccountRequestData {
|
|
5
|
+
providerAccountId: string;
|
|
6
|
+
}
|
|
7
|
+
interface DeleteProviderAccountResponseData {
|
|
8
|
+
success: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const DeleteProviderAccountRequestSchema: z.ZodObject<{
|
|
11
|
+
providerAccountId: z.ZodString;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
declare const DeleteProviderAccountResponseSchema: z.ZodObject<{
|
|
14
|
+
success: z.ZodBoolean;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
type DeleteProviderAccountRequest = DeleteProviderAccountRequestData;
|
|
17
|
+
type DeleteProviderAccountResponse = DeleteProviderAccountResponseData;
|
|
18
|
+
|
|
4
19
|
interface DriverRankingsRequestData {
|
|
5
20
|
start_date: string;
|
|
6
21
|
end_date: string;
|
|
@@ -61,4 +76,4 @@ type StateHeatmapRequest = StateHeatmapRequestData;
|
|
|
61
76
|
type StateHeatmapEntry = StateHeatmapEntryData;
|
|
62
77
|
type StateHeatmapResponse = StateHeatmapResponseData;
|
|
63
78
|
|
|
64
|
-
export { type DriverRanking, type DriverRankingData, DriverRankingSchema, type DriverRankingsRequest, type DriverRankingsRequestData, DriverRankingsRequestSchema, type DriverRankingsResponse, type DriverRankingsResponseData, DriverRankingsResponseSchema, type StateHeatmapEntry, type StateHeatmapEntryData, StateHeatmapEntrySchema, type StateHeatmapRequest, type StateHeatmapRequestData, StateHeatmapRequestSchema, type StateHeatmapResponse, type StateHeatmapResponseData, StateHeatmapResponseSchema };
|
|
79
|
+
export { type DeleteProviderAccountRequest, type DeleteProviderAccountRequestData, DeleteProviderAccountRequestSchema, type DeleteProviderAccountResponse, type DeleteProviderAccountResponseData, DeleteProviderAccountResponseSchema, type DriverRanking, type DriverRankingData, DriverRankingSchema, type DriverRankingsRequest, type DriverRankingsRequestData, DriverRankingsRequestSchema, type DriverRankingsResponse, type DriverRankingsResponseData, DriverRankingsResponseSchema, type StateHeatmapEntry, type StateHeatmapEntryData, StateHeatmapEntrySchema, type StateHeatmapRequest, type StateHeatmapRequestData, StateHeatmapRequestSchema, type StateHeatmapResponse, type StateHeatmapResponseData, StateHeatmapResponseSchema };
|
package/dist/index.js
CHANGED
|
@@ -18,34 +18,43 @@ import {
|
|
|
18
18
|
ValidatePasswordResponseSchema
|
|
19
19
|
} from "./chunk-UWBIQBUR.js";
|
|
20
20
|
|
|
21
|
-
// src/schemas/
|
|
21
|
+
// src/schemas/providerAccounts/delete-provider-account.ts
|
|
22
22
|
import { z } from "zod";
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
var DeleteProviderAccountRequestSchema = z.object({
|
|
24
|
+
providerAccountId: z.string().min(1).describe("The external provider account ID to delete")
|
|
25
|
+
}).describe("Request schema for deleting a provider account");
|
|
26
|
+
var DeleteProviderAccountResponseSchema = z.object({
|
|
27
|
+
success: z.boolean().describe("Indicates if the provider account was successfully deleted")
|
|
28
|
+
}).describe("Response schema for provider account deletion");
|
|
29
|
+
|
|
30
|
+
// src/schemas/telemetry/driver-rankings.ts
|
|
31
|
+
import { z as z2 } from "zod";
|
|
32
|
+
var DriverRankingsRequestSchema = z2.object({
|
|
33
|
+
start_date: z2.string().describe("Start date for the ranking period (ISO 8601 format)"),
|
|
34
|
+
end_date: z2.string().describe("End date for the ranking period (ISO 8601 format)"),
|
|
35
|
+
state: z2.string().length(2).optional().describe("Optional 2-letter state abbreviation to filter telemetry by location")
|
|
27
36
|
}).describe("Request schema for driver rankings by miles driven");
|
|
28
|
-
var DriverRankingSchema =
|
|
29
|
-
rank:
|
|
30
|
-
driver_id:
|
|
31
|
-
driver_name:
|
|
32
|
-
total_miles:
|
|
37
|
+
var DriverRankingSchema = z2.object({
|
|
38
|
+
rank: z2.number().int().positive().describe("Rank position based on miles driven"),
|
|
39
|
+
driver_id: z2.string().uuid().describe("Unique identifier of the driver"),
|
|
40
|
+
driver_name: z2.string().describe("Name of the driver"),
|
|
41
|
+
total_miles: z2.number().min(0).describe("Total miles driven in the specified period")
|
|
33
42
|
}).describe("Single driver ranking entry");
|
|
34
|
-
var DriverRankingsResponseSchema =
|
|
43
|
+
var DriverRankingsResponseSchema = z2.array(DriverRankingSchema).describe("Array of driver rankings sorted by miles driven in descending order");
|
|
35
44
|
|
|
36
45
|
// src/schemas/telemetry/state-heatmap.ts
|
|
37
|
-
import { z as
|
|
38
|
-
var StateHeatmapRequestSchema =
|
|
39
|
-
driver_id:
|
|
40
|
-
start_date:
|
|
41
|
-
end_date:
|
|
46
|
+
import { z as z3 } from "zod";
|
|
47
|
+
var StateHeatmapRequestSchema = z3.object({
|
|
48
|
+
driver_id: z3.string().uuid().describe("Unique identifier of the driver"),
|
|
49
|
+
start_date: z3.string().describe("Start date for the heatmap period (ISO 8601 format)"),
|
|
50
|
+
end_date: z3.string().describe("End date for the heatmap period (ISO 8601 format)")
|
|
42
51
|
}).describe("Request schema for driver state heatmap");
|
|
43
|
-
var StateHeatmapEntrySchema =
|
|
44
|
-
count:
|
|
45
|
-
percentage:
|
|
52
|
+
var StateHeatmapEntrySchema = z3.object({
|
|
53
|
+
count: z3.number().int().min(0).describe("Number of telemetry points in this state"),
|
|
54
|
+
percentage: z3.number().min(0).max(100).describe("Percentage of total telemetry points in this state")
|
|
46
55
|
}).describe("Single state entry in the heatmap");
|
|
47
|
-
var StateHeatmapResponseSchema =
|
|
48
|
-
|
|
56
|
+
var StateHeatmapResponseSchema = z3.record(
|
|
57
|
+
z3.string().length(2),
|
|
49
58
|
StateHeatmapEntrySchema
|
|
50
59
|
).describe("Record of 2-letter state codes to heatmap entries");
|
|
51
60
|
export {
|
|
@@ -54,6 +63,8 @@ export {
|
|
|
54
63
|
ConvexDriverSchema,
|
|
55
64
|
ConvexUpdate,
|
|
56
65
|
ConvexUpdateSchema,
|
|
66
|
+
DeleteProviderAccountRequestSchema,
|
|
67
|
+
DeleteProviderAccountResponseSchema,
|
|
57
68
|
DriverRankingSchema,
|
|
58
69
|
DriverRankingsRequestSchema,
|
|
59
70
|
DriverRankingsResponseSchema,
|