@the-inkwell/shared 0.2.0 → 0.2.2
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/constants.d.ts +769 -0
- package/dist/{src/constants.js → constants.js} +1 -0
- package/dist/constants.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -0
- package/dist/schema/admin/actions/index.d.ts +796 -0
- package/dist/{src/schema → schema}/admin/actions/index.js +1 -0
- package/dist/schema/admin/actions/index.js.map +1 -0
- package/dist/schema/admin/campaigns/index.d.ts +490 -0
- package/dist/{src/schema → schema}/admin/campaigns/index.js +1 -0
- package/dist/schema/admin/campaigns/index.js.map +1 -0
- package/dist/schema/admin/candidacies/index.d.ts +765 -0
- package/dist/{src/schema → schema}/admin/candidacies/index.js +1 -0
- package/dist/schema/admin/candidacies/index.js.map +1 -0
- package/dist/schema/admin/clients/index.d.ts +339 -0
- package/dist/{src/schema → schema}/admin/clients/index.js +1 -0
- package/dist/schema/admin/clients/index.js.map +1 -0
- package/dist/schema/admin/dashboard/index.d.ts +10 -0
- package/dist/{src/schema → schema}/admin/dashboard/index.js +1 -0
- package/dist/schema/admin/dashboard/index.js.map +1 -0
- package/dist/schema/admin/educations/index.d.ts +360 -0
- package/dist/{src/schema → schema}/admin/educations/index.js +1 -0
- package/dist/schema/admin/educations/index.js.map +1 -0
- package/dist/schema/admin/experiences/index.d.ts +466 -0
- package/dist/{src/schema → schema}/admin/experiences/index.js +1 -0
- package/dist/schema/admin/experiences/index.js.map +1 -0
- package/dist/schema/admin/files/index.d.ts +8 -0
- package/dist/{src/schema → schema}/admin/files/index.js +1 -0
- package/dist/schema/admin/files/index.js.map +1 -0
- package/dist/schema/admin/index.d.ts +29 -0
- package/dist/{src/schema → schema}/admin/index.js +1 -0
- package/dist/schema/admin/index.js.map +1 -0
- package/dist/schema/admin/jobFunctions/index.d.ts +362 -0
- package/dist/{src/schema → schema}/admin/jobFunctions/index.js +1 -0
- package/dist/schema/admin/jobFunctions/index.js.map +1 -0
- package/dist/schema/admin/listViews/index.d.ts +575 -0
- package/dist/{src/schema → schema}/admin/listViews/index.js +1 -0
- package/dist/schema/admin/listViews/index.js.map +1 -0
- package/dist/schema/admin/locations/index.d.ts +27 -0
- package/dist/{src/schema → schema}/admin/locations/index.js +1 -0
- package/dist/schema/admin/locations/index.js.map +1 -0
- package/dist/schema/admin/messages/index.d.ts +800 -0
- package/dist/{src/schema → schema}/admin/messages/index.js +1 -0
- package/dist/schema/admin/messages/index.js.map +1 -0
- package/dist/schema/admin/notes/index.d.ts +558 -0
- package/dist/{src/schema → schema}/admin/notes/index.js +1 -0
- package/dist/schema/admin/notes/index.js.map +1 -0
- package/dist/schema/admin/partners/index.d.ts +334 -0
- package/dist/{src/schema → schema}/admin/partners/index.js +1 -0
- package/dist/schema/admin/partners/index.js.map +1 -0
- package/dist/schema/admin/persons/index.d.ts +889 -0
- package/dist/{src/schema → schema}/admin/persons/index.js +1 -0
- package/dist/schema/admin/persons/index.js.map +1 -0
- package/dist/schema/admin/personsToBestPersons/index.d.ts +198 -0
- package/dist/{src/schema → schema}/admin/personsToBestPersons/index.js +1 -0
- package/dist/schema/admin/personsToBestPersons/index.js.map +1 -0
- package/dist/schema/admin/personsToSkills/index.d.ts +198 -0
- package/dist/{src/schema → schema}/admin/personsToSkills/index.js +1 -0
- package/dist/schema/admin/personsToSkills/index.js.map +1 -0
- package/dist/schema/admin/personsToTags/index.d.ts +198 -0
- package/dist/{src/schema → schema}/admin/personsToTags/index.js +1 -0
- package/dist/schema/admin/personsToTags/index.js.map +1 -0
- package/dist/schema/admin/positions/index.d.ts +1328 -0
- package/dist/{src/schema → schema}/admin/positions/index.js +1 -0
- package/dist/schema/admin/positions/index.js.map +1 -0
- package/dist/schema/admin/positionsToSkills/index.d.ts +198 -0
- package/dist/{src/schema → schema}/admin/positionsToSkills/index.js +1 -0
- package/dist/schema/admin/positionsToSkills/index.js.map +1 -0
- package/dist/schema/admin/positionsToTags/index.d.ts +198 -0
- package/dist/{src/schema → schema}/admin/positionsToTags/index.js +1 -0
- package/dist/schema/admin/positionsToTags/index.js.map +1 -0
- package/dist/schema/admin/referrals/index.d.ts +477 -0
- package/dist/{src/schema → schema}/admin/referrals/index.js +1 -0
- package/dist/schema/admin/referrals/index.js.map +1 -0
- package/dist/schema/admin/referralsToMessages/index.d.ts +243 -0
- package/dist/{src/schema → schema}/admin/referralsToMessages/index.js +1 -0
- package/dist/schema/admin/referralsToMessages/index.js.map +1 -0
- package/dist/schema/admin/senders/index.d.ts +451 -0
- package/dist/{src/schema → schema}/admin/senders/index.js +1 -0
- package/dist/schema/admin/senders/index.js.map +1 -0
- package/dist/schema/admin/sendgrid/index.d.ts +9 -0
- package/dist/{src/schema → schema}/admin/sendgrid/index.js +1 -0
- package/dist/schema/admin/sendgrid/index.js.map +1 -0
- package/dist/schema/admin/settings/index.d.ts +30 -0
- package/dist/{src/schema → schema}/admin/settings/index.js +1 -0
- package/dist/schema/admin/settings/index.js.map +1 -0
- package/dist/schema/admin/skills/index.d.ts +362 -0
- package/dist/{src/schema → schema}/admin/skills/index.js +1 -0
- package/dist/schema/admin/skills/index.js.map +1 -0
- package/dist/schema/admin/tags/index.d.ts +355 -0
- package/dist/{src/schema → schema}/admin/tags/index.js +1 -0
- package/dist/schema/admin/tags/index.js.map +1 -0
- package/dist/schema/admin/websiteLandingPages/index.d.ts +562 -0
- package/dist/{src/schema → schema}/admin/websiteLandingPages/index.js +1 -0
- package/dist/schema/admin/websiteLandingPages/index.js.map +1 -0
- package/dist/schema/admin/websiteStaticPages/index.d.ts +385 -0
- package/dist/{src/schema → schema}/admin/websiteStaticPages/index.js +1 -0
- package/dist/schema/admin/websiteStaticPages/index.js.map +1 -0
- package/dist/schema/auth/index.d.ts +15 -0
- package/dist/{src/schema → schema}/auth/index.js +1 -0
- package/dist/schema/auth/index.js.map +1 -0
- package/dist/schema/core.d.ts +6335 -0
- package/dist/{src/schema → schema}/core.js +1 -0
- package/dist/schema/core.js.map +1 -0
- package/dist/schema/index.d.ts +3 -0
- package/dist/{src/schema → schema}/index.js +1 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/utils.d.ts +23 -0
- package/dist/{src/utils.js → utils.js} +3 -1
- package/dist/utils.js.map +1 -0
- package/package.json +6 -6
- package/.prettierrc.json +0 -6
- package/index.ts +0 -3
- package/src/constants.ts +0 -299
- package/src/schema/admin/actions/index.ts +0 -65
- package/src/schema/admin/campaigns/index.ts +0 -111
- package/src/schema/admin/candidacies/index.ts +0 -138
- package/src/schema/admin/clients/index.ts +0 -65
- package/src/schema/admin/dashboard/index.ts +0 -10
- package/src/schema/admin/educations/index.ts +0 -71
- package/src/schema/admin/experiences/index.ts +0 -87
- package/src/schema/admin/files/index.ts +0 -10
- package/src/schema/admin/index.ts +0 -29
- package/src/schema/admin/jobFunctions/index.ts +0 -79
- package/src/schema/admin/listViews/index.ts +0 -58
- package/src/schema/admin/locations/index.ts +0 -42
- package/src/schema/admin/messages/index.ts +0 -88
- package/src/schema/admin/notes/index.ts +0 -56
- package/src/schema/admin/partners/index.ts +0 -60
- package/src/schema/admin/persons/index.ts +0 -294
- package/src/schema/admin/personsToBestPersons/index.ts +0 -67
- package/src/schema/admin/personsToSkills/index.ts +0 -61
- package/src/schema/admin/personsToTags/index.ts +0 -61
- package/src/schema/admin/positions/index.ts +0 -97
- package/src/schema/admin/positionsToSkills/index.ts +0 -64
- package/src/schema/admin/positionsToTags/index.ts +0 -61
- package/src/schema/admin/referrals/index.ts +0 -100
- package/src/schema/admin/referralsToMessages/index.ts +0 -121
- package/src/schema/admin/senders/index.ts +0 -50
- package/src/schema/admin/sendgrid/index.ts +0 -16
- package/src/schema/admin/settings/index.ts +0 -34
- package/src/schema/admin/skills/index.ts +0 -64
- package/src/schema/admin/tags/index.ts +0 -56
- package/src/schema/admin/websiteLandingPages/index.ts +0 -69
- package/src/schema/admin/websiteStaticPages/index.ts +0 -67
- package/src/schema/auth/index.ts +0 -14
- package/src/schema/core.ts +0 -1906
- package/src/schema/index.ts +0 -3
- package/src/utils.ts +0 -41
- package/tsconfig.json +0 -111
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createInsertSchema,
|
|
3
|
-
createSelectSchema,
|
|
4
|
-
createUpdateSchema
|
|
5
|
-
} from 'drizzle-zod'
|
|
6
|
-
import { education } from '../../core'
|
|
7
|
-
import { ListQuerySchema, type ListResponse } from '../../../utils'
|
|
8
|
-
import { z } from 'zod/v4'
|
|
9
|
-
|
|
10
|
-
const upsertEducationSchema = {
|
|
11
|
-
graduatedAt: z.null().or(z.coerce.date()).optional()
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
//// validators
|
|
15
|
-
|
|
16
|
-
export const AdminEducationCreateSchema = createInsertSchema(
|
|
17
|
-
education,
|
|
18
|
-
upsertEducationSchema
|
|
19
|
-
)
|
|
20
|
-
export const AdminEducationSelectSchema = createSelectSchema(education)
|
|
21
|
-
export const AdminEducationUpdateSchema = createUpdateSchema(
|
|
22
|
-
education,
|
|
23
|
-
upsertEducationSchema
|
|
24
|
-
)
|
|
25
|
-
|
|
26
|
-
export const AdminEducationParamsSchema = AdminEducationSelectSchema.pick({
|
|
27
|
-
id: true
|
|
28
|
-
})
|
|
29
|
-
export const AdminEducationListQuerySchema = ListQuerySchema
|
|
30
|
-
export const AdminEducationUpdateParamsSchema = AdminEducationParamsSchema
|
|
31
|
-
export const AdminEducationDeleteParamsSchema = AdminEducationParamsSchema
|
|
32
|
-
export const AdminEducationDeleteByPersonParamsSchema =
|
|
33
|
-
AdminEducationSelectSchema.pick({
|
|
34
|
-
personId: true
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
//// types
|
|
38
|
-
|
|
39
|
-
type AdminEducation = z.infer<typeof AdminEducationSelectSchema>
|
|
40
|
-
|
|
41
|
-
// detail
|
|
42
|
-
export type AdminEducationParams = z.infer<typeof AdminEducationParamsSchema>
|
|
43
|
-
export type AdminEducationResult = AdminEducation
|
|
44
|
-
|
|
45
|
-
// list
|
|
46
|
-
export type AdminEducationListQuery = z.infer<
|
|
47
|
-
typeof AdminEducationListQuerySchema
|
|
48
|
-
>
|
|
49
|
-
export type AdminEducationListResult = ListResponse<
|
|
50
|
-
z.infer<typeof AdminEducationSelectSchema>
|
|
51
|
-
>
|
|
52
|
-
|
|
53
|
-
// create
|
|
54
|
-
export type AdminEducationCreateInput = z.infer<
|
|
55
|
-
typeof AdminEducationCreateSchema
|
|
56
|
-
>
|
|
57
|
-
export type AdminEducationCreateResult = Pick<AdminEducation, 'id'>
|
|
58
|
-
|
|
59
|
-
// update
|
|
60
|
-
export type AdminEducationUpdateParams = z.infer<
|
|
61
|
-
typeof AdminEducationUpdateParamsSchema
|
|
62
|
-
>
|
|
63
|
-
export type AdminEducationUpdateInput = Partial<AdminEducation>
|
|
64
|
-
|
|
65
|
-
// delete
|
|
66
|
-
export type AdminEducationDeleteParams = z.infer<
|
|
67
|
-
typeof AdminEducationDeleteParamsSchema
|
|
68
|
-
>
|
|
69
|
-
export type AdminEducationDeleteByPersonParams = z.infer<
|
|
70
|
-
typeof AdminEducationDeleteByPersonParamsSchema
|
|
71
|
-
>
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createInsertSchema,
|
|
3
|
-
createSelectSchema,
|
|
4
|
-
createUpdateSchema
|
|
5
|
-
} from 'drizzle-zod'
|
|
6
|
-
import { experience, industry, jobFunction } from '../../core'
|
|
7
|
-
import { ListQuerySchema, type ListResponse } from '../../../utils'
|
|
8
|
-
import { z } from 'zod/v4'
|
|
9
|
-
|
|
10
|
-
const upsertExperienceSchema = {
|
|
11
|
-
endDate: z.null().or(z.coerce.date()).optional(),
|
|
12
|
-
startDate: z.null().or(z.coerce.date()).optional()
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
//// validators
|
|
16
|
-
|
|
17
|
-
export const AdminExperienceCreateSchema = createInsertSchema(
|
|
18
|
-
experience,
|
|
19
|
-
upsertExperienceSchema
|
|
20
|
-
)
|
|
21
|
-
export const AdminExperienceSelectSchema = createSelectSchema(
|
|
22
|
-
experience
|
|
23
|
-
).extend({
|
|
24
|
-
jobFunction: createSelectSchema(jobFunction)
|
|
25
|
-
.pick({
|
|
26
|
-
id: true,
|
|
27
|
-
name: true
|
|
28
|
-
})
|
|
29
|
-
.nullable(),
|
|
30
|
-
industry: createSelectSchema(industry)
|
|
31
|
-
.pick({
|
|
32
|
-
id: true,
|
|
33
|
-
name: true
|
|
34
|
-
})
|
|
35
|
-
.nullable()
|
|
36
|
-
})
|
|
37
|
-
export const AdminExperienceUpdateSchema = createUpdateSchema(
|
|
38
|
-
experience,
|
|
39
|
-
upsertExperienceSchema
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
export const AdminExperienceParamsSchema = AdminExperienceSelectSchema.pick({
|
|
43
|
-
id: true
|
|
44
|
-
})
|
|
45
|
-
export const AdminExperienceListQuerySchema = ListQuerySchema
|
|
46
|
-
export const AdminExperienceUpdateParamsSchema = AdminExperienceParamsSchema
|
|
47
|
-
export const AdminExperienceDeleteParamsSchema = AdminExperienceParamsSchema
|
|
48
|
-
export const AdminExperienceDeleteByPersonParamsSchema =
|
|
49
|
-
AdminExperienceSelectSchema.pick({
|
|
50
|
-
personId: true
|
|
51
|
-
})
|
|
52
|
-
|
|
53
|
-
//// types
|
|
54
|
-
|
|
55
|
-
type AdminExperience = z.infer<typeof AdminExperienceSelectSchema>
|
|
56
|
-
|
|
57
|
-
// detail
|
|
58
|
-
export type AdminExperienceParams = z.infer<typeof AdminExperienceParamsSchema>
|
|
59
|
-
export type AdminExperienceResult = AdminExperience
|
|
60
|
-
|
|
61
|
-
// list
|
|
62
|
-
export type AdminExperienceListQuery = z.infer<
|
|
63
|
-
typeof AdminExperienceListQuerySchema
|
|
64
|
-
>
|
|
65
|
-
export type AdminExperienceListResult = ListResponse<
|
|
66
|
-
z.infer<typeof AdminExperienceSelectSchema>
|
|
67
|
-
>
|
|
68
|
-
|
|
69
|
-
// create
|
|
70
|
-
export type AdminExperienceCreateInput = z.infer<
|
|
71
|
-
typeof AdminExperienceCreateSchema
|
|
72
|
-
>
|
|
73
|
-
export type AdminExperienceCreateResult = Pick<AdminExperience, 'id'>
|
|
74
|
-
|
|
75
|
-
// update
|
|
76
|
-
export type AdminExperienceUpdateParams = z.infer<
|
|
77
|
-
typeof AdminExperienceUpdateParamsSchema
|
|
78
|
-
>
|
|
79
|
-
export type AdminExperienceUpdateInput = Partial<AdminExperience>
|
|
80
|
-
|
|
81
|
-
// delete
|
|
82
|
-
export type AdminExperienceDeleteParams = z.infer<
|
|
83
|
-
typeof AdminExperienceDeleteParamsSchema
|
|
84
|
-
>
|
|
85
|
-
export type AdminExperienceDeleteByPersonParams = z.infer<
|
|
86
|
-
typeof AdminExperienceDeleteByPersonParamsSchema
|
|
87
|
-
>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export * from './actions'
|
|
2
|
-
export * from './campaigns'
|
|
3
|
-
export * from './candidacies'
|
|
4
|
-
export * from './clients'
|
|
5
|
-
export * from './dashboard'
|
|
6
|
-
export * from './educations'
|
|
7
|
-
export * from './experiences'
|
|
8
|
-
export * from './files'
|
|
9
|
-
export * from './jobFunctions'
|
|
10
|
-
export * from './listViews'
|
|
11
|
-
export * from './locations'
|
|
12
|
-
export * from './messages'
|
|
13
|
-
export * from './notes'
|
|
14
|
-
export * from './partners'
|
|
15
|
-
export * from './persons'
|
|
16
|
-
export * from './personsToBestPersons'
|
|
17
|
-
export * from './personsToSkills'
|
|
18
|
-
export * from './personsToTags'
|
|
19
|
-
export * from './positions'
|
|
20
|
-
export * from './positionsToSkills'
|
|
21
|
-
export * from './positionsToTags'
|
|
22
|
-
export * from './referrals'
|
|
23
|
-
export * from './referralsToMessages'
|
|
24
|
-
export * from './senders'
|
|
25
|
-
export * from './settings'
|
|
26
|
-
export * from './skills'
|
|
27
|
-
export * from './tags'
|
|
28
|
-
export * from './websiteLandingPages'
|
|
29
|
-
export * from './websiteStaticPages'
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createInsertSchema,
|
|
3
|
-
createSelectSchema,
|
|
4
|
-
createUpdateSchema
|
|
5
|
-
} from 'drizzle-zod'
|
|
6
|
-
import { jobFunction } from '../../core'
|
|
7
|
-
import { ListQuerySchema, type ListResponse } from '../../../utils'
|
|
8
|
-
import { z } from 'zod/v4'
|
|
9
|
-
import slugify from 'slugify'
|
|
10
|
-
|
|
11
|
-
const upsertExtended = {
|
|
12
|
-
name: z.string().transform((value) => {
|
|
13
|
-
return value.trim().toLowerCase()
|
|
14
|
-
}),
|
|
15
|
-
slug: z.string().transform((value) => {
|
|
16
|
-
return slugify(value, { lower: true })
|
|
17
|
-
})
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
//// validators
|
|
21
|
-
|
|
22
|
-
export const AdminJobFunctionCreateSchema = createInsertSchema(
|
|
23
|
-
jobFunction,
|
|
24
|
-
upsertExtended
|
|
25
|
-
)
|
|
26
|
-
export const AdminSelectJobFunctionSchema = createSelectSchema(jobFunction)
|
|
27
|
-
export const AdminJobFunctionUpdateSchema = createUpdateSchema(
|
|
28
|
-
jobFunction,
|
|
29
|
-
upsertExtended
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
export const AdminJobFunctionParamsSchema = AdminSelectJobFunctionSchema.pick({
|
|
33
|
-
id: true
|
|
34
|
-
})
|
|
35
|
-
export const AdminJobFunctionSlugParamsSchema =
|
|
36
|
-
AdminSelectJobFunctionSchema.pick({
|
|
37
|
-
slug: true
|
|
38
|
-
})
|
|
39
|
-
export const AdminJobFunctionListQuerySchema = ListQuerySchema
|
|
40
|
-
export const AdminJobFunctionUpdateParamsSchema = AdminJobFunctionParamsSchema
|
|
41
|
-
export const AdminJobFunctionDeleteParamsSchema = AdminJobFunctionParamsSchema
|
|
42
|
-
|
|
43
|
-
//// types
|
|
44
|
-
|
|
45
|
-
type AdminJobFunction = z.infer<typeof AdminSelectJobFunctionSchema>
|
|
46
|
-
|
|
47
|
-
// detail
|
|
48
|
-
export type AdminJobFunctionParams = z.infer<
|
|
49
|
-
typeof AdminJobFunctionParamsSchema
|
|
50
|
-
>
|
|
51
|
-
export type AdminJobFunctionSlugParams = z.infer<
|
|
52
|
-
typeof AdminJobFunctionSlugParamsSchema
|
|
53
|
-
>
|
|
54
|
-
export type AdminJobFunctionResult = AdminJobFunction
|
|
55
|
-
|
|
56
|
-
// list
|
|
57
|
-
export type AdminJobFunctionListQuery = z.infer<
|
|
58
|
-
typeof AdminJobFunctionListQuerySchema
|
|
59
|
-
>
|
|
60
|
-
export type AdminJobFunctionListResult = ListResponse<
|
|
61
|
-
z.infer<typeof AdminSelectJobFunctionSchema>
|
|
62
|
-
>
|
|
63
|
-
|
|
64
|
-
// create
|
|
65
|
-
export type AdminJobFunctionCreateInput = z.infer<
|
|
66
|
-
typeof AdminJobFunctionCreateSchema
|
|
67
|
-
>
|
|
68
|
-
export type AdminJobFunctionCreateResult = Pick<AdminJobFunction, 'id'>
|
|
69
|
-
|
|
70
|
-
// update
|
|
71
|
-
export type AdminJobFunctionUpdateParams = z.infer<
|
|
72
|
-
typeof AdminJobFunctionUpdateParamsSchema
|
|
73
|
-
>
|
|
74
|
-
export type AdminJobFunctionUpdateInput = Partial<AdminJobFunction>
|
|
75
|
-
|
|
76
|
-
// delete
|
|
77
|
-
export type AdminJobFunctionDeleteParams = z.infer<
|
|
78
|
-
typeof AdminJobFunctionDeleteParamsSchema
|
|
79
|
-
>
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createInsertSchema,
|
|
3
|
-
createSelectSchema,
|
|
4
|
-
createUpdateSchema
|
|
5
|
-
} from 'drizzle-zod'
|
|
6
|
-
import { listView } from '../../core'
|
|
7
|
-
import { ListQuerySchema, type ListResponse } from '../../../utils'
|
|
8
|
-
import { z } from 'zod/v4'
|
|
9
|
-
|
|
10
|
-
//// validators
|
|
11
|
-
|
|
12
|
-
export const AdminListViewCreateSchema = createInsertSchema(listView)
|
|
13
|
-
export const AdminListViewSelectSchema = createSelectSchema(listView)
|
|
14
|
-
export const AdminListViewUpdateSchema = createUpdateSchema(listView)
|
|
15
|
-
|
|
16
|
-
export const AdminListViewParamsSchema = AdminListViewSelectSchema.pick({
|
|
17
|
-
id: true
|
|
18
|
-
})
|
|
19
|
-
export const AdminListViewUpdateParamsSchema = AdminListViewParamsSchema
|
|
20
|
-
export const AdminListViewDeleteParamsSchema = AdminListViewParamsSchema
|
|
21
|
-
export const AdminListViewListQuerySchema = ListQuerySchema.extend({
|
|
22
|
-
filter: AdminListViewSelectSchema.pick({
|
|
23
|
-
model: true
|
|
24
|
-
})
|
|
25
|
-
.partial()
|
|
26
|
-
.optional()
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
//// types
|
|
30
|
-
|
|
31
|
-
type AdminListView = z.infer<typeof AdminListViewSelectSchema>
|
|
32
|
-
|
|
33
|
-
// detail
|
|
34
|
-
export type AdminListViewParams = z.infer<typeof AdminListViewParamsSchema>
|
|
35
|
-
export type AdminListViewResult = AdminListView
|
|
36
|
-
|
|
37
|
-
// list
|
|
38
|
-
export type AdminListViewListQuery = z.infer<
|
|
39
|
-
typeof AdminListViewListQuerySchema
|
|
40
|
-
>
|
|
41
|
-
export type AdminListViewListResult = ListResponse<
|
|
42
|
-
Pick<z.infer<typeof AdminListViewSelectSchema>, 'id' | 'name'>
|
|
43
|
-
>
|
|
44
|
-
|
|
45
|
-
// create
|
|
46
|
-
export type AdminListViewCreateInput = z.infer<typeof AdminListViewCreateSchema>
|
|
47
|
-
export type AdminListViewCreateResult = Pick<AdminListView, 'id'>
|
|
48
|
-
|
|
49
|
-
// update
|
|
50
|
-
export type AdminListViewUpdateParams = z.infer<
|
|
51
|
-
typeof AdminListViewUpdateParamsSchema
|
|
52
|
-
>
|
|
53
|
-
export type AdminListViewUpdateInput = Partial<AdminListView>
|
|
54
|
-
|
|
55
|
-
// delete
|
|
56
|
-
export type AdminListViewDeleteParams = z.infer<
|
|
57
|
-
typeof AdminListViewDeleteParamsSchema
|
|
58
|
-
>
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod/v4'
|
|
2
|
-
|
|
3
|
-
//// validators
|
|
4
|
-
|
|
5
|
-
export const AdminLocationGeocodeQuerySchema = z.object({
|
|
6
|
-
address: z.string().optional(),
|
|
7
|
-
placeId: z.string().optional()
|
|
8
|
-
})
|
|
9
|
-
export const AdminLocationReverseGeocodeQuerySchema = z.object({
|
|
10
|
-
lat: z.number(),
|
|
11
|
-
lon: z.number()
|
|
12
|
-
})
|
|
13
|
-
export const AdminLocationAutocompleteQuerySchema = z.object({
|
|
14
|
-
address: z.string()
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
//// types
|
|
18
|
-
|
|
19
|
-
export type AdminLocationGeocodeQuery = z.infer<
|
|
20
|
-
typeof AdminLocationGeocodeQuerySchema
|
|
21
|
-
>
|
|
22
|
-
export type AdminLocationReverseGeocodeQuery = z.infer<
|
|
23
|
-
typeof AdminLocationReverseGeocodeQuerySchema
|
|
24
|
-
>
|
|
25
|
-
export type AdminLocationAutocompleteQuery = z.infer<
|
|
26
|
-
typeof AdminLocationAutocompleteQuerySchema
|
|
27
|
-
>
|
|
28
|
-
|
|
29
|
-
export type AdminLocationGeocodeResult = {
|
|
30
|
-
lat: number
|
|
31
|
-
lon: number
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export type AdminLocationReverseGeocodeResult = {
|
|
35
|
-
address: string
|
|
36
|
-
placeId: string
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export type AdminLocationAutocompleteResult = {
|
|
40
|
-
placeId: string
|
|
41
|
-
description: string
|
|
42
|
-
}[]
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createInsertSchema,
|
|
3
|
-
createSelectSchema,
|
|
4
|
-
createUpdateSchema
|
|
5
|
-
} from 'drizzle-zod'
|
|
6
|
-
import { message, person, sender } from '../../core'
|
|
7
|
-
import { ListQuerySchema, type ListResponse } from '../../../utils'
|
|
8
|
-
import { z } from 'zod/v4'
|
|
9
|
-
|
|
10
|
-
//// validators
|
|
11
|
-
|
|
12
|
-
export const AdminMessageCreateSchema = createInsertSchema(message)
|
|
13
|
-
export const AdminMessageSelectSchema = createSelectSchema(message).extend({
|
|
14
|
-
person: createSelectSchema(person).pick({
|
|
15
|
-
id: true,
|
|
16
|
-
email: true,
|
|
17
|
-
fullName: true,
|
|
18
|
-
phone: true
|
|
19
|
-
}),
|
|
20
|
-
outboundSender: createSelectSchema(sender)
|
|
21
|
-
.pick({
|
|
22
|
-
id: true,
|
|
23
|
-
name: true,
|
|
24
|
-
email: true,
|
|
25
|
-
smsNumber: true
|
|
26
|
-
})
|
|
27
|
-
.nullable()
|
|
28
|
-
.optional()
|
|
29
|
-
})
|
|
30
|
-
export const AdminMessageUpdateSchema = createUpdateSchema(message)
|
|
31
|
-
|
|
32
|
-
export const AdminMessageParamsSchema = AdminMessageSelectSchema.pick({
|
|
33
|
-
id: true,
|
|
34
|
-
externalId: true
|
|
35
|
-
}).partial()
|
|
36
|
-
|
|
37
|
-
export const AdminMessageListQuerySchema = ListQuerySchema.extend({
|
|
38
|
-
filter: z
|
|
39
|
-
.object({
|
|
40
|
-
personId: z.string().optional(),
|
|
41
|
-
isReviewed: z.boolean().optional(),
|
|
42
|
-
isInbound: z.boolean().optional()
|
|
43
|
-
})
|
|
44
|
-
.optional()
|
|
45
|
-
})
|
|
46
|
-
export const AdminMessageUpdateParamsSchema = AdminMessageParamsSchema
|
|
47
|
-
export const AdminMessageDeleteParamsSchema = AdminMessageParamsSchema
|
|
48
|
-
|
|
49
|
-
//// types
|
|
50
|
-
|
|
51
|
-
type AdminMessage = z.infer<typeof AdminMessageSelectSchema>
|
|
52
|
-
|
|
53
|
-
// detail
|
|
54
|
-
export type AdminMessageParams = z.infer<typeof AdminMessageParamsSchema>
|
|
55
|
-
export type AdminMessageResult = AdminMessage
|
|
56
|
-
|
|
57
|
-
// list
|
|
58
|
-
export type AdminMessageListQuery = z.infer<typeof AdminMessageListQuerySchema>
|
|
59
|
-
export type AdminMessageListResult = ListResponse<
|
|
60
|
-
z.infer<typeof AdminMessageSelectSchema>
|
|
61
|
-
>
|
|
62
|
-
|
|
63
|
-
// create
|
|
64
|
-
export type AdminMessageCreateInput = z.infer<typeof AdminMessageCreateSchema>
|
|
65
|
-
export type AdminMessageCreateResult = Pick<AdminMessage, 'id'>
|
|
66
|
-
|
|
67
|
-
// update
|
|
68
|
-
export type AdminMessageUpdateParams = z.infer<
|
|
69
|
-
typeof AdminMessageUpdateParamsSchema
|
|
70
|
-
>
|
|
71
|
-
export type AdminMessageUpdateInput = Partial<AdminMessage>
|
|
72
|
-
|
|
73
|
-
// delete
|
|
74
|
-
export type AdminMessageDeleteParams = z.infer<
|
|
75
|
-
typeof AdminMessageDeleteParamsSchema
|
|
76
|
-
>
|
|
77
|
-
|
|
78
|
-
export const AdminMessageSendSchema = AdminMessageCreateSchema.pick({
|
|
79
|
-
channel: true
|
|
80
|
-
}).extend({
|
|
81
|
-
personIds: z.array(z.string()).optional(),
|
|
82
|
-
outboundSenderId: z.string(),
|
|
83
|
-
text: z.string(),
|
|
84
|
-
subject: z.string().optional(),
|
|
85
|
-
html: z.string().optional()
|
|
86
|
-
})
|
|
87
|
-
|
|
88
|
-
export type AdminMessageSendInput = z.infer<typeof AdminMessageSendSchema>
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createInsertSchema,
|
|
3
|
-
createSelectSchema,
|
|
4
|
-
createUpdateSchema
|
|
5
|
-
} from 'drizzle-zod'
|
|
6
|
-
import { note } from '../../core'
|
|
7
|
-
import { ListQuerySchema, type ListResponse } from '../../../utils'
|
|
8
|
-
import { z } from 'zod/v4'
|
|
9
|
-
|
|
10
|
-
//// validators
|
|
11
|
-
|
|
12
|
-
export const AdminNoteCreateSchema = createInsertSchema(note)
|
|
13
|
-
export const AdminNoteSelectSchema = createSelectSchema(note)
|
|
14
|
-
export const AdminNoteUpdateSchema = createUpdateSchema(note)
|
|
15
|
-
|
|
16
|
-
export const AdminNoteParamsSchema = AdminNoteSelectSchema.pick({
|
|
17
|
-
id: true
|
|
18
|
-
})
|
|
19
|
-
export const AdminNoteListQuerySchema = ListQuerySchema.extend({
|
|
20
|
-
filter: z
|
|
21
|
-
.object({
|
|
22
|
-
candidacyId: z.string().optional(),
|
|
23
|
-
clientId: z.string().optional(),
|
|
24
|
-
positionId: z.string().optional(),
|
|
25
|
-
personId: z.string().optional()
|
|
26
|
-
})
|
|
27
|
-
.partial()
|
|
28
|
-
.optional()
|
|
29
|
-
})
|
|
30
|
-
export const AdminNoteUpdateParamsSchema = AdminNoteParamsSchema
|
|
31
|
-
export const AdminNoteDeleteParamsSchema = AdminNoteParamsSchema
|
|
32
|
-
|
|
33
|
-
//// types
|
|
34
|
-
|
|
35
|
-
type AdminNote = z.infer<typeof AdminNoteSelectSchema>
|
|
36
|
-
|
|
37
|
-
// detail
|
|
38
|
-
export type AdminNoteParams = z.infer<typeof AdminNoteParamsSchema>
|
|
39
|
-
export type AdminNoteResult = AdminNote
|
|
40
|
-
|
|
41
|
-
// list
|
|
42
|
-
export type AdminNoteListQuery = z.infer<typeof AdminNoteListQuerySchema>
|
|
43
|
-
export type AdminNoteListResult = ListResponse<
|
|
44
|
-
z.infer<typeof AdminNoteSelectSchema>
|
|
45
|
-
>
|
|
46
|
-
|
|
47
|
-
// create
|
|
48
|
-
export type AdminNoteCreateInput = z.infer<typeof AdminNoteCreateSchema>
|
|
49
|
-
export type AdminNoteCreateResult = Pick<AdminNote, 'id'>
|
|
50
|
-
|
|
51
|
-
// update
|
|
52
|
-
export type AdminNoteUpdateParams = z.infer<typeof AdminNoteUpdateParamsSchema>
|
|
53
|
-
export type AdminNoteUpdateInput = z.infer<typeof AdminNoteUpdateSchema>
|
|
54
|
-
|
|
55
|
-
// delete
|
|
56
|
-
export type AdminNoteDeleteParams = z.infer<typeof AdminNoteDeleteParamsSchema>
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createInsertSchema,
|
|
3
|
-
createSelectSchema,
|
|
4
|
-
createUpdateSchema
|
|
5
|
-
} from 'drizzle-zod'
|
|
6
|
-
import { network, partner } from '../../core'
|
|
7
|
-
import { ListQuerySchema, type ListResponse } from '../../../utils'
|
|
8
|
-
import { z } from 'zod/v4'
|
|
9
|
-
|
|
10
|
-
//// validators
|
|
11
|
-
|
|
12
|
-
export const AdminPartnerCreateSchema = createInsertSchema(partner)
|
|
13
|
-
export const AdminPartnerSelectSchema = createSelectSchema(partner).extend({
|
|
14
|
-
networks: z
|
|
15
|
-
.array(
|
|
16
|
-
createSelectSchema(network).pick({
|
|
17
|
-
id: true,
|
|
18
|
-
name: true
|
|
19
|
-
})
|
|
20
|
-
)
|
|
21
|
-
.optional(),
|
|
22
|
-
_networksCount: z.number().optional()
|
|
23
|
-
})
|
|
24
|
-
export const AdminPartnerUpdateSchema = createUpdateSchema(partner)
|
|
25
|
-
|
|
26
|
-
export const AdminPartnerParamsSchema = AdminPartnerSelectSchema.pick({
|
|
27
|
-
id: true
|
|
28
|
-
})
|
|
29
|
-
export const AdminPartnerListQuerySchema = ListQuerySchema
|
|
30
|
-
export const AdminPartnerUpdateParamsSchema = AdminPartnerParamsSchema
|
|
31
|
-
export const AdminPartnerDeleteParamsSchema = AdminPartnerParamsSchema
|
|
32
|
-
|
|
33
|
-
//// types
|
|
34
|
-
|
|
35
|
-
type AdminPartner = z.infer<typeof AdminPartnerSelectSchema>
|
|
36
|
-
|
|
37
|
-
// detail
|
|
38
|
-
export type AdminPartnerParams = z.infer<typeof AdminPartnerParamsSchema>
|
|
39
|
-
export type AdminPartnerResult = AdminPartner
|
|
40
|
-
|
|
41
|
-
// list
|
|
42
|
-
export type AdminPartnerListQuery = z.infer<typeof AdminPartnerListQuerySchema>
|
|
43
|
-
export type AdminPartnerListResult = ListResponse<
|
|
44
|
-
z.infer<typeof AdminPartnerSelectSchema>
|
|
45
|
-
>
|
|
46
|
-
|
|
47
|
-
// create
|
|
48
|
-
export type AdminPartnerCreateInput = z.infer<typeof AdminPartnerCreateSchema>
|
|
49
|
-
export type AdminPartnerCreateResult = Pick<AdminPartner, 'id'>
|
|
50
|
-
|
|
51
|
-
// update
|
|
52
|
-
export type AdminPartnerUpdateParams = z.infer<
|
|
53
|
-
typeof AdminPartnerUpdateParamsSchema
|
|
54
|
-
>
|
|
55
|
-
export type AdminPartnerUpdateInput = z.infer<typeof AdminPartnerUpdateSchema>
|
|
56
|
-
|
|
57
|
-
// delete
|
|
58
|
-
export type AdminPartnerDeleteParams = z.infer<
|
|
59
|
-
typeof AdminPartnerDeleteParamsSchema
|
|
60
|
-
>
|