@findatruck/shared-schemas 2.10.0 → 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/browser.cjs CHANGED
@@ -152,6 +152,7 @@ var ScrapeStatus = /* @__PURE__ */ ((ScrapeStatus2) => {
152
152
  ScrapeStatus2["LOGIN_IN_PROGRESS"] = "LOGIN_IN_PROGRESS";
153
153
  ScrapeStatus2["LOGIN_SUCCESS"] = "LOGIN_SUCCESS";
154
154
  ScrapeStatus2["LOGIN_FAILED"] = "LOGIN_FAILED";
155
+ ScrapeStatus2["LOGIN_SUCCESS_FETCH_FAILED"] = "LOGIN_SUCCESS_FETCH_FAILED";
155
156
  ScrapeStatus2["DATA_FETCH_IN_PROGRESS"] = "DATA_FETCH_IN_PROGRESS";
156
157
  ScrapeStatus2["DATA_FETCH_SUCCESS"] = "DATA_FETCH_SUCCESS";
157
158
  ScrapeStatus2["DATA_FETCH_FAILED"] = "DATA_FETCH_FAILED";
@@ -296,6 +296,7 @@ declare enum ScrapeStatus {
296
296
  LOGIN_IN_PROGRESS = "LOGIN_IN_PROGRESS",
297
297
  LOGIN_SUCCESS = "LOGIN_SUCCESS",
298
298
  LOGIN_FAILED = "LOGIN_FAILED",
299
+ LOGIN_SUCCESS_FETCH_FAILED = "LOGIN_SUCCESS_FETCH_FAILED",
299
300
  DATA_FETCH_IN_PROGRESS = "DATA_FETCH_IN_PROGRESS",
300
301
  DATA_FETCH_SUCCESS = "DATA_FETCH_SUCCESS",
301
302
  DATA_FETCH_FAILED = "DATA_FETCH_FAILED"
package/dist/browser.d.ts CHANGED
@@ -296,6 +296,7 @@ declare enum ScrapeStatus {
296
296
  LOGIN_IN_PROGRESS = "LOGIN_IN_PROGRESS",
297
297
  LOGIN_SUCCESS = "LOGIN_SUCCESS",
298
298
  LOGIN_FAILED = "LOGIN_FAILED",
299
+ LOGIN_SUCCESS_FETCH_FAILED = "LOGIN_SUCCESS_FETCH_FAILED",
299
300
  DATA_FETCH_IN_PROGRESS = "DATA_FETCH_IN_PROGRESS",
300
301
  DATA_FETCH_SUCCESS = "DATA_FETCH_SUCCESS",
301
302
  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-CUV2KQXS.js";
19
+ } from "./chunk-UWBIQBUR.js";
20
20
  export {
21
21
  BatchConvexUpdate,
22
22
  BatchConvexUpdateSchema,
@@ -100,6 +100,7 @@ var ScrapeStatus = /* @__PURE__ */ ((ScrapeStatus2) => {
100
100
  ScrapeStatus2["LOGIN_IN_PROGRESS"] = "LOGIN_IN_PROGRESS";
101
101
  ScrapeStatus2["LOGIN_SUCCESS"] = "LOGIN_SUCCESS";
102
102
  ScrapeStatus2["LOGIN_FAILED"] = "LOGIN_FAILED";
103
+ ScrapeStatus2["LOGIN_SUCCESS_FETCH_FAILED"] = "LOGIN_SUCCESS_FETCH_FAILED";
103
104
  ScrapeStatus2["DATA_FETCH_IN_PROGRESS"] = "DATA_FETCH_IN_PROGRESS";
104
105
  ScrapeStatus2["DATA_FETCH_SUCCESS"] = "DATA_FETCH_SUCCESS";
105
106
  ScrapeStatus2["DATA_FETCH_FAILED"] = "DATA_FETCH_FAILED";
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,
@@ -158,6 +160,7 @@ var ScrapeStatus = /* @__PURE__ */ ((ScrapeStatus2) => {
158
160
  ScrapeStatus2["LOGIN_IN_PROGRESS"] = "LOGIN_IN_PROGRESS";
159
161
  ScrapeStatus2["LOGIN_SUCCESS"] = "LOGIN_SUCCESS";
160
162
  ScrapeStatus2["LOGIN_FAILED"] = "LOGIN_FAILED";
163
+ ScrapeStatus2["LOGIN_SUCCESS_FETCH_FAILED"] = "LOGIN_SUCCESS_FETCH_FAILED";
161
164
  ScrapeStatus2["DATA_FETCH_IN_PROGRESS"] = "DATA_FETCH_IN_PROGRESS";
162
165
  ScrapeStatus2["DATA_FETCH_SUCCESS"] = "DATA_FETCH_SUCCESS";
163
166
  ScrapeStatus2["DATA_FETCH_FAILED"] = "DATA_FETCH_FAILED";
@@ -184,34 +187,43 @@ var ValidatePasswordResponseSchema = import_zod4.z.object({
184
187
  driverIds: import_zod4.z.array(import_zod4.z.string()).describe("List of driver IDs associated with the provider account")
185
188
  }).describe("Response schema for password validation");
186
189
 
187
- // src/schemas/telemetry/driver-rankings.ts
190
+ // src/schemas/providerAccounts/delete-provider-account.ts
188
191
  var import_zod5 = require("zod");
189
- var DriverRankingsRequestSchema = import_zod5.z.object({
190
- start_date: import_zod5.z.string().describe("Start date for the ranking period (ISO 8601 format)"),
191
- end_date: import_zod5.z.string().describe("End date for the ranking period (ISO 8601 format)"),
192
- state: import_zod5.z.string().length(2).optional().describe("Optional 2-letter state abbreviation to filter telemetry by location")
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")
193
205
  }).describe("Request schema for driver rankings by miles driven");
194
- var DriverRankingSchema = import_zod5.z.object({
195
- rank: import_zod5.z.number().int().positive().describe("Rank position based on miles driven"),
196
- driver_id: import_zod5.z.string().uuid().describe("Unique identifier of the driver"),
197
- driver_name: import_zod5.z.string().describe("Name of the driver"),
198
- total_miles: import_zod5.z.number().min(0).describe("Total miles driven in the specified period")
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")
199
211
  }).describe("Single driver ranking entry");
200
- var DriverRankingsResponseSchema = import_zod5.z.array(DriverRankingSchema).describe("Array of driver rankings sorted by miles driven in descending order");
212
+ var DriverRankingsResponseSchema = import_zod6.z.array(DriverRankingSchema).describe("Array of driver rankings sorted by miles driven in descending order");
201
213
 
202
214
  // src/schemas/telemetry/state-heatmap.ts
203
- var import_zod6 = require("zod");
204
- var StateHeatmapRequestSchema = import_zod6.z.object({
205
- driver_id: import_zod6.z.string().uuid().describe("Unique identifier of the driver"),
206
- start_date: import_zod6.z.string().describe("Start date for the heatmap period (ISO 8601 format)"),
207
- end_date: import_zod6.z.string().describe("End date for the heatmap period (ISO 8601 format)")
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)")
208
220
  }).describe("Request schema for driver state heatmap");
209
- var StateHeatmapEntrySchema = import_zod6.z.object({
210
- count: import_zod6.z.number().int().min(0).describe("Number of telemetry points in this state"),
211
- percentage: import_zod6.z.number().min(0).max(100).describe("Percentage of total telemetry points in this state")
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")
212
224
  }).describe("Single state entry in the heatmap");
213
- var StateHeatmapResponseSchema = import_zod6.z.record(
214
- import_zod6.z.string().length(2),
225
+ var StateHeatmapResponseSchema = import_zod7.z.record(
226
+ import_zod7.z.string().length(2),
215
227
  StateHeatmapEntrySchema
216
228
  ).describe("Record of 2-letter state codes to heatmap entries");
217
229
  // Annotate the CommonJS export names for ESM import in node:
@@ -221,6 +233,8 @@ var StateHeatmapResponseSchema = import_zod6.z.record(
221
233
  ConvexDriverSchema,
222
234
  ConvexUpdate,
223
235
  ConvexUpdateSchema,
236
+ DeleteProviderAccountRequestSchema,
237
+ DeleteProviderAccountResponseSchema,
224
238
  DriverRankingSchema,
225
239
  DriverRankingsRequestSchema,
226
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
@@ -16,36 +16,45 @@ import {
16
16
  UpdateScrapeStatusMessage,
17
17
  ValidatePasswordRequestSchema,
18
18
  ValidatePasswordResponseSchema
19
- } from "./chunk-CUV2KQXS.js";
19
+ } from "./chunk-UWBIQBUR.js";
20
20
 
21
- // src/schemas/telemetry/driver-rankings.ts
21
+ // src/schemas/providerAccounts/delete-provider-account.ts
22
22
  import { z } from "zod";
23
- var DriverRankingsRequestSchema = z.object({
24
- start_date: z.string().describe("Start date for the ranking period (ISO 8601 format)"),
25
- end_date: z.string().describe("End date for the ranking period (ISO 8601 format)"),
26
- state: z.string().length(2).optional().describe("Optional 2-letter state abbreviation to filter telemetry by location")
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 = z.object({
29
- rank: z.number().int().positive().describe("Rank position based on miles driven"),
30
- driver_id: z.string().uuid().describe("Unique identifier of the driver"),
31
- driver_name: z.string().describe("Name of the driver"),
32
- total_miles: z.number().min(0).describe("Total miles driven in the specified period")
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 = z.array(DriverRankingSchema).describe("Array of driver rankings sorted by miles driven in descending order");
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 z2 } from "zod";
38
- var StateHeatmapRequestSchema = z2.object({
39
- driver_id: z2.string().uuid().describe("Unique identifier of the driver"),
40
- start_date: z2.string().describe("Start date for the heatmap period (ISO 8601 format)"),
41
- end_date: z2.string().describe("End date for the heatmap period (ISO 8601 format)")
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 = z2.object({
44
- count: z2.number().int().min(0).describe("Number of telemetry points in this state"),
45
- percentage: z2.number().min(0).max(100).describe("Percentage of total telemetry points in this state")
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 = z2.record(
48
- z2.string().length(2),
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@findatruck/shared-schemas",
3
- "version": "2.10.0",
3
+ "version": "2.11.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",