@findatruck/shared-schemas 2.1.0 → 2.3.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 +163 -0
- package/dist/browser.d.cts +277 -0
- package/dist/browser.d.ts +277 -0
- package/dist/browser.js +22 -0
- package/dist/chunk-XRXOPSCS.js +119 -0
- package/dist/index.cjs +2 -1
- package/dist/index.d.cts +3 -273
- package/dist/index.d.ts +3 -273
- package/dist/index.js +11 -106
- package/package.json +7 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,277 +1,7 @@
|
|
|
1
|
-
|
|
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>;
|
|
1
|
+
export { ConvexUpdate, NewLoginRequest, NewLoginResponse, NewLoginResponseFailure, NewLoginResponseSuccess, ScrapeStatus, UpdateScrapeStatusMessage, ValidatePasswordRequest, ValidatePasswordRequestSchema, ValidatePasswordResponse, ValidatePasswordResponseSchema } from './browser.cjs';
|
|
2
|
+
import 'zod';
|
|
223
3
|
|
|
224
4
|
declare function encryptRsaOaepSha256ToB64(plaintext: string, publicKeyPem: string): string;
|
|
225
5
|
declare function decryptRsaOaepSha256B64(ciphertextB64: string, privateKeyPem: string, passphrase?: string): string;
|
|
226
6
|
|
|
227
|
-
|
|
228
|
-
NEW_LOGIN_RECEIVED = "NEW_LOGIN_RECEIVED",
|
|
229
|
-
LOGIN_IN_PROGRESS = "LOGIN_IN_PROGRESS",
|
|
230
|
-
LOGIN_SUCCESS = "LOGIN_SUCCESS",
|
|
231
|
-
LOGIN_FAILED = "LOGIN_FAILED",
|
|
232
|
-
DATA_FETCH_IN_PROGRESS = "DATA_FETCH_IN_PROGRESS",
|
|
233
|
-
DATA_FETCH_SUCCESS = "DATA_FETCH_SUCCESS",
|
|
234
|
-
DATA_FETCH_FAILED = "DATA_FETCH_FAILED"
|
|
235
|
-
}
|
|
236
|
-
declare const UpdateScrapeStatusMessage: z$1.ZodObject<{
|
|
237
|
-
status: z$1.ZodNativeEnum<typeof ScrapeStatus>;
|
|
238
|
-
externalProviderAccountId: z$1.ZodString;
|
|
239
|
-
username: z$1.ZodString;
|
|
240
|
-
provider_url: z$1.ZodString;
|
|
241
|
-
}, "strip", z$1.ZodTypeAny, {
|
|
242
|
-
username: string;
|
|
243
|
-
externalProviderAccountId: string;
|
|
244
|
-
status: ScrapeStatus;
|
|
245
|
-
provider_url: string;
|
|
246
|
-
}, {
|
|
247
|
-
username: string;
|
|
248
|
-
externalProviderAccountId: string;
|
|
249
|
-
status: ScrapeStatus;
|
|
250
|
-
provider_url: string;
|
|
251
|
-
}>;
|
|
252
|
-
type UpdateScrapeStatusMessage = z$1.infer<typeof UpdateScrapeStatusMessage>;
|
|
253
|
-
|
|
254
|
-
declare const ValidatePasswordRequestSchema: z.ZodObject<{
|
|
255
|
-
providerAccountId: z.ZodString;
|
|
256
|
-
encryptedPassword: z.ZodString;
|
|
257
|
-
}, "strip", z.ZodTypeAny, {
|
|
258
|
-
encryptedPassword: string;
|
|
259
|
-
providerAccountId: string;
|
|
260
|
-
}, {
|
|
261
|
-
encryptedPassword: string;
|
|
262
|
-
providerAccountId: string;
|
|
263
|
-
}>;
|
|
264
|
-
type ValidatePasswordRequest = z.infer<typeof ValidatePasswordRequestSchema>;
|
|
265
|
-
declare const ValidatePasswordResponseSchema: z.ZodObject<{
|
|
266
|
-
isValid: z.ZodBoolean;
|
|
267
|
-
driverIds: z.ZodArray<z.ZodString, "many">;
|
|
268
|
-
}, "strip", z.ZodTypeAny, {
|
|
269
|
-
driverIds: string[];
|
|
270
|
-
isValid: boolean;
|
|
271
|
-
}, {
|
|
272
|
-
driverIds: string[];
|
|
273
|
-
isValid: boolean;
|
|
274
|
-
}>;
|
|
275
|
-
type ValidatePasswordResponse = z.infer<typeof ValidatePasswordResponseSchema>;
|
|
276
|
-
|
|
277
|
-
export { ConvexUpdate, NewLoginRequest, NewLoginResponse, NewLoginResponseFailure, NewLoginResponseSuccess, ScrapeStatus, UpdateScrapeStatusMessage, type ValidatePasswordRequest, ValidatePasswordRequestSchema, type ValidatePasswordResponse, ValidatePasswordResponseSchema, decryptRsaOaepSha256B64, encryptRsaOaepSha256ToB64 };
|
|
7
|
+
export { decryptRsaOaepSha256B64, encryptRsaOaepSha256ToB64 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,277 +1,7 @@
|
|
|
1
|
-
|
|
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>;
|
|
1
|
+
export { ConvexUpdate, NewLoginRequest, NewLoginResponse, NewLoginResponseFailure, NewLoginResponseSuccess, ScrapeStatus, UpdateScrapeStatusMessage, ValidatePasswordRequest, ValidatePasswordRequestSchema, ValidatePasswordResponse, ValidatePasswordResponseSchema } from './browser.js';
|
|
2
|
+
import 'zod';
|
|
223
3
|
|
|
224
4
|
declare function encryptRsaOaepSha256ToB64(plaintext: string, publicKeyPem: string): string;
|
|
225
5
|
declare function decryptRsaOaepSha256B64(ciphertextB64: string, privateKeyPem: string, passphrase?: string): string;
|
|
226
6
|
|
|
227
|
-
|
|
228
|
-
NEW_LOGIN_RECEIVED = "NEW_LOGIN_RECEIVED",
|
|
229
|
-
LOGIN_IN_PROGRESS = "LOGIN_IN_PROGRESS",
|
|
230
|
-
LOGIN_SUCCESS = "LOGIN_SUCCESS",
|
|
231
|
-
LOGIN_FAILED = "LOGIN_FAILED",
|
|
232
|
-
DATA_FETCH_IN_PROGRESS = "DATA_FETCH_IN_PROGRESS",
|
|
233
|
-
DATA_FETCH_SUCCESS = "DATA_FETCH_SUCCESS",
|
|
234
|
-
DATA_FETCH_FAILED = "DATA_FETCH_FAILED"
|
|
235
|
-
}
|
|
236
|
-
declare const UpdateScrapeStatusMessage: z$1.ZodObject<{
|
|
237
|
-
status: z$1.ZodNativeEnum<typeof ScrapeStatus>;
|
|
238
|
-
externalProviderAccountId: z$1.ZodString;
|
|
239
|
-
username: z$1.ZodString;
|
|
240
|
-
provider_url: z$1.ZodString;
|
|
241
|
-
}, "strip", z$1.ZodTypeAny, {
|
|
242
|
-
username: string;
|
|
243
|
-
externalProviderAccountId: string;
|
|
244
|
-
status: ScrapeStatus;
|
|
245
|
-
provider_url: string;
|
|
246
|
-
}, {
|
|
247
|
-
username: string;
|
|
248
|
-
externalProviderAccountId: string;
|
|
249
|
-
status: ScrapeStatus;
|
|
250
|
-
provider_url: string;
|
|
251
|
-
}>;
|
|
252
|
-
type UpdateScrapeStatusMessage = z$1.infer<typeof UpdateScrapeStatusMessage>;
|
|
253
|
-
|
|
254
|
-
declare const ValidatePasswordRequestSchema: z.ZodObject<{
|
|
255
|
-
providerAccountId: z.ZodString;
|
|
256
|
-
encryptedPassword: z.ZodString;
|
|
257
|
-
}, "strip", z.ZodTypeAny, {
|
|
258
|
-
encryptedPassword: string;
|
|
259
|
-
providerAccountId: string;
|
|
260
|
-
}, {
|
|
261
|
-
encryptedPassword: string;
|
|
262
|
-
providerAccountId: string;
|
|
263
|
-
}>;
|
|
264
|
-
type ValidatePasswordRequest = z.infer<typeof ValidatePasswordRequestSchema>;
|
|
265
|
-
declare const ValidatePasswordResponseSchema: z.ZodObject<{
|
|
266
|
-
isValid: z.ZodBoolean;
|
|
267
|
-
driverIds: z.ZodArray<z.ZodString, "many">;
|
|
268
|
-
}, "strip", z.ZodTypeAny, {
|
|
269
|
-
driverIds: string[];
|
|
270
|
-
isValid: boolean;
|
|
271
|
-
}, {
|
|
272
|
-
driverIds: string[];
|
|
273
|
-
isValid: boolean;
|
|
274
|
-
}>;
|
|
275
|
-
type ValidatePasswordResponse = z.infer<typeof ValidatePasswordResponseSchema>;
|
|
276
|
-
|
|
277
|
-
export { ConvexUpdate, NewLoginRequest, NewLoginResponse, NewLoginResponseFailure, NewLoginResponseSuccess, ScrapeStatus, UpdateScrapeStatusMessage, type ValidatePasswordRequest, ValidatePasswordRequestSchema, type ValidatePasswordResponse, ValidatePasswordResponseSchema, decryptRsaOaepSha256B64, encryptRsaOaepSha256ToB64 };
|
|
7
|
+
export { decryptRsaOaepSha256B64, encryptRsaOaepSha256ToB64 };
|
package/dist/index.js
CHANGED
|
@@ -1,79 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
{ message: "Invalid URL" }
|
|
13
|
-
);
|
|
14
|
-
var NewLoginRequest = z.object({
|
|
15
|
-
providerUrl: UrlSchema,
|
|
16
|
-
username: z.string().min(1),
|
|
17
|
-
encryptedPassword: z.string().min(1),
|
|
18
|
-
ownerId: z.string(),
|
|
19
|
-
externalProviderAccountId: z.string()
|
|
20
|
-
});
|
|
21
|
-
var PublicUser = z.object({
|
|
22
|
-
id: z.string(),
|
|
23
|
-
username: z.string(),
|
|
24
|
-
created_at: z.coerce.date(),
|
|
25
|
-
updated_at: z.coerce.date()
|
|
26
|
-
});
|
|
27
|
-
var PublicProvider = z.object({
|
|
28
|
-
name: z.string(),
|
|
29
|
-
url: UrlSchema
|
|
30
|
-
});
|
|
31
|
-
var NewLoginResponseSuccess = z.object({
|
|
32
|
-
message: z.string(),
|
|
33
|
-
user: PublicUser,
|
|
34
|
-
provider: PublicProvider,
|
|
35
|
-
driverIds: z.array(z.string()).describe("An array of driver IDs associated with the login"),
|
|
36
|
-
organizationId: z.string().optional(),
|
|
37
|
-
honkUserId: z.string().optional()
|
|
38
|
-
});
|
|
39
|
-
var NewLoginResponseFailure = z.object({
|
|
40
|
-
error: z.string()
|
|
41
|
-
});
|
|
42
|
-
var NewLoginResponse = z.union([NewLoginResponseSuccess, NewLoginResponseFailure]);
|
|
43
|
-
|
|
44
|
-
// src/schemas/drivers/convex-update.ts
|
|
45
|
-
import z2 from "zod";
|
|
46
|
-
var UrlSchema2 = z2.string().refine(
|
|
47
|
-
(val) => {
|
|
48
|
-
try {
|
|
49
|
-
new URL(val);
|
|
50
|
-
return true;
|
|
51
|
-
} catch {
|
|
52
|
-
return false;
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
{ message: "Invalid URL" }
|
|
56
|
-
);
|
|
57
|
-
var ConvexUpdate = z2.object({
|
|
58
|
-
provider_url: UrlSchema2.describe("The URL of the ELD provider"),
|
|
59
|
-
username: z2.string().describe("The driver's login username"),
|
|
60
|
-
driver_name: z2.string().optional().describe("The driver's full name"),
|
|
61
|
-
vehicle_id: z2.string().optional().describe("The vehicle ID"),
|
|
62
|
-
driver_status: z2.string().describe("The driver's duty status (direct from ELD)"),
|
|
63
|
-
time_remaining_in_shift: z2.number().describe("Seconds remaining in current shift"),
|
|
64
|
-
time_remaining_till_break: z2.number().describe("Seconds remaining until next required break"),
|
|
65
|
-
time_remaining_in_week: z2.number().describe("Seconds remaining in current cycle/week"),
|
|
66
|
-
time_remaining_in_drive: z2.number().describe("Seconds remaining in current drive period"),
|
|
67
|
-
driver_current_location_latitude: z2.number().describe("Driver's current latitude"),
|
|
68
|
-
driver_current_location_longitude: z2.number().describe("Driver's current longitude"),
|
|
69
|
-
driver_current_location_address: z2.string().describe("Driver's current address"),
|
|
70
|
-
license_number: z2.string().optional().describe("The driver's license number"),
|
|
71
|
-
license_state: z2.string().optional().describe("The state that issued the driver's license"),
|
|
72
|
-
speed: z2.number().optional().describe("The vehicle's current speed in mph"),
|
|
73
|
-
odometer: z2.number().optional().describe("The vehicle's current odometer reading in miles"),
|
|
74
|
-
convex_provider_account_id: z2.string().describe("The Convex ELD provider account ID"),
|
|
75
|
-
external_provider_account_id: z2.string().describe("The provider account ID on backend")
|
|
76
|
-
}).describe("Schema for updating driver ELD status information");
|
|
1
|
+
import {
|
|
2
|
+
ConvexUpdate,
|
|
3
|
+
NewLoginRequest,
|
|
4
|
+
NewLoginResponse,
|
|
5
|
+
NewLoginResponseFailure,
|
|
6
|
+
NewLoginResponseSuccess,
|
|
7
|
+
ScrapeStatus,
|
|
8
|
+
UpdateScrapeStatusMessage,
|
|
9
|
+
ValidatePasswordRequestSchema,
|
|
10
|
+
ValidatePasswordResponseSchema
|
|
11
|
+
} from "./chunk-XRXOPSCS.js";
|
|
77
12
|
|
|
78
13
|
// src/security/transit-crypto.ts
|
|
79
14
|
import { publicEncrypt, privateDecrypt, constants } from "crypto";
|
|
@@ -100,36 +35,6 @@ function decryptRsaOaepSha256B64(ciphertextB64, privateKeyPem, passphrase) {
|
|
|
100
35
|
);
|
|
101
36
|
return plaintext.toString("utf8");
|
|
102
37
|
}
|
|
103
|
-
|
|
104
|
-
// src/schemas/providerAccounts/update-status.ts
|
|
105
|
-
import z3 from "zod";
|
|
106
|
-
var ScrapeStatus = /* @__PURE__ */ ((ScrapeStatus2) => {
|
|
107
|
-
ScrapeStatus2["NEW_LOGIN_RECEIVED"] = "NEW_LOGIN_RECEIVED";
|
|
108
|
-
ScrapeStatus2["LOGIN_IN_PROGRESS"] = "LOGIN_IN_PROGRESS";
|
|
109
|
-
ScrapeStatus2["LOGIN_SUCCESS"] = "LOGIN_SUCCESS";
|
|
110
|
-
ScrapeStatus2["LOGIN_FAILED"] = "LOGIN_FAILED";
|
|
111
|
-
ScrapeStatus2["DATA_FETCH_IN_PROGRESS"] = "DATA_FETCH_IN_PROGRESS";
|
|
112
|
-
ScrapeStatus2["DATA_FETCH_SUCCESS"] = "DATA_FETCH_SUCCESS";
|
|
113
|
-
ScrapeStatus2["DATA_FETCH_FAILED"] = "DATA_FETCH_FAILED";
|
|
114
|
-
return ScrapeStatus2;
|
|
115
|
-
})(ScrapeStatus || {});
|
|
116
|
-
var UpdateScrapeStatusMessage = z3.object({
|
|
117
|
-
status: z3.nativeEnum(ScrapeStatus).describe("The current status of the scrape process"),
|
|
118
|
-
externalProviderAccountId: z3.string().describe("The external identifier for the provider account"),
|
|
119
|
-
username: z3.string().describe("The username of the provider account whose status is being updated"),
|
|
120
|
-
provider_url: z3.string().describe("The URL of the ELD provider")
|
|
121
|
-
}).describe("Schema for update status messages");
|
|
122
|
-
|
|
123
|
-
// src/schemas/providerAccounts/validate-password.ts
|
|
124
|
-
import { z as z4 } from "zod";
|
|
125
|
-
var ValidatePasswordRequestSchema = z4.object({
|
|
126
|
-
providerAccountId: z4.string().min(1).describe("The unique identifier of the provider account in postgres to validate the password for"),
|
|
127
|
-
encryptedPassword: z4.string().min(1).describe("The encrypted password to validate against the stored password")
|
|
128
|
-
}).describe("Request schema for validating a provider account password");
|
|
129
|
-
var ValidatePasswordResponseSchema = z4.object({
|
|
130
|
-
isValid: z4.boolean().describe("Indicates if the provided password is valid"),
|
|
131
|
-
driverIds: z4.array(z4.string()).describe("List of driver IDs associated with the provider account")
|
|
132
|
-
}).describe("Response schema for password validation");
|
|
133
38
|
export {
|
|
134
39
|
ConvexUpdate,
|
|
135
40
|
NewLoginRequest,
|