@findatruck/shared-schemas 2.9.1 → 2.10.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 +2 -32
- package/dist/index.d.cts +1 -4
- package/dist/index.d.ts +1 -4
- package/dist/index.js +1 -29
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -52,9 +52,7 @@ __export(index_exports, {
|
|
|
52
52
|
StateHeatmapResponseSchema: () => StateHeatmapResponseSchema,
|
|
53
53
|
UpdateScrapeStatusMessage: () => UpdateScrapeStatusMessage,
|
|
54
54
|
ValidatePasswordRequestSchema: () => ValidatePasswordRequestSchema,
|
|
55
|
-
ValidatePasswordResponseSchema: () => ValidatePasswordResponseSchema
|
|
56
|
-
decryptRsaOaepSha256B64: () => decryptRsaOaepSha256B64,
|
|
57
|
-
encryptRsaOaepSha256ToB64: () => encryptRsaOaepSha256ToB64
|
|
55
|
+
ValidatePasswordResponseSchema: () => ValidatePasswordResponseSchema
|
|
58
56
|
});
|
|
59
57
|
module.exports = __toCommonJS(index_exports);
|
|
60
58
|
|
|
@@ -153,32 +151,6 @@ var BatchConvexUpdateSchema = import_zod2.default.object({
|
|
|
153
151
|
var ConvexUpdate = ConvexUpdateSchema;
|
|
154
152
|
var BatchConvexUpdate = BatchConvexUpdateSchema;
|
|
155
153
|
|
|
156
|
-
// src/security/transit-crypto.ts
|
|
157
|
-
var import_node_crypto = require("crypto");
|
|
158
|
-
function encryptRsaOaepSha256ToB64(plaintext, publicKeyPem) {
|
|
159
|
-
const ciphertext = (0, import_node_crypto.publicEncrypt)(
|
|
160
|
-
{
|
|
161
|
-
key: publicKeyPem,
|
|
162
|
-
padding: import_node_crypto.constants.RSA_PKCS1_OAEP_PADDING,
|
|
163
|
-
oaepHash: "sha256"
|
|
164
|
-
},
|
|
165
|
-
Buffer.from(plaintext, "utf8")
|
|
166
|
-
);
|
|
167
|
-
return ciphertext.toString("base64");
|
|
168
|
-
}
|
|
169
|
-
function decryptRsaOaepSha256B64(ciphertextB64, privateKeyPem, passphrase) {
|
|
170
|
-
const plaintext = (0, import_node_crypto.privateDecrypt)(
|
|
171
|
-
{
|
|
172
|
-
key: privateKeyPem,
|
|
173
|
-
passphrase,
|
|
174
|
-
padding: import_node_crypto.constants.RSA_PKCS1_OAEP_PADDING,
|
|
175
|
-
oaepHash: "sha256"
|
|
176
|
-
},
|
|
177
|
-
Buffer.from(ciphertextB64, "base64")
|
|
178
|
-
);
|
|
179
|
-
return plaintext.toString("utf8");
|
|
180
|
-
}
|
|
181
|
-
|
|
182
154
|
// src/schemas/providerAccounts/update-status.ts
|
|
183
155
|
var import_zod3 = __toESM(require("zod"), 1);
|
|
184
156
|
var ScrapeStatus = /* @__PURE__ */ ((ScrapeStatus2) => {
|
|
@@ -266,7 +238,5 @@ var StateHeatmapResponseSchema = import_zod6.z.record(
|
|
|
266
238
|
StateHeatmapResponseSchema,
|
|
267
239
|
UpdateScrapeStatusMessage,
|
|
268
240
|
ValidatePasswordRequestSchema,
|
|
269
|
-
ValidatePasswordResponseSchema
|
|
270
|
-
decryptRsaOaepSha256B64,
|
|
271
|
-
encryptRsaOaepSha256ToB64
|
|
241
|
+
ValidatePasswordResponseSchema
|
|
272
242
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
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
|
-
declare function encryptRsaOaepSha256ToB64(plaintext: string, publicKeyPem: string): string;
|
|
5
|
-
declare function decryptRsaOaepSha256B64(ciphertextB64: string, privateKeyPem: string, passphrase?: string): string;
|
|
6
|
-
|
|
7
4
|
interface DriverRankingsRequestData {
|
|
8
5
|
start_date: string;
|
|
9
6
|
end_date: string;
|
|
@@ -64,4 +61,4 @@ type StateHeatmapRequest = StateHeatmapRequestData;
|
|
|
64
61
|
type StateHeatmapEntry = StateHeatmapEntryData;
|
|
65
62
|
type StateHeatmapResponse = StateHeatmapResponseData;
|
|
66
63
|
|
|
67
|
-
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
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
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
|
-
declare function encryptRsaOaepSha256ToB64(plaintext: string, publicKeyPem: string): string;
|
|
5
|
-
declare function decryptRsaOaepSha256B64(ciphertextB64: string, privateKeyPem: string, passphrase?: string): string;
|
|
6
|
-
|
|
7
4
|
interface DriverRankingsRequestData {
|
|
8
5
|
start_date: string;
|
|
9
6
|
end_date: string;
|
|
@@ -64,4 +61,4 @@ type StateHeatmapRequest = StateHeatmapRequestData;
|
|
|
64
61
|
type StateHeatmapEntry = StateHeatmapEntryData;
|
|
65
62
|
type StateHeatmapResponse = StateHeatmapResponseData;
|
|
66
63
|
|
|
67
|
-
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
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -18,32 +18,6 @@ import {
|
|
|
18
18
|
ValidatePasswordResponseSchema
|
|
19
19
|
} from "./chunk-CUV2KQXS.js";
|
|
20
20
|
|
|
21
|
-
// src/security/transit-crypto.ts
|
|
22
|
-
import { publicEncrypt, privateDecrypt, constants } from "crypto";
|
|
23
|
-
function encryptRsaOaepSha256ToB64(plaintext, publicKeyPem) {
|
|
24
|
-
const ciphertext = publicEncrypt(
|
|
25
|
-
{
|
|
26
|
-
key: publicKeyPem,
|
|
27
|
-
padding: constants.RSA_PKCS1_OAEP_PADDING,
|
|
28
|
-
oaepHash: "sha256"
|
|
29
|
-
},
|
|
30
|
-
Buffer.from(plaintext, "utf8")
|
|
31
|
-
);
|
|
32
|
-
return ciphertext.toString("base64");
|
|
33
|
-
}
|
|
34
|
-
function decryptRsaOaepSha256B64(ciphertextB64, privateKeyPem, passphrase) {
|
|
35
|
-
const plaintext = privateDecrypt(
|
|
36
|
-
{
|
|
37
|
-
key: privateKeyPem,
|
|
38
|
-
passphrase,
|
|
39
|
-
padding: constants.RSA_PKCS1_OAEP_PADDING,
|
|
40
|
-
oaepHash: "sha256"
|
|
41
|
-
},
|
|
42
|
-
Buffer.from(ciphertextB64, "base64")
|
|
43
|
-
);
|
|
44
|
-
return plaintext.toString("utf8");
|
|
45
|
-
}
|
|
46
|
-
|
|
47
21
|
// src/schemas/telemetry/driver-rankings.ts
|
|
48
22
|
import { z } from "zod";
|
|
49
23
|
var DriverRankingsRequestSchema = z.object({
|
|
@@ -97,7 +71,5 @@ export {
|
|
|
97
71
|
StateHeatmapResponseSchema,
|
|
98
72
|
UpdateScrapeStatusMessage,
|
|
99
73
|
ValidatePasswordRequestSchema,
|
|
100
|
-
ValidatePasswordResponseSchema
|
|
101
|
-
decryptRsaOaepSha256B64,
|
|
102
|
-
encryptRsaOaepSha256ToB64
|
|
74
|
+
ValidatePasswordResponseSchema
|
|
103
75
|
};
|