@the-inkwell/shared 0.2.50 → 0.2.52
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/schema/admin/candidacies/index.d.ts +2 -2
- package/dist/schema/admin/clients/index.d.ts +1 -1
- package/dist/schema/admin/messages/index.d.ts +2 -2
- package/dist/schema/admin/persons/index.d.ts +9 -9
- package/dist/schema/admin/referrals/index.d.ts +3 -3
- package/dist/schema/admin/referralsToMessages/index.d.ts +2 -2
- package/dist/schema/index.d.ts +1 -0
- package/dist/schema/index.js +1 -0
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/public/index.d.ts +1 -0
- package/dist/schema/public/index.js +18 -0
- package/dist/schema/public/index.js.map +1 -0
- package/dist/schema/public/join/index.d.ts +8 -0
- package/dist/schema/public/join/index.js +22 -0
- package/dist/schema/public/join/index.js.map +1 -0
- package/dist/utils.d.ts +5 -0
- package/dist/utils.js +9 -1
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
|
@@ -345,8 +345,8 @@ export declare const AdminCandidacySelectSchema: z.ZodObject<{
|
|
|
345
345
|
referral: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
346
346
|
id: z.ZodString;
|
|
347
347
|
referrer: z.ZodObject<{
|
|
348
|
-
id: z.ZodUUID;
|
|
349
348
|
email: z.ZodString;
|
|
349
|
+
id: z.ZodUUID;
|
|
350
350
|
firstName: z.ZodNullable<z.ZodString>;
|
|
351
351
|
lastName: z.ZodNullable<z.ZodString>;
|
|
352
352
|
fullName: z.ZodNullable<z.ZodString>;
|
|
@@ -357,8 +357,8 @@ export declare const AdminCandidacySelectSchema: z.ZodObject<{
|
|
|
357
357
|
}>;
|
|
358
358
|
}, z.core.$strip>>>;
|
|
359
359
|
person: z.ZodOptional<z.ZodObject<{
|
|
360
|
-
id: z.ZodUUID;
|
|
361
360
|
email: z.ZodString;
|
|
361
|
+
id: z.ZodUUID;
|
|
362
362
|
firstName: z.ZodNullable<z.ZodString>;
|
|
363
363
|
lastName: z.ZodNullable<z.ZodString>;
|
|
364
364
|
fullName: z.ZodNullable<z.ZodString>;
|
|
@@ -301,8 +301,8 @@ export declare const AdminClientSelectSchema: z.ZodObject<{
|
|
|
301
301
|
updatedAt: z.ZodDate;
|
|
302
302
|
referral: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
303
303
|
referrer: z.ZodObject<{
|
|
304
|
-
id: z.ZodUUID;
|
|
305
304
|
email: z.ZodString;
|
|
305
|
+
id: z.ZodUUID;
|
|
306
306
|
fullName: z.ZodNullable<z.ZodString>;
|
|
307
307
|
}, {
|
|
308
308
|
out: {};
|
|
@@ -386,8 +386,8 @@ export declare const AdminMessageSelectSchema: z.ZodObject<{
|
|
|
386
386
|
createdAt: z.ZodDate;
|
|
387
387
|
updatedAt: z.ZodDate;
|
|
388
388
|
person: z.ZodObject<{
|
|
389
|
-
id: z.ZodUUID;
|
|
390
389
|
email: z.ZodString;
|
|
390
|
+
id: z.ZodUUID;
|
|
391
391
|
fullName: z.ZodNullable<z.ZodString>;
|
|
392
392
|
phone: z.ZodNullable<z.ZodString>;
|
|
393
393
|
}, {
|
|
@@ -395,9 +395,9 @@ export declare const AdminMessageSelectSchema: z.ZodObject<{
|
|
|
395
395
|
in: {};
|
|
396
396
|
}>;
|
|
397
397
|
outboundSender: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
398
|
+
email: z.ZodString;
|
|
398
399
|
name: z.ZodString;
|
|
399
400
|
id: z.ZodUUID;
|
|
400
|
-
email: z.ZodString;
|
|
401
401
|
smsNumber: z.ZodString;
|
|
402
402
|
}, {
|
|
403
403
|
out: {};
|
|
@@ -53,6 +53,7 @@ export declare const AdminPersonExperienceSelectSchema: z.ZodObject<{
|
|
|
53
53
|
in: {};
|
|
54
54
|
}>;
|
|
55
55
|
export declare const AdminPersonCreateSchema: z.ZodObject<{
|
|
56
|
+
email: z.ZodEmail;
|
|
56
57
|
country: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
57
58
|
UNITED_STATES: "UNITED_STATES";
|
|
58
59
|
CANADA: "CANADA";
|
|
@@ -153,7 +154,6 @@ export declare const AdminPersonCreateSchema: z.ZodObject<{
|
|
|
153
154
|
lat: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
154
155
|
lon: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
155
156
|
sourcePersonId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
156
|
-
email: z.ZodEmail;
|
|
157
157
|
emailIsVerified: z.ZodOptional<z.ZodBoolean>;
|
|
158
158
|
firstName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
159
159
|
lastName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -679,8 +679,8 @@ export declare const AdminPersonConnectionsParamsSchema: z.ZodObject<{
|
|
|
679
679
|
in: {};
|
|
680
680
|
}>;
|
|
681
681
|
export declare const AdminPersonConnectionsPersonSchema: z.ZodObject<{
|
|
682
|
-
id: z.ZodUUID;
|
|
683
682
|
email: z.ZodString;
|
|
683
|
+
id: z.ZodUUID;
|
|
684
684
|
fullName: z.ZodNullable<z.ZodString>;
|
|
685
685
|
}, {
|
|
686
686
|
out: {};
|
|
@@ -688,16 +688,16 @@ export declare const AdminPersonConnectionsPersonSchema: z.ZodObject<{
|
|
|
688
688
|
}>;
|
|
689
689
|
export declare const AdminPersonConnectionsResultSchema: z.ZodObject<{
|
|
690
690
|
sourcedPersons: z.ZodArray<z.ZodObject<{
|
|
691
|
-
id: z.ZodUUID;
|
|
692
691
|
email: z.ZodString;
|
|
692
|
+
id: z.ZodUUID;
|
|
693
693
|
fullName: z.ZodNullable<z.ZodString>;
|
|
694
694
|
}, {
|
|
695
695
|
out: {};
|
|
696
696
|
in: {};
|
|
697
697
|
}>>;
|
|
698
698
|
sourcedBy: z.ZodNullable<z.ZodObject<{
|
|
699
|
-
id: z.ZodUUID;
|
|
700
699
|
email: z.ZodString;
|
|
700
|
+
id: z.ZodUUID;
|
|
701
701
|
fullName: z.ZodNullable<z.ZodString>;
|
|
702
702
|
}, {
|
|
703
703
|
out: {};
|
|
@@ -705,8 +705,8 @@ export declare const AdminPersonConnectionsResultSchema: z.ZodObject<{
|
|
|
705
705
|
}>>;
|
|
706
706
|
bestPersons: z.ZodArray<z.ZodObject<{
|
|
707
707
|
bestPerson: z.ZodObject<{
|
|
708
|
-
id: z.ZodUUID;
|
|
709
708
|
email: z.ZodString;
|
|
709
|
+
id: z.ZodUUID;
|
|
710
710
|
fullName: z.ZodNullable<z.ZodString>;
|
|
711
711
|
}, {
|
|
712
712
|
out: {};
|
|
@@ -715,8 +715,8 @@ export declare const AdminPersonConnectionsResultSchema: z.ZodObject<{
|
|
|
715
715
|
}, z.core.$strip>>;
|
|
716
716
|
bestiedBy: z.ZodArray<z.ZodObject<{
|
|
717
717
|
bestiedBy: z.ZodObject<{
|
|
718
|
-
id: z.ZodUUID;
|
|
719
718
|
email: z.ZodString;
|
|
719
|
+
id: z.ZodUUID;
|
|
720
720
|
fullName: z.ZodNullable<z.ZodString>;
|
|
721
721
|
}, {
|
|
722
722
|
out: {};
|
|
@@ -726,8 +726,8 @@ export declare const AdminPersonConnectionsResultSchema: z.ZodObject<{
|
|
|
726
726
|
referrals: z.ZodArray<z.ZodObject<{
|
|
727
727
|
candidacy: z.ZodNullable<z.ZodObject<{
|
|
728
728
|
person: z.ZodObject<{
|
|
729
|
-
id: z.ZodUUID;
|
|
730
729
|
email: z.ZodString;
|
|
730
|
+
id: z.ZodUUID;
|
|
731
731
|
fullName: z.ZodNullable<z.ZodString>;
|
|
732
732
|
}, {
|
|
733
733
|
out: {};
|
|
@@ -738,8 +738,8 @@ export declare const AdminPersonConnectionsResultSchema: z.ZodObject<{
|
|
|
738
738
|
candidacies: z.ZodArray<z.ZodObject<{
|
|
739
739
|
referral: z.ZodNullable<z.ZodObject<{
|
|
740
740
|
referrer: z.ZodObject<{
|
|
741
|
-
id: z.ZodUUID;
|
|
742
741
|
email: z.ZodString;
|
|
742
|
+
id: z.ZodUUID;
|
|
743
743
|
fullName: z.ZodNullable<z.ZodString>;
|
|
744
744
|
}, {
|
|
745
745
|
out: {};
|
|
@@ -763,6 +763,7 @@ export type AdminPersonUpdateParams = z.infer<typeof AdminPersonUpdateParamsSche
|
|
|
763
763
|
export type AdminPersonUpdateInput = Partial<AdminPerson>;
|
|
764
764
|
export type AdminPersonDeleteParams = z.infer<typeof AdminPersonDeleteParamsSchema>;
|
|
765
765
|
export declare const ResumeParserSchema: z.ZodObject<{
|
|
766
|
+
email: z.ZodString;
|
|
766
767
|
country: z.ZodNullable<z.ZodEnum<{
|
|
767
768
|
UNITED_STATES: "UNITED_STATES";
|
|
768
769
|
CANADA: "CANADA";
|
|
@@ -848,7 +849,6 @@ export declare const ResumeParserSchema: z.ZodObject<{
|
|
|
848
849
|
YT: "YT";
|
|
849
850
|
}>>;
|
|
850
851
|
city: z.ZodNullable<z.ZodString>;
|
|
851
|
-
email: z.ZodString;
|
|
852
852
|
firstName: z.ZodNullable<z.ZodString>;
|
|
853
853
|
lastName: z.ZodNullable<z.ZodString>;
|
|
854
854
|
linkedInUrl: z.ZodNullable<z.ZodString>;
|
|
@@ -207,8 +207,8 @@ export declare const AdminReferralCreateSchema: import("drizzle-zod").BuildSchem
|
|
|
207
207
|
}, {}, {}>;
|
|
208
208
|
}, undefined, undefined>;
|
|
209
209
|
export declare const AdminReferralPersonSelectSchema: z.ZodObject<{
|
|
210
|
-
id: z.ZodUUID;
|
|
211
210
|
email: z.ZodString;
|
|
211
|
+
id: z.ZodUUID;
|
|
212
212
|
firstName: z.ZodNullable<z.ZodString>;
|
|
213
213
|
lastName: z.ZodNullable<z.ZodString>;
|
|
214
214
|
fullName: z.ZodNullable<z.ZodString>;
|
|
@@ -239,8 +239,8 @@ export declare const AdminReferralSelectSchema: z.ZodObject<{
|
|
|
239
239
|
createdAt: z.ZodDate;
|
|
240
240
|
updatedAt: z.ZodDate;
|
|
241
241
|
referrer: z.ZodOptional<z.ZodObject<{
|
|
242
|
-
id: z.ZodUUID;
|
|
243
242
|
email: z.ZodString;
|
|
243
|
+
id: z.ZodUUID;
|
|
244
244
|
firstName: z.ZodNullable<z.ZodString>;
|
|
245
245
|
lastName: z.ZodNullable<z.ZodString>;
|
|
246
246
|
fullName: z.ZodNullable<z.ZodString>;
|
|
@@ -264,8 +264,8 @@ export declare const AdminReferralSelectSchema: z.ZodObject<{
|
|
|
264
264
|
HIRED: "HIRED";
|
|
265
265
|
}>>;
|
|
266
266
|
person: z.ZodOptional<z.ZodObject<{
|
|
267
|
-
id: z.ZodUUID;
|
|
268
267
|
email: z.ZodString;
|
|
268
|
+
id: z.ZodUUID;
|
|
269
269
|
firstName: z.ZodNullable<z.ZodString>;
|
|
270
270
|
lastName: z.ZodNullable<z.ZodString>;
|
|
271
271
|
fullName: z.ZodNullable<z.ZodString>;
|
|
@@ -84,8 +84,8 @@ export declare const AdminReferralToMessageSelectSchema: z.ZodObject<{
|
|
|
84
84
|
}>;
|
|
85
85
|
referral: z.ZodObject<{
|
|
86
86
|
referrer: z.ZodObject<{
|
|
87
|
-
id: z.ZodUUID;
|
|
88
87
|
email: z.ZodString;
|
|
88
|
+
id: z.ZodUUID;
|
|
89
89
|
fullName: z.ZodNullable<z.ZodString>;
|
|
90
90
|
}, {
|
|
91
91
|
out: {};
|
|
@@ -100,8 +100,8 @@ export declare const AdminReferralToMessageSelectSchema: z.ZodObject<{
|
|
|
100
100
|
}>>>;
|
|
101
101
|
candidacy: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
102
102
|
person: z.ZodObject<{
|
|
103
|
-
id: z.ZodUUID;
|
|
104
103
|
email: z.ZodString;
|
|
104
|
+
id: z.ZodUUID;
|
|
105
105
|
fullName: z.ZodNullable<z.ZodString>;
|
|
106
106
|
}, {
|
|
107
107
|
out: {};
|
package/dist/schema/index.d.ts
CHANGED
package/dist/schema/index.js
CHANGED
|
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./admin"), exports);
|
|
18
18
|
__exportStar(require("./auth"), exports);
|
|
19
19
|
__exportStar(require("./core"), exports);
|
|
20
|
+
__exportStar(require("./public"), exports);
|
|
20
21
|
//# sourceMappingURL=index.js.map
|
package/dist/schema/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,yCAAsB;AACtB,yCAAsB","sourcesContent":["export * from './admin'\nexport * from './auth'\nexport * from './core'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,yCAAsB;AACtB,yCAAsB;AACtB,2CAAwB","sourcesContent":["export * from './admin'\nexport * from './auth'\nexport * from './core'\nexport * from './public'\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './join';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./join"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema/public/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB","sourcesContent":["export * from './join'\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
export declare const PublicJoinCreateSchema: z.ZodObject<{
|
|
3
|
+
email: z.ZodEmail;
|
|
4
|
+
firstName: z.ZodString;
|
|
5
|
+
lastName: z.ZodString;
|
|
6
|
+
linkedInUrl: z.ZodURL;
|
|
7
|
+
}, z.core.$strict>;
|
|
8
|
+
export type PublicJoinCreateInput = z.infer<typeof PublicJoinCreateSchema>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PublicJoinCreateSchema = void 0;
|
|
4
|
+
const drizzle_zod_1 = require("drizzle-zod");
|
|
5
|
+
const core_1 = require("../../core");
|
|
6
|
+
const utils_1 = require("../../../utils");
|
|
7
|
+
//// validators
|
|
8
|
+
exports.PublicJoinCreateSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.person, {
|
|
9
|
+
firstName: utils_1.PersonFirstNameSchema,
|
|
10
|
+
lastName: utils_1.PersonLastNameSchema,
|
|
11
|
+
phone: utils_1.PhoneSchema,
|
|
12
|
+
email: utils_1.EmailSchema,
|
|
13
|
+
linkedInUrl: utils_1.LinkedInUrlSchema
|
|
14
|
+
})
|
|
15
|
+
.pick({
|
|
16
|
+
firstName: true,
|
|
17
|
+
lastName: true,
|
|
18
|
+
email: true,
|
|
19
|
+
linkedInUrl: true
|
|
20
|
+
})
|
|
21
|
+
.strict();
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/public/join/index.ts"],"names":[],"mappings":";;;AAAA,6CAAgD;AAChD,qCAAmC;AAEnC,0CAMuB;AAEvB,eAAe;AAEF,QAAA,sBAAsB,GAAG,IAAA,gCAAkB,EAAC,aAAM,EAAE;IAC/D,SAAS,EAAE,6BAAqB;IAChC,QAAQ,EAAE,4BAAoB;IAC9B,KAAK,EAAE,mBAAW;IAClB,KAAK,EAAE,mBAAW;IAClB,WAAW,EAAE,yBAAiB;CAC/B,CAAC;KACC,IAAI,CAAC;IACJ,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;IACX,WAAW,EAAE,IAAI;CAClB,CAAC;KACD,MAAM,EAAE,CAAA","sourcesContent":["import { createInsertSchema } from 'drizzle-zod'\nimport { person } from '../../core'\nimport { z } from 'zod/v4'\nimport {\n EmailSchema,\n LinkedInUrlSchema,\n PersonFirstNameSchema,\n PersonLastNameSchema,\n PhoneSchema\n} from '../../../utils'\n\n//// validators\n\nexport const PublicJoinCreateSchema = createInsertSchema(person, {\n firstName: PersonFirstNameSchema,\n lastName: PersonLastNameSchema,\n phone: PhoneSchema,\n email: EmailSchema,\n linkedInUrl: LinkedInUrlSchema\n})\n .pick({\n firstName: true,\n lastName: true,\n email: true,\n linkedInUrl: true\n })\n .strict()\n\n//// types\n\n// create\nexport type PublicJoinCreateInput = z.infer<typeof PublicJoinCreateSchema>\n"]}
|
package/dist/utils.d.ts
CHANGED
|
@@ -21,3 +21,8 @@ export declare const makeEnumFromObj: <T extends {
|
|
|
21
21
|
position: number;
|
|
22
22
|
};
|
|
23
23
|
}>(obj: T) => [keyof typeof obj];
|
|
24
|
+
export declare const PersonFirstNameSchema: z.ZodString;
|
|
25
|
+
export declare const PersonLastNameSchema: z.ZodString;
|
|
26
|
+
export declare const EmailSchema: z.ZodEmail;
|
|
27
|
+
export declare const PhoneSchema: z.ZodString;
|
|
28
|
+
export declare const LinkedInUrlSchema: z.ZodURL;
|
package/dist/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeEnumFromObj = exports.ListQuerySchema = void 0;
|
|
3
|
+
exports.LinkedInUrlSchema = exports.PhoneSchema = exports.EmailSchema = exports.PersonLastNameSchema = exports.PersonFirstNameSchema = exports.makeEnumFromObj = exports.ListQuerySchema = void 0;
|
|
4
4
|
const v4_1 = require("zod/v4");
|
|
5
5
|
exports.ListQuerySchema = v4_1.z.object({
|
|
6
6
|
limit: v4_1.z.number().max(1000).optional(),
|
|
@@ -15,4 +15,12 @@ const makeEnumFromObj = (obj) => {
|
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
exports.makeEnumFromObj = makeEnumFromObj;
|
|
18
|
+
exports.PersonFirstNameSchema = v4_1.z.string().min(1, 'First name is required');
|
|
19
|
+
exports.PersonLastNameSchema = v4_1.z.string().min(1, 'Last name is required');
|
|
20
|
+
exports.EmailSchema = v4_1.z.email('Invalid email address');
|
|
21
|
+
exports.PhoneSchema = v4_1.z.string().min(1, 'Phone number is required');
|
|
22
|
+
exports.LinkedInUrlSchema = v4_1.z.url({
|
|
23
|
+
protocol: /^https$/,
|
|
24
|
+
hostname: /^linkedin\.com$/
|
|
25
|
+
});
|
|
18
26
|
//# sourceMappingURL=utils.js.map
|
package/dist/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;AAAA,+BAA0B;AAkBb,QAAA,eAAe,GAAG,MAAC,CAAC,MAAM,CAAC;IACtC,KAAK,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;IACtC,MAAM,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,IAAI,EAAE,MAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC7B,MAAM,EAAE,MAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAA;AAEK,MAAM,eAAe,GAAG,CAQ7B,GAAM,EACN,EAAE;IACF,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACpC,OAAO,CACL,GAAG,CAAC,CAAqB,CAAE,CAAC,QAAQ;YACpC,GAAG,CAAC,CAAqB,CAAE,CAAC,QAAQ,CACrC,CAAA;IACH,CAAC,CAAuB,CAAA;AAC1B,CAAC,CAAA;AAhBY,QAAA,eAAe,mBAgB3B","sourcesContent":["import { z } from 'zod/v4'\n\nexport type ListResponse<T> = {\n count: number\n results: T[]\n}\n\nexport type ListRequest<\n TSort = unknown,\n TFilter = unknown,\n TAdditional = unknown\n> = TAdditional & {\n limit?: number\n offset?: number\n sort?: TSort\n filter?: TFilter\n}\n\nexport const ListQuerySchema = z.object({\n limit: z.number().max(1000).optional(),\n offset: z.number().optional(),\n sort: z.object({}).optional(),\n filter: z.object({}).optional()\n})\n\nexport const makeEnumFromObj = <\n T extends {\n [key: string]: {\n name: string\n position: number\n }\n }\n>(\n obj: T\n) => {\n return Object.keys(obj).sort((a, b) => {\n return (\n obj[a as keyof typeof obj]!.position -\n obj[b as keyof typeof obj]!.position\n )\n }) as [keyof typeof obj]\n}\n"]}
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;AAAA,+BAA0B;AAkBb,QAAA,eAAe,GAAG,MAAC,CAAC,MAAM,CAAC;IACtC,KAAK,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;IACtC,MAAM,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,IAAI,EAAE,MAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC7B,MAAM,EAAE,MAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAA;AAEK,MAAM,eAAe,GAAG,CAQ7B,GAAM,EACN,EAAE;IACF,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACpC,OAAO,CACL,GAAG,CAAC,CAAqB,CAAE,CAAC,QAAQ;YACpC,GAAG,CAAC,CAAqB,CAAE,CAAC,QAAQ,CACrC,CAAA;IACH,CAAC,CAAuB,CAAA;AAC1B,CAAC,CAAA;AAhBY,QAAA,eAAe,mBAgB3B;AAEY,QAAA,qBAAqB,GAAG,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,wBAAwB,CAAC,CAAA;AACnE,QAAA,oBAAoB,GAAG,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,uBAAuB,CAAC,CAAA;AAEjE,QAAA,WAAW,GAAG,MAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAA;AAC9C,QAAA,WAAW,GAAG,MAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,0BAA0B,CAAC,CAAA;AAC3D,QAAA,iBAAiB,GAAG,MAAC,CAAC,GAAG,CAAC;IACrC,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,iBAAiB;CAC5B,CAAC,CAAA","sourcesContent":["import { z } from 'zod/v4'\n\nexport type ListResponse<T> = {\n count: number\n results: T[]\n}\n\nexport type ListRequest<\n TSort = unknown,\n TFilter = unknown,\n TAdditional = unknown\n> = TAdditional & {\n limit?: number\n offset?: number\n sort?: TSort\n filter?: TFilter\n}\n\nexport const ListQuerySchema = z.object({\n limit: z.number().max(1000).optional(),\n offset: z.number().optional(),\n sort: z.object({}).optional(),\n filter: z.object({}).optional()\n})\n\nexport const makeEnumFromObj = <\n T extends {\n [key: string]: {\n name: string\n position: number\n }\n }\n>(\n obj: T\n) => {\n return Object.keys(obj).sort((a, b) => {\n return (\n obj[a as keyof typeof obj]!.position -\n obj[b as keyof typeof obj]!.position\n )\n }) as [keyof typeof obj]\n}\n\nexport const PersonFirstNameSchema = z.string().min(1, 'First name is required')\nexport const PersonLastNameSchema = z.string().min(1, 'Last name is required')\n\nexport const EmailSchema = z.email('Invalid email address')\nexport const PhoneSchema = z.string().min(1, 'Phone number is required')\nexport const LinkedInUrlSchema = z.url({\n protocol: /^https$/,\n hostname: /^linkedin\\.com$/\n})\n"]}
|