@findatruck/shared-schemas 0.7.0 → 0.8.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 CHANGED
@@ -41,6 +41,8 @@ __export(index_exports, {
41
41
  NewLoginResponse: () => NewLoginResponse,
42
42
  NewLoginResponseFailure: () => NewLoginResponseFailure,
43
43
  NewLoginResponseSuccess: () => NewLoginResponseSuccess,
44
+ ScrapeStatus: () => ScrapeStatus,
45
+ UpdateScrapeStatusMessage: () => UpdateScrapeStatusMessage,
44
46
  VehicleIdentity: () => VehicleIdentity,
45
47
  decryptRsaOaepSha256B64: () => decryptRsaOaepSha256B64,
46
48
  encryptRsaOaepSha256ToB64: () => encryptRsaOaepSha256ToB64
@@ -180,6 +182,25 @@ function decryptRsaOaepSha256B64(ciphertextB64, privateKeyPem, passphrase) {
180
182
  );
181
183
  return plaintext.toString("utf8");
182
184
  }
185
+
186
+ // src/schemas/update-status.ts
187
+ var import_zod3 = __toESM(require("zod"), 1);
188
+ var ScrapeStatus = /* @__PURE__ */ ((ScrapeStatus2) => {
189
+ ScrapeStatus2["NEW_LOGIN_RECEIVED"] = "NEW_LOGIN_RECEIVED";
190
+ ScrapeStatus2["LOGIN_IN_PROGRESS"] = "LOGIN_IN_PROGRESS";
191
+ ScrapeStatus2["LOGIN_SUCCESS"] = "LOGIN_SUCCESS";
192
+ ScrapeStatus2["LOGIN_FAILED"] = "LOGIN_FAILED";
193
+ ScrapeStatus2["DATA_FETCH_IN_PROGRESS"] = "DATA_FETCH_IN_PROGRESS";
194
+ ScrapeStatus2["DATA_FETCH_SUCCESS"] = "DATA_FETCH_SUCCESS";
195
+ ScrapeStatus2["DATA_FETCH_FAILED"] = "DATA_FETCH_FAILED";
196
+ return ScrapeStatus2;
197
+ })(ScrapeStatus || {});
198
+ var UpdateScrapeStatusMessage = import_zod3.default.object({
199
+ status: import_zod3.default.nativeEnum(ScrapeStatus).describe("The current status of the scrape process"),
200
+ username: import_zod3.default.string().describe("The username of the driver whose status is being updated"),
201
+ providerUrl: import_zod3.default.string().describe("The URL of the ELD provider"),
202
+ password: import_zod3.default.string().describe("The encrypted password of the driver whose status is being updated")
203
+ }).describe("Schema for update status messages");
183
204
  // Annotate the CommonJS export names for ESM import in node:
184
205
  0 && (module.exports = {
185
206
  ConvexUpdate,
@@ -193,6 +214,8 @@ function decryptRsaOaepSha256B64(ciphertextB64, privateKeyPem, passphrase) {
193
214
  NewLoginResponse,
194
215
  NewLoginResponseFailure,
195
216
  NewLoginResponseSuccess,
217
+ ScrapeStatus,
218
+ UpdateScrapeStatusMessage,
196
219
  VehicleIdentity,
197
220
  decryptRsaOaepSha256B64,
198
221
  encryptRsaOaepSha256ToB64
package/dist/index.d.cts CHANGED
@@ -413,4 +413,31 @@ type ConvexUpdateNested = z$1.infer<typeof ConvexUpdateNested>;
413
413
  declare function encryptRsaOaepSha256ToB64(plaintext: string, publicKeyPem: string): string;
414
414
  declare function decryptRsaOaepSha256B64(ciphertextB64: string, privateKeyPem: string, passphrase?: string): string;
415
415
 
416
- export { ConvexUpdate, ConvexUpdateNested, DriverIdentity, DriverLocation, DriverLogin, DriverStatus, HoursOfService, NewLoginRequest, NewLoginResponse, NewLoginResponseFailure, NewLoginResponseSuccess, VehicleIdentity, decryptRsaOaepSha256B64, encryptRsaOaepSha256ToB64 };
416
+ declare enum ScrapeStatus {
417
+ NEW_LOGIN_RECEIVED = "NEW_LOGIN_RECEIVED",
418
+ LOGIN_IN_PROGRESS = "LOGIN_IN_PROGRESS",
419
+ LOGIN_SUCCESS = "LOGIN_SUCCESS",
420
+ LOGIN_FAILED = "LOGIN_FAILED",
421
+ DATA_FETCH_IN_PROGRESS = "DATA_FETCH_IN_PROGRESS",
422
+ DATA_FETCH_SUCCESS = "DATA_FETCH_SUCCESS",
423
+ DATA_FETCH_FAILED = "DATA_FETCH_FAILED"
424
+ }
425
+ declare const UpdateScrapeStatusMessage: z$1.ZodObject<{
426
+ status: z$1.ZodNativeEnum<typeof ScrapeStatus>;
427
+ username: z$1.ZodString;
428
+ providerUrl: z$1.ZodString;
429
+ password: z$1.ZodString;
430
+ }, "strip", z$1.ZodTypeAny, {
431
+ providerUrl: string;
432
+ username: string;
433
+ password: string;
434
+ status: ScrapeStatus;
435
+ }, {
436
+ providerUrl: string;
437
+ username: string;
438
+ password: string;
439
+ status: ScrapeStatus;
440
+ }>;
441
+ type UpdateScrapeStatusMessage = z$1.infer<typeof UpdateScrapeStatusMessage>;
442
+
443
+ export { ConvexUpdate, ConvexUpdateNested, DriverIdentity, DriverLocation, DriverLogin, DriverStatus, HoursOfService, NewLoginRequest, NewLoginResponse, NewLoginResponseFailure, NewLoginResponseSuccess, ScrapeStatus, UpdateScrapeStatusMessage, VehicleIdentity, decryptRsaOaepSha256B64, encryptRsaOaepSha256ToB64 };
package/dist/index.d.ts CHANGED
@@ -413,4 +413,31 @@ type ConvexUpdateNested = z$1.infer<typeof ConvexUpdateNested>;
413
413
  declare function encryptRsaOaepSha256ToB64(plaintext: string, publicKeyPem: string): string;
414
414
  declare function decryptRsaOaepSha256B64(ciphertextB64: string, privateKeyPem: string, passphrase?: string): string;
415
415
 
416
- export { ConvexUpdate, ConvexUpdateNested, DriverIdentity, DriverLocation, DriverLogin, DriverStatus, HoursOfService, NewLoginRequest, NewLoginResponse, NewLoginResponseFailure, NewLoginResponseSuccess, VehicleIdentity, decryptRsaOaepSha256B64, encryptRsaOaepSha256ToB64 };
416
+ declare enum ScrapeStatus {
417
+ NEW_LOGIN_RECEIVED = "NEW_LOGIN_RECEIVED",
418
+ LOGIN_IN_PROGRESS = "LOGIN_IN_PROGRESS",
419
+ LOGIN_SUCCESS = "LOGIN_SUCCESS",
420
+ LOGIN_FAILED = "LOGIN_FAILED",
421
+ DATA_FETCH_IN_PROGRESS = "DATA_FETCH_IN_PROGRESS",
422
+ DATA_FETCH_SUCCESS = "DATA_FETCH_SUCCESS",
423
+ DATA_FETCH_FAILED = "DATA_FETCH_FAILED"
424
+ }
425
+ declare const UpdateScrapeStatusMessage: z$1.ZodObject<{
426
+ status: z$1.ZodNativeEnum<typeof ScrapeStatus>;
427
+ username: z$1.ZodString;
428
+ providerUrl: z$1.ZodString;
429
+ password: z$1.ZodString;
430
+ }, "strip", z$1.ZodTypeAny, {
431
+ providerUrl: string;
432
+ username: string;
433
+ password: string;
434
+ status: ScrapeStatus;
435
+ }, {
436
+ providerUrl: string;
437
+ username: string;
438
+ password: string;
439
+ status: ScrapeStatus;
440
+ }>;
441
+ type UpdateScrapeStatusMessage = z$1.infer<typeof UpdateScrapeStatusMessage>;
442
+
443
+ export { ConvexUpdate, ConvexUpdateNested, DriverIdentity, DriverLocation, DriverLogin, DriverStatus, HoursOfService, NewLoginRequest, NewLoginResponse, NewLoginResponseFailure, NewLoginResponseSuccess, ScrapeStatus, UpdateScrapeStatusMessage, VehicleIdentity, decryptRsaOaepSha256B64, encryptRsaOaepSha256ToB64 };
package/dist/index.js CHANGED
@@ -131,6 +131,25 @@ function decryptRsaOaepSha256B64(ciphertextB64, privateKeyPem, passphrase) {
131
131
  );
132
132
  return plaintext.toString("utf8");
133
133
  }
134
+
135
+ // src/schemas/update-status.ts
136
+ import z3 from "zod";
137
+ var ScrapeStatus = /* @__PURE__ */ ((ScrapeStatus2) => {
138
+ ScrapeStatus2["NEW_LOGIN_RECEIVED"] = "NEW_LOGIN_RECEIVED";
139
+ ScrapeStatus2["LOGIN_IN_PROGRESS"] = "LOGIN_IN_PROGRESS";
140
+ ScrapeStatus2["LOGIN_SUCCESS"] = "LOGIN_SUCCESS";
141
+ ScrapeStatus2["LOGIN_FAILED"] = "LOGIN_FAILED";
142
+ ScrapeStatus2["DATA_FETCH_IN_PROGRESS"] = "DATA_FETCH_IN_PROGRESS";
143
+ ScrapeStatus2["DATA_FETCH_SUCCESS"] = "DATA_FETCH_SUCCESS";
144
+ ScrapeStatus2["DATA_FETCH_FAILED"] = "DATA_FETCH_FAILED";
145
+ return ScrapeStatus2;
146
+ })(ScrapeStatus || {});
147
+ var UpdateScrapeStatusMessage = z3.object({
148
+ status: z3.nativeEnum(ScrapeStatus).describe("The current status of the scrape process"),
149
+ username: z3.string().describe("The username of the driver whose status is being updated"),
150
+ providerUrl: z3.string().describe("The URL of the ELD provider"),
151
+ password: z3.string().describe("The encrypted password of the driver whose status is being updated")
152
+ }).describe("Schema for update status messages");
134
153
  export {
135
154
  ConvexUpdate,
136
155
  ConvexUpdateNested,
@@ -143,6 +162,8 @@ export {
143
162
  NewLoginResponse,
144
163
  NewLoginResponseFailure,
145
164
  NewLoginResponseSuccess,
165
+ ScrapeStatus,
166
+ UpdateScrapeStatusMessage,
146
167
  VehicleIdentity,
147
168
  decryptRsaOaepSha256B64,
148
169
  encryptRsaOaepSha256ToB64
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@findatruck/shared-schemas",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",