@the-inkwell/shared 0.1.163 → 0.2.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.js +2 -1
- package/dist/src/constants.js +276 -0
- package/dist/src/schema/admin/actions/index.js +32 -0
- package/dist/src/schema/admin/campaigns/index.js +68 -0
- package/dist/src/schema/admin/candidacies/index.js +83 -0
- package/dist/src/schema/admin/clients/index.js +30 -0
- package/dist/src/schema/admin/educations/index.js +23 -0
- package/dist/src/schema/admin/experiences/index.js +37 -0
- package/dist/src/schema/admin/files/index.js +7 -0
- package/dist/src/{types/models → schema}/admin/index.js +18 -1
- package/dist/src/schema/admin/jobFunctions/index.js +32 -0
- package/dist/src/schema/admin/listViews/index.js +22 -0
- package/dist/src/schema/admin/locations/index.js +16 -0
- package/dist/src/schema/admin/messages/index.js +51 -0
- package/dist/src/schema/admin/notes/index.js +27 -0
- package/dist/src/schema/admin/partners/index.js +25 -0
- package/dist/src/schema/admin/persons/index.js +194 -0
- package/dist/src/schema/admin/personsToBestPersons/index.js +18 -0
- package/dist/src/schema/admin/personsToSkills/index.js +18 -0
- package/dist/src/schema/admin/personsToTags/index.js +18 -0
- package/dist/src/schema/admin/positions/index.js +58 -0
- package/dist/src/schema/admin/positionsToSkills/index.js +18 -0
- package/dist/src/schema/admin/positionsToTags/index.js +18 -0
- package/dist/src/schema/admin/referrals/index.js +64 -0
- package/dist/src/schema/admin/referralsToMessages/index.js +55 -0
- package/dist/src/schema/admin/senders/index.js +16 -0
- package/dist/src/schema/admin/sendgrid/index.js +10 -0
- package/dist/src/schema/admin/settings/index.js +21 -0
- package/dist/src/schema/admin/skills/index.js +32 -0
- package/dist/src/schema/admin/tags/index.js +29 -0
- package/dist/src/schema/admin/websiteLandingPages/index.js +16 -0
- package/dist/src/schema/admin/websiteStaticPages/index.js +16 -0
- package/dist/src/schema/auth/index.js +11 -0
- package/dist/src/schema/core.js +1469 -0
- package/dist/src/{types/models → schema}/index.js +1 -1
- package/dist/src/utils.js +16 -0
- package/index.ts +2 -1
- package/package.json +9 -2
- package/src/constants.ts +299 -0
- package/src/schema/admin/actions/index.ts +65 -0
- package/src/schema/admin/campaigns/index.ts +111 -0
- package/src/schema/admin/candidacies/index.ts +138 -0
- package/src/schema/admin/clients/index.ts +65 -0
- package/src/schema/admin/dashboard/index.ts +10 -0
- package/src/schema/admin/educations/index.ts +71 -0
- package/src/schema/admin/experiences/index.ts +87 -0
- package/src/schema/admin/files/index.ts +10 -0
- package/src/schema/admin/index.ts +29 -0
- package/src/schema/admin/jobFunctions/index.ts +79 -0
- package/src/schema/admin/listViews/index.ts +58 -0
- package/src/schema/admin/locations/index.ts +42 -0
- package/src/schema/admin/messages/index.ts +88 -0
- package/src/schema/admin/notes/index.ts +56 -0
- package/src/schema/admin/partners/index.ts +60 -0
- package/src/schema/admin/persons/index.ts +294 -0
- package/src/schema/admin/personsToBestPersons/index.ts +67 -0
- package/src/schema/admin/personsToSkills/index.ts +61 -0
- package/src/schema/admin/personsToTags/index.ts +61 -0
- package/src/schema/admin/positions/index.ts +97 -0
- package/src/schema/admin/positionsToSkills/index.ts +64 -0
- package/src/schema/admin/positionsToTags/index.ts +61 -0
- package/src/schema/admin/referrals/index.ts +100 -0
- package/src/schema/admin/referralsToMessages/index.ts +121 -0
- package/src/schema/admin/senders/index.ts +50 -0
- package/src/schema/admin/sendgrid/index.ts +16 -0
- package/src/schema/admin/settings/index.ts +34 -0
- package/src/schema/admin/skills/index.ts +64 -0
- package/src/schema/admin/tags/index.ts +56 -0
- package/src/schema/admin/websiteLandingPages/index.ts +69 -0
- package/src/schema/admin/websiteStaticPages/index.ts +67 -0
- package/src/schema/auth/index.ts +14 -0
- package/src/schema/core.ts +1906 -0
- package/src/{types/models → schema}/index.ts +1 -1
- package/src/utils.ts +41 -0
- package/README.md +0 -9
- package/dist/src/constants/enums.js +0 -209
- package/dist/src/constants/index.js +0 -17
- package/dist/src/types/_schema/Action.js +0 -4
- package/dist/src/types/_schema/ActionNames.js +0 -4
- package/dist/src/types/_schema/Actions.js +0 -4
- package/dist/src/types/_schema/Admin.js +0 -4
- package/dist/src/types/_schema/Admins.js +0 -4
- package/dist/src/types/_schema/Campaign.js +0 -4
- package/dist/src/types/_schema/CampaignStatuses.js +0 -4
- package/dist/src/types/_schema/CampaignToPosition.js +0 -4
- package/dist/src/types/_schema/Campaigns.js +0 -4
- package/dist/src/types/_schema/CampaignsToPositions.js +0 -4
- package/dist/src/types/_schema/Candidacies.js +0 -4
- package/dist/src/types/_schema/Candidacy.js +0 -4
- package/dist/src/types/_schema/CandidacyFeedback.js +0 -4
- package/dist/src/types/_schema/CandidacyRatingCategories.js +0 -4
- package/dist/src/types/_schema/CandidacyRatingReasons.js +0 -4
- package/dist/src/types/_schema/CandidacyRatingToTag.js +0 -4
- package/dist/src/types/_schema/CandidacyRatings.js +0 -4
- package/dist/src/types/_schema/CandidacyRatingsToTags.js +0 -4
- package/dist/src/types/_schema/CandidacySources.js +0 -4
- package/dist/src/types/_schema/CandidacyStages.js +0 -4
- package/dist/src/types/_schema/CandidacyStatuses.js +0 -4
- package/dist/src/types/_schema/Certifications.js +0 -4
- package/dist/src/types/_schema/Client.js +0 -4
- package/dist/src/types/_schema/ClientStages.js +0 -4
- package/dist/src/types/_schema/ClientStatuses.js +0 -4
- package/dist/src/types/_schema/Clients.js +0 -4
- package/dist/src/types/_schema/Clubs.js +0 -4
- package/dist/src/types/_schema/Contract.js +0 -4
- package/dist/src/types/_schema/Contracts.js +0 -4
- package/dist/src/types/_schema/Conversation.js +0 -4
- package/dist/src/types/_schema/Conversations.js +0 -4
- package/dist/src/types/_schema/EducationDegrees.js +0 -4
- package/dist/src/types/_schema/EducationFields.js +0 -4
- package/dist/src/types/_schema/Educations.js +0 -4
- package/dist/src/types/_schema/EnrichmentSources.js +0 -4
- package/dist/src/types/_schema/Enrichments.js +0 -4
- package/dist/src/types/_schema/Experiences.js +0 -4
- package/dist/src/types/_schema/Genders.js +0 -4
- package/dist/src/types/_schema/Industries.js +0 -4
- package/dist/src/types/_schema/JobFunctions.js +0 -4
- package/dist/src/types/_schema/JobLevels.js +0 -4
- package/dist/src/types/_schema/Jwt.js +0 -4
- package/dist/src/types/_schema/Jwts.js +0 -4
- package/dist/src/types/_schema/ListView.js +0 -4
- package/dist/src/types/_schema/ListViewModels.js +0 -4
- package/dist/src/types/_schema/ListViews.js +0 -4
- package/dist/src/types/_schema/Message.js +0 -4
- package/dist/src/types/_schema/MessageChannels.js +0 -4
- package/dist/src/types/_schema/MessageTemplate.js +0 -4
- package/dist/src/types/_schema/MessageTemplates.js +0 -4
- package/dist/src/types/_schema/Messages.js +0 -4
- package/dist/src/types/_schema/Networks.js +0 -4
- package/dist/src/types/_schema/Note.js +0 -4
- package/dist/src/types/_schema/Notes.js +0 -4
- package/dist/src/types/_schema/Otp.js +0 -4
- package/dist/src/types/_schema/Otps.js +0 -4
- package/dist/src/types/_schema/Partners.js +0 -4
- package/dist/src/types/_schema/Person.js +0 -4
- package/dist/src/types/_schema/PersonCareerLevels.js +0 -4
- package/dist/src/types/_schema/PersonClub.js +0 -4
- package/dist/src/types/_schema/PersonClubs.js +0 -4
- package/dist/src/types/_schema/PersonDegrees.js +0 -4
- package/dist/src/types/_schema/PersonEnrichment.js +0 -4
- package/dist/src/types/_schema/PersonEnrichments.js +0 -4
- package/dist/src/types/_schema/PersonGenders.js +0 -4
- package/dist/src/types/_schema/PersonNetwork.js +0 -4
- package/dist/src/types/_schema/PersonNetworks.js +0 -4
- package/dist/src/types/_schema/PersonSkill.js +0 -4
- package/dist/src/types/_schema/PersonSkills.js +0 -4
- package/dist/src/types/_schema/PersonSources.js +0 -4
- package/dist/src/types/_schema/PersonToBestPerson.js +0 -4
- package/dist/src/types/_schema/PersonToPersonClub.js +0 -4
- package/dist/src/types/_schema/PersonToPersonNetwork.js +0 -4
- package/dist/src/types/_schema/PersonToPersonSkill.js +0 -4
- package/dist/src/types/_schema/PersonToTag.js +0 -4
- package/dist/src/types/_schema/Persons.js +0 -4
- package/dist/src/types/_schema/PersonsToBestPersons.js +0 -4
- package/dist/src/types/_schema/PersonsToCertifications.js +0 -4
- package/dist/src/types/_schema/PersonsToClubs.js +0 -4
- package/dist/src/types/_schema/PersonsToIndustries.js +0 -4
- package/dist/src/types/_schema/PersonsToNetworks.js +0 -4
- package/dist/src/types/_schema/PersonsToPersonClubs.js +0 -4
- package/dist/src/types/_schema/PersonsToPersonNetworks.js +0 -4
- package/dist/src/types/_schema/PersonsToPersonSkills.js +0 -4
- package/dist/src/types/_schema/PersonsToSkills.js +0 -4
- package/dist/src/types/_schema/PersonsToTags.js +0 -4
- package/dist/src/types/_schema/Position.js +0 -4
- package/dist/src/types/_schema/PositionRatingCategories.js +0 -4
- package/dist/src/types/_schema/PositionRatings.js +0 -4
- package/dist/src/types/_schema/PositionStages.js +0 -4
- package/dist/src/types/_schema/PositionStatuses.js +0 -4
- package/dist/src/types/_schema/Positions.js +0 -4
- package/dist/src/types/_schema/PositionsToIndustries.js +0 -4
- package/dist/src/types/_schema/PositionsToPersonSkills.js +0 -4
- package/dist/src/types/_schema/PositionsToSkills.js +0 -4
- package/dist/src/types/_schema/PositionsToTags.js +0 -4
- package/dist/src/types/_schema/PublicSchema.js +0 -4
- package/dist/src/types/_schema/Referral.js +0 -4
- package/dist/src/types/_schema/ReferralPayout.js +0 -4
- package/dist/src/types/_schema/ReferralPayouts.js +0 -4
- package/dist/src/types/_schema/ReferralSources.js +0 -4
- package/dist/src/types/_schema/ReferralToIntroMessage.js +0 -4
- package/dist/src/types/_schema/Referrals.js +0 -4
- package/dist/src/types/_schema/ReferralsToIntroMessages.js +0 -4
- package/dist/src/types/_schema/ReferralsToMessages.js +0 -4
- package/dist/src/types/_schema/Sender.js +0 -4
- package/dist/src/types/_schema/Senders.js +0 -4
- package/dist/src/types/_schema/Skills.js +0 -4
- package/dist/src/types/_schema/Tag.js +0 -4
- package/dist/src/types/_schema/Tags.js +0 -4
- package/dist/src/types/_schema/WebsiteBlock.js +0 -4
- package/dist/src/types/_schema/WebsiteBlocks.js +0 -4
- package/dist/src/types/_schema/WebsiteLandingPage.js +0 -4
- package/dist/src/types/_schema/WebsiteLandingPages.js +0 -4
- package/dist/src/types/_schema/WebsiteStaticPage.js +0 -4
- package/dist/src/types/_schema/WebsiteStaticPages.js +0 -4
- package/dist/src/types/admin/index.js +0 -19
- package/dist/src/types/admin/persons/index.js +0 -2
- package/dist/src/types/admin/website/index.js +0 -2
- package/dist/src/types/auth/index.js +0 -2
- package/dist/src/types/db.js +0 -6
- package/dist/src/types/http/admin/candidacies/index.js +0 -2
- package/dist/src/types/http/admin/index.js +0 -19
- package/dist/src/types/http/admin/persons/index.js +0 -2
- package/dist/src/types/http/admin/website/index.js +0 -2
- package/dist/src/types/http/auth/index.js +0 -2
- package/dist/src/types/http/index.js +0 -19
- package/dist/src/types/http/utils/index.js +0 -2
- package/dist/src/types/index.js +0 -18
- package/dist/src/types/models/admin/campaigns/index.js +0 -2
- package/dist/src/types/models/admin/candidacies/index.js +0 -2
- package/dist/src/types/models/admin/clients/index.js +0 -2
- package/dist/src/types/models/admin/conversations/index.js +0 -2
- package/dist/src/types/models/admin/listViews/index.js +0 -2
- package/dist/src/types/models/admin/locations/index.js +0 -2
- package/dist/src/types/models/admin/messages/index.js +0 -2
- package/dist/src/types/models/admin/partners/index.js +0 -2
- package/dist/src/types/models/admin/persons/index.js +0 -2
- package/dist/src/types/models/admin/positions/index.js +0 -23
- package/dist/src/types/models/admin/referrals/index.js +0 -2
- package/dist/src/types/models/admin/settings/index.js +0 -2
- package/dist/src/types/models/admin/website/_shared.js +0 -2
- package/dist/src/types/models/admin/website/home.js +0 -2
- package/dist/src/types/models/admin/website/index.js +0 -18
- package/dist/src/types/models/admin/website/shared.js +0 -2
- package/dist/src/types/models/auth/index.js +0 -2
- package/dist/src/types/schemas/Database.js +0 -4
- package/dist/src/types/schemas/index.js +0 -23
- package/dist/src/types/schemas/public/Action.js +0 -4
- package/dist/src/types/schemas/public/ActionNames.js +0 -4
- package/dist/src/types/schemas/public/Admin.js +0 -4
- package/dist/src/types/schemas/public/Campaign.js +0 -4
- package/dist/src/types/schemas/public/CampaignStatuses.js +0 -4
- package/dist/src/types/schemas/public/CampaignToPosition.js +0 -4
- package/dist/src/types/schemas/public/Candidacy.js +0 -4
- package/dist/src/types/schemas/public/CandidacyFeedback.js +0 -4
- package/dist/src/types/schemas/public/CandidacyRatingToTag.js +0 -4
- package/dist/src/types/schemas/public/CandidacySources.js +0 -4
- package/dist/src/types/schemas/public/CandidacyStatuses.js +0 -4
- package/dist/src/types/schemas/public/Client.js +0 -4
- package/dist/src/types/schemas/public/ClientStatuses.js +0 -4
- package/dist/src/types/schemas/public/Contract.js +0 -4
- package/dist/src/types/schemas/public/Conversation.js +0 -4
- package/dist/src/types/schemas/public/EnrichmentSources.js +0 -4
- package/dist/src/types/schemas/public/Jwt.js +0 -4
- package/dist/src/types/schemas/public/ListView.js +0 -4
- package/dist/src/types/schemas/public/ListViewModels.js +0 -4
- package/dist/src/types/schemas/public/Message.js +0 -4
- package/dist/src/types/schemas/public/MessageChannels.js +0 -4
- package/dist/src/types/schemas/public/MessageSender.js +0 -4
- package/dist/src/types/schemas/public/MessageTemplate.js +0 -4
- package/dist/src/types/schemas/public/Note.js +0 -4
- package/dist/src/types/schemas/public/Otp.js +0 -4
- package/dist/src/types/schemas/public/Person.js +0 -4
- package/dist/src/types/schemas/public/PersonCareerLevels.js +0 -4
- package/dist/src/types/schemas/public/PersonClub.js +0 -4
- package/dist/src/types/schemas/public/PersonDegrees.js +0 -4
- package/dist/src/types/schemas/public/PersonEnrichment.js +0 -4
- package/dist/src/types/schemas/public/PersonGenders.js +0 -4
- package/dist/src/types/schemas/public/PersonNetwork.js +0 -4
- package/dist/src/types/schemas/public/PersonSkill.js +0 -4
- package/dist/src/types/schemas/public/PersonSources.js +0 -4
- package/dist/src/types/schemas/public/PersonToBestPerson.js +0 -4
- package/dist/src/types/schemas/public/PersonToPersonClub.js +0 -4
- package/dist/src/types/schemas/public/PersonToPersonNetwork.js +0 -4
- package/dist/src/types/schemas/public/PersonToPersonSkill.js +0 -4
- package/dist/src/types/schemas/public/PersonToTag.js +0 -4
- package/dist/src/types/schemas/public/Position.js +0 -4
- package/dist/src/types/schemas/public/PositionStatuses.js +0 -4
- package/dist/src/types/schemas/public/PrismaMigrations.js +0 -4
- package/dist/src/types/schemas/public/PublicSchema.js +0 -4
- package/dist/src/types/schemas/public/Referral.js +0 -4
- package/dist/src/types/schemas/public/ReferralPayout.js +0 -4
- package/dist/src/types/schemas/public/ReferralSources.js +0 -4
- package/dist/src/types/schemas/public/ReferralToIntroMessage.js +0 -4
- package/dist/src/types/schemas/public/Sender.js +0 -4
- package/dist/src/types/schemas/public/Tag.js +0 -4
- package/dist/src/types/schemas/public/WebsiteBlock.js +0 -4
- package/dist/src/types/schemas/public/WebsiteLandingPage.js +0 -4
- package/dist/src/types/schemas/public/WebsiteStaticPage.js +0 -4
- package/dist/src/types/shared/index.js +0 -2
- package/dist/src/types/utils/index.js +0 -2
- package/dist/types/admin/index.js +0 -17
- package/dist/types/admin/website/index.js +0 -2
- package/dist/types/index.js +0 -17
- package/src/constants/enums.ts +0 -251
- package/src/constants/index.ts +0 -1
- package/src/types/_schema/ActionNames.ts +0 -11
- package/src/types/_schema/Actions.ts +0 -91
- package/src/types/_schema/Admins.ts +0 -36
- package/src/types/_schema/CampaignStatuses.ts +0 -10
- package/src/types/_schema/Campaigns.ts +0 -76
- package/src/types/_schema/CampaignsToPositions.ts +0 -40
- package/src/types/_schema/Candidacies.ts +0 -77
- package/src/types/_schema/CandidacyFeedback.ts +0 -55
- package/src/types/_schema/CandidacyRatingCategories.ts +0 -12
- package/src/types/_schema/CandidacyRatings.ts +0 -42
- package/src/types/_schema/CandidacySources.ts +0 -11
- package/src/types/_schema/CandidacyStages.ts +0 -14
- package/src/types/_schema/CandidacyStatuses.ts +0 -9
- package/src/types/_schema/Certifications.ts +0 -59
- package/src/types/_schema/ClientStages.ts +0 -12
- package/src/types/_schema/ClientStatuses.ts +0 -9
- package/src/types/_schema/Clients.ts +0 -63
- package/src/types/_schema/Contracts.ts +0 -62
- package/src/types/_schema/EducationDegrees.ts +0 -12
- package/src/types/_schema/EducationFields.ts +0 -18
- package/src/types/_schema/Educations.ts +0 -55
- package/src/types/_schema/EnrichmentSources.ts +0 -8
- package/src/types/_schema/Enrichments.ts +0 -62
- package/src/types/_schema/Experiences.ts +0 -87
- package/src/types/_schema/Genders.ts +0 -11
- package/src/types/_schema/Industries.ts +0 -53
- package/src/types/_schema/JobFunctions.ts +0 -53
- package/src/types/_schema/JobLevels.ts +0 -13
- package/src/types/_schema/Jwts.ts +0 -55
- package/src/types/_schema/ListViewModels.ts +0 -11
- package/src/types/_schema/ListViews.ts +0 -74
- package/src/types/_schema/MessageChannels.ts +0 -9
- package/src/types/_schema/MessageTemplates.ts +0 -53
- package/src/types/_schema/Messages.ts +0 -103
- package/src/types/_schema/Networks.ts +0 -59
- package/src/types/_schema/Notes.ts +0 -76
- package/src/types/_schema/Otps.ts +0 -61
- package/src/types/_schema/Partners.ts +0 -65
- package/src/types/_schema/PersonSources.ts +0 -11
- package/src/types/_schema/Persons.ts +0 -237
- package/src/types/_schema/PersonsToBestPersons.ts +0 -32
- package/src/types/_schema/PersonsToCertifications.ts +0 -26
- package/src/types/_schema/PersonsToNetworks.ts +0 -33
- package/src/types/_schema/PersonsToSkills.ts +0 -33
- package/src/types/_schema/PersonsToTags.ts +0 -33
- package/src/types/_schema/PositionRatingCategories.ts +0 -9
- package/src/types/_schema/PositionRatings.ts +0 -42
- package/src/types/_schema/PositionStages.ts +0 -12
- package/src/types/_schema/PositionStatuses.ts +0 -9
- package/src/types/_schema/Positions.ts +0 -119
- package/src/types/_schema/PositionsToIndustries.ts +0 -33
- package/src/types/_schema/PositionsToSkills.ts +0 -33
- package/src/types/_schema/PositionsToTags.ts +0 -33
- package/src/types/_schema/ReferralPayouts.ts +0 -29
- package/src/types/_schema/ReferralSources.ts +0 -11
- package/src/types/_schema/Referrals.ts +0 -89
- package/src/types/_schema/ReferralsToMessages.ts +0 -47
- package/src/types/_schema/Senders.ts +0 -59
- package/src/types/_schema/Skills.ts +0 -53
- package/src/types/_schema/Tags.ts +0 -53
- package/src/types/_schema/WebsiteBlocks.ts +0 -45
- package/src/types/_schema/WebsiteLandingPages.ts +0 -47
- package/src/types/_schema/WebsiteStaticPages.ts +0 -53
- package/src/types/index.ts +0 -2
- package/src/types/models/admin/campaigns/index.ts +0 -28
- package/src/types/models/admin/candidacies/index.ts +0 -69
- package/src/types/models/admin/clients/index.ts +0 -49
- package/src/types/models/admin/index.ts +0 -12
- package/src/types/models/admin/listViews/index.ts +0 -48
- package/src/types/models/admin/locations/index.ts +0 -28
- package/src/types/models/admin/messages/index.ts +0 -14
- package/src/types/models/admin/partners/index.ts +0 -36
- package/src/types/models/admin/persons/index.ts +0 -90
- package/src/types/models/admin/positions/index.ts +0 -72
- package/src/types/models/admin/referrals/index.ts +0 -77
- package/src/types/models/admin/settings/index.ts +0 -24
- package/src/types/models/admin/website/home.ts +0 -42
- package/src/types/models/admin/website/index.ts +0 -2
- package/src/types/models/admin/website/shared.ts +0 -40
- package/src/types/models/auth/index.ts +0 -6
- package/src/types/utils/index.ts +0 -15
- /package/dist/src/{types/admin/candidacies → schema/admin/dashboard}/index.js +0 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createInsertSchema,
|
|
3
|
+
createSelectSchema,
|
|
4
|
+
createUpdateSchema
|
|
5
|
+
} from 'drizzle-zod'
|
|
6
|
+
import { campaign, candidacy, client, person, referral } from '../../core'
|
|
7
|
+
import { ListQuerySchema, type ListResponse } from '../../../utils'
|
|
8
|
+
import { z } from 'zod/v4'
|
|
9
|
+
|
|
10
|
+
//// validators
|
|
11
|
+
|
|
12
|
+
export const AdminReferralCreateSchema = createInsertSchema(referral)
|
|
13
|
+
export const AdminReferralPersonSelectSchema = createSelectSchema(person).pick({
|
|
14
|
+
id: true,
|
|
15
|
+
firstName: true,
|
|
16
|
+
lastName: true,
|
|
17
|
+
fullName: true,
|
|
18
|
+
photoUri: true,
|
|
19
|
+
email: true
|
|
20
|
+
})
|
|
21
|
+
export const AdminReferralSelectSchema = createSelectSchema(referral).extend({
|
|
22
|
+
referrer: AdminReferralPersonSelectSchema.optional(),
|
|
23
|
+
candidacy: createSelectSchema(candidacy)
|
|
24
|
+
.pick({
|
|
25
|
+
id: true,
|
|
26
|
+
stage: true
|
|
27
|
+
})
|
|
28
|
+
.extend({
|
|
29
|
+
person: AdminReferralPersonSelectSchema.optional()
|
|
30
|
+
}),
|
|
31
|
+
campaign: createSelectSchema(campaign)
|
|
32
|
+
.pick({
|
|
33
|
+
id: true,
|
|
34
|
+
name: true
|
|
35
|
+
})
|
|
36
|
+
.optional(),
|
|
37
|
+
position: createSelectSchema(campaign)
|
|
38
|
+
.pick({
|
|
39
|
+
id: true,
|
|
40
|
+
name: true
|
|
41
|
+
})
|
|
42
|
+
.extend({
|
|
43
|
+
client: createSelectSchema(client)
|
|
44
|
+
.pick({
|
|
45
|
+
id: true,
|
|
46
|
+
name: true
|
|
47
|
+
})
|
|
48
|
+
.optional()
|
|
49
|
+
})
|
|
50
|
+
.optional()
|
|
51
|
+
})
|
|
52
|
+
export const AdminReferralUpdateSchema = createUpdateSchema(referral)
|
|
53
|
+
|
|
54
|
+
export const AdminReferralParamsSchema = AdminReferralSelectSchema.pick({
|
|
55
|
+
id: true
|
|
56
|
+
})
|
|
57
|
+
export const AdminReferralListQuerySchema = ListQuerySchema.extend({
|
|
58
|
+
filter: AdminReferralSelectSchema.pick({
|
|
59
|
+
referrerId: true
|
|
60
|
+
})
|
|
61
|
+
.extend({
|
|
62
|
+
positionId: z.string().uuid().optional()
|
|
63
|
+
})
|
|
64
|
+
.partial()
|
|
65
|
+
.optional()
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
export const AdminReferralUpdateParamsSchema = AdminReferralParamsSchema
|
|
69
|
+
export const AdminReferralDeleteParamsSchema = AdminReferralParamsSchema
|
|
70
|
+
|
|
71
|
+
//// types
|
|
72
|
+
|
|
73
|
+
type AdminReferral = z.infer<typeof AdminReferralSelectSchema>
|
|
74
|
+
|
|
75
|
+
// detail
|
|
76
|
+
export type AdminReferralParams = z.infer<typeof AdminReferralParamsSchema>
|
|
77
|
+
export type AdminReferralResult = AdminReferral
|
|
78
|
+
|
|
79
|
+
// list
|
|
80
|
+
export type AdminReferralListQuery = z.infer<
|
|
81
|
+
typeof AdminReferralListQuerySchema
|
|
82
|
+
>
|
|
83
|
+
export type AdminReferralListResult = ListResponse<
|
|
84
|
+
z.infer<typeof AdminReferralSelectSchema>
|
|
85
|
+
>
|
|
86
|
+
|
|
87
|
+
// create
|
|
88
|
+
export type AdminReferralCreateInput = z.infer<typeof AdminReferralCreateSchema>
|
|
89
|
+
export type AdminReferralCreateResult = Pick<AdminReferral, 'id'>
|
|
90
|
+
|
|
91
|
+
// update
|
|
92
|
+
export type AdminReferralUpdateParams = z.infer<
|
|
93
|
+
typeof AdminReferralUpdateParamsSchema
|
|
94
|
+
>
|
|
95
|
+
export type AdminReferralUpdateInput = Partial<AdminReferral>
|
|
96
|
+
|
|
97
|
+
// delete
|
|
98
|
+
export type AdminReferralDeleteParams = z.infer<
|
|
99
|
+
typeof AdminReferralDeleteParamsSchema
|
|
100
|
+
>
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createInsertSchema,
|
|
3
|
+
createSelectSchema,
|
|
4
|
+
createUpdateSchema
|
|
5
|
+
} from 'drizzle-zod'
|
|
6
|
+
import {
|
|
7
|
+
client,
|
|
8
|
+
message,
|
|
9
|
+
person,
|
|
10
|
+
position,
|
|
11
|
+
referralToMessage
|
|
12
|
+
} from '../../core'
|
|
13
|
+
import { ListQuerySchema, type ListResponse } from '../../../utils'
|
|
14
|
+
import { z } from 'zod/v4'
|
|
15
|
+
|
|
16
|
+
const defaultParams = {
|
|
17
|
+
referralId: true,
|
|
18
|
+
messageId: true
|
|
19
|
+
} as const
|
|
20
|
+
|
|
21
|
+
//// validators
|
|
22
|
+
|
|
23
|
+
export const AdminReferralToMessageCreateSchema =
|
|
24
|
+
createInsertSchema(referralToMessage)
|
|
25
|
+
export const AdminReferralToMessageSelectSchema = createSelectSchema(
|
|
26
|
+
referralToMessage
|
|
27
|
+
).extend({
|
|
28
|
+
message: createSelectSchema(message).pick({
|
|
29
|
+
id: true,
|
|
30
|
+
personId: true
|
|
31
|
+
}),
|
|
32
|
+
referral: z.object({
|
|
33
|
+
referrer: createSelectSchema(person).pick({
|
|
34
|
+
id: true,
|
|
35
|
+
email: true,
|
|
36
|
+
fullName: true
|
|
37
|
+
}),
|
|
38
|
+
candidacy: z.object({
|
|
39
|
+
person: createSelectSchema(person).pick({
|
|
40
|
+
id: true,
|
|
41
|
+
email: true,
|
|
42
|
+
fullName: true
|
|
43
|
+
})
|
|
44
|
+
}),
|
|
45
|
+
position: createSelectSchema(position)
|
|
46
|
+
.pick({
|
|
47
|
+
id: true,
|
|
48
|
+
name: true
|
|
49
|
+
})
|
|
50
|
+
.extend({
|
|
51
|
+
client: createSelectSchema(client).pick({
|
|
52
|
+
id: true,
|
|
53
|
+
name: true
|
|
54
|
+
})
|
|
55
|
+
})
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
export const AdminReferralToMessageUpdateSchema =
|
|
59
|
+
createUpdateSchema(referralToMessage)
|
|
60
|
+
|
|
61
|
+
export const AdminReferralToMessageParamsSchema =
|
|
62
|
+
AdminReferralToMessageSelectSchema.pick(defaultParams)
|
|
63
|
+
export const AdminReferralToMessageListQuerySchema = ListQuerySchema
|
|
64
|
+
export const AdminReferralToMessageUpdateParamsSchema =
|
|
65
|
+
AdminReferralToMessageParamsSchema.pick(defaultParams)
|
|
66
|
+
export const AdminReferralToMessageDeleteParamsSchema =
|
|
67
|
+
AdminReferralToMessageParamsSchema.pick(defaultParams)
|
|
68
|
+
|
|
69
|
+
export const AdminReferralToMessageReferralListParamsSchema =
|
|
70
|
+
AdminReferralToMessageSelectSchema.pick({
|
|
71
|
+
messageId: true
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
export const AdminReferralToMessageMessageListParamsSchema =
|
|
75
|
+
AdminReferralToMessageSelectSchema.pick({
|
|
76
|
+
referralId: true
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
//// types
|
|
80
|
+
|
|
81
|
+
type AdminReferralToMessage = z.infer<typeof AdminReferralToMessageSelectSchema>
|
|
82
|
+
|
|
83
|
+
// detail
|
|
84
|
+
export type AdminReferralToMessageParams = z.infer<
|
|
85
|
+
typeof AdminReferralToMessageParamsSchema
|
|
86
|
+
>
|
|
87
|
+
export type AdminReferralToMessageResult = AdminReferralToMessage
|
|
88
|
+
|
|
89
|
+
// list
|
|
90
|
+
export type AdminReferralToMessageListQuery = z.infer<
|
|
91
|
+
typeof AdminReferralToMessageListQuerySchema
|
|
92
|
+
>
|
|
93
|
+
export type AdminReferralToMessageListResult = ListResponse<
|
|
94
|
+
z.infer<typeof AdminReferralToMessageSelectSchema>
|
|
95
|
+
>
|
|
96
|
+
|
|
97
|
+
// create
|
|
98
|
+
export type AdminReferralToMessageCreateInput = z.infer<
|
|
99
|
+
typeof AdminReferralToMessageCreateSchema
|
|
100
|
+
>
|
|
101
|
+
|
|
102
|
+
// update
|
|
103
|
+
export type AdminReferralToMessageUpdateParams = z.infer<
|
|
104
|
+
typeof AdminReferralToMessageUpdateParamsSchema
|
|
105
|
+
>
|
|
106
|
+
export type AdminReferralToMessageUpdateInput = Partial<AdminReferralToMessage>
|
|
107
|
+
|
|
108
|
+
// delete
|
|
109
|
+
export type AdminReferralToMessageDeleteParams = z.infer<
|
|
110
|
+
typeof AdminReferralToMessageDeleteParamsSchema
|
|
111
|
+
>
|
|
112
|
+
|
|
113
|
+
// list by messageId
|
|
114
|
+
export type AdminReferralToMessageReferralListParams = z.infer<
|
|
115
|
+
typeof AdminReferralToMessageReferralListParamsSchema
|
|
116
|
+
>
|
|
117
|
+
|
|
118
|
+
// list by referralId
|
|
119
|
+
export type AdminReferralToMessageMessageListParams = z.infer<
|
|
120
|
+
typeof AdminReferralToMessageMessageListParamsSchema
|
|
121
|
+
>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createInsertSchema,
|
|
3
|
+
createSelectSchema,
|
|
4
|
+
createUpdateSchema
|
|
5
|
+
} from 'drizzle-zod'
|
|
6
|
+
import { sender } from '../../core'
|
|
7
|
+
import { ListQuerySchema, type ListResponse } from '../../../utils'
|
|
8
|
+
import { z } from 'zod/v4'
|
|
9
|
+
|
|
10
|
+
//// validators
|
|
11
|
+
|
|
12
|
+
export const AdminSenderCreateSchema = createInsertSchema(sender)
|
|
13
|
+
export const AdminSenderSelectSchema = createSelectSchema(sender)
|
|
14
|
+
export const AdminSenderUpdateSchema = createUpdateSchema(sender)
|
|
15
|
+
|
|
16
|
+
export const AdminSenderParamsSchema = AdminSenderSelectSchema.pick({
|
|
17
|
+
id: true
|
|
18
|
+
})
|
|
19
|
+
export const AdminSenderListQuerySchema = ListQuerySchema
|
|
20
|
+
export const AdminSenderUpdateParamsSchema = AdminSenderParamsSchema
|
|
21
|
+
export const AdminSenderDeleteParamsSchema = AdminSenderParamsSchema
|
|
22
|
+
|
|
23
|
+
//// types
|
|
24
|
+
|
|
25
|
+
type AdminSender = z.infer<typeof AdminSenderSelectSchema>
|
|
26
|
+
|
|
27
|
+
// detail
|
|
28
|
+
export type AdminSenderParams = z.infer<typeof AdminSenderParamsSchema>
|
|
29
|
+
export type AdminSenderResult = AdminSender
|
|
30
|
+
|
|
31
|
+
// list
|
|
32
|
+
export type AdminSenderListQuery = z.infer<typeof AdminSenderListQuerySchema>
|
|
33
|
+
export type AdminSenderListResult = ListResponse<
|
|
34
|
+
z.infer<typeof AdminSenderSelectSchema>
|
|
35
|
+
>
|
|
36
|
+
|
|
37
|
+
// create
|
|
38
|
+
export type AdminSenderCreateInput = z.infer<typeof AdminSenderCreateSchema>
|
|
39
|
+
export type AdminSenderCreateResult = Pick<AdminSender, 'id'>
|
|
40
|
+
|
|
41
|
+
// update
|
|
42
|
+
export type AdminSenderUpdateParams = z.infer<
|
|
43
|
+
typeof AdminSenderUpdateParamsSchema
|
|
44
|
+
>
|
|
45
|
+
export type AdminSenderUpdateInput = Partial<AdminSender>
|
|
46
|
+
|
|
47
|
+
// delete
|
|
48
|
+
export type AdminSenderDeleteParams = z.infer<
|
|
49
|
+
typeof AdminSenderDeleteParamsSchema
|
|
50
|
+
>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod/v4'
|
|
2
|
+
|
|
3
|
+
export const AdminSendgridCreateListResponseSchema = z.object({
|
|
4
|
+
id: z.string()
|
|
5
|
+
})
|
|
6
|
+
|
|
7
|
+
export type AdminSendgridCreateListResponse = z.infer<
|
|
8
|
+
typeof AdminSendgridCreateListResponseSchema
|
|
9
|
+
>
|
|
10
|
+
|
|
11
|
+
export const AdminSendgridCreateSingleSendResponseSchema = z.object({
|
|
12
|
+
id: z.string()
|
|
13
|
+
})
|
|
14
|
+
export type AdminSendgridCreateSingleSendResponse = z.infer<
|
|
15
|
+
typeof AdminSendgridCreateSingleSendResponseSchema
|
|
16
|
+
>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { SETTINGS_OPTION_LISTS } from '../../../constants'
|
|
2
|
+
import { ListQuerySchema, type ListResponse } from '../../../utils'
|
|
3
|
+
import { z } from 'zod/v4'
|
|
4
|
+
|
|
5
|
+
//// validators
|
|
6
|
+
|
|
7
|
+
export const AdminSettingsOptionSchema = z.object({
|
|
8
|
+
id: z.string(),
|
|
9
|
+
name: z.string()
|
|
10
|
+
})
|
|
11
|
+
export const AdminSettingsOptionListParamsSchema = z.object({
|
|
12
|
+
list: z.enum(SETTINGS_OPTION_LISTS)
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
export const AdminSettingsOptionListQuerySchema = ListQuerySchema.extend({
|
|
16
|
+
filter: AdminSettingsOptionSchema.pick({
|
|
17
|
+
name: true
|
|
18
|
+
})
|
|
19
|
+
.partial()
|
|
20
|
+
.optional()
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
//// types
|
|
24
|
+
|
|
25
|
+
type AdminSettingsOption = z.infer<typeof AdminSettingsOptionSchema>
|
|
26
|
+
|
|
27
|
+
// list
|
|
28
|
+
export type AdminSettingsOptionListQuery = z.infer<
|
|
29
|
+
typeof AdminSettingsOptionListQuerySchema
|
|
30
|
+
>
|
|
31
|
+
export type AdminSettingsOptionListParams = z.infer<
|
|
32
|
+
typeof AdminSettingsOptionListParamsSchema
|
|
33
|
+
>
|
|
34
|
+
export type AdminSettingsOptionListResult = ListResponse<AdminSettingsOption>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createInsertSchema,
|
|
3
|
+
createSelectSchema,
|
|
4
|
+
createUpdateSchema
|
|
5
|
+
} from 'drizzle-zod'
|
|
6
|
+
import { skill } 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 AdminSkillCreateSchema = createInsertSchema(skill, upsertExtended)
|
|
23
|
+
export const AdminSelectSkillSchema = createSelectSchema(skill)
|
|
24
|
+
export const AdminSkillUpdateSchema = createUpdateSchema(skill, upsertExtended)
|
|
25
|
+
|
|
26
|
+
export const AdminSkillParamsSchema = AdminSelectSkillSchema.pick({
|
|
27
|
+
id: true
|
|
28
|
+
})
|
|
29
|
+
export const AdminSkillSlugParamsSchema = AdminSelectSkillSchema.pick({
|
|
30
|
+
slug: true
|
|
31
|
+
})
|
|
32
|
+
export const AdminSkillListQuerySchema = ListQuerySchema
|
|
33
|
+
export const AdminSkillUpdateParamsSchema = AdminSkillParamsSchema
|
|
34
|
+
export const AdminSkillDeleteParamsSchema = AdminSkillParamsSchema
|
|
35
|
+
|
|
36
|
+
//// types
|
|
37
|
+
|
|
38
|
+
type AdminSkill = z.infer<typeof AdminSelectSkillSchema>
|
|
39
|
+
|
|
40
|
+
// detail
|
|
41
|
+
export type AdminSkillParams = z.infer<typeof AdminSkillParamsSchema>
|
|
42
|
+
export type AdminSkillSlugParams = z.infer<typeof AdminSkillSlugParamsSchema>
|
|
43
|
+
export type AdminSkillResult = AdminSkill
|
|
44
|
+
|
|
45
|
+
// list
|
|
46
|
+
export type AdminSkillListQuery = z.infer<typeof AdminSkillListQuerySchema>
|
|
47
|
+
export type AdminSkillListResult = ListResponse<
|
|
48
|
+
z.infer<typeof AdminSelectSkillSchema>
|
|
49
|
+
>
|
|
50
|
+
|
|
51
|
+
// create
|
|
52
|
+
export type AdminSkillCreateInput = z.infer<typeof AdminSkillCreateSchema>
|
|
53
|
+
export type AdminSkillCreateResult = Pick<AdminSkill, 'id'>
|
|
54
|
+
|
|
55
|
+
// update
|
|
56
|
+
export type AdminSkillUpdateParams = z.infer<
|
|
57
|
+
typeof AdminSkillUpdateParamsSchema
|
|
58
|
+
>
|
|
59
|
+
export type AdminSkillUpdateInput = Partial<AdminSkill>
|
|
60
|
+
|
|
61
|
+
// delete
|
|
62
|
+
export type AdminSkillDeleteParams = z.infer<
|
|
63
|
+
typeof AdminSkillDeleteParamsSchema
|
|
64
|
+
>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createInsertSchema,
|
|
3
|
+
createSelectSchema,
|
|
4
|
+
createUpdateSchema
|
|
5
|
+
} from 'drizzle-zod'
|
|
6
|
+
import { tag } 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 AdminTagCreateSchema = createInsertSchema(tag, upsertExtended)
|
|
23
|
+
export const AdminTagSelectSchema = createSelectSchema(tag)
|
|
24
|
+
export const AdminTagUpdateSchema = createUpdateSchema(tag, upsertExtended)
|
|
25
|
+
|
|
26
|
+
export const AdminTagParamsSchema = AdminTagSelectSchema.pick({
|
|
27
|
+
id: true
|
|
28
|
+
})
|
|
29
|
+
export const AdminTagListQuerySchema = ListQuerySchema
|
|
30
|
+
export const AdminTagUpdateParamsSchema = AdminTagParamsSchema
|
|
31
|
+
export const AdminTagDeleteParamsSchema = AdminTagParamsSchema
|
|
32
|
+
|
|
33
|
+
//// types
|
|
34
|
+
|
|
35
|
+
type AdminTag = z.infer<typeof AdminTagSelectSchema>
|
|
36
|
+
|
|
37
|
+
// detail
|
|
38
|
+
export type AdminTagParams = z.infer<typeof AdminTagParamsSchema>
|
|
39
|
+
export type AdminTagResult = AdminTag
|
|
40
|
+
|
|
41
|
+
// list
|
|
42
|
+
export type AdminTagListQuery = z.infer<typeof AdminTagListQuerySchema>
|
|
43
|
+
export type AdminTagListResult = ListResponse<
|
|
44
|
+
z.infer<typeof AdminTagSelectSchema>
|
|
45
|
+
>
|
|
46
|
+
|
|
47
|
+
// create
|
|
48
|
+
export type AdminTagCreateInput = z.infer<typeof AdminTagCreateSchema>
|
|
49
|
+
export type AdminTagCreateResult = Pick<AdminTag, 'id'>
|
|
50
|
+
|
|
51
|
+
// update
|
|
52
|
+
export type AdminTagUpdateParams = z.infer<typeof AdminTagUpdateParamsSchema>
|
|
53
|
+
export type AdminTagUpdateInput = Partial<AdminTag>
|
|
54
|
+
|
|
55
|
+
// delete
|
|
56
|
+
export type AdminTagDeleteParams = z.infer<typeof AdminTagDeleteParamsSchema>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createInsertSchema,
|
|
3
|
+
createSelectSchema,
|
|
4
|
+
createUpdateSchema
|
|
5
|
+
} from 'drizzle-zod'
|
|
6
|
+
import { websiteLandingPage } from '../../core'
|
|
7
|
+
import { ListQuerySchema, type ListResponse } from '../../../utils'
|
|
8
|
+
import { z } from 'zod/v4'
|
|
9
|
+
|
|
10
|
+
//// validators
|
|
11
|
+
|
|
12
|
+
export const AdminWebsiteLandingPageCreateSchema =
|
|
13
|
+
createInsertSchema(websiteLandingPage)
|
|
14
|
+
export const AdminWebsiteLandingPageSelectSchema =
|
|
15
|
+
createSelectSchema(websiteLandingPage)
|
|
16
|
+
export const AdminWebsiteLandingPageUpdateSchema =
|
|
17
|
+
createUpdateSchema(websiteLandingPage)
|
|
18
|
+
|
|
19
|
+
export const AdminWebsiteLandingPageParamsSchema =
|
|
20
|
+
AdminWebsiteLandingPageSelectSchema.pick({
|
|
21
|
+
id: true
|
|
22
|
+
})
|
|
23
|
+
export const AdminWebsiteLandingPageListQuerySchema = ListQuerySchema
|
|
24
|
+
export const AdminWebsiteLandingPageUpdateParamsSchema =
|
|
25
|
+
AdminWebsiteLandingPageParamsSchema
|
|
26
|
+
export const adminWebsiteLandingPageDeleteParamsSchema =
|
|
27
|
+
AdminWebsiteLandingPageParamsSchema
|
|
28
|
+
|
|
29
|
+
//// types
|
|
30
|
+
|
|
31
|
+
type AdminWebsiteLandingPage = z.infer<
|
|
32
|
+
typeof AdminWebsiteLandingPageSelectSchema
|
|
33
|
+
>
|
|
34
|
+
|
|
35
|
+
// detail
|
|
36
|
+
export type AdminWebsiteLandingPageParams = z.infer<
|
|
37
|
+
typeof AdminWebsiteLandingPageParamsSchema
|
|
38
|
+
>
|
|
39
|
+
export type AdminWebsiteLandingPageResult = AdminWebsiteLandingPage
|
|
40
|
+
|
|
41
|
+
// list
|
|
42
|
+
export type AdminWebsiteLandingPageListQuery = z.infer<
|
|
43
|
+
typeof AdminWebsiteLandingPageListQuerySchema
|
|
44
|
+
>
|
|
45
|
+
export type AdminWebsiteLandingPageListResult = ListResponse<
|
|
46
|
+
z.infer<typeof AdminWebsiteLandingPageSelectSchema>
|
|
47
|
+
>
|
|
48
|
+
|
|
49
|
+
// create
|
|
50
|
+
export type AdminWebsiteLandingPageCreateInput = z.infer<
|
|
51
|
+
typeof AdminWebsiteLandingPageCreateSchema
|
|
52
|
+
>
|
|
53
|
+
export type AdminWebsiteLandingPageCreateResult = Pick<
|
|
54
|
+
AdminWebsiteLandingPage,
|
|
55
|
+
'id'
|
|
56
|
+
>
|
|
57
|
+
|
|
58
|
+
// update
|
|
59
|
+
export type AdminWebsiteLandingPageUpdateParams = z.infer<
|
|
60
|
+
typeof AdminWebsiteLandingPageUpdateParamsSchema
|
|
61
|
+
>
|
|
62
|
+
export type AdminWebsiteLandingPageUpdateInput = z.infer<
|
|
63
|
+
typeof AdminWebsiteLandingPageUpdateSchema
|
|
64
|
+
>
|
|
65
|
+
|
|
66
|
+
// delete
|
|
67
|
+
export type AdminWebsiteLandingPageDeleteParams = z.infer<
|
|
68
|
+
typeof adminWebsiteLandingPageDeleteParamsSchema
|
|
69
|
+
>
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createInsertSchema,
|
|
3
|
+
createSelectSchema,
|
|
4
|
+
createUpdateSchema
|
|
5
|
+
} from 'drizzle-zod'
|
|
6
|
+
import { websiteStaticPage } from '../../core'
|
|
7
|
+
import { ListQuerySchema, type ListResponse } from '../../../utils'
|
|
8
|
+
import { z } from 'zod/v4'
|
|
9
|
+
|
|
10
|
+
//// validators
|
|
11
|
+
|
|
12
|
+
export const AdminWebsiteStaticPageCreateSchema =
|
|
13
|
+
createInsertSchema(websiteStaticPage)
|
|
14
|
+
export const AdminWebsiteStaticPageSelectSchema =
|
|
15
|
+
createSelectSchema(websiteStaticPage)
|
|
16
|
+
export const AdminWebsiteStaticPageUpdateSchema =
|
|
17
|
+
createUpdateSchema(websiteStaticPage)
|
|
18
|
+
|
|
19
|
+
export const AdminWebsiteStaticPageParamsSchema =
|
|
20
|
+
AdminWebsiteStaticPageSelectSchema.pick({
|
|
21
|
+
slug: true
|
|
22
|
+
})
|
|
23
|
+
export const AdminWebsiteStaticPageListQuerySchema = ListQuerySchema
|
|
24
|
+
export const AdminWebsiteStaticPageUpdateParamsSchema =
|
|
25
|
+
AdminWebsiteStaticPageParamsSchema
|
|
26
|
+
export const adminWebsiteStaticPageDeleteParamsSchema =
|
|
27
|
+
AdminWebsiteStaticPageParamsSchema
|
|
28
|
+
|
|
29
|
+
//// types
|
|
30
|
+
|
|
31
|
+
type AdminWebsiteStaticPage = z.infer<typeof AdminWebsiteStaticPageSelectSchema>
|
|
32
|
+
|
|
33
|
+
// detail
|
|
34
|
+
export type AdminWebsiteStaticPageParams = z.infer<
|
|
35
|
+
typeof AdminWebsiteStaticPageParamsSchema
|
|
36
|
+
>
|
|
37
|
+
export type AdminWebsiteStaticPageResult = AdminWebsiteStaticPage
|
|
38
|
+
|
|
39
|
+
// list
|
|
40
|
+
export type AdminWebsiteStaticPageListQuery = z.infer<
|
|
41
|
+
typeof AdminWebsiteStaticPageListQuerySchema
|
|
42
|
+
>
|
|
43
|
+
export type AdminWebsiteStaticPageListResult = ListResponse<
|
|
44
|
+
z.infer<typeof AdminWebsiteStaticPageSelectSchema>
|
|
45
|
+
>
|
|
46
|
+
|
|
47
|
+
// create
|
|
48
|
+
export type AdminWebsiteStaticPageCreateInput = z.infer<
|
|
49
|
+
typeof AdminWebsiteStaticPageCreateSchema
|
|
50
|
+
>
|
|
51
|
+
export type AdminWebsiteStaticPageCreateResult = Pick<
|
|
52
|
+
AdminWebsiteStaticPage,
|
|
53
|
+
'id'
|
|
54
|
+
>
|
|
55
|
+
|
|
56
|
+
// update
|
|
57
|
+
export type AdminWebsiteStaticPageUpdateParams = z.infer<
|
|
58
|
+
typeof AdminWebsiteStaticPageUpdateParamsSchema
|
|
59
|
+
>
|
|
60
|
+
export type AdminWebsiteStaticPageUpdateInput = z.infer<
|
|
61
|
+
typeof AdminWebsiteStaticPageUpdateSchema
|
|
62
|
+
>
|
|
63
|
+
|
|
64
|
+
// delete
|
|
65
|
+
export type AdminWebsiteStaticPageDeleteParams = z.infer<
|
|
66
|
+
typeof adminWebsiteStaticPageDeleteParamsSchema
|
|
67
|
+
>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createInsertSchema } from 'drizzle-zod'
|
|
2
|
+
import { person, otp } from '../core'
|
|
3
|
+
import { z } from 'zod/v4'
|
|
4
|
+
|
|
5
|
+
export const AuthOtpCreateSchema = createInsertSchema(person).pick({
|
|
6
|
+
email: true
|
|
7
|
+
})
|
|
8
|
+
export const AuthSignInCreateInputSchema = createInsertSchema(otp).pick({
|
|
9
|
+
code: true
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
export type AuthOtpCreateInput = z.infer<typeof AuthOtpCreateSchema>
|
|
13
|
+
|
|
14
|
+
export type AuthSignInCreateInput = z.infer<typeof AuthSignInCreateInputSchema>
|